Skip to content

eth/gasprice: multipled by the oracle.percentile for element in gasprice results slice #31627

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

Closed
wants to merge 1 commit into from

Conversation

ewagmig
Copy link

@ewagmig ewagmig commented Apr 13, 2025

fix the percentile for price result in slice

fix the percentile for price result in slice
@ewagmig
Copy link
Author

ewagmig commented Apr 13, 2025

#31626

@ewagmig ewagmig marked this pull request as ready for review April 13, 2025 11:51
@fjl fjl added this to the 1.15.9 milestone Apr 18, 2025
@rjl493456442
Copy link
Member

Why is this considered incorrect? In the original implementation, we sampled recent blocks, collected the gas price of each individual transaction, and returned a specific value based on the desired percentile.

e.g., if we sample the recent 3 blocks, each of them have 3 txs,
the result slice will be [p1, p2, ...., p9], sorted by gas price.
If it's 50%, then we return the results[4]

@rjl493456442 rjl493456442 removed this from the 1.15.9 milestone Apr 19, 2025
@rjl493456442
Copy link
Member

I think the original approach is correct, so I’ll go ahead and close this for now.

Feel free to reopen it if you think there’s a need for further discussion.

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.

3 participants