Zebra/zebra-state/src
teor f9c90b3d86
Implement best tip block hashes for ChainTip receivers (#2677)
* Always prefer the non-finalized tip in ChainTipSender

This significantly simplifies the internal implementation of ChainTipSender.

Also make the methods and types a bit more generic.

* Update ChainTipSender with blocks, not heights

Also fix a bug where queued non-finalized blocks would clear the chain tip.

* Provide a best tip hash in ChainTip receivers

* Skip finalized blocks once the non-finalized state is active

* Add tip hash and NoChainTip tests

* Remove a redundant finalized tip update

* Skip `None` updates to the finalized tip

The finalized and non-finalized tips never update to `None`
once they have added at least one block.

* Stop committing finalized queued blocks if there is an error

Also return the highest committed queued block.

Co-authored-by: Janito Vaqueiro Ferreira Filho <janito.vff@gmail.com>
2021-08-27 19:18:47 +00:00
..
service Implement best tip block hashes for ChainTip receivers (#2677) 2021-08-27 19:18:47 +00:00
tests ZIP-221/244 auth data commitment validation in checkpoint verifier (#2633) 2021-08-23 14:17:33 +00:00
arbitrary.rs Add value pool/balances to non-finalized state (#2656) 2021-08-25 10:57:07 -03:00
config.rs Construct structs with ..default() to avoid a lint 2021-01-19 11:02:20 -05:00
constants.rs Add value pools to FinalizedState (#2599) 2021-08-19 13:55:36 -03:00
error.rs Add value pool/balances to non-finalized state (#2656) 2021-08-25 10:57:07 -03:00
lib.rs Refactor BestTipHeight into a generic ChainTip sender and receiver (#2676) 2021-08-27 11:34:33 +10:00
request.rs Add value pool/balances to non-finalized state (#2656) 2021-08-25 10:57:07 -03:00
response.rs move `Utxo` type to zebra-chain (#2481) 2021-07-12 12:49:33 +10:00
service.rs Implement best tip block hashes for ChainTip receivers (#2677) 2021-08-27 19:18:47 +00:00
tests.rs ZIP-221 and ZIP-244 commitment validation in non-finalized state (#2609) 2021-08-17 11:49:27 -03:00
util.rs swap best_chain_len and related constants to u32 for consistency (#1257) 2020-11-06 14:00:10 +10:00