-
Notifications
You must be signed in to change notification settings - Fork 33
Changelog Consensus
user_name edited this page Feb 22, 2023
·
26 revisions
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.
- Move functions exposed by ConsensusDebugModule to debugging.go
- Rename ServiceNode Actor Type Name to Servicer
- Updated log messages in the state sync submodule with consistent style and add height information
- Added state sync message types to the types package
- Modules embed
base_modules.IntegratableModule
andbase_modules.InterruptableModule
for DRYness - Updated modules
Create
to accept generic options -
resetToGenesis
clears the utility mempool as well - Publishing
ConsensusNewHeightEvent
on new height
- Add a few
nolint
comments to fix the code on main
- Add
state_sync
submodule, withstate_sync
struct - Implement state sync server to advertise blocks and metadata
- Create new
state_sync_handler.go
source file that handlesStateSyncMessage
s sent to theConsensus
module - Add two new tests in
state_sync_test.go
:TestStateSyncServerGetMetaDataReq
andTestStateSyncServerGetBlock
- Update
TestHotstuff4Nodes1BlockHappyPath
test to also retrieve the committed block
- Address legacy linter errors from
golangci-lint
- Changed log lines to utilize new logger module.
- Introduced
hotstuffFIFOMempool
that extends the logic provided by the genericized FIFO mempool inshared
. - Added tests for
hotstuffFIFOMempool
to ensure that it behaves as expected.
- Fix
TestHotstuff4Nodes1BlockHappyPath
misplacement of actual and expected values inrequire.Equal
- Add a note on consensus test related workaround related to #462
- Decouple consensus module and pacemaker module
- Add
pacemaker
submodule - Update pacemaker struct to remove consensus module field, and related functions
- Create new
pacemaker_consensus.go
source file that consists ConsensusPacemaker function implementations
- Rewrite
interface{}
toany
- Remove
Block
proto definition to consolidate undershared/core/types
- Force consensus to use a "star-like" broadcast instead of "RainTree" broadcast
- Improve logging throughout through the use of emojis and rewording certain statements
- Slightly improve the block verification flow (renaming, minor fixes, etc…) to stabilize LocalNet
- Rename the
consensus_tests
package toe2e_tests
- Internalize configuration related to
fail_on_extra_msgs
from theMakefile
to theconsensus
module - Forced all tests to fail if we receive extra unexpected messages and modify tests appropriately
- After #198, we made tests deterministic but there was a hidden bug that modified how the test utility functions because the clock would not move while we were waiting for messages. This prevented logs from streaming, tests from failing, and other issues. Tend to all related changes.
- Rename
ValidateMessage
toShouldHandleMessage
and return a boolean - Pass a
reason
toInterruptRound
- Improve readability of some parts of the code
- Updated module constructor to accept a
bus
and not aruntimeMgr
anymore - Registering module with the
bus
viaRegisterModule
method - Updated tests and mocks accordingly
- 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/e2e_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_artifacts -
ConsensusGenesisState
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/
Contents
- Home
- Persistence
- Changelog
-
Persistence
- Indexer
- Rpc
- Runtime
- State_Machine
-
Guides
- Roadmap
-
Guides
- Learning
- Guides
-
Guides
- Contributing
- Devlog
-
Guides
- Dependencies
-
Guides
- Releases
- Guides
- P2P
-
Shared
- Crypto
- Shared
-
Shared
- Modules
-
Build
- Config
- Consensus
-
Guides
- Telemetry
- Utility
- Logger