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

v2.0: gossip: ignore retransmitter signatures when comparing duplicate shreds (backport of #2673) #2699

Merged
merged 2 commits into from
Aug 23, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Aug 22, 2024

Problem

#1271 ignores the retransmitter signature when comparing shreds in order to generate a duplicate proof.

We need to do the same when verifying a duplicate proof received from gossip.

Summary of Changes

Ignore retransmitter signature when verifying a duplicate proof received through gossip


This is an automatic backport of pull request #2673 done by [Mergify](https://mergify.com).

…ds (#2673)

* gossip: ignore retransmitter signatures when comparing duplicate shreds

* pr feedback: compare rest of payload instead of setting sig

* pr feedback: remove dcou, pub(super)

(cherry picked from commit ff87ed9)

# Conflicts:
#	ledger/src/shred.rs
@mergify mergify bot requested a review from a team as a code owner August 22, 2024 16:22
@mergify mergify bot added the conflicts label Aug 22, 2024
Copy link
Author

mergify bot commented Aug 22, 2024

Cherry-pick of ff87ed9 has failed:

On branch mergify/bp/v2.0/pr-2673
Your branch is up to date with 'origin/v2.0'.

You are currently cherry-picking commit ff87ed9187.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   gossip/src/duplicate_shred.rs
	modified:   ledger/src/shred/merkle.rs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   ledger/src/shred.rs

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@AshwinSekar
Copy link

AshwinSekar commented Aug 22, 2024

This change fixes the duplicate blocks observed on testnet.

When checking if 2 shreds constitute a duplicate, we compare the payloads for a mismatch.
In the new shred format, a signature from the retransmitter is attached to the payload. These bits should not be a part of the comparison, as it is valid to receive the same shred from multiple sources.

Currently on testnet if we receive a duplicate proof for this situation via gossip, we erroneously mark the block as duplicate.

@AshwinSekar AshwinSekar merged commit 590a23c into v2.0 Aug 23, 2024
38 checks passed
@AshwinSekar AshwinSekar deleted the mergify/bp/v2.0/pr-2673 branch August 23, 2024 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants