-
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
[Core] Deploying all-the-protocol-actors #613
Comments
@okdas Can you PTAL at the requirements in this ticket? I know you've been putting a lot of thought into it, but I think we can potentially get some help on this piece of work, which will link what I'll be doing in M3 and what you're doing in M2. cc @jessicadaugherty - this will be a great bounty after we triage it. |
So I am trying to wrap my head around the current behaviour, so I can try and implement the ticket. And have a few questions:
If I have gone wrong with anything I've mentioned please let me know - I will keep looking into this over the weekend hopefully to start next week. |
The current requirements look good. One part I am not sure about is We might, however, require actor-specific configs we need to expose. For example, adding Moreover, I think we can add a container image build for each actor once the binary is compiled. |
Something we could use to solve this is https://goreleaser.com/ - I was looking at whether we could use it to build go binaries along container images, but it was quicker to add a custom image build. Maybe it's time to revisit? GoReleaser also can package |
The goal here is to have the "code modifications" that will be used by the infra above. I think everything related to the infrastructure related to streamlining, sharing, versioning, etc is outside of the scope of this PR.
Makes sense. In that case I'm thinking of adding the following requirements:
@okdas:
Once #528 by @gokutheengineer is merged in, there will be a codepath for synching full nodes that are not validators. See
The
To do this, I would add a oneof Outside of the validator (or not), I would start with the utility module.
... From this article, but they're not much use (right now), because we have configs validating the code flow. @okdas Any feedback on the design above?
This is a much more open-ended problem, so will keep thinking/sharing ideas. Might need to prototype it myself if it's still not clear. |
first pass with notes, will be moving and grooving here https://github.com/pokt-network/pocket/compare/0xbigboss/dw-1860/core-deploying-all-the-actors |
Ty @0xBigBoss :) |
@0xBigBoss I was going to suggest that the presence of the fisherman/servicer config could determine if its enabled/disabled, but having the boolean can actually make toggling/developing much easier so +1. Within the utility module, I suggest you looked at what @gokutheengineer has been doing with the |
@Olshansk yes, thank you for the pointer. I did my best to brush up on the module docs and move in this direction. I pushed a new commit experimenting with standalone modules. This works thus far for servicer and fisherman and think it is generally a good approach to strapping on the utility specific stuff. I am not convinced I found the best way yet though to start the actor-specific modules. I included an I also haven't quite reviewed how it should all work e2e and how siloed these utility modules can be. I haven't reviewed the validator bootstrap logic and how that should come into play here. Will think on this more after I have read more on how that module starts. |
@0xBigBoss I'm not 100% sure if you were looking for feedback yet, so just going to send suggestions based on a high-level brief overview.
If there's any specific piece that you have questions about, lmk |
@Olshansk I believe I am set with the skeleton configs for the various actors and creating/starting them in the utility module. I did end up keeping one list, @h5law I did end up going with the approach you recommended for now, and kept a top-level @gokutheengineer If you could, please send me some easy instructions on how to add non-validator, full nodes to localnet so I can start integrating these new configs. In the meantime, I'll start on the RPC calls and the plumbing for that. |
👍 Will think about it myself a bit more as well, but definitely a great way to start. Any chance you can open up a draft PR? It'll be a good way to leave comments & have a discussion along the way.
I think its reasonable. Not an irreversible decision.
This isn't ready YET. The PRs are in flight so we should hopefully have them ready next week along with the markdown readme.
👍 |
@0xBigBoss Just sharing a screenshot from a conversation we had today rather than summarizing. Stay tuned! |
Very cool @Olshansk . I have started in that direction in my PR #710. Though it's not completely there yet since the fisherman/servicer aren't staked by the cluster manager, I tried to add a hacky method of overriding some of the genesis values. I think once I have clarity on the full node vs validator configuration, it will be straightforward to bring this home. |
Just chiming in here on P2P timing and coordination: #505 is a dependency for the P2P module to support communication with non-staked actors (e.g. full-nodes). I've just put #707 up for review which I expect to be part 1 of 2 to close #505. TLDR (why); Here's an excerpt from the P2P README update in #707: flowchart TD
subgraph lMod[Local P2P Module]
subgraph lHost[Libp2p `Host`]
end
subgraph lRT[Raintree Router]
subgraph lRTPS[Raintree Peerstore]
lStakedPS([staked actors only])
end
subgraph lPM[PeerManager]
end
lPM --> lRTPS
end
subgraph lBG[Background Router]
subgraph lBGPS[Background Peerstore]
lNetPS([all P2P participants])
end
subgraph lGossipSub[GossipSub]
end
subgraph lDHT[Kademlia DHT]
end
lGossipSub --> lBGPS
lDHT --> lBGPS
end
lRT --1a--> lHost
lBG --1b--> lHost
end
subgraph rMod[Remote P2P Module]
subgraph rHost[Libp2p `Host`]
end
subgraph rRT[Raintree Router]
subgraph rPS[Raintree Peerstore]
rStakedPS([staked actors only])
end
subgraph rPM[PeerManager]
end
rPM --> rStakedPS
end
subgraph rBG[Background Router]
subgraph rBGPS[Background Peerstore]
rNetPS([arr P2P participants])
end
subgraph rGossipSub[GossipSub]
end
subgraph rDHT[Kademria DHT]
end
rGossipSub --> rBGPS
rDHT --> rBGPS
end
rHost -. "setStreamHandler()" .-> hs[[handleStream]]
hs --3a--> rRT
hs --3b--> rBG
rBG --"4a (cont. propagation)"--> rHost
linkStyle 11 stroke:#ff3
rRT --"4b (cont. propagation)"--> rHost
linkStyle 12 stroke:#ff3
end
lHost --2--> rHost
|
## Description Adds necessary updates to begin deploying different kind of actor nodes for Pocket Network. It is still incomplete according to #613 . ## Issue Fixes #613 ## Type of change Please mark the relevant option(s): - [x] New feature, functionality or library - [ ] Bug fix - [ ] Code health or cleanup - [x] Major breaking change - [x] Documentation - [x] Development Tools ## List of changes - Updates localnet to support deploying different actors - Adds new config protos for enabling various actors - Creates and starts new actor specific utility module - Adds new RPC routes - /v1/query/nodeRoles - Adds new CLI command `bin/p1 query noderoles` for querying a nodes roles - Stub `HandleRelay` - Converts "" to ":memory:" to be explicit about using in memory stores ## Testing - [x] `make develop_test`; if any code changes were made - [x] [Docker Compose LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md); if any major functionality was changed or introduced - [x] [k8s LocalNet](https://github.com/pokt-network/pocket/blob/main/build/localnet/README.md); if any infrastructure or configuration changes were made ## 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 added, or updated, [`godoc` format comments](https://go.dev/blog/godoc) on touched members (see: [tip.golang.org/doc/comment](https://tip.golang.org/doc/comment)) - [x] I have tested my changes using the available tooling - [x] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [x] 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) --------- Co-authored-by: github-actions <[email protected]>
## Description Adds necessary updates to begin deploying different kind of actor nodes for Pocket Network. It is still incomplete according to #613 . ## Issue Fixes #613 ## Type of change Please mark the relevant option(s): - [x] New feature, functionality or library - [ ] Bug fix - [ ] Code health or cleanup - [x] Major breaking change - [x] Documentation - [x] Development Tools ## List of changes - Updates localnet to support deploying different actors - Adds new config protos for enabling various actors - Creates and starts new actor specific utility module - Adds new RPC routes - /v1/query/nodeRoles - Adds new CLI command `bin/p1 query noderoles` for querying a nodes roles - Stub `HandleRelay` - Converts "" to ":memory:" to be explicit about using in memory stores ## Testing - [x] `make develop_test`; if any code changes were made - [x] [Docker Compose LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md); if any major functionality was changed or introduced - [x] [k8s LocalNet](https://github.com/pokt-network/pocket/blob/main/build/localnet/README.md); if any infrastructure or configuration changes were made ## 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 added, or updated, [`godoc` format comments](https://go.dev/blog/godoc) on touched members (see: [tip.golang.org/doc/comment](https://tip.golang.org/doc/comment)) - [x] I have tested my changes using the available tooling - [x] I have updated the corresponding CHANGELOG ### If Applicable Checklist - [x] 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) --------- Co-authored-by: github-actions <[email protected]>
Thanks for the details @bryanchriswhite! Amazing and very clear diagram. There's a lot going on and it's very easy to understand so I want to make sure that doesn't go unnoticed. 🙏 |
Objective
Enable deploying different types of protocol actors.
Origin Document
The utility specification outlines several different types of actors:
Validator
Servicer
Fisherman
Portal
Full Nodes
(a full node that is not a protocol actor)As of writing, the V1 repo only supports running validators and the debug client is a "makeshift" full node. As we are about to start working on M3 and have a live devnet, there needs to be an easy way to build and scale different types of actors.
Note that
Application
andActor
do not fall into the scope of this ticket.V0 - Swagger Documentation (as a reference)
Note: It is slightly outdated
The V0 RPC spec can be found here.
For example, the height can be queried like so:
V1 - Swagger Documentation (as a reference)
Note: It is still in the early stages
The V1 RPC spec can be found here.
Goals
Deliverable
Note that there are a lot of notes and deliverables below. These should be used as a guide but the implementor is expected to use their best judgment and creativity to achieve the goals above.
config.go
to contain the type of actor being deployed- Note to implementor: Creating empty
XXXConfig
(e.g.FishermanConfig
) protos that we can build on in the future would helpconfig.json
files for each actor(s) being deployed on this nodeUtility Module
) that is specific to each protocol atorServicer
can also, optionally, be aValidator
at the same timePortal
can not double as anyone else must be a standalonerandombackground gossip for full nodes, @gokutheengineer is working on state sync with full nodes, @okdas is working on infrastructure to deploy them; please ping them in the public channels for more details. @Olshansk is not doing anything ;'(relayDispatch
endpoint and if the actor type is not a servicer, it should return an error.v1/servicer/...
or/v1/fisherman/...
Non-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
Co-Owners: @okdas
The text was updated successfully, but these errors were encountered: