Skip to content

Commit

Permalink
Merge pull request #16 from celo-org/master
Browse files Browse the repository at this point in the history
master
  • Loading branch information
aaitor authored Dec 4, 2019
2 parents 92cf27c + e8c0049 commit ed0ed8e
Show file tree
Hide file tree
Showing 88 changed files with 1,282 additions and 595 deletions.
8 changes: 4 additions & 4 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CLUSTER_DOMAIN_NAME="celo-networks-dev"
TESTNET_PROJECT_NAME="celo-testnet"

BLOCKSCOUT_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/blockscout"
BLOCKSCOUT_DOCKER_IMAGE_TAG="909682b7435fc3e05849211d96fb1dfbf76306f2"
BLOCKSCOUT_DOCKER_IMAGE_TAG="d7569f6951deffb47cc2730b1ba1355eb02f6f17"
BLOCKSCOUT_WEB_REPLICAS=3
BLOCKSCOUT_DB_SUFFIX=

Expand All @@ -28,7 +28,7 @@ GETH_NODE_DOCKER_IMAGE_REPOSITORY="us.gcr.io/celo-testnet/geth"
# `geth $ git show | head -n 1`
GETH_NODE_DOCKER_IMAGE_TAG="master"

GETH_BOOTNODE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/geth-all"
GETH_BOOTNODE_DOCKER_IMAGE_REPOSITORY="us.gcr.io/celo-testnet/geth-all"
# When upgrading change this to latest commit hash from the master of the geth repo
# `geth $ git show | head -n 1`
GETH_BOOTNODE_DOCKER_IMAGE_TAG="master"
Expand All @@ -47,10 +47,10 @@ ORACLE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/oracle"
ORACLE_DOCKER_IMAGE_TAG="default"

TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-d3d165a7db548d175cd703c86c20c1657c04368d"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-d405b99872097291c8e07d2445559588547938b0"

ATTESTATION_SERVICE_DOCKER_IMAGE_REPOSITORY="us.gcr.io/celo-testnet/celo-monorepo"
ATTESTATION_SERVICE_DOCKER_IMAGE_TAG="attestation-service-59ba27b82a16ca8cc8f79e43ee829b9da41940f2"
ATTESTATION_SERVICE_DOCKER_IMAGE_TAG="attestation-service-5ee799c0a726a44113cc0a9b26932531019a07a4"

GETH_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet-production/geth-exporter"
GETH_EXPORTER_DOCKER_IMAGE_TAG="ed7d21bd50592709173368cd697ef73c1774a261"
Expand Down
10 changes: 5 additions & 5 deletions .env.integration
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CLUSTER_DOMAIN_NAME="celo-testnet"
TESTNET_PROJECT_NAME="celo-testnet"

BLOCKSCOUT_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/blockscout"
BLOCKSCOUT_DOCKER_IMAGE_TAG="909682b7435fc3e05849211d96fb1dfbf76306f2"
BLOCKSCOUT_DOCKER_IMAGE_TAG="d7569f6951deffb47cc2730b1ba1355eb02f6f17"
BLOCKSCOUT_WEB_REPLICAS=3
BLOCKSCOUT_DB_SUFFIX="29"
BLOCKSCOUT_SUBNETWORK_NAME="Integration"
Expand All @@ -26,12 +26,12 @@ FAUCET_GENESIS_ACCOUNTS=2
GETH_NODE_DOCKER_IMAGE_REPOSITORY="us.gcr.io/celo-testnet/geth"
# When upgrading change this to latest commit hash from the master of the geth repo
# `geth $ git show | head -n 1`
GETH_NODE_DOCKER_IMAGE_TAG="09a217ff58a95214cbc5189c933359707f4fdaf2"
GETH_NODE_DOCKER_IMAGE_TAG="36fdb3c48abf01e0d0e32f02636c137797eb1e08"

GETH_BOOTNODE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/geth-all"
# When upgrading change this to latest commit hash from the master of the geth repo
# `geth $ git show | head -n 1`
GETH_BOOTNODE_DOCKER_IMAGE_TAG="09a217ff58a95214cbc5189c933359707f4fdaf2"
GETH_BOOTNODE_DOCKER_IMAGE_TAG="36fdb3c48abf01e0d0e32f02636c137797eb1e08"

CELOTOOL_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
CELOTOOL_DOCKER_IMAGE_TAG="celotool-5bea6d30cbe6aa4272b32a4d2cfed5567f422ea9"
Expand All @@ -47,10 +47,10 @@ ORACLE_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/oracle"
ORACLE_DOCKER_IMAGE_TAG="default"

TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet/celo-monorepo"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-5bea6d30cbe6aa4272b32a4d2cfed5567f422ea9"
TRANSACTION_METRICS_EXPORTER_DOCKER_IMAGE_TAG="transaction-metrics-exporter-d405b99872097291c8e07d2445559588547938b0"

ATTESTATION_SERVICE_DOCKER_IMAGE_REPOSITORY="us.gcr.io/celo-testnet/celo-monorepo"
ATTESTATION_SERVICE_DOCKER_IMAGE_TAG="attestation-service-c8e3392aa2ca44ff83b4035700ece5fd12ed2b84"
ATTESTATION_SERVICE_DOCKER_IMAGE_TAG="attestation-service-5ee799c0a726a44113cc0a9b26932531019a07a4"

GETH_EXPORTER_DOCKER_IMAGE_REPOSITORY="gcr.io/celo-testnet-production/geth-exporter"
GETH_EXPORTER_DOCKER_IMAGE_TAG="ed7d21bd50592709173368cd697ef73c1774a261"
Expand Down
Binary file modified .env.mnemonic.enc
Binary file not shown.
Binary file modified .env.mnemonic.integration.enc
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/attestation-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"lint": "tslint -c tslint.json --project ."
},
"dependencies": {
"@celo/contractkit": "0.2.3-dev",
"@celo/contractkit": "0.2.5-dev",
"@celo/utils": "^0.1.0",
"bignumber.js": "^7.2.0",
"body-parser": "1.19.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/celotool/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@celo/verification-pool-api": "^1.0.0",
"@celo/utils": "^0.1.0",
"@celo/walletkit": "^0.0.14",
"@celo/contractkit": "0.2.3-dev",
"@celo/contractkit": "0.2.5-dev",
"@google-cloud/monitoring": "0.7.1",
"@google-cloud/pubsub": "^0.28.1",
"@google-cloud/storage": "^2.4.3",
Expand Down
43 changes: 43 additions & 0 deletions packages/celotool/src/cmds/deploy/upgrade/all.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { sleep } from '@celo/utils/lib/async'
import yargs from 'yargs'
import { UpgradeArgv } from '../../deploy/upgrade'
import { handler as contractsHandler } from '../initial/contracts'
import { handler as attestationServiceHandler } from './attestation-service'
import { handler as blockscoutHandler } from './blockscout'
import { handler as ethstatsHandler } from './ethstats'
import { handler as testnetHandler } from './testnet'

export const command = 'all'

export const describe = 'upgrades a typical deploy'

type TestnetArgv = UpgradeArgv & {
reset: boolean
}

export const builder = (argv: yargs.Argv) => {
return argv.option('reset', {
describe: 'indicates a reset',
default: false,
type: 'boolean',
})
}

export const handler = async (argv: TestnetArgv) => {
console.info('Deploy the testnet')
await testnetHandler(argv)
console.info('Deploy ethstats')
await ethstatsHandler(argv)
console.info('Deploy blockscout')
await blockscoutHandler(argv)

if (argv.reset) {
console.info('Sleeping for 5 minutes to let pods come up')
await sleep(300000)
console.info('Deploy contracts')
await contractsHandler(argv)
}

console.info('Deploy attestation-service')
await attestationServiceHandler(argv)
}
4 changes: 2 additions & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"test": "TZ=UTC jest --runInBand"
},
"dependencies": {
"@celo/contractkit": "0.2.3-dev",
"@celo/contractkit": "0.2.5-dev",
"@celo/utils": "^0.1.0",
"@oclif/command": "^1",
"@oclif/config": "^1",
Expand Down Expand Up @@ -94,7 +94,7 @@
"description": "View and manage locked Celo Gold"
},
"node": {
"description": "Manage your full node"
"description": "Manage your Celo node"
},
"transfer": {
"description": "Transfer Celo Gold and Celo Dollars"
Expand Down
10 changes: 2 additions & 8 deletions packages/cli/src/commands/election/current.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { cli } from 'cli-ux'
import { BaseCommand } from '../../base'
import { validatorTable } from '../validator/list'

export default class ElectionCurrent extends BaseCommand {
static description =
Expand All @@ -20,13 +21,6 @@ export default class ElectionCurrent extends BaseCommand {
signers.map((addr) => validators.getValidatorFromSigner(addr))
)
cli.action.stop()
cli.table(validatorList, {
address: {},
name: {},
affiliation: {},
score: { get: (v) => v.score.toFixed() },
ecdsaPublicKey: {},
blsPublicKey: {},
})
cli.table(validatorList, validatorTable)
}
}
10 changes: 2 additions & 8 deletions packages/cli/src/commands/election/run.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { cli } from 'cli-ux'
import { BaseCommand } from '../../base'
import { validatorTable } from '../validator/list'

