Skip to content

spammer: record onchain revert as error in db#418

Merged
zeroXbrock merged 3 commits intoflashbots:mainfrom
bitwiseguy:ss/record-tx-reverts
Jan 14, 2026
Merged

spammer: record onchain revert as error in db#418
zeroXbrock merged 3 commits intoflashbots:mainfrom
bitwiseguy:ss/record-tx-reverts

Conversation

@bitwiseguy
Copy link
Contributor

@bitwiseguy bitwiseguy commented Jan 14, 2026

Previously a tx only had a populated error field if it encountered a send-time errors (e.g. RPC failure, nonce issue, etc.). However, the error field was left as null if the tx reverted onchain. Since the code already checks each tx receipt, we can check the receipt.status field to determine if the tx reverted or not.

I'm also open to adding a new error field if you want to differentiate between offchain vs onchain error types.

Copy link
Member

@zeroXbrock zeroXbrock left a comment

Choose a reason for hiding this comment

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

nice addition, thanks @bitwiseguy! I just made some minor edits; get_tx_error now takes references to receipt & pending_tx to simplify the call and avoid confusion about which fields to pick if the function is used again elsewhere.

@zeroXbrock zeroXbrock merged commit 3b2541b into flashbots:main Jan 14, 2026
7 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.

2 participants