Skip to content

Simplify QC Verification - #673

Closed
samliok wants to merge 3 commits into
mainfrom
qc-simplify
Closed

samliok wants to merge 3 commits into
mainfrom
qc-simplify

Conversation

@samliok

@samliok samliok commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

I was looking at how we do things in AvalancheGo and noticed a few things.

  1. avalanchego code already checks for duplicate signers
  2. avalanchego already checks the signer is part of the expected set.

So i think we should be able to remove these checks from the QC verification wrapper function in simplex.

@samliok
samliok marked this pull request as draft October 27, 2026 21:21
@samliok

samliok commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

Just a thought below...

Maybe for another PR, we can probably go one step deeper and remove the entire function. The only reason we need it at this point is because we pass in the isQuorum function that checks if the signers constitute a quroum. However, I think it's reasonable for the QC to be aware of the isQuorum function itself. Not exactly sure, because this means extra state for QCs to know(but in this case it seems relevant)

@samliok

samliok commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

After further review, i think its worht just removing the wrapper function. We can just check for isQuorum in qc.verify()

@yacovm

yacovm commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator
  1. Apart from bug fixes I don't want us to make any kinds of refactoring / simplifications at this point
  2. I think the right place to do checks of "avalanchego already checks the signer is part of the expected set." is in Simplex. How can Avalanchego know what is the expected set? The QC can't know that without being told.

@yacovm yacovm closed this Oct 28, 2026
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.

2 participants