Skip to content

prover: include global state in errored machine hash to match on-chain OSP#4712

Closed
dkutzmarks-rgb wants to merge 1 commit into
masterfrom
dkutzmarks-rgb/fix-errored-machine-hash-osp
Closed

prover: include global state in errored machine hash to match on-chain OSP#4712
dkutzmarks-rgb wants to merge 1 commit into
masterfrom
dkutzmarks-rgb/fix-errored-machine-hash-osp

Conversation

@dkutzmarks-rgb

@dkutzmarks-rgb dkutzmarks-rgb commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

removed

…n OSP

The off-chain WAVM prover hashed a MachineStatus::Errored machine as
keccak("Machine errored:") with no global state, while the on-chain OSP
hashes it as keccak("Machine errored:" || globalStateHash) in both
MachineLib.hash (per-step, used inside proveOneStep) and
OneStepProofEntry.getMachineHash (block-level assertion endpoint). The
Finished arm already commits the global state on both sides; only the
Errored arm diverged.

The honest BOLD validator commits the machine hashes produced here (via
cgo; there is no Go reimplementation of the errored hash), so for any
block or one-step transition whose terminal WAVM state is Errored, the
hash the validator commits could never equal the hash the on-chain
contract computes for the same state. A dispute involving a terminal
Errored state was therefore unadjudicable: confirmEdgeByOneStepProof
would produce an after-hash matching neither party's committed hash, and
an errored block endpoint (getMachineHash) could not be reconciled with
any arbitrator-produced small-step trace.

This aligns the outlier (the Rust prover) with the already-deployed
on-chain OSP and the challengeLib test helper, which both include the
global state. It does not change the wasm module root (module code is
unchanged) and does not change any hash for a Running or Finished
machine, so honest commitments are unaffected.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dkutzmarks-rgb

dkutzmarks-rgb commented Jul 20, 2026

Copy link
Copy Markdown
Contributor Author

removed

@dkutzmarks-rgb
dkutzmarks-rgb deleted the dkutzmarks-rgb/fix-errored-machine-hash-osp branch July 20, 2026 15:57
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.

1 participant