- C-1 CRITICAL: verifyBLSAggregate now deserializes via bls.SignatureFromBytes
- C-2 HIGH: CertBundle.Verify panics (use VerifyWithKeys instead)
- C-3 HIGH: VerifyCompressed renamed to validateCompressedStructure
- createVerkleCommitment now returns error (bounds check on stateRoot)
- compressPath bounds check for short stateRoot
- Regression tests for all fixes
buildVoteDigest iterates votes map[string]int with range which is
non-deterministic in Go. Different iteration orders produce different
SHA-256 digests, causing HMAC verification failures between nodes.
Sort validator keys before hashing.
- quasar.go: rename loop vars to avoid shadowing receiver in 5 loops
(blsSigner for blsSigners, share for coronaShares)
- witness.go: rename errors channel to errs (shadows builtin),
add bounds check in createVerkleCommitment for short stateRoot
- gpu_batch_pipeline.go: Metrics() returns p.metrics pointer instead
of zero-valued struct
Remediation of Dragonfire security review findings:
- F-002: Replace bytes.Equal with subtle.ConstantTimeCompare in witness.go
- Fix silent error drop in DualSignRound1 (Corona error now propagated)
- Replace SHA256 commitments with HMAC-SHA256 keyed certs in bls.go
- Add CertBundle.VerifyWithKeys() for cryptographic HMAC verification
- Add Message field to CertBundle for verification context
- Extract buildVoteDigest() to fix map-iteration non-determinism
- Add 3 security regression tests + 3 HMAC verification tests
- Update README directory tree to match actual codebase
- Fix nested lock (t.mu -> c.mu) deadlock in handleVote, buildBlocksLocked,
and processPendingBlocks by releasing t.mu before calling consensus methods
- Add sync.WaitGroup for proper goroutine lifecycle in Start/Stop
- Add reject vote tracking with quorum-based rejection
- Return error for duplicate block additions in ChainConsensus.AddBlock
- Remove all debug fmt.Printf statements
- Add defer engine.Stop(ctx) to all tests that call Start() to prevent
goroutine leaks
- Fix tests calling buildBlocksLocked to hold mu.Lock as expected
- Fix race in Transitive.Start() by passing context to goroutines
instead of accessing struct field directly
- Add atomic operations to trackingMockBlock for thread-safe
Accept/Reject call counting in tests
- Add race detector build tags to skip performance timing checks
in quasar tests when running with -race flag (10-20x overhead)
Implement proper fusion signature in createHorizonSignature:
- Create 64-byte signature: 32-byte BLS hash + 32-byte PQ hash
- Hash checkpoint and validators into message
- Apply key-derived signatures for both components
- Document that full threshold signing uses Quasar.hybridConsensus
Update tests to verify:
- Correct signature length (64 bytes)
- Deterministic output
- Different inputs produce different signatures
Also includes GPU batch pipeline for consensus engine.
- Remove unused packages: engine/dag/{getter,bootstrap,vertex/vertexmock},
engine/pq/{bootstrap,block}, core/{tracker,verify}
- Add sync.RWMutex to protocol/wave for thread-safe map access
- Increase engine/dag test coverage from 11.7% to 98.3%
- Add comprehensive tests for DAG consensus, vertex, and engine
- All 27 packages pass tests, 16 at 100% coverage
- Start chain processor when new chains are dynamically registered,
fixing TestQuantumSecurityForAllChains test failure
- Add pyproject.toml with Cython build dependency for proper PEP 517 builds
- Simplify SDK verification workflow Python install step
- Add types.go with unified Block, BlockCert, Engine, Stats types
- Add quasar_impl.go with Engine interface implementation (quasarEngine)
- Simplify PChainQuasar with single Block type (deprecate QBlock alias)
- Add ChainBlock alias for backward compatibility in aggregator
- Update engine/pq/consensus.go to use new BlockCert type
- Fix test files to use *Block instead of QBlock value type
- All tests pass
Type changes:
- Block.BlockID -> Block.ID (consistent with ChainBlock.ID)
- QBlock = Block (deprecated alias)
- ChainBlock = Block (aggregator alias)
- BlockCert replaces inline Cert struct
- Consolidated Block and FinalizedBlock types into horizon.go
- Renamed Quasar->PChainQuasar, New->NewPChainQuasar in quasar.go for P-Chain
- Updated engine/pq to use PChainQuasar
- Simplified event_horizon.go to utility functions only
- Fixed test function naming conflicts
Update protocol components to work with new Lux consensus:
- Quasar: Post-quantum consensus overlay
- BFT: Storage handling for Byzantine fault tolerance
These changes ensure compatibility with the new LuxConsensus engine
and remove any remaining Snowball dependencies.
The crypto package's Sign() now returns (Signature, error) instead of
just Signature. Update all calls to handle the error return value.
Fixes compilation errors in quasar hybrid consensus.
- Change ContextInitializable.InitCtx to accept *consensusctx.Context
- Change Contextualizable.InitializeContext to accept *consensusctx.Context
- Update XAssetID, QuantumNetworkID, GetQuantumIDs to use *consensusctx.Context
- Matches upstream avalanchego pattern where Context is consensus-specific type
- Add proper build tags for CGO vs non-CGO builds
- Create pure Go consensus implementation when CGO disabled
- Fix platform-specific ZMQ library paths for ARM64 Macs
- Add missing types and interfaces to blocktest and chaintest
- Create validatorsmock.State for testing
- Fix status type conflicts between choices.Status and uint8
- Ensure all tests pass with both CGO_ENABLED=0 and CGO_ENABLED=1
- Added Compare method to Application version for compatibility
- Fixed Timestamp type from int64 to time.Time in chain.Block interface
- Added missing Parent() method to meterBlock
- Changed msgChan type from 'chan interface{}' to 'interface{}'
- Fixed VM Initialize signatures to use interface{} types
- Updated version imports from node/version to consensus/version
- Added Transaction interface and updated DAG types
- Fixed assignOp issues: replaced x = x + y with x += y
- Fixed deprecated GetSubnetID to use GetNetID
- Added error check for verkle witness SetBytes
- Added nolint comment for simulation randomness (not security-critical)
- Formatted all Go code with gofmt
- Fix test method signatures to match actual interfaces
- Remove tests for non-existent methods
- Fix config validation for testnet/local/xchain parameters
- Simplify DAG and PQ engine tests to match actual implementations
- Remove validator manager tests (no Manager type exists)
- Fix SA4031 nil check error in engine/pq/consensus.go by replacing unreachable nil check with proper certificate validation
- Fix SA9003 empty branch error in engine/pq/engine_test.go by adding meaningful log statement
- Fix integer overflow G115 in quasar.go by avoiding conversion of addition result
- Separate deprecated GetSubnetID export to avoid SA1019 in main exports
- Format all Go files with gofmt
- All tests still passing with 100% success rate