diff --git a/src/ethereum_spec_tools/evm_tools/t8n/t8n_types.py b/src/ethereum_spec_tools/evm_tools/t8n/t8n_types.py index e811b57218..724df86f94 100644 --- a/src/ethereum_spec_tools/evm_tools/t8n/t8n_types.py +++ b/src/ethereum_spec_tools/evm_tools/t8n/t8n_types.py @@ -307,7 +307,7 @@ class Result: excess_blob_gas: Optional[U64] = None blob_gas_used: Optional[Uint] = None requests_hash: Optional[Hash32] = None - requests: Optional[Bytes] = None + requests: Optional[List[Bytes]] = None def to_json(self) -> Any: """Encode the result to JSON""" @@ -354,6 +354,10 @@ def to_json(self) -> Any: assert self.requests is not None data["requestsHash"] = encode_to_hex(self.requests_hash) - data["requests"] = [encode_to_hex(req) for req in self.requests] + # T8N doesn't consider the request type byte to be part of the + # request + data["requests"] = [ + encode_to_hex(req[1:]) for req in self.requests + ] return data