Skip to content

Separate out runtime errors from BlockValidationState using util::Expected - #200

Open
yuvicc wants to merge 16 commits into
bitcoin-dev-tools:masterfrom
yuvicc:2026-06-remove_enum_ie_7
Open

yuvicc wants to merge 16 commits into
bitcoin-dev-tools:masterfrom
yuvicc:2026-06-remove_enum_ie_7

Conversation

@yuvicc

@yuvicc yuvicc commented Sep 25, 2026

Copy link
Copy Markdown

PR 35646

yuvicc and others added 16 commits September 25, 2026 10:09
Keep the move-only error token with Notifications. Raise the notification once,
move the diagnostic into the token, and allow callers to replace the message
without firing another notification. Test construction and propagation.

Co-authored-by: Hodlinator <[email protected]>
Read fatal errors directly from ProcessNewBlock in submission callers. Test
block-write, undo-write, and post-validation flush failures, including the
absence of BlockChecked signals for fatal validation failures.

Since fatal AcceptBlock failures no longer emit BlockChecked, clean up
the submitted block source in peer processing when ProcessNewBlock
returns a fatal error.

Co-authored-by: Hodlinator <[email protected]>
Co-authored-by: optout <[email protected]>
Runtime failures are now returned separately through `util::Expected`, so `ValidationState`
only needs to represent valid and invalid validation outcomes.
Remove `M_ERROR`, `Error()`, and `IsError()`.
Validation state no longer represents runtime failures, so remove INTERNAL_ERROR from the kernel C API and C++ wrapper.
@github-actions

Copy link
Copy Markdown

Benchmark Results

Comparison to nightly master (median of last 7 runs):

  • dbcache=32000MiB: 35 min (nightly median of 7: 35 min, 2026-09-17 to 2026-09-24) -> -0.6% slower
  • dbcache=450MiB: 35 min (nightly median of 7: 34 min, 2026-09-17 to 2026-09-24) -> -3.3% slower

View detailed results
View nightly trend chart

@willcl-ark

Copy link
Copy Markdown

FYI I think this is ~ within our variance on each run (sadly).

We used to be pretty consistently < 1% on a no-change run, but as you can see form the nightly chart this has regressed recently.

@willcl-ark
willcl-ark force-pushed the master branch 5 times, most recently from 6641f00 to 4d67190 Compare October 2, 2026 06:29
@willcl-ark
willcl-ark force-pushed the master branch 5 times, most recently from d239cb9 to a2fcd12 Compare October 8, 2026 06:53
@willcl-ark
willcl-ark force-pushed the master branch 6 times, most recently from 01948fe to 135650b Compare November 3, 2026 07:25
@willcl-ark
willcl-ark force-pushed the master branch 7 times, most recently from 2d15c18 to 589f0d0 Compare November 10, 2026 07:55
@willcl-ark
willcl-ark force-pushed the master branch 5 times, most recently from 68e3cbc to 390b5d2 Compare November 17, 2026 08:42
@willcl-ark
willcl-ark force-pushed the master branch 6 times, most recently from 1e06cb3 to b61138c Compare November 25, 2026 09:25
@willcl-ark
willcl-ark force-pushed the master branch 5 times, most recently from 04cb42e to b8301d3 Compare December 2, 2026 22:15

This branch has not been deployed

No deployments
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.

2 participants