Skip to content

Conversation

@TomasArrachea
Copy link
Collaborator

Addresses #1139

This PR modifies the sync_nullifiers implementation on the TonicRpcClient to chunk the requested nullifiers and then aggregate the response, to avoid violating the RPC limit set on the node.

@TomasArrachea TomasArrachea force-pushed the tomasarrachea-sync-nullifiers-limit branch from a85a7a9 to d8c9cf7 Compare December 4, 2025 22:41
@TomasArrachea TomasArrachea changed the base branch from main to next December 4, 2025 22:41
Comment on lines -444 to -448
if !seen_nullifiers.insert(nullifier_update.nullifier) {
return Err(RpcError::InvalidResponse(
"duplicate nullifier found in response".to_string(),
));
}
Copy link
Collaborator Author

@TomasArrachea TomasArrachea Dec 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check made the sync_nullifiers to error if a duplicate nullifier was received. Now we just ignore duplicates, since that might happen when processing a chunk that contains a nullifier that collides with a nullifier handled previously,

@TomasArrachea TomasArrachea marked this pull request as ready for review December 4, 2025 23:14
Copy link
Collaborator

@igamigo igamigo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Left a comment

@igamigo igamigo merged commit 61ea3f7 into next Dec 5, 2025
25 checks passed
@igamigo igamigo deleted the tomasarrachea-sync-nullifiers-limit branch December 5, 2025 21:30
@igamigo igamigo mentioned this pull request Dec 5, 2025
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.

4 participants