From ee00f50e89df47ddf7f20d00ac33b59f1e92365b Mon Sep 17 00:00:00 2001 From: acolytec3 <17355484+acolytec3@users.noreply.github.com> Date: Tue, 24 Dec 2024 15:58:54 -0500 Subject: [PATCH] fix rewardAccount to write account into trie --- packages/vm/src/runBlock.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/vm/src/runBlock.ts b/packages/vm/src/runBlock.ts index b819dc4b41..52eaa3435e 100644 --- a/packages/vm/src/runBlock.ts +++ b/packages/vm/src/runBlock.ts @@ -13,6 +13,8 @@ import { BIGINT_8, GWEI_TO_WEI, KECCAK256_RLP, + VERKLE_BASIC_DATA_LEAF_KEY, + VERKLE_CODE_HASH_LEAF_KEY, bigIntToAddressBytes, bigIntToBytes, bytesToHex, @@ -762,7 +764,16 @@ export async function rewardAccount( if (evm.systemVerkleAccessWitness === undefined) { throw Error(`verkleAccessWitness required if verkle (EIP-6800) is activated`) } - evm.systemVerkleAccessWitness.touchAndChargeProofOfAbsence(address) + evm.systemVerkleAccessWitness.touchAddressOnWriteAndComputeGas( + address, + 0, + VERKLE_BASIC_DATA_LEAF_KEY, + ) + evm.systemVerkleAccessWitness.touchAddressOnWriteAndComputeGas( + address, + 0, + VERKLE_CODE_HASH_LEAF_KEY, + ) } account = new Account() }