Skip to content

Fix deadpool announcement transaction selection + other fixes#39

Merged
ReverseControl merged 2 commits intoProjectFactor:mainfrom
NyanCatTW1:main
Feb 2, 2025
Merged

Fix deadpool announcement transaction selection + other fixes#39
ReverseControl merged 2 commits intoProjectFactor:mainfrom
NyanCatTW1:main

Conversation

@NyanCatTW1
Copy link
Copy Markdown
Member

@NyanCatTW1 NyanCatTW1 commented Feb 2, 2025

In BlockAssembler, the set of existing announcements (vIncludedAnnounces) isn't updated until a "package" of transactions is added to the assembled block
Therefore, when 2 announcements with same deadpool id appear in the same package of transactions, it slips through the existing BlockAssembler::TestPackageTransactions check and makes ContextualCheckBlock error out with dp-mult-ann, more than one announcement for a single deadpool entry.
This is causing existing versions of the node to fail to handle getblocktemplate requests, since there's currently 2 announcements on the same N in the mempool. This issue have brought down nearly all active miners on the network who upgraded their node.
This PR fixes the issue by adding a packageAnnounces variable in BlockAssembler::TestPackageTransactions and using it to check if the same deadpool id appeared twice in the current package

Some additional fixes included in this PR:

  • Typo fixed in CompareTxMemPoolEntryByAncestorBurnFee which was breaking transaction sorting by burnt fee
  • Added some missing #include directives, which were causing the node to fail to compile on newer GCC versions (for instance, it doesn't compile with GCC 14.2.1 without the fix)

@NyanCatTW1 NyanCatTW1 changed the title Fix deadpool announcement transaction selection Fix deadpool announcement transaction selection + other fixes Feb 2, 2025
@patricklodder
Copy link
Copy Markdown
Collaborator

functional tests pass on macOS arm64 w/ apple clang 16 (after updating pinned boost to 1.86, I'll open a PR for that separately shortly)

@ReverseControl ReverseControl merged commit d22afe9 into ProjectFactor:main Feb 2, 2025
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.

3 participants