Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPFP fixups and followups #332

Merged
merged 13 commits into from
Dec 14, 2021
Merged

CPFP fixups and followups #332

merged 13 commits into from
Dec 14, 2021

Conversation

darosior
Copy link
Member

This is a followup to #302, fixing inconsistencies and cleaning up a bit.
The revault_tx counterpart is at revault/revault_tx#117 .

tests/test_misc.py Outdated Show resolved Hide resolved
@darosior darosior mentioned this pull request Dec 13, 2021
2 tasks
fn cpfp_package(
revaultd: &Arc<RwLock<RevaultD>>,
bitcoind: &BitcoinD,
mut tx_package: Vec<impl CpfpableTransaction>,
current_feerate: u64,
mut tx_package: Vec<ToBeCpfped>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we call this a package?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not really, i fix it elsewhere IIRC. If not here, the rationale was that i didn't want to increase the diff by too much.

@darosior
Copy link
Member Author

Fixed your comment on the tests.

@darosior
Copy link
Member Author

Rebased on master for Github aesthetics

Copy link
Collaborator

@danielabrozzoni danielabrozzoni left a comment

Choose a reason for hiding this comment

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

ACK 5ae472c

I'll re-ack if you decide to set the revault_tx reference to master :)

Cargo.toml Outdated
@@ -21,8 +21,8 @@ path = "src/bin/cli.rs"
bench = []

[dependencies]
revault_tx = { git = "https://github.com/danielabrozzoni/revault_tx/", branch = "2021109_support_cpfp", features = ["use-serde"] }
revault_net = { git = "https://github.com/danielabrozzoni/revault_net/", branch = "revault_tx_update" }
revault_tx = { git = "https://github.com/darosior/revault_tx", branch = "cpfp_followupd", features = ["use-serde"] }
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suppose this can be set to master now?

@danielabrozzoni
Copy link
Collaborator

Uhm I just saw #302 (comment), I'll fix in #331 after this is merged

@darosior
Copy link
Member Author

darosior commented Dec 14, 2021 via email

A nit, but it makes the check and assumption on the two vectors lengths
closer. Also rename the 'listunspent' var for being self-descriptive.
This was incorrectly considering the set of unvaults (or spends) as "a
package". It's misleading as a package is usually used to refer to
linked transactions in Bitcoin (mempool) land.
Maybe this confusion caused the error: it considered the entire set of
transactions' feerate as if they somehow had an influence on each other
wrt mining.

Instead, filter transactions to be bumped individually. In addition we
introduce a threshold below which we don't feebump (probably not worth
paying for a CPFP if you are like 2sat/vb below the next block
feerate!).
Avoid two races, and sanity check the tx-cpfp pairs feerate.
@darosior
Copy link
Member Author

Update revault_tx and revault_net to their respective master

Make it huge so we can generate loads of blocks on CI without any issue
@darosior
Copy link
Member Author

Spurious HTTP timeout when generating blocks on CI: added a commit (unrelated to this PR, but hey CI won't be flaky then) making the timeout much larger so we are now fine with generating loads of blocks at once.

@danielabrozzoni
Copy link
Collaborator

ACK 580ba22

@darosior darosior merged commit 77b1c81 into revault:master Dec 14, 2021
@darosior darosior deleted the cpfp_fixed branch December 14, 2021 15:48
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