-
Notifications
You must be signed in to change notification settings - Fork 864
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
eth_feeHistory #2432
eth_feeHistory #2432
Conversation
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthFeeHistory.java
Show resolved
Hide resolved
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthFeeHistory.java
Outdated
Show resolved
Hide resolved
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthFeeHistory.java
Outdated
Show resolved
Hide resolved
...creation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockCreator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
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.
suggestions re: arithmetic and input validation
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthFeeHistory.java
Show resolved
Hide resolved
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthFeeHistory.java
Show resolved
Hide resolved
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthFeeHistory.java
Show resolved
Hide resolved
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthFeeHistory.java
Outdated
Show resolved
Hide resolved
.../test/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthFeeHistoryTest.java
Show resolved
Hide resolved
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthFeeHistory.java
Show resolved
Hide resolved
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthFeeHistory.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.
LGTM, just need to address effectivePriorityFee for legacy transactions post-london
ethereum/core/src/main/java/org/hyperledger/besu/ethereum/core/Transaction.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.
🚢 (after unit tests)
...creation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/AbstractBlockCreator.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
@@ -619,7 +620,7 @@ public KeyPair generateKeyPair() { | |||
private boolean hasTransactions = true; | |||
private TransactionType[] transactionTypes = TransactionType.values(); | |||
private Optional<Address> coinbase = Optional.empty(); | |||
private Optional<Long> baseFee = Optional.empty(); | |||
private Optional<Optional<Long>> maybeBaseFee = Optional.empty(); |
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.
Optional<Optional<Long>>
?
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.
Yeah because we need a way to encode if the basefee is unspecified. This is important for knowing whether to use a default base fee or the optional.empty the caller gives explicitly to the builder.
...reum/api/src/test/java/org/hyperledger/besu/ethereum/api/jsonrpc/JsonRpcHttpServiceTest.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
.../src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/EthFeeHistory.java
Outdated
Show resolved
Hide resolved
I'm just concerned about the performance of this API when blockcount == 500 on calaveras. I wanted to try and after 2 minutes and several thread blocked we have the result. I also wanted to test with a blockcount == 10 starting from the block 6400 and I had 23 seconds. These blocks are filled by transactions What is the blockcount requested in the common case ? |
I think block counts of 500 would be very unusual but 10 sounds reasonable. |
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
How about we silently map anything >10 to 10. We might fail some test cases in hive, but this seems like an acceptable tradeoff for now. |
Signed-off-by: Ratan Rai Sur <ratan.r.sur@gmail.com>
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.
🚢
The spec for this implementation is listed in the issue below.
Fixed Issue(s)
fixes #2430
Changelog