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

Remove internal partners from root block creation #6472

Merged
merged 4 commits into from
Sep 19, 2024

Conversation

zhangchiqing
Copy link
Member

This PR removes the internal partners from the partners in order to resolve the "not enough internal nodes" error we encountered during mainnet25 spork.

@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2024

Codecov Report

Attention: Patch coverage is 81.25000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 41.47%. Comparing base (5d89d4d) to head (ceb3ee2).

Files with missing lines Patch % Lines
cmd/util/cmd/common/node_info.go 81.81% 2 Missing ⚠️
cmd/bootstrap/run/qc.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6472    /-   ##
=======================================
  Coverage   41.46%   41.47%           
=======================================
  Files        2027     2027           
  Lines      144742   144754    12     
=======================================
  Hits        60018    60031    13     
- Misses      78516    78521     5     
  Partials     6208     6202    -6     
Flag Coverage Δ
unittests 41.47% <81.25%> ( <0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zhangchiqing zhangchiqing force-pushed the leo/fix-root-block-creation branch from 6811e49 to de6fec6 Compare September 17, 2024 18:47
Copy link
Member

@AlexHentschel AlexHentschel left a comment

Choose a reason for hiding this comment

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

I am fine with this PR, though I generally disagree with the underlying approach of this PR, because I feel it removes clarity and mangles previously useful definitions.

Previously, there was a clear definition:

  • we partition the consensus committee into "internal nodes" and "partner nodes"
  • "partner nodes" are the nodes whose private key we don't have access to
  • for "internal nodes", we have the private keys

The problem was that we didn't comply to this definition and had nodes appear in both sets. But instead of fixing this problem, I think this PR just adds a work-around that makes this one particular instance of the code tolerate this technically incorrect configuration.
How do we know that there aren't other places, where we rely on the convention that internal nodes and partner nodes don't have any overlap? If that was the case, we are just removing some check that would us prevent from proceeding with such a conceptually inconsistent configuration (overlap between partner and internal nodes). Now the changes are higher that we'll just generate incorrect results (overlap between partner and internal nodes) instead of failing.

Significantly weakening a clear definition introduces ambiguity and thereby additional error surface to the code. Lets at least add some minimal documentation about what is going on and what we mean with the terms "internal node" and "partner node", how we are deviating from dis convention in the code. Otherwise, we just layer on technical debt.

cmd/util/cmd/common/node_info.go Outdated Show resolved Hide resolved
cmd/bootstrap/cmd/rootblock.go Show resolved Hide resolved
cmd/bootstrap/cmd/rootblock.go Show resolved Hide resolved
@zhangchiqing zhangchiqing force-pushed the leo/fix-root-block-creation branch from 371d720 to ceb3ee2 Compare September 19, 2024 16:19
@zhangchiqing
Copy link
Member Author

Thanks for adding the comments. Yeah I agree they are helpful making the definitions more clear.

@zhangchiqing zhangchiqing added this pull request to the merge queue Sep 19, 2024
Merged via the queue into master with commit f2b0aa6 Sep 19, 2024
55 checks passed
@zhangchiqing zhangchiqing deleted the leo/fix-root-block-creation branch September 19, 2024 17:12
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