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

Rearrange functions to avoid circular dependency #2082

Merged
merged 6 commits into from
Dec 6, 2019

Conversation

nambrot
Copy link
Contributor

@nambrot nambrot commented Dec 5, 2019

Description

This PR removes a circular dependency and amends the documentation to highlight the need to register a validator's metadata with the appropriate claims in them.


In order for users to request attestations from your service, you need to register the endpoint under which your service is reachable in your [metadata](/celo-codebase/protocol/identity/metadata). Run the following commands on your local machine where `$CELO_VALIDATOR_ADDRESS` is unlocked.
We are using [Metadata](/celo-codebase/protocol/identity/metadata) to allow accounts to make certain claims without having to do so on-chain. For us to complete the process, we have to make two claims:
Copy link
Contributor

Choose a reason for hiding this comment

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

best to use a relative URL here so it'll work if there's a different tree (e.g master vs alfajores) and for folks browsing github too


```bash
# On your local machine
celocli account:create-metadata ./metadata.json --from $CELO_VALIDATOR_ADDRESS
celocli account:create-metadata ./metadata.json --from 0x$CELO_VALIDATOR_ADDRESS
Copy link
Contributor

Choose a reason for hiding this comment

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

ugh - can't we just add 0x if it's not already present?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can, but this is I believe the short term fix we have been applying everywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also think we should really streamline, i personally would prefer us to 0x everywhere

```

The `ATTESTATION_SERVICE_URL` variable stores the URL to access the Attestation Service deployed. In the following command we specify the URL where this Attestation Service is:

```bash
# On your local machine
celocli account:claim-attestation-service-url ./metadata.json --url $ATTESTATION_SERVICE_URL --from $CELO_VALIDATOR_ADDRESS
celocli account:claim-attestation-service-url ./metadata.json --url $ATTESTATION_SERVICE_URL --from 0x$CELO_VALIDATOR_ADDRESS
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto


```bash
# On your local machine
celocli account:claim-account ./metadata.json --address 0x$CELO_VALIDATOR_GROUP_ADDRESS --from 0x$CELO_VALIDATOR_ADDRESS
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@@ -590,7 +602,7 @@ And then host your metadata somewhere reachable via HTTP. You can use a service
celocli account:register-metadata --url <METADATA_URL> --from $CELO_VALIDATOR_ADDRESS
```

If everything goes well users should see that you are ready for attestations by running:
If everything goes well users should be able to see your claims by by running:
Copy link
Contributor

Choose a reason for hiding this comment

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

typo: by by

@timmoreton timmoreton assigned nambrot and unassigned timmoreton Dec 5, 2019
@timmoreton
Copy link
Contributor

minor things

@nambrot nambrot assigned timmoreton and unassigned nambrot Dec 5, 2019
@nambrot
Copy link
Contributor Author

nambrot commented Dec 5, 2019

I'd vote to punt the 0x handling for later?

@timmoreton
Copy link
Contributor

Looks like you need to rebuild docs

@timmoreton timmoreton assigned nambrot and unassigned timmoreton Dec 6, 2019
@nambrot nambrot requested review from asaj and mcortesi as code owners December 6, 2019 19:15
@nambrot nambrot added the automerge Have PR merge automatically when checks pass label Dec 6, 2019
@codecov
Copy link

codecov bot commented Dec 6, 2019

Codecov Report

Merging #2082 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2082   +/-   ##
=======================================
  Coverage   74.42%   74.42%           
=======================================
  Files         281      281           
  Lines        7824     7824           
  Branches      975      975           
=======================================
  Hits         5823     5823           
  Misses       1884     1884           
  Partials      117      117
Flag Coverage Δ
#mobile 74.42% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c8ecd06...19ce156. Read the comment docs.

@celo-ci-bot-user celo-ci-bot-user merged commit 293ef2f into master Dec 6, 2019
@celo-ci-bot-user celo-ci-bot-user deleted the nambrot/claim-accounts-docs branch December 6, 2019 19:40
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants