Skip to content

Dynamic feebumping riddance#122

Merged
darosior merged 14 commits intorevault:masterfrom
darosior:feebumping_riddance
May 6, 2022
Merged

Dynamic feebumping riddance#122
darosior merged 14 commits intorevault:masterfrom
darosior:feebumping_riddance

Conversation

@darosior
Copy link
Copy Markdown
Member

@darosior darosior commented Feb 15, 2022

This implements revault/practical-revault#119.

The conceptual simplification of the transactions management enabled some cleanups and refactorings, which i jumped on right away in this PR.

@darosior darosior force-pushed the feebumping_riddance branch 3 times, most recently from 121e082 to d972edc Compare February 22, 2022 15:01
@darosior darosior force-pushed the feebumping_riddance branch 2 times, most recently from 46ed4fa to 6d0ad62 Compare February 25, 2022 09:20
@darosior darosior changed the title Feebumping riddance Dynamic feebumping riddance May 2, 2022
@darosior darosior requested a review from edouardparis May 5, 2022 08:31
Comment thread src/transactions/mod.rs
Comment thread src/transactions/mod.rs
feerate_20: CancelTransaction::new(
unvault_txin.clone(),
&der_deposit_descriptor,
Amount::from_sat(5), // vbytes to WU
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

note to self: 1 vbyte = 4 WU

Copy link
Copy Markdown
Member

@edouardparis edouardparis left a comment

Choose a reason for hiding this comment

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

one nit. fuzzing and testing gives me no errors

darosior added 14 commits May 5, 2022 16:44
This is now a valid check for all presigned txs, no need to have a
separate helper anymore.
There is conceptually a distinction between the Unvault, Cancel,
Emergency's on one hand and the Spend on the other hand. We treat them
differently in revaultd, and we've already been in the situation where
we wanted a function to generalistically take a Cancel, Unvault,
Emergency but not a Spend transaction.

However, it was previously convoluted to introduce a type distinction
between those, as the Unvault was still pretty different from the
revocation transactions.

Now that all the presigned transactions are single-input and signed with
ALL, this is possible to merge the common implementation of sighash() and
add_sig() for the first and single input into a single trait. This also
enables the type distinction that will turn out to be useful downstream.
Transaction never have more than 1 input anymore.
@darosior darosior force-pushed the feebumping_riddance branch from 8837216 to 461d83f Compare May 5, 2022 14:45
@darosior darosior requested a review from edouardparis May 5, 2022 14:45
Copy link
Copy Markdown
Member

@edouardparis edouardparis left a comment

Choose a reason for hiding this comment

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

ACK 461d83f

@darosior darosior merged commit 23f18b6 into revault:master May 6, 2022
@darosior darosior deleted the feebumping_riddance branch May 6, 2022 11:50
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