export default class ElectionRun extends BaseCommand {
static description =
Expand All @@ -20,13 +21,6 @@ export default class ElectionRun extends BaseCommand {
signers.map((addr) => validators.getValidatorFromSigner(addr))
)
cli.action.stop()
cli.table(validatorList, {
address: {},
name: {},
affiliation: {},
score: {},
ecdsaPublicKey: {},
blsPublicKey: {},
})
cli.table(validatorList, validatorTable)
}
}
2 changes: 1 addition & 1 deletion packages/cli/src/commands/lockedgold/lock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default class Lock extends BaseCommand {
const value = new BigNumber(res.flags.value)

await newCheckBuilder(this)
.addCheck(`Value [${value.toFixed()}] is not > 0`, () => value.gt(0))
.addCheck(`Value [${value.toFixed()}] is > 0`, () => value.gt(0))
.isAccount(address)
.runChecks()

Expand Down
24 changes: 12 additions & 12 deletions packages/cli/src/commands/validator/list.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
import { Validator } from '@celo/contractkit/src/wrappers/Validators'
import { flags } from '@oclif/command'
import { cli } from 'cli-ux'
import { BaseCommand } from '../../base'

export const validatorTable = {
address: {},
name: {},
affiliation: {},
score: { get: (v: Validator) => v.score.toFixed() },
ecdsaPublicKey: {},
blsPublicKey: {},
signer: {},
}

export default class ValidatorList extends BaseCommand {
static description =
'List registered Validators, their name (if provided), affiliation, uptime score, and public keys used for validating.'
Expand All @@ -24,17 +35,6 @@ export default class ValidatorList extends BaseCommand {
const validatorList = await validators.getRegisteredValidators()

cli.action.stop()
cli.table(
validatorList,
{
address: {},
name: {},
affiliation: {},
score: { get: (v) => v.score.toFixed() },
ecdsaPublicKey: {},
blsPublicKey: {},
},
{ 'no-truncate': res.flags['no-truncate'] }
)
cli.table(validatorList, validatorTable, { 'no-truncate': res.flags['no-truncate'] })
}
}
2 changes: 1 addition & 1 deletion packages/cli/src/utils/checks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class CheckBuilder {

isAccount = (address: Address) =>
this.addCheck(
`${address} is Account`,
`${address} is a registered Account`,
this.withAccounts((accs) => accs.isAccount(address)),
`${address} is not registered as an account. Try running account:register`
)
Expand Down
2 changes: 1 addition & 1 deletion packages/contractkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@celo/contractkit",
"version": "0.2.3-dev",
"version": "0.2.5-dev",
"description": "Celo's ContractKit to interact with Celo network",
"main": "./lib/index.js",
"types": "./lib/index.d.ts",
Expand Down
6 changes: 2 additions & 4 deletions packages/contractkit/src/wrappers/Validators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,8 @@ export class ValidatorsWrapper extends BaseWrapper<Validators> {
return {
name,
address,
// @ts-ignore Incorrect type for bytes
ecdsaPublicKey: res.ecdsaPublicKey,
// @ts-ignore Incorrect type for bytes
blsPublicKey: res.blsPublicKey,
ecdsaPublicKey: (res.ecdsaPublicKey as unknown) as string,
blsPublicKey: (res.blsPublicKey as unknown) as string,
affiliation: res.affiliation,
score: fromFixed(new BigNumber(res.score)),
signer: res.signer,
Expand Down
6 changes: 4 additions & 2 deletions packages/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ The [Alfajores Testnet](getting-started/alfajores-testnet.md) is the first of se
The Alfajores Testnet’s tokens hold no real world economic value. The entirety of the testnet’s data will be reset on a regular basis. This will erase your accounts, their balance and your transaction history. Your use of the Alfajores Tesnet is subject to the [Alfajores Testnet Disclaimer](important-information/alfajores-testnet-disclaimer.md).
{% endhint %}

Our work is focused on the path to a production Celo network that holds economic value. This means testing, running security audits, and building community involvement around a longer-term roadmap. We also continue to remain focused on user experience.
The [Baklava Testnet](getting-started/baklava-testnet.md) is the second Celo test network after Alfajores. You can use it to participate in the The Great Celo Stake Off. 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 Stake Off will operate in phases, with each phase focusing on a different part of the protocol or infrastructure to test.

We anticipate working to improve and expand the range of APIs available for developers to use in creating extensions to Celo, whether as smart contracts or applications. We welcome your input in the form of use cases, suggestions, and bug reports.
The Celo community's work is focused on the path to a production Celo network that holds economic value. This means testing, running security audits, and building broader involvement around a longer-term roadmap. The project also continues to remain focused on user experience.

The team working on Celo anticipates working to improve and expand the range of APIs available for developers to use in creating extensions to Celo, whether as smart contracts or applications. Your input is very welcome in the form of use cases, suggestions, and bug reports.

{% hint style="warning" %}
While development proceeds, Celo’s protocol and its APIs will evolve and any smart contracts or applications built to operate on Alfajores or with respect to the current codebase may become incompatible.
Expand Down
27 changes: 16 additions & 11 deletions packages/docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@

## Getting Started

- [Alfajores Testnet](getting-started/alfajores-testnet.md)
- [Using the Mobile Wallet](getting-started/using-the-mobile-wallet.md)
- [Getting an Account and Funds](getting-started/faucet.md)
- [Baklava Testnet](getting-started/baklava-testnet.md)
- [Using the Mobile Wallet](getting-started/using-the-mobile-wallet.md)
- [Getting an Account and Funds](getting-started/faucet.md)
- [Running a Full Node](getting-started/running-a-full-node.md)
- [Running a Validator](getting-started/running-a-validator.md)
- [Running a Full Node](getting-started/running-a-full-node.md)
- [Running a Validator](getting-started/running-a-validator.md)
- [Glossary](getting-started/glossary.md)

## Celo Codebase
Expand All @@ -19,14 +20,16 @@
- [Validator Set Differences](celo-codebase/protocol/consensus/validator-set-differences.md)
- [Locating Validators](celo-codebase/protocol/consensus/locating-validators.md)
- [Ultralight Sync](celo-codebase/protocol/consensus/ultralight-sync.md)
- [Proof-of-Stake](celo-codebase/protocol/proof-of-stake/README.md)
- [Locked Gold](celo-codebase/protocol/proof-of-stake/locked-gold.md)
- [Electing Validators](celo-codebase/protocol/proof-of-stake/electing-validators.md)
- [Becoming a Validator](celo-codebase/protocol/proof-of-stake/becoming-a-validator.md)
- [Creating and Managing Validator Groups](celo-codebase/protocol/proof-of-stake/creating-and-managing-validator-groups.md)
- [Proof of Stake](celo-codebase/protocol/proof-of-stake/README.md)
- [Validator Groups](celo-codebase/protocol/proof-of-stake/validator-groups.md)
- [Locked Gold and Voting](celo-codebase/protocol/proof-of-stake/locked-gold.md)
- [Validator Elections](celo-codebase/protocol/proof-of-stake/validator-elections.md)
- [Epoch Rewards](celo-codebase/protocol/proof-of-stake/epoch-rewards.md)
- [Slashing](celo-codebase/protocol/proof-of-stake/slashing.md)
- [Full Node Incentives](celo-codebase/protocol/proof-of-stake/full-node-incentives.md)
- [Rewards for Validators and Validator Groups](celo-codebase/protocol/proof-of-stake/validator-rewards.md)
- [Rewards for Locked Gold Holders](celo-codebase/protocol/proof-of-stake/locked-gold-rewards.md)
- [Community Fund](celo-codebase/protocol/proof-of-stake/community-fund.md)
- [Carbon Offsetting Fund](celo-codebase/protocol/proof-of-stake/carbon-offsetting-fund.md)
- [Penalties](celo-codebase/protocol/proof-of-stake/penalties.md)
- [Governance](celo-codebase/protocol/governance.md)
- [Transactions](celo-codebase/protocol/transactions/README.md)
- [Native Currency](celo-codebase/protocol/transactions/native-currency.md)
Expand All @@ -36,6 +39,7 @@
- [Encrypted Payment Comments](celo-codebase/protocol/transactions/tx-comment-encyption.md)
- [Full Node Incentives](celo-codebase/protocol/transactions/full-node-incentives.md)
- [Lightweight Identity](celo-codebase/protocol/identity/README.md)
- [Metadata](celo-codebase/protocol/identity/metadata.md)
- [Randomness](celo-codebase/protocol/identity/randomness.md)
- [Stability Mechanism](celo-codebase/protocol/stability/README.md)
- [Stability Algorithm \(CP-DOTO\)](celo-codebase/protocol/stability/doto.md)
Expand Down Expand Up @@ -85,3 +89,4 @@
## Important Information

- [Alfajores Testnet Disclaimer](important-information/alfajores-testnet-disclaimer.md)
- [Baklava Testnet Disclaimer](important-information/baklava-testnet-disclaimer.md)
Loading

0 comments on commit ed0ed8e

Please sign in to comment.