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

Add endpoint to get recent gas prices #4191

Closed
wants to merge 1 commit into from

Conversation

davidyuk
Copy link
Member

@davidyuk davidyuk commented Aug 23, 2023

needed to implement aeternity/aepp-sdk-js#1786

At some point, we would have a such blockchain load that won't allow us to mine all submitted transactions with the minimum fee. Then the gas price used to build a transaction would matter. To be able to estimate a reasonable gas price I'm proposing to implement an endpoint on the node side exposing the minimum gas price among the last blocks.

Screenshot 2023-08-23 at 20 01 14

This PR is supported by the Æternity Crypto Foundation

end,
[BlockAmount, GasPrice]
end,
[1, 5, 20, 120, 480]).
Copy link
Member Author

Choose a reason for hiding this comment

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

It should be 3 minutes, 15 minutes, 1 hour, 6 hours, and 1 day respectively.

@davidyuk davidyuk marked this pull request as ready for review August 28, 2023 08:18
Copy link
Member

@hanssv hanssv left a comment

Choose a reason for hiding this comment

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

Looks like a valuable addition, but I'm slightly worried about performance? Any numbers on how this would perform on a crowded chain? Maybe we should cache it? At least we should compute once and forall per generation?

@davidyuk
Copy link
Member Author

I had a plan to calculate it once for a generation, but it is too difficult. Maybe someone can take over this PR? 🙏 This is more POC and API needed for sdk.

@hanssv
Copy link
Member

hanssv commented Feb 26, 2024

Replaced by #4277.

@hanssv hanssv closed this Feb 26, 2024
@davidyuk davidyuk deleted the recent-gas-prices branch February 26, 2024 17:22
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.

None yet

2 participants