Bitcoin-ABC / bitcoin-abc

Bitcoin ABC develops node software and infrastructure for the eCash project. This a mirror of the official Bitcoin-ABC repository. Please see README.md
https://reviews.bitcoinabc.org
MIT License
1.24k stars 781 forks source link

Since version 0.26.9 does `getblock` always return the final block? #516

Closed NikitaIT closed 1 year ago

NikitaIT commented 1 year ago

With Avalanche Post-Consensus, there is now a secure way to verify customer deposits, using the Avalanche finalization status instead of “number of confirmations”. This will also cause deposits to be finalized with only 1 block confirmation. This will enhance exchange security by preventing re-org attacks and increase customer satisfaction by reducing deposit confirmation times. It will also enable easier arbitrage for traders, driving more volume and liquidity to the exchange. Happier customers are good for exchanges.

To start benefitting from Post-Consensus, exchanges should set up their eCash node to run Avalanche, and use the new isfinaltransaction RPC command to check whether deposits have been finalized or not. The isfinaltransaction RPC is forwards-compatible with future Avalanche upgrades.

Do I understand correctly that in the current version (0.26.9-...) listening to blocks (getblock/getblockheader) always returns the final block and no additional check is needed(like isfinaltransaction/isfinalblock)?

And after Pre-Consensus release we can call isfinaltransaction without waiting new block with getblock.

NikitaIT commented 1 year ago

No. We should check isfinaltransaction separately.