feat: block kernel skeleton - #3703
Merged
Merged
Conversation
Establishes the public input/output contract for the block kernel plus the Rust plumbing that surrounds it. The kernel does not yet perform any verification: it drops its public inputs and emits the empty word output shape. Inputs are [PREV_BLOCK_COMMITMENT, BATCHES_COMMITMENT] and outputs are [BLOCK_COMMITMENT, NULLIFIER_COMMITMENT]. PREV_BLOCK_COMMITMENT anchors the block to the chain state it extends and will bind the previous header supplied through the advice provider. BATCHES_COMMITMENT is a new sequential hash over the block's BatchIds, which pins both the batch set and its order. BlockProof now carries an ExecutionProof, and LocalBlockProver proves an ExecutedBlock produced by the new BlockExecutor rather than returning a placeholder. towards #1706 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011x14HrJEs4WFDf1qcA898w
Trim the CHANGELOG entry to a single sentence and add the post-auto-pad stack tracker to the block kernel's main procedure. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011x14HrJEs4WFDf1qcA898w
prove_dummy was gated on cfg(any(feature = "testing", test)). Under cargo check --all-targets --no-default-features, the lib test target activates cfg(test), so prove_dummy compiled while miden-protocol/testing stayed off, leaving BlockProof::new_dummy undefined. cfg(test) is per-crate and does not enable a dependency's testing feature. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011x14HrJEs4WFDf1qcA898w
The block kernel itself is additive; what breaks is the BlockProof and LocalBlockProver rework. Separate the two so the BREAKING tag sits on the change that actually breaks callers. Also fix a typo in the kernel doc comment. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011x14HrJEs4WFDf1qcA898w
Fumuran
marked this pull request as ready for review
August 24, 2026 22:01
Fumuran
requested review from
PhilippGackstatter,
mmagician and
partylikeits1983
August 24, 2026 22:01
partylikeits1983
approved these changes
Aug 25, 2026
partylikeits1983
left a comment
Contributor
There was a problem hiding this comment.
Looks good!
I left two non blocking comments about adding batches_commitment to the BlockProof struct for future BlockProof verification and adding an e2e verification test. They can be addressed here or in a follow up.
PhilippGackstatter
approved these changes
Aug 25, 2026
PhilippGackstatter
left a comment
Contributor
There was a problem hiding this comment.
Looks good! Left a few suggestions.
BlockProof was a placeholder wrapper around nothing. ProvenTransaction and ProvenBatch both carry a raw ExecutionProof, so ProvenBlock now does the same and the wrapper is removed. Adds a TODO on the proof field: the kernel takes BATCHES_COMMITMENT as a public input, but ProvenBlock carries neither that commitment nor the BatchIds behind it, and BlockBody flattens away the per-batch grouping of transactions needed to recompute them. Until that is addressed the proof's claim cannot be reconstructed or reconciled against the block's data. Addresses #3703 (comment) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011x14HrJEs4WFDf1qcA898w
…mit for OrderedBatches
…_outputs respectively
Point the two block kernel entries at PR #3703 rather than the tracking issue, and fold the duplicate `### Changes` heading left by the merge from next back into one section. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011x14HrJEs4WFDf1qcA898w
…kernel-skeleton # Conflicts: # crates/miden-protocol/src/block/proven_block.rs # crates/miden-testing/src/mock_chain/chain_builder.rs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Towards #1706.
Block production is currently unproven:
LocalBlockProver::provereturns an emptyBlockProofwithout reading its inputs, and every validation and tree computation lives in native Rust inProposedBlock. Porting all of it to MASM at once is not tractable, so this follows the batch kernel's path (#2904) and lands the contract and the surrounding plumbing first, with a kernel that drops its inputs and emits the empty word output shape.The contract is:
PREV_BLOCK_COMMITMENTanchors the block to the chain state it extends and will bind the previous header that the kernel reads from the advice provider.BATCHES_COMMITMENTis needed because the header'stx_commitmentflattens batches away, losing the grouping that drives note erasure and block-note-tree placement.NULLIFIER_COMMITMENTfollows the shape proposed in this comment; it is worth keeping as a separate output becauseBlockBody::created_nullifiersis not checked against the header anywhere today.Changes
miden-block-kernelMASM package and itsbuild.rswiring, mirroringkernels/batch. It also had to be registered in the MASM workspace members, otherwise assembly fails with "package is not a member of a workspace".BlockKernelandBlockOutputsalongside the batch equivalents, plusOrderedBatches::commitmentfor the sequential hash over batch IDs thatBATCHES_COMMITMENTnames.BlockProofnow carries anExecutionProofwith real serialization, replacing the field-less placeholder and its two serialization TODOs.miden-block-provergainedBlockExecutorandExecutedBlock, andLocalBlockProver::provenow proves an executed block instead of returning a placeholder.The kernel verifies nothing yet, so the proof does not bind the block's account updates, notes or nullifiers;
LocalBlockProver's docs say so explicitly.MockChain::prove_blockkeeps usingprove_dummyto avoid proving a STARK per mock block. No commitments or account IDs change.