-
Notifications
You must be signed in to change notification settings - Fork 26
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
support for multiple bakers #74
support for multiple bakers #74
Conversation
Previously we used to create 4 accounts always. We simplify by creating just one account per baker. As a consequence, all blocks are baked on priority zero from the beginning. We add a new parameter to mkchain `--number-of-bakers`, defaults to 1. If we pass a higher number n, it will create n bakers and n nodes baking for each baker. Bakers and nodes can be mapped using values.yaml: specify which node bakes for which address. This requires jq which requires a custom baking container. This also allowed me to remove helm hacks. We make a few assumptions for now: * every baking node is also a bootstrap node * the first baker's address is also the chain activator I tested in non-zerotier mode and zerotier mode with one create namespace and one invite namespace in the same minikube cluster; it works, but required me to remove the hard-coded nodePort for p2p.
@@ -39,15 +39,15 @@ def main(): | |||
if CHAIN_PARAMS["zerotier_in_use"]: | |||
with open("/var/tezos/zerotier_data.json", "r") as f: | |||
net_addr = json.load(f)[0]["assignedAddresses"][0].split("/")[0] | |||
if bootstrap_peers == [] and "bootstrap" not in socket.gethostname(): | |||
if bootstrap_peers == []: |
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.
Is the logic here now that we want all bootstrap peers to know about each other? We should probably filter out the node's own ip like we talked about.
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.
Done in nicolasochem#1 that I will submit next as a PR.
) | ||
exit(1) | ||
|
||
bootstrap_accounts = [f"baker{n}" for n in range(args.number_of_bakers)] |
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.
confirming: for now bootstrap accounts == bakers but we are going to change that?
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.
Yes, it's changed in this branch: nicolasochem#1
Previously we used to create 4 accounts always. We simplify by
creating just one account per baker. As a consequence, all blocks
are baked on priority zero from the beginning.
We add a new parameter to mkchain
--number-of-bakers
, defaults tobaking for each baker.
Bakers and nodes can be mapped using values.yaml: specify which node
bakes for which address. This requires jq which requires a custom
baking container. This also allowed me to remove helm hacks.
We make a few assumptions for now:
I tested in non-zerotier mode and zerotier mode with one create
namespace and one invite namespace in the same minikube cluster; it
works, but required me to remove the hard-coded nodePort for p2p.