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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/attestation-service/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ You can use the following environment variables to configure the attestation ser

- `DATABASE_URL` - The URL under which your database is accessible, currently supported are `postgres://`, `mysql://` and `sqlite://`
- `CELO_PROVIDER` - The URL under which a celo blockchain node is reachable. This node should also have the `ATTESTATION_SIGNER_ADDRESS` unlocked for signing of the attestations themselves.
- `ACCOUNT_ADDRESS` - The address of the account on the `Accounts` smart contract
- `ATTESTATION_SIGNER_ADDRESS` - The address of the key with which attestations should be signed. You could use your account for attestations, but really you should authorize a dedicated attestation key
- `CELO_VALIDATOR_ADDRESS` - The address of the validator on the `Accounts` smart contract
- `ATTESTATION_SIGNER_ADDRESS` - The address of the key with which attestations should be signed.
- `APP_SIGNATURE` - The hash with which clients can auto-read SMS messages on android
- `SMS_PROVIDERS` - A comma-separated list of providers you want to configure, we currently support:

Expand Down
5 changes: 2 additions & 3 deletions packages/attestation-service/config/.env.development
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
DATABASE_URL=sqlite://db/dev.db
CELO_PROVIDER=https://integration-forno.celo-testnet.org
ACCOUNT_ADDRESS=0xE6e53b5fc2e18F51781f14a3ce5E7FD468247a15
ATTESTATION_KEY=x
CELO_PROVIDER=http://localhost:8545
CELO_VALIDATOR_ADDRESS=0xE6e53b5fc2e18F51781f14a3ce5E7FD468247a15
APP_SIGNATURE=x
SMS_PROVIDERS=twilio,nexmo
NEXMO_KEY=x
Expand Down
11 changes: 7 additions & 4 deletions packages/attestation-service/src/requestHandlers/attestation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ export function getAttestationSignerAddress() {
}

export function getAccountAddress() {
if (process.env.ACCOUNT_ADDRESS === undefined || !isValidAddress(process.env.ACCOUNT_ADDRESS)) {
console.error('Did not specify valid ACCOUNT_ADDRESS')
throw new Error('Did not specify valid ACCOUNT_ADDRESS')
if (
process.env.CELO_VALIDATOR_ADDRESS === undefined ||
!isValidAddress(process.env.CELO_VALIDATOR_ADDRESS)
) {
console.error('Did not specify valid CELO_VALIDATOR_ADDRESS')
throw new Error('Did not specify valid CELO_VALIDATOR_ADDRESS')
}

return toChecksumAddress(process.env.ACCOUNT_ADDRESS)
return toChecksumAddress(process.env.CELO_VALIDATOR_ADDRESS)
}

function toBase64(str: string) {
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/getting-started/baklava-testnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ You have some instructions about running the network by operating a [full node](
Please refer to [Key Concepts](../overview.md#background-and-key-concepts) for background on blockchains and an explanation of terms used in the section.

{% hint style="warning" %}
The Baklava Bet Network is designed for testing and experimentation by developers. Its tokens hold no real world economic value. The testnet software will be upgraded and the entirety of its data reset on a regular basis. This will erase your accounts, their balance and your transaction history. The testnet software will be upgraded on a regular basis. You may encounter bugs and limitations with the software and documentation.
Baklava, the incentivized testnet for the Celo Protocol. It is an early, partially audited release betanet version of the Celo Protocol. The Great Celo Stake Off allows eligible participants to engage with Baklava and, related to that participation and subject to these Terms and Conditions, eligible participants will have the opportunity to receive Celo Gold at the Mainnet launch of the Celo Protocol. The Great Celo Stake Off will operate in phases, with each phase focusing on a different part of the protocol or infrastructure to test. Transitions between each phase may include a full network reset, a hard fork, or an upgrade.
{% endhint %}

Please help us improve Celo by asking questions on the [Forum](https://forum.celo.org)!
Expand Down
Loading