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 safe and finalized block tags support #853

Merged

Conversation

tgmichel
Copy link
Contributor

Adds Safe and Finalized variants to BlockNumber, being currently introduced as part of the Merge. This expands the already existing support for earliest, pending and latest.

In the Merge there is a difference between what's considered a safe finality checkpoint, and the finalized checkpoint, being the later the one we can assume is very unlikely to be re-orged.

In Polkadot - and this applies for parachains and for PoS substrate-based chains - a block is considered finalized once enough validators agreed on it, so I added safe checkpoint mostly as an alias to finalized and for both we use BlockchainInfo::finalized_hash.

Note: also bumped web3 library to the most recent release candidate version which includes support for this tags.

@tgmichel tgmichel requested a review from sorpaas as a code owner September 14, 2022 15:23
@sorpaas sorpaas merged commit fe12fdd into polkadot-evm:master Sep 20, 2022
abhijeetbhagat pushed a commit to web3labs/frontier that referenced this pull request Jan 11, 2023
* Add `safe` and `finalized` block tags support

* prettier
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