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

Update with new istanbul lookback window size flag #1820

Merged
merged 7 commits into from
Nov 21, 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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ e2e-defaults: &e2e-defaults
docker:
- image: celohq/circleci
environment:
CELO_BLOCKCHAIN_BRANCH_TO_TEST: victor/gateway-fee
CELO_BLOCKCHAIN_BRANCH_TO_TEST: gakonst/uptime

general:
artifacts:
Expand Down
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ NETWORK_ID=1101
CONSENSUS_TYPE="istanbul"
BLOCK_TIME=1
EPOCH=1000
LOOKBACK=12
ISTANBUL_REQUEST_TIMEOUT_MS=3000

# "og" -> our original 4 validators, "${n}" -> for deriving n validators from the MNEMONIC
Expand Down
1 change: 1 addition & 0 deletions packages/celotool/src/cmds/geth/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ export const handler = async (argv: RunArgv) => {
verbosity.toString(),
'--consoleoutput=stdout', // Send all logs to stdout
'--consoleformat=term',
'--istanbul.lookbackwindow=2',
]

if (nodekeyhex !== null && nodekeyhex.length > 0) {
Expand Down
1 change: 1 addition & 0 deletions packages/celotool/src/e2e-tests/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ function writeGenesis(validators: Validator[], path: string, configOverrides: an
validators,
blockTime: 0,
epoch: 10,
lookback: 2,
requestTimeout: 3000,
chainId: NetworkId,
...configOverrides,
Expand Down
1 change: 1 addition & 0 deletions packages/celotool/src/lib/env-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export enum envVar {
CLUSTER_DOMAIN_NAME = 'CLUSTER_DOMAIN_NAME',
ENV_TYPE = 'ENV_TYPE',
EPOCH = 'EPOCH',
LOOKBACK = 'LOOKBACK',
ETHSTATS_DOCKER_IMAGE_REPOSITORY = 'ETHSTATS_DOCKER_IMAGE_REPOSITORY',
ETHSTATS_DOCKER_IMAGE_TAG = 'ETHSTATS_DOCKER_IMAGE_TAG',
ETHSTATS_WEBSOCKETSECRET = 'ETHSTATS_WEBSOCKETSECRET',
Expand Down
6 changes: 6 additions & 0 deletions packages/celotool/src/lib/generate_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,8 @@ export const generateGenesisFromEnv = (enablePetersburg: boolean = true) => {
10
)
const epoch = parseInt(fetchEnvOrFallback(envVar.EPOCH, '30000'), 10)
// allow 12 blocks in prod for the uptime metric
const lookbackwindow = parseInt(fetchEnvOrFallback(envVar.LOOKBACK, '12'), 10)
const chainId = parseInt(fetchEnv(envVar.NETWORK_ID), 10)

// Assing DEFAULT ammount of gold to 2 faucet accounts
Expand All @@ -153,6 +155,7 @@ export const generateGenesisFromEnv = (enablePetersburg: boolean = true) => {
blockTime,
initialAccounts: faucetAddresses.concat(oracleAddress),
epoch,
lookbackwindow,
chainId,
requestTimeout,
enablePetersburg,
Expand Down Expand Up @@ -204,6 +207,7 @@ export const generateGenesis = ({
initialAccounts: otherAccounts = [],
blockTime,
epoch,
lookbackwindow,
chainId,
requestTimeout,
enablePetersburg = true,
Expand All @@ -213,6 +217,7 @@ export const generateGenesis = ({
initialAccounts?: string[]
blockTime: number
epoch: number
lookbackwindow: number
chainId: number
requestTimeout: number
enablePetersburg?: boolean
Expand Down Expand Up @@ -241,6 +246,7 @@ export const generateGenesis = ({
period: blockTime,
requesttimeout: requestTimeout,
epoch,
lookbackwindow,
}
}

Expand Down