lightningdevkit / ldk-node

A ready-to-go node implementation built using LDK.
Other
151 stars 82 forks source link

Failed to broadcast transaction, status 400, logged at ERROR level #412

Open whfuyn opened 2 days ago

whfuyn commented 2 days ago
2024-11-27 00:52:15 INFO  [lightning::chain::onchaintx:512] Triggering rebroadcast/fee-bump for request with inputs [OutPoint { txid: _, vout: 1 }]
2024-11-27 00:52:15 DEBUG [lightning::chain::package:1002] Adding claiming input for outpoint _:1
2024-11-27 00:52:15 INFO  [lightning::chain::onchaintx:535] Replaying onchain event to spend inputs [OutPoint { txid: _, vout: 1 }]
2024-11-27 00:52:15 INFO  [lightning::events::bump_transaction:915] Handling channel close bump (claim_id = _, commitment_txid = _)
2024-11-27 00:52:15 DEBUG [lightning::events::bump_transaction:673] Performing coin selection for commitment package (commitment and anchor transaction) targeting 200652 sat/kW
2024-11-27 00:52:15 DEBUG [lightning::events::bump_transaction:547] Attempting coin selection targeting 200652 sat/kW (force_conflicting_utxo_spend = false, tolerate_high_network_feerates = false)
2024-11-27 00:52:15 DEBUG [lightning::events::bump_transaction:729] Signing anchor transaction _
2024-11-27 00:52:15 INFO  [lightning::events::bump_transaction:751] Broadcasting anchor transaction _ to bump channel close with txid _
2024-11-27 00:52:15 ERROR [ldk_node::chain:1016] Failed to broadcast transaction _: HttpResponse { status: 400, message: "RPC error" }
2024-11-27 00:52:15 ERROR [ldk_node::chain:1016] Failed to broadcast transaction _: HttpResponse { status: 400, message: "RPC error" }

According to the error handling below, it looks like status 400 bad request should be logged at TRACE level. But the error is returned in a different variant (Error::HttpResponse vs. Error::Reqwest).

https://github.com/lightningdevkit/ldk-node/blob/b86e87df3c6d527c8c642813681d91ff1764488b/src/chain/mod.rs#L994-L1030

tnull commented 2 days ago

Thanks for reporting this! Yeah, it seems rust-esplora-client changed their error types and we need to change this special casing accordingly!