Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Valora] Valora processes 8 digit numeric digital codes #5384

Closed
aslawson opened this issue Oct 16, 2020 · 0 comments · Fixed by #5925
Closed

[Valora] Valora processes 8 digit numeric digital codes #5384

aslawson opened this issue Oct 16, 2020 · 0 comments · Fixed by #5925

Comments

@aslawson
Copy link
Contributor

aslawson commented Oct 16, 2020

Feature switch so we can do it when all validators are upgraded.

@aslawson aslawson added this to the Milestone 7 milestone Oct 16, 2020
@aslawson aslawson removed this from the Milestone 7 milestone Nov 9, 2020
@aslawson aslawson added this to the Milestone 7 milestone Nov 18, 2020
@mergify mergify bot closed this as completed in #5925 Nov 25, 2020
mergify bot pushed a commit that referenced this issue Nov 25, 2020
### 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants