Skip to content

smite-scenarios: log warning and tx_abort data on receive - #230

Merged
morehouse merged 1 commit into
lnfuzz:masterfrom
erickcestari:log-warning-message
Sep 4, 2026
Merged

smite-scenarios: log warning and tx_abort data on receive#230
morehouse merged 1 commit into
lnfuzz:masterfrom
erickcestari:log-warning-message

Conversation

@erickcestari

Copy link
Copy Markdown
Contributor

warning and tx_abort are, with error, the only wire messages that carry a human-readable data field. recv_non_ping already surfaces error through ExecuteError::PeerError, but a warning or tx_abort was handed back to the caller as-is, and callers only inspect the message type, so the text the target sent was lost.

Log the channel id and data at warn level before returning the message. The bytes are printed with a lossy UTF-8 conversion rather than filtered to printable ASCII: targets are cooperating implementations under test, so readability is the only concern.

@morehouse morehouse left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Did you run into a situation where this logging is helpful?

Comment thread smite-scenarios/src/executor.rs Outdated
Comment thread smite-scenarios/src/executor.rs Outdated
`warning` and `tx_abort` are, with `error`, the only wire messages that
carry a human-readable `data` field. `recv_non_ping` already surfaces
`error` through `ExecuteError::PeerError`, but a `warning` or `tx_abort`
was handed back to the caller as-is, and callers only inspect the
message type, so the text the target sent was lost.

Log the channel id and data at warn level before returning the message.
The bytes are printed with a lossy UTF-8 conversion rather than
filtered to printable ASCII: targets are cooperating implementations
under test, so readability is the only concern.
@erickcestari

Copy link
Copy Markdown
Contributor Author

Did you run into a situation where this logging is helpful?

Yes. I've noticed in the v1 funding flow and specially in the dual funding. There are a lot of these errors in the logs:

DEBUG [smite_scenarios::scenarios::ir] [7.28459ms] unexpected message: expected accept_channel2(65), got warning(1)
...
DEBUG [smite_scenarios::scenarios::ir] [16.802581ms] unexpected message: expected accept_channel2(65), got tx_abort(74)

@morehouse morehouse left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@morehouse
morehouse merged commit 8474544 into lnfuzz:master Sep 4, 2026
5 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