Skip to content

Conversation

instagibbs
Copy link
Member

Follow-ups to #29242

@DrahtBot
Copy link
Contributor

DrahtBot commented Mar 25, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK glozow, murchandamus, ismaelsadeeq, willcl-ark

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #29757 (feefrac: avoid explicitly computing diagram; compare based on chunks by sipa)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@instagibbs instagibbs force-pushed the 2024-03-diagram-followups branch from 4cfb540 to 252af7b Compare March 25, 2024 18:03
@DrahtBot
Copy link
Contributor

🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the
documentation.

Possibly this is due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.

Leave a comment here, if you need help tracking down a confusing failure.

Debug: https://github.com/bitcoin/bitcoin/runs/23064649168

@glozow glozow mentioned this pull request Mar 26, 2024
42 tasks
Copy link
Member

@glozow glozow left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for taking my test nits. I haven't run the package_rbf fuzzer with changes yet. Will review again after rebase.

inline FeeFrac& operator=(const FeeFrac&) noexcept = default;

/** Check if this is empty (size and fee are 0). */
bool inline IsEmpty() const noexcept {
Copy link
Member

Choose a reason for hiding this comment

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

style nit (feel free to ignore): Member functions are already inline, so could drop the inline everywhere. See https://en.cppreference.com/w/cpp/language/inline

A function defined entirely inside a class/struct/union definition, whether it's a member function or a non-member friend function, is implicitly an inline function ...

@instagibbs instagibbs force-pushed the 2024-03-diagram-followups branch from 252af7b to cebcced Compare March 26, 2024 12:20
@instagibbs
Copy link
Member Author

rebased on master, ready for more review

@glozow
Copy link
Member

glozow commented Mar 26, 2024

src/txmempool.cpp:1298:    // all_conflicts.  every such transaction will either be at its own feerate (followed 
src/txmempool.cpp:1299:    // by any descendant at its own feerate), or as a single chunk at the descendant's 

^^^
Trailing whitespace

@instagibbs instagibbs force-pushed the 2024-03-diagram-followups branch from de3af5f to ee1b9b2 Compare March 26, 2024 15:42
@DrahtBot
Copy link
Contributor

🚧 At least one of the CI tasks failed. Make sure to run all tests locally, according to the
documentation.

Possibly this is due to a silent merge conflict (the changes in this pull request being
incompatible with the current code in the target branch). If so, make sure to rebase on the latest
commit of the target branch.

Leave a comment here, if you need help tracking down a confusing failure.

Debug: https://github.com/bitcoin/bitcoin/runs/23103026830

@instagibbs
Copy link
Member Author

fixed, thanks

@glozow glozow requested a review from murchandamus March 27, 2024 15:28
Copy link
Member

@glozow glozow left a comment

Choose a reason for hiding this comment

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

ACK ee1b9b2, reviewed the changes and package_rbf fuzzer seems to run fine

@instagibbs
Copy link
Member Author

@sdaftuar @ismaelsadeeq @willcl-ark 🙏

Copy link
Contributor

@murchandamus murchandamus left a comment

Choose a reason for hiding this comment

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

crACK ee1b9b2

Copy link
Member

@ismaelsadeeq ismaelsadeeq left a comment

Choose a reason for hiding this comment

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

Code review ACK ee1b9b2

I've tested this locally but havent run the fuzz test.

Feel free to ignore the review comments below, mostly style nits.

Copy link
Member

Choose a reason for hiding this comment

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

nit: commit is not really a spelling mistake but grammar fix
"ImprovesFeerateDiagram: doc fix and removal of unused diagram vectors"

@@ -67,6 +98,20 @@ static CTransactionRef add_descendant_to_parents(const std::vector<CTransactionR
return child_tx;
}

// Makes two children for a single parent
Copy link
Member

Choose a reason for hiding this comment

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

nit: code is self explanatory

Suggested change
// Makes two children for a single parent

@@ -67,6 +98,20 @@ static CTransactionRef add_descendant_to_parents(const std::vector<CTransactionR
return child_tx;
}

// Makes two children for a single parent
static std::pair<CTransactionRef, CTransactionRef> add_children_to_parent(const CTransactionRef parent, CTxMemPool& pool)
Copy link
Member

Choose a reason for hiding this comment

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

nit:

Suggested change
static std::pair<CTransactionRef, CTransactionRef> add_children_to_parent(const CTransactionRef parent, CTxMemPool& pool)
static std::pair<CTransactionRef, CTransactionRef> add_two_children_to_parent(const CTransactionRef parent, CTxMemPool& pool)

@@ -116,6 +161,10 @@ BOOST_FIXTURE_TEST_CASE(rbf_helper_functions, TestChain100Setup)
const auto tx12 = make_tx(/*inputs=*/ {m_coinbase_txns[8]}, /*output_values=*/ {995 * CENT});
pool.addUnchecked(entry.Fee(normal_fee).FromTx(tx12));

// Will make two children of this single parent
const auto tx13 = make_tx(/*inputs=*/ {m_coinbase_txns[9]}, /*output_values=*/ {995 * CENT, 995 * CENT});
Copy link
Member

Choose a reason for hiding this comment

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

style nit

Suggested change
const auto tx13 = make_tx(/*inputs=*/ {m_coinbase_txns[9]}, /*output_values=*/ {995 * CENT, 995 * CENT});
const auto tx13 = make_tx(/*inputs=*/{m_coinbase_txns[9]}, /*output_values=*/{995 * CENT, 995 * CENT});

const auto entry_sibling_2 = pool.GetIter(two_siblings.second->GetHash()).value();
BOOST_CHECK_EQUAL(pool.CheckConflictTopology({entry_sibling_1}).value(), strprintf("%s is not the only child of parent %s", entry_sibling_1->GetSharedTx()->GetHash().ToString(), entry13_unchained->GetSharedTx()->GetHash().ToString()));
BOOST_CHECK_EQUAL(pool.CheckConflictTopology({entry_sibling_2}).value(), strprintf("%s is not the only child of parent %s", entry_sibling_2->GetSharedTx()->GetHash().ToString(), entry13_unchained->GetSharedTx()->GetHash().ToString()));

Copy link
Member

Choose a reason for hiding this comment

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

style nit: trailing line

Suggested change

Copy link
Member

@willcl-ark willcl-ark left a comment

Choose a reason for hiding this comment

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

ACK ee1b9b2

Amendments look good to me.

@instagibbs
Copy link
Member Author

@ismaelsadeeq I'll consider these if I have to touch again

@achow101 achow101 merged commit 61de64d into bitcoin:master Mar 29, 2024
@bitcoin bitcoin locked and limited conversation to collaborators Mar 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants