Skip to content

Fix fee history with exponential pricing and set ArbOS versions back to 1#108

Merged
rachel-bousfield merged 5 commits intomasterfrom
fee-history-fix
Jun 17, 2022
Merged

Fix fee history with exponential pricing and set ArbOS versions back to 1#108
rachel-bousfield merged 5 commits intomasterfrom
fee-history-fix

Conversation

@PlasmaPower
Copy link
Contributor

No description provided.

Base automatically changed from remove-tips to master June 14, 2022 17:57
Copy link
Contributor

@rachel-bousfield rachel-bousfield left a comment

Choose a reason for hiding this comment

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

The consensus changes look great, but there's some minor changes needed for the RPC


// In vanilla geth, this RPC returns the gasUsed ratio so a client can infer how the basefee will change
// To emulate this, we translate the compute rate into something like that, centered at an analogous 0.5
fullnessAnalogue := float64(blockGasUsed) / float64(speedLimit) / float64(timeSinceLastBlock) / 2.0
Copy link
Contributor

Choose a reason for hiding this comment

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

timeSinceLastBlock could be 0

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've attempted to resolve this by keeping a running total of the current timestamp, instead of the current block. It's not perfect but I think it's a good method.

Copy link
Contributor

@rachel-bousfield rachel-bousfield left a comment

Choose a reason for hiding this comment

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

LGTM

@rachel-bousfield rachel-bousfield merged commit 7e332b7 into master Jun 17, 2022
@rachel-bousfield rachel-bousfield deleted the fee-history-fix branch June 17, 2022 15:05
Tristan-Wilson pushed a commit that referenced this pull request May 22, 2023
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.

2 participants