From d040fa52fe3064b5053ee5db35e46e99095cb303 Mon Sep 17 00:00:00 2001 From: Mark Tyneway Date: Wed, 30 Mar 2022 15:13:13 -0700 Subject: [PATCH] ops: fix chainid to work with ethers ledger Previously the chainid was too large for the ledger package to work. This is due to ethers using an old version of the ledger package. There is an unresolved open issue here: https://github.com/ethers-io/ethers.js/issues/1365 This updates the chainid to 17 to get around this issue. This chain id is used by ThaiChain 2.0 ThaiFi which has very little activity. https://exp.thaifi.com/ It also lints the docker compose file to use `'` consistently --- .changeset/moody-drinks-lie.md | 5 +++++ integration-tests/test/shared/utils.ts | 2 +- ops/docker-compose.yml | 15 +++++++-------- ops/envs/geth.env | 4 ++-- packages/contracts/deploy-config/local.ts | 2 +- 5 files changed, 16 insertions(+), 12 deletions(-) create mode 100644 .changeset/moody-drinks-lie.md diff --git a/.changeset/moody-drinks-lie.md b/.changeset/moody-drinks-lie.md new file mode 100644 index 0000000000000..715b37d2a804c --- /dev/null +++ b/.changeset/moody-drinks-lie.md @@ -0,0 +1,5 @@ +--- +'@eth-optimism/integration-tests': patch +--- + +Update chainid diff --git a/integration-tests/test/shared/utils.ts b/integration-tests/test/shared/utils.ts index c7fe77acf7fda..771be3b83f7fb 100644 --- a/integration-tests/test/shared/utils.ts +++ b/integration-tests/test/shared/utils.ts @@ -38,7 +38,7 @@ const procEnv = cleanEnv(process.env, { L1_URL: str({ default: 'http://localhost:9545' }), L1_POLLING_INTERVAL: num({ default: 10 }), - L2_CHAINID: num({ default: 987 }), + L2_CHAINID: num({ default: 17 }), L2_GAS_PRICE: gasPriceValidator({ default: 'onchain', }), diff --git a/ops/docker-compose.yml b/ops/docker-compose.yml index 060a16920c7a0..d4ce98d1c189d 100644 --- a/ops/docker-compose.yml +++ b/ops/docker-compose.yml @@ -3,12 +3,11 @@ version: '3.4' x-system-addr-env: &system-addr-env # private key: a6aecc98b63bafb0de3b29ae9964b14acb4086057808be29f90150214ebd4a0f # OK to publish this since it will only ever be used in itests - SYSTEM_ADDRESS_0_DEPLOYER: "0xa961b0d6dce82db098cf70a42a14add3ee3db2d5" + SYSTEM_ADDRESS_0_DEPLOYER: '0xa961b0d6dce82db098cf70a42a14add3ee3db2d5' # private key: 3b8d2345102cce2443acb240db6e87c8edd4bb3f821b17fab8ea2c9da08ea132 # OK to publish this since it will only ever be used in itests - SYSTEM_ADDRESS_1_DEPLOYER: "0xdfc82d475833a50de90c642770f34a9db7deb725" - + SYSTEM_ADDRESS_1_DEPLOYER: '0xdfc82d475833a50de90c642770f34a9db7deb725' services: # this is a helper service used because there's no official hardhat image @@ -64,7 +63,7 @@ services: DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT: http://l1_chain:8545 DATA_TRANSPORT_LAYER__L2_RPC_ENDPOINT: http://l2geth:8545 DATA_TRANSPORT_LAYER__SYNC_FROM_L2: 'true' - DATA_TRANSPORT_LAYER__L2_CHAIN_ID: 987 + DATA_TRANSPORT_LAYER__L2_CHAIN_ID: 17 ports: - ${DTL_PORT:-7878}:7878 @@ -211,11 +210,11 @@ services: NO_NETWORK: 1 BATCH_SUBMITTER_SEQUENCER_BATCH_TYPE: ${BATCH_SUBMITTER_SEQUENCER_BATCH_TYPE:-zlib} - RUN_SYSTEM_ADDRESS_TESTS: "true" + RUN_SYSTEM_ADDRESS_TESTS: 'true' # must match l2geth environment, see above for why it's safe to publish these - SYSTEM_ADDRESS_0_DEPLOYER_KEY: "a6aecc98b63bafb0de3b29ae9964b14acb4086057808be29f90150214ebd4a0f" - SYSTEM_ADDRESS_1_DEPLOYER_KEY: "3b8d2345102cce2443acb240db6e87c8edd4bb3f821b17fab8ea2c9da08ea132" + SYSTEM_ADDRESS_0_DEPLOYER_KEY: 'a6aecc98b63bafb0de3b29ae9964b14acb4086057808be29f90150214ebd4a0f' + SYSTEM_ADDRESS_1_DEPLOYER_KEY: '3b8d2345102cce2443acb240db6e87c8edd4bb3f821b17fab8ea2c9da08ea132' gas_oracle: deploy: @@ -228,7 +227,7 @@ services: GAS_PRICE_ORACLE_ETHEREUM_HTTP_URL: http://l1_chain:8545 GAS_PRICE_ORACLE_LAYER_TWO_HTTP_URL: http://l2geth:8545 # Default hardhat account 5 - GAS_PRICE_ORACLE_PRIVATE_KEY: "0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba" + GAS_PRICE_ORACLE_PRIVATE_KEY: '0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba' batch_submitter: depends_on: diff --git a/ops/envs/geth.env b/ops/envs/geth.env index 75d32152cf3ad..35708fcebda6f 100644 --- a/ops/envs/geth.env +++ b/ops/envs/geth.env @@ -20,12 +20,12 @@ WS_PORT=8546 WS_API=eth,net,rollup,web3 WS_ORIGINS=* -CHAIN_ID=987 +CHAIN_ID=17 DATADIR=/root/.ethereum GASPRICE=0 GCMODE=archive IPC_DISABLE=true -NETWORK_ID=987 +NETWORK_ID=17 NO_USB=true NO_DISCOVER=true TARGET_GAS_LIMIT=15000000 diff --git a/packages/contracts/deploy-config/local.ts b/packages/contracts/deploy-config/local.ts index 0e8207d4981ec..6c1527921b153 100644 --- a/packages/contracts/deploy-config/local.ts +++ b/packages/contracts/deploy-config/local.ts @@ -4,7 +4,7 @@ const config: DeployConfig = { network: 'local', l1BlockTimeSeconds: 15, l2BlockGasLimit: 15_000_000, - l2ChainId: 987, + l2ChainId: 17, ctcL2GasDiscountDivisor: 32, ctcEnqueueGasCost: 60_000, sccFaultProofWindowSeconds: 0,