From 0eea86add99934fb4b8a0dbc2202d2ade5e66612 Mon Sep 17 00:00:00 2001 From: Aman Sanghi Date: Mon, 5 Aug 2024 08:24:10 +0530 Subject: [PATCH 1/3] Update geth and fix build --- arbos/arbosState/initialize.go | 2 +- arbos/block_processor.go | 4 ++-- arbos/engine.go | 2 +- go-ethereum | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/arbos/arbosState/initialize.go b/arbos/arbosState/initialize.go index f9f31ed5bd..f8f5623abd 100644 --- a/arbos/arbosState/initialize.go +++ b/arbos/arbosState/initialize.go @@ -50,7 +50,7 @@ func MakeGenesisBlock(parentHash common.Hash, blockNumber uint64, timestamp uint } genesisHeaderInfo.UpdateHeaderWithInfo(head) - return types.NewBlock(head, nil, nil, nil, trie.NewStackTrie(nil)) + return types.NewBlock(head, nil, nil, trie.NewStackTrie(nil)) } func InitializeArbosInDatabase(db ethdb.Database, cacheConfig *core.CacheConfig, initData statetransfer.InitDataReader, chainConfig *params.ChainConfig, initMessage *arbostypes.ParsedInitMessage, timestamp uint64, accountsPerSync uint) (root common.Hash, err error) { diff --git a/arbos/block_processor.go b/arbos/block_processor.go index b180405c43..184d87d248 100644 --- a/arbos/block_processor.go +++ b/arbos/block_processor.go @@ -457,7 +457,7 @@ func ProduceBlockAdvanced( FinalizeBlock(header, complete, statedb, chainConfig) // Touch up the block hashes in receipts - tmpBlock := types.NewBlock(header, complete, nil, receipts, trie.NewStackTrie(nil)) + tmpBlock := types.NewBlock(header, &types.Body{Transactions: complete}, receipts, trie.NewStackTrie(nil)) blockHash := tmpBlock.Hash() for _, receipt := range receipts { @@ -467,7 +467,7 @@ func ProduceBlockAdvanced( } } - block := types.NewBlock(header, complete, nil, receipts, trie.NewStackTrie(nil)) + block := types.NewBlock(header, &types.Body{Transactions: complete}, receipts, trie.NewStackTrie(nil)) if len(block.Transactions()) != len(receipts) { return nil, nil, fmt.Errorf("block has %d txes but %d receipts", len(block.Transactions()), len(receipts)) diff --git a/arbos/engine.go b/arbos/engine.go index a4aa9c46a9..a812e5486b 100644 --- a/arbos/engine.go +++ b/arbos/engine.go @@ -56,7 +56,7 @@ func (e Engine) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *t e.Finalize(chain, header, state, body) - block := types.NewBlock(header, body.Transactions, nil, receipts, trie.NewStackTrie(nil)) + block := types.NewBlock(header, &types.Body{Transactions: body.Transactions}, receipts, trie.NewStackTrie(nil)) return block, nil } diff --git a/go-ethereum b/go-ethereum index 4b4742a134..25b12e8998 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 4b4742a13481b7e22c86b1258115d565e5d237ca +Subproject commit 25b12e89986ee91c7a49cf3afb414b0e8b3b0653 From a5ed6d0d1d9d52268f89dd4bc616eef8675a9d06 Mon Sep 17 00:00:00 2001 From: Lee Bousfield Date: Wed, 9 Oct 2024 22:42:55 -0500 Subject: [PATCH 2/3] Explicitly create zombies for geth v1.14.2 --- arbos/util/transfer.go | 10 +++++----- go-ethereum | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arbos/util/transfer.go b/arbos/util/transfer.go index 1240928eb6..d7951383e0 100644 --- a/arbos/util/transfer.go +++ b/arbos/util/transfer.go @@ -7,9 +7,10 @@ package util import ( "errors" "fmt" - "github.com/ethereum/go-ethereum/core/tracing" "math/big" + "github.com/ethereum/go-ethereum/core/tracing" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/log" @@ -34,11 +35,10 @@ func TransferBalance( if arbmath.BigLessThan(balance.ToBig(), amount) { return fmt.Errorf("%w: addr %v have %v want %v", vm.ErrInsufficientBalance, *from, balance, amount) } - evm.StateDB.SubBalance(*from, uint256.MustFromBig(amount), tracing.BalanceChangeTransfer) - if evm.Context.ArbOSVersion >= 30 { - // ensure the from account is "touched" for EIP-161 - evm.StateDB.AddBalance(*from, &uint256.Int{}, tracing.BalanceChangeTransfer) + if evm.Context.ArbOSVersion < 30 && amount.Sign() == 0 { + evm.StateDB.CreateZombieIfDeleted(*from) } + evm.StateDB.SubBalance(*from, uint256.MustFromBig(amount), tracing.BalanceChangeTransfer) } if to != nil { evm.StateDB.AddBalance(*to, uint256.MustFromBig(amount), tracing.BalanceChangeTransfer) diff --git a/go-ethereum b/go-ethereum index 25b12e8998..0adf3d1a79 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 25b12e89986ee91c7a49cf3afb414b0e8b3b0653 +Subproject commit 0adf3d1a797e12f43b6d257827bd75a9d08e4ac5 From 1ef4e05d9ef7d8a625a0524e0f5d40c6ccdcf340 Mon Sep 17 00:00:00 2001 From: Aman Sanghi Date: Tue, 19 Nov 2024 15:26:02 +0530 Subject: [PATCH 3/3] update geth submodule --- go-ethereum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go-ethereum b/go-ethereum index 9cf4acc45a..2c34a6d386 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 9cf4acc45a2b0cea723e8323d2b811e358b04ca0 +Subproject commit 2c34a6d3869bd72f74cd46263434f438de321f7c