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

Disable Microblocks in Epoch 2.5 #4561

Merged
merged 2 commits into from
Mar 21, 2024
Merged

Disable Microblocks in Epoch 2.5 #4561

merged 2 commits into from
Mar 21, 2024

Conversation

kantai
Copy link
Member

@kantai kantai commented Mar 19, 2024

Description

This PR disables microblock production and confirmation in Epoch 2.5 and will reject any blocks that attempt to confirm microblocks in Epoch 2.5 and beyond.

This is tested with a new integration test that first mines some blocks in Epoch 2.5 with a microblock only tx in the mempool, asserting that the transaction does not get confirmed and no new microblocks are produced. It then sets a test only flag which tells the miner to mine microblocks in 2.5 anyways, and asserts that the microblocks are produced but never confirmed. Finally, it sets another flag which tells the miner to confirm microblocks in 2.5 anyways, and asserts that the miner's blocks are no longer accepted.

Applicable issues

#4479

@kantai kantai linked an issue Mar 19, 2024 that may be closed by this pull request
@kantai kantai force-pushed the feat/2.5-no-microblocks branch from 8a121ff to 1c1aac9 Compare March 19, 2024 20:17
@kantai kantai force-pushed the feat/2.5-no-microblocks branch from 1c1aac9 to 4c1b5c5 Compare March 19, 2024 21:03
Copy link

codecov bot commented Mar 19, 2024

Codecov Report

Attention: Patch coverage is 98.28571% with 6 lines in your changes are missing coverage. Please review.

Project coverage is 83.35%. Comparing base (80adc27) to head (c9a97cb).
Report is 11 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4561      +/-   ##
==========================================
- Coverage   83.35%   83.35%   -0.01%     
==========================================
  Files         453      454       +1     
  Lines      328491   328792     +301     
  Branches      323      323              
==========================================
+ Hits       273822   274072     +250     
- Misses      54661    54712      +51     
  Partials        8        8              
Files Coverage Δ
stackslib/src/chainstate/burn/db/sortdb.rs 91.97% <100.00%> (-0.05%) ⬇️
stackslib/src/chainstate/coordinator/tests.rs 90.78% <100.00%> (ø)
stackslib/src/chainstate/stacks/db/blocks.rs 90.05% <100.00%> (+0.02%) ⬆️
stackslib/src/chainstate/stacks/miner.rs 81.04% <100.00%> (-0.01%) ⬇️
...lib/src/chainstate/stacks/tests/chain_histories.rs 95.71% <100.00%> (ø)
stackslib/src/net/mod.rs 72.92% <100.00%> (ø)
testnet/stacks-node/src/config.rs 63.91% <100.00%> (+0.02%) ⬆️
testnet/stacks-node/src/neon_node.rs 83.00% <100.00%> (+0.13%) ⬆️
testnet/stacks-node/src/tests/mod.rs 89.76% <ø> (ø)
testnet/stacks-node/src/tests/epoch_25.rs 97.39% <97.39%> (ø)

... and 19 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80adc27...c9a97cb. Read the comment docs.

jcnelson
jcnelson previously approved these changes Mar 20, 2024
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.

The code overall LGTM, so I'll approve for now. However, I think we'll also want to update the mempool admission logic to reject microblock-only transactions at epoch 2.5. That can be a separate PR if you want

@kantai
Copy link
Member Author

kantai commented Mar 20, 2024

The code overall LGTM, so I'll approve for now. However, I think we'll also want to update the mempool admission logic to reject microblock-only transactions at epoch 2.5. That can be a separate PR if you want

Yep -- we would probably also want to update the microblock downloading logic to reject microblocks after Epoch 2.5, but like the mempool changes, since those are not consensus critical, I'd prefer to handle them in a follow on PR.

Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

LGTM. My only thought was about the mempool rejection for transactions after 2.5 with the wrong anchor mode, but I see that was already discussed.

@saralab saralab enabled auto-merge March 21, 2024 14:23
@saralab saralab added this pull request to the merge queue Mar 21, 2024
Merged via the queue into next with commit 284945b Mar 21, 2024
2 checks passed
ASuciuX added a commit to ASuciuX/archived-stacks-core that referenced this pull request Mar 25, 2024
ASuciuX added a commit to ASuciuX/archived-stacks-core that referenced this pull request Mar 27, 2024
@blockstack-devops
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Epoch 2.5 should disable microblock production
5 participants