Skip to content

feat(spice): epoch transition with uncertified chunks last_proposal#14980

Draft
darioush wants to merge 5 commits intonear:masterfrom
darioush:last-proposals
Draft

feat(spice): epoch transition with uncertified chunks last_proposal#14980
darioush wants to merge 5 commits intonear:masterfrom
darioush:last-proposals

Conversation

@darioush
Copy link
Contributor

@darioush darioush commented Feb 4, 2026

  • In SPICE, validator proposals come from execution results (not chunk headers). Block production and validation now source proposals from SpiceCoreStatement::ChunkExecutionResult entries instead of chunk headers.
  • At epoch boundaries, staking proposals from uncertified chunks are included in last_proposals to prevent incorrect stake return. Without this, a validator who re-stakes late in an epoch could have their locked stake incorrectly returned.
  • Refactored block proposal validation into a validate_block_proposals helper that handles both SPICE and non-SPICE blocks.

@darioush darioush changed the title feart(spice): epoch transition with uncertified chunks last_proposal feat(spice): epoch transition with uncertified chunks last_proposal Feb 4, 2026
@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

❌ Patch coverage is 20.00000% with 52 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.80%. Comparing base (3886ec4) to head (d61d167).

Files with missing lines Patch % Lines
chain/chain/src/spice_core.rs 0.00% 32 Missing ⚠️
chain/chain/src/chain.rs 52.17% 11 Missing ⚠️
chain/client/src/chunk_executor_actor.rs 0.00% 8 Missing ⚠️
core/primitives/src/block.rs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #14980       +/-   ##
===========================================
+ Coverage    1.30%   68.80%   +67.50%     
===========================================
  Files         725      919      +194     
  Lines      140594   201207    +60613     
  Branches   140594   201207    +60613     
===========================================
+ Hits         1835   138447   +136612     
+ Misses     138706    56790    -81916     
- Partials       53     5970     +5917     
Flag Coverage Δ
pytests-nightly 1.30% <0.00%> (-0.01%) ⬇️
unittests 68.43% <20.00%> (?)
unittests-nightly 68.36% <20.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant