diff --git a/arbos/arbosState/arbosstate.go b/arbos/arbosState/arbosstate.go index c6e1973486..3fb43327d0 100644 --- a/arbos/arbosState/arbosstate.go +++ b/arbos/arbosState/arbosstate.go @@ -12,6 +12,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/state" + "github.com/ethereum/go-ethereum/core/tracing" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/triedb" @@ -339,6 +340,9 @@ func (state *ArbosState) UpgradeArbosVersion( // these versions are left to Orbit chains for custom upgrades. case params.ArbosVersion_40: + // EIP-2935: Add support for historical block hashes. + stateDB.SetNonce(params.HistoryStorageAddress, 1, tracing.NonceChangeUnspecified) + stateDB.SetCode(params.HistoryStorageAddress, params.HistoryStorageCodeArbitrum) // The MaxWasmSize was a constant before arbos version 40, and can // be read as a parameter after arbos version 40. params, err := state.Programs().Params() diff --git a/go-ethereum b/go-ethereum index 1b11b946c8..2a0b8b6f14 160000 --- a/go-ethereum +++ b/go-ethereum @@ -1 +1 @@ -Subproject commit 1b11b946c87a5538f81aef89c0ed0b2a648a67a3 +Subproject commit 2a0b8b6f146f62e609fc240b99a9f65df8f2eace diff --git a/system_tests/block_validator_test.go b/system_tests/block_validator_test.go index 52f733b4a7..d697e6fee2 100644 --- a/system_tests/block_validator_test.go +++ b/system_tests/block_validator_test.go @@ -312,6 +312,9 @@ func TestBlockValidatorSimpleOnchain(t *testing.T) { } func TestBlockValidatorSimpleJITOnchainWithPublishedMachine(t *testing.T) { + t.Skip("Fails cause EIP-2935 (part of arbOs 40) is not implemented in the latest published machine i.e Consensus V32") + // TODO: Remove this skip when consensus V40 is published + // TODO: Make this more robust in the future, so that it can handle if the latest consensus release is behind the arbOS version we want to test. cr, err := github.LatestConsensusRelease(context.Background()) Require(t, err) machPath := populateMachineDir(t, cr) @@ -326,6 +329,9 @@ func TestBlockValidatorSimpleJITOnchainWithPublishedMachine(t *testing.T) { } func TestBlockValidatorSimpleOnchainWithPublishedMachine(t *testing.T) { + t.Skip("Fails cause EIP-2935 (part of arbOs 40) is not implemented in the latest published machine i.e Consensus V32") + // TODO: Remove this skip when consensus V40 is published + // TODO: Make this more robust in the future, so that it can handle if the latest consensus release is behind the arbOS version we want to test. cr, err := github.LatestConsensusRelease(context.Background()) Require(t, err) machPath := populateMachineDir(t, cr) diff --git a/system_tests/historical_block_hash_test.go b/system_tests/historical_block_hash_test.go index 0c3ccbddca..77fd5a8cd2 100644 --- a/system_tests/historical_block_hash_test.go +++ b/system_tests/historical_block_hash_test.go @@ -9,8 +9,6 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/params" - - "github.com/offchainlabs/nitro/statetransfer" ) func TestHistoricalBlockHash(t *testing.T) { @@ -19,17 +17,6 @@ func TestHistoricalBlockHash(t *testing.T) { defer cancel() builder := NewNodeBuilder(ctx).DefaultConfig(t, true) - contractInfo := &statetransfer.AccountInitContractInfo{ - Code: params.HistoryStorageCodeArbitrum, - ContractStorage: make(map[common.Hash]common.Hash), - } - accountInfo := statetransfer.AccountInitializationInfo{ - Addr: params.HistoryStorageAddress, - EthBalance: big.NewInt(0), - Nonce: 1, - ContractInfo: contractInfo, - } - builder.L2Info.ArbInitData.Accounts = append(builder.L2Info.ArbInitData.Accounts, accountInfo) cleanup := builder.Build(t) defer cleanup()