Require dual-provider agreement for nullifier range sync#111
Open
p0mvn wants to merge 4 commits into
Open
Conversation
Fetch each range from two lightwalletd providers, compare canonical payloads, and fail closed on any mismatch so checkpoint progress only advances on agreement. Add coverage for agreement and mismatch branches plus explicit provider-count guards in sync entrypoints.
Keep env-provided non-empty LWD_URLS values verbatim and only expand to default providers when using the default CLI URL fallback, with regression tests covering env pinning and empty-env fallback behavior.
p0mvn
commented
Jun 5, 2026
Comment on lines
+49
to
+60
| if let Ok(env_urls) = std::env::var("LWD_URLS") { | ||
| if !env_urls.trim().is_empty() { | ||
| return env_urls.split(',').map(|u| u.trim().to_string()).collect(); | ||
| } | ||
| } | ||
|
|
||
| if urls.len() == 1 && urls[0] == DEFAULT_SINGLE_LWD_URL { | ||
| if cli_url == DEFAULT_SINGLE_LWD_URL { | ||
| DEFAULT_LWD_URLS.iter().map(|s| s.to_string()).collect() | ||
| } else { | ||
| urls | ||
| vec![cli_url.to_string()] | ||
| } | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Note: drive-by fixing endpoint selection
Require exact index height matches for historical exports, enforce checkpoint offset usage in pir-export, and remove unreachable legacy rebuild code to eliminate mislabeled snapshot artifacts.
This reverts commit 76220e3.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
(height, nullifier)payloads before commitTest plan
cargo test -p nf-ingest sync_nullifierscargo check -p nf-server