-
Notifications
You must be signed in to change notification settings - Fork 33
Changelog P2P
user_name edited this page Jun 13, 2023
·
25 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.
- Replaced
RPC_HOSTwithPOCKET_REMOTE_CLI_URLor--pocket-remote-cli-urlwhere appropriate
- Replaced embedded
modules.Modulewith simplermodules.IntegratableModuleinPeerstoreProviderinterface - Removed unused
PeerstoreProvider#GetP2PConfig()method - Added
PeerstoreProvider#GetUnstakedPeerstore()method - Added temporary
unstakedPeerstoreProviderinterface - Renamed
NewRPCPeerstoreProvider()andNewPersistencePeerstoreProvider()toCreate()(per package)
- Moved nonce field from RainTreeMessage to PocketEnvelope protobuf types
- Formalize NonceDeduper (and related) types
- Move NonceDeduper (and related types) from p2p/raintree to p2p/utils pkg
- Move NonceDeduper usage out of RainTreeRouter and into p2pModule
- Added
Handlerfield toRainTreeConfig&BackgroundConfig - Refactored
rainTreeRouterlogging methods - Renamed
rainTreeRouter#HandleNetworkData()to#handleRainTreeMsg() - Renamed
p2pModule#handleNetworkData()to#handlePocketEnvelope() - Added -tags=test to all test make targets
- Fixed mockdns usage in
TestP2PModule_Insecure_Errortest - Moved message handling from p2p module to router
- Use the shared codec module when marshaling the data sent over the wire
- Introduce a hacky workaround to cast a
uint32to astringsince it is being passed in as ajson.Numberthrough some codeflow
- Removed unused
Transportinterface - Moved and renamed
raintree.RainTreeConfigtoutil.RouterConfig - Renamed
protocol.DefaultTopicStrtoprotocol.BackgroundTopicStr - Added
protocol.PeerDiscoveryNamespace - Added kademlia peer discovery baseline test
- Added background router (kad + gossipsub)
- Updated P2P README
- Extracted a couple of shared helpers (e.g.
stringLogArrayMarshaler,MarshalZerologArray)
- Renamed
Networkinterface toRouter - Shortened
Router#NetworkBroadcastto#Broadcast - Shortened
Router#NetworkSendto#Send - Shortened
Router#networkSendInternalto#sendInternal - Shortened
Router#networkBroadcastAtLevelto#broadcastAtLevel - Renamed
rainTreeNetworktorainTreeRouter - Renamed
rainTreeNetworkmethod receivers - Renamed
p2pModule#networkto#router - Renamed
p2pModule#setupNetwork()to#setupRouter() - Renamed config var in
rainTreeRouter#Create - Renamed router logger
- Renamed
NewRainTreeNetwork()toNewRainTreeRouter() - Refactored peers_manager_test.go
- Refactored network_test.go
- Simplified p2p module/router config handoff
- Updated debug logging
- Removed unneeded
stdnetworkpackage - Removed unneeded
use_rain_treeP2P config field
- Removed unneeded
stdnetworkpackage - Removed unneeded
use_rain_treeP2P config field
- Added rainTeeFactory type & compile-time enforcement
- Refactor
mockdnstest helpers
- Add test to exercise
sortedPeersView#Add()and#Remove() - Fix raintree add/remove index
- Added a test which asserts that transport encryption is required (i.e. unencrypted connections are refused)
- Moved peer & url conversion utils to
p2p/utilspackage - Refactor
getPeerIPto usenet.DefaultResolverfor easier testing - Moved & refactor libp2p
host.Hostsetup util top2p/utils - Consolidated Libp2p & P2P
modules.Moduleimplementations - Consolidated Libp2p & P2P
stdnetworktypesP2P.Networkimplementations - Refactored raintree
typesP2P.Networkimplementation to use libp2p - Moved
shared/p2ppackage intop2p/typespackages - Removed
Trnasportinterface and implementations - Removed
ConnectionFactorytype and related members - Added libp2p
host.Hostmock generator - Refactor raintree constructor function signature to use new
RainTreeConfigstruct
- Wrap IPv6 address in square brackets as per RFC3986 §3.2.2
- Improve URL validation and error handling in Libp2pMultiaddrFromServiceURL function
- Switched mock generation to use reflect mode for effected interfaces (
modules.ModuleFactoryWithOptionsembedders)
- Variable name and comment improvements
- Updated errors on Send from fatal to recoverable
- Updated
PeerstoreProviderto ignore gracefully peers that are not resolvable/reachable
- Add log for
StateMachineTransitionEvent
- Refactored P2P module to use new P2P interfaces
- Moved
typesP2P.AddrBookMaptosharedP2P.PeerAddrMapand refactor to implement the newPeerstoreinterface - Factored
SortedPeerManagerout ofraintree.peersManagerand addpeerManagerinterface - Refactored
raintree.peersManagerto useSortedPeerManagerand implementPeerManagerinterface - Refactored
stdnetwork.Networkimplementation to use P2P interfaces - Refactored
getAddrBookDeltato be a member ofPeerList - Refactored
AddrBookProviderto use new P2P interfaces - Renamed
AddrBookProvidertoPeerstoreProvider - Refactored
typesP2P.Networkto use new P2P interfaces - Refactored
typesP2P.Transportto embedio.ReadWriteCloser - Renamed
NetworkPeer#DialertoNetworkPeer#Transportfor readability and consistency - Refactored
typesP2P.NetworkPeerto implement the newPeerinterface
- Add TECHDEBT comments
- Added embedded
modules.InitializableModuleto the P2PAddrBookProviderinterface so that it can be dependency injected as amodules.Modulevia the bus registry.
- replace
consensus_portwithportin P2P config - update default P2P config
portto from8080to42069
- Renamed package names and parameters to reflect changes in the rest of the codebase
- Update logger value references with pointers
- Added basic
bootstrapnodes support - Reacting to
ConsensusNewHeightEventTypeandStateMachineTransitionEventTypeto update the address book and current height and determine if a bootstrap is needed
- Deprecated
debugAddressBookProvider - Added
rpcAddressBookProviderto source the address book from the RPC server - Leveraging
busfor dependency injection of theaddressBookProviderandcurrentHeightProvider - Deprecated
debugCurrentHeightProvider - Added
rpcCurrentHeightProviderto source the current height from the RPC server - Fixed raintree to use the
currentHeightProviderinstead of consensus (that was what we wanted to avoid in the first place) - Added
getAddrBookDeltato calculate changes to the address book between heights and update the internal state and componentry accordingly
- Modules embed
base_modules.IntegratableModuleandbase_modules.InterruptableModulefor 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.gosince 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.GenericFIFOSetas anonceDeduper - Added tests for
nonceDeduperto ensure that it behaves as expected.
- Updated
TestRainTreeAddrBookUtilsHandleUpdateandtestRainTreeMessageTargetsto correct incorrect expected and actual value placements.
- Updated
P2PConfig#IsEmptyConnectionTypebool toP2PConfig#ConnectionTypeenum
- 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
busand not aruntimeMgranymore - Registering module with the
busviaRegisterModulemethod - Updated tests and mocks accordingly
- Sorting
validatorIdsintestRainTreeCalls
- Added missing
Close()call topersistenceReadContext
- Refactored
AddrBookProviderto 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
-
ActorsToAddrBooknow 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
Actorstruct undercoreTypes - Updated tests and mocks
- Added missing
max_mempool_countin config (it was causing P2P instabilities in LocalNet)
-
ValidatorMapToAddrBookrenamed toActorToAddrBook -
ValidatorToNetworkPeerrenamed 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
addrbookProviderthat abstracts the fetching and the mapping fromActortoNetworkPeer - Temporary hack to allow access to the
addrBookto 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
transportpackage - Updated tests to source the
addrBookfrom theaddrbookProviderand 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
peersManagerwith 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
sendevent within the contextRainTreenetwork module that is triggered during network writes - Change the
RainTreetesting framework counting method to simulate real reads/writes from the network - Improve documentation related to the
RainTreetesting 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
peersManagerandtargetin order to abstract away and eliminate redundant computations - Refactored debug logging in
getTargetto print first and second target on the same line - Refactored
AddPeerToAddrBookto use an event-driven approach in order to leverage sorted data structures - Added
RemovePeerToAddrBookmaking use of the same pattern - Improved performance of
AddPeerToAddrBookandRemovePeerToAddrBookby making the implementations O(n) - Updated
stdnetworkto use a map instead of a slice
Encapsulate structures previously in shared #163
- Ensured proto structures implement shared interfaces
-
P2PConfiguses shared interfaces in order to acceptMockP2PConfigintest_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)
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