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

--number-of-bakers #35

Closed
nicolasochem opened this issue Oct 28, 2020 · 5 comments · Fixed by #74
Closed

--number-of-bakers #35

nicolasochem opened this issue Oct 28, 2020 · 5 comments · Fixed by #74
Assignees

Comments

@nicolasochem
Copy link
Collaborator

This is an incremental feature on top of what we already have and is worth doing now.

Currently bootstrap-nodes is a k8s deployment while nodes are a k8s statefulset.

  • turn bootstrap-nodes into a statefulset
  • make the number of bakers configurable on mkchain i.e. --number-of-bakers just like --number-of-nodes
  • --generate-constants should generate the appropriate number of baking accounts
  • ensure every baking process in the pods are configured to bake for the account according to the statefulset pod number
  • every block should be baked at priority 0. scale down is supported, in which case some blocks will be baked at priority 1 or more.
  • scale up is not supported - you must decide at chain creation how many baking accounts you want, after that, changing the baker cycles require on-chain operations and waiting several cycles
@harryttd
Copy link
Collaborator

Related to #17

@nicolasochem
Copy link
Collaborator Author

running mkchain --number-of-nodes 3 --number-of-bakers 2 should generate the following accounts and nodes in the values yaml file:

accounts:
- baker: true
  bootstrap: true
  key: !!binary |
    snip
  name: baker_2
  private: true
- baker: true
  bootstrap: true
  key: !!binary |
    snip
  name: baker_2
  private: true
nodes:
- bake_for: baker_1
- bake_for: baker_2
- {}

And passing the yaml above to helm should spin up 2 bakers and one regular node.

@brandisimus brandisimus moved this from In progress to Backlog in private-chain-infrastructure Jan 15, 2021
@brandisimus brandisimus moved this from Backlog to WIP in private-chain-infrastructure Jan 17, 2021
@brandisimus brandisimus added WIP and removed WIP labels Jan 19, 2021
@brandisimus brandisimus assigned nicolasochem and unassigned s-zeng Jan 26, 2021
@brandisimus
Copy link

@nicolasochem has this been done already? can we close it? thanks!

@nicolasochem
Copy link
Collaborator Author

nicolasochem commented Jan 26, 2021 via email

@brandisimus brandisimus linked a pull request Jan 26, 2021 that will close this issue
@brandisimus
Copy link

as per above - closing.

private-chain-infrastructure automation moved this from WIP to Done Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants