Commit 42fe6e62 authored by clabby's avatar clabby Committed by GitHub

Improve `IBigStepper` docs (#9118)

parent e7058c94
...@@ -4,8 +4,8 @@ pragma solidity ^0.8.15; ...@@ -4,8 +4,8 @@ pragma solidity ^0.8.15;
import { IPreimageOracle } from "src/cannon/interfaces/IPreimageOracle.sol"; import { IPreimageOracle } from "src/cannon/interfaces/IPreimageOracle.sol";
/// @title IBigStepper /// @title IBigStepper
/// @notice An interface for a contract with a state transition function that /// @notice Describes a state machine that can perform a single instruction step, provided a prestate and an optional
/// will accept a pre state and return a post state. /// proof.
/// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ /// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
/// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⠶⢅⠒⢄⢔⣶⡦⣤⡤⠄⣀⠀⠀⠀⠀⠀⠀⠀ /// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣼⠶⢅⠒⢄⢔⣶⡦⣤⡤⠄⣀⠀⠀⠀⠀⠀⠀⠀
/// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠨⡏⠀⠀⠈⠢⣙⢯⣄⠀⢨⠯⡺⡘⢄⠀⠀⠀⠀⠀ /// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠨⡏⠀⠀⠈⠢⣙⢯⣄⠀⢨⠯⡺⡘⢄⠀⠀⠀⠀⠀
...@@ -25,13 +25,13 @@ import { IPreimageOracle } from "src/cannon/interfaces/IPreimageOracle.sol"; ...@@ -25,13 +25,13 @@ import { IPreimageOracle } from "src/cannon/interfaces/IPreimageOracle.sol";
/// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠉⠙⠛⠻⠿⠿⠿⢿⣿⣿⣿⣷⣶⣶⣾⣿⣿⣿⣿⠿⠟⠁ /// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠉⠉⠉⠙⠛⠻⠿⠿⠿⢿⣿⣿⣿⣷⣶⣶⣾⣿⣿⣿⣿⠿⠟⠁
/// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠈⠉⠉⠉⠉⠁⠀⠀⠀⠀⠀ /// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠈⠉⠉⠉⠉⠁⠀⠀⠀⠀⠀
interface IBigStepper { interface IBigStepper {
/// @notice Performs a single instruction step from a given prestate and returns the poststate /// @notice Performs the state transition from a given prestate and returns the hash of the post state witness.
/// hash. /// @param _stateData The raw opaque prestate data.
/// @param _stateData The preimage of the prestate hash. /// @param _proof Opaque proof data, can be used to prove things about the prestate in relation to the state of the
/// @param _proof A proof for the inclusion of the prestate's memory in the merkle tree. /// interface's implementation.
/// @param _localContext The local key context for the preimage oracle. Optional, can be set as a constant /// @param _localContext The local key context for the preimage oracle. Optional, can be set as a constant if the
/// if the caller only requires one set of local keys. /// implementation only requires one set of local keys.
/// @return postState_ The poststate hash after the instruction step. /// @return postState_ The hash of the post state witness after the state transition.
function step( function step(
bytes calldata _stateData, bytes calldata _stateData,
bytes calldata _proof, bytes calldata _proof,
...@@ -40,6 +40,6 @@ interface IBigStepper { ...@@ -40,6 +40,6 @@ interface IBigStepper {
external external
returns (bytes32 postState_); returns (bytes32 postState_);
/// @notice Returns the preimage oracle used by the stepper. /// @notice Returns the preimage oracle used by the state machine.
function oracle() external view returns (IPreimageOracle oracle_); function oracle() external view returns (IPreimageOracle oracle_);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment