diff --git a/src/challengeV2/EdgeChallengeManager.sol b/src/challengeV2/EdgeChallengeManager.sol index 7e51ad9f..a32d694b 100644 --- a/src/challengeV2/EdgeChallengeManager.sol +++ b/src/challengeV2/EdgeChallengeManager.sol @@ -395,12 +395,8 @@ contract EdgeChallengeManager is IEdgeChallengeManager, Initializable { assertionChain.validateConfig(prevAssertionHash, prevConfig); - // TODO(PR 427): OSP contracts are marked as pending work in the PR. - // Inbox-position-based checks no longer apply; use type(uint256).max as - // a stopgap until OSP is rewired against `nextParentChainBlockHash`. ExecutionContext memory execCtx = ExecutionContext({ - maxInboxMessagesRead: type(uint256).max, - bridge: assertionChain.bridge(), + targetParentChainBlockHash: prevConfig.nextParentChainBlockHash, initialWasmModuleRoot: prevConfig.wasmModuleRoot }); diff --git a/src/mocks/SimpleOneStepProofEntry.sol b/src/mocks/SimpleOneStepProofEntry.sol index 556150d1..37460dcc 100644 --- a/src/mocks/SimpleOneStepProofEntry.sol +++ b/src/mocks/SimpleOneStepProofEntry.sol @@ -9,6 +9,7 @@ import "../state/Deserialize.sol"; contract SimpleOneStepProofEntry is IOneStepProofEntry { using GlobalStateLib for GlobalState; + using MELStateLib for MELState; // End the batch after 2000 steps. This results in 11 blocks for an honest validator. // This constant must be synchronized with the one in execution/engine.go @@ -26,23 +27,33 @@ contract SimpleOneStepProofEntry is IOneStepProofEntry { uint256 step, bytes32 beforeHash, bytes calldata proof - ) external view returns (bytes32 afterHash) { + ) external pure returns (bytes32 afterHash) { if (proof.length == 0) { revert("EMPTY_PROOF"); } GlobalState memory globalState; uint256 offset; - (globalState.u64Vals[0], offset) = Deserialize.u64(proof, offset); - (globalState.u64Vals[1], offset) = Deserialize.u64(proof, offset); - if (step > 0 && (beforeHash[0] == 0 || globalState.getPositionInMessage() == 0)) { + (globalState.bytes32Vals[3], offset) = Deserialize.b32(proof, offset); // MELNextMsgHash + (globalState.u64Vals[2], offset) = Deserialize.u64(proof, offset); // MELMsgCount + (globalState.u64Vals[3], offset) = Deserialize.u64(proof, offset); // MELExecutedMsgCount + + MELState memory melState; + (melState.parentChainBlockHash, offset) = Deserialize.b32(proof, offset); + + if (step > 0 && (beforeHash[0] == 0 || globalState.getMELNextMsgHash() == bytes32(0))) { // We end the block when the first byte of the hash hits 0 or we advance a batch return beforeHash; } - if (globalState.getInboxPosition() >= execCtx.maxInboxMessagesRead) { - // We can't continue further because we've hit the max inbox messages read + if ( + melState.parentChainBlockHash == execCtx.targetParentChainBlockHash + && globalState.getMELExecutedMsgCount() >= melState.msgCount + ) { + // We can't continue further because we've executed all messages up to this melState return beforeHash; } require(globalState.hash() == beforeHash, "BAD_PROOF"); + + // TODO: modify this logic once execution_engine.go is modified globalState.u64Vals[1]++; if (globalState.u64Vals[1] % STEPS_PER_BATCH == 0) { globalState.u64Vals[0]++; diff --git a/src/osp/HashProofHelper.sol b/src/osp/HashProofHelper.sol index 12c88873..5a4ab0b6 100644 --- a/src/osp/HashProofHelper.sol +++ b/src/osp/HashProofHelper.sol @@ -4,32 +4,42 @@ pragma solidity ^0.8.0; +import "./IHashProofHelper.sol"; import "../libraries/CryptographyPrimitives.sol"; -/// @dev The requested hash preimage at the given offset has not been proven yet -error NotProven(bytes32 fullHash, uint64 offset); - -contract HashProofHelper { +contract HashProofHelper is IHashProofHelper { + /// @dev Tracks an in-progress split preimage proof struct KeccakState { + /// @dev Offset determining which slice is extracted and stored from the preimage (up to 32 bytes) uint64 offset; + /// @dev The bytes being collected for the [offset, offset+32) slice, built up across chunks bytes part; + /// @dev The 1600-bit keccak internal state as 25 × 64-bit words + /// (stored in column-major order to match CryptographyPrimitives.keccakF's layout) uint64[25] state; + /// @dev Total bytes of preimage data absorbed so far across all chunks uint256 length; } + /// @dev Stores a 32-byte (or shorter) slice extracted from a fully-proven preimage. struct PreimagePart { + /// @dev Whether this entry has been set by a completed proof. bool proven; + /// @dev The extracted slice at this offset. Empty if offset >= preimage length. bytes part; } + /// @dev Completed proofs, keyed by (keccak256 hash of the full preimage, byte offset) mapping(bytes32 => mapping(uint64 => PreimagePart)) private preimageParts; + /// @dev In-progress split proofs, keyed by msg.sender mapping(address => KeccakState) public keccakStates; - event PreimagePartProven(bytes32 indexed fullHash, uint64 indexed offset, bytes part); - + /// @dev Maximum bytes stored per part — matches one EVM word and one WASM ReadPreImage result uint256 private constant MAX_PART_LENGTH = 32; + /// @dev Number of bytes absorbed into the keccak sponge state per round — matches the keccak256 rate for 1600-bit state uint256 private constant KECCAK_ROUND_INPUT = 136; + /// @inheritdoc IHashProofHelper function proveWithFullPreimage( bytes calldata data, uint64 offset @@ -38,8 +48,8 @@ contract HashProofHelper { bytes memory part; if (data.length > offset) { uint256 partLength = data.length - offset; - if (partLength > 32) { - partLength = 32; + if (partLength > MAX_PART_LENGTH) { + partLength = MAX_PART_LENGTH; } part = data[offset:(offset + partLength)]; } @@ -47,9 +57,7 @@ contract HashProofHelper { emit PreimagePartProven(fullHash, offset, part); } - // Flags: a bitset signaling various things about the proof, ordered from least to most significant bits. - // 0th bit: indicates that this data is the final chunk of preimage data. - // 1st bit: indicates that the preimage part currently being built should be cleared before this. + /// @inheritdoc IHashProofHelper function proveWithSplitPreimage( bytes calldata data, uint64 offset, @@ -67,7 +75,12 @@ contract HashProofHelper { } else { require(state.offset == offset, "DIFF_OFFSET"); } + + // Update the keccak state with the new data + // (updates state.state and state.length) keccakUpdate(state, data, isFinal); + + // Obtain the `part` if (uint256(offset) + MAX_PART_LENGTH > startLength && offset < state.length) { uint256 startIdx = 0; if (offset > startLength) { @@ -81,9 +94,14 @@ contract HashProofHelper { state.part.push(data[i]); } } + + // If this is not the final chunk, we can't yet determine the full hash, so we return early if (!isFinal) { return bytes32(0); } + + // Obtain the full hash from the keccak state + // (the first 32 bytes) for (uint256 i = 0; i < 32; i++) { uint256 stateIdx = i / 8; // work around our weird keccakF function state ordering @@ -96,21 +114,33 @@ contract HashProofHelper { delete keccakStates[msg.sender]; } + /** + * @notice Absorbs data into the keccak sponge state, one 136-byte round at a time. + * On the final call, applies keccak padding. + * @param state The in-progress keccak state to update (modified in place) + * @param data The next chunk of preimage bytes to absorb + * @param isFinal If true, pads and processes the final block + */ function keccakUpdate(KeccakState storage state, bytes calldata data, bool isFinal) internal { state.length += data.length; while (true) { if (data.length == 0 && !isFinal) { break; } + + // XOR in the next chunk of data, padding if necessary + // (1 byte per iteration) for (uint256 i = 0; i < KECCAK_ROUND_INPUT; i++) { uint8 b = 0; if (i < data.length) { b = uint8(data[i]); } else { - // Padding + // Padding added in the final chunk or in a chunk on its own if the final chunk is exactly round-aligned + // 1st bit (LSB) is set if this is the first byte after the data if (i == data.length) { b |= uint8(0x01); } + // Last bit (MSB) is always set in the final chunk if (i == KECCAK_ROUND_INPUT - 1) { b |= uint8(0x80); } @@ -124,10 +154,16 @@ contract HashProofHelper { for (uint256 i = 0; i < 25; i++) { state256[i] = state.state[i]; } + + // Scramble the state with keccakF state256 = CryptographyPrimitives.keccakF(state256); + + // Write the new state back to storage for (uint256 i = 0; i < 25; i++) { state.state[i] = uint64(state256[i]); } + + // Strict inequality, because if data is an exact multiple of the round size, keccak still adds a padding chunk if (data.length < KECCAK_ROUND_INPUT) { break; } @@ -135,11 +171,12 @@ contract HashProofHelper { } } + /// @notice Deletes the caller's in-progress split proof state function clearSplitProof() external { delete keccakStates[msg.sender]; } - /// Retrieves up to 32 bytes of the preimage of fullHash at the given offset, reverting if it hasn't been proven yet. + /// @inheritdoc IHashProofHelper function getPreimagePart( bytes32 fullHash, uint64 offset diff --git a/src/osp/IHashProofHelper.sol b/src/osp/IHashProofHelper.sol new file mode 100644 index 00000000..d0f61360 --- /dev/null +++ b/src/osp/IHashProofHelper.sol @@ -0,0 +1,64 @@ +// Copyright 2021-2022, Offchain Labs, Inc. +// For license information, see https://github.com/OffchainLabs/nitro-contracts/blob/main/LICENSE +// SPDX-License-Identifier: BUSL-1.1 + +pragma solidity ^0.8.0; + +/** + * @title IHashProofHelper + * @notice Proves keccak256 preimages and stores slices of up to 32 bytes for later retrieval. + * Used by the OneStepProverHostIo to verify large preimages that don't fit + * in a single transaction's calldata. The preimage is uploaded in advance + * (in one or more transactions), and later retrieved during the one-step proof. + */ +interface IHashProofHelper { + /// @notice Emitted when a preimage part is proven and stored + event PreimagePartProven(bytes32 indexed fullHash, uint64 indexed offset, bytes part); + + /// @notice The requested preimage part has not been proven yet + error NotProven(bytes32 fullHash, uint64 offset); + + /** + * @notice Proves a preimage in a single transaction by providing all data at once + * @param data The full preimage + * @param offset Byte offset into the preimage. Up to 32 bytes at this offset are stored + * as the proven part. If offset is past the end of data, an empty part is stored. + * @return fullHash keccak256(data) + */ + function proveWithFullPreimage( + bytes calldata data, + uint64 offset + ) external returns (bytes32 fullHash); + + /** + * @notice Proves a preimage across multiple transactions by uploading data in chunks. + * Each chunk is absorbed into an incremental keccak256 computation stored + * per sender. On the final chunk, the hash is finalized and the proven part + * is stored. + * @param data The next chunk of preimage data. Must be a multiple of 136 bytes + * (the keccak round size) unless this is the final chunk + * @param offset Byte offset into the full preimage for the 32-byte part to prove. + * Must be the same value across all chunks of a single proof. + * @param flags a bitset signaling various things about the proof, ordered from least to most significant bits: + * - bit 0: indicates that this data is the final chunk of preimage data, which triggers padding, hash finalization, and storage + * - bit 1: indicates that the unfinished preimage currently being built should be cleared before this + * @return fullHash if the final chunk is passed, keccak256 of the full preimage; otherwise, bytes32(0) + */ + function proveWithSplitPreimage( + bytes calldata data, + uint64 offset, + uint256 flags + ) external returns (bytes32 fullHash); + + /** + * @notice Retrieves a previously proven preimage part + * @param fullHash The keccak256 hash of the preimage + * @param offset The byte offset that was used when the part was proven + * @return The proven bytes (up to 32). Reverts with NotProven if the part + * at this hash and offset hasn't been proven yet. + */ + function getPreimagePart( + bytes32 fullHash, + uint64 offset + ) external view returns (bytes memory); +} diff --git a/src/osp/IOneStepProver.sol b/src/osp/IOneStepProver.sol index 6fbc7422..fb388dd8 100644 --- a/src/osp/IOneStepProver.sol +++ b/src/osp/IOneStepProver.sol @@ -12,8 +12,7 @@ import "../bridge/ISequencerInbox.sol"; import "../bridge/IBridge.sol"; struct ExecutionContext { - uint256 maxInboxMessagesRead; - IBridge bridge; + bytes32 targetParentChainBlockHash; bytes32 initialWasmModuleRoot; } diff --git a/src/osp/OneStepProofEntry.sol b/src/osp/OneStepProofEntry.sol index 51e58a07..19253698 100644 --- a/src/osp/OneStepProofEntry.sol +++ b/src/osp/OneStepProofEntry.sol @@ -15,6 +15,7 @@ contract OneStepProofEntry is IOneStepProofEntry { using MerkleProofLib for MerkleProof; using MachineLib for Machine; using GlobalStateLib for GlobalState; + using MELStateLib for MELState; using MultiStackLib for MultiStack; using ValueStackLib for ValueStack; @@ -104,9 +105,20 @@ contract OneStepProofEntry is IOneStepProofEntry { GlobalState memory globalState; (globalState, offset) = Deserialize.globalState(proof, offset); require(globalState.hash() == mach.globalStateHash, "BAD_GLOBAL_STATE"); + + MELState memory melState; + (melState, offset) = Deserialize.melState(proof, offset); + require(melState.hash() == globalState.getMELStateHash(), "BAD_MEL_STATE"); + + // The machine has finished processing a message and we're at the start of the next execution segment (machineStep == 0). + // If the MELState is not at its target (meaning that it hasn't finished extracting messages, which should only happen before the extraction process is started), + // or if all messages were extracted, but there are still messages to be executed in MEL, we kickstart the machine. if ( mach.status == MachineStatus.FINISHED && machineStep == 0 - && globalState.getInboxPosition() < execCtx.maxInboxMessagesRead + && ( + melState.parentChainBlockHash != execCtx.targetParentChainBlockHash + || globalState.getMELExecutedMsgCount() < melState.msgCount + ) ) { // Kickstart the machine return getStartMachineHash(mach.globalStateHash, execCtx.initialWasmModuleRoot); @@ -187,6 +199,7 @@ contract OneStepProofEntry is IOneStepProofEntry { ) || (opcode >= Instructions.VALIDATE_CERTIFICATE && opcode <= Instructions.UNLINK_MODULE) || (opcode >= Instructions.NEW_COTHREAD && opcode <= Instructions.SWITCH_COTHREAD) + || (opcode == Instructions.GET_END_PARENT_CHAIN_BLOCK_HASH) ) { prover = proverHostIo; } else { diff --git a/src/osp/OneStepProverHostIo.sol b/src/osp/OneStepProverHostIo.sol index fc4531c2..a094526b 100644 --- a/src/osp/OneStepProverHostIo.sol +++ b/src/osp/OneStepProverHostIo.sol @@ -12,8 +12,7 @@ import "../state/Deserialize.sol"; import "../state/ModuleMemory.sol"; import "./IOneStepProver.sol"; import "./ICustomDAProofValidator.sol"; -import "../bridge/Messages.sol"; -import "../bridge/IBridge.sol"; +import "./IHashProofHelper.sol"; contract OneStepProverHostIo is IOneStepProver { using GlobalStateLib for GlobalState; @@ -26,20 +25,17 @@ contract OneStepProverHostIo is IOneStepProver { using StackFrameLib for StackFrameWindow; uint256 private constant LEAF_SIZE = 32; - uint256 private constant INBOX_NUM = 2; - uint64 private constant INBOX_HEADER_LEN = 40; - uint64 private constant DELAYED_HEADER_LEN = 112 + 1; // CustomDA proof format constants uint256 private constant CERT_SIZE_LEN = 8; uint256 private constant CLAIMED_VALID_LEN = 1; ICustomDAProofValidator public immutable customDAValidator; + IHashProofHelper public immutable hashProofHelper; - constructor( - address _customDAValidator - ) { + constructor(address _customDAValidator, address _hashProofHelper) { customDAValidator = ICustomDAProofValidator(_customDAValidator); + hashProofHelper = IHashProofHelper(_hashProofHelper); } function setLeafByte(bytes32 oldLeaf, uint256 idx, uint8 val) internal pure returns (bytes32) { @@ -155,6 +151,7 @@ contract OneStepProverHostIo is IOneStepProver { // The machine is asking for a keccak256 preimage if (proofType == 0) { + // The proof contains the full preimage bytes calldata preimage = proof[proofOffset:]; require(keccak256(preimage) == leafContents, "BAD_PREIMAGE"); @@ -163,8 +160,12 @@ contract OneStepProverHostIo is IOneStepProver { preimageEnd = preimage.length; } extracted = preimage[preimageOffset:preimageEnd]; + } else if (proofType == 1) { + // The proof contains a part of the preimage, verified by the HashProofHelper contract + require(address(hashProofHelper) != address(0), "HASH_PROOF_HELPER_NOT_SET"); + + extracted = hashProofHelper.getPreimagePart(leafContents, uint64(preimageOffset)); } else { - // TODO: support proving via an authenticated contract revert("UNKNOWN_PREIMAGE_PROOF"); } } else if (inst.argumentData == 1) { @@ -357,124 +358,6 @@ contract OneStepProverHostIo is IOneStepProver { return isValid; } - function validateSequencerInbox( - ExecutionContext calldata execCtx, - uint64 msgIndex, - bytes calldata message - ) internal view returns (bool) { - require(message.length >= INBOX_HEADER_LEN, "BAD_SEQINBOX_PROOF"); - - uint64 afterDelayedMsg; - (afterDelayedMsg,) = Deserialize.u64(message, 32); - bytes32 messageHash = keccak256(message); - bytes32 beforeAcc; - bytes32 delayedAcc; - - if (msgIndex > 0) { - beforeAcc = execCtx.bridge.sequencerInboxAccs(msgIndex - 1); - } - if (afterDelayedMsg > 0) { - delayedAcc = execCtx.bridge.delayedInboxAccs(afterDelayedMsg - 1); - } - bytes32 acc = keccak256(abi.encodePacked(beforeAcc, messageHash, delayedAcc)); - require(acc == execCtx.bridge.sequencerInboxAccs(msgIndex), "BAD_SEQINBOX_MESSAGE"); - return true; - } - - function validateDelayedInbox( - ExecutionContext calldata execCtx, - uint64 msgIndex, - bytes calldata message - ) internal view returns (bool) { - require(message.length >= DELAYED_HEADER_LEN, "BAD_DELAYED_PROOF"); - - bytes32 beforeAcc; - - if (msgIndex > 0) { - beforeAcc = execCtx.bridge.delayedInboxAccs(msgIndex - 1); - } - - bytes32 messageDataHash = keccak256(message[DELAYED_HEADER_LEN:]); - bytes1 kind = message[0]; - uint256 sender; - (sender,) = Deserialize.u256(message, 1); - - bytes32 messageHash = keccak256( - abi.encodePacked(kind, uint160(sender), message[33:DELAYED_HEADER_LEN], messageDataHash) - ); - bytes32 acc = Messages.accumulateInboxMessage(beforeAcc, messageHash); - - require(acc == execCtx.bridge.delayedInboxAccs(msgIndex), "BAD_DELAYED_MESSAGE"); - return true; - } - - function executeReadInboxMessage( - ExecutionContext calldata execCtx, - Machine memory mach, - Module memory mod, - Instruction calldata inst, - bytes calldata proof - ) internal view { - uint256 messageOffset = mach.valueStack.pop().assumeI32(); - uint256 ptr = mach.valueStack.pop().assumeI32(); - uint256 msgIndex = mach.valueStack.pop().assumeI64(); - if ( - inst.argumentData == Instructions.INBOX_INDEX_SEQUENCER - && msgIndex >= execCtx.maxInboxMessagesRead - ) { - mach.status = MachineStatus.ERRORED; - return; - } - - if (ptr + 32 > mod.moduleMemory.size || ptr % LEAF_SIZE != 0) { - mach.status = MachineStatus.ERRORED; - return; - } - - uint256 leafIdx = ptr / LEAF_SIZE; - uint256 proofOffset = 0; - bytes32 leafContents; - MerkleProof memory merkleProof; - (leafContents, proofOffset, merkleProof) = - mod.moduleMemory.proveLeaf(leafIdx, proof, proofOffset); - - { - // TODO: support proving via an authenticated contract - require(proof[proofOffset] == 0, "UNKNOWN_INBOX_PROOF"); - proofOffset++; - - function(ExecutionContext calldata, uint64, bytes calldata) internal view returns (bool) - inboxValidate; - - bool success; - if (inst.argumentData == Instructions.INBOX_INDEX_SEQUENCER) { - inboxValidate = validateSequencerInbox; - } else if (inst.argumentData == Instructions.INBOX_INDEX_DELAYED) { - inboxValidate = validateDelayedInbox; - } else { - mach.status = MachineStatus.ERRORED; - return; - } - success = inboxValidate(execCtx, uint64(msgIndex), proof[proofOffset:]); - if (!success) { - mach.status = MachineStatus.ERRORED; - return; - } - } - - require(proof.length >= proofOffset, "BAD_MESSAGE_PROOF"); - uint256 messageLength = proof.length - proofOffset; - - uint32 i = 0; - for (; i < 32 && messageOffset + i < messageLength; i++) { - leafContents = - setLeafByte(leafContents, i, uint8(proof[proofOffset + messageOffset + i])); - } - - mod.moduleMemory.merkleRoot = merkleProof.computeRootFromMemory(leafIdx, leafContents); - mach.valueStack.push(ValueLib.newI32(i)); - } - function executeHaltAndSetFinished( ExecutionContext calldata, Machine memory mach, @@ -694,6 +577,33 @@ contract OneStepProverHostIo is IOneStepProver { mach.switchCoThreadStacks(); } + function executeGetEndParentChainBlockHash( + ExecutionContext calldata execCtx, + Machine memory mach, + Module memory mod, + Instruction calldata, + bytes calldata proof + ) internal pure { + // Pop pointer to leaf from the value stack where the target parent chain block hash will be written to + uint256 ptr = mach.valueStack.pop().assumeI32(); + + // Validate the leaf + if (!mod.moduleMemory.isValidLeaf(ptr)) { + mach.status = MachineStatus.ERRORED; + return; + } + + // Prove the leaf in memory + uint256 leafIdx = ptr / LEAF_SIZE; + uint256 proofOffset = 0; + MerkleProof memory merkleProof; + (,, merkleProof) = mod.moduleMemory.proveLeaf(leafIdx, proof, proofOffset); + + // Update merkle root + mod.moduleMemory.merkleRoot = + merkleProof.computeRootFromMemory(leafIdx, execCtx.targetParentChainBlockHash); + } + function executeOneStep( ExecutionContext calldata execCtx, Machine calldata startMach, @@ -719,8 +629,6 @@ contract OneStepProverHostIo is IOneStepProver { impl = executeValidatePreimage; } else if (opcode == Instructions.READ_PRE_IMAGE) { impl = executeReadPreImage; - } else if (opcode == Instructions.READ_INBOX_MESSAGE) { - impl = executeReadInboxMessage; } else if (opcode == Instructions.HALT_AND_SET_FINISHED) { impl = executeHaltAndSetFinished; } else if (opcode == Instructions.LINK_MODULE) { @@ -733,8 +641,10 @@ contract OneStepProverHostIo is IOneStepProver { impl = executePopCoThread; } else if (opcode == Instructions.SWITCH_COTHREAD) { impl = executeSwitchCoThread; + } else if (opcode == Instructions.GET_END_PARENT_CHAIN_BLOCK_HASH) { + impl = executeGetEndParentChainBlockHash; } else { - revert("INVALID_MEMORY_OPCODE"); + revert("INVALID_HOSTIO_OPCODE"); } impl(execCtx, mach, mod, inst, proof); diff --git a/src/state/Deserialize.sol b/src/state/Deserialize.sol index f0c20ec8..5d9f2ab7 100644 --- a/src/state/Deserialize.sol +++ b/src/state/Deserialize.sol @@ -14,6 +14,7 @@ import "./MerkleProof.sol"; import "./ModuleMemoryCompact.sol"; import "./Module.sol"; import "./GlobalState.sol"; +import "./MELState.sol"; library Deserialize { function u8( @@ -92,6 +93,16 @@ library Deserialize { offset++; } + function addr( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (address ret, uint256 offset) { + offset = startOffset; + uint256 retInt; + (retInt, offset) = u256(proof, offset); + ret = address(uint160(retInt)); + } + function value( bytes calldata proof, uint256 startOffset @@ -253,6 +264,47 @@ library Deserialize { state = GlobalState({bytes32Vals: bytes32Vals, u64Vals: u64Vals}); } + function melState( + bytes calldata proof, + uint256 startOffset + ) internal pure returns (MELState memory state, uint256 offset) { + offset = startOffset; + + // Initialize with dummy values to avoid filling up the stack + state = MELState({ + version: 0, + parentChainId: 0, + parentChainBlockNumber: 0, + batchPostingTargetAddress: address(0), + delayedMessagePostingTargetAddress: address(0), + parentChainBlockHash: bytes32(0), + parentChainPreviousBlockHash: bytes32(0), + batchCount: 0, + msgCount: 0, + localMsgAccumulator: bytes32(0), + delayedMessagesRead: 0, + delayedMessagesSeen: 0, + delayedMessageInboxAcc: bytes32(0), + delayedMessageOutboxAcc: bytes32(0) + }); + + // Fill in the actual values + (state.version, offset) = u16(proof, offset); + (state.parentChainId, offset) = u64(proof, offset); + (state.parentChainBlockNumber, offset) = u64(proof, offset); + (state.batchPostingTargetAddress, offset) = addr(proof, offset); + (state.delayedMessagePostingTargetAddress, offset) = addr(proof, offset); + (state.parentChainBlockHash, offset) = b32(proof, offset); + (state.parentChainPreviousBlockHash, offset) = b32(proof, offset); + (state.batchCount, offset) = u64(proof, offset); + (state.msgCount, offset) = u64(proof, offset); + (state.localMsgAccumulator, offset) = b32(proof, offset); + (state.delayedMessagesRead, offset) = u64(proof, offset); + (state.delayedMessagesSeen, offset) = u64(proof, offset); + (state.delayedMessageInboxAcc, offset) = b32(proof, offset); + (state.delayedMessageOutboxAcc, offset) = b32(proof, offset); + } + function machine( bytes calldata proof, uint256 startOffset diff --git a/src/state/GlobalState.sol b/src/state/GlobalState.sol index c92afe0d..9e644195 100644 --- a/src/state/GlobalState.sol +++ b/src/state/GlobalState.sol @@ -60,18 +60,6 @@ library GlobalStateLib { return state.bytes32Vals[3]; } - function getInboxPosition( - GlobalState memory state - ) internal pure returns (uint64) { - return state.u64Vals[0]; - } - - function getPositionInMessage( - GlobalState memory state - ) internal pure returns (uint64) { - return state.u64Vals[1]; - } - /// @dev Unused. MELState.msgCount should be used instead whenever possible, but this is left here /// to mimic nitro's implementation of GlobalState. function getMELMsgCount( diff --git a/src/state/Instructions.sol b/src/state/Instructions.sol index 3ab22cde..59998115 100644 --- a/src/state/Instructions.sol +++ b/src/state/Instructions.sol @@ -144,7 +144,7 @@ library Instructions { uint16 internal constant VALIDATE_CERTIFICATE = 0x8019; uint16 internal constant READ_PRE_IMAGE = 0x8020; - uint16 internal constant READ_INBOX_MESSAGE = 0x8021; + uint16 internal constant READ_INBOX_MESSAGE = 0x8021; // Deprecated uint16 internal constant HALT_AND_SET_FINISHED = 0x8022; uint16 internal constant LINK_MODULE = 0x8023; uint16 internal constant UNLINK_MODULE = 0x8024; @@ -153,8 +153,10 @@ library Instructions { uint16 internal constant POP_COTHREAD = 0x8031; uint16 internal constant SWITCH_COTHREAD = 0x8032; - uint256 internal constant INBOX_INDEX_SEQUENCER = 0; - uint256 internal constant INBOX_INDEX_DELAYED = 1; + uint16 internal constant GET_END_PARENT_CHAIN_BLOCK_HASH = 0x8033; + + uint256 internal constant INBOX_INDEX_SEQUENCER = 0; // Deprecated + uint256 internal constant INBOX_INDEX_DELAYED = 1; // Deprecated function hash( Instruction[] memory code diff --git a/test/MockAssertionChain.sol b/test/MockAssertionChain.sol index fc6b0e80..e2c0067e 100644 --- a/test/MockAssertionChain.sol +++ b/test/MockAssertionChain.sol @@ -3,7 +3,6 @@ pragma solidity ^0.8.17; import "forge-std/Test.sol"; import {IAssertionChain} from "../src/challengeV2/IAssertionChain.sol"; -import {IEdgeChallengeManager} from "../src/challengeV2/IEdgeChallengeManager.sol"; import "../src/bridge/IBridge.sol"; import "../src/rollup/RollupLib.sol"; import "./challengeV2/StateTools.sol"; @@ -21,7 +20,7 @@ struct MockAssertion { } contract MockAssertionChain is IAssertionChain { - mapping(bytes32 => MockAssertion) assertions; + mapping(bytes32 => MockAssertion) private assertions; IBridge public bridge; // TODO: set bridge in this mock bytes32 public wasmModuleRoot; uint256 public baseStake; @@ -44,8 +43,7 @@ contract MockAssertionChain is IAssertionChain { function validateAssertionHash( bytes32 assertionHash, AssertionState calldata state, - bytes32 prevAssertionHash, - bytes32 inboxAcc + bytes32 prevAssertionHash ) external view { require(assertionExists(assertionHash), "Assertion does not exist"); // TODO: HN: This is not how the real assertion chain calculate assertion hash @@ -76,7 +74,7 @@ contract MockAssertionChain is IAssertionChain { requiredStake: configData.requiredStake, challengeManager: configData.challengeManager, confirmPeriodBlocks: configData.confirmPeriodBlocks, - nextInboxPosition: configData.nextInboxPosition + nextParentChainBlockHash: configData.nextParentChainBlockHash }) == assertions[assertionHash].configHash, "BAD_CONFIG" ); @@ -102,8 +100,7 @@ contract MockAssertionChain is IAssertionChain { ) public pure returns (bytes32) { return RollupLib.assertionHash({ parentAssertionHash: predecessorId, - afterState: afterState, - inboxAcc: keccak256(abi.encode(afterState.globalState.u64Vals[0])) // mock accumulator based on inbox count + afterState: afterState }); } @@ -120,7 +117,7 @@ contract MockAssertionChain is IAssertionChain { function addAssertionUnsafe( bytes32 predecessorId, uint256 height, - uint64 nextInboxPosition, + bytes32 nextParentChainBlockHash, AssertionState memory afterState, bytes32 successionChallenge ) public returns (bytes32) { @@ -139,7 +136,7 @@ contract MockAssertionChain is IAssertionChain { requiredStake: baseStake, challengeManager: challengeManager, confirmPeriodBlocks: confirmPeriodBlocks, - nextInboxPosition: nextInboxPosition + nextParentChainBlockHash: nextParentChainBlockHash }) }); childCreated(predecessorId); @@ -149,7 +146,7 @@ contract MockAssertionChain is IAssertionChain { function addAssertion( bytes32 predecessorId, uint256 height, - uint64 nextInboxPosition, + bytes32 nextParentChainBlockHash, AssertionState memory beforeState, AssertionState memory afterState, bytes32 successionChallenge @@ -165,7 +162,7 @@ contract MockAssertionChain is IAssertionChain { ); return addAssertionUnsafe( - predecessorId, height, nextInboxPosition, afterState, successionChallenge + predecessorId, height, nextParentChainBlockHash, afterState, successionChallenge ); } diff --git a/test/foundry/OneStepProverHostIo.t.sol b/test/foundry/OneStepProverHostIo.t.sol index 7bd54918..3e318a0f 100644 --- a/test/foundry/OneStepProverHostIo.t.sol +++ b/test/foundry/OneStepProverHostIo.t.sol @@ -7,8 +7,9 @@ import {ICustomDAProofValidator} from "../../src/osp/ICustomDAProofValidator.sol contract OneStepProverHostIoPublic is OneStepProverHostIo { constructor( - address _customDAValidator - ) OneStepProverHostIo(_customDAValidator) {} + address _customDAValidator, + address _hashProofHelper + ) OneStepProverHostIo(_customDAValidator, _hashProofHelper) {} function executeReadPreImagePublic( ExecutionContext calldata context, @@ -23,9 +24,9 @@ contract OneStepProverHostIoPublic is OneStepProverHostIo { contract CustomDAProofValidatorMock is ICustomDAProofValidator { function validateReadPreimage( - bytes32 certHash, - uint256 offset, - bytes calldata proof + bytes32, + uint256, + bytes calldata ) external pure override returns (bytes memory preimageChunk) { return new bytes(32); } @@ -56,16 +57,16 @@ contract CustomDAProofValidatorMock is ICustomDAProofValidator { contract CustomDAProofValidatorBadResponse is ICustomDAProofValidator { function validateReadPreimage( - bytes32 certHash, - uint256 offset, - bytes calldata proof + bytes32, + uint256, + bytes calldata ) external pure override returns (bytes memory preimageChunk) { // Return invalid response (too long) return new bytes(33); } function validateCertificate( - bytes calldata proof + bytes calldata ) external pure override returns (bool isValid) { // Always return false for this mock return false; @@ -74,16 +75,16 @@ contract CustomDAProofValidatorBadResponse is ICustomDAProofValidator { contract CustomDAProofValidatorEmptyResponse is ICustomDAProofValidator { function validateReadPreimage( - bytes32 certHash, - uint256 offset, - bytes calldata proof + bytes32, + uint256, + bytes calldata ) external pure override returns (bytes memory preimageChunk) { // Return empty response return new bytes(0); } function validateCertificate( - bytes calldata proof + bytes calldata ) external pure override returns (bool isValid) { // Always return true for this mock return true; @@ -95,8 +96,9 @@ contract OneStepProverHostIoTest is Test { using ValueLib for Value; using ValueStackLib for ValueStack; - ICustomDAProofValidator mockCustomDAProofValidator; - address owner = address(0x1234); + ICustomDAProofValidator public mockCustomDAProofValidator; + IHashProofHelper public mockHashProofHelper = IHashProofHelper(address(0x0)); + address public owner = address(0x1234); function setUp() public { mockCustomDAProofValidator = new CustomDAProofValidatorMock(); @@ -173,8 +175,9 @@ contract OneStepProverHostIoTest is Test { function testWrongCertificateHash() public { // Deploy OSP with mockCustomDAProofValidator as customDAValidator - OneStepProverHostIoPublic ospHostIo = - new OneStepProverHostIoPublic(address(mockCustomDAProofValidator)); + OneStepProverHostIoPublic ospHostIo = new OneStepProverHostIoPublic( + address(mockCustomDAProofValidator), address(mockHashProofHelper) + ); // Create a different certificate hash that the machine expects bytes32 correctCertKeccak256 = keccak256( @@ -213,8 +216,9 @@ contract OneStepProverHostIoTest is Test { function testCustomDAValidatorSupported() public { // Deploy OSP with mockCustomDAProofValidator as customDAValidator - OneStepProverHostIoPublic ospHostIo = - new OneStepProverHostIoPublic(address(mockCustomDAProofValidator)); + OneStepProverHostIoPublic ospHostIo = new OneStepProverHostIoPublic( + address(mockCustomDAProofValidator), address(mockHashProofHelper) + ); (bytes32 certKeccak256, bytes memory proof) = buildFullProof(hex"0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20"); @@ -237,7 +241,8 @@ contract OneStepProverHostIoTest is Test { function testCustomDAValidatorNotSupported() public { // Deploy OSP with address(0) as customDAValidator - OneStepProverHostIoPublic ospHostIo = new OneStepProverHostIoPublic(address(0)); + OneStepProverHostIoPublic ospHostIo = + new OneStepProverHostIoPublic(address(0), address(mockHashProofHelper)); (bytes32 certKeccak256, bytes memory proof) = buildFullProof(hex"0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20"); @@ -261,8 +266,9 @@ contract OneStepProverHostIoTest is Test { function testCustomDAProofTooShort() public { // Deploy OSP with mockCustomDAProofValidator as customDAValidator - OneStepProverHostIoPublic ospHostIo = - new OneStepProverHostIoPublic(address(mockCustomDAProofValidator)); + OneStepProverHostIoPublic ospHostIo = new OneStepProverHostIoPublic( + address(mockCustomDAProofValidator), address(mockHashProofHelper) + ); bytes32 certKeccak256 = keccak256("test"); bytes memory merkleProof = buildMerkleProof(certKeccak256); @@ -289,8 +295,9 @@ contract OneStepProverHostIoTest is Test { function testProofTooShortForCert() public { // Deploy OSP with mockCustomDAProofValidator as customDAValidator - OneStepProverHostIoPublic ospHostIo = - new OneStepProverHostIoPublic(address(mockCustomDAProofValidator)); + OneStepProverHostIoPublic ospHostIo = new OneStepProverHostIoPublic( + address(mockCustomDAProofValidator), address(mockHashProofHelper) + ); bytes32 certKeccak256 = keccak256("test"); bytes memory merkleProof = buildMerkleProof(certKeccak256); @@ -322,8 +329,9 @@ contract OneStepProverHostIoTest is Test { function testUnknownPreimageProof() public { // Deploy OSP with mockCustomDAProofValidator as customDAValidator - OneStepProverHostIoPublic ospHostIo = - new OneStepProverHostIoPublic(address(mockCustomDAProofValidator)); + OneStepProverHostIoPublic ospHostIo = new OneStepProverHostIoPublic( + address(mockCustomDAProofValidator), address(mockHashProofHelper) + ); bytes memory preimage = hex"0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20"; @@ -354,7 +362,8 @@ contract OneStepProverHostIoTest is Test { function testInvalidCustomDAResponseTooLong() public { // Deploy OSP with a validator that returns too long response CustomDAProofValidatorBadResponse badValidator = new CustomDAProofValidatorBadResponse(); - OneStepProverHostIoPublic ospHostIo = new OneStepProverHostIoPublic(address(badValidator)); + OneStepProverHostIoPublic ospHostIo = + new OneStepProverHostIoPublic(address(badValidator), address(mockHashProofHelper)); (bytes32 certKeccak256, bytes memory proof) = buildFullProof(hex"0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20"); @@ -379,7 +388,8 @@ contract OneStepProverHostIoTest is Test { // Deploy OSP with a validator that returns empty response CustomDAProofValidatorEmptyResponse emptyValidator = new CustomDAProofValidatorEmptyResponse(); - OneStepProverHostIoPublic ospHostIo = new OneStepProverHostIoPublic(address(emptyValidator)); + OneStepProverHostIoPublic ospHostIo = + new OneStepProverHostIoPublic(address(emptyValidator), address(mockHashProofHelper)); (bytes32 certKeccak256, bytes memory proof) = buildFullProof(hex"0102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f20"); diff --git a/test/foundry/Rollup.t.sol b/test/foundry/Rollup.t.sol index d8ec1d31..c40b2896 100644 --- a/test/foundry/Rollup.t.sol +++ b/test/foundry/Rollup.t.sol @@ -132,7 +132,7 @@ contract RollupTest is Test { OneStepProver0 oneStepProver = new OneStepProver0(); OneStepProverMemory oneStepProverMemory = new OneStepProverMemory(); OneStepProverMath oneStepProverMath = new OneStepProverMath(); - OneStepProverHostIo oneStepProverHostIo = new OneStepProverHostIo(address(0)); + OneStepProverHostIo oneStepProverHostIo = new OneStepProverHostIo(address(0), address(0)); OneStepProofEntry oneStepProofEntry = new OneStepProofEntry( oneStepProver, oneStepProverMemory, oneStepProverMath, oneStepProverHostIo ); diff --git a/test/foundry/RollupCreator.t.sol b/test/foundry/RollupCreator.t.sol index 66867ba2..653128f9 100644 --- a/test/foundry/RollupCreator.t.sol +++ b/test/foundry/RollupCreator.t.sol @@ -542,7 +542,7 @@ contract RollupCreatorTest is Test { new OneStepProver0(), new OneStepProverMemory(), new OneStepProverMath(), - new OneStepProverHostIo(address(0)) + new OneStepProverHostIo(address(0), address(0)) ); challengeManager = new EdgeChallengeManager(); diff --git a/test/signatures/OneStepProofEntry b/test/signatures/OneStepProofEntry index e2ab4235..56755717 100644 --- a/test/signatures/OneStepProofEntry +++ b/test/signatures/OneStepProofEntry @@ -1,19 +1,19 @@ -╭---------------------------------------------------------------+------------╮ -| Method | Identifier | -+============================================================================+ -| getMachineHash(((bytes32[4],uint64[4]),uint8)) | 43d43807 | -|---------------------------------------------------------------+------------| -| getStartMachineHash(bytes32,bytes32) | 04997be4 | -|---------------------------------------------------------------+------------| -| proveOneStep((uint256,address,bytes32),uint256,bytes32,bytes) | b5112fd2 | -|---------------------------------------------------------------+------------| -| prover0() | 30a5509f | -|---------------------------------------------------------------+------------| -| proverHostIo() | 5f52fd7c | -|---------------------------------------------------------------+------------| -| proverMath() | 66e5d9c3 | -|---------------------------------------------------------------+------------| -| proverMem() | 1f128bc0 | -╰---------------------------------------------------------------+------------╯ +╭-------------------------------------------------------+------------╮ +| Method | Identifier | ++====================================================================+ +| getMachineHash(((bytes32[4],uint64[4]),uint8)) | 43d43807 | +|-------------------------------------------------------+------------| +| getStartMachineHash(bytes32,bytes32) | 04997be4 | +|-------------------------------------------------------+------------| +| proveOneStep((bytes32,bytes32),uint256,bytes32,bytes) | 400cc375 | +|-------------------------------------------------------+------------| +| prover0() | 30a5509f | +|-------------------------------------------------------+------------| +| proverHostIo() | 5f52fd7c | +|-------------------------------------------------------+------------| +| proverMath() | 66e5d9c3 | +|-------------------------------------------------------+------------| +| proverMem() | 1f128bc0 | +╰-------------------------------------------------------+------------╯ diff --git a/test/signatures/OneStepProver0 b/test/signatures/OneStepProver0 index 676a0c16..e2be2571 100644 --- a/test/signatures/OneStepProver0 +++ b/test/signatures/OneStepProver0 @@ -1,7 +1,7 @@ -╭--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╮ -| Method | Identifier | -+=========================================================================================================================================================================================================================================================================================================================================================+ -| executeOneStep((uint256,address,bytes32),(uint8,(((uint8,uint256)[]),bytes32),(bytes32,bytes32),(((uint8,uint256)[]),bytes32),(((uint8,uint256),bytes32,uint32,uint32)[],bytes32),(bytes32,bytes32),bytes32,uint32,uint32,uint32,bytes32,bytes32),(bytes32,(uint64,uint64,bytes32),bytes32,bytes32,bytes32,uint32),(uint16,uint256),bytes) | a92cb501 | -╰--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╯ +╭------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++=================================================================================================================================================================================================================================================================================================================================================+ +| executeOneStep((bytes32,bytes32),(uint8,(((uint8,uint256)[]),bytes32),(bytes32,bytes32),(((uint8,uint256)[]),bytes32),(((uint8,uint256),bytes32,uint32,uint32)[],bytes32),(bytes32,bytes32),bytes32,uint32,uint32,uint32,bytes32,bytes32),(bytes32,(uint64,uint64,bytes32),bytes32,bytes32,bytes32,uint32),(uint16,uint256),bytes) | 8451c82c | +╰------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╯ diff --git a/test/signatures/OneStepProverHostIo b/test/signatures/OneStepProverHostIo index 8ae31fa7..173c0050 100644 --- a/test/signatures/OneStepProverHostIo +++ b/test/signatures/OneStepProverHostIo @@ -1,9 +1,11 @@ -╭--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╮ -| Method | Identifier | -+=========================================================================================================================================================================================================================================================================================================================================================+ -| customDAValidator() | c3ea90ba | -|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| -| executeOneStep((uint256,address,bytes32),(uint8,(((uint8,uint256)[]),bytes32),(bytes32,bytes32),(((uint8,uint256)[]),bytes32),(((uint8,uint256),bytes32,uint32,uint32)[],bytes32),(bytes32,bytes32),bytes32,uint32,uint32,uint32,bytes32,bytes32),(bytes32,(uint64,uint64,bytes32),bytes32,bytes32,bytes32,uint32),(uint16,uint256),bytes) | a92cb501 | -╰--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╯ +╭------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++=================================================================================================================================================================================================================================================================================================================================================+ +| customDAValidator() | c3ea90ba | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| executeOneStep((bytes32,bytes32),(uint8,(((uint8,uint256)[]),bytes32),(bytes32,bytes32),(((uint8,uint256)[]),bytes32),(((uint8,uint256),bytes32,uint32,uint32)[],bytes32),(bytes32,bytes32),bytes32,uint32,uint32,uint32,bytes32,bytes32),(bytes32,(uint64,uint64,bytes32),bytes32,bytes32,bytes32,uint32),(uint16,uint256),bytes) | 8451c82c | +|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------| +| hashProofHelper() | bef51917 | +╰------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╯ diff --git a/test/signatures/OneStepProverMath b/test/signatures/OneStepProverMath index 676a0c16..e2be2571 100644 --- a/test/signatures/OneStepProverMath +++ b/test/signatures/OneStepProverMath @@ -1,7 +1,7 @@ -╭--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╮ -| Method | Identifier | -+=========================================================================================================================================================================================================================================================================================================================================================+ -| executeOneStep((uint256,address,bytes32),(uint8,(((uint8,uint256)[]),bytes32),(bytes32,bytes32),(((uint8,uint256)[]),bytes32),(((uint8,uint256),bytes32,uint32,uint32)[],bytes32),(bytes32,bytes32),bytes32,uint32,uint32,uint32,bytes32,bytes32),(bytes32,(uint64,uint64,bytes32),bytes32,bytes32,bytes32,uint32),(uint16,uint256),bytes) | a92cb501 | -╰--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╯ +╭------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++=================================================================================================================================================================================================================================================================================================================================================+ +| executeOneStep((bytes32,bytes32),(uint8,(((uint8,uint256)[]),bytes32),(bytes32,bytes32),(((uint8,uint256)[]),bytes32),(((uint8,uint256),bytes32,uint32,uint32)[],bytes32),(bytes32,bytes32),bytes32,uint32,uint32,uint32,bytes32,bytes32),(bytes32,(uint64,uint64,bytes32),bytes32,bytes32,bytes32,uint32),(uint16,uint256),bytes) | 8451c82c | +╰------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╯ diff --git a/test/signatures/OneStepProverMemory b/test/signatures/OneStepProverMemory index 676a0c16..e2be2571 100644 --- a/test/signatures/OneStepProverMemory +++ b/test/signatures/OneStepProverMemory @@ -1,7 +1,7 @@ -╭--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╮ -| Method | Identifier | -+=========================================================================================================================================================================================================================================================================================================================================================+ -| executeOneStep((uint256,address,bytes32),(uint8,(((uint8,uint256)[]),bytes32),(bytes32,bytes32),(((uint8,uint256)[]),bytes32),(((uint8,uint256),bytes32,uint32,uint32)[],bytes32),(bytes32,bytes32),bytes32,uint32,uint32,uint32,bytes32,bytes32),(bytes32,(uint64,uint64,bytes32),bytes32,bytes32,bytes32,uint32),(uint16,uint256),bytes) | a92cb501 | -╰--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╯ +╭------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╮ +| Method | Identifier | ++=================================================================================================================================================================================================================================================================================================================================================+ +| executeOneStep((bytes32,bytes32),(uint8,(((uint8,uint256)[]),bytes32),(bytes32,bytes32),(((uint8,uint256)[]),bytes32),(((uint8,uint256),bytes32,uint32,uint32)[],bytes32),(bytes32,bytes32),bytes32,uint32,uint32,uint32,bytes32,bytes32),(bytes32,(uint64,uint64,bytes32),bytes32,bytes32,bytes32,uint32),(uint16,uint256),bytes) | 8451c82c | +╰------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+------------╯