Skip to content
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 #710

Merged
merged 33 commits into from
Jun 8, 2023

Conversation

0xBigBoss
Copy link
Contributor

@0xBigBoss 0xBigBoss commented Apr 30, 2023

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

  • New feature, functionality or library
  • Bug fix
  • Code health or cleanup
  • Major breaking change
  • Documentation
  • 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

  • make develop_test; if any code changes were made
  • Docker Compose LocalNet; if any major functionality was changed or introduced
  • k8s LocalNet; if any infrastructure or configuration changes were made

Required Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added, or updated, godoc format comments on touched members (see: tip.golang.org/doc/comment)
  • I have tested my changes using the available tooling
  • 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 diagrams in the corresponding README(s)
  • I have added, or updated, documentation and mermaid.js diagrams in shared/docs/* if I updated shared/*README(s)

@0xBigBoss 0xBigBoss added documentation Improvements or additions to documentation core Core infrastructure - protocol related utility Utility specific changes infra Core infrastructure - not protocol related community Open to or owned by a non-core team member tooling tooling to support development, testing et al client work needed to interface with the node (rpc, cli, etc..) labels Apr 30, 2023
@0xBigBoss 0xBigBoss requested review from Olshansk and okdas April 30, 2023 03:10
@0xBigBoss 0xBigBoss self-assigned this Apr 30, 2023
@0xBigBoss 0xBigBoss force-pushed the 0xbigboss/dw-1860/core-deploying-all-the-actors branch 3 times, most recently from 213cec4 to 27e6ae5 Compare May 2, 2023 02:18
Copy link
Member

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to ACK that I saw the PR (ty) and it's on my backlog for this week!

Makefile Show resolved Hide resolved
Copy link
Member

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to me for the most part. Good foundation to add things to in the future.

Note that you'll have to rebase on top of @h5law's changes (already in) and @okdas has #727 in progress. @gokutheengineer is also going to submit a version of state sync for review soon.

Everything is in 🛫

build/config/genesis.json Outdated Show resolved Hide resolved
build/config/fisherman.json Outdated Show resolved Hide resolved
build/config/fisherman.json Outdated Show resolved Hide resolved
build/localnet/README.md Show resolved Hide resolved
rpc/handlers_servicer.go Outdated Show resolved Hide resolved
runtime/configs/proto/fisherman_config.proto Outdated Show resolved Hide resolved
utility/validator/module.go Outdated Show resolved Hide resolved
utility/validator/module.go Outdated Show resolved Hide resolved
runtime/configs/config.go Outdated Show resolved Hide resolved
utility/fisherman/module.go Outdated Show resolved Hide resolved
@0xBigBoss 0xBigBoss force-pushed the 0xbigboss/dw-1860/core-deploying-all-the-actors branch from b6be2a9 to 8549297 Compare May 5, 2023 03:18
Copy link
Member

@okdas okdas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please excuse my lack of understanding. While reviewing the config file, I noticed that it seems to allow one process to serve as different actors. Is this the intended behavior? I was under the impression that we were not going to support this functionality.

For example, if one process has fisherman.enabled=true and servicer.enabled=true, would that be considered valid? Or is the configuration file looks that way to follow the module approach, where each module has its own property in the config file?

build/localnet/README.md Show resolved Hide resolved
build/localnet/manifests/cli-client.yaml Show resolved Hide resolved
build/localnet/Tiltfile Outdated Show resolved Hide resolved
@0xBigBoss
Copy link
Contributor Author

Please excuse my lack of understanding. While reviewing the config file, I noticed that it seems to allow one process to serve as different actors. Is this the intended behavior? I was under the impression that we were not going to support this functionality.

For example, if one process has fisherman.enabled=true and servicer.enabled=true, would that be considered valid? Or is the configuration file looks that way to follow the module approach, where each module has its own property in the config file?

AFAIK only a validator and servicer can co-exist in the same node. All other roles are exclusive to one another (a validator cannot be a fisherman, a servicer cannot be a fisherman). This will all be enforced in the utility module.

@0xBigBoss 0xBigBoss force-pushed the 0xbigboss/dw-1860/core-deploying-all-the-actors branch 5 times, most recently from 0988dd3 to 54771d3 Compare May 7, 2023 16:10
@Olshansk
Copy link
Member

@0xBigBoss Can you rebase on top of @okdas's PR (#727) once it is merged in?

@0xBigBoss
Copy link
Contributor Author

@0xBigBoss Left a couple small NITS, but otherwise the changes LGTM as long as the tests pass. I've added the e2e-devnet-test label to spin up a devnet for this.

Were there any other changes you were planning on doing or is it good to approve?

@Olshansk sorry didn't see that other service module after I rebased. I merged them and tried to clean it up a bit more, but I think it's ready to go,

@Olshansk Olshansk requested review from Olshansk, okdas and h5law June 6, 2023 20:12
Copy link
Member

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few more minor NITS but otherwise LGTM. Will approve after latest changes.

  1. @adshmh Please prioritize taking a look at this as it conflicts with your work but I want us to merge it in sooner rather than later.

  2. @0xBigBoss Please make sure unit tests and E2E tests are passing (green CI)

utility/module.go Outdated Show resolved Hide resolved
utility/module.go Outdated Show resolved Hide resolved
utility/servicer/module.go Outdated Show resolved Hide resolved
utility/session.go Outdated Show resolved Hide resolved
@0xBigBoss
Copy link
Contributor Author

@Olshansk should be GTG, i had to update some of the stuff for e2e tests due to not using the default namespace.

@0xBigBoss 0xBigBoss requested a review from Olshansk June 7, 2023 12:04
Copy link
Member

@Olshansk Olshansk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge it in once CI is all 🟢 !

@0xBigBoss 0xBigBoss merged commit dbc0deb into main Jun 8, 2023
@0xBigBoss 0xBigBoss deleted the 0xbigboss/dw-1860/core-deploying-all-the-actors branch June 8, 2023 03:01
@0xBigBoss
Copy link
Contributor Author

Thanks @Olshansk, gonna merge now since the checks failing are for off by one day for the changelogs and the codecov plugin failing on a lot of the code that got merged in from main.

bryanchriswhite added a commit that referenced this pull request Jun 8, 2023
…ider

* pokt/main:
  Consensus/readme (#777)
  chore: add `--build-tags` flag to `go_lint` make target (#807)
  [Core] Deploying all-the-protocol-actors (#710)
  Add github wiki tag to devlog8
  Add README for Devlog8 for iteration17 (#805)
bryanchriswhite pushed a commit that referenced this pull request Jun 8, 2023
## 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]>
bryanchriswhite added a commit that referenced this pull request Jun 8, 2023
…ider

* pokt/main:
  Consensus/readme (#777)
  chore: add `--build-tags` flag to `go_lint` make target (#807)
  [Core] Deploying all-the-protocol-actors (#710)
  Add github wiki tag to devlog8
  Add README for Devlog8 for iteration17 (#805)
bryanchriswhite added a commit that referenced this pull request Jun 8, 2023
…ider

* pokt/main:
  Consensus/readme (#777)
  chore: add `--build-tags` flag to `go_lint` make target (#807)
  [Core] Deploying all-the-protocol-actors (#710)
  Add github wiki tag to devlog8
  Add README for Devlog8 for iteration17 (#805)
bryanchriswhite added a commit that referenced this pull request Jun 8, 2023
* pokt/main:
  Consensus/readme (#777)
  chore: add `--build-tags` flag to `go_lint` make target (#807)
  [Core] Deploying all-the-protocol-actors (#710)
  Add github wiki tag to devlog8
  Add README for Devlog8 for iteration17 (#805)
bryanchriswhite added a commit that referenced this pull request Jun 8, 2023
* pokt/main:
  Consensus/readme (#777)
  chore: add `--build-tags` flag to `go_lint` make target (#807)
  [Core] Deploying all-the-protocol-actors (#710)
  Add github wiki tag to devlog8
  Add README for Devlog8 for iteration17 (#805)
bryanchriswhite added a commit that referenced this pull request Jun 8, 2023
* pokt/main:
  Consensus/readme (#777)
  chore: add `--build-tags` flag to `go_lint` make target (#807)
  [Core] Deploying all-the-protocol-actors (#710)
  Add github wiki tag to devlog8
  Add README for Devlog8 for iteration17 (#805)
bryanchriswhite added a commit that referenced this pull request Jun 8, 2023
* pokt/main:
  Consensus/readme (#777)
  chore: add `--build-tags` flag to `go_lint` make target (#807)
  [Core] Deploying all-the-protocol-actors (#710)
  Add github wiki tag to devlog8
  Add README for Devlog8 for iteration17 (#805)
bryanchriswhite added a commit that referenced this pull request Jun 8, 2023
* refactor/peerstore-provider: (22 commits)
  fix: bugs
  chore: update changelogs
  refactor: rename `T` & `K` type params to `M` &`C`
  chore: improve comment
  chore: add issue numbers to TECHDEBT comments
  chore: add TECHDEBT comments
  refactor: re-implement `GetUnstakedPeerstore`
  refactor: update peerstore provider method receivers
  refactor: `p2pPeerstoreProvider` to a single function'
  refactor: rename persistence.go back to provider.go
  refactor: consolidate p2pPeerstoreProvider into persistencePeerstorProvider
  chore: oneline function signature
  refactor: embed `p2pPStoreProviderFactory`
  refactor: persistence peerstor provider
  Consensus/readme (#777)
  chore: add `--build-tags` flag to `go_lint` make target (#807)
  [Core] Deploying all-the-protocol-actors (#710)
  fix: retrieve p2p mdoule from bus on each call
  chore: add godoc comments
  chore: remove unused `GetP2PConfig()` method
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client work needed to interface with the node (rpc, cli, etc..) community Open to or owned by a non-core team member core Core infrastructure - protocol related documentation Improvements or additions to documentation e2e-devnet-test Runs E2E tests on devnet infra Core infrastructure - not protocol related large Pull request is large tooling tooling to support development, testing et al utility Utility specific changes waiting-for-review
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Core] Deploying all-the-protocol-actors
4 participants