Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull in geth changes for state recreation #2005

Merged
merged 49 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
8eebd46
update geth and adjust tests
magicxyyz Dec 7, 2023
6fb2ba5
update geth
magicxyyz Dec 7, 2023
f865d1e
Merge branch 'master' into state-release
magicxyyz Dec 7, 2023
a40f8f1
Merge branch 'master' into state-release
magicxyyz Dec 8, 2023
d21fdd8
update geth
magicxyyz Dec 11, 2023
a1ac5d0
Merge branch 'master' into state-release
magicxyyz Dec 11, 2023
4ff776d
Revert "update geth and adjust tests"
magicxyyz Dec 18, 2023
32df394
update expected error in TestRecreateStateForRPCBlockNotFoundWhileRec…
magicxyyz Dec 18, 2023
a9a0772
update geth
magicxyyz Dec 18, 2023
1234559
Merge branch 'master' into state-release
amsanghi Dec 19, 2023
ea05f0a
add test for getting state for rpc
magicxyyz Dec 19, 2023
dc936ea
Merge branch 'state-release-test' into state-release
magicxyyz Dec 19, 2023
7659d68
add missing error check in recreate state test
magicxyyz Dec 19, 2023
c1bdefd
update geth
magicxyyz Dec 19, 2023
923bc4c
add test for getting state for rpc on hybrid archive node
magicxyyz Dec 19, 2023
ac9d63b
add missing error check in recreate state test
magicxyyz Dec 19, 2023
42b6c83
add missing error check
magicxyyz Dec 19, 2023
bb5c908
Merge branch 'state-release-test' into state-release
magicxyyz Dec 19, 2023
b776a68
Merge branch 'master' into state-release
amsanghi Dec 20, 2023
8e2ede8
update geth
magicxyyz Jan 12, 2024
d1f244f
update geth
magicxyyz Jan 26, 2024
25bd9eb
Merge branch 'master' into state-release
magicxyyz Jan 26, 2024
f69b53e
update go.mod
magicxyyz Jan 26, 2024
fdc42ba
update recreate state tests to account for states saved on shutdown
magicxyyz Feb 5, 2024
e12dd8a
update geth
magicxyyz Feb 5, 2024
811d4fa
Merge branch 'master' into state-release
magicxyyz Feb 5, 2024
2e3d313
update geth
magicxyyz Feb 6, 2024
e415501
Merge branch 'master' into state-release
magicxyyz Feb 6, 2024
a781faf
fix recreation after restart test
magicxyyz Feb 6, 2024
72d678d
update geth
magicxyyz Feb 6, 2024
9bff2b2
remove commited by mistake files
magicxyyz Feb 8, 2024
60e4ff4
update geth
magicxyyz Feb 9, 2024
c341182
system_tests: fix initialization of default value of MaxRecreateState…
magicxyyz Feb 16, 2024
5559118
update geth
magicxyyz Feb 22, 2024
ab310ac
Merge branch 'master' into state-release
magicxyyz Feb 22, 2024
251abe0
update blocks reexecutor
magicxyyz Feb 23, 2024
41ebf43
update geth
magicxyyz Feb 23, 2024
22fa881
uncomment testing defaults in recreate state tests
magicxyyz Feb 23, 2024
49ec18c
Merge branch 'master' into state-release
magicxyyz Feb 27, 2024
6890439
update geth
magicxyyz Mar 6, 2024
48d0b9d
update geth
magicxyyz Mar 6, 2024
7296df7
Merge branch 'master' into state-release
magicxyyz Mar 6, 2024
2a53d99
Merge branch 'master' into state-release
magicxyyz Mar 7, 2024
2d449ae
add StateAndHeader test
magicxyyz Mar 12, 2024
8f4bf75
Merge branch 'master' into state-release
magicxyyz Mar 12, 2024
8c24484
update StateAndHeader test
magicxyyz Mar 12, 2024
b64198a
update error check in StateAndHeader test
magicxyyz Mar 12, 2024
7718918
update geth
magicxyyz Mar 12, 2024
25624db
update geth
magicxyyz Mar 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion system_tests/recreatestate_rpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package arbtest
import (
"context"
"errors"
"fmt"
"math/big"
"strings"
"testing"
Expand Down Expand Up @@ -306,7 +307,7 @@ func TestRecreateStateForRPCBlockNotFoundWhileRecreating(t *testing.T) {
hash := rawdb.ReadCanonicalHash(db, lastBlock)
Fatal(t, "Didn't fail to get balance at block:", lastBlock, " with hash:", hash, ", lastBlock:", lastBlock)
}
if !strings.Contains(err.Error(), "block not found while recreating") {
if !strings.Contains(err.Error(), fmt.Sprintf("block #%d not found", blockBodyToRemove)) {
Fatal(t, "Failed with unexpected error: \"", err, "\", at block:", lastBlock, "lastBlock:", lastBlock)
}
}
Expand Down
6 changes: 4 additions & 2 deletions system_tests/seqinbox_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ func testSequencerInboxReaderImpl(t *testing.T, validator bool) {
ownerAddress := builder.L2Info.GetAddress("Owner")
var startL2BlockNumber uint64 = 0

startState, _, err := l2Backend.APIBackend().StateAndHeaderByNumber(ctx, rpc.LatestBlockNumber)
startState, _, release, err := l2Backend.APIBackend().StateAndHeaderByNumber(ctx, rpc.LatestBlockNumber)
Require(t, err)
defer release()
startOwnerBalance := startState.GetBalance(ownerAddress)
startOwnerNonce := startState.GetNonce(ownerAddress)

Expand Down Expand Up @@ -429,8 +430,9 @@ func testSequencerInboxReaderImpl(t *testing.T, validator bool) {
if block == nil {
Fatal(t, "missing state block", state.l2BlockNumber)
}
stateDb, _, err := l2Backend.APIBackend().StateAndHeaderByNumber(ctx, rpc.BlockNumber(state.l2BlockNumber))
stateDb, _, release, err := l2Backend.APIBackend().StateAndHeaderByNumber(ctx, rpc.BlockNumber(state.l2BlockNumber))
Require(t, err)
defer release()
for acct, expectedBalance := range state.balances {
haveBalance := stateDb.GetBalance(acct)
if expectedBalance.Cmp(haveBalance) < 0 {
Expand Down
Loading