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

Feat/signers subscribe to burn blocks #4549

Merged
merged 5 commits into from Mar 18, 2024

Conversation

jferrant
Copy link
Collaborator

@jferrant jferrant commented Mar 16, 2024

  • Subscribes to burn block events
  • Store current reward cycle on the side. Only refresh reward cycle when a new burn block event arrives (prevents spamming the node needlessly)
  • Only attempt to initialize/refresh the current reward cycle signer if initializing the runloop
  • Only attempt to refresh a signer config for the NEXT reward cycle if in the prepare phase during runloop initialization OR have received a new burn block in the prepare phase and have still not been registered
  • Removes unused ClientErrors
  • This uncovered a bug in poststackerdbchunk error codes. Cleaned up as part of this PR

Closes: #4504

Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
…ight

Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Copy link

codecov bot commented Mar 16, 2024

Codecov Report

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

Project coverage is 77.52%. Comparing base (6278946) to head (48bbbd5).
Report is 22 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4549      +/-   ##
==========================================
- Coverage   83.35%   77.52%   -5.83%     
==========================================
  Files         453      453              
  Lines      328223   328494     +271     
  Branches      323      323              
==========================================
- Hits       273578   254676   -18902     
- Misses      54637    73810   +19173     
  Partials        8        8              
Files Coverage Δ
stacks-signer/src/client/mod.rs 74.07% <ø> (-25.08%) ⬇️
stacks-signer/src/client/stackerdb.rs 89.79% <0.00%> (ø)
stackslib/src/net/api/poststackerdbchunk.rs 81.11% <87.50%> (-1.05%) ⬇️
stacks-signer/src/client/stacks_client.rs 75.31% <78.57%> (-11.95%) ⬇️
testnet/stacks-node/src/tests/signer.rs 94.34% <91.30%> (+0.47%) ⬆️
stacks-signer/src/signer.rs 75.02% <65.21%> (-0.40%) ⬇️
libsigner/src/events.rs 77.69% <62.50%> (-1.90%) ⬇️
stacks-signer/src/runloop.rs 91.50% <90.98%> (+0.76%) ⬆️

... and 151 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 6278946...48bbbd5. Read the comment docs.

libsigner/src/events.rs Outdated Show resolved Hide resolved
jcnelson
jcnelson previously approved these changes Mar 18, 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.

LGTM; just minor nits

Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
Signed-off-by: Jacinta Ferrant <jacinta@trustmachines.co>
zone117x added a commit to hirosystems/stacks-regtest-env that referenced this pull request Mar 18, 2024
@jferrant jferrant requested a review from jcnelson March 18, 2024 19:14
Copy link
Collaborator

@xoloki xoloki left a comment

Choose a reason for hiding this comment

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

LGTM just a tiny question about caching the approved agg key at various layers

stacks-signer/src/signer.rs Show resolved Hide resolved
@jferrant jferrant added this pull request to the merge queue Mar 18, 2024
Merged via the queue into next with commit 0e9cf5d Mar 18, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants