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

[Wallet] Report to analytics reveal statuses from validators #5315

Merged
merged 15 commits into from
Nov 3, 2020

Conversation

i1skn
Copy link
Contributor

@i1skn i1skn commented Oct 13, 2020

Description

Implementing a second part of https://github.com/celo-org/celo-labs/issues/574. The logic is the following:

  • we need to fetch reveal status for each attestation. Reasons fo initiate fetch any(code entered, go away from the enter codes screen)
  • call once again get-attestations for the issuer if not 200 returned on reveal attempt immediately.
  • add firebase proxy function proxyRevealStatus.

TODO

  • When merged, yarn deploy needs to be run in packages/attestation-proxy to deploy firebase function.

Other changes

  • Small refactoring
  • Remove features. USE_PHONE_NUMBER_PRIVACY

Tested

  • Complete verification flow (all use-cases for triggering the report worked out well)
  • Deployed proxyRevealStatus and proxyReveal to celo-mobile-alfajores and tested forcing using proxy in the codebase on alfajores.

Related issues

Backwards compatibility

Yes

@i1skn i1skn removed the request for review from a team October 13, 2020 20:27
Copy link
Contributor

@timmoreton timmoreton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I would say we want status, attempt, provider, duration (if present), errors (if present).

Copy link
Contributor

@aslawson aslawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good. i would say we'd want all the data you specified in the PR overview.

i'm going to sync with tim to understand the schema for multiple attempts and whether it makes sense to parse at the level of throwing the event here or to keep in the "status" field.

i'll get back to you on it!

@i1skn i1skn requested a review from timmoreton October 29, 2020 13:58
Copy link
Contributor

@jmrossy jmrossy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Just curious, are there plans to deprecate the proxy entirely? It was only meant to be used while validators got their attestation services set up properly with TLS.

try {
const urlParams = new URLSearchParams({
phoneNumber,
salt: pepper ?? '',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of scope here but just a nit, would be nice to have salt renamed in attestation service too: https://github.com/celo-org/celo-monorepo/blob/master/packages/utils/src/io.ts#L109

Since there's been changes there anyway seems like there's an opportunity to do that (in a backwards compat way) before the next release. cc @aslawson @timmoreton

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we've already published the attestation service, so unfortunately can't do it this iteration :/

@aslawson
Copy link
Contributor

Looks good to me! Just curious, are there plans to deprecate the proxy entirely? It was only meant to be used while validators got their attestation services set up properly with TLS.

@jmrossy yup, we are currently in the process of urging validators to enable TLS now

Copy link
Contributor

@aslawson aslawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@i1skn
Copy link
Contributor Author

i1skn commented Oct 31, 2020

@jmrossy I've addressed the feedback, PTAL.

@i1skn i1skn added the automerge Have PR merge automatically when checks pass label Nov 3, 2020
@mergify mergify bot merged commit 2c7140d into master Nov 3, 2020
@mergify mergify bot deleted the i1skn/reveal-status branch November 3, 2020 19:46
@Lss-Ankit
Copy link

@jeanregisser can you please provide more details if we need to verify this task.
Thanks!!

@jeanregisser
Copy link
Contributor

No need to verify @Lss-Ankit thanks!

@Lss-Ankit
Copy link

Thanks @jeanregisser for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Have PR merge automatically when checks pass wallet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants