-
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
[Infrastructure] LocalNet on Kubernetes #354
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Great job
Before we merge this in, @okdas can you show (gif, video, demo, instructions) of it working? Also, please make sure to follow the LocalNet test steps to make sure it works. |
@Olshansk of course, I'm adding the instructions! :) |
Still in progress, but if you want to check it out locally and provide feedback/see if you catch any issues please make sure to follow the doc and also utilize the |
|
||
### How to change configuration files | ||
|
||
LocalNet resources are managed by pocket-operator, so if you'd like to change a config file (e.g. genesis file), you can do it by modifying the corresponding CRD in `pocket-operator` repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I should expand on that, but this should probably go into the pocket-operator documentation and linked here.
I really like the
@okdas My understanding is this:
The flow @deblasis described might literally let us scale (and discover) validators in a local environment next week, so I'd support going in that approach unless I'm missing something? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A small set of minor NITs and comments and we're good to go!
The only major point I wanted to discuss is why we shouldn't move forward with the approach outlined by Alessandro.
Tiltfile
Outdated
]) | ||
|
||
# # Exposes postgres port to 5432 on the host machine. | ||
# k8s_resource(new_name='postgres', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, just need to update the comment.
build/localnet/cli-client.yaml
Outdated
@@ -0,0 +1,71 @@ | |||
apiVersion: apps/v1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@deblasis put this together. See field #6 in P2PConfig
. Because of the prefix we use with viper + the change in case POCKET_P2P_IS_CLIENT_ONLY
maps to is_client_only
in the proto.
message P2PConfig {
string private_key = 1;
uint32 consensus_port = 2;
bool use_rain_tree = 3;
conn.ConnectionType connection_type = 4;
uint64 max_mempool_count = 5; // this is used to limit the number of nonces that can be stored in the mempool, after which a FIFO mechanism is used to remove the oldest nonces and make space for the new ones
bool is_client_only = 6;
}
@@ -3,25 +3,29 @@ load("ext://helm_resource", "helm_resource", "helm_repo") | |||
load("ext://namespace", "namespace_create") | |||
load("ext://restart_process", "docker_build_with_restart") | |||
|
|||
tiltfile_dir = os.path.dirname(config.main_dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this! I think it's going to make the codebase much easier to understand
@@ -69,6 +71,15 @@ spec: | |||
subPath: genesis.json | |||
- name: validator-storage | |||
mountPath: /validator-storage | |||
initContainers: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this :)
Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
We totally should! I love what @deblasis did! I think I've addressed all of your suggestions, let me resolve conflicts and it'll be ready for another round. |
Addresses begin with `YYYXX` number, where `YYY` is a number of an actor and `XX` is [a type of actor](../../shared/core/types/proto/actor.proto#L7). For example: | ||
* `420043b854e78f2d5f03895bba9ef16972913320` is a validator #420. | ||
* `66603bc4082281b7de23001ffd237da62c66a839` is a fisherperson #666. | ||
* `0010297b55fc9278e4be4f1bcfe52bf9bd0443f8` is a service node (a servicer) #001. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI: We're going to rename all Service Node
like instances to Servicer
soon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one minor suggestion, but otherwise, LGTM!
Co-authored-by: Daniel Olshansky <olshansky@pokt.network>
Description
Implements LocalNet that is powered by Kubernetes.
Issue
pocket-operator issue: pokt-network/pocket-operator#7not using operator currently, just utilizing Kubernetes directly.Type of change
Please mark the relevant option(s):
List of changes
Introducing new dependencies to run localnet developer environment
Testing
tilt up
should bring the whole stack online.README
Required Checklist
If Applicable Checklist
shared/docs/*
if I updatedshared/*
README(s)