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

Adjust signer to send BlockResponse even after block is marked as GloballyAccepted (or rejected) #5451

Closed
hstove opened this issue Nov 12, 2024 · 1 comment · Fixed by #5454
Assignees

Comments

@hstove
Copy link
Contributor

hstove commented Nov 12, 2024

When a signer gets a block validation response back from its node, it first checks if it has locally marked the block as GloballyAccepted or GloballyRejected. If this is the case, the signer doesn't broadcast a BlockResponse.

It would be better for the signer to still broadcast a block response, for a few reasons:

  • Even if this signer has seen enough responses to mark the block as accepted, the miner and/or other signers might not have
  • For monitoring purposes, it's better to know that a signer broadcasted a block response a little slower than others, than to not know if the signer was "alive" or not
  • With potential behavior around withholding of PoX rewards, we don't want to be penalizing just because a signer is in the >70%th latency percentile for a block

Relevant code:

let mut block_info = match self
.signer_db
.block_lookup(self.reward_cycle, &signer_signature_hash)
{
Ok(Some(block_info)) => {
if block_info.state == BlockState::GloballyRejected
|| block_info.state == BlockState::GloballyAccepted
{
debug!("{self}: Received block validation for a block that is already marked as {}. Ignoring...", block_info.state);
return None;
}
block_info
}

@github-project-automation github-project-automation bot moved this to Status: 🆕 New in Stacks Core Eng Nov 12, 2024
@saralab saralab added this to the Nakamoto-3.0.x milestone Nov 14, 2024
@saralab saralab added the signer label Nov 14, 2024
@hstove hstove self-assigned this Nov 14, 2024
@hstove hstove moved this from Status: 🆕 New to Status: 💻 In Progress in Stacks Core Eng Nov 14, 2024
@hstove hstove closed this as completed Nov 20, 2024
@github-project-automation github-project-automation bot moved this from Status: 💻 In Progress to Status: ✅ Done in Stacks Core Eng Nov 20, 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 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Status: Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

3 participants