mirror of
https://github.com/vacp2p/status-linea-besu.git
synced 2026-01-08 21:38:15 -05:00
Exclude empty requests from requests hash (#8036)
* exclude empty requests from requests hash Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * 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 <simon.dudley@consensys.net> * fix test Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * fix prague tests: change request hash, reorder json elements Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * fix extracting of request for new payload Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * fix test by fixing request object creation Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * spotless Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * set request type to only one byte, fixed creation of request list in T8nExecutor Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> * fix expected json output to exclude empty requests Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> --------- Signed-off-by: Daniel Lehrner <daniel.lehrner@consensys.net> Signed-off-by: Simon Dudley <simon.dudley@consensys.net> Co-authored-by: Simon Dudley <simon.dudley@consensys.net>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -31,7 +31,6 @@ public class HashTest {
|
||||
public void shouldGetExpectedValueForEmptyRequestsHash() {
|
||||
assertThat(Hash.EMPTY_REQUESTS_HASH)
|
||||
.isEqualTo(
|
||||
Hash.fromHexString(
|
||||
"0x6036c41849da9c076ed79654d434017387a88fb833c2856b32e18218b3341c5f"));
|
||||
Hash.fromHexString("e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user