Skip to content

Feat/railgun gas benchmark#2

Merged
JohnGuilding merged 7 commits intomainfrom
feat/railgun-gas-benchmark
Feb 10, 2026
Merged

Feat/railgun gas benchmark#2
JohnGuilding merged 7 commits intomainfrom
feat/railgun-gas-benchmark

Conversation

@JohnGuilding
Copy link
Copy Markdown
Contributor

@JohnGuilding JohnGuilding commented Feb 9, 2026

What does this PR do:

  • Scaffold a foundry project
  • Add initial benchmark for Railgun using a real tx as test data
  • Record snapshots and saves them to RailgunSendBenchmark.json
  • Add CI to run fmt, build and tests

How to test this PR

  1. Run forge test -vv
  2. Run cast receipt 0x9691b06aeb81ae709ad478942a5307c5e5cc4597074f5b60e11b2033c1584580 gasUsed --rpc-url $ETH_RPC_URL to observe gas cost is similar to real tx
  3. Observe gas cost is similar to real tx

Future work

  • Add proof generation logic so we can use a locally generated proof
  • Add proof generation benchmarks logic

- Pull structs from railgun contracts
- Partly construct calldata
- Do not compare against real tx in test
- fmt
- add CI secret
@JohnGuilding JohnGuilding marked this pull request as ready for review February 9, 2026 19:50
Copy link
Copy Markdown
Member

@NicoSerranoP NicoSerranoP 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! I just left a couple of non-blocking comments to consider 🚀

Comment thread .github/workflows/test.yml
Comment thread LICENSE
Comment thread .gitmodules
Comment thread test/RailgunTransact.t.sol
Comment thread snapshots/RailgunSendBenchmark.json
JohnGuilding and others added 2 commits February 10, 2026 11:16
Co-authored-by: Nico Serrano <nnicosp@hotmail.com>
@JohnGuilding JohnGuilding merged commit 6882d6e into main Feb 10, 2026
1 check passed
@JohnGuilding JohnGuilding deleted the feat/railgun-gas-benchmark branch February 10, 2026 11:31
NicoSerranoP added a commit that referenced this pull request Feb 11, 2026
JohnGuilding pushed a commit that referenced this pull request Feb 11, 2026
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.

2 participants