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.
- Variable name and comment improvements
- Updated errors on Send from fatal to recoverable
- Updated
PeerstoreProvider
to ignore gracefully peers that are not resolvable/reachable
- Add log for
StateMachineTransitionEvent
- Refactored P2P module to use new P2P interfaces
- Moved
typesP2P.AddrBookMap
tosharedP2P.PeerAddrMap
and refactor to implement the newPeerstore
interface - Factored
SortedPeerManager
out ofraintree.peersManager
and addpeerManager
interface - Refactored
raintree.peersManager
to useSortedPeerManager
and implementPeerManager
interface - Refactored
stdnetwork.Network
implementation to use P2P interfaces - Refactored
getAddrBookDelta
to be a member ofPeerList
- Refactored
AddrBookProvider
to use new P2P interfaces - Renamed
AddrBookProvider
toPeerstoreProvider
- Refactored
typesP2P.Network
to use new P2P interfaces - Refactored
typesP2P.Transport
to embedio.ReadWriteCloser
- Renamed
NetworkPeer#Dialer
toNetworkPeer#Transport
for readability and consistency - Refactored
typesP2P.NetworkPeer
to implement the newPeer
interface
- Add TECHDEBT comments
- Added embedded
modules.InitializableModule
to the P2PAddrBookProvider
interface so that it can be dependency injected as amodules.Module
via the bus registry.
- replace
consensus_port
withport
in P2P config - update default P2P config
port
to from8080
to42069
- Renamed package names and parameters to reflect changes in the rest of the codebase
- Update logger value references with pointers
- Added basic
bootstrap
nodes support - Reacting to
ConsensusNewHeightEventType
andStateMachineTransitionEventType
to update the address book and current height and determine if a bootstrap is needed
- Deprecated
debugAddressBookProvider
- Added
rpcAddressBookProvider
to source the address book from the RPC server - Leveraging
bus
for dependency injection of theaddressBookProvider
andcurrentHeightProvider
- Deprecated
debugCurrentHeightProvider
- Added
rpcCurrentHeightProvider
to source the current height from the RPC server - Fixed raintree to use the
currentHeightProvider
instead of consensus (that was what we wanted to avoid in the first place) - Added
getAddrBookDelta
to calculate changes to the address book between heights and update the internal state and componentry accordingly
- Modules embed
base_modules.IntegratableModule
andbase_modules.InterruptableModule
for DRYness - Updated tests
- Updated logging initialization and passing to the network component instead of using the global logger
- Fixed incorrect use of
bus.GetLoggerModule()
instdnetwork.go
since it's never initialized when running the debug CLI
- Address legacy linter errors from
golangci-lint
- Changed log lines to utilize new logger module.
- Using the generic
mempool.GenericFIFOSet
as anonceDeduper
- Added tests for
nonceDeduper
to ensure that it behaves as expected.
- Updated
TestRainTreeAddrBookUtilsHandleUpdate
andtestRainTreeMessageTargets
to correct incorrect expected and actual value placements.
- Updated
P2PConfig#IsEmptyConnectionType
bool toP2PConfig#ConnectionType
enum
- Rewrite
interface{}
toany
- Add a lock to the mempool to avoid parallel messages which has caused the node to crash in the past
- Updated module constructor to accept a
bus
and not aruntimeMgr
anymore - Registering module with the
bus
viaRegisterModule
method - Updated tests and mocks accordingly
- Sorting
validatorIds
intestRainTreeCalls
- Added missing
Close()
call topersistenceReadContext
- Refactored
AddrBookProvider
to support multiple implementations - Added
CurrentHeightProvider
- Dependency injection of the aforementioned provider into the module creation (used by the debug-client)
- Updated implementation to use the providers
- Updated tests and mocks
ActorsToAddrBook
now skips actors that are not validators since they don't have a serviceUrl generic parameter
- Updated to use the new centralized config and genesis handling
- Updated to use the new
Actor
struct undercoreTypes
- Updated tests and mocks
- Added missing
max_mempool_count
in config (it was causing P2P instabilities in LocalNet)
ValidatorMapToAddrBook
renamed toActorToAddrBook
ValidatorToNetworkPeer
renamed toActorToNetworkPeer
- Bugfix for [#401]
- Fixed typo in 'peers_manager.go'
- mempool cap is now configurable via P2PConfig. Tests implement the mock accordingly.
- Introduced the concept of a
addrbookProvider
that abstracts the fetching and the mapping fromActor
toNetworkPeer
- Temporary hack to allow access to the
addrBook
to the debug client (will be removed in an upcoming PR already in the works for issues #203 and #331) - Transport related functions are now in the
transport
package - Updated tests to source the
addrBook
from theaddrbookProvider
and thereforePersistence
- Updated Raintree network constructur with dependency injection
- Updated stdNetwork constructur with dependency injection
- Improved documentation for the
peersManager
- Raintree mempool cannot grow unbounded anymore. It's now bounded by a constant limit and when new nonces are inserted the oldest ones are removed.
- Raintree is now capable of fetching the address book for a previous height and to instantiate an ephemeral
peersManager
with it.
- Removed topic from messaging
- Updated README to reference the python simulator as a learning references and unit test generation tool
- Added a RainTree unit test for 12 nodes using the simulator in https://github.com/pokt-network/rain-tree-sim/blob/main/python
- Add a telemetry
send
event within the contextRainTree
network module that is triggered during network writes - Change the
RainTree
testing framework counting method to simulate real reads/writes from the network - Improve documentation related to the
RainTree
testing framework & how the counters are computed
#235 Config and genesis handling
- Updated to use
RuntimeMgr
- Updated tests and mocks
- Removed some cross-module dependencies
- Don't ignore the exit code of
m.Run()
in the unit tests
[TECHDEBT] AddrBook management optimization and refactoring #246
- Added
peersManager
andtarget
in order to abstract away and eliminate redundant computations - Refactored debug logging in
getTarget
to print first and second target on the same line - Refactored
AddPeerToAddrBook
to use an event-driven approach in order to leverage sorted data structures - Added
RemovePeerToAddrBook
making use of the same pattern - Improved performance of
AddPeerToAddrBook
andRemovePeerToAddrBook
by making the implementations O(n) - Updated
stdnetwork
to use a map instead of a slice
Encapsulate structures previously in shared #163
- Ensured proto structures implement shared interfaces
P2PConfig
uses shared interfaces in order to acceptMockP2PConfig
intest_artifacts
- Moved connection_type to bool for simplicity (need to figure out how to do Enums without sharing the structure)
- Deprecated old p2p for pre2p raintree
- RainTree first iteration in Pre2P module (no cleanup or redundancy)