Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a75b0e1
chore(codegen): drop ruby templates (moved to genvm-tool codegen) 🔥
kp2pml30 Jun 30, 2026
3bcc7f4
feat(modules-interfaces): decouple from sdk-rs with own payload types ✨
kp2pml30 Jun 30, 2026
38f6534
feat(executor): add check command to verify runners and precompile ✨
kp2pml30 Jul 1, 2026
35c3f90
chore(runners): validate address in runners parsing ♻️
kp2pml30 Jul 1, 2026
315ed39
chore(wasi): remove unused json_to_calldata module 🔥
kp2pml30 Jul 1, 2026
7e6c2b3
chore(ci): scope coderabbit to version branches, skip root test fixtu…
kp2pml30 Jul 1, 2026
c669008
fix(wasm): allow SIMD float lane copies in det mode, test long embedd…
kp2pml30 Jul 2, 2026
8e0f9ba
chore(hooks): register commit-msg validation hook 🔧
kp2pml30 Jul 2, 2026
5906261
feat(fees): add multi-bucket tracking and restructure error taxonomy ✨♻️
kp2pml30 Jul 2, 2026
2d6ceff
feat(fees): contract-funded message fees, emission fee floors ✨
kp2pml30 Jul 2, 2026
765dcff
fix(third-party): save missed wasmtime nondet-instruction trap rename 💚
kp2pml30 Jul 2, 2026
4cf812a
feat(executor): account runner memory per vm ✨🔒️
kp2pml30 Jul 6, 2026
9fe458f
feat(executor): rename load cost to runner_load_cost ✨
kp2pml30 Jul 7, 2026
e5dbc58
fix(vm): update startup limits
kp2pml30 Jul 7, 2026
9855f48
feat: add signer_address, rework to meta-fields
kp2pml30 Jul 7, 2026
ed816e6
chore: refactor
kp2pml30 Jul 7, 2026
c3578a8
chore: split file
kp2pml30 Jul 7, 2026
251b057
chore: flush pending public abi ✨
kp2pml30 Jul 7, 2026
65308e3
chore: update runner hashes ✨
kp2pml30 Jul 7, 2026
db5f2ce
chore: simplify memlimiter ✨
kp2pml30 Jul 7, 2026
a7d97df
chore: migrate to manager provided structs ✨
kp2pml30 Jul 7, 2026
114118b
chore: adopt git-hooks.nix for commit hooks 🪝
kp2pml30 Jul 14, 2026
2eff323
chore(ci): match all dev base branches in coderabbit 🐰
kp2pml30 Jul 14, 2026
9f504b2
chore: split docs
kp2pml30 Jul 15, 2026
a210d2d
chore: fix tests
kp2pml30 Jul 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .coderabbit.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
reviews:
# Auto-review PRs targeting any long-lived branch: main, a release branch
# (v0.3.x) or its dev branch (v0.3-dev). Feature/topic branches are reviewed
# through the base they target. Patterns are regexes; keep them free of
# optional groups, an `(\.x|-dev)?` suffix here did not match `v0.3-dev`.
base_branches:
- "main"
- "v\\d+\\.\\d+"
- "v\\d+\\.\\d+\\.x"
- "v\\d+\\.\\d+-dev"
path_filters:
- "!**/*.onnx"
- "!**/*.txt"
Expand All @@ -10,3 +19,6 @@ reviews:
- "!runners/softfloat/berkeley-softfloat-3/**"
- "!executor/third-party/**"
- "!**/fuzz/inputs*/**"
# Root-level system-test fixtures (contracts, expected outputs); crate and
# runner test code under */tests/ is still reviewed.
- "!tests/**"
146 changes: 34 additions & 112 deletions .genvm-tool.py
Original file line number Diff line number Diff line change
@@ -1,119 +1,41 @@
"""Executor-root genvm-tool project config.

Loaded by genvm-tool (``common.load_project``) for this executor submodule; the
hook engine asks it for ``hooks(ctx)`` (was ``support/nix/precommit/hooks.toml``).
The umbrella test suite lives in the manager's ``.genvm-tool.py``.
Loaded by genvm-tool (``common.load_project``) for this executor submodule to
provide its build ``configure``/``integration`` config. The umbrella test suite
lives in the manager's ``.genvm-tool.py``; commit hooks live in this repo's
flake (git-hooks.nix).
"""


