Skip to content

Skip signature verification in PutApprovals when same PK#463

Open
yacovm wants to merge 2 commits into
mainfrom
putApprovals
Open

Skip signature verification in PutApprovals when same PK#463
yacovm wants to merge 2 commits into
mainfrom
putApprovals

Conversation

@yacovm

@yacovm yacovm commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

PutApprovals copies approvals from the current store to a given store.
It snapshots the approvals and then calls HandleApproval on each approval,
but it also performs a signature verification which is redundant, because the signature
was already checked the first time it was inserted into the current approval store.

This commit simply refactors the code to enable PutApprovals to skip the signature check if it has the same PK.

yacovm added 2 commits July 24, 2026 01:29
- When failing verifying a block, e.replicationState.ResendFinalizationRequest is invoked and it's not thread safe.

- computeNewApprovals of MSM referenced the approval store but without memory coherency.

Signed-off-by: Yacov Manevich <yacov.manevich@avalabs.org>
PutApprovals copies approvals from the current store to a given store.
It snapshots the approvals and then calls HandleApproval on each approval,
but it also performs a signature verification which is redundant, because the signature
was already checked the first time it was inserted into the current approval store.

This commit simply refactors the code to enable PutApprovals to skip the signature check if it has the same PK.

Signed-off-by: Yacov Manevich <yacov.manevich@avalabs.org>
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.

1 participant