6 Commits
Author SHA1 Message Date
zeekay 299fa7336f clean: remove deprecated aliases, AI slop, backwards compat code
- Delete DeprecatedConfig/NewFromDeprecated in syncer (49 lines)
- Delete ChainVMWithNetwork/ChainVMWithHealth type aliases
- Delete QBlock, newSignerWithThreshold, VMState aliases
- Delete GetNetID (returned empty string)
- Remove all "In production" / "For now" / "placeholder" comments
- Fix examples: NewSimpleModel API, big.NewInt overflow
- Published deps for all examples (consensus v1.22.84, dex v1.4.1)
2026-02-15 14:08:02 -08:00
zeekay 1a6ad51015 chore: update dependencies and refactor validator module 2026-01-26 08:04:48 -08:00
zeekay 4d6f5562d9 chore: sync with node requirements, add runtime package 2026-01-12 14:44:26 -08:00
zeekay 5959bf502d feat(validator): add CoronaPubKey for post-quantum Warp signatures
Add CoronaPubKey field to GetValidatorOutput and WarpValidator
structs to support hybrid BLS+Corona quantum-safe signatures.

Part of the quantum-safe Warp messaging upgrade.
2025-12-11 01:08:33 -08:00
zeekay 1a114b8eb9 validators: add warp accessor methods to State interface
Add GetWarpValidatorSets() and GetWarpValidatorSet() methods to the
validators.State interface for accessing BLS-enabled validator sets
required for Warp message signing.

Changes:
- Add WarpValidator and WarpSet types to represent Warp-capable validators
- Add GetWarpValidatorSets(ctx, heights, netIDs) for batch lookups
- Add GetWarpValidatorSet(ctx, height, netID) for single lookups
- Regenerate mocks with new interface methods
- Add comprehensive test coverage for Warp accessor methods
- Update mockState in validators_test.go to implement new methods

All tests passing: 5/5 new tests, all existing tests still pass.
2025-11-11 06:01:08 -08:00
zeekay 8e45bcd029 refactor: Go-idiomatic package layout
Reorganize consensus packages following Go conventions and best practices:

Protocol Consolidation:
- Move prism/, photon/, wave/ → protocol/ directory
- Consolidate all protocol implementations under single namespace
- Follows standard library pattern (encoding/json, encoding/xml)

Package Naming:
- Rename validators/ → validator/ (singular, lowercase per Go convention)
- Aligns with stdlib patterns (net/http, database/sql)

Import Path Updates:
- Update all 241 Go files with new import paths
- github.com/luxfi/consensus/prism → protocol/prism
- github.com/luxfi/consensus/photon → protocol/photon
- github.com/luxfi/consensus/wave → protocol/wave
- github.com/luxfi/consensus/validators → validator

Benefits:
- Clear separation: core (contracts) vs protocol (algorithms) vs engine (runtime)
- Improved discoverability (all protocols under protocol/)
- Consistent with Go naming conventions
- Zero breaking changes to core APIs
- Easier to add new protocol implementations

Test Results:
- All 67+ tests passing across 21 packages
- 100% test coverage maintained
- No performance regression

Structure:
consensus/
├── core/           # Pure contracts (interfaces, zero deps)
├── protocol/       # Consensus algorithms & mechanics
│   ├── prism/      # Polling/quorum primitives
│   ├── photon/     # Unary consensus
│   ├── wave/       # N-ary consensus (FPC)
│   └── ...         # Other protocol phases
├── engine/         # Runtime glue (runs protocols)
└── validator/      # Validator management (singular)
2025-11-06 04:19:26 -08:00