Skip to content

Commit d5faab8

Browse files
committed
finality explanation
1 parent 097a835 commit d5faab8

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

docs/pos/concepts/finality/finality.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
!!! info "5 Second Finality in Polygon"
22

3-
NOTE: With the upgrade to Heimdall v2, deterministic finality on PoS is now achieved in between 2-4 seconds thanks to the 1-2 seconds block time in Heimdall, meaning miletones are voted on and finalized much faster.
3+
NOTE: With the upgrade to Heimdall v2, deterministic finality on PoS is now achieved in between 2-5 seconds thanks to the 1-2 seconds block time in Heimdall, meaning miletones are voted on and finalized much faster.
44

55
## How to Get Finalized Block
66

7-
Simply use the standard `eth_getBlockByNumber` JSON-RPC method with the `"finalized"` block parameter to retrieve information about the most recently finalized block in Polygon PoS. Finalized blocks are considered highly secure and irreversible, making them crucial for applications requiring strong transaction certainty.
7+
Use the standard `eth_getBlockByNumber` JSON-RPC method with the `"finalized"` block parameter to retrieve information about the most recently finalized block in Polygon PoS.
8+
Finalized blocks are considered highly secure and irreversible,
9+
making them crucial for applications requiring strong transaction certainty.
810

911
To get the finalized block, you can use the following JSON-RPC call:
1012

@@ -62,8 +64,8 @@ async function milestones_checkFinality(client: any, txHash: string): Promise<bo
6264
### Results
6365

6466
The results should show whether the transaction has been finalized based on the
65-
selected milestone mechanism and network. Usually Milestones will take 2-4
66-
seconds to finalize the transaction.
67+
selected milestone mechanism and network.
68+
Usually Milestones will take 2–5 seconds to finalize the transaction.
6769

6870

6971

@@ -81,16 +83,20 @@ deterministic finality is Ethereum.
8183
With the introduction of milestones:
8284

8385
- Finality is **deterministic** even before a checkpoint is submitted to L1.
84-
For every block produced in the consensus layer, a milestone is proposed and
85-
validated by Heimdall, with supermajority of the voting power by validators.
86-
With a new milestone, all the transactions up to that point are considered final,
87-
with no chance of reorganization.
86+
With the new milestones flow, every validator proposes the local bor blocks'
87+
hashes they see after the last milestone.
88+
This gets done at every Heimdall height, leveraging vote extensions.
89+
Basically, on the consensus layer, at height H, every validator proposes the block hashes
90+
he has produced/imported since the last finalized milestone via vote extensions;
91+
then these vote extensions become available at the next height.
92+
When finalizing heimdall height H+1, Heimdall looks for the longest common sequence of block hashes
93+
from all the validators that have 2/3+ agreement, and that gets finalized as the new milestone.
8894

8995
- Separation of Checkpoints and Milestones: Checkpoints still occur every 256
9096
blocks (minimum) and are submitted to Ethereum. However, milestones provide
91-
much faster finality on Polygon chain, using Heimdall layer for
97+
much faster finality on Polygon Chain, using Heimdall layer for
9298
finalization, improving the user experience significantly.
9399

94100
_Finality achieved after a block confirmation,
95-
as well as a consensus period among the validators (approx. 2-4 seconds)_
101+
as well as a consensus period among the validators (approx. 2–5 seconds)_
96102

0 commit comments

Comments
 (0)