-
Notifications
You must be signed in to change notification settings - Fork 622
bsc-api-list.md: update fast finality #648
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,36 @@ Finality is a crucial aspect of blockchain security, ensuring that once a block | |
|
||
### Probabilistic Finality and Economic Finality | ||
|
||
In probabilistic finality, the deeper a block is buried in the chain, the lower the likelihood of it being reverted. The more blocks follow a particular block, the more likely the chain containing that block will be the longest. **Typically, BSC users should wait for at least 11 or 15 different validators to seal a block. If validators are allowed to produce multiple consecutive blocks, the number of blocks required to achieve probabilistic finality is approximately 11\*n or 15\*n, where "n" is the number of consecutive blocks produced.** | ||
BNB Smart Chain (BSC) implements a dual-layer finality mechanism combining **Economic Finality** and **Probabilistic Finality** to ensure transaction security and network efficiency. | ||
|
||
Economic Finality refers to the high cost associated with reverting a block. In proof-of-stake systems that use a slashing mechanism (such as Casper FFG, Tendermint, or BSC Fast Finality), if validators violate the voting rules, part or all of their stake can be forfeited. This economic penalty makes it extremely expensive to undermine finality. Generally, block n achieves economic finality by block n+2, meaning that BSC Fast Finality reduces the confirmation time to two blocks in most cases. This improves the user experience by making transaction confirmation faster and more reliable. | ||
#### Economic Finality (Fast Finality) | ||
|
||
The **Fast Finality** feature, introduced through **BEP-520**, enables Economic Finality using a slashing mechanism similar to Casper FFG and Tendermint. Key characteristics: | ||
|
||
- **Block n achieves economic finality by block n+2** | ||
- Transaction finality time: **~3.75 seconds** (reduced from 7.5 seconds) | ||
zlacfzy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- Economic penalties make block reversal extremely expensive | ||
- Validators violating voting rules forfeit part or all of their staked assets | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. part or all |
||
|
||
This significantly improves user experience through faster and more reliable transaction confirmations. | ||
|
||
#### Probabilistic Finality (Fallback Mechanism) | ||
|
||
When Fast Finality is unavailable, BSC falls back to **Probabilistic Finality**. Security increases as more blocks are added - the deeper a block is buried, the lower the probability of reversal. | ||
|
||
**Network Parameters:** | ||
- **TurnLength**: 8 (consecutive blocks per validator) | ||
- **ValidatorSize**: 21 (total active validators) | ||
- **Block Time**: ~1.5 seconds | ||
|
||
**Finality Requirements:** | ||
- **>1/2 validator confirmations**: 88 blocks (11 × 8) ≈ **132 seconds** | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] To improve clarity, label this threshold as “Majority (>1/2)” and the next line as “Supermajority (>2/3)” so readers immediately understand the consensus levels. Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||
- **>2/3 validator confirmations**: 120 blocks (15 × 8) ≈ **180 seconds** | ||
|
||
**Formula**: `Required Blocks = n × TurnLength` | ||
- Where **n** = 11 (majority) or 15 (supermajority consensus) | ||
|
||
This dual-layer approach ensures network security and finality guarantees even when Fast Finality encounters issues. | ||
|
||
### Economic Finality API | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BEP-520
-->
BEP-126