stacks-network/stacks-core

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

Closed this issue · 1 comments

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
}

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.