-
Notifications
You must be signed in to change notification settings - Fork 897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EIP - 4844 #5536
EIP - 4844 #5536
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
got 1/3 through! can we remove the ssz tuweni snapshot lib?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some more comments :)
...m/core/src/main/java/org/hyperledger/besu/ethereum/core/encoding/BlobTransactionDecoder.java
Outdated
Show resolved
Hide resolved
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/encoding/TransactionDecoder.java
Outdated
Show resolved
Hide resolved
...e/src/main/java/org/hyperledger/besu/ethereum/core/feemarket/TransactionPriceCalculator.java
Show resolved
Hide resolved
@@ -24,7 +24,7 @@ | |||
|
|||
@JsonCreator | |||
public UnsignedLongParameter(final String value) { | |||
this.value = Long.decode(value); | |||
this.value = value != null ? Long.decode(value) : 0; |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException
@@ -188,6 +189,7 @@ | |||
Hash.fromHexString(mixHash), // mixHash | |||
Bytes.fromHexStringLenient(nonce).toLong(), | |||
withdrawalsRoot != null ? Hash.fromHexString(withdrawalsRoot) : null, | |||
dataGasUsed != null ? Long.parseLong(dataGasUsed) : 0, |
Check notice
Code scanning / CodeQL
Missing catch of NumberFormatException
5e2098f
to
51d9ae5
Compare
...um/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/MainnetTransactionValidator.java
Outdated
Show resolved
Hide resolved
datatypes/src/main/java/org/hyperledger/besu/datatypes/Hash.java
Outdated
Show resolved
Hide resolved
evm/src/main/java/org/hyperledger/besu/evm/gascalculator/CancunGasCalculator.java
Outdated
Show resolved
Hide resolved
evm/src/main/java/org/hyperledger/besu/evm/gascalculator/CancunGasCalculator.java
Show resolved
Hide resolved
evm/src/main/java/org/hyperledger/besu/evm/operation/DataHashOperation.java
Outdated
Show resolved
Hide resolved
evm/src/test/java/org/hyperledger/besu/evm/gascalculator/CancunGasCalculatorTest.java
Outdated
Show resolved
Hide resolved
evm/src/test/java/org/hyperledger/besu/evm/operations/DataHashOperationTest.java
Outdated
Show resolved
Hide resolved
plugin-api/src/main/java/org/hyperledger/besu/plugin/data/BlockHeader.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of my comments are nits and non blockers, except the bit about VersionedHash
I think we need to make it type in the datatypes
module and ensure we consistently use it instead of a mix of Hash
and Bytes32
.
evm/src/test/resources/org/hyperledger/besu/evm/precompile/pointEvaluationPrecompile.json
Show resolved
Hide resolved
I've reviewed datatypes, evm, plugin, and build code and I am satisfied. However I have not reviewed any of the code in besu, acceptance-tests, consensus, or ethereum directories as I expect other maintainers are better positioned to review those. Ping me next week if I still need to review those directories. I would tag this as "approved" however that alone would clear it for merge when I feel other areas need different eye, so I'll hold off. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed acceptance-tests, consensus and part of engine API so far.
Requesting changes due to what I believe is a ZeroBaseFeeMarket bug
...tests/tests/src/test/resources/jsonrpc/engine/eip6110/test-cases/06_eip6110_get_payload.json
Show resolved
Hide resolved
ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/RpcMethod.java
Outdated
Show resolved
Hide resolved
.../hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineGetPayload.java
Outdated
Show resolved
Hide resolved
.../hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java
Outdated
Show resolved
Hide resolved
...ore/src/test/java/org/hyperledger/besu/ethereum/mainnet/feemarket/ZeroBaseFeeMarketTest.java
Outdated
Show resolved
Hide resolved
...va/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineGetPayloadV3.java
Outdated
Show resolved
Hide resolved
...va/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/EnginePayloadParameter.java
Outdated
Show resolved
Hide resolved
...ava/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/UnsignedLongParameter.java
Show resolved
Hide resolved
...in/java/org/hyperledger/besu/ethereum/api/jsonrpc/methods/ExecutionEngineJsonRpcMethods.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in progress 52/155, please check my comments
...mon/src/main/java/org/hyperledger/besu/consensus/common/CombinedProtocolScheduleFactory.java
Show resolved
Hide resolved
datatypes/src/main/java/org/hyperledger/besu/datatypes/VersionedHash.java
Outdated
Show resolved
Hide resolved
...rg/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineGetBlobsBundleV1.java
Outdated
Show resolved
Hide resolved
...va/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV3.java
Outdated
Show resolved
Hide resolved
...va/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV3.java
Outdated
Show resolved
Hide resolved
...va/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineNewPayloadV3.java
Outdated
Show resolved
Hide resolved
...va/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/EnginePayloadParameter.java
Show resolved
Hide resolved
...ava/org/hyperledger/besu/ethereum/api/jsonrpc/internal/parameters/UnsignedLongParameter.java
Show resolved
Hide resolved
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
…5663) Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Gabriel-Trintinalia <[email protected]>
* Swap parameters order * Remove method * Move blob validation to EngineNewPayloadV3 class Signed-off-by: Gabriel-Trintinalia <[email protected]>
* fix for genesis mismatch Signed-off-by: spencer-tb <[email protected]> * Fix tests and spotless Signed-off-by: Gabriel-Trintinalia <[email protected]> --------- Signed-off-by: spencer-tb <[email protected]> Signed-off-by: Gabriel-Trintinalia <[email protected]> Co-authored-by: spencer-tb <[email protected]>
* [4844] Fix Data Gas Price Calculation (#1) Signed-off-by: Gabriel-Trintinalia <[email protected]> * Fix spotless Signed-off-by: Gabriel-Trintinalia <[email protected]> * Fix mock unit tests Signed-off-by: Gabriel-Trintinalia <[email protected]> --------- Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
…adV3 (#5683) Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
…leContractResult (#5691) Signed-off-by: Gabriel-Trintinalia <[email protected]>
…ams for invalid versionedHash version (#5690) Signed-off-by: Gabriel-Trintinalia <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another pass
|
||
LOG.atTrace() | ||
.setMessage("blockparam: {}") | ||
.addArgument(() -> Json.encodePrettily(blockParam)) | ||
.log(); | ||
|
||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this required? if yes could you add a comment to explain
@@ -172,7 +198,10 @@ public JsonRpcResponse syncResponse(final JsonRpcRequestContext requestContext) | |||
blockParam.getPrevRandao(), | |||
0, | |||
maybeWithdrawals.map(BodyValidation::withdrawalsRoot).orElse(null), | |||
null, | |||
blockParam.getDataGasUsed() == null ? null : blockParam.getDataGasUsed(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blockParam.getDataGasUsed() == null ? null : blockParam.getDataGasUsed(), | |
blockParam.getDataGasUsed(), |
final EngineCallListener engineCallListener, | ||
final ProtocolSchedule schedule) { | ||
super(vertx, protocolContext, mergeMiningCoordinator, blockResultFactory, engineCallListener); | ||
this.shanghai = schedule.hardforkFor(s -> s.fork().name().equalsIgnoreCase("Shanghai")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to use enums instead of strings here?
@@ -169,10 +171,10 @@ protected BlockCreationResult createBlock( | |||
createPendingBlockHeader(timestamp, maybePrevRandao, newProtocolSpec); | |||
final Address miningBeneficiary = | |||
miningBeneficiaryCalculator.getMiningBeneficiary(processableBlockHeader.getNumber()); | |||
final Wei dataGasPrice = | |||
Wei dataGasPrice = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why no more final?
@@ -228,11 +230,11 @@ protected BlockCreationResult createBlock( | |||
|
|||
throwIfStopped(); | |||
|
|||
final DataGas newExcessDataGas = computeExcessDataGas(transactionResults, newProtocolSpec); | |||
final GasUsage usage = computeExcessDataGas(transactionResults, newProtocolSpec); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usage
is quire generic here, perhaps rename to dataGasUsage
?
@@ -280,8 +285,11 @@ List<Deposit> findDepositsFromReceipts(final TransactionSelectionResults transac | |||
.toList(); | |||
} | |||
|
|||
private DataGas computeExcessDataGas( | |||
TransactionSelectionResults transactionResults, ProtocolSpec newProtocolSpec) { | |||
record GasUsage(DataGas excessDataGas, DataGas used) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to DataGasUsage
?
this work has been ported to https://github.com/jflo/besu/tree/EIP-4844 and already merged into main via #5724 Thanks to all who contributed comments! |
Implements EIP-4844.