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.
- 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)