From d0631d7ccbfe92a3c0e04a06fd0c0e0d0702e2f5 Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Mon, 25 Nov 2024 17:08:52 +0100 Subject: [PATCH] EIP-7685: update --- EIPS/eip-7685.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/EIPS/eip-7685.md b/EIPS/eip-7685.md index 0934ae18d5b7ca..304c0e9d21710c 100644 --- a/EIPS/eip-7685.md +++ b/EIPS/eip-7685.md @@ -48,8 +48,10 @@ Each request type will defines its own `requests` object using with its own Extend the header with a new 32 byte commitment value `requests_hash`. A requests hash list is computed by hashing the elements of the block requests list, but -only ones where `request_data` is non-empty. The commitment is then computed as the sha256 -hash of the list of requests element hashes. +only ones where `request_data` is non-empty. Note we assume `request_type` has a size of +one byte. + +The commitment is then computed as the sha256 hash of the list of element hashes. ```python @@ -57,7 +59,7 @@ def compute_requests_hash(block_requests): m = sha256() for r in block_requests: if len(r) > 1: - m.update(sha256(r)) + m.update(sha256(r).digest()) return m.digest() block.header.requests_hash = compute_requests_hash(requests)