Skip to content

smite-ir: add SendError and SendWarning operations and generators - #257

Open
erickcestari wants to merge 4 commits into
lnfuzz:masterfrom
erickcestari:send-error-warning
Open

erickcestari wants to merge 4 commits into
lnfuzz:masterfrom
erickcestari:send-error-warning

Conversation

@erickcestari

Copy link
Copy Markdown
Contributor

Adds SendError and SendWarning operations plus a generator for each, so programs can send BOLT 1 error and warning messages and exercise the target's error handling and force-close paths. The generators use the all-zero channel_id one time in four to cover the "all channels" case.

Closes #256

@erickcestari

Copy link
Copy Markdown
Contributor Author

At the current state of the PR, adding SendError breaks AcceptChannelOracle for LDK (I haven't tested it with other implementations yet), because LDK accepts a new open_channel with the same temporary_channel_id after the first one has been errored out.

INFO  [smite::scenarios] Scenario initialized! Executing input...
INFO  [smite::runners] Reading input from "/input.bin"
DEBUG [smite_scenarios::scenarios::ir] [14.642µs] Executing IR program (138 instructions, 1674 input bytes)
DEBUG [smite_scenarios::executor] [630.406µs] SendOpenChannel: 331 bytes
DEBUG [smite_scenarios::executor] [812.627µs] RecvAcceptChannel: waiting
DEBUG [smite_scenarios::executor] [2.305253ms] RecvAcceptChannel: received
DEBUG [smite_scenarios::executor] [2.421323ms] SendError: 36 bytes
DEBUG [smite_scenarios::executor] [2.510861ms] SendOpenChannel: 331 bytes
DEBUG [smite_scenarios::executor] [2.516255ms] RecvAcceptChannel: waiting
DEBUG [smite_scenarios::executor] [3.631017ms] RecvAcceptChannel: received
ERROR [smite::runners] Test case failed: invalid accept_channel for temporary_channel_id 33c6df673bcc970e0d07f771b2dbe842304a1bf40a4527f5a450927e0f78a817: temporary_channel_id reuse: previous negotiation has not reached funding_created

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.

Implement SendError and SendWarning generators

1 participant