-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TECHDEBT] Consolidate & encapsulate ValidatorMap
logic
#203
Comments
This is related to #271 in the greater scope/vision of having dynamic validator sets as they change with each height. #271 is scoped to only P2P and doing structured gossip amongst the validator nodes (for now). In general, P2P does care who the nodes are but simply gossips amongst the actors it is given. This ticket is scoped to consensus (techdebt cleanup) to make sure the concept of a "validator set" only exists in consensus. To keep in mind
|
@jessicadaugherty heads up I am a bit behind schedule with #331 and #203 (ValidatorMap related work). I was supposed to be done yesterday but I think I'll need another day or two to have them both under review. |
…ent - (Issue #271) (#374) ## Description This PR is a stepping stone for the removal of the `ValidatorMap`. Specifically it allows us to use per-Height addressBook and lays the ground for churn management. Right before a new height is reached, the addressBook is propagated via a message on the `Bus` so that other interested modules can handle it. This part is out-of-scope for this PR and will be covered later on in a specific issue, unless differently agreed during code-review. Also, this PR tends to the TODO: https://github.com/pokt-network/pocket/blob/444c4242f8d165ba7702f160f6e94cd416fd0b8f/p2p/raintree/network.go#L29 ## Issue Fixes #271 ## Type of change Please mark the relevant option(s): - [x] New feature, functionality or library - [ ] Bug fix - [x] Code health or cleanup - [ ] Major breaking change - [ ] Documentation - [ ] Other <!-- add details here if it a different type of change --> ## List of changes - Consensus - 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 of `bus` wherever possible - P2P - 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 from `Actor` to `NetworkPeer` - 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](#203) and [#331](#331)) - Transport related functions are now in the `transport` package - Updated tests to source the `addrBook` from the `addrbookProvider` and therefore `Persistence` - 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. Olshansk marked this conversation as resolved. Show resolved - Raintree is now capable of fetching the address book for a previous height and to instantiate an ephemeral `peersManager` with it. - Persistence - Moved Actor related getters from `genesis.go` to `actor.go` - Added `GetAllStakedActors()` that returns all Actors - Shared - Added `GetMaxMempoolCount` ## Testing - [x] `make develop_test` - [x] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README` ## Required Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have tested my changes using the available tooling - [x] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [ ] I have updated the corresponding README(s); local and/or global - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s) - [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s) Signed-off-by: Alessandro De Blasis <alex@deblasis.net> Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
#402) ## Description ## Issue Fixes #203 ## Type of change Please mark the relevant option(s): - [x] New feature, functionality or library - [ ] Bug fix - [x] Code health or cleanup - [ ] Major breaking change - [ ] Documentation - [ ] Other <!-- add details here if it a different type of change --> ## List of changes - Refactored so that references to `modules.ValidatorMap` are removed/internalized within `Consensus` - [WIP] Make sure that the debug client can discover the validators in `LocalNet` ## Testing - [x] `make develop_test` - [ ] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README` ## Required Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have tested my changes using the available tooling - [x] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [ ] I have updated the corresponding README(s); local and/or global - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have added, or updated, [mermaid.js](https://mermaid-js.github.io) diagrams in the corresponding README(s) - [ ] I have added, or updated, documentation and [mermaid.js](https://mermaid-js.github.io) diagrams in `shared/docs/*` if I updated `shared/*`README(s) Signed-off-by: Alessandro De Blasis <alex@deblasis.net> Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
Objective
Encapsulate the concept of a
ValidatorMap
only to the consensus moduleOrigin Document
This discussion in #178:
Goals
ValidatorMap
throughout the codebaseValidatorMap
in the consensus moduleDeliverable
ValidatorMap
throughout the whole codebase and it should only show up in the consensus moduleNon-goals / Non-deliverables
General issue deliverables
Testing Methodology
make test_all
LocalNet
is still functioning correctly by following the instructions at docs/development/README.mdCreator: @Olshansk
The text was updated successfully, but these errors were encountered: