stacks-core icon indicating copy to clipboard operation
stacks-core copied to clipboard

Signers include coordinator metadata in messages and define NACK policy

Open 8marz8 opened this issue 1 year ago • 3 comments

Description

Enhancements are being made to signer messages by including coordinator metadata that reflects each signer's view of the stacks chain. This allows signers to compare the received metadata with their own chain view, determining if they are lagging behind. In cases where a signer identifies that they possess a more current view of the chain, they can issue a NACK message.

When configured to acknowledge NACK messages, the local signer accumulates and counts these messages. Upon reaching a predetermined threshold, it initiates a back-off delay. Both the threshold for triggering this delay and its duration are configurable settings for the signer.

Applicable issues

  • fixes #4292

8marz8 avatar Jan 31 '24 20:01 8marz8

Codecov Report

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

Comparison is base (7e51465) 82.76% compared to head (e6c98cc) 83.12%. Report is 50 commits behind head on next.

:exclamation: Current head e6c98cc differs from pull request most recent head 04161a6. Consider uploading reports for the commit 04161a6 to get more accurate results

Files Patch % Lines
stacks-signer/src/runloop.rs 52.59% 192 Missing :warning:
libsigner/src/messages.rs 65.04% 36 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4318      +/-   ##
==========================================
+ Coverage   82.76%   83.12%   +0.35%     
==========================================
  Files         446      446              
  Lines      319486   320434     +948     
==========================================
+ Hits       264436   266346    +1910     
+ Misses      55050    54088     -962     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Feb 01 '24 00:02 codecov[bot]

@8marz8 can you change this PR's base branch to Jacinta's branch? feat/signers-cast-dkg-vote. Otherwise it's too hard to review based on the files changed in this PR.

hstove avatar Feb 23 '24 15:02 hstove

@hstove yep, I rebased once, I can do again once her PR merges...but based on the coordinator convo, chances are none of these would really be required.

8marz8 avatar Feb 23 '24 15:02 8marz8