Skip to content

fix(execution): integrate native rc9 and upstream correctness fixes - #6

Draft
Mohiiit wants to merge 8 commits into
devfrom
fix/native-upstream-hardening-20261104
Draft

Mohiiit wants to merge 8 commits into
devfrom
fix/native-upstream-hardening-20261104

Conversation

@Mohiiit

@Mohiiit Mohiiit commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Integrate the Alliance RC.9 native fork and align the Cairo compiler/toolchain. Backport upstream UTF-8 error-stack handling, ordered builtin validation, and null empty-span decoding fixes. SHA-512 stays unsupported in Native to match this version of the VM and OS.

All 18 targeted Blockifier regressions pass. Blockifier and Starknet OS compile on Linux; the compiler-version check and OS, virtual OS, and aggregator program-hash checks pass. The empty-span deployment passes through both modern and deprecated OS syscall decoding; removing either fix reproduces the expected relocatable-pointer failure. Mainnet snapshot replay is still pending.

Preserves the existing dev/SNOS performance changes and supersedes the RC.6-only native pin from #5. Consumed by Madara starkware-libs#1306 and the matching SNOS candidate.

Mohiiit and others added 8 commits November 4, 2026 08:24
…are-libs#14463)

ErrorStack::Display trims over-long traces by keeping a head slice
([..TRACE_LENGTH_CAP/2]) and a tail slice ([len - TRACE_LENGTH_CAP/2..]),
using raw byte indices. Rust str slicing panics if an index isn't a char
boundary, so any multi-byte UTF-8 character straddling either cut point
panics the formatter. Trace content includes contract/VM-controlled
strings (revert reasons, VM error attributes), so this is reachable from
external input.

Snap both cut points to char boundaries via floor_char_boundary /
ceil_char_boundary helpers (the std equivalents are still unstable),
mirroring the char-safe truncation already used by Cairo1RevertSummary.

Add a regression test (head and tail cut-point cases) that places a 2-byte
'é' straddling each cut point; it panics on the old byte-slice code and
passes on the fix.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…starkware-libs#14841)

Add a runtime safety net in initialize_execution_context_with_runner_mode
that rejects a Cairo 1 entry point whose builtins are not an ordered
subsequence of the supported set (CAIRO1_SUPPORTED_BUILTINS, mirroring the OS
SelectableBuiltins struct), right before they are handed to the Cairo runner.

The Sierra compiler already enforces this at compile time; this check is a
defensive guard at the point of use, rather than at declare/add_class time as
in starkware-libs#14801.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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