def hooks(ctx):
"""Executor commit-hook definitions (was support/nix/precommit/hooks.toml).
def integration():
"""Per-executor integration test configuration.

Tools resolve from the sibling flake's buildEnv (``nix = "<flake output>"``);
``builtin`` hooks run logic baked into genvm-tool. Formatters run in --check
mode so a hook's exit code alone decides pass/fail. ``files``/``exclude`` are
repo-relative (i.e. relative to executors/v0.3.x).
Returned dict is merged with the harness defaults; keys:
``ignore-hash`` — skip hash comparison for all tests in this executor line.
"""
return [
# --- generic checks (mirror the manager's) -------------------------
{
'id': 'trailing-whitespace',
'nix': 'pre-commit-hooks',
'entry': 'trailing-whitespace-fixer',
'types_or': ['text'],
'exclude': r'^\.git-third-party|/fuzz/',
},
{
'id': 'end-of-file-fixer',
'nix': 'pre-commit-hooks',
'entry': 'end-of-file-fixer',
'types_or': ['text'],
'exclude': r'^\.git-third-party|/fuzz/',
},
{
'id': 'check-added-large-files',
'nix': 'pre-commit-hooks',
'entry': 'check-added-large-files',
},
{
'id': 'check-json',
'nix': 'pre-commit-hooks',
'entry': 'check-json',
'types_or': ['json'],
'exclude': r'^\.git-third-party',
},
{
'id': 'check-yaml',
'nix': 'pre-commit-hooks',
'entry': 'check-yaml',
'types_or': ['yaml'],
},
{
'id': 'check-toml',
'nix': 'pre-commit-hooks',
'entry': 'check-toml',
'types_or': ['toml'],
},
{
'id': 'check-merge-conflict',
'nix': 'pre-commit-hooks',
'entry': 'check-merge-conflict',
'types_or': ['text'],
},
# --- executor-owned languages: python, c/c++, rust -----------------
{
'id': 'ruff-format',
'nix': 'ruff',
'entry': 'ruff',
'args': ['format', '--check'],
'fix_args': ['format'],
'types_or': ['python'],
},
{
'id': 'clang-format',
'nix': 'clang-tools',
'entry': 'clang-format',
'args': ['--dry-run', '--Werror'],
'fix_args': ['-i'],
'types_or': ['c', 'c++'],
'exclude': r'runners/softfloat/berkeley-softfloat-3|runners/py-libs',
},
{
'id': 'editorconfig-checker',
'nix': 'editorconfig-checker',
'entry': 'editorconfig-checker',
# text-only: keep binaries (e.g. runners/models/*.onnx) out of it.
'types_or': ['text'],
'exclude': r'\.git-third-party|runners/py-libs|runners/genlayer-py-std/src-emb/onnx|/fuzz/',
},
{
'id': 'cargo-fmt',
'nix': 'cargo',
'builtin': 'cargo-fmt',
'files': r'\.rs$',
'pass_filenames': False,
},
{
'id': 'nixfmt',
'nix': 'nixfmt',
'entry': 'nixfmt',
'args': ['--check'],
'fix_args': [],
'files': r'\.nix$',
},
{
'id': 'markdown-local-links',
'builtin': 'md-local-links',
'types_or': ['markdown'],
},
# --- local guard ---------------------------------------------------
{
# Refuse commits that leave the dev-mode runner toggle on (false).
'id': 'no-commit-test',
'local': True,
'entry': 'grep',
'args': ['-P', 'false', 'runners/support/versions/dev-mode.nix'],
'files': r'^runners/support/versions/dev-mode\.nix$',
'pass_filenames': False,
},
]
return {
'ignore-hash': True,
}


def configure(line):
"""Per-line build configuration for `genvm-tool configure`.

