Skip to content

29242 Diagram check followups - #29724

Merged
achow101 merged 17 commits into
bitcoin:masterfrom
instagibbs:2024-03-diagram-followups
Mar 29, 2024
Merged

achow101 merged 17 commits into
bitcoin:masterfrom
instagibbs:2024-03-diagram-followups

Conversation

@instagibbs

Copy link
Copy Markdown
Member

Follow-ups to #29242

@DrahtBot

DrahtBot commented Mar 25, 2024 •

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
57 tasks done

@glozow glozow left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread src/txmempool.cpp Resolved
Comment thread src/test/rbf_tests.cpp Resolved
Comment thread src/test/rbf_tests.cpp Resolved
Comment thread src/test/rbf_tests.cpp Resolved
Comment thread src/test/rbf_tests.cpp Resolved
Comment thread src/test/fuzz/rbf.cpp Resolved
Comment thread src/util/feefrac.h Outdated

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.

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
Copy Markdown
Member Author

rebased on master, ready for more review

@glozow

glozow commented Mar 26, 2024

Copy link
Copy Markdown
Contributor
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
Copy Markdown
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
Copy Markdown
Member Author

fixed, thanks

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

@glozow glozow left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member Author

@sdaftuar @ismaelsadeeq @willcl-ark 🙏

@murchandamus murchandamus left a comment

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.

crACK ee1b9b2

@ismaelsadeeq ismaelsadeeq left a comment

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.

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.

Comment thread src/policy/rbf.cpp

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.

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

Comment thread src/test/rbf_tests.cpp
return child_tx;
}

// Makes two children for a single parent

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.

nit: code is self explanatory

Suggested change
// Makes two children for a single parent

Comment thread src/test/rbf_tests.cpp
}

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

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.

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)

Comment thread src/test/rbf_tests.cpp
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
Copy Markdown
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});

Comment thread src/test/rbf_tests.cpp
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
Copy Markdown
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

@willcl-ark willcl-ark left a comment

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.

ACK ee1b9b2

Amendments look good to me.

@instagibbs

Copy link
Copy Markdown
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