Skip to content

zkvm: execute block - #2554

Open
goodlyrottenapple wants to merge 9 commits into
sam/rlp-decode-blockfrom
sam/zkvm-execute-block
Open

goodlyrottenapple wants to merge 9 commits into
sam/rlp-decode-blockfrom
sam/zkvm-execute-block

Conversation

@goodlyrottenapple

Copy link
Copy Markdown
Contributor

No description provided.

@goodlyrottenapple
goodlyrottenapple changed the base branch from main to sam/rlp-decode-block September 11, 2026 12:35
@goodlyrottenapple
goodlyrottenapple marked this pull request as ready for review September 11, 2026 12:36
Comment thread zkvm/guest/ffi.cpp Outdated
Comment thread zkvm/guest/execute_block_zkvm.cpp Outdated
Comment thread zkvm/guest/body_roots.cpp
// along with this program. If not, see <http://www.gnu.org/licenses/>.

// Ordered-trie root for the block-body binding. Self-contained on purpose:
// the node computes these roots through its database machinery, which the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[P2] Hand-rolled MPT/RLP consensus code has no unit test

ordered_trie_root reimplements hex-prefix encoding, the embedded-node (<32-byte) rule, and RLP integer keys from scratch, and its correctness argument in this comment is only the end-to-end mainnet comparison — which the x86 runner exercises manually, not under ctest. A subtle bug (e.g. in the 128+-item key encoding, or the embedded-child threshold, which only bites with small receipts) would surface as an unexplained root mismatch far from this code. A small host-side gtest checking known vectors — empty trie → NULL_ROOT, a single item, and a >128-item trie against a canonical mainnet transactions root — would pin this down cheaply; per REVIEW.md § Testing, new source should carry a matching *_test.cpp.

Comment thread cmake/zkvm.cmake Outdated
Comment thread zkvm/guest/ffi.cpp Outdated
Comment thread zkvm/guest/execute_block_zkvm.cpp
Comment thread zkvm/guest/execute_block_zkvm.cpp Outdated
@goodlyrottenapple
goodlyrottenapple force-pushed the sam/zkvm-execute-block branch 3 times, most recently from b9e2e61 to f59d52b Compare September 14, 2026 14:57
@goodlyrottenapple
goodlyrottenapple force-pushed the sam/rlp-decode-block branch 2 times, most recently from 8052b2f to d12b6c0 Compare September 14, 2026 15:37
@goodlyrottenapple
goodlyrottenapple force-pushed the sam/zkvm-execute-block branch 4 times, most recently from 9740495 to 40b069f Compare September 15, 2026 09:55
claude and others added 4 commits September 15, 2026 06:59
The decoder currently loops while the payload is no less than 32 bytes, 
meaning it will silently drop any "trailing" bytes instead of throwing
a decoding error

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ansactions buffer for views

to undecoded transactions
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
goodlyrottenapple and others added 5 commits September 15, 2026 06:59
The guest CMakeLists builds two ways: a bare-metal RISC-V static archive
(cross-compile mode, driven by build-support) that adapts the host
monad_execution/monad_precompiles OBJECT libs via source/library drops, and
a host x86 test-runner executable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit 8176ab9)
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.

3 participants