Skip to content

feat(gas): add tornado cash unshield + railgun unshield + transfer#10

Merged
NicoSerranoP merged 1 commit intomainfrom
feat/unshield-and-transfer
Feb 16, 2026
Merged

feat(gas): add tornado cash unshield + railgun unshield + transfer#10
NicoSerranoP merged 1 commit intomainfrom
feat/unshield-and-transfer

Conversation

@NicoSerranoP
Copy link
Copy Markdown
Member

  • Added railgun unshield + transfer benchmarks
  • Added tornado cash unshield (there is no internal transfer available)
  • Added privacy pools unshield (there is no internal transfer available)

@NicoSerranoP NicoSerranoP requested review from 0xmad, JohnGuilding and Copilot and removed request for Copilot February 13, 2026 22:56
Copilot AI review requested due to automatic review settings February 14, 2026 16:32
@NicoSerranoP NicoSerranoP force-pushed the feat/unshield-and-transfer branch from 09c1d27 to a55ac85 Compare February 14, 2026 16:32
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the gas benchmarking capabilities by adding unshield and transfer operation benchmarks for privacy-preserving protocols (Tornado Cash, Railgun, and Privacy Pools). The changes include a safeguard to prevent infinite RPC loops when insufficient historical events exist, and follow the established benchmarking patterns consistently across all three protocols.

Changes:

  • Added MAX_NUMBER_OF_RPC_TRIES constant and retry limit logic in getEventLogs to prevent infinite loops when insufficient events are available
  • Implemented benchmarkUnshield for Tornado Cash, Railgun, and Privacy Pools protocols
  • Implemented benchmarkTransfer for Railgun protocol (internal private transfers)
  • Added event ABIs and constants for unshield and transfer operations across all protocols
  • Updated Tornado Cash Router documentation reference URL

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
gas-benchmarks/src/utils/rpc.ts Added retry counter and MAX_NUMBER_OF_RPC_TRIES limit to prevent infinite RPC calls
gas-benchmarks/src/utils/constants.ts Added MAX_NUMBER_OF_RPC_TRIES constant (set to 10)
gas-benchmarks/src/tornado-cash/index.ts Added benchmarkUnshield method following established pattern
gas-benchmarks/src/tornado-cash/constants.ts Added STAKE_BURNED_EVENT_ABI, TORNADO_CASH_RELAYER_REGISTRY, NUMBER_OF_UNSHIELD_EVENTS, and updated Router URL reference
gas-benchmarks/src/railgun/index.ts Added benchmarkUnshield and benchmarkTransfer methods
gas-benchmarks/src/railgun/constants.ts Added UNSHIELD_EVENT_ABI, NULLIFIED_EVENT_ABI, NUMBER_OF_UNSHIELD_EVENTS, and NUMBER_OF_TRANSFER_EVENTS
gas-benchmarks/src/privacy-pools/index.ts Added benchmarkUnshield method
gas-benchmarks/src/privacy-pools/constants.ts Added WITHDRAWAL_RELAYED_EVENT_ABI and NUMBER_OF_UNSHIELD_EVENTS

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

@JohnGuilding JohnGuilding left a comment

Choose a reason for hiding this comment

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

Looks good!

Comment thread gas-benchmarks/src/privacy-pools/constants.ts
Comment thread gas-benchmarks/src/privacy-pools/constants.ts Outdated
Comment thread gas-benchmarks/src/utils/rpc.ts Outdated
@NicoSerranoP NicoSerranoP force-pushed the feat/unshield-and-transfer branch from a55ac85 to e01a056 Compare February 16, 2026 21:47
@NicoSerranoP NicoSerranoP merged commit aaa0a3e into main Feb 16, 2026
1 check passed
@NicoSerranoP NicoSerranoP deleted the feat/unshield-and-transfer branch February 16, 2026 22:00
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.

3 participants