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

chore(rln-relay): Gracefully handle chain forks #1338

Closed
2 tasks done
Tracked by #1606
rymnc opened this issue Nov 3, 2022 · 0 comments · Fixed by #1623
Closed
2 tasks done
Tracked by #1606

chore(rln-relay): Gracefully handle chain forks #1338

rymnc opened this issue Nov 3, 2022 · 0 comments · Fixed by #1623
Assignees

Comments

@rymnc
Copy link
Contributor

rymnc commented Nov 3, 2022

Background

After #1266 has been solved, an issue arises where a peer

  1. Listens to a non-canonical chain
  2. Sees updates to the membership group
  3. Updates local Merkle tree accordingly
  4. The eth node sends over the canonical chain, which does not have the uncle chain's membership group updates

This results in the peer having a Merkle tree that cannot validate messages on the spam protected content topic anymore, since the validity of the message is tied to the root of the local Merkle tree.

Details

A graceful reconciliation mechanism which handles forks in the chain, and rolls back updates to the Merkle tree for a given set of blocks.

Acceptance criteria

  • Track block numbers with associated insertions and deletions to the membership group
  • Revert the changes that uncle blocks have introduced to the Merkle tree

cc: @staheri14 @s1fr0

@rymnc rymnc added the track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications label Nov 14, 2022
@rymnc rymnc added track:rlnp2p and removed track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications labels Jan 19, 2023
@rymnc rymnc self-assigned this Mar 15, 2023
@rymnc rymnc added this to the Release 0.17.0 milestone Mar 15, 2023
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 a pull request may close this issue.

2 participants