diff --git a/src/osp/OneStepProofEntry.sol b/src/osp/OneStepProofEntry.sol index cadc625e2..d4c248408 100644 --- a/src/osp/OneStepProofEntry.sol +++ b/src/osp/OneStepProofEntry.sol @@ -177,7 +177,7 @@ contract OneStepProofEntry is IOneStepProofEntry { opcode <= Instructions.SET_GLOBAL_STATE_U64) || (opcode >= Instructions.READ_PRE_IMAGE && opcode <= Instructions.UNLINK_MODULE) || (opcode >= Instructions.NEW_COTHREAD && opcode <= Instructions.SWITCH_COTHREAD) || - (opcode == Instructions.READ_HOTSHOT_COMMITMENT || opcode == Instructions.IS_HOTSHOT_ALIVE) + (opcode == Instructions.READ_HOTSHOT_COMMITMENT || opcode == Instructions.IS_HOTSHOT_LIVE) ) { prover = proverHostIo; } else { diff --git a/src/osp/OneStepProverHostIo.sol b/src/osp/OneStepProverHostIo.sol index 131ec1061..d4d4f9a26 100644 --- a/src/osp/OneStepProverHostIo.sol +++ b/src/osp/OneStepProverHostIo.sol @@ -315,7 +315,7 @@ contract OneStepProverHostIo is IOneStepProver { return true; } - function executeIsHotShotAlive( + function executeIsHotShotLive( ExecutionContext calldata execCtx, Machine memory mach, Module memory, @@ -324,7 +324,7 @@ contract OneStepProverHostIo is IOneStepProver { ) internal view { uint256 height = mach.valueStack.pop().assumeI64(); uint8 liveness = uint8(proof[0]); - validateHotShotLiveness(execCtx, height, liveness > 0); + require(validateHotShotLiveness(execCtx, height, liveness > 0), "WRONG_HOTSHOT_LIVENESS"); } @@ -740,8 +740,8 @@ contract OneStepProverHostIo is IOneStepProver { impl = executeSwitchCoThread; } else if (opcode == Instructions.READ_HOTSHOT_COMMITMENT) { impl = executeReadHotShotCommitment; - } else if (opcode == Instructions.IS_HOTSHOT_ALIVE) { - impl = executeIsHotShotAlive; + } else if (opcode == Instructions.IS_HOTSHOT_LIVE) { + impl = executeIsHotShotLive; } else { revert("INVALID_MEMORY_OPCODE"); diff --git a/src/state/Instructions.sol b/src/state/Instructions.sol index 769529a54..c6f46309d 100644 --- a/src/state/Instructions.sol +++ b/src/state/Instructions.sol @@ -153,7 +153,7 @@ library Instructions { uint16 internal constant SWITCH_COTHREAD = 0x8032; uint16 internal constant READ_HOTSHOT_COMMITMENT = 0x9001; - uint16 internal constant IS_HOTSHOT_ALIVE = 0x9002; + uint16 internal constant IS_HOTSHOT_LIVE = 0x9002; uint256 internal constant INBOX_INDEX_SEQUENCER = 0; uint256 internal constant INBOX_INDEX_DELAYED = 1; diff --git a/src/test-helpers/HotShot.sol b/src/test-helpers/HotShot.sol index 8fb1beb57..3de0511e1 100644 --- a/src/test-helpers/HotShot.sol +++ b/src/test-helpers/HotShot.sol @@ -9,7 +9,7 @@ contract MockHotShot { commitments[height] = commitment; } - function setAvailability(uint256 l1Height, bool isAlive) external { - availabilities[l1Height] = isAlive; + function setAvailability(uint256 l1Height, bool isLive) external { + availabilities[l1Height] = isLive; } }