Commit d335e423 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub

Merge branch 'develop' into rollup-client-move

parents 067b3275 14f6888b
---
'@eth-optimism/ci-builder': patch
'@eth-optimism/foundry': patch
---
Update foundry to fix a bug in coverage generation
---
'@eth-optimism/l2geth': patch
---
Add the gas estimation block tag to `eth_estimateGas` to be RPC compliant
---
'@eth-optimism/contracts-bedrock': minor
---
Removes initializer from StandardBridge in favor of immutables
---
'@eth-optimism/contracts-periphery': patch
---
Fixes import paths in the contracts-periphery package
---
'@eth-optimism/contracts-bedrock': minor
---
Updates the storage layout for the CrossDomainMessenger base contract to reduce diff with the existing system.
---
'@eth-optimism/core-utils': minor
---
Removes ethers as a dependency in favor of individual ethers sub-packages
---
'@eth-optimism/hardhat-node': patch
---
Fixes CI to properly release the hardhat-node
...@@ -410,7 +410,7 @@ jobs: ...@@ -410,7 +410,7 @@ jobs:
fi fi
- run: - run:
name: Lint name: Lint
command: golangci-lint run -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell ./... command: golangci-lint run -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint -e "errors.As" -e "errors.Is" ./...
working_directory: <<parameters.working_directory>> working_directory: <<parameters.working_directory>>
- store_test_results: - store_test_results:
path: /test-results path: /test-results
......
...@@ -134,7 +134,7 @@ jobs: ...@@ -134,7 +134,7 @@ jobs:
hardhat-node: hardhat-node:
name: Publish Hardhat Node ${{ needs.release.outputs.hardhat-node }} name: Publish Hardhat Node ${{ needs.release.outputs.hardhat-node }}
needs: release needs: release
if: needs.release.hardhat-node != '' if: needs.release.outputs.hardhat-node != ''
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
......
...@@ -61,7 +61,7 @@ jobs: ...@@ -61,7 +61,7 @@ jobs:
if: failure() if: failure()
uses: jwalton/gh-docker-logs@v1 uses: jwalton/gh-docker-logs@v1
with: with:
images: 'ethereumoptimism/hardhat,ethereumoptimism/deployer,ethereumoptimism/data-transport-layer,ethereumoptimism/l2geth,ethereumoptimism/message-relayer,ethereumoptimism/batch-submitter,ethereumoptimism/l2geth' images: 'ethereumoptimism/hardhat-node,ethereumoptimism/deployer,ethereumoptimism/data-transport-layer,ethereumoptimism/l2geth,ethereumoptimism/message-relayer,ethereumoptimism/batch-submitter,ethereumoptimism/l2geth'
dest: './logs' dest: './logs'
- name: Tar logs - name: Tar logs
......
...@@ -7,7 +7,7 @@ There are plenty of ways to contribute, in particular we appreciate support in t ...@@ -7,7 +7,7 @@ There are plenty of ways to contribute, in particular we appreciate support in t
- Reporting issues. For security issues see [Security policy](https://github.com/ethereum-optimism/.github/blob/master/SECURITY.md). - Reporting issues. For security issues see [Security policy](https://github.com/ethereum-optimism/.github/blob/master/SECURITY.md).
- Fixing and responding to existing issues. You can start off with those tagged ["good first issue"](https://github.com/ethereum-optimism/optimism/contribute) which are meant as introductory issues for external contributors. - Fixing and responding to existing issues. You can start off with those tagged ["good first issue"](https://github.com/ethereum-optimism/optimism/contribute) which are meant as introductory issues for external contributors.
- Improving the [community site](https://community.optimism.io/)[documentation](https://github.com/ethereum-optimism/community-hub) and [tutorials](https://github.com/ethereum-optimism/optimism-tutorial). - Improving the [community site](https://community.optimism.io/)[documentation](https://github.com/ethereum-optimism/community-hub) and [tutorials](https://github.com/ethereum-optimism/optimism-tutorial).
- Become an "Optimizer" and answer questions in the [Optimism Discord](https://discord.com/invite/jrnFEvq). - Become an "Optimizer" and answer questions in the [Optimism Discord](https://discord.optimism.io).
- Get involved in the protocol design process by proposing changes or new features or write parts of the spec yourself in the [optimistic-specs repo](https://github.com/ethereum-optimism/optimistic-specs). - Get involved in the protocol design process by proposing changes or new features or write parts of the spec yourself in the [optimistic-specs repo](https://github.com/ethereum-optimism/optimistic-specs).
Note that we have a [Code of Conduct](https://github.com/ethereum-optimism/.github/blob/master/CODE_OF_CONDUCT.md), please follow it in all your interactions with the project. Note that we have a [Code of Conduct](https://github.com/ethereum-optimism/.github/blob/master/CODE_OF_CONDUCT.md), please follow it in all your interactions with the project.
......
...@@ -19,7 +19,7 @@ use ( ...@@ -19,7 +19,7 @@ use (
./teleportr ./teleportr
) )
replace github.com/ethereum/go-ethereum v1.10.23 => github.com/ethereum-optimism/op-geth v0.0.0-20220907143004-2aacc679d638 replace github.com/ethereum/go-ethereum v1.10.23 => github.com/ethereum-optimism/op-geth v0.0.0-20220909213840-e6575c0168f1
// For local debugging: // For local debugging:
//replace github.com/ethereum/go-ethereum v1.10.23 => ../go-ethereum //replace github.com/ethereum/go-ethereum v1.10.23 => ../go-ethereum
...@@ -658,7 +658,7 @@ WHERE address = $1 ...@@ -658,7 +658,7 @@ WHERE address = $1
func (d *Database) GetAirdrop(address common.Address) (*Airdrop, error) { func (d *Database) GetAirdrop(address common.Address) (*Airdrop, error) {
row := d.db.QueryRow(getAirdropQuery, strings.ToLower(address.String())) row := d.db.QueryRow(getAirdropQuery, strings.ToLower(address.String()))
if row.Err() != nil { if row.Err() != nil {
return nil, fmt.Errorf("error getting airdrop: %v", row.Err()) return nil, fmt.Errorf("error getting airdrop: %w", row.Err())
} }
airdrop := new(Airdrop) airdrop := new(Airdrop)
...@@ -677,7 +677,7 @@ func (d *Database) GetAirdrop(address common.Address) (*Airdrop, error) { ...@@ -677,7 +677,7 @@ func (d *Database) GetAirdrop(address common.Address) (*Airdrop, error) {
return nil, nil return nil, nil
} }
if err != nil { if err != nil {
return nil, fmt.Errorf("error scanning airdrop: %v", err) return nil, fmt.Errorf("error scanning airdrop: %w", err)
} }
return airdrop, nil return airdrop, nil
} }
...@@ -1062,9 +1062,12 @@ func DoEstimateGas(ctx context.Context, b Backend, args CallArgs, blockNrOrHash ...@@ -1062,9 +1062,12 @@ func DoEstimateGas(ctx context.Context, b Backend, args CallArgs, blockNrOrHash
// EstimateGas returns an estimate of the amount of gas needed to execute the // EstimateGas returns an estimate of the amount of gas needed to execute the
// given transaction against the current pending block. This is modified to // given transaction against the current pending block. This is modified to
// encode the fee in wei as gas price is always 1 // encode the fee in wei as gas price is always 1
func (s *PublicBlockChainAPI) EstimateGas(ctx context.Context, args CallArgs) (hexutil.Uint64, error) { func (s *PublicBlockChainAPI) EstimateGas(ctx context.Context, args CallArgs, blockNrOrHash *rpc.BlockNumberOrHash) (hexutil.Uint64, error) {
blockNrOrHash := rpc.BlockNumberOrHashWithNumber(rpc.PendingBlockNumber) bNrOrHash := rpc.BlockNumberOrHashWithNumber(rpc.PendingBlockNumber)
return DoEstimateGas(ctx, s.b, args, blockNrOrHash, s.b.RPCGasCap()) if blockNrOrHash != nil {
bNrOrHash = *blockNrOrHash
}
return DoEstimateGas(ctx, s.b, args, bNrOrHash, s.b.RPCGasCap())
} }
// ExecutionResult groups all structured logs emitted by the EVM // ExecutionResult groups all structured logs emitted by the EVM
......
...@@ -17,7 +17,7 @@ test: ...@@ -17,7 +17,7 @@ test:
go test -v ./... go test -v ./...
lint: lint:
golangci-lint run -E asciicheck,goimports,misspell ./... golangci-lint run -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint -e "errors.As" -e "errors.Is"
.PHONY: \ .PHONY: \
op-batcher \ op-batcher \
......
...@@ -303,7 +303,7 @@ mainLoop: ...@@ -303,7 +303,7 @@ mainLoop:
l.log.Warn("last submitted block lagged behind L2 safe head: batch submission will continue from the safe head now", "last", l.lastSubmittedBlock, "safe", syncStatus.SafeL2) l.log.Warn("last submitted block lagged behind L2 safe head: batch submission will continue from the safe head now", "last", l.lastSubmittedBlock, "safe", syncStatus.SafeL2)
l.lastSubmittedBlock = syncStatus.SafeL2.ID() l.lastSubmittedBlock = syncStatus.SafeL2.ID()
} }
if ch, err := derive.NewChannelOut(syncStatus.HeadL1.Time); err != nil { if ch, err := derive.NewChannelOut(); err != nil {
l.log.Error("Error creating channel", "err", err) l.log.Error("Error creating channel", "err", err)
continue continue
} else { } else {
......
...@@ -3,9 +3,9 @@ module github.com/ethereum-optimism/optimism/op-batcher ...@@ -3,9 +3,9 @@ module github.com/ethereum-optimism/optimism/op-batcher
go 1.18 go 1.18
require ( require (
github.com/ethereum-optimism/optimism/op-node v0.8.3 github.com/ethereum-optimism/optimism/op-node v0.8.6
github.com/ethereum-optimism/optimism/op-proposer v0.8.3 github.com/ethereum-optimism/optimism/op-proposer v0.8.6
github.com/ethereum-optimism/optimism/op-service v0.8.3 github.com/ethereum-optimism/optimism/op-service v0.8.6
github.com/ethereum/go-ethereum v1.10.23 github.com/ethereum/go-ethereum v1.10.23
github.com/miguelmota/go-ethereum-hdwallet v0.1.1 github.com/miguelmota/go-ethereum-hdwallet v0.1.1
github.com/urfave/cli v1.22.9 github.com/urfave/cli v1.22.9
...@@ -22,7 +22,7 @@ require ( ...@@ -22,7 +22,7 @@ require (
github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/deckarep/golang-set v1.8.0 // indirect github.com/deckarep/golang-set v1.8.0 // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect
github.com/ethereum-optimism/optimism/op-bindings v0.8.3 // indirect github.com/ethereum-optimism/optimism/op-bindings v0.8.6 // indirect
github.com/fjl/memsize v0.0.1 // indirect github.com/fjl/memsize v0.0.1 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-stack/stack v1.8.1 // indirect github.com/go-stack/stack v1.8.1 // indirect
...@@ -70,4 +70,4 @@ require ( ...@@ -70,4 +70,4 @@ require (
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
) )
replace github.com/ethereum/go-ethereum v1.10.23 => github.com/ethereum-optimism/op-geth v0.0.0-20220907143004-2aacc679d638 replace github.com/ethereum/go-ethereum v1.10.23 => github.com/ethereum-optimism/op-geth v0.0.0-20220909213840-e6575c0168f1
...@@ -147,16 +147,16 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF ...@@ -147,16 +147,16 @@ github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymF
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/ethereum-optimism/op-geth v0.0.0-20220907143004-2aacc679d638 h1:LcvgHjeooGBobfEIEYikMzx1MoIAjRqa/ZDdkrhV3Hw= github.com/ethereum-optimism/op-geth v0.0.0-20220909213840-e6575c0168f1 h1:W/ZU6BZH7ilTrpdoJOF9N4OReqXbpeRtUB6klIpEdMA=
github.com/ethereum-optimism/op-geth v0.0.0-20220907143004-2aacc679d638/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo= github.com/ethereum-optimism/op-geth v0.0.0-20220909213840-e6575c0168f1/go.mod h1:/6CsT5Ceen2WPLI/oCA3xMcZ5sWMF/D46SjM/ayY0Oo=
github.com/ethereum-optimism/optimism/op-bindings v0.8.3 h1:6v3n0fZhxcqVF9mu8l2Axqi4/XcMqpthtl3mEkqhi04= github.com/ethereum-optimism/optimism/op-bindings v0.8.6 h1:jJYhmygt7hqGzYa+8sme9SdnKt1c3Y6EbWgIrRONoxw=
github.com/ethereum-optimism/optimism/op-bindings v0.8.3/go.mod h1:XZRKu/LTd03m50duwMFEqCWe6qkjgLBZUoZG3CR2Kg0= github.com/ethereum-optimism/optimism/op-bindings v0.8.6/go.mod h1:gUX5317IAvRMjB4GftayM87JVln3DTqukfirwJpEWnE=
github.com/ethereum-optimism/optimism/op-node v0.8.3 h1:Snuick9EtalM6Cbs8rVUcoCDPFpu6Xxr7kre+RbLbY0= github.com/ethereum-optimism/optimism/op-node v0.8.6 h1:xNwN+Q/Rt17vSKawhBeG9qTcqcyh8JU8PGjK1iuGkF4=
github.com/ethereum-optimism/optimism/op-node v0.8.3/go.mod h1:CPa18cq3E41eqwpsohX/QkupY11D3CYsNqbKZD6H860= github.com/ethereum-optimism/optimism/op-node v0.8.6/go.mod h1:gkyzgVHV3+tIhLZ8GhT+bL9GrrmouQCW4mKYukS0SHg=
github.com/ethereum-optimism/optimism/op-proposer v0.8.3 h1:e0Dv4/lGXWW2hMLYmL7nQNIv7Um0SlnMicz5VAJwMKc= github.com/ethereum-optimism/optimism/op-proposer v0.8.6 h1:iy8XAtkvrURBy3TT2Lf540cbWztxit7K4+BghZ4IsMI=
github.com/ethereum-optimism/optimism/op-proposer v0.8.3/go.mod h1:JIC833mF7Fl8pNe5yNbbPsUKx6o3793OC7dxWhY6Mbs= github.com/ethereum-optimism/optimism/op-proposer v0.8.6/go.mod h1:tuCLnXcO4MrtVyis1Yfo7wtL8EQta1u6zFdzHHj+RAc=
github.com/ethereum-optimism/optimism/op-service v0.8.3 h1:eNiNir1/a5nVzs08tuq6+A3d0doB15qPO17YozKZhzQ= github.com/ethereum-optimism/optimism/op-service v0.8.6 h1:ruZp/BxL8TGn1y9EJmygypPTeVAFlAA0A/h8LsCoV+M=
github.com/ethereum-optimism/optimism/op-service v0.8.3/go.mod h1:TGUsHYIx5jwCZgvj1taNtTEhJsJNIwRvZ0noDXTdb4c= github.com/ethereum-optimism/optimism/op-service v0.8.6/go.mod h1:gm8YNzERrL/CHBPWx3+01mR/NOVpLLw4GEUSnnTdyFU=
github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg= github.com/ethereum/go-ethereum v1.10.4/go.mod h1:nEE0TP5MtxGzOMd7egIrbPJMQBnhVU3ELNxhBglIzhg=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0=
......
...@@ -20,11 +20,12 @@ bindings: l1block-bindings \ ...@@ -20,11 +20,12 @@ bindings: l1block-bindings \
proxy-bindings \ proxy-bindings \
proxy-admin-bindings \ proxy-admin-bindings \
erc20-bindings \ erc20-bindings \
weth9-bindings weth9-bindings \
deployer-whitelist-bindings
compile: compile:
cd ../packages/contracts-bedrock/ && \ cd ../packages/contracts-bedrock/ && \
forge build -o ./tmp-artifacts npx hardhat compile
l1-cross-domain-messenger-bindings: compile l1-cross-domain-messenger-bindings: compile
./gen_bindings.sh contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger $(pkg) ./gen_bindings.sh contracts/L1/L1CrossDomainMessenger.sol:L1CrossDomainMessenger $(pkg)
...@@ -77,9 +78,15 @@ erc20-bindings: compile ...@@ -77,9 +78,15 @@ erc20-bindings: compile
weth9-bindings: compile weth9-bindings: compile
./gen_bindings.sh contracts/vendor/WETH9.sol:WETH9 $(pkg) ./gen_bindings.sh contracts/vendor/WETH9.sol:WETH9 $(pkg)
deployer-whitelist-bindings: compile
./gen_bindings.sh contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist $(pkg)
l1-blocknumber-bindings: compile
./gen_bindings.sh contracts/legacy/L1BlockNumber.sol:L1BlockNumber $(pkg)
more: more:
go run ./gen/main.go \ go run ./gen/main.go \
-artifacts ../packages/contracts-bedrock/artifacts,../packages/contracts-governance/artifacts \ -artifacts ../packages/contracts-bedrock/artifacts \
-out ./bindings \ -out ./bindings \
-contracts OptimismMintableERC20Factory,L2StandardBridge,L1BlockNumber,DeployerWhitelist,Proxy,OptimismPortal,L2ToL1MessagePasser,L2CrossDomainMessenger,GasPriceOracle,SequencerFeeVault,L1Block,LegacyERC20ETH,WETH9,GovernanceToken \ -contracts OptimismMintableERC20Factory,L2StandardBridge,L1BlockNumber,DeployerWhitelist,Proxy,OptimismPortal,L2ToL1MessagePasser,L2CrossDomainMessenger,GasPriceOracle,SequencerFeeVault,L1Block,LegacyERC20ETH,WETH9,GovernanceToken \
-package bindings -package bindings
......
This diff is collapsed.
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const DeployerWhitelistStorageLayoutJSON = "{\"storage\":[{\"astId\":2700,\"contract\":\"contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist\",\"label\":\"owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":2705,\"contract\":\"contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist\",\"label\":\"whitelist\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_bool)\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_mapping(t_address,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_bool\"}}}" const DeployerWhitelistStorageLayoutJSON = "{\"storage\":[{\"astId\":2672,\"contract\":\"contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist\",\"label\":\"owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":2677,\"contract\":\"contracts/legacy/DeployerWhitelist.sol:DeployerWhitelist\",\"label\":\"whitelist\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_mapping(t_address,t_bool)\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_bool\":{\"encoding\":\"inplace\",\"label\":\"bool\",\"numberOfBytes\":\"1\"},\"t_mapping(t_address,t_bool)\":{\"encoding\":\"mapping\",\"label\":\"mapping(address =\u003e bool)\",\"numberOfBytes\":\"32\",\"key\":\"t_address\",\"value\":\"t_bool\"}}}"
var DeployerWhitelistStorageLayout = new(solc.StorageLayout) var DeployerWhitelistStorageLayout = new(solc.StorageLayout)
......
This diff is collapsed.
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const GasPriceOracleStorageLayoutJSON = "{\"storage\":[{\"astId\":26690,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1663,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer0\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1666,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer1\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1669,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint256\"},{\"astId\":1672,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_uint256\"},{\"astId\":1675,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"decimals\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_uint256\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}" const GasPriceOracleStorageLayoutJSON = "{\"storage\":[{\"astId\":26650,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"_owner\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"},{\"astId\":1649,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer0\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1652,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"spacer1\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_uint256\"},{\"astId\":1655,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"overhead\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint256\"},{\"astId\":1658,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"scalar\",\"offset\":0,\"slot\":\"4\",\"type\":\"t_uint256\"},{\"astId\":1661,\"contract\":\"contracts/L2/GasPriceOracle.sol:GasPriceOracle\",\"label\":\"decimals\",\"offset\":0,\"slot\":\"5\",\"type\":\"t_uint256\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"}}}"
var GasPriceOracleStorageLayout = new(solc.StorageLayout) var GasPriceOracleStorageLayout = new(solc.StorageLayout)
......
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const L1BlockStorageLayoutJSON = "{\"storage\":[{\"astId\":1909,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"number\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint64\"},{\"astId\":1912,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"timestamp\",\"offset\":8,\"slot\":\"0\",\"type\":\"t_uint64\"},{\"astId\":1915,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"basefee\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1918,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"hash\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_bytes32\"},{\"astId\":1921,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"sequenceNumber\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint64\"}],\"types\":{\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"}}}" const L1BlockStorageLayoutJSON = "{\"storage\":[{\"astId\":1895,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"number\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_uint64\"},{\"astId\":1898,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"timestamp\",\"offset\":8,\"slot\":\"0\",\"type\":\"t_uint64\"},{\"astId\":1901,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"basefee\",\"offset\":0,\"slot\":\"1\",\"type\":\"t_uint256\"},{\"astId\":1904,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"hash\",\"offset\":0,\"slot\":\"2\",\"type\":\"t_bytes32\"},{\"astId\":1907,\"contract\":\"contracts/L2/L1Block.sol:L1Block\",\"label\":\"sequenceNumber\",\"offset\":0,\"slot\":\"3\",\"type\":\"t_uint64\"}],\"types\":{\"t_bytes32\":{\"encoding\":\"inplace\",\"label\":\"bytes32\",\"numberOfBytes\":\"32\"},\"t_uint256\":{\"encoding\":\"inplace\",\"label\":\"uint256\",\"numberOfBytes\":\"32\"},\"t_uint64\":{\"encoding\":\"inplace\",\"label\":\"uint64\",\"numberOfBytes\":\"8\"}}}"
var L1BlockStorageLayout = new(solc.StorageLayout) var L1BlockStorageLayout = new(solc.StorageLayout)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -9,7 +9,7 @@ import ( ...@@ -9,7 +9,7 @@ import (
"github.com/ethereum-optimism/optimism/op-bindings/solc" "github.com/ethereum-optimism/optimism/op-bindings/solc"
) )
const SequencerFeeVaultStorageLayoutJSON = "{\"storage\":[{\"astId\":2541,\"contract\":\"contracts/L2/SequencerFeeVault.sol:SequencerFeeVault\",\"label\":\"l1FeeWallet\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"}}}" const SequencerFeeVaultStorageLayoutJSON = "{\"storage\":[{\"astId\":2513,\"contract\":\"contracts/L2/SequencerFeeVault.sol:SequencerFeeVault\",\"label\":\"l1FeeWallet\",\"offset\":0,\"slot\":\"0\",\"type\":\"t_address\"}],\"types\":{\"t_address\":{\"encoding\":\"inplace\",\"label\":\"address\",\"numberOfBytes\":\"20\"}}}"
var SequencerFeeVaultStorageLayout = new(solc.StorageLayout) var SequencerFeeVaultStorageLayout = new(solc.StorageLayout)
......
...@@ -37,9 +37,9 @@ TEMP=$(mktemp -d) ...@@ -37,9 +37,9 @@ TEMP=$(mktemp -d)
CWD=$(pwd) CWD=$(pwd)
# Build contracts # Build contracts
cd ${CONTRACTS_PATH} cd ${CONTRACTS_PATH}
forge inspect -o ./tmp-artifacts ${NAME} abi > ${TEMP}/${TYPE}.abi forge inspect ${NAME} abi > ${TEMP}/${TYPE}.abi
forge inspect -o ./tmp-artifacts ${NAME} bytecode > ${TEMP}/${TYPE}.bin forge inspect ${NAME} bytecode > ${TEMP}/${TYPE}.bin
forge inspect -o ./tmp-artifacts ${NAME} deployedBytecode > ${CWD}/bin/${TYPE_LOWER}_deployed.hex forge inspect ${NAME} deployedBytecode > ${CWD}/bin/${TYPE_LOWER}_deployed.hex
# Run ABIGEN # Run ABIGEN
cd ${CWD} cd ${CWD}
......
...@@ -40,6 +40,6 @@ require ( ...@@ -40,6 +40,6 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
) )
replace github.com/ethereum/go-ethereum v1.10.23 => github.com/ethereum-optimism/op-geth v0.0.0-20220907143004-2aacc679d638 replace github.com/ethereum/go-ethereum v1.10.23 => github.com/ethereum-optimism/op-geth v0.0.0-20220909213840-e6575c0168f1
// github.com/ethereum-optimism/op-geth v0.0.0-20220907143004-2aacc679d638 // github.com/ethereum-optimism/op-geth v0.0.0-20220909213840-e6575c0168f1
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -123,20 +123,12 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) { ...@@ -123,20 +123,12 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) {
return nil, err return nil, err
} }
l1SBrABI, err := bindings.L1StandardBridgeMetaData.GetAbi()
if err != nil {
return nil, err
}
data, err = l1SBrABI.Pack("initialize", predeploys.DevL1CrossDomainMessengerAddr)
if err != nil {
return nil, err
}
if err := upgradeProxy( if err := upgradeProxy(
backend, backend,
opts, opts,
depsByName["L1StandardBridgeProxy"].Address, depsByName["L1StandardBridgeProxy"].Address,
depsByName["L1StandardBridge"].Address, depsByName["L1StandardBridge"].Address,
data, nil,
); err != nil { ); err != nil {
return nil, err return nil, err
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -23,5 +23,6 @@ ...@@ -23,5 +23,6 @@
"optimismBaseFeeRecipient": "0xBcd4042DE499D14e55001CcbB24a551F3b954096", "optimismBaseFeeRecipient": "0xBcd4042DE499D14e55001CcbB24a551F3b954096",
"optimismL1FeeRecipient": "0x71bE63f3384f5fb98995898A86B02Fb2426c5788", "optimismL1FeeRecipient": "0x71bE63f3384f5fb98995898A86B02Fb2426c5788",
"deploymentWaitConfirmations": 1 "deploymentWaitConfirmations": 1,
"fundDevAccounts": true
} }
...@@ -45,5 +45,8 @@ ...@@ -45,5 +45,8 @@
"gasPriceOracleOverhead": 2100, "gasPriceOracleOverhead": 2100,
"gasPriceOracleScalar": 1000000, "gasPriceOracleScalar": 1000000,
"gasPriceOracleDecimals": 6, "gasPriceOracleDecimals": 6,
"deploymentWaitConfirmations": 1 "deploymentWaitConfirmations": 1,
"eip1559Denominator": 8,
"eip1559Elasticity": 2,
"fundDevAccounts": true
} }
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -2,7 +2,7 @@ test: ...@@ -2,7 +2,7 @@ test:
go test -v ./... go test -v ./...
lint: lint:
golangci-lint run -E asciicheck,goimports,misspell ./... golangci-lint run -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint -e "errors.As" -e "errors.Is"
.PHONY: \ .PHONY: \
test \ test \
......
This diff is collapsed.
This diff is collapsed.
...@@ -281,8 +281,10 @@ func (cfg SystemConfig) start() (*System, error) { ...@@ -281,8 +281,10 @@ func (cfg SystemConfig) start() (*System, error) {
MergeNetsplitBlock: common.Big0, MergeNetsplitBlock: common.Big0,
TerminalTotalDifficulty: common.Big0, TerminalTotalDifficulty: common.Big0,
Optimism: &params.OptimismConfig{ Optimism: &params.OptimismConfig{
BaseFeeRecipient: cfg.BaseFeeRecipient, BaseFeeRecipient: cfg.BaseFeeRecipient,
L1FeeRecipient: cfg.L1FeeRecipient, L1FeeRecipient: cfg.L1FeeRecipient,
EIP1559Elasticity: 2,
EIP1559Denominator: 8,
}, },
}, },
Alloc: l2Alloc, Alloc: l2Alloc,
......
...@@ -137,7 +137,7 @@ func defaultSystemConfig(t *testing.T) SystemConfig { ...@@ -137,7 +137,7 @@ func defaultSystemConfig(t *testing.T) SystemConfig {
BlockTime: 1, BlockTime: 1,
MaxSequencerDrift: 10, MaxSequencerDrift: 10,
SeqWindowSize: 30, SeqWindowSize: 30,
ChannelTimeout: 20, ChannelTimeout: 10,
L1ChainID: big.NewInt(900), L1ChainID: big.NewInt(900),
L2ChainID: big.NewInt(901), L2ChainID: big.NewInt(901),
// TODO pick defaults // TODO pick defaults
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -32,4 +32,8 @@ func TestPrivPub2PeerID(t *testing.T) { ...@@ -32,4 +32,8 @@ func TestPrivPub2PeerID(t *testing.T) {
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, pubPidLib.String(), pubPidImpl) require.Equal(t, pubPidLib.String(), pubPidImpl)
}) })
t.Run("with bad hex", func(t *testing.T) {
_, err := Priv2PeerID(bytes.NewReader([]byte("I am not hex.")))
require.Error(t, err)
})
} }
This diff is collapsed.
...@@ -184,7 +184,7 @@ func (payload *ExecutionPayload) UnmarshalSSZ(scope uint32, r io.Reader) error { ...@@ -184,7 +184,7 @@ func (payload *ExecutionPayload) UnmarshalSSZ(scope uint32, r io.Reader) error {
copy(payload.ExtraData, buf[extraDataOffset:transactionsOffset]) copy(payload.ExtraData, buf[extraDataOffset:transactionsOffset])
txs, err := unmarshalTransactions(buf[transactionsOffset:]) txs, err := unmarshalTransactions(buf[transactionsOffset:])
if err != nil { if err != nil {
return fmt.Errorf("failed to unmarshal transactions list: %v", err) return fmt.Errorf("failed to unmarshal transactions list: %w", err)
} }
payload.Transactions = txs payload.Transactions = txs
return nil return nil
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -35,7 +35,8 @@ type Config struct { ...@@ -35,7 +35,8 @@ type Config struct {
L1EpochPollInterval time.Duration L1EpochPollInterval time.Duration
// Optional // Optional
Tracer Tracer Tracer Tracer
Heartbeat HeartbeatConfig
} }
type RPCConfig struct { type RPCConfig struct {
...@@ -76,6 +77,12 @@ func (p PprofConfig) Check() error { ...@@ -76,6 +77,12 @@ func (p PprofConfig) Check() error {
return nil return nil
} }
type HeartbeatConfig struct {
Enabled bool
Moniker string
URL string
}
// Check verifies that the given configuration makes sense // Check verifies that the given configuration makes sense
func (cfg *Config) Check() error { func (cfg *Config) Check() error {
if err := cfg.L2.Check(); err != nil { if err := cfg.L2.Check(); err != nil {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -56,7 +56,7 @@ func (n *NodeP2P) init(resourcesCtx context.Context, rollupCfg *rollup.Config, l ...@@ -56,7 +56,7 @@ func (n *NodeP2P) init(resourcesCtx context.Context, rollupCfg *rollup.Config, l
if n.dv5Udp != nil { if n.dv5Udp != nil {
n.dv5Udp.Close() n.dv5Udp.Close()
} }
return fmt.Errorf("failed to start p2p host: %v", err) return fmt.Errorf("failed to start p2p host: %w", err)
} }
if n.host != nil { if n.host != nil {
...@@ -71,12 +71,12 @@ func (n *NodeP2P) init(resourcesCtx context.Context, rollupCfg *rollup.Config, l ...@@ -71,12 +71,12 @@ func (n *NodeP2P) init(resourcesCtx context.Context, rollupCfg *rollup.Config, l
n.host.RemoveStreamHandler(identify.IDDelta) n.host.RemoveStreamHandler(identify.IDDelta)
n.gs, err = NewGossipSub(resourcesCtx, n.host, rollupCfg) n.gs, err = NewGossipSub(resourcesCtx, n.host, rollupCfg)
if err != nil { if err != nil {
return fmt.Errorf("failed to start gossipsub router: %v", err) return fmt.Errorf("failed to start gossipsub router: %w", err)
} }
n.gsOut, err = JoinGossip(resourcesCtx, n.host.ID(), n.gs, log, rollupCfg, gossipIn) n.gsOut, err = JoinGossip(resourcesCtx, n.host.ID(), n.gs, log, rollupCfg, gossipIn)
if err != nil { if err != nil {
return fmt.Errorf("failed to join blocks gossip topic: %v", err) return fmt.Errorf("failed to join blocks gossip topic: %w", err)
} }
log.Info("started p2p host", "addrs", n.host.Addrs(), "peerID", n.host.ID().Pretty()) log.Info("started p2p host", "addrs", n.host.Addrs(), "peerID", n.host.ID().Pretty())
...@@ -88,7 +88,7 @@ func (n *NodeP2P) init(resourcesCtx context.Context, rollupCfg *rollup.Config, l ...@@ -88,7 +88,7 @@ func (n *NodeP2P) init(resourcesCtx context.Context, rollupCfg *rollup.Config, l
// All nil if disabled. // All nil if disabled.
n.dv5Local, n.dv5Udp, err = setup.Discovery(log.New("p2p", "discv5"), rollupCfg, tcpPort) n.dv5Local, n.dv5Udp, err = setup.Discovery(log.New("p2p", "discv5"), rollupCfg, tcpPort)
if err != nil { if err != nil {
return fmt.Errorf("failed to start discv5: %v", err) return fmt.Errorf("failed to start discv5: %w", err)
} }
} }
return nil return nil
...@@ -129,12 +129,12 @@ func (n *NodeP2P) Close() error { ...@@ -129,12 +129,12 @@ func (n *NodeP2P) Close() error {
} }
if n.gsOut != nil { if n.gsOut != nil {
if err := n.gsOut.Close(); err != nil { if err := n.gsOut.Close(); err != nil {
result = multierror.Append(result, fmt.Errorf("failed to close gossip cleanly: %v", err)) result = multierror.Append(result, fmt.Errorf("failed to close gossip cleanly: %w", err))
} }
} }
if n.host != nil { if n.host != nil {
if err := n.host.Close(); err != nil { if err := n.host.Close(); err != nil {
result = multierror.Append(result, fmt.Errorf("failed to close p2p host cleanly: %v", err)) result = multierror.Append(result, fmt.Errorf("failed to close p2p host cleanly: %w", err))
} }
} }
return result.ErrorOrNil() return result.ErrorOrNil()
......
...@@ -356,7 +356,7 @@ func (s *APIBackend) ConnectPeer(ctx context.Context, addr string) error { ...@@ -356,7 +356,7 @@ func (s *APIBackend) ConnectPeer(ctx context.Context, addr string) error {
h := s.node.Host() h := s.node.Host()
addrInfo, err := peer.AddrInfoFromString(addr) addrInfo, err := peer.AddrInfoFromString(addr)
if err != nil { if err != nil {
return fmt.Errorf("bad peer address: %v", err) return fmt.Errorf("bad peer address: %w", err)
} }
// Put a sanity limit on the connection time // Put a sanity limit on the connection time
ctx, cancel := context.WithTimeout(ctx, time.Second*30) ctx, cancel := context.WithTimeout(ctx, time.Second*30)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -34,15 +34,13 @@ func (co *ChannelOut) ID() ChannelID { ...@@ -34,15 +34,13 @@ func (co *ChannelOut) ID() ChannelID {
return co.id return co.id
} }
func NewChannelOut(channelTime uint64) (*ChannelOut, error) { func NewChannelOut() (*ChannelOut, error) {
c := &ChannelOut{ c := &ChannelOut{
id: ChannelID{ id: ChannelID{}, // TODO: use GUID here instead of fully random data
Time: channelTime,
},
frame: 0, frame: 0,
offset: 0, offset: 0,
} }
_, err := rand.Read(c.id.Data[:]) _, err := rand.Read(c.id[:])
if err != nil { if err != nil {
return nil, err return nil, err
} }
...@@ -57,15 +55,14 @@ func NewChannelOut(channelTime uint64) (*ChannelOut, error) { ...@@ -57,15 +55,14 @@ func NewChannelOut(channelTime uint64) (*ChannelOut, error) {
} }
// TODO: reuse ChannelOut for performance // TODO: reuse ChannelOut for performance
func (co *ChannelOut) Reset(channelTime uint64) error { func (co *ChannelOut) Reset() error {
co.frame = 0 co.frame = 0
co.offset = 0 co.offset = 0
co.buf.Reset() co.buf.Reset()
co.scratch.Reset() co.scratch.Reset()
co.compress.Reset(&co.buf) co.compress.Reset(&co.buf)
co.closed = false co.closed = false
co.id.Time = channelTime _, err := rand.Read(co.id[:])
_, err := rand.Read(co.id.Data[:])
if err != nil { if err != nil {
return err return err
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -120,12 +120,12 @@ func L1InfoDeposit(seqNumber uint64, block eth.BlockInfo) (*types.DepositTx, err ...@@ -120,12 +120,12 @@ func L1InfoDeposit(seqNumber uint64, block eth.BlockInfo) (*types.DepositTx, err
func L1InfoDepositBytes(seqNumber uint64, l1Info eth.BlockInfo) ([]byte, error) { func L1InfoDepositBytes(seqNumber uint64, l1Info eth.BlockInfo) ([]byte, error) {
dep, err := L1InfoDeposit(seqNumber, l1Info) dep, err := L1InfoDeposit(seqNumber, l1Info)
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to create L1 info tx: %v", err) return nil, fmt.Errorf("failed to create L1 info tx: %w", err)
} }
l1Tx := types.NewTx(dep) l1Tx := types.NewTx(dep)
opaqueL1Tx, err := l1Tx.MarshalBinary() opaqueL1Tx, err := l1Tx.MarshalBinary()
if err != nil { if err != nil {
return nil, fmt.Errorf("failed to encode L1 info tx: %v", err) return nil, fmt.Errorf("failed to encode L1 info tx: %w", err)
} }
return opaqueL1Tx, nil return opaqueL1Tx, nil
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -32,7 +32,7 @@ type Config struct { ...@@ -32,7 +32,7 @@ type Config struct {
MaxSequencerDrift uint64 `json:"max_sequencer_drift"` MaxSequencerDrift uint64 `json:"max_sequencer_drift"`
// Number of epochs (L1 blocks) per sequencing window, including the epoch L1 origin block itself // Number of epochs (L1 blocks) per sequencing window, including the epoch L1 origin block itself
SeqWindowSize uint64 `json:"seq_window_size"` SeqWindowSize uint64 `json:"seq_window_size"`
// Number of seconds (w.r.t. L1 time) that a frame can be valid when included in L1 // Number of L1 blocks between when a channel can be opened and when it must be closed by.
ChannelTimeout uint64 `json:"channel_timeout"` ChannelTimeout uint64 `json:"channel_timeout"`
// Required to verify L1 signatures // Required to verify L1 signatures
L1ChainID *big.Int `json:"l1_chain_id"` L1ChainID *big.Int `json:"l1_chain_id"`
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -17,7 +17,7 @@ test: ...@@ -17,7 +17,7 @@ test:
go test -v ./... go test -v ./...
lint: lint:
golangci-lint run -E asciicheck,goimports,misspell ./... golangci-lint run -E goimports,sqlclosecheck,bodyclose,asciicheck,misspell,errorlint -e "errors.As" -e "errors.Is"
.PHONY: \ .PHONY: \
clean \ clean \
......
...@@ -169,12 +169,12 @@ func (d *Driver) CraftTx( ...@@ -169,12 +169,12 @@ func (d *Driver) CraftTx(
l1Header, err := d.cfg.L1Client.HeaderByNumber(ctx, nil) l1Header, err := d.cfg.L1Client.HeaderByNumber(ctx, nil)
if err != nil { if err != nil {
return nil, fmt.Errorf("error resolving checkpoint block: %v", err) return nil, fmt.Errorf("error resolving checkpoint block: %w", err)
} }
l2Header, err := d.cfg.L2Client.HeaderByNumber(ctx, nextCheckpointBlock) l2Header, err := d.cfg.L2Client.HeaderByNumber(ctx, nextCheckpointBlock)
if err != nil { if err != nil {
return nil, fmt.Errorf("error resolving checkpoint block: %v", err) return nil, fmt.Errorf("error resolving checkpoint block: %w", err)
} }
if l2Header.Number.Cmp(nextCheckpointBlock) != 0 { if l2Header.Number.Cmp(nextCheckpointBlock) != 0 {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment