eip4844: update tx_peek_blob_versioned_hashes to match tx type as defined in EIP PR 5707 (fee market update)

This commit is contained in:
protolambda 2022-10-05 03:53:22 +02:00
parent 4e26813c81
commit 63ab5996f4
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623

View File

@ -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)])