fix(rpc): retire the legacy shieldedPool_* server - #119
Merged
Conversation
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.
shieldedPool_getMerkleProof paired a per-tree Merkle path with the ACTIVE root. Since the multi-tree forest landed, seal_tree resets PoseidonRoot every time a tree fills, so a note inside a sealed tree was served a proof anchored to a different tree entirely. The wallet would build something that fails is_known_root, and the funds would look frozen. The server also masked runtime API failures as an all-zero root via unwrap_or([0u8; 32]), turning a loud error into a silent one.
client/rpc-v2 already resolves the anchor correctly through get_root_for_leaf and additionally exposes tree_id, which the old server had no field for. Keeping two implementations of the same endpoint is what let them diverge in the first place, so this removes the stale one rather than patching it — a patch would have left the cause in place.
Verified there were no consumers: only the node registered it, and nothing in the repo calls shieldedPool_. The privacy_ namespace is a superset (5 methods vs 2).