[4844] Fix some Devnet9 Hive tests (#5929)

* Return latest valid hash for blob validation
* Fix invalid hash
* Fix null hash
* Change HISTORY_BUFFER_LENGTH
---------

Signed-off-by: Gabriel-Trintinalia <gabriel.trintinalia@consensys.net>
pull/5901/head
Gabriel-Trintinalia 1 year ago committed by GitHub
parent 5830936583
commit 9d7ee2b52b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java
  2. 2
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/ParentBeaconBlockRootHelper.java

@ -130,7 +130,12 @@ public abstract class AbstractEngineNewPayload extends ExecutionEngineJsonRpcMet
try {
maybeVersionedHashes = extractVersionedHashes(maybeVersionedHashParam);
} catch (RuntimeException ex) {
return respondWithInvalid(reqId, blockParam, null, INVALID, "Invalid versionedHash");
return respondWithInvalid(
reqId,
blockParam,
mergeCoordinator.getLatestValidAncestor(blockParam.getParentHash()).orElse(null),
INVALID,
"Invalid versionedHash");
}
final Optional<BlockHeader> maybeParentHeader =
@ -240,7 +245,7 @@ public abstract class AbstractEngineNewPayload extends ExecutionEngineJsonRpcMet
return respondWithInvalid(
reqId,
blockParam,
null,
mergeCoordinator.getLatestValidAncestor(blockParam.getParentHash()).orElse(null),
getInvalidBlockHashStatus(),
blobValidationResult.getErrorMessage());
}

@ -25,7 +25,7 @@ import org.apache.tuweni.units.bigints.UInt256;
public interface ParentBeaconBlockRootHelper {
// Modulus to use for the timestamp to store the root
public static final long HISTORICAL_ROOTS_MODULUS = 8191;
public static final long HISTORICAL_ROOTS_MODULUS = 98304;
public static final Address BEACON_ROOTS_ADDRESS =
Address.fromHexString("0xbEAC020008aFF7331c0A389CB2AAb67597567d7a");

Loading…
Cancel
Save