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

fix(rln): set maxEpochGap as maximum epoch gap #1257

Merged
merged 2 commits into from
Oct 10, 2022
Merged

fix(rln): set maxEpochGap as maximum epoch gap #1257

merged 2 commits into from
Oct 10, 2022

Conversation

s1fr0
Copy link
Contributor

@s1fr0 s1fr0 commented Oct 10, 2022

According to 17/WAKU-RLN-RELAY RFC:

Epoch Validation If the epoch attached to the message is more than max_epoch_gap apart from the routing peer’s current epoch then the message is discarded and considered invalid.

Currently, messages with gap equal to maxEpochGap are marked as invalid. This PR fixes the epoch gap check in order to mark invalid only messages with epoch gap greater than maxEpochGap.

@staheri14 This change seems further beneficial for rln-js where, when debugging with the browser console open, proof generation could take 10s and messages will be relayed much later than when created (and discarded). We might revert or adjust maxEpochGap in further PRs with a deeper analysis.

@s1fr0 s1fr0 added the track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications label Oct 10, 2022
@s1fr0 s1fr0 requested review from rymnc and jm-clius October 10, 2022 17:24
@s1fr0 s1fr0 self-assigned this Oct 10, 2022
@rymnc
Copy link
Contributor

rymnc commented Oct 10, 2022

LGTM, thanks 😁

@rymnc rymnc requested review from staheri14 and removed request for richard-ramos October 10, 2022 17:25
@status-im-auto
Copy link
Collaborator

status-im-auto commented Oct 10, 2022

Jenkins Builds

Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ e4dab7c #1 2022-10-10 17:44:34 ~19 min linux 📦bin
✔️ e4dab7c #1 2022-10-10 17:46:48 ~21 min macos 📦bin
✔️ 6a0001b #2 2022-10-10 19:05:04 ~15 min linux 📦bin
✔️ 6a0001b #2 2022-10-10 19:06:15 ~16 min macos 📦bin

@s1fr0 s1fr0 merged commit f282621 into master Oct 10, 2022
@s1fr0 s1fr0 deleted the maxepoch-patch branch October 10, 2022 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants