From f95255839aa3445ccfda6a5ef178f87a668e3916 Mon Sep 17 00:00:00 2001 From: Guillaume Ballet <3272758+gballet@users.noreply.github.com> Date: Wed, 20 Dec 2023 18:35:42 +0100 Subject: [PATCH] fix: main storage offset value (#329) --- trie/utils/verkle.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/trie/utils/verkle.go b/trie/utils/verkle.go index 17fdf1ade3..bf9872e0f3 100644 --- a/trie/utils/verkle.go +++ b/trie/utils/verkle.go @@ -37,9 +37,9 @@ var ( zero = uint256.NewInt(0) VerkleNodeWidthLog2 = 8 HeaderStorageOffset = uint256.NewInt(64) - mainStorageOffsetLshVerkleNodeWidth = new(uint256.Int).Lsh(uint256.NewInt(256), 31-uint(VerkleNodeWidthLog2)) + mainStorageOffsetLshVerkleNodeWidth = new(uint256.Int).Lsh(uint256.NewInt(1), 248-uint(VerkleNodeWidthLog2)) CodeOffset = uint256.NewInt(128) - MainStorageOffset = new(uint256.Int).Lsh(uint256.NewInt(256), 31) + MainStorageOffset = new(uint256.Int).Lsh(uint256.NewInt(1), 248 /* 8 * 31*/) VerkleNodeWidth = uint256.NewInt(256) codeStorageDelta = uint256.NewInt(0).Sub(CodeOffset, HeaderStorageOffset)