Add cluster bootstrapping commands#8013
Add cluster bootstrapping commands#8013tim-barry merged 14 commits intofeature/collector-decentralization-bootstrappingfrom
Conversation
Creation of cluster assignment moved from `rootblock.go` to `clustering.go`.
The new commands are to be used by collector nodes. Following creation of the cluster assignment by `cmd/bootstrap/run/clustering.go`, Collector nodes retrieve the assignment, create a vote for the root block of the collection cluster they are assigned to, and upload that vote. Once enough votes have been received to construct QCs for all the cluster root blocks, bootstrapping can continue to the next step (the consensus root block).
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
jordanschalm
left a comment
There was a problem hiding this comment.
Looking good.
Could you make sure to also update:
- the Benchnet2 bootstrapping logic
- the Localnet bootstrapping logic
- the bootstrap CLI README
- the general documentation should be updated to include the new command
- the examples there should be updated to include the new command
| @@ -0,0 +1,187 @@ | |||
| package cmd | |||
There was a problem hiding this comment.
The bootstrap CLI readme has some general documentation about this process. It also has some example commands which can be used to test the full bootstrapping flow. Could you update these example commands and the relevant documentation in the README?
| cmd.MarkFlagRequired(rootBlockCmd, "root-height") | ||
| cmd.MarkFlagRequired(rootBlockCmd, "root-view") | ||
| cmd.MarkFlagRequired(rootBlockCmd, "random-seed") | ||
| cmd.MarkFlagRequired(rootBlockCmd, "intermediary-clustering-data") |
There was a problem hiding this comment.
I think it is fine to make this non-required and set the default value to the default write path from the prior command
Co-authored-by: Jordan Schalm <jordan.schalm@flowfoundation.org>
|
Localnet uses its own bootstrapping logic (https://github.com/onflow/flow-go/blob/a7834332a280666d0a2a77d0f01ee01aaeae0cba/integration/localnet/builder/bootstrap.go) and is so far essentially unaffected by these changes. Given localnet isn't intended to be run with permissionless collector nodes, I'm not sure to what extent we want to update the bootstrapping for it to match benchnet or the main bootstrapping process. |
durkmurder
left a comment
There was a problem hiding this comment.
Very good, high quality stuff.
| PathNodeRootBlockVote = filepath.Join(DirPrivateRoot, "private-node-info_%v", "root-block-vote.json") | ||
| PathNodeRootClusterBlockVote = filepath.Join(DirPrivateRoot, "private-node-info_%v", "root-cluster-block-vote.json") // %v will be replaced by NodeID | ||
| FilenameRootBlockVote = FilenameRootBlockVotePrefix + "%v.json" | ||
| FilenameRootClusterBlockVote = FilenameClusterBlockVotePrefix + "%v.json" |
There was a problem hiding this comment.
looks like it will have two dots. "root-cluster-block-vote..json"
There was a problem hiding this comment.
The full string is root-cluster-block-vote.%v.json which will be expanded out to include the voting node's ID; this is the similar to how the consensus root block votes are formatted.
Co-authored-by: Yurii Oleksyshyn <yuraolex@gmail.com>
8cfb923
into
feature/collector-decentralization-bootstrapping
Adds the new bootstrapping command
clustering.goto generate the collector clusters for the first epoch.Adds new transit script commands for collector nodes to vote on their cluster's root block.
Updates existing tests to use the new commands so that they can finish successfully.
The constraint that 2/3rds of collector nodes must be internal has not yet been removed.
Closes: #7846, #7847, #7848