fix(specs): raise block_distance_for_finalized_data for probabilistic-finality chains - #2316
fix(specs): raise block_distance_for_finalized_data for probabilistic-finality chains#2316yagop wants to merge 1 commit into
Conversation
…-finality chains Values below real reorg depth let orphaned blocks be treated as finalized: replies are cached as immutable and honest providers signing conflicting hashes look fraudulent to the conflict module. For integrators this risks double-credited transactions and data loss. DOGE 1->40, LTC 1->13, BCH 1->15, TRX 4->20, POLYGON 1->10, FVM 1->5, BSC 0->3 (testnet-2 bch/bsc aligned; tron already 20).
PR Summary by QodoRaise finalized-block distance for probabilistic-finality chain specs
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
Code Review by Qodo
1. block_distance_for_finalized_data docs missing
|
|
Note for maintainers: AGENTS.md says Related field worth considering as a follow-up: |
…ty chains Values below real reorg depth let orphaned blocks be treated as finalized: cached as immutable and honest providers signing conflicting hashes look fraudulent to the conflict module. Risks double-credited transactions and data loss for integrators. DOGE 1->40, LTC 1->13, BCH 1->15, POLYGON 1->10, FVM 1->5, BSC 0->3. Mirrors lavanet/lava#2316 (TRON already at 20 here).
…ty chains Values below real reorg depth let orphaned blocks be treated as finalized: cached as immutable and honest providers signing conflicting hashes look fraudulent to the conflict module. Risks double-credited transactions and data loss for integrators. DOGE 1->40, LTC 1->13, BCH 1->15, POLYGON 1->10, FVM 1->5, BSC 0->3. Mirrors lavanet/lava#2316 (TRON already at 20 here).
Problem
Several specs set
block_distance_for_finalized_databelow the real reorg depth of the chain.IsFinalizedBlockthen treats reorgable blocks as finalized, so:Changes
eth_blockNumber(head); BEP-126 finality needs ~2–3 blockstestnet-2
bch/bscupdated to match (itstronalready used 20). Solana left at 0: itsGET_BLOCKNUMusesgetLatestBlockhashwithfinalizedcommitment.Tradeoff: finalized-data lag grows by
distance × average_block_timeper chain.Validated with
go test ./x/spec/keeper/ -run TestSpecs.Fixes #2317