Skip to content

Add safe and finalized block tags support#853

Merged
sorpaas merged 2 commits intopolkadot-evm:masterfrom
moonbeam-foundation:tgm-safe-finalized-tags
Sep 20, 2022
Merged

Add safe and finalized block tags support#853
sorpaas merged 2 commits intopolkadot-evm:masterfrom
moonbeam-foundation:tgm-safe-finalized-tags

Conversation

@tgmichel
Copy link
Copy Markdown
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