diff --git a/.changeset/chilled-books-grab.md b/.changeset/chilled-books-grab.md new file mode 100644 index 000000000000..10efc8f70022 --- /dev/null +++ b/.changeset/chilled-books-grab.md @@ -0,0 +1,5 @@ +--- +'@eth-optimism/l2geth': patch +--- + +Fixes incorrect type parsing in the RollupClient. The gasLimit became greater than the largest safe JS number so it needs to be represented as a string diff --git a/.changeset/cold-cows-cross.md b/.changeset/cold-cows-cross.md new file mode 100644 index 000000000000..cc67cf4d950d --- /dev/null +++ b/.changeset/cold-cows-cross.md @@ -0,0 +1,5 @@ +--- +'@eth-optimism/integration-tests': patch +--- + +Reduce test timeout from 100 to 20 seconds diff --git a/.changeset/dull-fishes-type.md b/.changeset/dull-fishes-type.md new file mode 100644 index 000000000000..3a2e75a32a95 --- /dev/null +++ b/.changeset/dull-fishes-type.md @@ -0,0 +1,5 @@ +--- +'@eth-optimism/data-transport-layer': patch +--- + +Represent gaslimit as a string to avoid an overflow diff --git a/.changeset/thin-waves-bathe.md b/.changeset/thin-waves-bathe.md new file mode 100644 index 000000000000..605e410ac5df --- /dev/null +++ b/.changeset/thin-waves-bathe.md @@ -0,0 +1,5 @@ +--- +'@eth-optimism/contracts': patch +--- + +Minor change to how deploy.ts is invoked diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000000..dfdb8b771ce0 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.sh text eol=lf diff --git a/integration-tests/hardhat.config.ts b/integration-tests/hardhat.config.ts index b68e8646ba7b..0fcc9b23325f 100644 --- a/integration-tests/hardhat.config.ts +++ b/integration-tests/hardhat.config.ts @@ -10,7 +10,7 @@ const enableGasReport = !!process.env.ENABLE_GAS_REPORT const config: HardhatUserConfig = { mocha: { - timeout: 100000, + timeout: 20000, }, networks: { optimism: { diff --git a/l2geth/rollup/client.go b/l2geth/rollup/client.go index 46c2b752e752..b8b08222c73b 100644 --- a/l2geth/rollup/client.go +++ b/l2geth/rollup/client.go @@ -104,7 +104,7 @@ type signature struct { type decoded struct { Signature signature `json:"sig"` Value hexutil.Uint64 `json:"value"` - GasLimit uint64 `json:"gasLimit"` + GasLimit uint64 `json:"gasLimit,string"` GasPrice uint64 `json:"gasPrice"` Nonce uint64 `json:"nonce"` Target *common.Address `json:"target"` diff --git a/packages/contracts/bin/deploy.ts b/packages/contracts/bin/deploy.ts index 719ac691c4fa..7ac14d6615e1 100755 --- a/packages/contracts/bin/deploy.ts +++ b/packages/contracts/bin/deploy.ts @@ -1,5 +1,3 @@ -#!/usr/bin/env ts-node-script - import { Wallet } from 'ethers' import path from 'path' import dirtree from 'directory-tree' diff --git a/packages/contracts/package.json b/packages/contracts/package.json index 0dd1f1c288c4..e8f750f6d7a3 100644 --- a/packages/contracts/package.json +++ b/packages/contracts/package.json @@ -38,13 +38,13 @@ "lint:check": "yarn run lint:typescript", "lint:typescript": "tslint --format stylish --project .", "clean": "rm -rf ./dist ./artifacts ./artifacts-ovm ./cache ./cache-ovm ./tsconfig.build.tsbuildinfo", - "deploy": "./bin/deploy.ts && yarn generate-markdown", + "deploy": "ts-node \"./bin/deploy.ts\" && yarn generate-markdown", "serve": "./bin/serve_dump.sh", "prepublishOnly": "yarn copyfiles -u 2 \"contracts/optimistic-ethereum/**/*\" ./", "postpublish": "rimraf OVM iOVM libraries mockOVM", "prepack": "yarn prepublishOnly", "postpack": "yarn postpublish", - "generate-markdown": "node scripts/generate-markdown.js" + "generate-markdown": "node \"./scripts/generate-markdown.js\"" }, "dependencies": { "@eth-optimism/core-utils": "^0.4.4", diff --git a/packages/data-transport-layer/src/services/l1-ingestion/handlers/sequencer-batch-appended.ts b/packages/data-transport-layer/src/services/l1-ingestion/handlers/sequencer-batch-appended.ts index df3b9e567f7f..71b483f4dcde 100644 --- a/packages/data-transport-layer/src/services/l1-ingestion/handlers/sequencer-batch-appended.ts +++ b/packages/data-transport-layer/src/services/l1-ingestion/handlers/sequencer-batch-appended.ts @@ -244,7 +244,7 @@ const maybeDecodeSequencerBatchTransaction = ( return { nonce: BigNumber.from(decodedTx.nonce).toNumber(), gasPrice: BigNumber.from(decodedTx.gasPrice).toNumber(), - gasLimit: BigNumber.from(decodedTx.gasLimit).toNumber(), + gasLimit: BigNumber.from(decodedTx.gasLimit).toString(), value: toRpcHexString(decodedTx.value), target: toHexString(decodedTx.to), // Maybe null this out for creations? data: toHexString(decodedTx.data), diff --git a/packages/data-transport-layer/src/services/l2-ingestion/handlers/transaction.ts b/packages/data-transport-layer/src/services/l2-ingestion/handlers/transaction.ts index 70c51bd59d29..0022afc285d7 100644 --- a/packages/data-transport-layer/src/services/l2-ingestion/handlers/transaction.ts +++ b/packages/data-transport-layer/src/services/l2-ingestion/handlers/transaction.ts @@ -48,7 +48,7 @@ export const handleSequencerBlock = { s: padHexString(transaction.s, 32), }, value: transaction.value, - gasLimit: BigNumber.from(transaction.gas).toNumber(), + gasLimit: BigNumber.from(transaction.gas).toString(), gasPrice: BigNumber.from(transaction.gasPrice).toNumber(), // ? nonce: BigNumber.from(transaction.nonce).toNumber(), target: transaction.to, diff --git a/packages/data-transport-layer/src/types/database-types.ts b/packages/data-transport-layer/src/types/database-types.ts index 39f1df71fa93..32e52288ee4f 100644 --- a/packages/data-transport-layer/src/types/database-types.ts +++ b/packages/data-transport-layer/src/types/database-types.ts @@ -5,7 +5,7 @@ export interface DecodedSequencerBatchTransaction { v: number } value: string - gasLimit: number + gasLimit: string gasPrice: number nonce: number target: string