KomodoPlatform / zebra

An ongoing Rust implementation of a Komodo node. 🦓
Apache License 2.0
3 stars 5 forks source link

Implement functional tests for dPoW code preventing forks below last notarized height #39

Open dimxy opened 1 year ago

dimxy commented 1 year ago

Add tests which allow to create forks below and over the last nota and check results appropriately

dimxy commented 1 year ago

Some tests were added in #2. TODO: more tests with configurable forks and notas

dimxy commented 1 year ago

closed by #45 (more NN tests were added)

dimxy commented 1 year ago

Rare notarisation tests failures were discovered. This was fixed in this the https://github.com/KomodoPlatform/zebra/pull/47 PR, which extends the partial chain creation code to allow that generated utxos spend not random but specific utxos (f.e. namely notary inputs): see the 'known_utxos new param. Without that PR partial chains may be rarely created with invalid test notas and tests like komodo_forked_notarised_chains_3 or komodo_forked_notarised_chains_4 can also rarely fail (when a test nota being is not found in the chain). If this happens check that PR with known_utxos param in fix_generated_transaction is added.