Skip to content

Commit

Permalink
Rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ImJeremyHe committed May 22, 2024
1 parent aa56b8b commit 7c20696
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/osp/OneStepProofEntry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions src/osp/OneStepProverHostIo.sol
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ contract OneStepProverHostIo is IOneStepProver {
return true;
}

function executeIsHotShotAlive(
function executeIsHotShotLive(
ExecutionContext calldata execCtx,
Machine memory mach,
Module memory,
Expand All @@ -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");

}

Expand Down Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion src/state/Instructions.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions src/test-helpers/HotShot.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 7c20696

Please sign in to comment.