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

Neon node mining error #5157

Closed
obycode opened this issue Sep 10, 2024 · 1 comment
Closed

Neon node mining error #5157

obycode opened this issue Sep 10, 2024 · 1 comment
Labels

Comments

@obycode
Copy link
Contributor

obycode commented Sep 10, 2024

I observed this situation on testnet:

  • Miner M1 mines block B1 and submits its block commit
  • Miner M2 mines block B2 and submits its block commit
  • Miner M3 has not yet received block B2, so it mines block B2', containing 4 transactions, and submits its block commit
  • Miner M3 receives block B2, so it mines block B3, containing 2 transactions
  • Miner M3 does not RBF its previous block commit with this new block B3, because B3 has less transactions than B2'

So basically miner M3 is intentionally reorging block B2 -- risking its block getting reorged (which it does) just to get a couple more transactions included in the block. This is not the best default strategy and was likely a mistake in the code. It should only prefer the block with more transactions if they are at the same height.

It hits this case and does not resubmit a new block commit, though the change should likely be made inside get_mine_attempt.

if miner_config.only_increase_tx_count
&& max_txs > u64::try_from(anchored_block.txs.len()).expect("too many txs")
{
info!("Relayer: Succeeded assembling subsequent block with {} txs, but had previously produced a block with {} txs", anchored_block.txs.len(), max_txs);
return None;
}

Note: this problem is not present after epoch 3.0.

@github-project-automation github-project-automation bot moved this to Status: 🆕 New in Stacks Core Eng Sep 10, 2024
@saralab saralab added this to the Nakamoto-3.0.x milestone Sep 11, 2024
@wileyj wileyj closed this as completed in 1eb20c8 Oct 24, 2024
@github-project-automation github-project-automation bot moved this from Status: 🆕 New to Status: ✅ Done in Stacks Core Eng Oct 24, 2024
@blockstack-devops
Copy link
Contributor

This issue 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 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Status: Status: ✅ Done
Development

No branches or pull requests

3 participants