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

Enhanced Validator Setup Docs #1926

Merged
merged 10 commits into from
Nov 27, 2019
Merged

Enhanced Validator Setup Docs #1926

merged 10 commits into from
Nov 27, 2019

Conversation

nambrot
Copy link
Contributor

@nambrot nambrot commented Nov 27, 2019

Description

This PR makes some significant changes to recommend a more realistic setup. Specifically:

  • It actually shows how to run on 4 different machines to properly run validator, proxy and the attestation service
  • It separates out keys for the attestation and validator signer so that the account key can be held in cold storage.

Note that these docs change on of the environment variables in the attestation-service so you'll likely need to use a different docker image for it to actually run

Tested

  • I have not actually had the opportunity to run these instructions

@nambrot nambrot requested a review from timmoreton as a code owner November 27, 2019 03:15
@asaj asaj self-assigned this Nov 27, 2019
## Executing the Attestation Service

The following command for running the Attestation Service is using Nexmo, but you can adapt for using Twilio easily:

```bash
docker run -v $PWD/attestation-service:/celo-monorepo/packages/attestation-service/db --name -d --restart always --entrypoint /bin/bash -e ATTESTATION_SIGNER_ADDRESS=$ATTESTATION_SIGNER_ADDRESS -e ACCOUNT_ADDRESS=0x$CELO_VALIDATOR_ADDRESS -e CELO_PROVIDER=$CELO_PROVIDER -e DATABASE_URL=$DATABASE_URL -e SMS_PROVIDERS=nexmo -e NEXMO_KEY=$NEXMO_KEY -e NEXMO_SECRET=$NEXMO_SECRET -e NEXMO_BLACKLIST=$NEXMO_BLACKLIST -d -p 3000:80 $CELO_IMAGE_ATTESTATION -c " cd /celo-monorepo/packages/attestation-service && touch db/attestation.db && yarn run db:migrate && yarn start "
docker run --name celo-attestation-service -d --restart always --entrypoint /bin/bash -e ATTESTATION_SIGNER_ADDRESS=$ATTESTATION_SIGNER_ADDRESS -e CELO_VALIDATOR_ADDRESS=0x$CELO_VALIDATOR_ADDRESS -e CELO_PROVIDER=$CELO_PROVIDER -e DATABASE_URL=$DATABASE_URL -e SMS_PROVIDERS=nexmo -e NEXMO_KEY=$NEXMO_KEY -e NEXMO_SECRET=$NEXMO_SECRET -e NEXMO_BLACKLIST=$NEXMO_BLACKLIST -p 3000:80 $CELO_IMAGE_ATTESTATION -c " cd /celo-monorepo/packages/attestation-service && yarn run db:migrate && yarn start "
Copy link
Contributor Author

@nambrot nambrot Nov 27, 2019

Choose a reason for hiding this comment

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

note the 0x in -e CELO_VALIDATOR_ADDRESS=0x$CELO_VALIDATOR_ADDRESS @asaj

@codecov
Copy link

codecov bot commented Nov 27, 2019

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #1926    +/-   ##
=======================================
  Coverage    74.2%   74.2%            
=======================================
  Files         278     278            
  Lines        7673    7673            
  Branches      961     674   -287     
=======================================
  Hits         5694    5694            
  Misses       1862    1862            
  Partials      117     117
Flag Coverage Δ
#mobile 74.2% <ø> (ø) ⬆️

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 ff6fb3e...a91837c. Read the comment docs.

Copy link
Contributor

@asaj asaj left a comment

Choose a reason for hiding this comment

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

This is great! Really nice progress 😄

packages/docs/getting-started/running-a-validator.md Outdated Show resolved Hide resolved
packages/docs/getting-started/running-a-validator.md Outdated Show resolved Hide resolved
packages/docs/getting-started/running-a-validator.md Outdated Show resolved Hide resolved
packages/docs/getting-started/running-a-validator.md Outdated Show resolved Hide resolved
packages/docs/getting-started/running-a-validator.md Outdated Show resolved Hide resolved
packages/docs/getting-started/running-a-validator.md Outdated Show resolved Hide resolved
packages/docs/getting-started/running-a-validator.md Outdated Show resolved Hide resolved
packages/docs/getting-started/running-a-validator.md Outdated Show resolved Hide resolved
packages/docs/getting-started/running-a-validator.md Outdated Show resolved Hide resolved
packages/docs/getting-started/running-a-validator.md Outdated Show resolved Hide resolved
screen -r -S celo-validator
# On the validator machine
export PROXY_ENODE=<proxy enode>
export PROXY_IP=<proxy ip address>
Copy link
Contributor

Choose a reason for hiding this comment

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

Where do we get this?

Copy link
Contributor

@kevjue kevjue Nov 27, 2019

Choose a reason for hiding this comment

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

Since the proxy and validator are now separate machines, this should be just the IP address of the proxy machine itself. @jcortejoso - can you please confirm that.

packages/docs/getting-started/running-a-validator.md Outdated Show resolved Hide resolved
packages/docs/getting-started/running-a-validator.md Outdated Show resolved Hide resolved
In order to be elected as a Validator, you will first need to register your group and Validator. Note that when registering a Validator Group, you need to specify a commission, which is the fraction of epoch rewards paid to the group by its members.
```bash
# On the Attestation machine
celocli account:proof-of-possession --signer $ATTESTATION_SIGNER_ADDRESS --account $CELO_VALIDATOR_ADDRESS
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shouldn't need the CLI anymore

@asaj asaj merged commit 8f86e14 into master Nov 27, 2019
aaronmgdr added a commit that referenced this pull request Nov 27, 2019
* master:
  Fix celotool expected cluster check (#1932)
  Build Page for Baklava Launch Part 1  (#1866)
  cli: Fix for #1875 (#1920)
  cli: Fixes for #1880 and #1874 (#1918)
  Minor edits to full-node and other docs (#1917)
  Check that we have provisioned phone numbers (#1927)
  Sort invite contact list (#1936)
  Generate the pop for the attestation service with geth (#1931)
  Have validators use ephemeral node keys by default (#1922)
  Enhanced Validator Setup Docs (#1926)
  Indicate account registration (#1928)
  Bugfix: actually whitelist oracle account (#1865)
  Display current account locked gold requirement in lockedgold:show (#1923)
aaronmgdr added a commit that referenced this pull request Nov 27, 2019
* master: (97 commits)
  Fix celotool expected cluster check (#1932)
  Build Page for Baklava Launch Part 1  (#1866)
  cli: Fix for #1875 (#1920)
  cli: Fixes for #1880 and #1874 (#1918)
  Minor edits to full-node and other docs (#1917)
  Check that we have provisioned phone numbers (#1927)
  Sort invite contact list (#1936)
  Generate the pop for the attestation service with geth (#1931)
  Have validators use ephemeral node keys by default (#1922)
  Enhanced Validator Setup Docs (#1926)
  Indicate account registration (#1928)
  Bugfix: actually whitelist oracle account (#1865)
  Display current account locked gold requirement in lockedgold:show (#1923)
  Dedicated signing of attestation messages (#1913)
  Allow BLS info to be passed to validator:register without 0x prefix (#1919)
  Use cert manager instead of lego for k8s SSL certificates (#1924)
  Fix protocol tests (#1835)
  Fix bug in LockedGold.relock wrapper (#1915)
  Add account:show command (#1916)
  Add warning about misusing pumba (#1857)
  ...

# Conflicts:
#	packages/web/pages/_app.tsx
#	yarn.lock
@mcortesi mcortesi deleted the nambrot/enhanced-setup-docs branch December 4, 2019 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants