zebra/zebra-state/src
Arya 8a786fe6ce
add(consensus): Adds block construction and validation for NU5 from block height 1 for Regtest (#8475)
* Always activate Canopy at Height(1) on Regtest

* Ignores the zip 212 grace period on configured Testnets and Regtest

* - Returns early when there is no Heartwood activation height when creating or updating HistoryTree
- Skips call to `check::legacy_chain()` when no NU5 activation height is set (it would return immediately anyway)
- Replaces `.map()` with `.filter_map()` in `NetworkUpgrade::target_spacings()`
- Removes outdated TODO

* - When proof of work is disabled, skips checking if Zebra is synced to the network tip in the getblocktemplate method

* Sets full_verifier_utxo_lookahead to Height::MIN instead of panicking

* When network is regtest, skips starting sync task and commits the genesis block if it's missing in the state

* updates/fixes test config

* Adds test for committing Canopy blocks on Regtest

* - Updates median time past and difficulty checks to use fewer than 11/17/28 blocks

* uses SLOW_START_INTERVAL of 0 if PoW is disabled, adds TODOs

* Update getblocktemplate method to return reserved chain history activation root hash, uses Nu5 at height 1

Test passes.

* Updates test to expect NU5 as the default nu activation at Height(1)

* Removes invalid difficulty snapshot

* fixes tests

* removes regtest NU5 activation height config field

* Apply suggestions from code review

* Update zebra-state/src/service/check/difficulty.rs

Co-authored-by: Marek <mail@marek.onl>

* Update zebra-state/src/service/check/difficulty.rs

* Updates docs/comments, renames an argument

---------

Co-authored-by: Marek <mail@marek.onl>
2024-05-02 19:43:42 +00:00
..
service add(consensus): Adds block construction and validation for NU5 from block height 1 for Regtest (#8475) 2024-05-02 19:43:42 +00:00
tests change(chain): Remove `Copy` trait impl from `Network` (#8354) 2024-03-19 20:45:27 +00:00
arbitrary.rs
config.rs change(chain): Remove `Copy` trait impl from `Network` (#8354) 2024-03-19 20:45:27 +00:00
constants.rs change(state): Expose ZebraDb methods that can create different kinds of databases (#8002) 2023-11-28 13:49:11 +00:00
error.rs
lib.rs Move history tree and value balance to typed column families (#8115) 2023-12-20 23:20:57 +00:00
request.rs add(rpc): Add block times to verbose output of `getblock` RPC method (#8384) 2024-04-12 20:07:44 +00:00
response.rs add(rpc): Add block times to verbose output of `getblock` RPC method (#8384) 2024-04-12 20:07:44 +00:00
service.rs add(consensus): Adds block construction and validation for NU5 from block height 1 for Regtest (#8475) 2024-05-02 19:43:42 +00:00
tests.rs Fix the position of coinbase tx (#7217) 2023-07-15 16:24:51 +00:00