- Add lux_chain_new(), lux_chain_new_default(), lux_chain_destroy()
- Add lux_chain_start(), lux_chain_stop(), lux_chain_add_block()
- Update test suite to use new simplified API
- Fix struct field references (block_table, stats fields)
- All C tests now passing (10/10)
This completes the C SDK migration to v1.22.0.
Fixed SimpleConsensus.Vote() to set finalized=true even when block
is already accepted. Previously, only the first node to vote would
finalize, causing tests to fail with only 1/N nodes finalized.
Changes:
- Modified Vote() to separate block acceptance from finalization
- Now sets finalized=true for any valid block, regardless of status
- Added network-wide finalization check with 50% threshold
- Implemented parallel polling (10% of nodes per round) for faster convergence
Results:
- TestRandomizedConsistency: PASS (1 round convergence)
- TestPropertyBasedConsensus: ALL PASS
- TestConsensusAtScale: PASS (up to 1000 nodes)
- TestChaosConsensus: PASS
Outstanding: TestNetworkScalability and TestDAGConsensus use different
simulation framework and require separate investigation.