From 63ab5996f4d19eefdad3dbe1c1e6213aabe7b99d Mon Sep 17 00:00:00 2001 From: protolambda Date: Wed, 5 Oct 2022 03:53:22 +0200 Subject: [PATCH] eip4844: update tx_peek_blob_versioned_hashes to match tx type as defined in EIP PR 5707 (fee market update) --- specs/eip4844/beacon-chain.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/eip4844/beacon-chain.md b/specs/eip4844/beacon-chain.md index 4cf953593..2fe721a7c 100644 --- a/specs/eip4844/beacon-chain.md +++ b/specs/eip4844/beacon-chain.md @@ -167,10 +167,10 @@ See [the full details of `blob_versioned_hashes` offset calculation](https://gis def tx_peek_blob_versioned_hashes(opaque_tx: Transaction) -> Sequence[VersionedHash]: assert opaque_tx[0] == BLOB_TX_TYPE message_offset = 1 + uint32.decode_bytes(opaque_tx[1:5]) - # field offset: 32 + 8 + 32 + 32 + 8 + 4 + 32 + 4 + 4 = 156 + # field offset: 32 + 8 + 32 + 32 + 8 + 4 + 32 + 4 + 4 + 32 = 188 blob_versioned_hashes_offset = ( message_offset - + uint32.decode_bytes(opaque_tx[(message_offset + 156):(message_offset + 160)]) + + uint32.decode_bytes(opaque_tx[(message_offset + 188):(message_offset + 192)]) ) return [ VersionedHash(opaque_tx[x:(x + 32)])