Skip to content

feat: embed commit-sealing timings in extra data#2277

Draft
minhd-vu wants to merge 1 commit into
feature/timenano-placeholder-forkfrom
feature/seal-timings-extradata
Draft

feat: embed commit-sealing timings in extra data#2277
minhd-vu wants to merge 1 commit into
feature/timenano-placeholder-forkfrom
feature/seal-timings-extradata

Conversation

@minhd-vu

Copy link
Copy Markdown
Contributor

Summary

Embed the producer's commit-sealing timings -- the same elapsed and finalize values logged by "Commit new sealing work" -- into the block's BlockExtraData, mirroring the existing TimeNano feature so the values can be read directly from the chain instead of scraped from logs.

  • Add SealElapsedNano and SealFinalizeNano optional fields to BlockExtraData, plus GetSealTimings getter and SetSealTimings setter.
  • Capture and embed the timings in miner commit() after FinalizeAndAssemble, gated on the Placeholder fork, rebuilding the block before sealing. The existing log line is left unchanged.
  • Presence-validate both fields in verifyHeader (errMissingSealTimings); values are per-producer and non-deterministic so only presence is checked, as with TimeNano and the Giugliano fields.

Executed tests

<what was actually run beyond CI's standard unit / integration / e2e gates: kurtosis scenarios, chaos runs, manual checks against Amoy / mainnet RPCs, devnet upgrades, etc. Include output or pointers to where the run lives.>

Rollout notes

<consensus-affecting? requires coordinated upgrade? backwards-compatible? operator-facing change?>

…ra data

Embed the producer's commit-sealing timings -- the same elapsed and finalize
values logged by "Commit new sealing work" -- into the block's BlockExtraData,
mirroring the existing TimeNano feature so the values can be read directly from
the chain instead of scraped from logs.

- Add SealElapsedNano and SealFinalizeNano optional fields to BlockExtraData,
  plus GetSealTimings getter and SetSealTimings setter.
- Capture and embed the timings in miner commit() after FinalizeAndAssemble,
  gated on the Placeholder fork, rebuilding the block before sealing. The
  existing log line is left unchanged.
- Presence-validate both fields in verifyHeader (errMissingSealTimings); values
  are per-producer and non-deterministic so only presence is checked, as with
  TimeNano and the Giugliano fields.
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
8.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

@codecov

codecov Bot commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 65.00000% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.42%. Comparing base (f1286ea) to head (296c175).

Files with missing lines Patch % Lines
core/types/block.go 70.96% 6 Missing and 3 partials ⚠️
miner/worker.go 0.00% 4 Missing and 1 partial ⚠️

❌ Your patch check has failed because the patch coverage (65.00%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@                          Coverage Diff                          @@
##           feature/timenano-placeholder-fork    #2277      +/-   ##
=====================================================================
- Coverage                              53.45%   53.42%   -0.04%     
=====================================================================
  Files                                    896      896              
  Lines                                 159770   159810      +40     
=====================================================================
- Hits                                   85413    85377      -36     
- Misses                                 69048    69109      +61     
- Partials                                5309     5324      +15     
Files with missing lines Coverage Δ
consensus/bor/bor.go 85.64% <100.00%> (+0.04%) ⬆️
miner/worker.go 77.48% <0.00%> (+<0.01%) ⬆️
core/types/block.go 43.57% <70.96%> (+2.32%) ⬆️

... and 18 files with indirect coverage changes

Files with missing lines Coverage Δ
consensus/bor/bor.go 85.64% <100.00%> (+0.04%) ⬆️
miner/worker.go 77.48% <0.00%> (+<0.01%) ⬆️
core/types/block.go 43.57% <70.96%> (+2.32%) ⬆️

... and 18 files with indirect coverage changes

🚀 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