All notable changes to this module will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Added protobuf message definitions for requests related to sharing state sync metadata and blocks
- Defined the interface for
StateSyncServerModule
,StateSyncModule
(moving the old interface toStateSyncModuleLEGACY
as a reference only) - Overhaul (updates, improvements, clarifications & additions) of the State Sync README
- Removed
ValidatorMap() ValidatorMap
- ValidatorMap uses
Actor
references now
- Updated do use the new centralized config and genesis
Actor
is now a sharedstruct
instead of aninterface
- Removed converters between the interfaces and the consensus structs for Validators
- Consolidated number of validators in tests in a single constant:
numValidators
- Fixed typo in
make test_consensus_concurrent_tests
so that we can run the correct test matrix - Using
GetBus()
instead ofbus
wherever possible LeaderElectionModule
'selectNextLeaderDeterministicRoundRobin
now usesPersistence
to access the list of validators instead of the staticValidatorMap
.
- Unexport
ConsensusModule
fields - Create
ConsensusDebugModule
interface with setter functions to be used only for debugging puroposes - Update test in
TestPacemakerCatchupSameStepDifferentRounds
inpacemaker_test.go
to use setter functions
- Removed unused
consensus.UtilityMessage
- Propagate
highPrepareQC
if available to the block being created - Remove
blockProtoBytes
from propagation inSetProposalBlock
- Guarantee that write context is released when refreshing the utility context
- Use
GetBlockHash(height)
instead ofGetPrevAppHash
to be more explicit - Use the real
quorumCert
when preparing a new block
- Added state sync interfaces and diagrams
- Propagate the
quorumCertificate
onBlock
commit to theUtility
module - Slightly improved error handling of the
utilityContext
lifecycle management
- Removed
apphash
andtxResults
fromconsensusModule
structure - Modified lifecycle to
set
the proposal block within aPersistenceContext
- Allow block and parts to be committed with the persistence context
- Stores transactions alongside blocks during
commit
- Added current block
[]TxResult
to the module
#235 Config and genesis handling
- Updated to use
RuntimeMgr
- Made
ConsensusModule
struct unexported - Updated tests and mocks
- Removed some cross-module dependencies
- Don't ignore the exit code of
m.Run()
in the unit tests
consensusModule
stores block directly to prevent shared structure in theutilityModule
Consensus logic
- Pass in a list of messages to
findHighQC
instead of a hotstuff step - Made
CreateProposeMessage
andCreateVotemessage
accept explicit values, identifying some bugs along the way - Made sure to call
applyBlock
when usinghighQC
from previous round - Moved business logic for
prepareAndApplyBlock
intohotstuff_leader.go
- Removed
MaxBlockBytes
and storing the consensus genesis type locally as is
Consensus cleanup
- Using appropriate getters for protocol types in the hotstuff lifecycle
- Replaced
proto.Marshal
withcodec.GetCodec().Marshal
- Reorganized and cleaned up the code in
consensus/block.go
- Consolidated & removed a few
TODO
s throughout the consensus module - Added TECHDEBT and TODOs that will be require for a real block lifecycle
- Fixed typo in
hotstuff_types.proto
- Moved the hotstuff handler interface to
consensus/hotstuff_handler.go
Consensus testing
- Improved mock module initialization in
consensus/consensus_tests/utils_test.go
General
- Added a diagram for
AppHash
relatedContextInitialization
- Added
Makefile
keywords forTODO
Encapsulate structures previously in shared #163
- Ensured proto structures implement shared interfaces
ConsensusConfig
uses shared interfaces in order to acceptMockConsensusConfig
in test_artifactsConsensusGenesisState
uses shared interfaces in order to acceptMockConsensusGenesisState
in test_artifacts- Implemented shared validator interface for
validator_map
functionality
- Initial implementation of Basic Hotstuff
- Initial implementation Hotstuff Pacemaker
- Deterministic round robin leader election
- Skeletons, passthroughs and temporary variables for utility integration
- Initial implementation of the testing framework
- Tests with
make test_pacemaker
andmake test_hostuff
- Tests with
make test_vrf
andmake test_sortition
- Benchmarking via
make benchmark_sortition
- VRF Wrapper library in
consensus/leader_election/vrf/
of github.com/ProtonMail/go-ecvrf/ecvrf - Implementation of Algorand's Leader Election sortition algorithm in
consensus/leader_election/sortition/