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

Fix mempool admission for Nakamoto Blocks #4149

Merged
merged 2 commits into from
Dec 11, 2023

Conversation

jferrant
Copy link
Collaborator

@jferrant jferrant commented Dec 11, 2023

Changes
- added get_nakamoto_block_height to check against nakamoto_staging_blocks in chainstate
- first attempt to check against nakamoto before checking against regular stacks when retrieving the block height in admission check

  • Remove PoisonMicroblock check and BadNonces recheck
  • Add test to use the submit_tx rather than bypassing the admission checks.

Fixes #4148

Copy link
Member

@kantai kantai left a comment

Choose a reason for hiding this comment

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

LGTM -- just some small feedback.

testnet/stacks-node/src/mockamoto/tests.rs Show resolved Hide resolved
stackslib/src/chainstate/stacks/db/blocks.rs Outdated Show resolved Hide resolved
stackslib/src/chainstate/stacks/db/blocks.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Dec 11, 2023

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (e716bb6) 21.11% compared to head (d28e4e9) 21.37%.

Files Patch % Lines
stackslib/src/chainstate/stacks/db/blocks.rs 57.14% 3 Missing ⚠️
testnet/stacks-node/src/mockamoto/tests.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4149      +/-   ##
==========================================
+ Coverage   21.11%   21.37%   +0.26%     
==========================================
  Files         418      418              
  Lines      295286   295286              
==========================================
+ Hits        62338    63107     +769     
+ Misses     232948   232179     -769     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jcnelson jcnelson left a comment

Choose a reason for hiding this comment

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

Thanks for tackling this! Requesting that you simply delete the code that gets the staging block height, because PoisonMicroblock transactions and queries against unconfirmed microblocks simply don't exist in Nakamoto.

Copy link
Member

@kantai kantai left a comment

Choose a reason for hiding this comment

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

LGTM!

@jferrant jferrant force-pushed the feat/nakamoto-mempool-admission branch 2 times, most recently from 3ef11cb to 168c2b3 Compare December 11, 2023 21:20
@jferrant jferrant force-pushed the feat/nakamoto-mempool-admission branch from 168c2b3 to d28e4e9 Compare December 11, 2023 21:55
@saralab saralab merged commit 9fc7617 into next Dec 11, 2023
2 checks passed
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.

None yet

4 participants