Skip to content

[TRIVIAL] Log a failed quote settlement's bundle at debug level - #5319

Merged
squadgazzz merged 1 commit into
mainfrom
solana-orderbook/be-406-debug-quote-bundle
Nov 19, 2026
Merged

squadgazzz merged 1 commit into
mainfrom
solana-orderbook/be-406-debug-quote-bundle

Conversation

@squadgazzz

@squadgazzz squadgazzz commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

Every quote settlement that fails in simulation should leave its bundle in the logs, so decode_bundle --simulate (#5318) can replay it. #5305 logs the bundle at trace level, which only the log filter socket turns on, and a restart turns it off again. The trace ran for an hour on 2026-11-18 and caught 412 bundles, while prod has about 5,400 such failures a day.

Initially, I wasn't sure whether we have a bug in our simulation logic, but after testing, this is not the case. So, this PR moves the bundle and its slot into the quote unverified, its settlement fails in simulation debug log, which prod already keeps. EVM does the same: when quote verification fails, TradeVerifier logs a Tenderly resimulation command at debug. The bundle adds about 15 MB of logs a day. The log's logs field goes, since simulateBundle always returns it empty for a failed transaction.

Changes

  • Log the bundle and its slot at debug level
  • Drop the failed quote bundle trace log

How to test

Existing tests.

Related issues

BE-406

@linear-code

linear-code Bot commented Nov 19, 2026

Copy link
Copy Markdown

BE-406

@squadgazzz squadgazzz changed the title [EASY] Log a failed quote settlement's bundle at debug level [TRIVIAL] Log a failed quote settlement's bundle at debug level Nov 19, 2026
@squadgazzz
squadgazzz marked this pull request as ready for review November 19, 2026 14:55
@squadgazzz
squadgazzz requested a review from a team as a code owner November 19, 2026 14:55
@claude

claude Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @squadgazzz's task in 16s —— View job


Review

No issues found. Merging the trace log into the existing debug log is correct. Lazy still defers the base64 encoding until the log is actually emitted. There are no other references to the old failed quote bundle message or to the verifier=trace filter.

@github-actions

Copy link
Copy Markdown

🤖 Claude reviewed this PR. Any issues are posted as inline comments on the relevant lines.

  • Runs automatically when a PR is opened or marked ready for review.
  • Re-run it: comment @claude on this PR (requires write access; bots and drafts are skipped).
  • Skip it: add the skip-claude-review label.

Won't run when: the PR is a draft, the author is a bot or lacks write access, or the skip-claude-review label is set.

@ropusaurio ropusaurio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, the log message is maintained so no filters break.

@squadgazzz
squadgazzz added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 49c170e Nov 19, 2026
25 checks passed
@squadgazzz
squadgazzz deleted the solana-orderbook/be-406-debug-quote-bundle branch November 19, 2026 17:23
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants