Skip to content

Add cluster bootstrapping commands#8013

Merged
tim-barry merged 14 commits intofeature/collector-decentralization-bootstrappingfrom
tim/7846-bootstrap-clustering
Oct 16, 2025
Merged

Add cluster bootstrapping commands#8013
tim-barry merged 14 commits intofeature/collector-decentralization-bootstrappingfrom
tim/7846-bootstrap-clustering

Conversation

@tim-barry
Copy link
Contributor

Adds the new bootstrapping command clustering.go to 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

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).
@tim-barry tim-barry requested a review from a team as a code owner October 6, 2025 15:34
@tim-barry tim-barry changed the title Add bootstrapping commands Add cluster bootstrapping commands Oct 6, 2025
Copy link
Member

@jordanschalm jordanschalm left a comment

Choose a reason for hiding this comment

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

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
Copy link
Member

Choose a reason for hiding this comment

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

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")
Copy link
Member

Choose a reason for hiding this comment

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

I think it is fine to make this non-required and set the default value to the default write path from the prior command

@tim-barry
Copy link
Contributor Author

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.

Copy link
Member

@durkmurder durkmurder left a comment

Choose a reason for hiding this comment

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

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"
Copy link
Member

Choose a reason for hiding this comment

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

looks like it will have two dots. "root-cluster-block-vote..json"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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>
Copy link
Member

@jordanschalm jordanschalm left a comment

Choose a reason for hiding this comment

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

🎸

@tim-barry tim-barry merged commit 8cfb923 into feature/collector-decentralization-bootstrapping Oct 16, 2025
57 checks passed
@tim-barry tim-barry deleted the tim/7846-bootstrap-clustering branch October 16, 2025 22:52
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 this pull request may close these issues.

4 participants