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

fix fee history #9940

Closed

Conversation

loocapro
Copy link
Contributor

Closes #9903

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

I absolutely love this endpoint hehe

Comment on lines 164 to 165
let pending_block_hash = if is_pending_block {
if let Some(pending_block) = self.block(BlockNumberOrTag::Pending.into()).await? {
Copy link
Collaborator

Choose a reason for hiding this comment

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

we can make this slightly nicer by storing the pending block as an option and effectively collapse these two checks

as discussed also need to use

fn load_block_and_receipts(

because we need the receipts as well, because we need them for the rewards

this issue is somewhat related here but not a blocker

#9948

@@ -154,11 +155,23 @@ pub trait EthFees: LoadFee {
base_fee_per_blob_gas.push(last_entry.next_block_blob_fee().unwrap_or_default());
} else {
Copy link
Collaborator

Choose a reason for hiding this comment

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

there are two modes in this impl, one where everything is cached,, the if branch of this else branch, in which we'd also need to add an additional entry for the pending block.

so it would make sense to calculate the pending things above the if statement and then update the fee entries or the non-cached mode accordingly

@mattsse mattsse added C-bug An unexpected or incorrect behavior A-rpc Related to the RPC implementation labels Jul 31, 2024
@mattsse mattsse marked this pull request as ready for review July 31, 2024 22:22
@onbjerg onbjerg self-assigned this Aug 5, 2024
@DmytroShalaiev
Copy link

Any updates on this issue?

@onbjerg
Copy link
Member

onbjerg commented Aug 12, 2024

Yes, I am going to get this over the line, sorry for the delay

@DmytroShalaiev
Copy link

Any updates on review ?

@emhane
Copy link
Member

emhane commented Sep 20, 2024

think @onbjerg means he will push changes to the branch and get your commits in along with his to push this over the line

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

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

this drifted too much and needs a new attempt at fixing it

@mattsse mattsse closed this Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc Related to the RPC implementation C-bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[RPC] eth_feeHistory support pending block tag
5 participants