From 770ee68ec1d8a299dd2333a865afd044ae1e440c Mon Sep 17 00:00:00 2001 From: Daniel Lehrner Date: Mon, 16 Dec 2024 15:58:31 +0100 Subject: [PATCH 1/7] exclude empty requests from requests hash Signed-off-by: Daniel Lehrner --- .../java/org/hyperledger/besu/datatypes/Hash.java | 10 ++-------- .../org/hyperledger/besu/datatypes/HashTest.java | 3 +-- .../besu/ethereum/mainnet/BodyValidation.java | 14 +++++++++----- .../besu/ethereum/chain/GenesisStateTest.java | 4 ++-- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/datatypes/src/main/java/org/hyperledger/besu/datatypes/Hash.java b/datatypes/src/main/java/org/hyperledger/besu/datatypes/Hash.java index 53a19399a97..5907b91f9a5 100644 --- a/datatypes/src/main/java/org/hyperledger/besu/datatypes/Hash.java +++ b/datatypes/src/main/java/org/hyperledger/besu/datatypes/Hash.java @@ -52,15 +52,9 @@ public class Hash extends DelegatingBytes32 { public static final Hash EMPTY = hash(Bytes.EMPTY); /** - * Hash of empty requests or "0x6036c41849da9c076ed79654d434017387a88fb833c2856b32e18218b3341c5f" + * Hash of empty requests or "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" */ - public static final Hash EMPTY_REQUESTS_HASH = - Hash.wrap( - sha256( - Bytes.concatenate( - sha256(Bytes.of(RequestType.DEPOSIT.getSerializedType())), - sha256(Bytes.of(RequestType.WITHDRAWAL.getSerializedType())), - sha256(Bytes.of(RequestType.CONSOLIDATION.getSerializedType()))))); + public static final Hash EMPTY_REQUESTS_HASH = Hash.wrap(sha256(Bytes.EMPTY)); /** * Instantiates a new Hash. diff --git a/datatypes/src/test/java/org/hyperledger/besu/datatypes/HashTest.java b/datatypes/src/test/java/org/hyperledger/besu/datatypes/HashTest.java index a2ef3fe5591..43759406676 100644 --- a/datatypes/src/test/java/org/hyperledger/besu/datatypes/HashTest.java +++ b/datatypes/src/test/java/org/hyperledger/besu/datatypes/HashTest.java @@ -31,7 +31,6 @@ public void shouldGetExpectedValueForEmptyHash() { public void shouldGetExpectedValueForEmptyRequestsHash() { assertThat(Hash.EMPTY_REQUESTS_HASH) .isEqualTo( - Hash.fromHexString( - "0x6036c41849da9c076ed79654d434017387a88fb833c2856b32e18218b3341c5f")); + Hash.fromHexString("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")); } } diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/BodyValidation.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/BodyValidation.java index f9835c2de5b..7ed7dda834c 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/BodyValidation.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/BodyValidation.java @@ -92,7 +92,7 @@ public static Hash withdrawalsRoot(final List withdrawals) { /** * Generates the requests hash for a list of requests * - * @param requests list of request + * @param requests list of request (must be sorted by request type ascending) * @return the requests hash */ public static Hash requestsHash(final List requests) { @@ -101,10 +101,14 @@ public static Hash requestsHash(final List requests) { .forEach( i -> { final Request request = requests.get(i); - final Bytes requestBytes = - Bytes.concatenate( - Bytes.of(request.getType().getSerializedType()), request.getData()); - requestHashes.add(sha256(requestBytes)); + + // empty requests are excluded from the hash + if (!request.getData().isEmpty()) { + final Bytes requestBytes = + Bytes.concatenate( + Bytes.of(request.getType().getSerializedType()), request.getData()); + requestHashes.add(sha256(requestBytes)); + } }); return Hash.wrap(sha256(Bytes.wrap(requestHashes))); diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/chain/GenesisStateTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/chain/GenesisStateTest.java index a4584cc938a..8c84ddfdf6e 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/chain/GenesisStateTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/chain/GenesisStateTest.java @@ -327,14 +327,14 @@ void genesisFromPrague(final DataStorageConfiguration dataStorageConfiguration) assertThat(header.getRequestsHash().get()) .isEqualTo( Hash.fromHexString( - "0x6036c41849da9c076ed79654d434017387a88fb833c2856b32e18218b3341c5f")); + "0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855")); assertThat(header.getTargetBlobsPerBlock().isPresent()).isTrue(); assertThat(header.getTargetBlobsPerBlock().get()).isEqualTo(UInt64.ONE); assertThat(header.getHash()) .isEqualTo( Hash.fromHexString( - "0xdbc64edecb3a432e48cbd270b4a248ffc611b5f3dd666c8a10d546672cae17bd")); + "0xdb3cb6f894b434d55c66cf6aeb3d12ab9acc276f130dad82d5791eef8b048f2e")); } @Test From d7c3a7fcc2069e755f40a4f5115adb3c542d1c4b Mon Sep 17 00:00:00 2001 From: Simon Dudley Date: Wed, 18 Dec 2024 18:14:32 +1000 Subject: [PATCH 2/7] Exclude empty requests and prepend request type byte in engine_getPayloadV4 Fixes https://github.com/ethereum/execution-apis/pull/599 change to EIP-7685 Signed-off-by: Simon Dudley --- .../internal/results/BlockResultFactory.java | 4 +- .../engine/EngineGetPayloadV4Test.java | 50 ++++++++++++++++++- .../besu/ethereum/core/Request.java | 9 ++++ 3 files changed, 61 insertions(+), 2 deletions(-) diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/BlockResultFactory.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/BlockResultFactory.java index 66bb879569a..2639525d8b0 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/BlockResultFactory.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/results/BlockResultFactory.java @@ -167,7 +167,9 @@ public EngineGetPayloadResultV4 payloadTransactionCompleteV4(final PayloadWrappe rqs -> rqs.stream() .sorted(Comparator.comparing(Request::getType)) - .map(r -> r.getData().toHexString()) + .filter(r -> !r.getData().isEmpty()) + .map(Request::getEncodedRequest) + .map(Bytes::toHexString) .toList()); final BlobsBundleV1 blobsBundleV1 = diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineGetPayloadV4Test.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineGetPayloadV4Test.java index 744600ddca9..4a241ce3867 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineGetPayloadV4Test.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineGetPayloadV4Test.java @@ -147,7 +147,8 @@ header, new BlockBody(List.of(blobTx), emptyList(), Optional.of(emptyList()))), final List requestsWithoutRequestId = requests.stream() .sorted(Comparator.comparing(Request::getType)) - .map(r -> r.getData().toHexString()) + .map(Request::getEncodedRequest) + .map(Bytes::toHexString) .toList(); Optional.of(resp) .map(JsonRpcSuccessResponse.class::cast) @@ -172,6 +173,53 @@ header, new BlockBody(List.of(blobTx), emptyList(), Optional.of(emptyList()))), verify(engineCallListener, times(1)).executionEngineCalled(); } + @Test + public void shouldExcludeEmptyRequestsInRequestsList() { + + BlockHeader header = + new BlockHeaderTestFixture().timestamp(pragueHardfork.milestone() + 1).buildHeader(); + PayloadIdentifier payloadIdentifier = + PayloadIdentifier.forPayloadParams( + Hash.ZERO, + pragueHardfork.milestone(), + Bytes32.random(), + Address.fromHexString("0x42"), + Optional.empty(), + Optional.empty()); + + BlockWithReceipts block = + new BlockWithReceipts( + new Block(header, new BlockBody(emptyList(), emptyList(), Optional.of(emptyList()))), + emptyList()); + final List unorderedRequests = + List.of( + new Request(RequestType.CONSOLIDATION, Bytes.of(1)), + new Request(RequestType.DEPOSIT, Bytes.of(1)), + new Request(RequestType.WITHDRAWAL, Bytes.EMPTY)); + PayloadWrapper payload = + new PayloadWrapper(payloadIdentifier, block, Optional.of(unorderedRequests)); + + when(mergeContext.retrievePayloadById(payloadIdentifier)).thenReturn(Optional.of(payload)); + + final var resp = resp(RpcMethod.ENGINE_GET_PAYLOAD_V4.getMethodName(), payloadIdentifier); + assertThat(resp).isInstanceOf(JsonRpcSuccessResponse.class); + + final List expectedRequests = + List.of( + Bytes.concatenate(Bytes.of(RequestType.DEPOSIT.getSerializedType()), Bytes.of(1)) + .toHexString(), + Bytes.concatenate(Bytes.of(RequestType.CONSOLIDATION.getSerializedType()), Bytes.of(1)) + .toHexString()); + Optional.of(resp) + .map(JsonRpcSuccessResponse.class::cast) + .ifPresent( + r -> { + assertThat(r.getResult()).isInstanceOf(EngineGetPayloadResultV4.class); + final EngineGetPayloadResultV4 res = (EngineGetPayloadResultV4) r.getResult(); + assertThat(res.getExecutionRequests()).isEqualTo(expectedRequests); + }); + } + @Test public void shouldReturnUnsupportedFork() { final var resp = resp(RpcMethod.ENGINE_GET_PAYLOAD_V4.getMethodName(), mockPid); diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/Request.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/Request.java index 7d485336ad8..bdfcbd55cff 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/Request.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/Request.java @@ -29,4 +29,13 @@ public RequestType getType() { public Bytes getData() { return data(); } + + /** + * Gets the serialized form of the concatenated type and data. + * + * @return the serialized request as a byte. + */ + public Bytes getEncodedRequest() { + return Bytes.concatenate(Bytes.of(getType().getSerializedType()), getData()); + } } From d8b62ff034cdfcb2ffce2ba60a009dac14319554 Mon Sep 17 00:00:00 2001 From: Daniel Lehrner Date: Wed, 8 Jan 2025 15:29:54 +0100 Subject: [PATCH 3/7] fix test Signed-off-by: Daniel Lehrner --- .../org/hyperledger/besu/ethereum/chain/GenesisStateTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/chain/GenesisStateTest.java b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/chain/GenesisStateTest.java index 50b927147e1..aabebe0b3a9 100644 --- a/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/chain/GenesisStateTest.java +++ b/ethereum/core/src/test/java/org/hyperledger/besu/ethereum/chain/GenesisStateTest.java @@ -290,7 +290,7 @@ void genesisFromPrague(final DataStorageConfiguration dataStorageConfiguration) assertThat(header.getHash()) .isEqualTo( Hash.fromHexString( - "0x554807b22674e6d335f734485993857bbad7a9543affb0663a10c14d78135ec7")); + "0x5d2d02fce02d1b7ca635ec91a4fe6f7aa36f9b3997ec4304e8c68d8f6f15d266")); assertThat(header.getGasLimit()).isEqualTo(0x2fefd8); assertThat(header.getGasUsed()).isZero(); assertThat(header.getNumber()).isZero(); From 857c36904bef593290532870f4f5bed224aa1998 Mon Sep 17 00:00:00 2001 From: Daniel Lehrner Date: Thu, 9 Jan 2025 12:32:55 +0100 Subject: [PATCH 4/7] fix prague tests: change request hash, reorder json elements Signed-off-by: Daniel Lehrner --- .../besu/evmtool/t8n/prague-deposit.json | 100 +++++++++--------- .../t8n/prague-withdrawal-request.json | 18 ++-- 2 files changed, 59 insertions(+), 59 deletions(-) diff --git a/ethereum/evmtool/src/test/resources/org/hyperledger/besu/evmtool/t8n/prague-deposit.json b/ethereum/evmtool/src/test/resources/org/hyperledger/besu/evmtool/t8n/prague-deposit.json index f80771a85eb..9ebd3ee2903 100644 --- a/ethereum/evmtool/src/test/resources/org/hyperledger/besu/evmtool/t8n/prague-deposit.json +++ b/ethereum/evmtool/src/test/resources/org/hyperledger/besu/evmtool/t8n/prague-deposit.json @@ -132,9 +132,7 @@ "stdout": { "alloc": { "0x00000000219ab540356cbb839cbe05303d7705fa": { - "balance": "0x3782dace9d9000000", "code": "0x60806040526004361061003f5760003560e01c806301ffc9a71461004457806322895118146100a4578063621fd130146101ba578063c5f2892f14610244575b600080fd5b34801561005057600080fd5b506100906004803603602081101561006757600080fd5b50357fffffffff000000000000000000000000000000000000000000000000000000001661026b565b604080519115158252519081900360200190f35b6101b8600480360360808110156100ba57600080fd5b8101906020810181356401000000008111156100d557600080fd5b8201836020820111156100e757600080fd5b8035906020019184600183028401116401000000008311171561010957600080fd5b91939092909160208101903564010000000081111561012757600080fd5b82018360208201111561013957600080fd5b8035906020019184600183028401116401000000008311171561015b57600080fd5b91939092909160208101903564010000000081111561017957600080fd5b82018360208201111561018b57600080fd5b803590602001918460018302840111640100000000831117156101ad57600080fd5b919350915035610304565b005b3480156101c657600080fd5b506101cf6110b5565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102095781810151838201526020016101f1565b50505050905090810190601f1680156102365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561025057600080fd5b506102596110c7565b60408051918252519081900360200190f35b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f01ffc9a70000000000000000000000000000000000000000000000000000000014806102fe57507fffffffff0000000000000000000000000000000000000000000000000000000082167f8564090700000000000000000000000000000000000000000000000000000000145b92915050565b6030861461035d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806118056026913960400191505060405180910390fd5b602084146103b6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603681526020018061179c6036913960400191505060405180910390fd5b6060821461040f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806118786029913960400191505060405180910390fd5b670de0b6b3a7640000341015610470576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806118526026913960400191505060405180910390fd5b633b9aca003406156104cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806117d26033913960400191505060405180910390fd5b633b9aca00340467ffffffffffffffff811115610535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602781526020018061182b6027913960400191505060405180910390fd5b6060610540826114ba565b90507f649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c589898989858a8a6105756020546114ba565b6040805160a0808252810189905290819060208201908201606083016080840160c085018e8e80828437600083820152601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690910187810386528c815260200190508c8c808284376000838201819052601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690920188810386528c5181528c51602091820193918e019250908190849084905b83811015610648578181015183820152602001610630565b50505050905090810190601f1680156106755780820380516001836020036101000a031916815260200191505b5086810383528881526020018989808284376000838201819052601f9091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169092018881038452895181528951602091820193918b019250908190849084905b838110156106ef5781810151838201526020016106d7565b50505050905090810190601f16801561071c5780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390a1600060028a8a600060801b604051602001808484808284377fffffffffffffffffffffffffffffffff0000000000000000000000000000000090941691909301908152604080517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0818403018152601090920190819052815191955093508392506020850191508083835b602083106107fc57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016107bf565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610859573d6000803e3d6000fd5b5050506040513d602081101561086e57600080fd5b5051905060006002806108846040848a8c6116fe565b6040516020018083838082843780830192505050925050506040516020818303038152906040526040518082805190602001908083835b602083106108f857805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016108bb565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610955573d6000803e3d6000fd5b5050506040513d602081101561096a57600080fd5b5051600261097b896040818d6116fe565b60405160009060200180848480828437919091019283525050604080518083038152602092830191829052805190945090925082918401908083835b602083106109f457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016109b7565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610a51573d6000803e3d6000fd5b5050506040513d6020811015610a6657600080fd5b5051604080516020818101949094528082019290925280518083038201815260609092019081905281519192909182918401908083835b60208310610ada57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610a9d565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610b37573d6000803e3d6000fd5b5050506040513d6020811015610b4c57600080fd5b50516040805160208101858152929350600092600292839287928f928f92018383808284378083019250505093505050506040516020818303038152906040526040518082805190602001908083835b60208310610bd957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610b9c565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610c36573d6000803e3d6000fd5b5050506040513d6020811015610c4b57600080fd5b50516040518651600291889160009188916020918201918291908601908083835b60208310610ca957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610c6c565b6001836020036101000a0380198251168184511680821785525050505050509050018367ffffffffffffffff191667ffffffffffffffff1916815260180182815260200193505050506040516020818303038152906040526040518082805190602001908083835b60208310610d4e57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610d11565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610dab573d6000803e3d6000fd5b5050506040513d6020811015610dc057600080fd5b5051604080516020818101949094528082019290925280518083038201815260609092019081905281519192909182918401908083835b60208310610e3457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610df7565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015610e91573d6000803e3d6000fd5b5050506040513d6020811015610ea657600080fd5b50519050858114610f02576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260548152602001806117486054913960600191505060405180910390fd5b60205463ffffffff11610f60576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806117276021913960400191505060405180910390fd5b602080546001019081905560005b60208110156110a9578160011660011415610fa0578260008260208110610f9157fe5b0155506110ac95505050505050565b600260008260208110610faf57fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061102557805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610fe8565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa158015611082573d6000803e3d6000fd5b5050506040513d602081101561109757600080fd5b50519250600282049150600101610f6e565b50fe5b50505050505050565b60606110c26020546114ba565b905090565b6020546000908190815b60208110156112f05781600116600114156111e6576002600082602081106110f557fe5b01548460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061116b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161112e565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa1580156111c8573d6000803e3d6000fd5b5050506040513d60208110156111dd57600080fd5b505192506112e2565b600283602183602081106111f657fe5b015460405160200180838152602001828152602001925050506040516020818303038152906040526040518082805190602001908083835b6020831061126b57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161122e565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa1580156112c8573d6000803e3d6000fd5b5050506040513d60208110156112dd57600080fd5b505192505b6002820491506001016110d1565b506002826112ff6020546114ba565b600060401b6040516020018084815260200183805190602001908083835b6020831061135a57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0909201916020918201910161131d565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790527fffffffffffffffffffffffffffffffffffffffffffffffff000000000000000095909516920191825250604080518083037ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8018152601890920190819052815191955093508392850191508083835b6020831061143f57805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101611402565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990921691161790526040519190930194509192505080830381855afa15801561149c573d6000803e3d6000fd5b5050506040513d60208110156114b157600080fd5b50519250505090565b60408051600880825281830190925260609160208201818036833701905050905060c082901b8060071a60f81b826000815181106114f457fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060061a60f81b8260018151811061153757fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060051a60f81b8260028151811061157a57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060041a60f81b826003815181106115bd57fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060031a60f81b8260048151811061160057fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060021a60f81b8260058151811061164357fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060011a60f81b8260068151811061168657fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053508060001a60f81b826007815181106116c957fe5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a90535050919050565b6000808585111561170d578182fd5b83861115611719578182fd5b505082019391909203915056fe4465706f736974436f6e74726163743a206d65726b6c6520747265652066756c6c4465706f736974436f6e74726163743a207265636f6e7374727563746564204465706f7369744461746120646f6573206e6f74206d6174636820737570706c696564206465706f7369745f646174615f726f6f744465706f736974436f6e74726163743a20696e76616c6964207769746864726177616c5f63726564656e7469616c73206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c7565206e6f74206d756c7469706c65206f6620677765694465706f736974436f6e74726163743a20696e76616c6964207075626b6579206c656e6774684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f20686967684465706f736974436f6e74726163743a206465706f7369742076616c756520746f6f206c6f774465706f736974436f6e74726163743a20696e76616c6964207369676e6174757265206c656e677468a2646970667358221220dceca8706b29e917dacf25fceef95acac8d90d765ac926663ce4096195952b6164736f6c634300060b0033", - "nonce": "0x1", "storage": { "0x0000000000000000000000000000000000000000000000000000000000000000": "0x85acb6376c2707b118225da41825974c12b5924a05c6a53b988c9cbc33c55b05", "0x0000000000000000000000000000000000000000000000000000000000000001": "0x2f93f18b1befc457f659e486ce25bbe413fe3943ee7634d2afbe83dc512c3d7a", @@ -170,28 +168,30 @@ "0x000000000000000000000000000000000000000000000000000000000000003e": "0x8869ff2c22b28cc10510d9853292803328be4fb0e80495e8bb8d271f5b889636", "0x000000000000000000000000000000000000000000000000000000000000003f": "0xb5fe28e79f1b850f8658246ce9b6a1e7b49fc06db7143e8fe0b4f2b0c5523a5c", "0x0000000000000000000000000000000000000000000000000000000000000040": "0x985e929f70af28d0bdd1a90a808f977f597c7c778c489e98d3bd8910d31ac0f7" - } + }, + "balance": "0x3782dace9d9000000", + "nonce": "0x1" }, "0x000f3df6d732807ef1319fb7b8bb8522d0beac02": { - "balance": "0x0", "code": "0x3373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500", - "nonce": "0x1", "storage": { "0x000000000000000000000000000000000000000000000000000000000000000c": "0x000000000000000000000000000000000000000000000000000000000000000c" - } + }, + "balance": "0x0", + "nonce": "0x1" }, "0x00a3ca265ebcb825b45f985a16cefb49958ce017": { - "balance": "0x0", "code": "0x3373fffffffffffffffffffffffffffffffffffffffe146090573615156028575f545f5260205ff35b366038141561012e5760115f54600182026001905f5b5f82111560595781019083028483029004916001019190603e565b90939004341061012e57600154600101600155600354806003026004013381556001015f3581556001016020359055600101600355005b6003546002548082038060101160a4575060105b5f5b81811460dd5780604c02838201600302600401805490600101805490600101549160601b83528260140152906034015260010160a6565b910180921460ed579060025560f8565b90505f6002555f6003555b5f548061049d141561010757505f5b60015460028282011161011c5750505f610122565b01600290035b5f555f600155604c025ff35b5f5ffd", + "balance": "0x0", "nonce": "0x1" }, "0x0f792be4b0c0cb4dae440ef133e90c0ecd48cccc": { - "balance": "0x0", "code": "0x3373fffffffffffffffffffffffffffffffffffffffe14604657602036036042575f35600143038111604257611fff81430311604257611fff9006545f5260205ff35b5f5ffd5b5f35611fff60014303065500", - "nonce": "0x1", "storage": { "0x0000000000000000000000000000000000000000000000000000000000000000": "0xe4fb5d47f70d54b4f36777ea4c882cf767f93d8f8170285d97a1b8275dfe4dbb" - } + }, + "balance": "0x0", + "nonce": "0x1" }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { "balance": "0xaa00be18c288efd690", @@ -200,77 +200,77 @@ }, "body": "0xf90404f901ff8007830f42409400000000219ab540356cbb839cbe05303d7705fa8901bc16d674ec800000b9019422895118000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000d0000000000000000000000000000000000000000000000000000000000000011085acb6376c2707b118225da41825974c12b5924a05c6a53b988c9cbc33c55b05000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000325a0ffeb1d6e7ef8e9ee9b64dcdc3b056f9a1d2b94c1572f1949954e712364604575a03d0f42bad795205de84db8d4ab10b9abd0d081ffe560cbf45f6c281768112a69f901ff0107830f42409400000000219ab540356cbb839cbe05303d7705fa8901bc16d674ec800000b9019422895118000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000d0000000000000000000000000000000000000000000000000000000000000011085acb6376c2707b118225da41825974c12b5924a05c6a53b988c9cbc33c55b05000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000326a05bb08e348c9c4b0a2e15d04f4a89d1a210d013205de8d3d93e38e5c1b0c8d8aba04300c0f575d9908d2cbc3413ab82895678bb8f3ef356224dd1e7cb972f2c4855", "result": { - "blobGasUsed": "0x0", - "currentBaseFee": "0x7", - "currentDifficulty": null, - "currentExcessBlobGas": "0x0", - "gasUsed": "0x24f10", - "logsBloom": "0x00000000000000000000400000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000020000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000", + "requestsHash": "0xbf0f8feb8b18851a8ebdd8e3111f3bfe0cdccf51b07473cd26e6ee4703d23a31", + "requests": [ + "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200405973070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200405973070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030100000000000000", + "0x", + "0x" + ], + "stateRoot": "0x6471f6d90b87f759176a0ad62a7096f69d0d24fd873bdb6b6ced57d04a71e274", + "txRoot": "0x2b790bf82ef7259a0e4513d1b89a77d81e99672ba68758ef2ba3fde32851d023", + "receiptsRoot": "0x9c8d7a917ecb3ff2566f264abbf39131e51b08b07eb2b69cb46989d79d985593", "logsHash": "0x43e31613bfefc1f55d8b3ca2b61f933f3838d523dc11cb5d7ffdd2ecf0ab5d49", + "logsBloom": "0x00000000000000000000400000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000020000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000", "receipts": [ { - "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "contractAddress": "0x0000000000000000000000000000000000000000", + "root": "0x", + "status": "0x1", "cumulativeGasUsed": "0x1431e", - "gasUsed": "0x1431e", + "logsBloom": "0x00000000000000000000400000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000020000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000", "logs": [ { "address": "0x00000000219ab540356cbb839cbe05303d7705fa", - "blockHash": "0xb7b43f46d6ee34eaaad5ab38807b451e0e85bacbe59893afc625550aa7c65262", - "blockNumber": 1, - "data": "0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000080040597307000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000", - "logIndex": "0x0", - "removed": "false", "topics": [ "0x649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5" ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000080040597307000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000", + "blockNumber": 1, "transactionHash": "0x1fe5fcd93d503a72e93ef0a4249e6d9c983cecf33474684f62ece959fc3e8212", - "transactionIndex": "0x0" + "transactionIndex": "0x0", + "blockHash": "0xb7b43f46d6ee34eaaad5ab38807b451e0e85bacbe59893afc625550aa7c65262", + "logIndex": "0x0", + "removed": "false" } ], - "logsBloom": "0x00000000000000000000400000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000020000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000", - "root": "0x", - "status": "0x1", "transactionHash": "0x1fe5fcd93d503a72e93ef0a4249e6d9c983cecf33474684f62ece959fc3e8212", + "contractAddress": "0x0000000000000000000000000000000000000000", + "gasUsed": "0x1431e", + "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "transactionIndex": "0x0" }, { - "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", - "contractAddress": "0x0000000000000000000000000000000000000000", + "root": "0x", + "status": "0x1", "cumulativeGasUsed": "0x24f10", - "gasUsed": "0x10bf2", + "logsBloom": "0x00000000000000000000400000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000020000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000", "logs": [ { "address": "0x00000000219ab540356cbb839cbe05303d7705fa", - "blockHash": "0xb7b43f46d6ee34eaaad5ab38807b451e0e85bacbe59893afc625550aa7c65262", - "blockNumber": 1, - "data": "0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000080040597307000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000080100000000000000000000000000000000000000000000000000000000000000", - "logIndex": "0x0", - "removed": "false", "topics": [ "0x649bbc62d0e31342afea4e5cd82d4049e7e1ee912fc0889aa790803be39038c5" ], + "data": "0x00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000080040597307000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000080100000000000000000000000000000000000000000000000000000000000000", + "blockNumber": 1, "transactionHash": "0x3059d7dbc2df8a05442e50ea529419277c2f45582534f452d2d5676d93273c7d", - "transactionIndex": "0x1" + "transactionIndex": "0x1", + "blockHash": "0xb7b43f46d6ee34eaaad5ab38807b451e0e85bacbe59893afc625550aa7c65262", + "logIndex": "0x0", + "removed": "false" } ], - "logsBloom": "0x00000000000000000000400000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000020000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000", - "root": "0x", - "status": "0x1", "transactionHash": "0x3059d7dbc2df8a05442e50ea529419277c2f45582534f452d2d5676d93273c7d", + "contractAddress": "0x0000000000000000000000000000000000000000", + "gasUsed": "0x10bf2", + "blockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "transactionIndex": "0x1" } ], - "receiptsRoot": "0x9c8d7a917ecb3ff2566f264abbf39131e51b08b07eb2b69cb46989d79d985593", - "requests": [ - "0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200405973070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000200405973070000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000030100000000000000", - "0x", - "0x" - ], - "requestsHash": "0x158ac6beda33cd9341831552555f64c95e074e7024f6c4553c1ed7557077b4c7", - "stateRoot": "0x6471f6d90b87f759176a0ad62a7096f69d0d24fd873bdb6b6ced57d04a71e274", - "txRoot": "0x2b790bf82ef7259a0e4513d1b89a77d81e99672ba68758ef2ba3fde32851d023", - "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421" + "currentDifficulty": null, + "gasUsed": "0x24f10", + "currentBaseFee": "0x7", + "withdrawalsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421", + "currentExcessBlobGas": "0x0", + "blobGasUsed": "0x0" } } } \ No newline at end of file diff --git a/ethereum/evmtool/src/test/resources/org/hyperledger/besu/evmtool/t8n/prague-withdrawal-request.json b/ethereum/evmtool/src/test/resources/org/hyperledger/besu/evmtool/t8n/prague-withdrawal-request.json index 38fd53da0ad..68e8fe566a1 100644 --- a/ethereum/evmtool/src/test/resources/org/hyperledger/besu/evmtool/t8n/prague-withdrawal-request.json +++ b/ethereum/evmtool/src/test/resources/org/hyperledger/besu/evmtool/t8n/prague-withdrawal-request.json @@ -189,14 +189,6 @@ "balance": "0x0", "nonce": "0x1" }, - "0x0f792be4b0c0cb4dae440ef133e90c0ecd48cccc":{ - "code":"0x3373fffffffffffffffffffffffffffffffffffffffe14604657602036036042575f35600143038111604257611fff81430311604257611fff9006545f5260205ff35b5f5ffd5b5f35611fff60014303065500", - "storage":{ - "0x0000000000000000000000000000000000000000000000000000000000000000":"0x10715cfbefdb8a0cb2f7d7ca5ee6d1ea65515ecb41cff0a22d1e11716a9d27fb" - }, - "balance":"0x0", - "nonce":"0x1" - }, "0x0c15f14308530b7cdb8460094bbb9cc28b9aaaaa": { "code": "0x3373fffffffffffffffffffffffffffffffffffffffe1460cb5760115f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff146101f457600182026001905f5b5f82111560685781019083028483029004916001019190604d565b909390049250505036603814608857366101f457346101f4575f5260205ff35b34106101f457600154600101600155600354806003026004013381556001015f35815560010160203590553360601b5f5260385f601437604c5fa0600101600355005b6003546002548082038060101160df575060105b5f5b8181146101835782810160030260040181604c02815460601b8152601401816001015481526020019060020154807fffffffffffffffffffffffffffffffff00000000000000000000000000000000168252906010019060401c908160381c81600701538160301c81600601538160281c81600501538160201c81600401538160181c81600301538160101c81600201538160081c81600101535360010160e1565b910180921461019557906002556101a0565b90505f6002555f6003555b5f54807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff14156101cd57505f5b6001546002828201116101e25750505f6101e8565b01600290035b5f555f600155604c025ff35b5f5ffd", "storage": { @@ -206,6 +198,14 @@ "balance": "0x1", "nonce": "0x1" }, + "0x0f792be4b0c0cb4dae440ef133e90c0ecd48cccc":{ + "code":"0x3373fffffffffffffffffffffffffffffffffffffffe14604657602036036042575f35600143038111604257611fff81430311604257611fff9006545f5260205ff35b5f5ffd5b5f35611fff60014303065500", + "storage":{ + "0x0000000000000000000000000000000000000000000000000000000000000000":"0x10715cfbefdb8a0cb2f7d7ca5ee6d1ea65515ecb41cff0a22d1e11716a9d27fb" + }, + "balance":"0x0", + "nonce":"0x1" + }, "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b": { "balance": "0xad78ebc5ac61f2b034", "nonce": "0x1" @@ -213,7 +213,7 @@ }, "body": "0xf89bf8998007830f424094000000000000000000000000000000000000100080b838000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000026a0d050db98a60dbe4bbbc6ce154c607f28f1cf803a8882f369b28a5eb4ef1a600fa07512ca5133bcb887a41f6136cd645839c1bcf0f300325948387a70f3ad9ced1c", "result": { - "requestsHash": "0xab205d558af6253557180e19e89356ed4c7d4b13615ee9560840af3df75ddb12", + "requestsHash": "0x16a372318fd60f169dd3e1e2e528d1fb17edc62e741feebcb0896f950018769a", "requests": [ "0x", "0x00000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000", From 9c16f5178d2b60ea05876c43e1f9ec8e7472138b Mon Sep 17 00:00:00 2001 From: Daniel Lehrner Date: Thu, 9 Jan 2025 17:01:32 +0100 Subject: [PATCH 5/7] fix extracting of request for new payload Signed-off-by: Daniel Lehrner --- .../CodeDelegationTransactionAcceptanceTest.java | 8 ++++---- .../acceptance/ethereum/PragueAcceptanceTestHelper.java | 4 ++++ .../methods/engine/AbstractEngineNewPayload.java | 9 ++++++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/ethereum/CodeDelegationTransactionAcceptanceTest.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/ethereum/CodeDelegationTransactionAcceptanceTest.java index ee896ccd278..72937afb59d 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/ethereum/CodeDelegationTransactionAcceptanceTest.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/ethereum/CodeDelegationTransactionAcceptanceTest.java @@ -140,8 +140,8 @@ public void shouldTransferAllEthOfAuthorizerToSponsor() throws IOException { */ @Test public void shouldCheckNonceAfterNonceIncreaseOfSender() throws IOException { - final long GAS_LIMIT = 1000000L; - cluster.verify(authorizer.balanceEquals(Amount.ether(90000))); + final long GAS_LIMIT = 1_000_000L; + cluster.verify(authorizer.balanceEquals(Amount.ether(90_000))); final CodeDelegation authorization = org.hyperledger.besu.ethereum.core.CodeDelegation.builder() @@ -159,7 +159,7 @@ public void shouldCheckNonceAfterNonceIncreaseOfSender() throws IOException { .type(TransactionType.DELEGATE_CODE) .chainId(BigInteger.valueOf(20211)) .nonce(0) - .maxPriorityFeePerGas(Wei.of(1000000000)) + .maxPriorityFeePerGas(Wei.of(1_000_000_000)) .maxFeePerGas(Wei.fromHexString("0x02540BE400")) .gasLimit(GAS_LIMIT) .to(Address.fromHexStringStrict(authorizer.getAddress())) @@ -209,7 +209,7 @@ public void shouldCheckNonceAfterNonceIncreaseOfSender() throws IOException { .nonce(2) .maxPriorityFeePerGas(Wei.of(10)) .maxFeePerGas(Wei.of(100)) - .gasLimit(21000) + .gasLimit(21_000) .to(Address.fromHexStringStrict(otherAccount.getAddress())) .value(Wei.ONE) .payload(Bytes.EMPTY) diff --git a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/ethereum/PragueAcceptanceTestHelper.java b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/ethereum/PragueAcceptanceTestHelper.java index 754e28165c8..dfc5989e647 100644 --- a/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/ethereum/PragueAcceptanceTestHelper.java +++ b/acceptance-tests/tests/src/test/java/org/hyperledger/besu/tests/acceptance/ethereum/PragueAcceptanceTestHelper.java @@ -98,6 +98,10 @@ public void buildNewBlock() throws IOException { executionPayload.toString(), parentBeaconBlockRoot, executionRequests.toString())); try (final Response newPayloadResponse = newPayloadRequest.execute()) { assertThat(newPayloadResponse.code()).isEqualTo(200); + + final String responseStatus = + mapper.readTree(newPayloadResponse.body().string()).get("result").get("status").asText(); + assertThat(responseStatus).isEqualTo("VALID"); } final Call moveChainAheadRequest = createEngineCall(createForkChoiceRequest(newBlockHash)); diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java index f3ce31b098e..fc3ca7f5465 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java @@ -69,7 +69,6 @@ import java.util.List; import java.util.Optional; import java.util.stream.Collectors; -import java.util.stream.IntStream; import io.vertx.core.Vertx; import io.vertx.core.json.Json; @@ -587,8 +586,12 @@ private Optional> extractRequests(final Optional> may return maybeRequestsParam.map( requests -> - IntStream.range(0, requests.size()) - .mapToObj(i -> new Request(RequestType.of(i), Bytes.fromHexString(requests.get(i)))) + requests.stream() + .map( + s -> { + final Bytes request = Bytes.fromHexString(s); + return new Request(RequestType.of(request.get(0)), request.slice(1)); + }) .collect(Collectors.toList())); } From 61ea63ad3910152f579fc730051f23117bade263 Mon Sep 17 00:00:00 2001 From: Daniel Lehrner Date: Mon, 13 Jan 2025 15:47:58 +0100 Subject: [PATCH 6/7] fix test by fixing request object creation Signed-off-by: Daniel Lehrner --- .../internal/methods/engine/EngineNewPayloadV4Test.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV4Test.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV4Test.java index fe7c38917c3..480ad7c5bd7 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV4Test.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV4Test.java @@ -168,7 +168,10 @@ protected JsonRpcResponse resp(final EnginePayloadParameter payload) { final List requestsWithoutRequestId = VALID_REQUESTS.stream() .sorted(Comparator.comparing(Request::getType)) - .map(r -> r.getData().toHexString()) + .map(r -> Bytes.concatenate( + Bytes.of(r.getType().getSerializedType()), + r.getData() + ).toHexString()) .toList(); Object[] params = maybeParentBeaconBlockRoot From ed3abc74fe1bd04f7d68ffb7642e613f1b620ac2 Mon Sep 17 00:00:00 2001 From: Daniel Lehrner Date: Mon, 13 Jan 2025 16:06:17 +0100 Subject: [PATCH 7/7] spotless Signed-off-by: Daniel Lehrner --- .../internal/methods/engine/EngineNewPayloadV4Test.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV4Test.java b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV4Test.java index 480ad7c5bd7..32c879a0156 100644 --- a/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV4Test.java +++ b/ethereum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV4Test.java @@ -168,10 +168,10 @@ protected JsonRpcResponse resp(final EnginePayloadParameter payload) { final List requestsWithoutRequestId = VALID_REQUESTS.stream() .sorted(Comparator.comparing(Request::getType)) - .map(r -> Bytes.concatenate( - Bytes.of(r.getType().getSerializedType()), - r.getData() - ).toHexString()) + .map( + r -> + Bytes.concatenate(Bytes.of(r.getType().getSerializedType()), r.getData()) + .toHexString()) .toList(); Object[] params = maybeParentBeaconBlockRoot