Skip to content

Add dirty-spine gas regression coverage - #31

Merged
dangerousfood merged 1 commit into
masterfrom
codex/dirty-spine-gas-regressions
Aug 14, 2026
Merged

dangerousfood merged 1 commit into
masterfrom
codex/dirty-spine-gas-regressions

Conversation

@dangerousfood

Copy link
Copy Markdown
Collaborator

What changed

  • Reproduce the Railway Anvil native ETH/USDC order that exhausted a 537,248 gas limit.
  • Exercise the exact order node, tick, quantity, three observed partial fills, and final cancel proceeds.
  • Repeat the rest, partial-match, and cancel lifecycle against a 64-branch pathological right spine.
  • Check all six operations into the runtime gas snapshot.

Why

The incident trace showed a shallow dirty right spine being materialized before insertion. The isolated benchmark measures the observed rest at 528,120 gas, while its match and cancel remain below 100k. At depth 64, match and cancel remain near the expected ~400k ceiling, but dirty-spine rest reaches 3,931,430 gas. This distinguishes the deferred materialization problem from normal matching cost and gives a concrete baseline for the contract fix.

Incident transactions:

  • Failed OOG: 0xe4702419f4de3df0f31e4ce7b5dffcbfda2590b69c717abb6924be8dc0400a68
  • Successful retry: 0x1c3f782b619200f689a7f890f4777a446dd92bf97fd59823d7611c58aad45ce2

Validation

  • make test: 390 passed
  • focused isolated snapshot check: 6 passed
  • forge fmt --check
  • high-severity forge lint
  • git diff --check

@dangerousfood
dangerousfood marked this pull request as ready for review August 14, 2026 17:14
@dangerousfood
dangerousfood force-pushed the codex/dirty-spine-gas-regressions branch from 2cf8a9c to 025e335 Compare August 14, 2026 17:27
@dangerousfood
dangerousfood merged commit da8a976 into master Aug 14, 2026
19 checks passed
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.

1 participant