``line`` is a ``genvm_tool_plugins.ninja.LineContext`` the configure command
builds for this executor. This is a live line: its runner ``latest``/``all``
manifests are derived through the umbrella nix machinery (``nix_manifests``),
which imports every active line's runners.
"""
line.register_standard_codegen()
# Pending public-abi constants (ADR-012): constants that logically belong to
# the public ABI but are parked here so they do not regenerate the runner
# `public_abi.py` (which would change frozen runner hashes). Generated into the
# `common` crate only — never the runner tree.
line.codegen(
line.exec_root / 'executor/crates/common/src/public_abi_pending.rs',
'rust',
line.exec_root / 'executor/codegen/data/public-abi-pending.json',
)
line.register_standard_crates()
line.nix_manifests()
line.install_tree()
2 changes: 1 addition & 1 deletion .git-third-party/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"executor/third-party/wasmtime": {
"url": "https://github.com/bytecodealliance/wasmtime.git",
"commit": "6844a83b530f86ad13a65175282fe2dbcd33cad1",
"patches": 2,
"patches": 5,
"submodules": []
},
"executor/third-party/wasm-tools": {
Expand Down
51 changes: 51 additions & 0 deletions .git-third-party/patches/executor/third-party/wasmtime/3
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: kp2pml30 <kp2pml30@gmail.com>
Date: Thu, 2 Jul 2026 10:35:16 +0900
Subject: [PATCH] =?UTF-8?q?fix(wasm):=20allow=20SIMD=20float=20lane=20copy?=
=?UTF-8?q?=20ops=20in=20deterministic=20mode=20=F0=9F=90=9B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

f32x4/f64x2 splat, extract_lane and replace_lane are bit-exact copies
(no rounding or NaN semantics), matching the existing exception for
loads/bitcasts; genvm-floats-to-soft intentionally leaves them in
place, so trapping on them broke real numpy code paths.

Claude-Session: https://claude.ai/code/session_013QtkVNJFxWsNwCLhTp5idV
---
crates/cranelift/src/translate/code_translator.rs | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/crates/cranelift/src/translate/code_translator.rs b/crates/cranelift/src/translate/code_translator.rs
index 9dde783c..927df0f8 100644
--- a/crates/cranelift/src/translate/code_translator.rs
+++ b/crates/cranelift/src/translate/code_translator.rs
@@ -1750,7 +1750,8 @@ pub fn translate_operator(
}
Operator::F32x4Splat
| Operator::F64x2Splat => {
- if float_op_unreachable_check(environ, builder) { return Ok(()) }
+ // Lane duplication is a bit-exact copy (no rounding/NaN semantics),
+ // so it stays allowed in deterministic mode.
let splatted = builder.ins().splat(type_of(op), environ.stacks.pop1());
environ.stacks.push1(splatted)
}
@@ -1839,7 +1840,7 @@ pub fn translate_operator(
}
Operator::F32x4ExtractLane { lane }
| Operator::F64x2ExtractLane { lane } => {
- if float_op_unreachable_check(environ, builder) { return Ok(()) }
+ // Bit-exact lane copy; allowed in deterministic mode.
let vector = pop1_with_bitcast(environ, type_of(op), builder);
environ
.stacks
@@ -1864,7 +1865,7 @@ pub fn translate_operator(
}
Operator::F32x4ReplaceLane { lane }
| Operator::F64x2ReplaceLane { lane } => {
- if float_op_unreachable_check(environ, builder) { return Ok(()) }
+ // Bit-exact lane copy; allowed in deterministic mode.
let (vector, replacement) = environ.stacks.pop2();
let vector = optionally_bitcast_vector(vector, type_of(op), builder);
environ
92 changes: 92 additions & 0 deletions .git-third-party/patches/executor/third-party/wasmtime/4
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: kp2pml30 <kp2pml30@gmail.com>
Date: Thu, 2 Jul 2026 22:33:10 +0900
Subject: [PATCH] =?UTF-8?q?chore(wasm):=20rename=20DeterministicMode=20tra?=
=?UTF-8?q?p=20to=20NondetInstruction=20=E2=99=BB=EF=B8=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
crates/cranelift/src/func_environ.rs | 4 ++--
crates/cranelift/src/lib.rs | 4 ++--
crates/cranelift/src/translate/code_translator.rs | 2 +-
crates/environ/src/trap_encoding.rs | 8 ++++----
4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/crates/cranelift/src/func_environ.rs b/crates/cranelift/src/func_environ.rs
index 8f549ff5..0c5821fa 100644
--- a/crates/cranelift/src/func_environ.rs
+++ b/crates/cranelift/src/func_environ.rs
@@ -3929,9 +3929,9 @@ impl FuncEnvironment<'_> {
self.fuel_save_from_var(builder);
}

- pub fn trap_deterministic_mode(&mut self, builder: &mut FunctionBuilder) {
+ pub fn trap_nondet_instruction(&mut self, builder: &mut FunctionBuilder) {
self.fuel_before_unreachable(builder);
- self.trap(builder, crate::TRAP_DETERMINISTIC_MODE);
+ self.trap(builder, crate::TRAP_NONDET_INSTRUCTION);
self.stacks.reachable = false;
}

diff --git a/crates/cranelift/src/lib.rs b/crates/cranelift/src/lib.rs
index 4db70f6a..8119e7da 100644
--- a/crates/cranelift/src/lib.rs
+++ b/crates/cranelift/src/lib.rs
@@ -72,8 +72,8 @@ pub const TRAP_CONTINUATION_ALREADY_CONSUMED: TrapCode =
TrapCode::unwrap_user(Trap::ContinuationAlreadyConsumed as u8 + TRAP_OFFSET);
pub const TRAP_CAST_FAILURE: TrapCode =
TrapCode::unwrap_user(Trap::CastFailure as u8 + TRAP_OFFSET);
-pub const TRAP_DETERMINISTIC_MODE: TrapCode =
- TrapCode::unwrap_user(Trap::DeterministicMode as u8 + TRAP_OFFSET);
+pub const TRAP_NONDET_INSTRUCTION: TrapCode =
+ TrapCode::unwrap_user(Trap::NondetInstruction as u8 + TRAP_OFFSET);

/// Creates a new cranelift `Signature` with no wasm params/results for the
/// given calling convention.
diff --git a/crates/cranelift/src/translate/code_translator.rs b/crates/cranelift/src/translate/code_translator.rs
index 927df0f8..b5cf3d17 100644
--- a/crates/cranelift/src/translate/code_translator.rs
+++ b/crates/cranelift/src/translate/code_translator.rs
@@ -4574,6 +4574,6 @@ fn float_op_unreachable_check(environ: &mut FuncEnvironment<'_>, builder: &mut F
if environ.are_floats_enabled() {
return false;
}
- environ.trap_deterministic_mode(builder);
+ environ.trap_nondet_instruction(builder);
return true;
}
diff --git a/crates/environ/src/trap_encoding.rs b/crates/environ/src/trap_encoding.rs
index 2d49707b..fe4f0dea 100644
--- a/crates/environ/src/trap_encoding.rs
+++ b/crates/environ/src/trap_encoding.rs
@@ -142,8 +142,8 @@ pub enum Trap {
/// value.
UnalignedPointer,

- /// Deterministic mode violation
- DeterministicMode,
+ /// Nondeterministic instruction executed in deterministic mode
+ NondetInstruction,
// if adding a variant here be sure to update the `check!` macro below, and
// remember to update `trap.rs` and `trap.h` as mentioned above
}
@@ -196,7 +196,7 @@ impl Trap {
ListOutOfBounds
InvalidDiscriminant
UnalignedPointer
- DeterministicMode
+ NondetInstruction
}

None
@@ -242,7 +242,7 @@ impl fmt::Display for Trap {
ListOutOfBounds => "list content out-of-bounds",
InvalidDiscriminant => "invalid variant discriminant",
UnalignedPointer => "unaligned pointer",
- DeterministicMode => "deterministic mode violation (cpu)",
+ NondetInstruction => "nondeterministic instruction (cpu)",
};
write!(f, "wasm trap: {desc}")
}
Loading