You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### Description
This PR implements short verification codes. See the demo below.
To enable this feature we need all the validators to support `https`, which is not the case atm, so this feature are disabled by feature flag.
### Short code
Essentially, short code, which user receives consist of two parts: prefix and security code (e.g. `12345678`: `1` - prefix, `2345678` - security code).
We use prefix to identify which issuer has sent the code. Because we can not store persistent mapping of prefix<>issuer on the client side (will be gone after reinstall), we are doing the following:
* Set prefix to issuer's address mod 10 ([0,9]) and pass it with reveal request.
* When we receive a short code with a prefix back, we create a list of validators which map to the same prefix.
* We send security code to obtain attestation code to all issuers from the previous step
* One of them should return a full attestation code, all others should fail.
This approach allows us to scale for more than 10 actionable attestations at the same time and to avoid changing `Attestation.sol` contract to store mapping prefix<>issuer in it.
#### Caveat
We do occasionally redundant requests with security code to wrong validators and those exposing the code itself and increasing waiting time for the user. For 3 SMSs the probability of this happening is 30%.
For more information see this discussion https://discord.com/channels/600834479145353243/732977310101405736/778336853505081344
### Demo
![screen-20201119-212100~2](https://user-images.githubusercontent.com/6160124/99726972-426faf80-2af2-11eb-97b4-0909b8ded3ac.gif)
### Tested
With short codes enabled/disabled.
### Related issues
- Fixes#5384
- Fixes#5394
### Backwards compatibility
Yes
Feature switch so we can do it when all validators are upgraded.
The text was updated successfully, but these errors were encountered: