wizardsardine / liana

The missing safety net for your coins
https://wizardsardine.com/liana
BSD 3-Clause "New" or "Revised" License
308 stars 55 forks source link

Can primary path detection implicitly based on nSequence conflict with anti fee sniping using nSequence? #45 #1173

Closed darosior closed 2 months ago

darosior commented 3 months ago
          Can this become an issue if we start doing anti fee sniping using nSequence? #45

_Originally posted by @darosior in https://github.com/wizardsardine/liana/pull/1172#discussion_r1665581347_

jp1ac4 commented 3 months ago

From an initial look, yes I think so if there's only a single input, unless perhaps if we only set values that don't correspond to the descriptor's timelocks. For multiple inputs, my understanding is we would only set nSequence for the first and so we could check that not all inputs have nSequence to distinguish from a recovery transaction.

The GUI may need to use one of the suggestions from https://github.com/wizardsardine/liana/pull/1150#discussion_r1658694811 if implicit detection is not possible.

jp1ac4 commented 3 months ago

In case it is possible to do implicitly, we should check if it's possible to move the logic to the LianaDescriptor::unsigned_tx_max_vbytes() method and remove the use_primary_path parameter.

nondiremanuel commented 2 months ago

Needs to be done together with #45

darosior commented 2 months ago

Closing, let's concentrate discussions in https://github.com/wizardsardine/liana/issues/45.