Commit Graph

2 Commits

Author SHA1 Message Date
davidrusu d2f6ad579a
Stake Relativization Specification + Fixes (#86)
* cryptarchia/relative-stake: failing test showing lack of inference

* implement stake-relativization spec

* test total stake inference in empty epoch

* move TestNode to test_common

* fix bug in Follower re-org logic

* improve orphan proof test coverage

* force orphans to already have been in one of the existing branches

* rename initial_inferred_total_stake ==> initial_total_stake

* add simple orphan import test

* Follower.unimported_orphans: ensure no orphans from same branch

* remove unnecessary LedgerState.slot

* cryptarchia: doc fixes

* factor out total stake inference

* docs for total stake inference

* rename total_stake to total_active_stake

* replace prints in cryptarchia with logging.logger
2024-03-23 05:50:00 +04:00
davidrusu 2d3f463bb7
cryptarchia: Update epoch stabilization schedule to 334 (from 433) (#79)
* feat(cryptarchia/epoch-schedule): switch to 334 schedule (from 433)

* factor out common test config building code

* feat(cryptarchia): test_leader uses common test config object

* cryptarchia: update test_ledger_state_is_properly_updated_on_reorg

* cryptarchia: update test_epoch_transition test

* move to .tip() in tests instead of tip_id()

* cryptarchia: wrap long comments

* cryptarchia: move mk_block to test_common

* cryptarchia: move mk_genesis_state to test_common

* cryptarchia: refactor fork test to use mk_chain

* cryptarchia: fork choice rules tests use mk_chain helper

* cryptarchia: rename fork choice test suite to TestForkChoice

* cryptarchia: config.s is always 3k/f or 3*base_period_length

* cryptarchia: hardcode epoch schedule in specification

* un-hard code epoch sched. params + provide a v0.0.1 spec for params
2024-03-09 17:34:08 +04:00