From f10480317ba73dda34db8abc9c9b59c9a13034b7 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Thu, 31 Oct 2024 17:55:59 -0300 Subject: [PATCH 1/5] types: fix json field name for execution witness parent state root Signed-off-by: Ignacio Hagopian --- core/types/block.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/types/block.go b/core/types/block.go index 6a6617504e59..1e41a4fbf995 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -62,7 +62,7 @@ func (n *BlockNonce) UnmarshalText(input []byte) error { type ExecutionWitness struct { StateDiff verkle.StateDiff `json:"stateDiff"` VerkleProof *verkle.VerkleProof `json:"verkleProof"` - ParentStateRoot common.Hash `json:"parentRoot"` + ParentStateRoot common.Hash `json:"parentStateRoot"` } func (ew *ExecutionWitness) Copy() *ExecutionWitness { From 090d645b77461471083c0bded103b41b635d8b56 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Fri, 1 Nov 2024 08:25:58 -0300 Subject: [PATCH 2/5] get parent block by hash Signed-off-by: Ignacio Hagopian --- core/block_validator.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/block_validator.go b/core/block_validator.go index 8014fbeef680..4f15087e62b6 100644 --- a/core/block_validator.go +++ b/core/block_validator.go @@ -133,18 +133,18 @@ func (v *BlockValidator) ValidateState(block *types.Block, statedb *state.StateD return fmt.Errorf("invalid merkle root (remote: %x local: %x) dberr: %w", header.Root, root, statedb.Error()) } if blockEw := block.ExecutionWitness(); blockEw != nil { - parent := v.bc.GetHeaderByNumber(header.Number.Uint64() - 1) + parent := v.bc.GetBlockByHash(header.ParentHash) if parent == nil { return fmt.Errorf("nil parent header for block %d", header.Number) } - stateDiff, proof, err := beacon.BuildVerkleProof(header, statedb, parent.Root) + stateDiff, proof, err := beacon.BuildVerkleProof(header, statedb, parent.Root()) if err != nil { return fmt.Errorf("error building verkle proof: %w", err) } ew := types.ExecutionWitness{ StateDiff: stateDiff, VerkleProof: proof, - ParentStateRoot: parent.Root, + ParentStateRoot: parent.Root(), } if err := ew.Equal(blockEw); err != nil { return fmt.Errorf("invalid execution witness: %v", err) From 0b45db4148c88362652d1552426b2d6161348da0 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Fri, 1 Nov 2024 08:46:47 -0300 Subject: [PATCH 3/5] use latest alpha stable fixture Signed-off-by: Ignacio Hagopian --- .github/workflows/stable-spec-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stable-spec-tests.yml b/.github/workflows/stable-spec-tests.yml index fe13e2fd02f3..0da714f6f192 100644 --- a/.github/workflows/stable-spec-tests.yml +++ b/.github/workflows/stable-spec-tests.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: env: - FIXTURES_TAG: "verkle@v0.0.7-alpha-4" + FIXTURES_TAG: "verkle@v0.0.7-alpha-5" jobs: setup: From b054b0cf1fff9bb1cdf473ae197fce5aae8c6773 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Fri, 1 Nov 2024 11:16:44 -0300 Subject: [PATCH 4/5] fix Signed-off-by: Ignacio Hagopian --- cmd/evm/internal/t8ntool/execution.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/evm/internal/t8ntool/execution.go b/cmd/evm/internal/t8ntool/execution.go index 1a95f4cd0f37..2fb49139d71f 100644 --- a/cmd/evm/internal/t8ntool/execution.go +++ b/cmd/evm/internal/t8ntool/execution.go @@ -69,7 +69,7 @@ type ExecutionResult struct { // Verkle witness VerkleProof *verkle.VerkleProof `json:"verkleProof,omitempty"` StateDiff verkle.StateDiff `json:"stateDiff,omitempty"` - ParentRoot common.Hash `json:"parentRoot,omitempty"` + ParentRoot common.Hash `json:"parentStateRoot,omitempty"` // Values to test the verkle conversion CurrentAccountAddress *common.Address `json:"currentConversionAddress,omitempty" gencodec:"optional"` From 0d299a6b5395ce8a56ea305327afb52206994916 Mon Sep 17 00:00:00 2001 From: Ignacio Hagopian Date: Fri, 1 Nov 2024 11:18:09 -0300 Subject: [PATCH 5/5] target new version of stable fixtures Signed-off-by: Ignacio Hagopian --- .github/workflows/stable-spec-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stable-spec-tests.yml b/.github/workflows/stable-spec-tests.yml index 0da714f6f192..f18561971a4f 100644 --- a/.github/workflows/stable-spec-tests.yml +++ b/.github/workflows/stable-spec-tests.yml @@ -8,7 +8,7 @@ on: workflow_dispatch: env: - FIXTURES_TAG: "verkle@v0.0.7-alpha-5" + FIXTURES_TAG: "verkle@v0.0.7-alpha-8" jobs: setup: