Skip to content
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

feat: implement eth_feeHistory API method. #2221

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

saeed-zil
Copy link
Contributor

No description provided.

@saeed-zil saeed-zil linked an issue Jan 23, 2025 that may be closed by this pull request
@saeed-zil saeed-zil self-assigned this Jan 23, 2025
@saeed-zil saeed-zil marked this pull request as draft January 23, 2025 20:52
Copy link
Contributor

github-actions bot commented Jan 23, 2025

🐰 Bencher Report

Branch1512-implement-eth_feehistory-to-support-type-2-transactions
Testbedself-hosted
Click to view all benchmark results
BenchmarkLatencyBenchmark Result
milliseconds (ms)
(Result Δ%)
Upper Boundary
milliseconds (ms)
(Limit %)
full-blocks-erc20-transfers/full-blocks-erc20-transfers📈 view plot
🚷 view threshold
1,067.70
(-13.98%)
1,634.08
(65.34%)
full-blocks-evm-transfers/full-blocks-evm-transfers📈 view plot
🚷 view threshold
446.00
(-10.91%)
719.25
(62.01%)
full-blocks-zil-transfers/full-blocks-zil-transfers📈 view plot
🚷 view threshold
4,130.60
(+5.04%)
5,142.49
(80.32%)
process-empty/process-empty📈 view plot
🚷 view threshold
10.34
(+13.62%)
11.43
(90.51%)
🐰 View full continuous benchmarking report in Bencher

@saeed-zil saeed-zil marked this pull request as ready for review January 24, 2025 09:35
…ment-eth_feehistory-to-support-type-2-transactions
zilliqa/src/api/types/eth.rs Outdated Show resolved Hide resolved
zilliqa/src/api/eth.rs Outdated Show resolved Hide resolved
zilliqa/src/api/eth.rs Show resolved Hide resolved
let mut params = params.sequence();
let block_count: u64 = params.next()?;
let newest_block: BlockNumberOrTag = params.next()?;
let reward_percentiles: Option<Vec<f64>> = params.optional_next()?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let reward_percentiles: Option<Vec<f64>> = params.optional_next()?;
let reward_percentiles: Vec<f64> = params.optional_next()?.unwrap_or_default();

to save the extra branching later?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we should avoid including reward in the response if reward_percentiles is absent. Doesn't this imply that we need at least one branch?

zilliqa/src/api/eth.rs Outdated Show resolved Hide resolved
zilliqa/src/api/eth.rs Outdated Show resolved Hide resolved
zilliqa/src/api/eth.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement eth_feeHistory to support type-2 transactions
2 participants