prover: include global state in errored machine hash to match on-chain OSP#4712
Closed
dkutzmarks-rgb wants to merge 1 commit into
Closed
prover: include global state in errored machine hash to match on-chain OSP#4712dkutzmarks-rgb wants to merge 1 commit into
dkutzmarks-rgb wants to merge 1 commit into
Conversation
…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>
Contributor
Author
|
removed |
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.
removed