From 23fc61420c904ae9d7b8e5978b39bedd469cd283 Mon Sep 17 00:00:00 2001 From: Denis Pingin <2085934+denis-pingin@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:30:24 +0100 Subject: [PATCH 1/4] miner: fix config unmarshalling (#433) --- miner/miner.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miner/miner.go b/miner/miner.go index 7cbfebf564..447cf4ccbd 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -64,8 +64,8 @@ type Config struct { RollupTransactionConditionalRateLimit int // Total number of conditional cost units allowed in a second EffectiveGasCeil uint64 // if non-zero, a gas ceiling to apply independent of the header's gaslimit value - MaxDATxSize *big.Int // if non-nil, don't include any txs with data availability size larger than this in any built block - MaxDABlockSize *big.Int // if non-nil, then don't build a block requiring more than this amount of total data availability + MaxDATxSize *big.Int `toml:",omitempty"` // if non-nil, don't include any txs with data availability size larger than this in any built block + MaxDABlockSize *big.Int `toml:",omitempty"` // if non-nil, then don't build a block requiring more than this amount of total data availability } // DefaultConfig contains default settings for miner. From 717daa16e204bf9c7e50994284c1d09970d8ee73 Mon Sep 17 00:00:00 2001 From: George Knee Date: Tue, 26 Nov 2024 11:24:33 +0000 Subject: [PATCH 2/4] update superchain-registry dependency (#436) brings in the unichain sepolia holocene_time --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 3c152bd5bd..f9aa6cba52 100644 --- a/go.mod +++ b/go.mod @@ -23,7 +23,7 @@ require ( github.com/deckarep/golang-set/v2 v2.6.0 github.com/donovanhide/eventsource v0.0.0-20210830082556-c59027999da0 github.com/dop251/goja v0.0.0-20230806174421-c933cf95e127 - github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20241119111730-bee358f6d6e6 + github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20241126105717-d31591e83048 github.com/ethereum/c-kzg-4844 v1.0.0 github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 github.com/fatih/color v1.16.0 diff --git a/go.sum b/go.sum index a63fc834cd..b45225e86f 100644 --- a/go.sum +++ b/go.sum @@ -171,8 +171,8 @@ 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.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20241119111730-bee358f6d6e6 h1:+AIYWDX7FeWRLnBVqPiwireTacLLGGww1slGyv+YN0o= -github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20241119111730-bee358f6d6e6/go.mod h1:9feO8jcL5OZ1tvRjEfNAHz4Aggvd6373l+ZxmZZAyZs= +github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20241126105717-d31591e83048 h1:kb220NeqVRRt/XP5JHt3i4zpLsYNCdWMM/0tDnOFk3o= +github.com/ethereum-optimism/superchain-registry/superchain v0.0.0-20241126105717-d31591e83048/go.mod h1:9feO8jcL5OZ1tvRjEfNAHz4Aggvd6373l+ZxmZZAyZs= github.com/ethereum/c-kzg-4844 v1.0.0 h1:0X1LBXxaEtYD9xsyj9B9ctQEZIpnvVDeoBx8aHEwTNA= github.com/ethereum/c-kzg-4844 v1.0.0/go.mod h1:VewdlzQmpT5QSrVhbBuGoCdFJkpaJlO1aQputP83wc0= github.com/ethereum/go-verkle v0.1.1-0.20240829091221-dffa7562dbe9 h1:8NfxH2iXvJ60YRB8ChToFTUzl8awsc3cJ8CbLjGIl/A= From 550ddf9f132687e8efe773aaa70fe1aa714a3845 Mon Sep 17 00:00:00 2001 From: protolambda Date: Tue, 26 Nov 2024 16:23:16 +0100 Subject: [PATCH 3/4] core: fix call to post-validation evm message hook --- core/state_transition.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/state_transition.go b/core/state_transition.go index 2de1cad762..a3b05705c9 100644 --- a/core/state_transition.go +++ b/core/state_transition.go @@ -155,6 +155,8 @@ type Message struct { Mint *big.Int // Mint is the amount to mint before EVM processing, or nil if there is no minting. RollupCostData types.RollupCostData // RollupCostData caches data to compute the fee we charge for data availability + // PostValidation is an optional check of the resulting post-state, if and when the message is + // applied fully to the EVM. This function may return an error to deny inclusion of the message. PostValidation func(evm *vm.EVM, result *ExecutionResult) error } @@ -450,7 +452,7 @@ func (st *StateTransition) TransitionDb() (*ExecutionResult, error) { err = nil } - if st.msg.PostValidation != nil { + if err == nil && st.msg.PostValidation != nil { if err := st.msg.PostValidation(st.evm, result); err != nil { return nil, err } From da595e374515e4b93430e0c5fd8d1616aa1ab229 Mon Sep 17 00:00:00 2001 From: protolambda Date: Tue, 26 Nov 2024 16:46:29 +0100 Subject: [PATCH 4/4] miner: fix TestRejectedConditionalTx flake --- miner/miner_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miner/miner_test.go b/miner/miner_test.go index d365ee18ac..e038b02f61 100644 --- a/miner/miner_test.go +++ b/miner/miner_test.go @@ -188,8 +188,8 @@ func TestRejectedConditionalTx(t *testing.T) { }) tx.SetConditional(&types.TransactionConditional{TimestampMax: uint64Ptr(timestamp - 1)}) - // 1 pending tx - miner.txpool.Add(types.Transactions{tx}, true, false) + // 1 pending tx (synchronously, it has to be there before it can be rejected) + miner.txpool.Add(types.Transactions{tx}, true, true) if !miner.txpool.Has(tx.Hash()) { t.Fatalf("conditional tx is not in the mempool") }