From 461afdf66558edb2342b0d2048c1136dcaf348cd Mon Sep 17 00:00:00 2001 From: Sina M <1591639+s1na@users.noreply.github.com> Date: Thu, 24 Oct 2024 09:11:47 +0200 Subject: [PATCH 1/3] core: fix tracing of system calls (#30666) This change makes it so that the wrapped statedb with tracing-hooks is passed to the system call processing Fixes #30658 --- core/state_processor.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/state_processor.go b/core/state_processor.go index ec499f8928..c04049e986 100644 --- a/core/state_processor.go +++ b/core/state_processor.go @@ -77,11 +77,15 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg context = NewEVMBlockContext(header, p.chain, nil) vmenv := vm.NewEVM(context, vm.TxContext{}, statedb, p.config, cfg) + var tracingStateDB = vm.StateDB(statedb) + if hooks := cfg.Tracer; hooks != nil { + tracingStateDB = state.NewHookedState(statedb, hooks) + } if beaconRoot := block.BeaconRoot(); beaconRoot != nil { - ProcessBeaconBlockRoot(*beaconRoot, vmenv, statedb) + ProcessBeaconBlockRoot(*beaconRoot, vmenv, tracingStateDB) } if p.config.IsPrague(block.Number(), block.Time()) { - ProcessParentBlockHash(block.ParentHash(), vmenv, statedb) + ProcessParentBlockHash(block.ParentHash(), vmenv, tracingStateDB) } // Iterate over and process the individual transactions @@ -99,10 +103,6 @@ func (p *StateProcessor) Process(block *types.Block, statedb *state.StateDB, cfg receipts = append(receipts, receipt) allLogs = append(allLogs, receipt.Logs...) } - var tracingStateDB = vm.StateDB(statedb) - if hooks := cfg.Tracer; hooks != nil { - tracingStateDB = state.NewHookedState(statedb, hooks) - } // Read requests if Prague is enabled. var requests [][]byte if p.config.IsPrague(block.Number(), block.Time()) { From 24c5493becc5f39df501d2b02989801471abdafa Mon Sep 17 00:00:00 2001 From: jwasinger Date: Thu, 24 Oct 2024 14:13:01 +0700 Subject: [PATCH 2/3] core/vm: remove debug printout in eof test (#30665) --- core/vm/eof_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/core/vm/eof_test.go b/core/vm/eof_test.go index 6c9925dec3..8106a29728 100644 --- a/core/vm/eof_test.go +++ b/core/vm/eof_test.go @@ -18,7 +18,6 @@ package vm import ( "encoding/hex" - "fmt" "reflect" "testing" @@ -95,7 +94,6 @@ func TestEOFSubcontainer(t *testing.T) { if err := got.UnmarshalBinary(b, true); err != nil { t.Fatal(err) } - fmt.Print(got) if res := got.MarshalBinary(); !reflect.DeepEqual(res, b) { t.Fatalf("invalid marshalling, want %v got %v", b, res) } From 6c6bf6fe64ff422b97c1e5011fe5e9d33988937c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felf=C3=B6ldi=20Zsolt?= Date: Fri, 25 Oct 2024 13:20:18 +0200 Subject: [PATCH 3/3] beacon/blsync: add holesky config and update checkpoints (#30671) This PR adds the beacon chain config for the holesky testnet. It also updates beacon checkpoints for Mainnet and Sepolia. --- beacon/blsync/config.go | 21 ++++++++++++++++++--- cmd/blsync/main.go | 1 + 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/beacon/blsync/config.go b/beacon/blsync/config.go index efc44b47d1..828c14f898 100644 --- a/beacon/blsync/config.go +++ b/beacon/blsync/config.go @@ -41,7 +41,7 @@ var ( AddFork("BELLATRIX", 144896, []byte{2, 0, 0, 0}). AddFork("CAPELLA", 194048, []byte{3, 0, 0, 0}). AddFork("DENEB", 269568, []byte{4, 0, 0, 0}), - Checkpoint: common.HexToHash("0x388be41594ec7d6a6894f18c73f3469f07e2c19a803de4755d335817ed8e2e5a"), + Checkpoint: common.HexToHash("0x6509b691f4de4f7b083f2784938fd52f0e131675432b3fd85ea549af9aebd3d0"), } SepoliaConfig = lightClientConfig{ @@ -54,19 +54,34 @@ var ( AddFork("BELLATRIX", 100, []byte{144, 0, 0, 113}). AddFork("CAPELLA", 56832, []byte{144, 0, 0, 114}). AddFork("DENEB", 132608, []byte{144, 0, 0, 115}), - Checkpoint: common.HexToHash("0x1005a6d9175e96bfbce4d35b80f468e9bff0b674e1e861d16e09e10005a58e81"), + Checkpoint: common.HexToHash("0x456e85f5608afab3465a0580bff8572255f6d97af0c5f939e3f7536b5edb2d3f"), + } + + HoleskyConfig = lightClientConfig{ + ChainConfig: (&types.ChainConfig{ + GenesisValidatorsRoot: common.HexToHash("0x9143aa7c615a7f7115e2b6aac319c03529df8242ae705fba9df39b79c59fa8b1"), + GenesisTime: 1695902400, + }). + AddFork("GENESIS", 0, []byte{1, 1, 112, 0}). + AddFork("ALTAIR", 0, []byte{2, 1, 112, 0}). + AddFork("BELLATRIX", 0, []byte{3, 1, 112, 0}). + AddFork("CAPELLA", 256, []byte{4, 1, 112, 0}). + AddFork("DENEB", 29696, []byte{5, 1, 112, 0}), + Checkpoint: common.HexToHash("0x6456a1317f54d4b4f2cb5bc9d153b5af0988fe767ef0609f0236cf29030bcff7"), } ) func makeChainConfig(ctx *cli.Context) lightClientConfig { var config lightClientConfig customConfig := ctx.IsSet(utils.BeaconConfigFlag.Name) - utils.CheckExclusive(ctx, utils.MainnetFlag, utils.SepoliaFlag, utils.BeaconConfigFlag) + utils.CheckExclusive(ctx, utils.MainnetFlag, utils.SepoliaFlag, utils.HoleskyFlag, utils.BeaconConfigFlag) switch { case ctx.Bool(utils.MainnetFlag.Name): config = MainnetConfig case ctx.Bool(utils.SepoliaFlag.Name): config = SepoliaConfig + case ctx.Bool(utils.HoleskyFlag.Name): + config = HoleskyConfig default: if !customConfig { config = MainnetConfig diff --git a/cmd/blsync/main.go b/cmd/blsync/main.go index f9b8575edf..586f1b79cf 100644 --- a/cmd/blsync/main.go +++ b/cmd/blsync/main.go @@ -45,6 +45,7 @@ func main() { //TODO datadir for optional permanent database utils.MainnetFlag, utils.SepoliaFlag, + utils.HoleskyFlag, utils.BlsyncApiFlag, utils.BlsyncJWTSecretFlag, },