Since version 0.26.9 does `getblock` always return the final block?
NikitaIT opened this issue · comments
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
.
No. We should check isfinaltransaction
separately.