diff --git a/contracts/AVRValidator.sol b/contracts/AVRValidator.sol index d8a3555..73d2ec2 100644 --- a/contracts/AVRValidator.sol +++ b/contracts/AVRValidator.sol @@ -6,6 +6,7 @@ import {BytesUtils} from "@ensdomains/ens-contracts/contracts/dnssec-oracle/Byte import {Base64} from "base64/base64.sol"; import {Asn1Decode, NodePtr} from "./Asn1Decode.sol"; import {LCPUtils} from "./LCPUtils.sol"; +import {ILCPClientErrors} from "./ILCPClientErrors.sol"; /** * @dev AVRValidator provides the validation functions of Intel's Attestation Verification Report(AVR) @@ -49,6 +50,55 @@ library AVRValidator { uint256 notAfter; // seconds since epoch } + struct ReportAllowedStatus { + // quote status => flag(0: not allowed, 1: allowed) + mapping(string => uint256) allowedQuoteStatuses; + // advisory id => flag(0: not allowed, 1: allowed) + mapping(string => uint256) allowedAdvisories; + } + + // ------------------ Public functions ------------------ + + struct ReportExtractedElements { + address enclaveKey; + address operator; + uint64 attestationTime; + bytes32 mrenclave; + } + + function verifyReport( + bool developmentMode, + AVRValidator.RSAParams storage verifiedRootCAParams, + mapping(bytes32 => AVRValidator.RSAParams) storage verifiedSigningRSAParams, + ReportAllowedStatus storage allowedStatuses, + bytes calldata report, + bytes calldata signingCert, + bytes calldata signature + ) public returns (ReportExtractedElements memory) { + RSAParams storage params = verifiedSigningRSAParams[keccak256(signingCert)]; + if (params.notAfter == 0) { + if (verifiedRootCAParams.notAfter <= block.timestamp) { + revert ILCPClientErrors.LCPClientIASRootCertExpired(); + } + AVRValidator.RSAParams memory p = + verifySigningCert(verifiedRootCAParams.modulus, verifiedRootCAParams.exponent, signingCert); + params.modulus = p.modulus; + params.exponent = p.exponent; + // NOTE: notAfter is the minimum of rootCACert and signingCert + if (verifiedRootCAParams.notAfter > p.notAfter) { + params.notAfter = p.notAfter; + } else { + params.notAfter = verifiedRootCAParams.notAfter; + } + } else if (params.notAfter <= block.timestamp) { + revert ILCPClientErrors.LCPClientIASCertExpired(); + } + if (!verifySignature(sha256(report), signature, params.exponent, params.modulus)) { + revert ILCPClientErrors.LCPClientAVRInvalidSignature(); + } + return validateAndExtractElements(developmentMode, report, allowedStatuses); + } + /** * @dev verifySignature verifies the RSA signature of the report. * @param reportSha256 is sha256(AVR) @@ -59,9 +109,9 @@ library AVRValidator { function verifySignature( bytes32 reportSha256, bytes calldata signature, - bytes calldata exponent, - bytes calldata modulus - ) external view returns (bool) { + bytes memory exponent, + bytes memory modulus + ) public view returns (bool) { (bool ok, bytes memory result) = RSAVerify.rsarecover(modulus, exponent, signature); // Verify it ends with the hash of our data return ok && reportSha256 == result.readBytes32(result.length - 32); @@ -85,8 +135,8 @@ library AVRValidator { * Please read the comments of parseCertificate for the expected structure of the certificate. */ function verifySigningCert( - bytes calldata rootCAPublicKeyModulus, - bytes calldata rootCAPublicKeyExponent, + bytes memory rootCAPublicKeyModulus, + bytes memory rootCAPublicKeyExponent, bytes calldata signingCert ) public view returns (RSAParams memory) { (bytes memory modulus, bytes memory exponent, bytes32 signedData, bytes memory signature, uint256 notAfter) = @@ -98,6 +148,136 @@ library AVRValidator { return RSAParams(modulus, exponent, notAfter); } + /** + * @dev validateAndExtractElements try to parse a given report. + * The parser expects the following structure(pretty printed): + * { + * "id": "120273546145229684841731255506776325150", + * "timestamp": "2022-12-01T09:49:53.473230", + * "version": 4, + * "advisoryURL": "https://security-center.intel.com", // optional + * "advisoryIDs": [ // optional + * "INTEL-SA-00219", + * "INTEL-SA-00289", + * "INTEL-SA-00614", + * "INTEL-SA-00617", + * "INTEL-SA-00477", + * "INTEL-SA-00615", + * "INTEL-SA-00334" + * ], + * "isvEnclaveQuoteStatus": "GROUP_OUT_OF_DATE", + * // optional + * "platformInfoBlob": "1502006504000F00000F0F020202800E0000000000000000000D00000C000000020000000000000BF1FF71C73902CC168C67B32BABE311C8DCD69AA9A065D5DA1F575FA5939FD06B43FC187CDBDF97C972CA863F96A6EA5E6BB7313B5A38E28C2D117C990CEAA9CF3A", + * "isvEnclaveQuoteBody": "AgAAAPELAAALAAoAAAAAALCbZcb+Fr6JI5sV5pIlYVt2GdTw6l8Ea6v+ySKOFbzvDQ3//wKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAHAAAAAAAAADRdEEo/Gd2j3BUnuFH3PJYMIqpCpDr30GLCEPnHnp+kAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACD1xnnferKFHD2uvYqTXdDA8iZ22kCD5xw7h38CMfOngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABNFlyxvu2l+vFxOlwhIAe+KlPZewAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" + * } + */ + function validateAndExtractElements( + bool developmentMode, + bytes calldata report, + ReportAllowedStatus storage allowedStatus + ) public view returns (ReportExtractedElements memory) { + // find 'timestamp' key + (uint256 i, bytes memory timestamp) = consumeTimestampReportJSON(report, 0); + uint256 checkpoint; + + // find 'version' key + i = consumeVersionReportJSON(report, i); + checkpoint = i; + + // find 'isvEnclaveQuoteStatus' key + bytes memory status; + (i, status) = consumeIsvEnclaveQuoteStatusReportJSON(report, i); + // skip the validation for quote status and advisories if status is "OK" + if (!(status.length == 2 && status[0] == 0x4f && status[1] == 0x4b)) { + require( + allowedStatus.allowedQuoteStatuses[string(status)] == FLAG_ALLOWED, "the quote status is not allowed" + ); + bytes32 h = keccak256(status); + if ( + h == HASHED_GROUP_OUT_OF_DATE || h == HASHED_CONFIGURATION_NEEDED || h == HASHED_SW_HARDENING_NEEDED + || h == HASHED_CONFIGURATION_AND_SW_HARDENING_NEEDED + ) { + // find 'advisoryIDs' key and validate them + checkpoint = consumeAdvisoryIdsReportJSON(report, checkpoint); + validateAdvisories(report, checkpoint, allowedStatus.allowedAdvisories); + } + } + + // find 'platformInfoBlob' key(optional) + i = consumePlatformInfoBlobReportJSONIfExists(report, i); + + // find 'isvEnclaveQuoteBody' key + i = consumeIsvEnclaveQuoteBodyReportJSON(report, i); + + // decode isvEnclaveQuoteBody + // 576 bytes is the length of the quote + bytes memory quoteDecoded = Base64.decode(string(report[i:i + 576])); + + /** + * parse the quote fields as follows: + * https://api.trustedservices.intel.com/documents/sgx-attestation-api-spec.pdf (p.26-27) + */ + uint8 attributesFlags = quoteDecoded.readUint8(96); + // check debug flag(0b0000_0010) + if (developmentMode) { + require(attributesFlags & uint8(2) != uint8(0), "disallowed production enclave"); + } else { + require(attributesFlags & uint8(2) == uint8(0), "disallowed debug enclave"); + } + uint256 attestationTime = LCPUtils.attestationTimestampToSeconds(timestamp); + require(attestationTime <= type(uint64).max, "timestamp is too large"); + // report data layout + // |report data type: 1|enclave public key: 20|operator: 20|reserved: 23 + // |368 |369 |389 |409 + require(quoteDecoded[368] == bytes1(uint8(1)), "report data type is not 1"); + return ReportExtractedElements( + address(quoteDecoded.readBytes20(369)), + address(quoteDecoded.readBytes20(389)), + uint64(attestationTime), + quoteDecoded.readBytes32(112) + ); + } + + function validateAdvisories( + bytes calldata report, + uint256 offset, + mapping(string => uint256) storage allowedAdvisories + ) public view returns (uint256) { + require(offset < report.length && report[offset] == CHAR_LIST_START); + offset++; + + uint256 lastStart = offset; + bool itemStart = false; + bytes32 chr; + + for (; offset < report.length; offset++) { + chr = report[offset]; + if (chr == CHAR_DOUBLE_QUOTE) { + itemStart = !itemStart; + if (itemStart) { + lastStart = offset + 1; + } + } else if (chr == CHAR_COMMA) { + require( + allowedAdvisories[string(report[lastStart:lastStart + offset - lastStart - 1])] == FLAG_ALLOWED, + "disallowed advisory is included" + ); + } else if (chr == CHAR_LIST_END) { + if (offset - lastStart > 0) { + require( + allowedAdvisories[string(report[lastStart:lastStart + offset - lastStart - 1])] == FLAG_ALLOWED, + "disallowed advisory is included" + ); + } + require(!itemStart, "insufficient doubleQuotes number"); + return offset + 1; + } + } + revert("missing listEnd"); + } + + // ------------------ Private functions ------------------ + /** * @dev parseCertificate parses a given certificate. * The parser expects the following structure: @@ -134,7 +314,7 @@ library AVRValidator { * @return notAfter is the timestamp when the certificate is expired */ function parseCertificate(bytes memory cert) - internal + private view returns (bytes memory, bytes memory, bytes32 signedData, bytes memory signature, uint256 notAfter) { @@ -237,127 +417,7 @@ library AVRValidator { ); } - /** - * @dev validateAndExtractElements try to parse a given report. - * The parser expects the following structure(pretty printed): - * { - * "id": "120273546145229684841731255506776325150", - * "timestamp": "2022-12-01T09:49:53.473230", - * "version": 4, - * "advisoryURL": "https://security-center.intel.com", // optional - * "advisoryIDs": [ // optional - * "INTEL-SA-00219", - * "INTEL-SA-00289", - * "INTEL-SA-00614", - * "INTEL-SA-00617", - * "INTEL-SA-00477", - * "INTEL-SA-00615", - * "INTEL-SA-00334" - * ], - * "isvEnclaveQuoteStatus": "GROUP_OUT_OF_DATE", - * // optional - * "platformInfoBlob": "1502006504000F00000F0F020202800E0000000000000000000D00000C000000020000000000000BF1FF71C73902CC168C67B32BABE311C8DCD69AA9A065D5DA1F575FA5939FD06B43FC187CDBDF97C972CA863F96A6EA5E6BB7313B5A38E28C2D117C990CEAA9CF3A", - * "isvEnclaveQuoteBody": "AgAAAPELAAALAAoAAAAAALCbZcb+Fr6JI5sV5pIlYVt2GdTw6l8Ea6v+ySKOFbzvDQ3//wKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAHAAAAAAAAADRdEEo/Gd2j3BUnuFH3PJYMIqpCpDr30GLCEPnHnp+kAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACD1xnnferKFHD2uvYqTXdDA8iZ22kCD5xw7h38CMfOngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABNFlyxvu2l+vFxOlwhIAe+KlPZewAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - * } - * - * @return address of EnclaveKey - * @return timestamp when report was attested - * @return mrenclave of the attested enclave - */ - function validateAndExtractElements( - bool developmentMode, - bytes calldata report, - mapping(string => uint256) storage allowedQuoteStatuses, - mapping(string => uint256) storage allowedAdvisories - ) external view returns (address, bytes memory, bytes32) { - // find 'timestamp' key - (uint256 i, bytes memory timestamp) = consumeTimestampReportJSON(report, 0); - uint256 checkpoint; - - // find 'version' key - i = consumeVersionReportJSON(report, i); - checkpoint = i; - - // find 'isvEnclaveQuoteStatus' key - bytes memory status; - (i, status) = consumeIsvEnclaveQuoteStatusReportJSON(report, i); - // skip the validation for quote status and advisories if status is "OK" - if (!(status.length == 2 && status[0] == 0x4f && status[1] == 0x4b)) { - require(allowedQuoteStatuses[string(status)] == FLAG_ALLOWED, "the quote status is not allowed"); - bytes32 h = keccak256(status); - if ( - h == HASHED_GROUP_OUT_OF_DATE || h == HASHED_CONFIGURATION_NEEDED || h == HASHED_SW_HARDENING_NEEDED - || h == HASHED_CONFIGURATION_AND_SW_HARDENING_NEEDED - ) { - // find 'advisoryIDs' key and validate them - validateAdvisories(report, consumeAdvisoryIdsReportJSON(report, checkpoint), allowedAdvisories); - } - } - - // find 'platformInfoBlob' key(optional) - i = consumePlatformInfoBlobReportJSONIfExists(report, i); - - // find 'isvEnclaveQuoteBody' key - i = consumeIsvEnclaveQuoteBodyReportJSON(report, i); - - // decode isvEnclaveQuoteBody - // 576 bytes is the length of the quote - bytes memory quoteDecoded = Base64.decode(string(report[i:i + 576])); - - /** - * parse the quote fields as follows: - * https://api.trustedservices.intel.com/documents/sgx-attestation-api-spec.pdf (p.26-27) - */ - uint8 attributesFlags = quoteDecoded.readUint8(96); - // check debug flag(0b0000_0010) - if (developmentMode) { - require(attributesFlags & uint8(2) != uint8(0), "disallowed production enclave"); - } else { - require(attributesFlags & uint8(2) == uint8(0), "disallowed debug enclave"); - } - - return (address(quoteDecoded.readBytes20(368)), timestamp, quoteDecoded.readBytes32(112)); - } - - function validateAdvisories( - bytes calldata report, - uint256 offset, - mapping(string => uint256) storage allowedAdvisories - ) internal view returns (uint256) { - require(offset < report.length && report[offset] == CHAR_LIST_START); - offset++; - - uint256 lastStart = offset; - bool itemStart = false; - bytes32 chr; - - for (; offset < report.length; offset++) { - chr = report[offset]; - if (chr == CHAR_DOUBLE_QUOTE) { - itemStart = !itemStart; - if (itemStart) { - lastStart = offset + 1; - } - } else if (chr == CHAR_COMMA) { - require( - allowedAdvisories[string(report[lastStart:lastStart + offset - lastStart - 1])] == FLAG_ALLOWED, - "disallowed advisory is included" - ); - } else if (chr == CHAR_LIST_END) { - if (offset - lastStart > 0) { - require( - allowedAdvisories[string(report[lastStart:lastStart + offset - lastStart - 1])] == FLAG_ALLOWED, - "disallowed advisory is included" - ); - } - require(!itemStart, "insufficient doubleQuotes number"); - return offset + 1; - } - } - revert("missing listEnd"); - } - - function consumeJSONKey(bytes calldata report, uint256 i, string memory keyStr) internal pure returns (uint256) { + function consumeJSONKey(bytes calldata report, uint256 i, string memory keyStr) private pure returns (uint256) { uint256 len = bytes(keyStr).length; assert(len > 0 && len <= 32); bytes32 key = bytes32(bytes(keyStr)); @@ -379,7 +439,7 @@ library AVRValidator { } function consumeTimestampReportJSON(bytes calldata report, uint256 i) - internal + private pure returns (uint256, bytes memory) { @@ -387,19 +447,19 @@ library AVRValidator { return (i + 26, report[i:i + 26]); } - function consumeVersionReportJSON(bytes calldata report, uint256 i) internal pure returns (uint256) { + function consumeVersionReportJSON(bytes calldata report, uint256 i) private pure returns (uint256) { i = consumeJSONKey(report, i, "version") + OFFSET_JSON_NUMBER_VALUE; // check if the version matches "4,"(0x34, 0x2c) require(bytes2(report[i:i + 2]) == bytes2(hex"342c"), "version mismatch"); return i + 2; } - function consumeAdvisoryIdsReportJSON(bytes calldata report, uint256 i) internal pure returns (uint256) { + function consumeAdvisoryIdsReportJSON(bytes calldata report, uint256 i) private pure returns (uint256) { return consumeJSONKey(report, i, "advisoryIDs") + OFFSET_JSON_LIST_VALUE; } function consumeIsvEnclaveQuoteStatusReportJSON(bytes calldata report, uint256 i) - internal + private pure returns (uint256, bytes memory) { @@ -409,7 +469,7 @@ library AVRValidator { } function consumePlatformInfoBlobReportJSONIfExists(bytes calldata report, uint256 i) - internal + private pure returns (uint256) { @@ -428,11 +488,11 @@ library AVRValidator { return i + 8 + hexBytesToUint(bytes4(report[i + 4:i + 8])) * 2; } - function consumeIsvEnclaveQuoteBodyReportJSON(bytes calldata report, uint256 i) internal pure returns (uint256) { + function consumeIsvEnclaveQuoteBodyReportJSON(bytes calldata report, uint256 i) private pure returns (uint256) { return consumeJSONKey(report, i, "isvEnclaveQuoteBody") + OFFSET_JSON_STRING_VALUE; } - function hexBytesToUint(bytes4 ss) internal pure returns (uint256) { + function hexBytesToUint(bytes4 ss) private pure returns (uint256) { uint256 val = 0; uint8 zero = uint8(48); //0 uint8 nine = uint8(57); //9 diff --git a/contracts/ILCPClientErrors.sol b/contracts/ILCPClientErrors.sol new file mode 100644 index 0000000..7ef8fee --- /dev/null +++ b/contracts/ILCPClientErrors.sol @@ -0,0 +1,59 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +interface ILCPClientErrors { + error LCPClientRootCACertAlreadyInitialized(); + error LCPClientClientStateInvalidLatestHeight(); + error LCPClientClientStateFrozen(); + error LCPClientClientStateInvalidKeyExpiration(); + error LCPClientClientStateInvalidMrenclaveLength(); + error LCPClientClientStateUnexpectedMrenclave(); + error LCPClientClientStateEmptyOperators(); + error LCPClientClientStateInvalidOperatorAddress(); + error LCPClientClientStateInvalidOperatorAddressLength(); + error LCPClientClientStateInvalidOperatorsNonce(); + error LCPClientClientStateUnexpectedOperatorsNonce(uint64 expectedNonce); + + error LCPClientOperatorsInvalidOrder(address prevOperator, address nextOperator); + error LCPClientClientStateInvalidOperatorsThreshold(); + + error LCPClientConsensusStateInvalidTimestamp(); + error LCPClientConsensusStateInvalidStateId(); + + error LCPClientClientStateNotFound(); + error LCPClientConsensusStateNotFound(); + error LCPClientUnknownProxyMessageHeader(); + error LCPClientUnknownProtoTypeUrl(); + + error LCPClientMembershipVerificationInvalidHeight(); + error LCPClientMembershipVerificationInvalidPrefix(); + error LCPClientMembershipVerificationInvalidPath(); + error LCPClientMembershipVerificationInvalidValue(); + error LCPClientMembershipVerificationInvalidStateId(); + + error LCPClientUpdateStateEmittedStatesMustNotEmpty(); + error LCPClientUpdateStatePrevStateIdMustNotEmpty(); + error LCPClientUpdateStateUnexpectedPrevStateId(); + + error LCPClientMisbehaviourPrevStatesMustNotEmpty(); + + error LCPClientEnclaveKeyNotExist(); + error LCPClientEnclaveKeyExpired(); + error LCPClientEnclaveKeyUnexpectedOperator(address expected, address actual); + error LCPClientEnclaveKeyUnexpectedExpiredAt(); + + error LCPClientOperatorSignaturesInsufficient(uint256 success); + + error LCPClientIASRootCertExpired(); + error LCPClientIASCertExpired(); + + error LCPClientAVRInvalidSignature(); + error LCPClientAVRAlreadyExpired(); + + error LCPClientInvalidSignaturesLength(); + + error LCPClientAVRUnexpectedOperator(address actual, address expected); + + error LCPClientUpdateOperatorsPermissionless(); + error LCPClientUpdateOperatorsSignatureUnexpectedOperator(address actual, address expected); +} diff --git a/contracts/LCPClientBase.sol b/contracts/LCPClientBase.sol index 4b9cc04..876f6eb 100644 --- a/contracts/LCPClientBase.sol +++ b/contracts/LCPClientBase.sol @@ -9,51 +9,74 @@ import { IbcLightclientsLcpV1ClientState as ProtoClientState, IbcLightclientsLcpV1ConsensusState as ProtoConsensusState, IbcLightclientsLcpV1RegisterEnclaveKeyMessage as RegisterEnclaveKeyMessage, - IbcLightclientsLcpV1UpdateClientMessage as UpdateClientMessage + IbcLightclientsLcpV1UpdateClientMessage as UpdateClientMessage, + IbcLightclientsLcpV1UpdateOperatorsMessage as UpdateOperatorsMessage } from "./proto/ibc/lightclients/lcp/v1/LCP.sol"; import {LCPCommitment} from "./LCPCommitment.sol"; +import {LCPOperator} from "./LCPOperator.sol"; import {LCPProtoMarshaler} from "./LCPProtoMarshaler.sol"; -import {LCPUtils} from "./LCPUtils.sol"; import {AVRValidator} from "./AVRValidator.sol"; +import {ILCPClientErrors} from "./ILCPClientErrors.sol"; -abstract contract LCPClientBase is ILightClient { +abstract contract LCPClientBase is ILightClient, ILCPClientErrors { using IBCHeight for Height.Data; + // --------------------- Data structures --------------------- + struct ConsensusState { bytes32 stateId; uint64 timestamp; } - event RegisteredEnclaveKey(string clientId, address enclaveKey, uint256 expiredAt); + struct EKInfo { + uint64 expiredAt; + address operator; + } + + struct ClientStorage { + ProtoClientState.Data clientState; + AVRValidator.ReportAllowedStatus allowedStatuses; + // height => consensus state + mapping(uint128 => ConsensusState) consensusStates; + // enclave key => EKInfo + mapping(address => EKInfo) ekInfos; + } + + // --------------------- Events --------------------- + + event RegisteredEnclaveKey(string clientId, address enclaveKey, uint256 expiredAt, address operator); - address immutable ibcHandler; + // --------------------- Immutable fields --------------------- + + address internal immutable ibcHandler; // if developmentMode is true, the client allows the remote attestation of IAS in development. - bool immutable developmentMode; + bool internal immutable developmentMode; + + // --------------------- Storage fields --------------------- - mapping(string => ProtoClientState.Data) internal clientStates; - mapping(string => mapping(uint128 => ConsensusState)) internal consensusStates; + mapping(string => ClientStorage) internal clientStorages; // rootCA's public key parameters AVRValidator.RSAParams public verifiedRootCAParams; // keccak256(signingCert) => RSAParams of signing public key mapping(bytes32 => AVRValidator.RSAParams) public verifiedSigningRSAParams; - // clientId => enclave key => expiredAt - mapping(string => mapping(address => uint256)) internal enclaveKeys; - // clientId => quote status => flag(0: not allowed, 1: allowed) - mapping(string => mapping(string => uint256)) internal allowedQuoteStatuses; - // clientId => advisory id => flag(0: not allowed, 1: allowed) - mapping(string => mapping(string => uint256)) internal allowedAdvisories; - modifier onlyIBC() { - require(msg.sender == ibcHandler); - _; - } + // --------------------- Constructor --------------------- constructor(address ibcHandler_, bool developmentMode_) { ibcHandler = ibcHandler_; developmentMode = developmentMode_; } + // --------------------- Modifiers --------------------- + + modifier onlyIBC() { + require(msg.sender == ibcHandler); + _; + } + + // --------------------- Public methods --------------------- + /// @dev isDevelopmentMode returns true if the client allows the remote attestation of IAS in development. function isDevelopmentMode() public view returns (bool) { return developmentMode; @@ -62,7 +85,9 @@ abstract contract LCPClientBase is ILightClient { /// @dev initializeRootCACert initializes the root CA's public key parameters. /// All contracts that inherit LCPClientBase should call this in the constructor or initializer. function initializeRootCACert(bytes memory rootCACert) internal { - require(verifiedRootCAParams.notAfter == 0, "already initialized"); + if (verifiedRootCAParams.notAfter != 0) { + revert LCPClientRootCACertAlreadyInitialized(); + } verifiedRootCAParams = AVRValidator.verifyRootCACert(rootCACert); } @@ -80,23 +105,65 @@ abstract contract LCPClientBase is ILightClient { ProtoConsensusState.Data memory consensusState = LCPProtoMarshaler.unmarshalConsensusState(protoConsensusState); // validate an initial state - require( - clientState.latest_height.revision_number == 0 && clientState.latest_height.revision_height == 0, - "invalid initial height" - ); - require(!clientState.frozen, "client state must not be frozen"); - require(clientState.key_expiration != 0, "key_expiration must be non-zero"); - require(clientState.mrenclave.length == 32, "invalid mrenclave length"); - require(consensusState.timestamp == 0 && consensusState.state_id.length == 0, "invalid consensus state"); + if (clientState.latest_height.revision_number != 0 || clientState.latest_height.revision_height != 0) { + revert LCPClientClientStateInvalidLatestHeight(); + } + if (clientState.frozen) { + revert LCPClientClientStateFrozen(); + } + if (clientState.key_expiration == 0) { + revert LCPClientClientStateInvalidKeyExpiration(); + } + if (clientState.mrenclave.length != 32) { + revert LCPClientClientStateInvalidMrenclaveLength(); + } + if (clientState.operators_nonce != 0) { + revert LCPClientClientStateInvalidOperatorsNonce(); + } + if ( + clientState.operators.length != 0 + && (clientState.operators_threshold_numerator == 0 || clientState.operators_threshold_denominator == 0) + ) { + revert LCPClientClientStateInvalidOperatorsThreshold(); + } + if (clientState.operators_threshold_numerator > clientState.operators_threshold_denominator) { + revert LCPClientClientStateInvalidOperatorsThreshold(); + } + if (consensusState.timestamp != 0) { + revert LCPClientConsensusStateInvalidTimestamp(); + } + if (consensusState.state_id.length != 0) { + revert LCPClientConsensusStateInvalidStateId(); + } - clientStates[clientId] = clientState; + // ensure the operators are sorted(ascending order) and unique + address prev; + for (uint256 i = 0; i < clientState.operators.length; i++) { + if (clientState.operators[i].length != 20) { + revert LCPClientClientStateInvalidOperatorAddressLength(); + } + address addr = address(bytes20(clientState.operators[i])); + if (addr == address(0)) { + revert LCPClientClientStateInvalidOperatorAddress(); + } + if (prev != address(0)) { + if (prev >= addr) { + revert LCPClientOperatorsInvalidOrder(prev, addr); + } + } + prev = addr; + } + ClientStorage storage clientStorage = clientStorages[clientId]; + clientStorage.clientState = clientState; // set allowed quote status and advisories for (uint256 i = 0; i < clientState.allowed_quote_statuses.length; i++) { - allowedQuoteStatuses[clientId][clientState.allowed_quote_statuses[i]] = AVRValidator.FLAG_ALLOWED; + clientStorage.allowedStatuses.allowedQuoteStatuses[clientState.allowed_quote_statuses[i]] = + AVRValidator.FLAG_ALLOWED; } for (uint256 i = 0; i < clientState.allowed_advisory_ids.length; i++) { - allowedAdvisories[clientId][clientState.allowed_advisory_ids[i]] = AVRValidator.FLAG_ALLOWED; + clientStorage.allowedStatuses.allowedAdvisories[clientState.allowed_advisory_ids[i]] = + AVRValidator.FLAG_ALLOWED; } return clientState.latest_height; @@ -106,8 +173,10 @@ abstract contract LCPClientBase is ILightClient { * @dev getTimestampAtHeight returns the timestamp of the consensus state at the given height. */ function getTimestampAtHeight(string calldata clientId, Height.Data calldata height) public view returns (uint64) { - ConsensusState storage consensusState = consensusStates[clientId][height.toUint128()]; - require(consensusState.timestamp != 0, "consensus state not found"); + ConsensusState storage consensusState = clientStorages[clientId].consensusStates[height.toUint128()]; + if (consensusState.timestamp == 0) { + revert LCPClientConsensusStateNotFound(); + } return consensusState.timestamp; } @@ -115,8 +184,10 @@ abstract contract LCPClientBase is ILightClient { * @dev getLatestHeight returns the latest height of the client state corresponding to `clientId`. */ function getLatestHeight(string calldata clientId) public view returns (Height.Data memory) { - ProtoClientState.Data storage clientState = clientStates[clientId]; - require(clientState.latest_height.revision_height != 0, "client state not found"); + ProtoClientState.Data storage clientState = clientStorages[clientId].clientState; + if (clientState.latest_height.revision_height == 0) { + revert LCPClientClientStateNotFound(); + } return clientState.latest_height; } /** @@ -124,7 +195,7 @@ abstract contract LCPClientBase is ILightClient { */ function getStatus(string calldata clientId) public view returns (ClientStatus) { - return clientStates[clientId].frozen ? ClientStatus.Frozen : ClientStatus.Active; + return clientStorages[clientId].clientState.frozen ? ClientStatus.Frozen : ClientStatus.Active; } /** @@ -135,9 +206,10 @@ abstract contract LCPClientBase is ILightClient { view returns (Height.Data memory latestHeight, uint64 latestTimestamp, ClientStatus status) { - latestHeight = clientStates[clientId].latest_height; - latestTimestamp = consensusStates[clientId][latestHeight.toUint128()].timestamp; - status = clientStates[clientId].frozen ? ClientStatus.Frozen : ClientStatus.Active; + ClientStorage storage clientStorage = clientStorages[clientId]; + latestHeight = clientStorage.clientState.latest_height; + latestTimestamp = clientStorage.consensusStates[latestHeight.toUint128()].timestamp; + status = clientStorage.clientState.frozen ? ClientStatus.Frozen : ClientStatus.Active; } /** @@ -155,8 +227,10 @@ abstract contract LCPClientBase is ILightClient { return (this.updateClient.selector, args); } else if (typeUrlHash == LCPProtoMarshaler.REGISTER_ENCLAVE_KEY_MESSAGE_TYPE_URL_HASH) { return (this.registerEnclaveKey.selector, args); + } else if (typeUrlHash == LCPProtoMarshaler.UPDATE_OPERATORS_MESSAGE_TYPE_URL_HASH) { + return (this.updateOperators.selector, args); } else { - revert("unknown type url"); + revert LCPClientUnknownProtoTypeUrl(); } } @@ -175,25 +249,15 @@ abstract contract LCPClientBase is ILightClient { bytes calldata value ) public view returns (bool) { ( - LCPCommitment.CommitmentProof memory commitmentProof, + LCPCommitment.CommitmentProofs memory commitmentProofs, LCPCommitment.VerifyMembershipProxyMessage memory message - ) = LCPCommitment.parseVerifyMembershipCommitmentProof(proof); - require(commitmentProof.signature.length == 65, "invalid signature length"); - - ConsensusState storage consensusState = consensusStates[clientId][message.height.toUint128()]; - require(consensusState.stateId != bytes32(0), "consensus state not found"); - - require(height.eq(message.height), "invalid height"); - require(keccak256(prefix) == keccak256(message.prefix)); - require(keccak256(path) == keccak256(message.path)); - require(keccak256(value) == message.value, "invalid commitment value"); - require(consensusState.stateId == message.stateId, "invalid state_id"); - require(isActiveKey(clientId, commitmentProof.signer), "the key isn't active"); - require( - verifyCommitmentProof(keccak256(commitmentProof.message), commitmentProof.signature, commitmentProof.signer), - "failed to verify signature" - ); - + ) = LCPCommitment.parseVerifyMembershipCommitmentProofs(proof); + ClientStorage storage clientStorage = clientStorages[clientId]; + validateProxyMessage(clientStorage, message, height, prefix, path); + if (keccak256(value) != message.value) { + revert LCPClientMembershipVerificationInvalidValue(); + } + verifyCommitmentProofs(clientStorage, commitmentProofs); return true; } @@ -211,34 +275,59 @@ abstract contract LCPClientBase is ILightClient { bytes calldata path ) public view returns (bool) { ( - LCPCommitment.CommitmentProof memory commitmentProof, + LCPCommitment.CommitmentProofs memory commitmentProofs, LCPCommitment.VerifyMembershipProxyMessage memory message - ) = LCPCommitment.parseVerifyMembershipCommitmentProof(proof); - require(commitmentProof.signature.length == 65, "invalid signature length"); - - ConsensusState storage consensusState = consensusStates[clientId][message.height.toUint128()]; - require(consensusState.stateId != bytes32(0), "consensus state not found"); - - require(height.eq(message.height), "invalid height"); - require(keccak256(prefix) == keccak256(message.prefix)); - require(keccak256(path) == keccak256(message.path)); - require(bytes32(0) == message.value, "invalid commitment value"); - require(consensusState.stateId == message.stateId, "invalid state_id"); - require(isActiveKey(clientId, commitmentProof.signer), "the key isn't active"); - require( - verifyCommitmentProof(keccak256(commitmentProof.message), commitmentProof.signature, commitmentProof.signer), - "failed to verify signature" - ); - + ) = LCPCommitment.parseVerifyMembershipCommitmentProofs(proof); + ClientStorage storage clientStorage = clientStorages[clientId]; + validateProxyMessage(clientStorage, message, height, prefix, path); + if (message.value != bytes32(0)) { + revert LCPClientMembershipVerificationInvalidValue(); + } + verifyCommitmentProofs(clientStorage, commitmentProofs); return true; } + function validateProxyMessage( + ClientStorage storage clientStorage, + LCPCommitment.VerifyMembershipProxyMessage memory message, + Height.Data calldata height, + bytes memory prefix, + bytes memory path + ) internal view { + uint128 messageHeight = message.height.toUint128(); + uint128 heightValue = height.toUint128(); + ConsensusState storage consensusState = clientStorage.consensusStates[messageHeight]; + if (consensusState.stateId == bytes32(0)) { + revert LCPClientConsensusStateNotFound(); + } + if (heightValue != messageHeight) { + revert LCPClientMembershipVerificationInvalidHeight(); + } + if (keccak256(prefix) != keccak256(message.prefix)) { + revert LCPClientMembershipVerificationInvalidPrefix(); + } + if (keccak256(path) != keccak256(message.path)) { + revert LCPClientMembershipVerificationInvalidPath(); + } + if (consensusState.stateId != message.stateId) { + revert LCPClientMembershipVerificationInvalidStateId(); + } + } + + function verifyCommitmentProofs( + ClientStorage storage clientStorage, + LCPCommitment.CommitmentProofs memory commitmentProofs + ) internal view { + bytes32 commitment = keccak256(commitmentProofs.message); + verifySignatures(clientStorage, commitment, commitmentProofs.signatures); + } + /** * @dev getClientState returns the clientState corresponding to `clientId`. * If it's not found, the function returns false. */ function getClientState(string calldata clientId) public view returns (bytes memory clientStateBytes, bool) { - ProtoClientState.Data storage clientState = clientStates[clientId]; + ProtoClientState.Data storage clientState = clientStorages[clientId].clientState; if (clientState.latest_height.revision_height == 0) { return (clientStateBytes, false); } @@ -254,69 +343,97 @@ abstract contract LCPClientBase is ILightClient { view returns (bytes memory consensusStateBytes, bool) { - ConsensusState storage consensusState = consensusStates[clientId][height.toUint128()]; + ConsensusState storage consensusState = clientStorages[clientId].consensusStates[height.toUint128()]; if (consensusState.timestamp == 0 && consensusState.stateId == bytes32(0)) { return (consensusStateBytes, false); } - return ( - LCPProtoMarshaler.marshal( - ProtoConsensusState.Data({ - timestamp: consensusState.timestamp, - state_id: abi.encodePacked(consensusState.stateId) - }) - ), - true - ); + return (LCPProtoMarshaler.marshalConsensusState(consensusState.stateId, consensusState.timestamp), true); + } + + function verifySignatures(ClientStorage storage clientStorage, bytes32 commitment, bytes[] memory signatures) + internal + view + { + uint256 sigNum = signatures.length; + uint256 opNum = clientStorage.clientState.operators.length; + if (opNum == 0) { + if (sigNum != 1) { + revert LCPClientInvalidSignaturesLength(); + } + ensureActiveKey(clientStorage, verifyECDSASignature(commitment, signatures[0])); + } else { + if (sigNum != opNum) { + revert LCPClientInvalidSignaturesLength(); + } + uint256 success = 0; + for (uint256 i = 0; i < sigNum; i++) { + bytes memory sig = signatures[i]; + if (sig.length != 0) { + ensureActiveKey( + clientStorage, + verifyECDSASignature(commitment, sig), + address(bytes20(clientStorage.clientState.operators[i])) + ); + unchecked { + success++; + } + } + } + ensureSufficientValidSignatures(clientStorage.clientState, success); + } } function updateClient(string calldata clientId, UpdateClientMessage.Data calldata message) public returns (Height.Data[] memory heights) { - require(message.signer.length == 20, "invalid signer length"); - require(message.signature.length == 65, "invalid signature length"); - - require(isActiveKey(clientId, address(bytes20(message.signer))), "the key isn't active"); - require( - verifyCommitmentProof(keccak256(message.proxy_message), message.signature, address(bytes20(message.signer))), - "failed to verify the commitment" - ); + ClientStorage storage clientStorage = clientStorages[clientId]; + verifySignatures(clientStorage, keccak256(message.proxy_message), message.signatures); LCPCommitment.HeaderedProxyMessage memory hm = abi.decode(message.proxy_message, (LCPCommitment.HeaderedProxyMessage)); if (hm.header == LCPCommitment.LCP_MESSAGE_HEADER_UPDATE_STATE) { - return updateState(clientId, abi.decode(hm.message, (LCPCommitment.UpdateStateProxyMessage))); + return updateState(clientStorage, abi.decode(hm.message, (LCPCommitment.UpdateStateProxyMessage))); } else if (hm.header == LCPCommitment.LCP_MESSAGE_HEADER_MISBEHAVIOUR) { - return submitMisbehaviour(clientId, abi.decode(hm.message, (LCPCommitment.MisbehaviourProxyMessage))); + return submitMisbehaviour(clientStorage, abi.decode(hm.message, (LCPCommitment.MisbehaviourProxyMessage))); } else { - revert("unexpected header"); + revert LCPClientUnknownProxyMessageHeader(); } } - function updateState(string calldata clientId, LCPCommitment.UpdateStateProxyMessage memory pmsg) + function updateState(ClientStorage storage clientStorage, LCPCommitment.UpdateStateProxyMessage memory pmsg) internal returns (Height.Data[] memory heights) { - ProtoClientState.Data storage clientState = clientStates[clientId]; ConsensusState storage consensusState; - - require(!clientState.frozen, "client state must not be frozen"); + ProtoClientState.Data storage clientState = clientStorage.clientState; + if (clientState.frozen) { + revert LCPClientClientStateFrozen(); + } if (clientState.latest_height.revision_number == 0 && clientState.latest_height.revision_height == 0) { - require(pmsg.emittedStates.length != 0, "EmittedStates must be non-nil"); + if (pmsg.emittedStates.length == 0) { + revert LCPClientUpdateStateEmittedStatesMustNotEmpty(); + } } else { - consensusState = consensusStates[clientId][pmsg.prevHeight.toUint128()]; - require(pmsg.prevStateId != bytes32(0), "PrevStateID must be non-nil"); - require(consensusState.stateId == pmsg.prevStateId, "unexpected StateID"); + consensusState = clientStorage.consensusStates[pmsg.prevHeight.toUint128()]; + if (pmsg.prevStateId == bytes32(0)) { + revert LCPClientUpdateStatePrevStateIdMustNotEmpty(); + } + if (consensusState.stateId != pmsg.prevStateId) { + revert LCPClientUpdateStateUnexpectedPrevStateId(); + } } LCPCommitment.validationContextEval(pmsg.context, block.timestamp * 1e9); - if (clientState.latest_height.lt(pmsg.postHeight)) { + uint128 latestHeight = clientState.latest_height.toUint128(); + uint128 postHeight = pmsg.postHeight.toUint128(); + if (latestHeight < postHeight) { clientState.latest_height = pmsg.postHeight; } - consensusState = consensusStates[clientId][pmsg.postHeight.toUint128()]; + consensusState = clientStorage.consensusStates[postHeight]; consensusState.stateId = pmsg.postStateId; consensusState.timestamp = uint64(pmsg.timestamp); @@ -325,25 +442,33 @@ abstract contract LCPClientBase is ILightClient { return heights; } - function submitMisbehaviour(string calldata clientId, LCPCommitment.MisbehaviourProxyMessage memory pmsg) + function submitMisbehaviour(ClientStorage storage clientStorage, LCPCommitment.MisbehaviourProxyMessage memory pmsg) internal returns (Height.Data[] memory heights) { - ProtoClientState.Data storage clientState = clientStates[clientId]; - ConsensusState storage consensusState; - - require(!clientState.frozen, "client state must not be frozen"); - require(pmsg.prevStates.length != 0, "PrevStates must be non-nil"); + ProtoClientState.Data storage clientState = clientStorage.clientState; + if (clientState.frozen) { + revert LCPClientClientStateFrozen(); + } + uint256 prevStatesNum = pmsg.prevStates.length; + if (prevStatesNum == 0) { + revert LCPClientMisbehaviourPrevStatesMustNotEmpty(); + } - for (uint256 i = 0; i < pmsg.prevStates.length; i++) { - consensusState = consensusStates[clientId][pmsg.prevStates[i].height.toUint128()]; - require(pmsg.prevStates[i].stateId != bytes32(0), "stateId must be non-nil"); - require(consensusState.stateId == pmsg.prevStates[i].stateId, "unexpected StateID"); + for (uint256 i = 0; i < prevStatesNum; i++) { + LCPCommitment.PrevState memory prev = pmsg.prevStates[i]; + uint128 prevHeight = prev.height.toUint128(); + if (prev.stateId == bytes32(0)) { + revert LCPClientUpdateStatePrevStateIdMustNotEmpty(); + } + if (clientStorage.consensusStates[prevHeight].stateId != prev.stateId) { + revert LCPClientUpdateStateUnexpectedPrevStateId(); + } } LCPCommitment.validationContextEval(pmsg.context, block.timestamp * 1e9); - clientState.frozen = true; + clientStorage.clientState.frozen = true; return heights; } @@ -351,72 +476,175 @@ abstract contract LCPClientBase is ILightClient { public returns (Height.Data[] memory heights) { - { - AVRValidator.RSAParams storage params = verifiedSigningRSAParams[keccak256(message.signing_cert)]; - if (params.notAfter == 0) { - require(verifiedRootCAParams.notAfter > block.timestamp, "root public key is expired"); - AVRValidator.RSAParams memory p = AVRValidator.verifySigningCert( - verifiedRootCAParams.modulus, verifiedRootCAParams.exponent, message.signing_cert - ); - params.modulus = p.modulus; - params.exponent = p.exponent; - // NOTE: notAfter is the minimum of rootCACert and signingCert - if (verifiedRootCAParams.notAfter > p.notAfter) { - params.notAfter = p.notAfter; - } else { - params.notAfter = verifiedRootCAParams.notAfter; - } - } else { - require(params.notAfter > block.timestamp, "certificate is expired"); - } - require( - AVRValidator.verifySignature( - sha256(bytes(message.report)), message.signature, params.exponent, params.modulus - ), - "failed to verify signature" - ); - } - - ProtoClientState.Data storage clientState = clientStates[clientId]; - (address enclaveKey, bytes memory attestationTimeBytes, bytes32 mrenclave) = AVRValidator - .validateAndExtractElements( - developmentMode, bytes(message.report), allowedQuoteStatuses[clientId], allowedAdvisories[clientId] + ClientStorage storage clientStorage = clientStorages[clientId]; + AVRValidator.ReportExtractedElements memory reElems = AVRValidator.verifyReport( + developmentMode, + verifiedRootCAParams, + verifiedSigningRSAParams, + clientStorage.allowedStatuses, + message.report, + message.signing_cert, + message.signature ); - require(bytes32(clientState.mrenclave) == mrenclave, "mrenclave mismatch"); - uint256 expiredAt = - uint64(LCPUtils.attestationTimestampToSeconds(attestationTimeBytes)) + clientState.key_expiration; - require(expiredAt > block.timestamp, "the report is already expired"); + if (bytes32(clientStorage.clientState.mrenclave) != reElems.mrenclave) { + revert LCPClientClientStateUnexpectedMrenclave(); + } - if (enclaveKeys[clientId][enclaveKey] != 0) { - require(enclaveKeys[clientId][enclaveKey] == expiredAt, "expiredAt mismatch"); + // if `operator_signature` is empty, the operator address is zero + address operator; + if (message.operator_signature.length != 0) { + operator = verifyECDSASignature( + keccak256(LCPOperator.computeEIP712RegisterEnclaveKey(message.report)), message.operator_signature + ); + if (reElems.operator != address(0) && reElems.operator != operator) { + revert LCPClientAVRUnexpectedOperator(operator, reElems.operator); + } + } + uint64 expiredAt = reElems.attestationTime + clientStorage.clientState.key_expiration; + if (expiredAt <= block.timestamp) { + revert LCPClientAVRAlreadyExpired(); + } + EKInfo storage ekInfo = clientStorage.ekInfos[reElems.enclaveKey]; + if (ekInfo.expiredAt != 0) { + if (ekInfo.operator != operator) { + revert LCPClientEnclaveKeyUnexpectedOperator(ekInfo.operator, operator); + } + if (ekInfo.expiredAt != expiredAt) { + revert LCPClientEnclaveKeyUnexpectedExpiredAt(); + } // NOTE: if the key already exists, don't update any state return heights; } + ekInfo.expiredAt = expiredAt; + ekInfo.operator = operator; - enclaveKeys[clientId][enclaveKey] = expiredAt; - emit RegisteredEnclaveKey(clientId, enclaveKey, expiredAt); + emit RegisteredEnclaveKey(clientId, reElems.enclaveKey, expiredAt, operator); // Note: client and consensus state are not always updated in registerEnclaveKey return heights; } - function isActiveKey(string calldata clientId, address signer) internal view returns (bool) { - uint256 expiredAt = enclaveKeys[clientId][signer]; + function updateOperators(string calldata clientId, UpdateOperatorsMessage.Data calldata message) + public + returns (Height.Data[] memory heights) + { + ProtoClientState.Data storage clientState = clientStorages[clientId].clientState; + uint256 opNum = clientState.operators.length; + uint256 sigNum = message.signatures.length; + if (opNum == 0) { + revert LCPClientUpdateOperatorsPermissionless(); + } + if (sigNum != opNum) { + revert LCPClientInvalidSignaturesLength(); + } + if (message.new_operators_threshold_numerator == 0 || message.new_operators_threshold_denominator == 0) { + revert LCPClientClientStateInvalidOperatorsThreshold(); + } + uint64 nonce = clientState.operators_nonce; + uint64 nextNonce = nonce + 1; + if (message.nonce != nextNonce) { + revert LCPClientClientStateUnexpectedOperatorsNonce(nextNonce); + } + address[] memory newOperators = new address[](message.new_operators.length); + for (uint256 i = 0; i < message.new_operators.length; i++) { + if (message.new_operators[i].length != 20) { + revert LCPClientClientStateInvalidOperatorAddressLength(); + } + newOperators[i] = address(bytes20(message.new_operators[i])); + } + bytes32 commitment = keccak256( + LCPOperator.computeEIP712UpdateOperators( + clientId, + nextNonce, + newOperators, + message.new_operators_threshold_numerator, + message.new_operators_threshold_denominator + ) + ); + uint256 success = 0; + for (uint256 i = 0; i < sigNum; i++) { + if (message.signatures[i].length > 0) { + address operator = verifyECDSASignature(commitment, message.signatures[i]); + if (operator != address(bytes20(clientState.operators[i]))) { + revert LCPClientUpdateOperatorsSignatureUnexpectedOperator( + operator, address(bytes20(clientState.operators[i])) + ); + } + unchecked { + success++; + } + } + } + ensureSufficientValidSignatures(clientState, success); + delete clientState.operators; + // ensure the new operators are sorted(ascending order) and unique + for (uint256 i = 0; i < newOperators.length; i++) { + if (i > 0) { + unchecked { + address prev = newOperators[i - 1]; + if (prev >= newOperators[i]) { + revert LCPClientOperatorsInvalidOrder(prev, newOperators[i]); + } + } + } + clientState.operators.push(message.new_operators[i]); + } + clientState.operators_nonce = nextNonce; + clientState.operators_threshold_numerator = message.new_operators_threshold_numerator; + clientState.operators_threshold_denominator = message.new_operators_threshold_denominator; + return heights; + } + + function ensureActiveKey(ClientStorage storage clientStorage, address ekAddr, address opAddr) internal view { + EKInfo storage ekInfo = clientStorage.ekInfos[ekAddr]; + uint256 expiredAt = ekInfo.expiredAt; if (expiredAt == 0) { - return false; + revert LCPClientEnclaveKeyNotExist(); + } + if (expiredAt <= block.timestamp) { + revert LCPClientEnclaveKeyExpired(); + } + if (ekInfo.operator != opAddr) { + revert LCPClientEnclaveKeyUnexpectedOperator(ekInfo.operator, opAddr); + } + } + + function ensureActiveKey(ClientStorage storage clientStorage, address ekAddr) internal view { + EKInfo storage ekInfo = clientStorage.ekInfos[ekAddr]; + uint256 expiredAt = ekInfo.expiredAt; + if (expiredAt == 0) { + revert LCPClientEnclaveKeyNotExist(); + } + if (expiredAt <= block.timestamp) { + revert LCPClientEnclaveKeyExpired(); } - return expiredAt > block.timestamp; } - function verifyCommitmentProof(bytes32 commitment, bytes memory signature, address signer) + function ensureSufficientValidSignatures(ProtoClientState.Data storage clientState, uint256 success) + internal + view + { + if ( + success * clientState.operators_threshold_denominator + < clientState.operators_threshold_numerator * clientState.operators.length + ) { + revert LCPClientOperatorSignaturesInsufficient(success); + } + } + + function verifyECDSASignature(bytes32 commitment, bytes memory signature, address signer) internal pure returns (bool) { + return verifyECDSASignature(commitment, signature) == signer; + } + + function verifyECDSASignature(bytes32 commitment, bytes memory signature) internal pure returns (address) { if (uint8(signature[64]) < 27) { signature[64] = bytes1(uint8(signature[64]) + 27); } - return ECDSA.recover(commitment, signature) == signer; + return ECDSA.recover(commitment, signature); } } diff --git a/contracts/LCPCommitment.sol b/contracts/LCPCommitment.sol index 8318e49..ad18f95 100644 --- a/contracts/LCPCommitment.sol +++ b/contracts/LCPCommitment.sol @@ -4,20 +4,26 @@ pragma solidity ^0.8.12; import {Height} from "@hyperledger-labs/yui-ibc-solidity/contracts/proto/Client.sol"; library LCPCommitment { - uint16 constant LCP_MESSAGE_VERSION = 1; - uint16 constant LCP_MESSAGE_TYPE_UPDATE_STATE = 1; - uint16 constant LCP_MESSAGE_TYPE_STATE = 2; - uint16 constant LCP_MESSAGE_TYPE_MISBEHAVIOUR = 3; - uint16 constant LCP_MESSAGE_CONTEXT_TYPE_EMPTY = 0; - uint16 constant LCP_MESSAGE_CONTEXT_TYPE_TRUSTING_PERIOD = 1; - - bytes32 constant LCP_MESSAGE_HEADER_UPDATE_STATE = + uint16 internal constant LCP_MESSAGE_VERSION = 1; + uint16 internal constant LCP_MESSAGE_TYPE_UPDATE_STATE = 1; + uint16 internal constant LCP_MESSAGE_TYPE_STATE = 2; + uint16 internal constant LCP_MESSAGE_TYPE_MISBEHAVIOUR = 3; + uint16 internal constant LCP_MESSAGE_CONTEXT_TYPE_EMPTY = 0; + uint16 internal constant LCP_MESSAGE_CONTEXT_TYPE_TRUSTING_PERIOD = 1; + + bytes32 internal constant LCP_MESSAGE_HEADER_UPDATE_STATE = bytes32(uint256(LCP_MESSAGE_VERSION) << 240 | uint256(LCP_MESSAGE_TYPE_UPDATE_STATE) << 224); - bytes32 constant LCP_MESSAGE_HEADER_STATE = + bytes32 internal constant LCP_MESSAGE_HEADER_STATE = bytes32(uint256(LCP_MESSAGE_VERSION) << 240 | uint256(LCP_MESSAGE_TYPE_STATE) << 224); - bytes32 constant LCP_MESSAGE_HEADER_MISBEHAVIOUR = + bytes32 internal constant LCP_MESSAGE_HEADER_MISBEHAVIOUR = bytes32(uint256(LCP_MESSAGE_VERSION) << 240 | uint256(LCP_MESSAGE_TYPE_MISBEHAVIOUR) << 224); + error LCPCommitmentUnexpectedProxyMessageHeader(); + error LCPCommtimentInvalidTrustingPeriodContextLength(); + error LCPCommitmentUnknownValidationContextType(); + error LCPCommtimentTrustingPeriodContextOutOfTrustingPeriod(); + error LCPCommitmentTrustingPeriodHeaderFromFuture(); + struct HeaderedProxyMessage { bytes32 header; bytes message; @@ -48,7 +54,9 @@ library LCPCommitment { // 0-1: version // 2-3: message type // 4-31: reserved - require(hm.header == LCP_MESSAGE_HEADER_UPDATE_STATE, "unexpected header"); + if (hm.header != LCP_MESSAGE_HEADER_UPDATE_STATE) { + revert LCPCommitmentUnexpectedProxyMessageHeader(); + } return abi.decode(hm.message, (UpdateStateProxyMessage)); } @@ -73,7 +81,9 @@ library LCPCommitment { // 0-1: version // 2-3: message type // 4-31: reserved - require(hm.header == LCP_MESSAGE_HEADER_MISBEHAVIOUR, "unexpected header"); + if (hm.header != LCP_MESSAGE_HEADER_MISBEHAVIOUR) { + revert LCPCommitmentUnexpectedProxyMessageHeader(); + } return abi.decode(hm.message, (MisbehaviourProxyMessage)); } @@ -109,10 +119,12 @@ library LCPCommitment { if (contextType == LCP_MESSAGE_CONTEXT_TYPE_EMPTY) { return; } else if (contextType == LCP_MESSAGE_CONTEXT_TYPE_TRUSTING_PERIOD) { - require(vc.context.length == 64, "invalid trusting period context length"); + if (vc.context.length != 64) { + revert LCPCommtimentInvalidTrustingPeriodContextLength(); + } return trustingPeriodContextEval(parseTrustingPeriodContext(vc.context), currentTimestampNanos); } else { - revert("unknown context type"); + revert LCPCommitmentUnknownValidationContextType(); } } @@ -138,17 +150,16 @@ library LCPCommitment { pure { if (currentTimestampNanos >= context.trustedStateTimestamp + context.trustingPeriod) { - require(false, "out of trusting period"); + revert LCPCommtimentTrustingPeriodContextOutOfTrustingPeriod(); } else if (currentTimestampNanos + context.clockDrift <= context.untrustedHeaderTimestamp) { - require(false, "header is from the future"); + revert LCPCommitmentTrustingPeriodHeaderFromFuture(); } return; } - struct CommitmentProof { + struct CommitmentProofs { bytes message; - address signer; - bytes signature; + bytes[] signatures; } struct VerifyMembershipProxyMessage { @@ -169,16 +180,18 @@ library LCPCommitment { // 0-1: version // 2-3: message type // 4-31: reserved - require(hm.header == LCP_MESSAGE_HEADER_STATE, "unexpected header"); + if (hm.header != LCP_MESSAGE_HEADER_STATE) { + revert LCPCommitmentUnexpectedProxyMessageHeader(); + } return abi.decode(hm.message, (VerifyMembershipProxyMessage)); } - function parseVerifyMembershipCommitmentProof(bytes calldata commitmentProofBytes) + function parseVerifyMembershipCommitmentProofs(bytes calldata commitmentProofsBytes) internal pure - returns (CommitmentProof memory, VerifyMembershipProxyMessage memory) + returns (CommitmentProofs memory, VerifyMembershipProxyMessage memory) { - CommitmentProof memory commitmentProof = abi.decode(commitmentProofBytes, (CommitmentProof)); - return (commitmentProof, parseVerifyMembershipProxyMessage(commitmentProof.message)); + CommitmentProofs memory commitmentProofs = abi.decode(commitmentProofsBytes, (CommitmentProofs)); + return (commitmentProofs, parseVerifyMembershipProxyMessage(commitmentProofs.message)); } } diff --git a/contracts/LCPOperator.sol b/contracts/LCPOperator.sol new file mode 100644 index 0000000..6cb574a --- /dev/null +++ b/contracts/LCPOperator.sol @@ -0,0 +1,85 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +library LCPOperator { + type ChainType is uint16; + + bytes32 internal constant TYPEHASH_DOMAIN_SEPARATOR = + keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract,bytes32 salt)"); + bytes32 internal constant TYPEHASH_REGISTER_ENCLAVE_KEY = keccak256("RegisterEnclaveKey(string avr)"); + bytes32 internal constant TYPEHASH_UPDATE_OPERATORS = keccak256( + "UpdateOperators(string clientId,uint64 nonce,address[] newOperators,uint64 thresholdNumerator,uint64 thresholdDenominator)" + ); + + bytes32 internal constant DOMAIN_SEPARATOR_NAME = keccak256("LCPClient"); + bytes32 internal constant DOMAIN_SEPARATOR_VERSION = keccak256("1"); + + // domainSeparator(0, address(0)) + bytes32 internal constant DOMAIN_SEPARATOR_REGISTER_ENCLAVE_KEY = + 0xe33d217bff42bc015bf037be8386bf5055ec6019e58e8c5e89b5c74b8225fa6a; + ChainType internal constant CHAIN_TYPE_EVM = ChainType.wrap(1); + // chainTypeSalt(CHAIN_TYPE_EVM, hex"") + bytes32 internal constant CHAIN_TYPE_EVM_SALT = keccak256(abi.encodePacked(CHAIN_TYPE_EVM, hex"")); + + function chainTypeSalt(ChainType chainType, bytes memory args) internal pure returns (bytes32) { + return keccak256(abi.encodePacked(chainType, args)); + } + + function domainSeparator(uint256 chainId, address verifyingContract) internal pure returns (bytes32) { + return keccak256( + abi.encode( + TYPEHASH_DOMAIN_SEPARATOR, + DOMAIN_SEPARATOR_NAME, + DOMAIN_SEPARATOR_VERSION, + chainId, + verifyingContract, + CHAIN_TYPE_EVM_SALT + ) + ); + } + + function computeEIP712RegisterEnclaveKey(bytes calldata avr) internal pure returns (bytes memory) { + return abi.encodePacked( + hex"1901", + DOMAIN_SEPARATOR_REGISTER_ENCLAVE_KEY, + keccak256(abi.encode(TYPEHASH_REGISTER_ENCLAVE_KEY, keccak256(avr))) + ); + } + + function computeEIP712UpdateOperators( + string calldata clientId, + uint64 nonce, + address[] memory newOperators, + uint64 thresholdNumerator, + uint64 thresholdDenominator + ) internal view returns (bytes memory) { + return computeEIP712UpdateOperators( + block.chainid, address(this), clientId, nonce, newOperators, thresholdNumerator, thresholdDenominator + ); + } + + function computeEIP712UpdateOperators( + uint256 chainId, + address verifyingContract, + string calldata clientId, + uint64 nonce, + address[] memory newOperators, + uint64 thresholdNumerator, + uint64 thresholdDenominator + ) internal pure returns (bytes memory) { + return abi.encodePacked( + hex"1901", + domainSeparator(chainId, verifyingContract), + keccak256( + abi.encode( + TYPEHASH_UPDATE_OPERATORS, + keccak256(bytes(clientId)), + nonce, + keccak256(abi.encodePacked(newOperators)), + thresholdNumerator, + thresholdDenominator + ) + ) + ); + } +} diff --git a/contracts/LCPProtoMarshaler.sol b/contracts/LCPProtoMarshaler.sol index dc41b52..4f45066 100644 --- a/contracts/LCPProtoMarshaler.sol +++ b/contracts/LCPProtoMarshaler.sol @@ -5,44 +5,56 @@ import { IbcLightclientsLcpV1ClientState as ClientState, IbcLightclientsLcpV1ConsensusState as ConsensusState, IbcLightclientsLcpV1RegisterEnclaveKeyMessage as RegisterEnclaveKeyMessage, - IbcLightclientsLcpV1UpdateClientMessage as UpdateClientMessage + IbcLightclientsLcpV1UpdateClientMessage as UpdateClientMessage, + IbcLightclientsLcpV1UpdateOperatorsMessage as UpdateOperatorsMessage } from "./proto/ibc/lightclients/lcp/v1/LCP.sol"; import {GoogleProtobufAny as Any} from "@hyperledger-labs/yui-ibc-solidity/contracts/proto/GoogleProtobufAny.sol"; library LCPProtoMarshaler { string constant UPDATE_CLIENT_MESSAGE_TYPE_URL = "/ibc.lightclients.lcp.v1.UpdateClientMessage"; string constant REGISTER_ENCLAVE_KEY_MESSAGE_TYPE_URL = "/ibc.lightclients.lcp.v1.RegisterEnclaveKeyMessage"; + string constant UPDATE_OPERATORS_MESSAGE_TYPE_URL = "/ibc.lightclients.lcp.v1.UpdateOperatorsMessage"; string constant CLIENT_STATE_TYPE_URL = "/ibc.lightclients.lcp.v1.ClientState"; string constant CONSENSUS_STATE_TYPE_URL = "/ibc.lightclients.lcp.v1.ConsensusState"; bytes32 constant UPDATE_CLIENT_MESSAGE_TYPE_URL_HASH = keccak256(abi.encodePacked(UPDATE_CLIENT_MESSAGE_TYPE_URL)); bytes32 constant REGISTER_ENCLAVE_KEY_MESSAGE_TYPE_URL_HASH = keccak256(abi.encodePacked(REGISTER_ENCLAVE_KEY_MESSAGE_TYPE_URL)); + bytes32 constant UPDATE_OPERATORS_MESSAGE_TYPE_URL_HASH = + keccak256(abi.encodePacked(UPDATE_OPERATORS_MESSAGE_TYPE_URL)); bytes32 constant CLIENT_STATE_TYPE_URL_HASH = keccak256(abi.encodePacked(CLIENT_STATE_TYPE_URL)); bytes32 constant CONSENSUS_STATE_TYPE_URL_HASH = keccak256(abi.encodePacked(CONSENSUS_STATE_TYPE_URL)); - function marshal(UpdateClientMessage.Data calldata message) external pure returns (bytes memory) { + function marshal(UpdateClientMessage.Data calldata message) public pure returns (bytes memory) { Any.Data memory any; any.type_url = UPDATE_CLIENT_MESSAGE_TYPE_URL; any.value = UpdateClientMessage.encode(message); return Any.encode(any); } - function marshal(RegisterEnclaveKeyMessage.Data calldata message) external pure returns (bytes memory) { + function marshalConsensusState(bytes32 stateId, uint64 timestamp) public pure returns (bytes memory) { + Any.Data memory anyConsensusState; + anyConsensusState.type_url = CONSENSUS_STATE_TYPE_URL; + anyConsensusState.value = + ConsensusState.encode(ConsensusState.Data({state_id: abi.encodePacked(stateId), timestamp: timestamp})); + return Any.encode(anyConsensusState); + } + + function marshal(RegisterEnclaveKeyMessage.Data calldata message) public pure returns (bytes memory) { Any.Data memory any; any.type_url = REGISTER_ENCLAVE_KEY_MESSAGE_TYPE_URL; any.value = RegisterEnclaveKeyMessage.encode(message); return Any.encode(any); } - function marshal(ClientState.Data calldata clientState) external pure returns (bytes memory) { + function marshal(ClientState.Data calldata clientState) public pure returns (bytes memory) { Any.Data memory anyClientState; anyClientState.type_url = CLIENT_STATE_TYPE_URL; anyClientState.value = ClientState.encode(clientState); return Any.encode(anyClientState); } - function marshal(ConsensusState.Data calldata consensusState) external pure returns (bytes memory) { + function marshal(ConsensusState.Data calldata consensusState) public pure returns (bytes memory) { Any.Data memory anyConsensusState; anyConsensusState.type_url = CONSENSUS_STATE_TYPE_URL; anyConsensusState.value = ConsensusState.encode(consensusState); @@ -50,7 +62,7 @@ library LCPProtoMarshaler { } function routeClientMessage(string calldata clientId, bytes calldata protoClientMessage) - external + public pure returns (bytes32 typeUrlHash, bytes memory args) { @@ -62,12 +74,15 @@ library LCPProtoMarshaler { } else if (typeUrlHash == REGISTER_ENCLAVE_KEY_MESSAGE_TYPE_URL_HASH) { RegisterEnclaveKeyMessage.Data memory message = RegisterEnclaveKeyMessage.decode(anyClientMessage.value); return (typeUrlHash, abi.encode(clientId, message)); + } else if (typeUrlHash == UPDATE_OPERATORS_MESSAGE_TYPE_URL_HASH) { + UpdateOperatorsMessage.Data memory message = UpdateOperatorsMessage.decode(anyClientMessage.value); + return (typeUrlHash, abi.encode(clientId, message)); } else { revert("unsupported client message type"); } } - function unmarshalClientState(bytes calldata bz) external pure returns (ClientState.Data memory clientState) { + function unmarshalClientState(bytes calldata bz) public pure returns (ClientState.Data memory clientState) { Any.Data memory anyClientState = Any.decode(bz); require( keccak256(abi.encodePacked(anyClientState.type_url)) == CLIENT_STATE_TYPE_URL_HASH, @@ -77,7 +92,7 @@ library LCPProtoMarshaler { } function unmarshalConsensusState(bytes calldata bz) - external + public pure returns (ConsensusState.Data memory consensusState) { diff --git a/contracts/LCPUtils.sol b/contracts/LCPUtils.sol index 82882c5..6b85719 100644 --- a/contracts/LCPUtils.sol +++ b/contracts/LCPUtils.sol @@ -5,6 +5,10 @@ import {BytesUtils} from "@ensdomains/ens-contracts/contracts/dnssec-oracle/Byte import {DateTime} from "solidity-datetime/contracts/DateTime.sol"; library LCPUtils { + error LCPUtilsReadBytesUntilNotFound(); + error LCPUtilsRFC5280TimeToSecondsInvalidFormat(bytes timestamp); + error LCPUtilsTimestampFromDateTimeInvalidDateTime(); + /** * @dev readBytesUntil reads bytes until the needle is found. */ @@ -14,7 +18,9 @@ library LCPUtils { returns (bytes memory bz, uint256 pos) { pos = BytesUtils.find(src, offset, src.length, needle); - require(pos != type(uint256).max, "not found"); + if (pos == type(uint256).max) { + revert LCPUtilsReadBytesUntilNotFound(); + } return (BytesUtils.substring(src, offset, pos - offset), pos); } @@ -64,7 +70,7 @@ library LCPUtils { year += uint256(uint8(timestamp[0]) - 48) * 1000 + uint256(uint8(timestamp[1]) - 48) * 100; offset = 2; } else { - revert("unknown time format"); + revert LCPUtilsRFC5280TimeToSecondsInvalidFormat(timestamp); } year += uint256(uint8(timestamp[offset]) - 48) * 10 + uint8(timestamp[offset + 1]) - 48; // ensure the last char is 'Z' @@ -87,7 +93,9 @@ library LCPUtils { uint256 minute, uint256 second ) private pure returns (uint256) { - require(DateTime.isValidDateTime(year, month, day, hour, minute, second), "invalid date time"); + if (!DateTime.isValidDateTime(year, month, day, hour, minute, second)) { + revert LCPUtilsTimestampFromDateTimeInvalidDateTime(); + } return DateTime.timestampFromDateTime(year, month, day, hour, minute, second); } } diff --git a/contracts/proto/ibc/lightclients/lcp/v1/LCP.sol b/contracts/proto/ibc/lightclients/lcp/v1/LCP.sol index 3b1cc02..daa492c 100644 --- a/contracts/proto/ibc/lightclients/lcp/v1/LCP.sol +++ b/contracts/proto/ibc/lightclients/lcp/v1/LCP.sol @@ -10,8 +10,7 @@ library IbcLightclientsLcpV1UpdateClientMessage { //struct definition struct Data { bytes proxy_message; - bytes signer; - bytes signature; + bytes[] signatures; } // Decoder section @@ -51,6 +50,7 @@ library IbcLightclientsLcpV1UpdateClientMessage { returns (Data memory, uint) { Data memory r; + uint[3] memory counters; uint256 fieldId; ProtoBufRuntime.WireType wireType; uint256 bytesRead; @@ -63,16 +63,29 @@ library IbcLightclientsLcpV1UpdateClientMessage { pointer += _read_proxy_message(pointer, bs, r); } else if (fieldId == 2) { - pointer += _read_signer(pointer, bs, r); - } else - if (fieldId == 3) { - pointer += _read_signature(pointer, bs, r); + pointer += _read_unpacked_repeated_signatures(pointer, bs, nil(), counters); } else { pointer += ProtoBufRuntime._skip_field_decode(wireType, pointer, bs); } } + pointer = offset; + if (counters[2] > 0) { + require(r.signatures.length == 0); + r.signatures = new bytes[](counters[2]); + } + + while (pointer < offset + sz) { + (fieldId, wireType, bytesRead) = ProtoBufRuntime._decode_key(pointer, bs); + pointer += bytesRead; + if (fieldId == 2) { + pointer += _read_unpacked_repeated_signatures(pointer, bs, r, counters); + } else + { + pointer += ProtoBufRuntime._skip_field_decode(wireType, pointer, bs); + } + } return (r, sz); } @@ -100,32 +113,25 @@ library IbcLightclientsLcpV1UpdateClientMessage { * @param p The offset of bytes array to start decode * @param bs The bytes array to be decoded * @param r The in-memory struct + * @param counters The counters for repeated fields * @return The number of bytes decoded */ - function _read_signer( - uint256 p, - bytes memory bs, - Data memory r - ) internal pure returns (uint) { - (bytes memory x, uint256 sz) = ProtoBufRuntime._decode_bytes(p, bs); - r.signer = x; - return sz; - } - - /** - * @dev The decoder for reading a field - * @param p The offset of bytes array to start decode - * @param bs The bytes array to be decoded - * @param r The in-memory struct - * @return The number of bytes decoded - */ - function _read_signature( + function _read_unpacked_repeated_signatures( uint256 p, bytes memory bs, - Data memory r + Data memory r, + uint[3] memory counters ) internal pure returns (uint) { + /** + * if `r` is NULL, then only counting the number of fields. + */ (bytes memory x, uint256 sz) = ProtoBufRuntime._decode_bytes(p, bs); - r.signature = x; + if (isNil(r)) { + counters[2] += 1; + } else { + r.signatures[r.signatures.length - counters[2]] = x; + counters[2] -= 1; + } return sz; } @@ -161,7 +167,7 @@ library IbcLightclientsLcpV1UpdateClientMessage { { uint256 offset = p; uint256 pointer = p; - + uint256 i; if (r.proxy_message.length != 0) { pointer += ProtoBufRuntime._encode_key( 1, @@ -171,23 +177,16 @@ library IbcLightclientsLcpV1UpdateClientMessage { ); pointer += ProtoBufRuntime._encode_bytes(r.proxy_message, pointer, bs); } - if (r.signer.length != 0) { - pointer += ProtoBufRuntime._encode_key( - 2, - ProtoBufRuntime.WireType.LengthDelim, - pointer, - bs - ); - pointer += ProtoBufRuntime._encode_bytes(r.signer, pointer, bs); + if (r.signatures.length != 0) { + for(i = 0; i < r.signatures.length; i++) { + pointer += ProtoBufRuntime._encode_key( + 2, + ProtoBufRuntime.WireType.LengthDelim, + pointer, + bs) + ; + pointer += ProtoBufRuntime._encode_bytes(r.signatures[i], pointer, bs); } - if (r.signature.length != 0) { - pointer += ProtoBufRuntime._encode_key( - 3, - ProtoBufRuntime.WireType.LengthDelim, - pointer, - bs - ); - pointer += ProtoBufRuntime._encode_bytes(r.signature, pointer, bs); } return pointer - offset; } @@ -231,10 +230,11 @@ library IbcLightclientsLcpV1UpdateClientMessage { function _estimate( Data memory r ) internal pure returns (uint) { - uint256 e; + uint256 e;uint256 i; e += 1 + ProtoBufRuntime._sz_lendelim(r.proxy_message.length); - e += 1 + ProtoBufRuntime._sz_lendelim(r.signer.length); - e += 1 + ProtoBufRuntime._sz_lendelim(r.signature.length); + for(i = 0; i < r.signatures.length; i++) { + e += 1 + ProtoBufRuntime._sz_lendelim(r.signatures[i].length); + } return e; } // empty checker @@ -247,11 +247,7 @@ library IbcLightclientsLcpV1UpdateClientMessage { return false; } - if (r.signer.length != 0) { - return false; - } - - if (r.signature.length != 0) { + if (r.signatures.length != 0) { return false; } @@ -267,12 +263,29 @@ library IbcLightclientsLcpV1UpdateClientMessage { */ function store(Data memory input, Data storage output) internal { output.proxy_message = input.proxy_message; - output.signer = input.signer; - output.signature = input.signature; + output.signatures = input.signatures; } + //array helpers for Signatures + /** + * @dev Add value to an array + * @param self The in-memory struct + * @param value The value to add + */ + function addSignatures(Data memory self, bytes memory value) internal pure { + /** + * First resize the array. Then add the new element to the end. + */ + bytes[] memory tmp = new bytes[](self.signatures.length + 1); + for (uint256 i = 0; i < self.signatures.length; i++) { + tmp[i] = self.signatures[i]; + } + tmp[self.signatures.length] = value; + self.signatures = tmp; + } + //utility functions /** @@ -303,9 +316,10 @@ library IbcLightclientsLcpV1RegisterEnclaveKeyMessage { //struct definition struct Data { - string report; + bytes report; bytes signature; bytes signing_cert; + bytes operator_signature; } // Decoder section @@ -362,6 +376,9 @@ library IbcLightclientsLcpV1RegisterEnclaveKeyMessage { if (fieldId == 3) { pointer += _read_signing_cert(pointer, bs, r); } else + if (fieldId == 4) { + pointer += _read_operator_signature(pointer, bs, r); + } else { pointer += ProtoBufRuntime._skip_field_decode(wireType, pointer, bs); } @@ -384,7 +401,7 @@ library IbcLightclientsLcpV1RegisterEnclaveKeyMessage { bytes memory bs, Data memory r ) internal pure returns (uint) { - (string memory x, uint256 sz) = ProtoBufRuntime._decode_string(p, bs); + (bytes memory x, uint256 sz) = ProtoBufRuntime._decode_bytes(p, bs); r.report = x; return sz; } @@ -423,6 +440,23 @@ library IbcLightclientsLcpV1RegisterEnclaveKeyMessage { return sz; } + /** + * @dev The decoder for reading a field + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @param r The in-memory struct + * @return The number of bytes decoded + */ + function _read_operator_signature( + uint256 p, + bytes memory bs, + Data memory r + ) internal pure returns (uint) { + (bytes memory x, uint256 sz) = ProtoBufRuntime._decode_bytes(p, bs); + r.operator_signature = x; + return sz; + } + // Encoder section @@ -456,14 +490,14 @@ library IbcLightclientsLcpV1RegisterEnclaveKeyMessage { uint256 offset = p; uint256 pointer = p; - if (bytes(r.report).length != 0) { + if (r.report.length != 0) { pointer += ProtoBufRuntime._encode_key( 1, ProtoBufRuntime.WireType.LengthDelim, pointer, bs ); - pointer += ProtoBufRuntime._encode_string(r.report, pointer, bs); + pointer += ProtoBufRuntime._encode_bytes(r.report, pointer, bs); } if (r.signature.length != 0) { pointer += ProtoBufRuntime._encode_key( @@ -483,6 +517,15 @@ library IbcLightclientsLcpV1RegisterEnclaveKeyMessage { ); pointer += ProtoBufRuntime._encode_bytes(r.signing_cert, pointer, bs); } + if (r.operator_signature.length != 0) { + pointer += ProtoBufRuntime._encode_key( + 4, + ProtoBufRuntime.WireType.LengthDelim, + pointer, + bs + ); + pointer += ProtoBufRuntime._encode_bytes(r.operator_signature, pointer, bs); + } return pointer - offset; } // nested encoder @@ -526,9 +569,10 @@ library IbcLightclientsLcpV1RegisterEnclaveKeyMessage { Data memory r ) internal pure returns (uint) { uint256 e; - e += 1 + ProtoBufRuntime._sz_lendelim(bytes(r.report).length); + e += 1 + ProtoBufRuntime._sz_lendelim(r.report.length); e += 1 + ProtoBufRuntime._sz_lendelim(r.signature.length); e += 1 + ProtoBufRuntime._sz_lendelim(r.signing_cert.length); + e += 1 + ProtoBufRuntime._sz_lendelim(r.operator_signature.length); return e; } // empty checker @@ -537,7 +581,7 @@ library IbcLightclientsLcpV1RegisterEnclaveKeyMessage { Data memory r ) internal pure returns (bool) { - if (bytes(r.report).length != 0) { + if (r.report.length != 0) { return false; } @@ -549,6 +593,10 @@ library IbcLightclientsLcpV1RegisterEnclaveKeyMessage { return false; } + if (r.operator_signature.length != 0) { + return false; + } + return true; } @@ -563,6 +611,7 @@ library IbcLightclientsLcpV1RegisterEnclaveKeyMessage { output.report = input.report; output.signature = input.signature; output.signing_cert = input.signing_cert; + output.operator_signature = input.operator_signature; } @@ -592,17 +641,16 @@ library IbcLightclientsLcpV1RegisterEnclaveKeyMessage { } //library IbcLightclientsLcpV1RegisterEnclaveKeyMessage -library IbcLightclientsLcpV1ClientState { +library IbcLightclientsLcpV1UpdateOperatorsMessage { //struct definition struct Data { - bytes mrenclave; - uint64 key_expiration; - bool frozen; - Height.Data latest_height; - string[] allowed_quote_statuses; - string[] allowed_advisory_ids; + uint64 nonce; + bytes[] new_operators; + uint64 new_operators_threshold_numerator; + uint64 new_operators_threshold_denominator; + bytes[] signatures; } // Decoder section @@ -642,7 +690,7 @@ library IbcLightclientsLcpV1ClientState { returns (Data memory, uint) { Data memory r; - uint[7] memory counters; + uint[6] memory counters; uint256 fieldId; ProtoBufRuntime.WireType wireType; uint256 bytesRead; @@ -652,22 +700,19 @@ library IbcLightclientsLcpV1ClientState { (fieldId, wireType, bytesRead) = ProtoBufRuntime._decode_key(pointer, bs); pointer += bytesRead; if (fieldId == 1) { - pointer += _read_mrenclave(pointer, bs, r); + pointer += _read_nonce(pointer, bs, r); } else if (fieldId == 2) { - pointer += _read_key_expiration(pointer, bs, r); + pointer += _read_unpacked_repeated_new_operators(pointer, bs, nil(), counters); } else if (fieldId == 3) { - pointer += _read_frozen(pointer, bs, r); + pointer += _read_new_operators_threshold_numerator(pointer, bs, r); } else if (fieldId == 4) { - pointer += _read_latest_height(pointer, bs, r); + pointer += _read_new_operators_threshold_denominator(pointer, bs, r); } else if (fieldId == 5) { - pointer += _read_unpacked_repeated_allowed_quote_statuses(pointer, bs, nil(), counters); - } else - if (fieldId == 6) { - pointer += _read_unpacked_repeated_allowed_advisory_ids(pointer, bs, nil(), counters); + pointer += _read_unpacked_repeated_signatures(pointer, bs, nil(), counters); } else { pointer += ProtoBufRuntime._skip_field_decode(wireType, pointer, bs); @@ -675,23 +720,23 @@ library IbcLightclientsLcpV1ClientState { } pointer = offset; - if (counters[5] > 0) { - require(r.allowed_quote_statuses.length == 0); - r.allowed_quote_statuses = new string[](counters[5]); + if (counters[2] > 0) { + require(r.new_operators.length == 0); + r.new_operators = new bytes[](counters[2]); } - if (counters[6] > 0) { - require(r.allowed_advisory_ids.length == 0); - r.allowed_advisory_ids = new string[](counters[6]); + if (counters[5] > 0) { + require(r.signatures.length == 0); + r.signatures = new bytes[](counters[5]); } while (pointer < offset + sz) { (fieldId, wireType, bytesRead) = ProtoBufRuntime._decode_key(pointer, bs); pointer += bytesRead; - if (fieldId == 5) { - pointer += _read_unpacked_repeated_allowed_quote_statuses(pointer, bs, r, counters); + if (fieldId == 2) { + pointer += _read_unpacked_repeated_new_operators(pointer, bs, r, counters); } else - if (fieldId == 6) { - pointer += _read_unpacked_repeated_allowed_advisory_ids(pointer, bs, r, counters); + if (fieldId == 5) { + pointer += _read_unpacked_repeated_signatures(pointer, bs, r, counters); } else { pointer += ProtoBufRuntime._skip_field_decode(wireType, pointer, bs); @@ -709,13 +754,13 @@ library IbcLightclientsLcpV1ClientState { * @param r The in-memory struct * @return The number of bytes decoded */ - function _read_mrenclave( + function _read_nonce( uint256 p, bytes memory bs, Data memory r ) internal pure returns (uint) { - (bytes memory x, uint256 sz) = ProtoBufRuntime._decode_bytes(p, bs); - r.mrenclave = x; + (uint64 x, uint256 sz) = ProtoBufRuntime._decode_uint64(p, bs); + r.nonce = x; return sz; } @@ -724,15 +769,25 @@ library IbcLightclientsLcpV1ClientState { * @param p The offset of bytes array to start decode * @param bs The bytes array to be decoded * @param r The in-memory struct + * @param counters The counters for repeated fields * @return The number of bytes decoded */ - function _read_key_expiration( + function _read_unpacked_repeated_new_operators( uint256 p, bytes memory bs, - Data memory r + Data memory r, + uint[6] memory counters ) internal pure returns (uint) { - (uint64 x, uint256 sz) = ProtoBufRuntime._decode_uint64(p, bs); - r.key_expiration = x; + /** + * if `r` is NULL, then only counting the number of fields. + */ + (bytes memory x, uint256 sz) = ProtoBufRuntime._decode_bytes(p, bs); + if (isNil(r)) { + counters[2] += 1; + } else { + r.new_operators[r.new_operators.length - counters[2]] = x; + counters[2] -= 1; + } return sz; } @@ -743,13 +798,13 @@ library IbcLightclientsLcpV1ClientState { * @param r The in-memory struct * @return The number of bytes decoded */ - function _read_frozen( + function _read_new_operators_threshold_numerator( uint256 p, bytes memory bs, Data memory r ) internal pure returns (uint) { - (bool x, uint256 sz) = ProtoBufRuntime._decode_bool(p, bs); - r.frozen = x; + (uint64 x, uint256 sz) = ProtoBufRuntime._decode_uint64(p, bs); + r.new_operators_threshold_numerator = x; return sz; } @@ -760,13 +815,13 @@ library IbcLightclientsLcpV1ClientState { * @param r The in-memory struct * @return The number of bytes decoded */ - function _read_latest_height( + function _read_new_operators_threshold_denominator( uint256 p, bytes memory bs, Data memory r ) internal pure returns (uint) { - (Height.Data memory x, uint256 sz) = _decode_Height(p, bs); - r.latest_height = x; + (uint64 x, uint256 sz) = ProtoBufRuntime._decode_uint64(p, bs); + r.new_operators_threshold_denominator = x; return sz; } @@ -778,72 +833,25 @@ library IbcLightclientsLcpV1ClientState { * @param counters The counters for repeated fields * @return The number of bytes decoded */ - function _read_unpacked_repeated_allowed_quote_statuses( + function _read_unpacked_repeated_signatures( uint256 p, bytes memory bs, Data memory r, - uint[7] memory counters + uint[6] memory counters ) internal pure returns (uint) { /** * if `r` is NULL, then only counting the number of fields. */ - (string memory x, uint256 sz) = ProtoBufRuntime._decode_string(p, bs); + (bytes memory x, uint256 sz) = ProtoBufRuntime._decode_bytes(p, bs); if (isNil(r)) { counters[5] += 1; } else { - r.allowed_quote_statuses[r.allowed_quote_statuses.length - counters[5]] = x; + r.signatures[r.signatures.length - counters[5]] = x; counters[5] -= 1; } return sz; } - /** - * @dev The decoder for reading a field - * @param p The offset of bytes array to start decode - * @param bs The bytes array to be decoded - * @param r The in-memory struct - * @param counters The counters for repeated fields - * @return The number of bytes decoded - */ - function _read_unpacked_repeated_allowed_advisory_ids( - uint256 p, - bytes memory bs, - Data memory r, - uint[7] memory counters - ) internal pure returns (uint) { - /** - * if `r` is NULL, then only counting the number of fields. - */ - (string memory x, uint256 sz) = ProtoBufRuntime._decode_string(p, bs); - if (isNil(r)) { - counters[6] += 1; - } else { - r.allowed_advisory_ids[r.allowed_advisory_ids.length - counters[6]] = x; - counters[6] -= 1; - } - return sz; - } - - // struct decoder - /** - * @dev The decoder for reading a inner struct field - * @param p The offset of bytes array to start decode - * @param bs The bytes array to be decoded - * @return The decoded inner-struct - * @return The number of bytes used to decode - */ - function _decode_Height(uint256 p, bytes memory bs) - internal - pure - returns (Height.Data memory, uint) - { - uint256 pointer = p; - (uint256 sz, uint256 bytesRead) = ProtoBufRuntime._decode_varint(pointer, bs); - pointer += bytesRead; - (Height.Data memory r, ) = Height._decode(pointer, bs, sz); - return (r, sz + bytesRead); - } - // Encoder section @@ -877,62 +885,53 @@ library IbcLightclientsLcpV1ClientState { uint256 offset = p; uint256 pointer = p; uint256 i; - if (r.mrenclave.length != 0) { + if (r.nonce != 0) { pointer += ProtoBufRuntime._encode_key( 1, - ProtoBufRuntime.WireType.LengthDelim, - pointer, - bs - ); - pointer += ProtoBufRuntime._encode_bytes(r.mrenclave, pointer, bs); - } - if (r.key_expiration != 0) { - pointer += ProtoBufRuntime._encode_key( - 2, ProtoBufRuntime.WireType.Varint, pointer, bs ); - pointer += ProtoBufRuntime._encode_uint64(r.key_expiration, pointer, bs); + pointer += ProtoBufRuntime._encode_uint64(r.nonce, pointer, bs); } - if (r.frozen != false) { + if (r.new_operators.length != 0) { + for(i = 0; i < r.new_operators.length; i++) { + pointer += ProtoBufRuntime._encode_key( + 2, + ProtoBufRuntime.WireType.LengthDelim, + pointer, + bs) + ; + pointer += ProtoBufRuntime._encode_bytes(r.new_operators[i], pointer, bs); + } + } + if (r.new_operators_threshold_numerator != 0) { pointer += ProtoBufRuntime._encode_key( 3, ProtoBufRuntime.WireType.Varint, pointer, bs ); - pointer += ProtoBufRuntime._encode_bool(r.frozen, pointer, bs); + pointer += ProtoBufRuntime._encode_uint64(r.new_operators_threshold_numerator, pointer, bs); } - + if (r.new_operators_threshold_denominator != 0) { pointer += ProtoBufRuntime._encode_key( 4, - ProtoBufRuntime.WireType.LengthDelim, + ProtoBufRuntime.WireType.Varint, pointer, bs ); - pointer += Height._encode_nested(r.latest_height, pointer, bs); - - if (r.allowed_quote_statuses.length != 0) { - for(i = 0; i < r.allowed_quote_statuses.length; i++) { - pointer += ProtoBufRuntime._encode_key( - 5, - ProtoBufRuntime.WireType.LengthDelim, - pointer, - bs) - ; - pointer += ProtoBufRuntime._encode_string(r.allowed_quote_statuses[i], pointer, bs); - } + pointer += ProtoBufRuntime._encode_uint64(r.new_operators_threshold_denominator, pointer, bs); } - if (r.allowed_advisory_ids.length != 0) { - for(i = 0; i < r.allowed_advisory_ids.length; i++) { + if (r.signatures.length != 0) { + for(i = 0; i < r.signatures.length; i++) { pointer += ProtoBufRuntime._encode_key( - 6, + 5, ProtoBufRuntime.WireType.LengthDelim, pointer, bs) ; - pointer += ProtoBufRuntime._encode_string(r.allowed_advisory_ids[i], pointer, bs); + pointer += ProtoBufRuntime._encode_bytes(r.signatures[i], pointer, bs); } } return pointer - offset; @@ -978,7 +977,650 @@ library IbcLightclientsLcpV1ClientState { Data memory r ) internal pure returns (uint) { uint256 e;uint256 i; - e += 1 + ProtoBufRuntime._sz_lendelim(r.mrenclave.length); + e += 1 + ProtoBufRuntime._sz_uint64(r.nonce); + for(i = 0; i < r.new_operators.length; i++) { + e += 1 + ProtoBufRuntime._sz_lendelim(r.new_operators[i].length); + } + e += 1 + ProtoBufRuntime._sz_uint64(r.new_operators_threshold_numerator); + e += 1 + ProtoBufRuntime._sz_uint64(r.new_operators_threshold_denominator); + for(i = 0; i < r.signatures.length; i++) { + e += 1 + ProtoBufRuntime._sz_lendelim(r.signatures[i].length); + } + return e; + } + // empty checker + + function _empty( + Data memory r + ) internal pure returns (bool) { + + if (r.nonce != 0) { + return false; + } + + if (r.new_operators.length != 0) { + return false; + } + + if (r.new_operators_threshold_numerator != 0) { + return false; + } + + if (r.new_operators_threshold_denominator != 0) { + return false; + } + + if (r.signatures.length != 0) { + return false; + } + + return true; + } + + + //store function + /** + * @dev Store in-memory struct to storage + * @param input The in-memory struct + * @param output The in-storage struct + */ + function store(Data memory input, Data storage output) internal { + output.nonce = input.nonce; + output.new_operators = input.new_operators; + output.new_operators_threshold_numerator = input.new_operators_threshold_numerator; + output.new_operators_threshold_denominator = input.new_operators_threshold_denominator; + output.signatures = input.signatures; + + } + + + //array helpers for NewOperators + /** + * @dev Add value to an array + * @param self The in-memory struct + * @param value The value to add + */ + function addNewOperators(Data memory self, bytes memory value) internal pure { + /** + * First resize the array. Then add the new element to the end. + */ + bytes[] memory tmp = new bytes[](self.new_operators.length + 1); + for (uint256 i = 0; i < self.new_operators.length; i++) { + tmp[i] = self.new_operators[i]; + } + tmp[self.new_operators.length] = value; + self.new_operators = tmp; + } + + //array helpers for Signatures + /** + * @dev Add value to an array + * @param self The in-memory struct + * @param value The value to add + */ + function addSignatures(Data memory self, bytes memory value) internal pure { + /** + * First resize the array. Then add the new element to the end. + */ + bytes[] memory tmp = new bytes[](self.signatures.length + 1); + for (uint256 i = 0; i < self.signatures.length; i++) { + tmp[i] = self.signatures[i]; + } + tmp[self.signatures.length] = value; + self.signatures = tmp; + } + + + //utility functions + /** + * @dev Return an empty struct + * @return r The empty struct + */ + function nil() internal pure returns (Data memory r) { + assembly { + r := 0 + } + } + + /** + * @dev Test whether a struct is empty + * @param x The struct to be tested + * @return r True if it is empty + */ + function isNil(Data memory x) internal pure returns (bool r) { + assembly { + r := iszero(x) + } + } +} +//library IbcLightclientsLcpV1UpdateOperatorsMessage + +library IbcLightclientsLcpV1ClientState { + + + //struct definition + struct Data { + bytes mrenclave; + uint64 key_expiration; + bool frozen; + Height.Data latest_height; + string[] allowed_quote_statuses; + string[] allowed_advisory_ids; + bytes[] operators; + uint64 operators_nonce; + uint64 operators_threshold_numerator; + uint64 operators_threshold_denominator; + } + + // Decoder section + + /** + * @dev The main decoder for memory + * @param bs The bytes array to be decoded + * @return The decoded struct + */ + function decode(bytes memory bs) internal pure returns (Data memory) { + (Data memory x, ) = _decode(32, bs, bs.length); + return x; + } + + /** + * @dev The main decoder for storage + * @param self The in-storage struct + * @param bs The bytes array to be decoded + */ + function decode(Data storage self, bytes memory bs) internal { + (Data memory x, ) = _decode(32, bs, bs.length); + store(x, self); + } + // inner decoder + + /** + * @dev The decoder for internal usage + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @param sz The number of bytes expected + * @return The decoded struct + * @return The number of bytes decoded + */ + function _decode(uint256 p, bytes memory bs, uint256 sz) + internal + pure + returns (Data memory, uint) + { + Data memory r; + uint[11] memory counters; + uint256 fieldId; + ProtoBufRuntime.WireType wireType; + uint256 bytesRead; + uint256 offset = p; + uint256 pointer = p; + while (pointer < offset + sz) { + (fieldId, wireType, bytesRead) = ProtoBufRuntime._decode_key(pointer, bs); + pointer += bytesRead; + if (fieldId == 1) { + pointer += _read_mrenclave(pointer, bs, r); + } else + if (fieldId == 2) { + pointer += _read_key_expiration(pointer, bs, r); + } else + if (fieldId == 3) { + pointer += _read_frozen(pointer, bs, r); + } else + if (fieldId == 4) { + pointer += _read_latest_height(pointer, bs, r); + } else + if (fieldId == 5) { + pointer += _read_unpacked_repeated_allowed_quote_statuses(pointer, bs, nil(), counters); + } else + if (fieldId == 6) { + pointer += _read_unpacked_repeated_allowed_advisory_ids(pointer, bs, nil(), counters); + } else + if (fieldId == 7) { + pointer += _read_unpacked_repeated_operators(pointer, bs, nil(), counters); + } else + if (fieldId == 8) { + pointer += _read_operators_nonce(pointer, bs, r); + } else + if (fieldId == 9) { + pointer += _read_operators_threshold_numerator(pointer, bs, r); + } else + if (fieldId == 10) { + pointer += _read_operators_threshold_denominator(pointer, bs, r); + } else + { + pointer += ProtoBufRuntime._skip_field_decode(wireType, pointer, bs); + } + + } + pointer = offset; + if (counters[5] > 0) { + require(r.allowed_quote_statuses.length == 0); + r.allowed_quote_statuses = new string[](counters[5]); + } + if (counters[6] > 0) { + require(r.allowed_advisory_ids.length == 0); + r.allowed_advisory_ids = new string[](counters[6]); + } + if (counters[7] > 0) { + require(r.operators.length == 0); + r.operators = new bytes[](counters[7]); + } + + while (pointer < offset + sz) { + (fieldId, wireType, bytesRead) = ProtoBufRuntime._decode_key(pointer, bs); + pointer += bytesRead; + if (fieldId == 5) { + pointer += _read_unpacked_repeated_allowed_quote_statuses(pointer, bs, r, counters); + } else + if (fieldId == 6) { + pointer += _read_unpacked_repeated_allowed_advisory_ids(pointer, bs, r, counters); + } else + if (fieldId == 7) { + pointer += _read_unpacked_repeated_operators(pointer, bs, r, counters); + } else + { + pointer += ProtoBufRuntime._skip_field_decode(wireType, pointer, bs); + } + } + return (r, sz); + } + + // field readers + + /** + * @dev The decoder for reading a field + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @param r The in-memory struct + * @return The number of bytes decoded + */ + function _read_mrenclave( + uint256 p, + bytes memory bs, + Data memory r + ) internal pure returns (uint) { + (bytes memory x, uint256 sz) = ProtoBufRuntime._decode_bytes(p, bs); + r.mrenclave = x; + return sz; + } + + /** + * @dev The decoder for reading a field + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @param r The in-memory struct + * @return The number of bytes decoded + */ + function _read_key_expiration( + uint256 p, + bytes memory bs, + Data memory r + ) internal pure returns (uint) { + (uint64 x, uint256 sz) = ProtoBufRuntime._decode_uint64(p, bs); + r.key_expiration = x; + return sz; + } + + /** + * @dev The decoder for reading a field + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @param r The in-memory struct + * @return The number of bytes decoded + */ + function _read_frozen( + uint256 p, + bytes memory bs, + Data memory r + ) internal pure returns (uint) { + (bool x, uint256 sz) = ProtoBufRuntime._decode_bool(p, bs); + r.frozen = x; + return sz; + } + + /** + * @dev The decoder for reading a field + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @param r The in-memory struct + * @return The number of bytes decoded + */ + function _read_latest_height( + uint256 p, + bytes memory bs, + Data memory r + ) internal pure returns (uint) { + (Height.Data memory x, uint256 sz) = _decode_Height(p, bs); + r.latest_height = x; + return sz; + } + + /** + * @dev The decoder for reading a field + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @param r The in-memory struct + * @param counters The counters for repeated fields + * @return The number of bytes decoded + */ + function _read_unpacked_repeated_allowed_quote_statuses( + uint256 p, + bytes memory bs, + Data memory r, + uint[11] memory counters + ) internal pure returns (uint) { + /** + * if `r` is NULL, then only counting the number of fields. + */ + (string memory x, uint256 sz) = ProtoBufRuntime._decode_string(p, bs); + if (isNil(r)) { + counters[5] += 1; + } else { + r.allowed_quote_statuses[r.allowed_quote_statuses.length - counters[5]] = x; + counters[5] -= 1; + } + return sz; + } + + /** + * @dev The decoder for reading a field + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @param r The in-memory struct + * @param counters The counters for repeated fields + * @return The number of bytes decoded + */ + function _read_unpacked_repeated_allowed_advisory_ids( + uint256 p, + bytes memory bs, + Data memory r, + uint[11] memory counters + ) internal pure returns (uint) { + /** + * if `r` is NULL, then only counting the number of fields. + */ + (string memory x, uint256 sz) = ProtoBufRuntime._decode_string(p, bs); + if (isNil(r)) { + counters[6] += 1; + } else { + r.allowed_advisory_ids[r.allowed_advisory_ids.length - counters[6]] = x; + counters[6] -= 1; + } + return sz; + } + + /** + * @dev The decoder for reading a field + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @param r The in-memory struct + * @param counters The counters for repeated fields + * @return The number of bytes decoded + */ + function _read_unpacked_repeated_operators( + uint256 p, + bytes memory bs, + Data memory r, + uint[11] memory counters + ) internal pure returns (uint) { + /** + * if `r` is NULL, then only counting the number of fields. + */ + (bytes memory x, uint256 sz) = ProtoBufRuntime._decode_bytes(p, bs); + if (isNil(r)) { + counters[7] += 1; + } else { + r.operators[r.operators.length - counters[7]] = x; + counters[7] -= 1; + } + return sz; + } + + /** + * @dev The decoder for reading a field + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @param r The in-memory struct + * @return The number of bytes decoded + */ + function _read_operators_nonce( + uint256 p, + bytes memory bs, + Data memory r + ) internal pure returns (uint) { + (uint64 x, uint256 sz) = ProtoBufRuntime._decode_uint64(p, bs); + r.operators_nonce = x; + return sz; + } + + /** + * @dev The decoder for reading a field + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @param r The in-memory struct + * @return The number of bytes decoded + */ + function _read_operators_threshold_numerator( + uint256 p, + bytes memory bs, + Data memory r + ) internal pure returns (uint) { + (uint64 x, uint256 sz) = ProtoBufRuntime._decode_uint64(p, bs); + r.operators_threshold_numerator = x; + return sz; + } + + /** + * @dev The decoder for reading a field + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @param r The in-memory struct + * @return The number of bytes decoded + */ + function _read_operators_threshold_denominator( + uint256 p, + bytes memory bs, + Data memory r + ) internal pure returns (uint) { + (uint64 x, uint256 sz) = ProtoBufRuntime._decode_uint64(p, bs); + r.operators_threshold_denominator = x; + return sz; + } + + // struct decoder + /** + * @dev The decoder for reading a inner struct field + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @return The decoded inner-struct + * @return The number of bytes used to decode + */ + function _decode_Height(uint256 p, bytes memory bs) + internal + pure + returns (Height.Data memory, uint) + { + uint256 pointer = p; + (uint256 sz, uint256 bytesRead) = ProtoBufRuntime._decode_varint(pointer, bs); + pointer += bytesRead; + (Height.Data memory r, ) = Height._decode(pointer, bs, sz); + return (r, sz + bytesRead); + } + + + // Encoder section + + /** + * @dev The main encoder for memory + * @param r The struct to be encoded + * @return The encoded byte array + */ + function encode(Data memory r) internal pure returns (bytes memory) { + bytes memory bs = new bytes(_estimate(r)); + uint256 sz = _encode(r, 32, bs); + assembly { + mstore(bs, sz) + } + return bs; + } + // inner encoder + + /** + * @dev The encoder for internal usage + * @param r The struct to be encoded + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @return The number of bytes encoded + */ + function _encode(Data memory r, uint256 p, bytes memory bs) + internal + pure + returns (uint) + { + uint256 offset = p; + uint256 pointer = p; + uint256 i; + if (r.mrenclave.length != 0) { + pointer += ProtoBufRuntime._encode_key( + 1, + ProtoBufRuntime.WireType.LengthDelim, + pointer, + bs + ); + pointer += ProtoBufRuntime._encode_bytes(r.mrenclave, pointer, bs); + } + if (r.key_expiration != 0) { + pointer += ProtoBufRuntime._encode_key( + 2, + ProtoBufRuntime.WireType.Varint, + pointer, + bs + ); + pointer += ProtoBufRuntime._encode_uint64(r.key_expiration, pointer, bs); + } + if (r.frozen != false) { + pointer += ProtoBufRuntime._encode_key( + 3, + ProtoBufRuntime.WireType.Varint, + pointer, + bs + ); + pointer += ProtoBufRuntime._encode_bool(r.frozen, pointer, bs); + } + + pointer += ProtoBufRuntime._encode_key( + 4, + ProtoBufRuntime.WireType.LengthDelim, + pointer, + bs + ); + pointer += Height._encode_nested(r.latest_height, pointer, bs); + + if (r.allowed_quote_statuses.length != 0) { + for(i = 0; i < r.allowed_quote_statuses.length; i++) { + pointer += ProtoBufRuntime._encode_key( + 5, + ProtoBufRuntime.WireType.LengthDelim, + pointer, + bs) + ; + pointer += ProtoBufRuntime._encode_string(r.allowed_quote_statuses[i], pointer, bs); + } + } + if (r.allowed_advisory_ids.length != 0) { + for(i = 0; i < r.allowed_advisory_ids.length; i++) { + pointer += ProtoBufRuntime._encode_key( + 6, + ProtoBufRuntime.WireType.LengthDelim, + pointer, + bs) + ; + pointer += ProtoBufRuntime._encode_string(r.allowed_advisory_ids[i], pointer, bs); + } + } + if (r.operators.length != 0) { + for(i = 0; i < r.operators.length; i++) { + pointer += ProtoBufRuntime._encode_key( + 7, + ProtoBufRuntime.WireType.LengthDelim, + pointer, + bs) + ; + pointer += ProtoBufRuntime._encode_bytes(r.operators[i], pointer, bs); + } + } + if (r.operators_nonce != 0) { + pointer += ProtoBufRuntime._encode_key( + 8, + ProtoBufRuntime.WireType.Varint, + pointer, + bs + ); + pointer += ProtoBufRuntime._encode_uint64(r.operators_nonce, pointer, bs); + } + if (r.operators_threshold_numerator != 0) { + pointer += ProtoBufRuntime._encode_key( + 9, + ProtoBufRuntime.WireType.Varint, + pointer, + bs + ); + pointer += ProtoBufRuntime._encode_uint64(r.operators_threshold_numerator, pointer, bs); + } + if (r.operators_threshold_denominator != 0) { + pointer += ProtoBufRuntime._encode_key( + 10, + ProtoBufRuntime.WireType.Varint, + pointer, + bs + ); + pointer += ProtoBufRuntime._encode_uint64(r.operators_threshold_denominator, pointer, bs); + } + return pointer - offset; + } + // nested encoder + + /** + * @dev The encoder for inner struct + * @param r The struct to be encoded + * @param p The offset of bytes array to start decode + * @param bs The bytes array to be decoded + * @return The number of bytes encoded + */ + function _encode_nested(Data memory r, uint256 p, bytes memory bs) + internal + pure + returns (uint) + { + /** + * First encoded `r` into a temporary array, and encode the actual size used. + * Then copy the temporary array into `bs`. + */ + uint256 offset = p; + uint256 pointer = p; + bytes memory tmp = new bytes(_estimate(r)); + uint256 tmpAddr = ProtoBufRuntime.getMemoryAddress(tmp); + uint256 bsAddr = ProtoBufRuntime.getMemoryAddress(bs); + uint256 size = _encode(r, 32, tmp); + pointer += ProtoBufRuntime._encode_varint(size, pointer, bs); + ProtoBufRuntime.copyBytes(tmpAddr + 32, bsAddr + pointer, size); + pointer += size; + delete tmp; + return pointer - offset; + } + // estimator + + /** + * @dev The estimator for a struct + * @param r The struct to be encoded + * @return The number of bytes encoded in estimation + */ + function _estimate( + Data memory r + ) internal pure returns (uint) { + uint256 e;uint256 i; + e += 1 + ProtoBufRuntime._sz_lendelim(r.mrenclave.length); e += 1 + ProtoBufRuntime._sz_uint64(r.key_expiration); e += 1 + 1; e += 1 + ProtoBufRuntime._sz_lendelim(Height._estimate(r.latest_height)); @@ -988,6 +1630,12 @@ library IbcLightclientsLcpV1ClientState { for(i = 0; i < r.allowed_advisory_ids.length; i++) { e += 1 + ProtoBufRuntime._sz_lendelim(bytes(r.allowed_advisory_ids[i]).length); } + for(i = 0; i < r.operators.length; i++) { + e += 1 + ProtoBufRuntime._sz_lendelim(r.operators[i].length); + } + e += 1 + ProtoBufRuntime._sz_uint64(r.operators_nonce); + e += 1 + ProtoBufRuntime._sz_uint64(r.operators_threshold_numerator); + e += 1 + ProtoBufRuntime._sz_uint64(r.operators_threshold_denominator); return e; } // empty checker @@ -1016,6 +1664,22 @@ library IbcLightclientsLcpV1ClientState { return false; } + if (r.operators.length != 0) { + return false; + } + + if (r.operators_nonce != 0) { + return false; + } + + if (r.operators_threshold_numerator != 0) { + return false; + } + + if (r.operators_threshold_denominator != 0) { + return false; + } + return true; } @@ -1033,6 +1697,10 @@ library IbcLightclientsLcpV1ClientState { Height.store(input.latest_height, output.latest_height); output.allowed_quote_statuses = input.allowed_quote_statuses; output.allowed_advisory_ids = input.allowed_advisory_ids; + output.operators = input.operators; + output.operators_nonce = input.operators_nonce; + output.operators_threshold_numerator = input.operators_threshold_numerator; + output.operators_threshold_denominator = input.operators_threshold_denominator; } @@ -1073,6 +1741,24 @@ library IbcLightclientsLcpV1ClientState { self.allowed_advisory_ids = tmp; } + //array helpers for Operators + /** + * @dev Add value to an array + * @param self The in-memory struct + * @param value The value to add + */ + function addOperators(Data memory self, bytes memory value) internal pure { + /** + * First resize the array. Then add the new element to the end. + */ + bytes[] memory tmp = new bytes[](self.operators.length + 1); + for (uint256 i = 0; i < self.operators.length; i++) { + tmp[i] = self.operators[i]; + } + tmp[self.operators.length] = value; + self.operators = tmp; + } + //utility functions /** diff --git a/proto/ibc/lightclients/lcp/v1/LCP.proto b/proto/ibc/lightclients/lcp/v1/LCP.proto index 7c0ae46..2d3e9ad 100644 --- a/proto/ibc/lightclients/lcp/v1/LCP.proto +++ b/proto/ibc/lightclients/lcp/v1/LCP.proto @@ -7,14 +7,22 @@ option go_package = "github.com/datachainlab/lcp/go/light-clients/lcp/types"; message UpdateClientMessage { bytes proxy_message = 1; - bytes signer = 2; - bytes signature = 3; + repeated bytes signatures = 2; } message RegisterEnclaveKeyMessage { - string report = 1; + bytes report = 1; bytes signature = 2; bytes signing_cert = 3; + bytes operator_signature = 4; +} + +message UpdateOperatorsMessage { + uint64 nonce = 1; + repeated bytes new_operators = 2; + uint64 new_operators_threshold_numerator = 3; + uint64 new_operators_threshold_denominator = 4; + repeated bytes signatures = 5; } message ClientState { @@ -26,6 +34,10 @@ message ClientState { repeated string allowed_quote_statuses = 5; // e.g. INTEL-SA-XXXXX repeated string allowed_advisory_ids = 6; + repeated bytes operators = 7; + uint64 operators_nonce = 8; + uint64 operators_threshold_numerator = 9; + uint64 operators_threshold_denominator = 10; } message ConsensusState { diff --git a/test/LCPClientBenchmark.t.sol b/test/LCPClientBenchmark.t.sol index 751e9af..a4f3017 100644 --- a/test/LCPClientBenchmark.t.sol +++ b/test/LCPClientBenchmark.t.sol @@ -12,30 +12,37 @@ import { } from "../contracts/proto/ibc/lightclients/lcp/v1/LCP.sol"; import {LCPProtoMarshaler} from "../contracts/LCPProtoMarshaler.sol"; import {IBCHeight} from "@hyperledger-labs/yui-ibc-solidity/contracts/core/02-client/IBCHeight.sol"; +import {LCPOperator} from "../contracts/LCPOperator.sol"; abstract contract BaseLCPClientBenchmark is BasicTest { string internal constant commandAvrFile = "test/data/client/02/001-avr"; string internal constant rootCAFile = "test/data/certs/simulation_rootca.der"; string internal constant commandResultSuffix = "_result"; + uint256 internal immutable testOperatorPrivKey; + address internal immutable testOperator; + BLCPClient lc; string clientId; + constructor() { + (testOperator, testOperatorPrivKey) = makeAddrAndKey("alice"); + } + function createLCContract() internal returns (BLCPClient) { return new BLCPClient(address(this), true, vm.readFileBinary(rootCAFile)); } function createClient() internal { - ClientState.Data memory clientState = createInitialState(commandAvrFile); + ClientState.Data memory clientState = createInitialState(commandAvrFile, testOperator); ConsensusState.Data memory consensusState; lc.initializeClient(clientId, LCPProtoMarshaler.marshal(clientState), LCPProtoMarshaler.marshal(consensusState)); } - function generateClientId(uint64 clientCounter) internal pure returns (string memory) { - return string(abi.encodePacked("lcp-", Strings.toString(clientCounter))); - } - - function createInitialState(string memory avrFile) internal returns (ClientState.Data memory clientState) { + function createInitialState(string memory avrFile, address operator) + internal + returns (ClientState.Data memory clientState) + { bytes memory mrenclave = readDecodedBytes(avrFile, ".mrenclave"); require(mrenclave.length == 32, "the length must be 32"); @@ -44,6 +51,12 @@ abstract contract BaseLCPClientBenchmark is BasicTest { clientState.key_expiration = 60 * 60 * 24 * 7; clientState.frozen = false; + clientState.operators = new bytes[](1); + clientState.operators[0] = abi.encodePacked(operator); + clientState.operators_nonce = 0; + clientState.operators_threshold_numerator = 1; + clientState.operators_threshold_denominator = 1; + // WARNING: the following configuration is for testing purpose only clientState.allowed_quote_statuses = new string[](1); clientState.allowed_quote_statuses[0] = readNestedString(avrFile, ".avr", ".isvEnclaveQuoteStatus"); @@ -54,9 +67,13 @@ abstract contract BaseLCPClientBenchmark is BasicTest { internal returns (RegisterEnclaveKeyMessage.Data memory message) { - message.report = string(readJSON(avrFile, ".avr")); + message.report = readJSON(avrFile, ".avr"); message.signature = readDecodedBytes(avrFile, ".signature"); message.signing_cert = readDecodedBytes(avrFile, ".signing_cert"); + (uint8 v, bytes32 r, bytes32 s) = vm.sign( + testOperatorPrivKey, keccak256(LCPOperatorTestHelper.computeEIP712RegisterEnclaveKey(message.report)) + ); + message.operator_signature = abi.encodePacked(r, s, v); } function createUpdateClientMessage(string memory updateClientFilePrefix) @@ -65,9 +82,8 @@ abstract contract BaseLCPClientBenchmark is BasicTest { { message.proxy_message = readDecodedBytes(string(abi.encodePacked(updateClientFilePrefix, commandResultSuffix)), ".message"); - message.signer = - readDecodedBytes(string(abi.encodePacked(updateClientFilePrefix, commandResultSuffix)), ".signer"); - message.signature = + message.signatures = new bytes[](1); + message.signatures[0] = readDecodedBytes(string(abi.encodePacked(updateClientFilePrefix, commandResultSuffix)), ".signature"); } } @@ -120,23 +136,35 @@ contract CachedEnclaveRegistrationBenchmark is BaseLCPClientBenchmark { } } -contract UpdateClientBenchmark is BaseLCPClientBenchmark { +contract CreateClientBenchmark is BaseLCPClientBenchmark { function setUp() public { vm.warp(1703138378); lc = createLCContract(); clientId = generateClientId(1); + } + + function testCreateClient() public { + createClient(); + } +} + +contract UpdateClientBenchmark is BaseLCPClientBenchmark { + function setUp() public { + vm.warp(1718461269); + lc = createLCContract(); + clientId = generateClientId(1); createClient(); Height.Data[] memory heights = lc.registerEnclaveKey(clientId, createRegisterEnclaveKeyMessage(commandAvrFile)); require(heights.length == 0); - heights = lc.updateClient(clientId, createUpdateClientMessage("test/data/client/02/004-update_client")); + heights = lc.updateClient(clientId, createUpdateClientMessage("test/data/client/02/003-update_client")); require(heights.length == 1, "heights length must be 1"); } function testUpdateClient() public { Height.Data[] memory heights = - lc.updateClient(clientId, createUpdateClientMessage("test/data/client/02/007-update_client")); + lc.updateClient(clientId, createUpdateClientMessage("test/data/client/02/005-update_client")); require(heights.length == 1, "heights length must be 1"); } } diff --git a/test/LCPClientOperator.t.sol b/test/LCPClientOperator.t.sol new file mode 100644 index 0000000..ac03a24 --- /dev/null +++ b/test/LCPClientOperator.t.sol @@ -0,0 +1,421 @@ +// SPDX-License-Identifier: Apache-2.0 +pragma solidity ^0.8.12; + +import {IBCHeight} from "@hyperledger-labs/yui-ibc-solidity/contracts/core/02-client/IBCHeight.sol"; +import "./TestHelper.t.sol"; +import "../contracts/LCPClient.sol"; +import {LCPProtoMarshaler} from "../contracts/LCPProtoMarshaler.sol"; +import {ILCPClientErrors} from "../contracts/ILCPClientErrors.sol"; +import { + IbcLightclientsLcpV1ClientState as ClientState, + IbcLightclientsLcpV1ConsensusState as ConsensusState, + IbcLightclientsLcpV1RegisterEnclaveKeyMessage as RegisterEnclaveKeyMessage, + IbcLightclientsLcpV1UpdateClientMessage as UpdateClientMessage, + IbcLightclientsLcpV1UpdateOperatorsMessage as UpdateOperatorsMessage +} from "../contracts/proto/ibc/lightclients/lcp/v1/LCP.sol"; +import {LCPOperator} from "../contracts/LCPOperator.sol"; + +contract LCPClientOperatorTest is BasicTest { + using IBCHeight for Height.Data; + + string internal constant commandAvrFile = "test/data/client/03/001-avr"; + string internal constant commandResultSuffix = "_result"; + + LCPClient lc; + + function setUp() public { + vm.warp(1718465726); + lc = new LCPClient(address(this), true, vm.readFileBinary("./test/data/certs/simulation_rootca.der")); + } + + function avr(string memory filename) internal pure returns (string memory) { + return string(abi.encodePacked("test/data/client/03/", filename)); + } + + function testPreComputationValues() public pure { + assertEq(LCPOperator.domainSeparator(0, address(0)), LCPOperator.DOMAIN_SEPARATOR_REGISTER_ENCLAVE_KEY); + assertEq(LCPOperator.chainTypeSalt(LCPOperator.CHAIN_TYPE_EVM, hex""), LCPOperator.CHAIN_TYPE_EVM_SALT); + } + + function testRegisterEnclaveKeyMultiOperators() public { + Vm.Wallet[] memory wallets = createWallets(2); + address[] memory operators = new address[](wallets.length); + for (uint256 i = 0; i < wallets.length; i++) { + operators[i] = wallets[i].addr; + } + string memory clientId = generateClientId(1); + { + ClientState.Data memory clientState = createInitialState(avr("001-avr"), operators, 2, 3); + ConsensusState.Data memory consensusState; + Height.Data memory height = lc.initializeClient( + clientId, LCPProtoMarshaler.marshal(clientState), LCPProtoMarshaler.marshal(consensusState) + ); + require(height.eq(clientState.latest_height)); + } + // both operator and report are valid + { + RegisterEnclaveKeyMessage.Data memory message = + createRegisterEnclaveKeyMessage(avr("001-avr"), wallets[0].privateKey); + lc.registerEnclaveKey(clientId, message); + } + // report is valid but operator is invalid + { + RegisterEnclaveKeyMessage.Data memory message = + createRegisterEnclaveKeyMessage(avr("001-avr"), wallets[1].privateKey); + vm.expectRevert( + abi.encodeWithSelector( + ILCPClientErrors.LCPClientEnclaveKeyUnexpectedOperator.selector, operators[0], operators[1] + ) + ); + lc.registerEnclaveKey(clientId, message); + } + // both operator and report are valid + { + RegisterEnclaveKeyMessage.Data memory message = + createRegisterEnclaveKeyMessage(avr("002-avr"), wallets[1].privateKey); + lc.registerEnclaveKey(clientId, message); + } + // both operator and report are valid + { + RegisterEnclaveKeyMessage.Data memory message = + createRegisterEnclaveKeyMessage(avr("003-avr"), wallets[0].privateKey); + lc.registerEnclaveKey(clientId, message); + } + // both operator and report are valid + { + RegisterEnclaveKeyMessage.Data memory message = + createRegisterEnclaveKeyMessage(avr("004-avr"), wallets[1].privateKey); + lc.registerEnclaveKey(clientId, message); + } + } + + function testUpdateClientMultiOperators() public { + Vm.Wallet[] memory wallets = createWallets(4); + address[] memory operators = new address[](wallets.length); + for (uint256 i = 0; i < wallets.length; i++) { + operators[i] = wallets[i].addr; + } + string memory clientId = generateClientId(1); + { + ClientState.Data memory clientState = createInitialState(commandAvrFile, operators, 2, 3); + ConsensusState.Data memory consensusState; + Height.Data memory height = lc.initializeClient( + clientId, LCPProtoMarshaler.marshal(clientState), LCPProtoMarshaler.marshal(consensusState) + ); + require(height.eq(clientState.latest_height)); + } + + lc.registerEnclaveKey(clientId, createRegisterEnclaveKeyMessage(avr("001-avr"), wallets[0].privateKey)); + lc.registerEnclaveKey(clientId, createRegisterEnclaveKeyMessage(avr("002-avr"), wallets[1].privateKey)); + lc.registerEnclaveKey(clientId, createRegisterEnclaveKeyMessage(avr("003-avr"), wallets[2].privateKey)); + lc.registerEnclaveKey(clientId, createRegisterEnclaveKeyMessage(avr("004-avr"), wallets[3].privateKey)); + + lc.updateClient( + clientId, + createUpdateClientMessage( + "test/data/client/03/", + [ + "006-update_client_result", + "007-update_client_result", + "008-update_client_result", + "009-update_client_result" + ] + ) + ); + string[4] memory inputs = [ + "010-update_client_result", + "011-update_client_result", + "012-update_client_result", + "013-update_client_result" + ]; + // OK + lc.updateClient(clientId, createUpdateClientMessage("test/data/client/03/", inputs)); + // Same update message but OK + lc.updateClient(clientId, createUpdateClientMessage("test/data/client/03/", inputs)); + // operator index 0 is invalid + { + UpdateClientMessage.Data memory message = createUpdateClientMessage("test/data/client/03/", inputs); + message.signatures[0] = new bytes(0); + lc.updateClient(clientId, message); + } + { + UpdateClientMessage.Data memory message = createUpdateClientMessage("test/data/client/03/", inputs); + message.signatures[0] = new bytes(0); + message.signatures[1] = new bytes(0); + vm.expectRevert( + abi.encodeWithSelector(ILCPClientErrors.LCPClientOperatorSignaturesInsufficient.selector, 2) + ); + lc.updateClient(clientId, message); + } + { + UpdateClientMessage.Data memory message = createUpdateClientMessage("test/data/client/03/", inputs); + (message.signatures[0], message.signatures[1]) = (message.signatures[1], message.signatures[0]); + vm.expectRevert( + abi.encodeWithSelector( + ILCPClientErrors.LCPClientEnclaveKeyUnexpectedOperator.selector, operators[1], operators[0] + ) + ); + lc.updateClient(clientId, message); + } + } + + function testUpdateOperators() public { + Vm.Wallet[] memory wallets = createWallets(4); + address[] memory operators = new address[](wallets.length); + for (uint256 i = 0; i < wallets.length; i++) { + operators[i] = wallets[i].addr; + } + string memory clientId = generateClientId(1); + { + ClientState.Data memory clientState = createInitialState(commandAvrFile, operators, 2, 3); + ConsensusState.Data memory consensusState; + Height.Data memory height = lc.initializeClient( + clientId, LCPProtoMarshaler.marshal(clientState), LCPProtoMarshaler.marshal(consensusState) + ); + require(height.eq(clientState.latest_height)); + } + uint64 nextNonce = 1; + { + bytes[] memory signatures = generateSignatures( + wallets, + keccak256( + LCPOperatorTestHelper.computeEIP712UpdateOperators( + block.chainid, address(lc), clientId, nextNonce, operators, 2, 3 + ) + ), + genValidIndices([true, true, true, true]) + ); + UpdateOperatorsMessage.Data memory message = createUpdateOperators(nextNonce, operators, signatures, 2, 3); + lc.updateOperators(clientId, message); + nextNonce++; + } + { + bytes[] memory signatures = generateSignatures( + wallets, + keccak256( + LCPOperatorTestHelper.computeEIP712UpdateOperators( + block.chainid, address(lc), clientId, nextNonce, operators, 2, 3 + ) + ), + genValidIndices([false, true, true, true]) + ); + UpdateOperatorsMessage.Data memory message = createUpdateOperators(nextNonce, operators, signatures, 2, 3); + lc.updateOperators(clientId, message); + nextNonce++; + } + { + bytes[] memory signatures = generateSignatures( + wallets, + keccak256( + LCPOperatorTestHelper.computeEIP712UpdateOperators( + block.chainid, address(lc), clientId, nextNonce, operators, 2, 3 + ) + ), + genValidIndices([false, true, true, false]) + ); + UpdateOperatorsMessage.Data memory message = createUpdateOperators(nextNonce, operators, signatures, 2, 3); + vm.expectRevert( + abi.encodeWithSelector(ILCPClientErrors.LCPClientOperatorSignaturesInsufficient.selector, 2) + ); + lc.updateOperators(clientId, message); + } + { + bytes[] memory signatures = generateSignatures( + wallets, + keccak256( + LCPOperatorTestHelper.computeEIP712UpdateOperators( + block.chainid, address(lc), clientId, nextNonce, operators, 2, 3 + ) + ), + genValidIndices([false, false, false, false]) + ); + UpdateOperatorsMessage.Data memory message = createUpdateOperators(nextNonce, operators, signatures, 2, 3); + vm.expectRevert( + abi.encodeWithSelector(ILCPClientErrors.LCPClientOperatorSignaturesInsufficient.selector, 0) + ); + lc.updateOperators(clientId, message); + } + { + bytes[] memory signatures = generateSignatures( + wallets, + keccak256( + LCPOperatorTestHelper.computeEIP712UpdateOperators( + block.chainid, address(lc), clientId, nextNonce, operators, 2, 3 + ) + ), + genValidIndices([true, true, true, true]) + ); + // signatures are valid but duplicated + (signatures[1], signatures[2], signatures[3]) = (signatures[0], signatures[0], signatures[0]); + UpdateOperatorsMessage.Data memory message = createUpdateOperators(nextNonce, operators, signatures, 2, 3); + vm.expectRevert( + abi.encodeWithSelector( + ILCPClientErrors.LCPClientUpdateOperatorsSignatureUnexpectedOperator.selector, + wallets[0].addr, + wallets[1].addr + ) + ); + lc.updateOperators(clientId, message); + } + { + bytes[] memory signatures = generateSignatures( + wallets, + keccak256( + LCPOperatorTestHelper.computeEIP712UpdateOperators( + block.chainid, address(lc), clientId, nextNonce, operators, 1, 1 + ) + ), + genValidIndices([false, true, true, true]) + ); + UpdateOperatorsMessage.Data memory message = createUpdateOperators(nextNonce, operators, signatures, 1, 1); + lc.updateOperators(clientId, message); + nextNonce++; + } + { + bytes[] memory signatures = generateSignatures( + wallets, + keccak256( + LCPOperatorTestHelper.computeEIP712UpdateOperators( + block.chainid, address(lc), clientId, nextNonce, operators, 1, 1 + ) + ), + genValidIndices([false, true, true, true]) + ); + UpdateOperatorsMessage.Data memory message = createUpdateOperators(nextNonce, operators, signatures, 1, 1); + vm.expectRevert( + abi.encodeWithSelector(ILCPClientErrors.LCPClientOperatorSignaturesInsufficient.selector, 3) + ); + lc.updateOperators(clientId, message); + nextNonce++; + } + } + + function generateSignature(Vm.Wallet memory wallet, bytes32 commitment, bool valid) + internal + pure + returns (bytes memory) + { + Vm.Wallet[] memory wallets = new Vm.Wallet[](1); + wallets[0] = wallet; + bool[] memory validIndices = new bool[](1); + validIndices[0] = valid; + return generateSignatures(wallets, commitment, validIndices)[0]; + } + + function generateSignatures(Vm.Wallet[] memory wallets, bytes32 commitment, bool[] memory validIndices) + internal + pure + returns (bytes[] memory) + { + require(wallets.length == validIndices.length, "invalid length"); + bytes[] memory signatures = new bytes[](wallets.length); + for (uint256 i = 0; i < wallets.length; i++) { + (uint8 v, bytes32 r, bytes32 s) = vm.sign(wallets[i].privateKey, commitment); + if (validIndices[i]) { + signatures[i] = abi.encodePacked(r, s, v); + } else { + signatures[i] = new bytes(0); + } + } + return signatures; + } + + function genValidIndices(bool[4] memory validIndices) internal pure returns (bool[] memory) { + bool[] memory res = new bool[](4); + for (uint256 i = 0; i < 4; i++) { + res[i] = validIndices[i]; + } + return res; + } + + function createInitialState( + string memory avrFile, + address[] memory operators, + uint64 thresholdNumerator, + uint64 thresholdDenominator + ) internal returns (ClientState.Data memory clientState) { + bytes memory mrenclave = readDecodedBytes(avrFile, ".mrenclave"); + require(mrenclave.length == 32, "the length must be 32"); + + // Note `latest_height` must be zero height + clientState.mrenclave = mrenclave; + clientState.key_expiration = 60 * 60 * 24 * 7; + clientState.frozen = false; + + clientState.operators = new bytes[](operators.length); + for (uint256 i = 0; i < operators.length; i++) { + clientState.operators[i] = abi.encodePacked(operators[i]); + } + clientState.operators_nonce = 0; + clientState.operators_threshold_numerator = thresholdNumerator; + clientState.operators_threshold_denominator = thresholdDenominator; + + // WARNING: the following configuration is for testing purpose only + clientState.allowed_quote_statuses = new string[](1); + clientState.allowed_quote_statuses[0] = readNestedString(avrFile, ".avr", ".isvEnclaveQuoteStatus"); + clientState.allowed_advisory_ids = readNestedStringArray(avrFile, ".avr", ".advisoryIDs"); + } + + function createRegisterEnclaveKeyMessage(string memory avrFile, uint256 privateKey) + internal + returns (RegisterEnclaveKeyMessage.Data memory message) + { + message.report = readJSON(avrFile, ".avr"); + message.signature = readDecodedBytes(avrFile, ".signature"); + message.signing_cert = readDecodedBytes(avrFile, ".signing_cert"); + (uint8 v, bytes32 r, bytes32 s) = + vm.sign(privateKey, keccak256(LCPOperatorTestHelper.computeEIP712RegisterEnclaveKey(message.report))); + message.operator_signature = abi.encodePacked(r, s, v); + } + + function createUpdateClientMessage(string memory updateClientFilePrefix) + internal + returns (UpdateClientMessage.Data memory message) + { + message.proxy_message = + readDecodedBytes(string(abi.encodePacked(updateClientFilePrefix, commandResultSuffix)), ".message"); + message.signatures = new bytes[](1); + message.signatures[0] = + readDecodedBytes(string(abi.encodePacked(updateClientFilePrefix, commandResultSuffix)), ".signature"); + } + + function createUpdateClientMessage(string memory dir, string[] memory prefixes) + internal + returns (UpdateClientMessage.Data memory message) + { + message.signatures = new bytes[](prefixes.length); + for (uint256 i = 0; i < prefixes.length; i++) { + string memory path = string(abi.encodePacked(dir, prefixes[i])); + message.proxy_message = readDecodedBytes(path, ".message"); + message.signatures[i] = readDecodedBytes(path, ".signature"); + } + } + + function createUpdateClientMessage(string memory dir, string[4] memory prefixes) + internal + returns (UpdateClientMessage.Data memory message) + { + string[] memory prefixes_ = new string[](4); + for (uint256 i = 0; i < 4; i++) { + prefixes_[i] = prefixes[i]; + } + return createUpdateClientMessage(dir, prefixes_); + } + + function createUpdateOperators( + uint64 nonce, + address[] memory newOperators, + bytes[] memory signatures, + uint64 thresholdNumerator, + uint64 thresholdDenominator + ) internal pure returns (UpdateOperatorsMessage.Data memory message) { + message.nonce = nonce; + message.new_operators = new bytes[](newOperators.length); + for (uint256 i = 0; i < newOperators.length; i++) { + message.new_operators[i] = abi.encodePacked(newOperators[i]); + } + message.new_operators_threshold_numerator = thresholdNumerator; + message.new_operators_threshold_denominator = thresholdDenominator; + message.signatures = signatures; + } +} diff --git a/test/LCPClientTest.t.sol b/test/LCPClientTest.t.sol index 12fb361..5c2cb4a 100644 --- a/test/LCPClientTest.t.sol +++ b/test/LCPClientTest.t.sol @@ -26,16 +26,15 @@ contract LCPClientTest is BasicTest { LCPClient simulationLC; string internal constant baseDir = "test/data/client"; - uint256 internal constant commandStartNumber = 3; // skip 001-avr and 002-init_client_* uint256 internal constant commandNumberPrefixLength = 4; // "000-" string internal constant commandInputSuffix = "_input"; // e.g. 003_update_client_input string internal constant commandResultSuffix = "_result"; // e.g. 003_update_client_result uint256 internal constant commandInputSuffixLength = 6; // "_input" - string internal constant commandAvrFile = "001-avr"; struct TestContext { string dir; LCPClient lc; + Vm.Wallet opWallet; } function setTestContext(TestContext memory tc) internal { @@ -50,46 +49,67 @@ contract LCPClientTest is BasicTest { simulationLC = new LCPClient(address(this), true, vm.readFileBinary("./test/data/certs/simulation_rootca.der")); } - function generateClientId(uint64 clientCounter) internal pure returns (string memory) { - return string(abi.encodePacked("lcp-", Strings.toString(clientCounter))); + function testIASClientPermissioned() public { + vm.warp(1718464245); + setTestContext(TestContext("01", iasLC, vm.createWallet("alice"))); + testLightClient(generateClientId(1), true, "001-avr", 3); } - function testIASClient() public { - vm.warp(1703238378); - setTestContext(TestContext("01", iasLC)); - testClient(); + function testIASClientPermissionless() public { + vm.warp(1718464245); + setTestContext(TestContext("01", iasLC, vm.createWallet("alice"))); + testLightClient(generateClientId(1), false, "001-avr", 3); } - function testSimulationClient() public { - vm.warp(1703138378); - setTestContext(TestContext("02", simulationLC)); - testClient(); + function testSimulationClientPermissioned() public { + vm.warp(1718461269); + setTestContext(TestContext("02", simulationLC, vm.createWallet("alice"))); + testLightClient(generateClientId(1), true, "001-avr", 3); } - event RegisteredEnclaveKey(string clientId, address enclaveKey, uint256 expiredAt); + function testSimulationClientPermissionless() public { + vm.warp(1718461269); + setTestContext(TestContext("02", simulationLC, vm.createWallet("alice"))); + testLightClient(generateClientId(1), false, "001-avr", 3); + } + + event RegisteredEnclaveKey(string clientId, address enclaveKey, uint256 expiredAt, address operator); - function testClient() internal { - string memory clientId = generateClientId(1); + function testLightClient( + string memory clientId, + bool permissioned, + string memory commandAvrFile, + uint256 commandStartNumber + ) internal { LCPClient lc = testContext.lc; { - ClientState.Data memory clientState = createInitialState(commandAvrFile); + ClientState.Data memory clientState; + address[] memory opWallets; + if (permissioned) { + opWallets = new address[](1); + opWallets[0] = testContext.opWallet.addr; + clientState = createInitialState(commandAvrFile, opWallets); + } else { + clientState = createInitialState(commandAvrFile, opWallets, 0, 0); + } ConsensusState.Data memory consensusState; Height.Data memory height = lc.initializeClient( clientId, LCPProtoMarshaler.marshal(clientState), LCPProtoMarshaler.marshal(consensusState) ); require(height.eq(clientState.latest_height)); } - { - RegisterEnclaveKeyMessage.Data memory message = createRegisterEnclaveKeyMessage(commandAvrFile); + RegisterEnclaveKeyMessage.Data memory message = + createRegisterEnclaveKeyMessage(commandAvrFile, testContext.opWallet); vm.expectEmit(false, false, false, false); - emit RegisteredEnclaveKey(clientId, address(0), 0); + emit RegisteredEnclaveKey(clientId, address(0), 0, address(0)); Height.Data[] memory heights = lc.registerEnclaveKey(clientId, message); require(heights.length == 0); } { - RegisterEnclaveKeyMessage.Data memory message = createRegisterEnclaveKeyMessage(commandAvrFile); + RegisterEnclaveKeyMessage.Data memory message = + createRegisterEnclaveKeyMessage(commandAvrFile, testContext.opWallet); // the following staticcall is expected to succeed because registerEnclaveKey does not update the state if the message contains an enclave key already registered (bool success,) = address(lc).staticcall( abi.encodeWithSelector(LCPClientBase.registerEnclaveKey.selector, clientId, message) @@ -97,7 +117,7 @@ contract LCPClientTest is BasicTest { require(success, "failed to register duplicated enclave key"); } - TestData[] memory dataList = readTestDataList(); + TestData[] memory dataList = readTestDataList(commandStartNumber); for (uint256 i = 0; i < dataList.length; i++) { if (dataList[i].cmd == Command.UpdateClient) { UpdateClientMessage.Data memory message = createUpdateClientMessage(dataList[i].path); @@ -134,7 +154,19 @@ contract LCPClientTest is BasicTest { } } - function createInitialState(string memory avrFile) internal returns (ClientState.Data memory clientState) { + function createInitialState(string memory avrFile, address[] memory operators) + internal + returns (ClientState.Data memory clientState) + { + return createInitialState(avrFile, operators, 1, 1); + } + + function createInitialState( + string memory avrFile, + address[] memory operators, + uint64 thresholdNumerator, + uint64 thresholdDenominator + ) internal returns (ClientState.Data memory clientState) { bytes memory mrenclave = readDecodedBytes(avrFile, ".mrenclave"); require(mrenclave.length == 32, "the length must be 32"); @@ -143,19 +175,31 @@ contract LCPClientTest is BasicTest { clientState.key_expiration = 60 * 60 * 24 * 7; clientState.frozen = false; + clientState.operators = new bytes[](operators.length); + for (uint256 i = 0; i < operators.length; i++) { + clientState.operators[i] = abi.encodePacked(operators[i]); + } + clientState.operators_nonce = 0; + clientState.operators_threshold_numerator = thresholdNumerator; + clientState.operators_threshold_denominator = thresholdDenominator; + // WARNING: the following configuration is for testing purpose only clientState.allowed_quote_statuses = new string[](1); clientState.allowed_quote_statuses[0] = readNestedString(avrFile, ".avr", ".isvEnclaveQuoteStatus"); clientState.allowed_advisory_ids = readNestedStringArray(avrFile, ".avr", ".advisoryIDs"); } - function createRegisterEnclaveKeyMessage(string memory avrFile) + function createRegisterEnclaveKeyMessage(string memory avrFile, Vm.Wallet memory opWallet) internal returns (RegisterEnclaveKeyMessage.Data memory message) { - message.report = string(readJSON(avrFile, ".avr")); + message.report = readJSON(avrFile, ".avr"); message.signature = readDecodedBytes(avrFile, ".signature"); message.signing_cert = readDecodedBytes(avrFile, ".signing_cert"); + (uint8 v, bytes32 r, bytes32 s) = vm.sign( + opWallet.privateKey, keccak256(LCPOperatorTestHelper.computeEIP712RegisterEnclaveKey(message.report)) + ); + message.operator_signature = abi.encodePacked(r, s, v); } function createUpdateClientMessage(string memory updateClientFilePrefix) @@ -164,9 +208,8 @@ contract LCPClientTest is BasicTest { { message.proxy_message = readDecodedBytes(string(abi.encodePacked(updateClientFilePrefix, commandResultSuffix)), ".message"); - message.signer = - readDecodedBytes(string(abi.encodePacked(updateClientFilePrefix, commandResultSuffix)), ".signer"); - message.signature = + message.signatures = new bytes[](1); + message.signatures[0] = readDecodedBytes(string(abi.encodePacked(updateClientFilePrefix, commandResultSuffix)), ".signature"); } @@ -184,22 +227,13 @@ contract LCPClientTest is BasicTest { { bytes memory messageBytes = readDecodedBytes(string(abi.encodePacked(verifyMembershipFilePrefix, commandResultSuffix)), ".message"); - bytes memory signer = - readDecodedBytes(string(abi.encodePacked(verifyMembershipFilePrefix, commandResultSuffix)), ".signer"); - require(signer.length == 20, "signer length must be 20"); bytes memory signature = readDecodedBytes( string(abi.encodePacked(verifyMembershipFilePrefix, commandResultSuffix)), ".signature" ); - proof = abi.encode( - LCPCommitment.CommitmentProof({ - message: messageBytes, - signer: address(bytes20(signer)), - signature: signature - }) - ); + proof = abi.encode(newCommitmentProofs(messageBytes, signature)); } (, LCPCommitment.VerifyMembershipProxyMessage memory message) = - LCPCommitmentTestHelper.parseVerifyMembershipCommitmentProof(proof); + LCPCommitmentTestHelper.parseVerifyMembershipCommitmentProofs(proof); assert(message.value == keccak256(value)); height = message.height; @@ -213,20 +247,11 @@ contract LCPClientTest is BasicTest { { bytes memory messageBytes = readDecodedBytes(string(abi.encodePacked(verifyNonMembershipFilePrefix, commandResultSuffix)), ".message"); - bytes memory signer = - readDecodedBytes(string(abi.encodePacked(verifyNonMembershipFilePrefix, commandResultSuffix)), ".signer"); - require(signer.length == 20, "signer length must be 20"); bytes memory signature = readDecodedBytes(string(abi.encodePacked(verifyNonMembershipFilePrefix, commandResultSuffix)), ".signature"); - proof = abi.encode( - LCPCommitment.CommitmentProof({ - message: messageBytes, - signer: address(bytes20(signer)), - signature: signature - }) - ); + proof = abi.encode(newCommitmentProofs(messageBytes, signature)); (, LCPCommitment.VerifyMembershipProxyMessage memory message) = - LCPCommitmentTestHelper.parseVerifyMembershipCommitmentProof(proof); + LCPCommitmentTestHelper.parseVerifyMembershipCommitmentProofs(proof); assert(message.value == bytes32(0)); height = message.height; @@ -280,7 +305,7 @@ contract LCPClientTest is BasicTest { /** * @dev readTestDataList returns test data list generated by [cgen](https://github.com/datachainlab/lcp/tree/main/tools/cgen). */ - function readTestDataList() internal returns (TestData[] memory) { + function readTestDataList(uint256 commandStartNumber) internal returns (TestData[] memory) { string[] memory inputs = new string[](3); inputs[0] = "ls"; inputs[1] = "-1"; @@ -289,18 +314,13 @@ contract LCPClientTest is BasicTest { uint256 n = (parts.length - commandStartNumber) / 2; TestData[] memory dataList = new TestData[](n); for (uint256 i = 0; i < n; i++) { + bytes memory fileName = bytes(parts[commandStartNumber + i * 2]); bytes32 h = keccak256( - bytes(parts[commandStartNumber + i * 2]).substring( - commandNumberPrefixLength, - bytes(parts[commandStartNumber + i * 2]).length - commandNumberPrefixLength - - commandInputSuffixLength - ) - ); - string memory path = string( - bytes(parts[commandStartNumber + i * 2]).substring( - 0, bytes(parts[commandStartNumber + i * 2]).length - commandInputSuffixLength + fileName.substring( + commandNumberPrefixLength, fileName.length - commandNumberPrefixLength - commandInputSuffixLength ) ); + string memory path = string(fileName.substring(0, fileName.length - commandInputSuffixLength)); if (h == keccak256("update_client")) { dataList[i] = TestData({cmd: Command.UpdateClient, path: path}); } else if ( @@ -311,7 +331,7 @@ contract LCPClientTest is BasicTest { } else if (h == keccak256("verify_packet_receipt_absence")) { dataList[i] = TestData({cmd: Command.VerifyNonMembership, path: path}); } else { - require(false, "unknown file name"); + require(false, string(abi.encodePacked("unknown file name:", fileName))); } } return dataList; @@ -328,14 +348,14 @@ contract LCPClientTest is BasicTest { uint256 offset = 0; bytes memory ret; for (uint256 i = 0; i < n; i++) { - (ret, offset) = extract_element_until(src, offset, hex"0a"); + (ret, offset) = extractElementUntil(src, offset, hex"0a"); parts[i] = string(ret); offset += 1; } return parts; } - function extract_element_until(bytes memory src, uint256 offset, bytes32 b) + function extractElementUntil(bytes memory src, uint256 offset, bytes32 b) internal pure returns (bytes memory, uint256) diff --git a/test/LCPCommitmentTest.t.sol b/test/LCPCommitmentTest.t.sol index 006bb6f..b7cd32f 100644 --- a/test/LCPCommitmentTest.t.sol +++ b/test/LCPCommitmentTest.t.sol @@ -14,12 +14,12 @@ contract LCPCommitmentTest is BasicTest { LCPCommitment.TrustingPeriodContext(1692489600000000000, 1692489600000000000, 1, 1), 1692489600000000000 ); - vm.expectRevert(bytes("out of trusting period")); + vm.expectRevert(LCPCommitment.LCPCommtimentTrustingPeriodContextOutOfTrustingPeriod.selector); LCPCommitmentTestHelper.trustingPeriodContextEval( LCPCommitment.TrustingPeriodContext(1692489599999999999, 1692489599999999998, 1, 0), 1692489600000000000 ); - vm.expectRevert(bytes("out of trusting period")); + vm.expectRevert(LCPCommitment.LCPCommtimentTrustingPeriodContextOutOfTrustingPeriod.selector); LCPCommitmentTestHelper.trustingPeriodContextEval( LCPCommitment.TrustingPeriodContext(1692489599999999999, 1692489599999999998, 2, 0), 1692489600000000000 ); @@ -29,12 +29,12 @@ contract LCPCommitmentTest is BasicTest { LCPCommitment.TrustingPeriodContext(1692489599999999999, 1692489599999999998, 3, 0), 1692489600000000000 ); - vm.expectRevert(bytes("header is from the future")); + vm.expectRevert(LCPCommitment.LCPCommitmentTrustingPeriodHeaderFromFuture.selector); LCPCommitmentTestHelper.trustingPeriodContextEval( LCPCommitment.TrustingPeriodContext(1692489600000000001, 1692489600000000000, 1, 0), 1692489600000000000 ); - vm.expectRevert(bytes("header is from the future")); + vm.expectRevert(LCPCommitment.LCPCommitmentTrustingPeriodHeaderFromFuture.selector); LCPCommitmentTestHelper.trustingPeriodContextEval( LCPCommitment.TrustingPeriodContext(1692489600000000001, 1692489600000000000, 1, 1), 1692489600000000000 ); diff --git a/test/ReportTest.t.sol b/test/ReportTest.t.sol index 09b6de5..7fbbf46 100644 --- a/test/ReportTest.t.sol +++ b/test/ReportTest.t.sol @@ -9,46 +9,43 @@ import "./TestHelper.t.sol"; contract ReportTest is BasicTest { struct TestCase { string path; - address addr; - string timestamp; bool verifyError; + address enclaveKey; + address operator; } - mapping(string => uint256) internal allowedQuoteStatuses; - mapping(string => uint256) internal allowedAdvisories; + AVRValidator.ReportAllowedStatus internal allowedStatuses; mapping(string => uint256) internal allowedAdvisoriesForValidateAdvisories; TestCase[] internal cases; function setUp() public { - // TODO add more cases - // valid cases cases.push( TestCase({ - path: "./test/data/reports/valid/avr-01", - addr: 0x4D165CB1BEEDA5fAF1713A5C212007be2a53D97B, - timestamp: "2022-12-01T09:49:53.473230", - verifyError: false + path: "./test/data/reports/valid/001-avr", + verifyError: false, + enclaveKey: 0x836Fec0cC99Ed0242ed02fBAAb648652B2372E41, + operator: address(0) }) ); cases.push( TestCase({ - path: "./test/data/reports/valid/avr-02", - addr: 0xa3ED9460b7C564Ca7487c0CD2DD5584a1C76f5Fa, - timestamp: "2022-12-05T02:01:12.282060", - verifyError: false + path: "./test/data/reports/valid/002-avr", + verifyError: false, + enclaveKey: 0xC9f79d5de52dbe84120055FF286642C5c328466e, + operator: 0xcb96F8d6C2d543102184d679D7829b39434E4EEc }) ); // invalid cases cases.push( TestCase({ - path: "./test/data/reports/invalid/avr-01", - addr: address(0), - timestamp: "2022-12-01T09:49:53.473230", - verifyError: true + path: "./test/data/reports/invalid/001-avr", + verifyError: true, + enclaveKey: address(0), + operator: address(0) }) ); } @@ -80,9 +77,10 @@ contract ReportTest is BasicTest { } else { require(ok, "failed to verify report"); } - (address signer,,) = - AVRValidator.validateAndExtractElements(true, report, allowedQuoteStatuses, allowedAdvisories); - require(c.addr == signer, "unexpected signer"); + AVRValidator.ReportExtractedElements memory reElem = + AVRValidator.validateAndExtractElements(true, report, allowedStatuses); + require(c.enclaveKey == reElem.enclaveKey, "enclave key mismatch"); + require(c.operator == reElem.operator, "operator mismatch"); } } @@ -93,25 +91,14 @@ contract ReportTest is BasicTest { continue; } bytes memory report = readReport(c.path); - try AVRValidator.validateAndExtractElements(false, report, allowedQuoteStatuses, allowedAdvisories) - returns (address, bytes memory, bytes32) { - require(false, "An AVR for debug enclave must be disallowed"); + try AVRValidator.validateAndExtractElements(false, report, allowedStatuses) returns ( + AVRValidator.ReportExtractedElements memory + ) { + revert("An AVR for debug enclave must be disallowed"); } catch (bytes memory) {} } } - function testTimestampParsing() public view { - // TODO add tests for DateUtils - for (uint256 i = 0; i < cases.length; i++) { - TestCase storage c = cases[i]; - if (c.verifyError) { - continue; - } - uint256 timestamp = TestLCPUtils.attestationTimestampToSeconds(bytes(c.timestamp)); - console.log(timestamp); - } - } - function testValidateAdvisories() public { uint256 offset; @@ -139,9 +126,9 @@ contract ReportTest is BasicTest { } function initAllowedStatusAdvisories(string memory quoteStatus, string[] memory advisories) internal { - allowedQuoteStatuses[quoteStatus] = AVRValidator.FLAG_ALLOWED; + allowedStatuses.allowedQuoteStatuses[quoteStatus] = AVRValidator.FLAG_ALLOWED; for (uint256 i = 0; i < advisories.length; i++) { - allowedAdvisories[advisories[i]] = AVRValidator.FLAG_ALLOWED; + allowedStatuses.allowedAdvisories[advisories[i]] = AVRValidator.FLAG_ALLOWED; } } diff --git a/test/TestHelper.t.sol b/test/TestHelper.t.sol index 45f3d60..068f424 100644 --- a/test/TestHelper.t.sol +++ b/test/TestHelper.t.sol @@ -3,9 +3,11 @@ pragma solidity ^0.8.12; import "forge-std/Test.sol"; import "forge-std/StdJson.sol"; +import "@openzeppelin/contracts/utils/Strings.sol"; import "../contracts/AVRValidator.sol"; import "../contracts/LCPUtils.sol"; import "../contracts/LCPCommitment.sol"; +import "../contracts/LCPOperator.sol"; abstract contract BasicTest is Test { using stdJson for string; @@ -41,6 +43,41 @@ abstract contract BasicTest is Test { string memory data = abi.decode(vm.parseJson(json, firstFilter), (string)); return data.readStringArray(secondFilter); } + + function newCommitmentProofs(bytes memory message, bytes memory signature) + internal + pure + returns (LCPCommitment.CommitmentProofs memory) + { + LCPCommitment.CommitmentProofs memory commitmentProofs; + commitmentProofs.message = message; + commitmentProofs.signatures = new bytes[](1); + commitmentProofs.signatures[0] = signature; + return commitmentProofs; + } + + function createWallets(uint256 count) internal returns (Vm.Wallet[] memory) { + Vm.Wallet[] memory wallets = new Vm.Wallet[](count); + for (uint256 i = 0; i < count; i++) { + wallets[i] = vm.createWallet(string(abi.encodePacked("wallet-", Strings.toString(i)))); + } + sort(wallets); + return wallets; + } + + function sort(Vm.Wallet[] memory wallets) internal pure { + for (uint256 i = 0; i < wallets.length; i++) { + for (uint256 j = i + 1; j < wallets.length; j++) { + if (wallets[i].addr > wallets[j].addr) { + (wallets[i], wallets[j]) = (wallets[j], wallets[i]); + } + } + } + } + + function generateClientId(uint64 clientCounter) internal pure returns (string memory) { + return string(abi.encodePacked("lcp-", Strings.toString(clientCounter))); + } } library TestLCPUtils { @@ -79,12 +116,12 @@ library LCPCommitmentTestHelper { return LCPCommitment.parseUpdateStateProxyMessage(commitmentBytes); } - function parseVerifyMembershipCommitmentProof(bytes calldata proofBytes) + function parseVerifyMembershipCommitmentProofs(bytes calldata proofBytes) public pure - returns (LCPCommitment.CommitmentProof memory, LCPCommitment.VerifyMembershipProxyMessage memory) + returns (LCPCommitment.CommitmentProofs memory, LCPCommitment.VerifyMembershipProxyMessage memory) { - return LCPCommitment.parseVerifyMembershipCommitmentProof(proofBytes); + return LCPCommitment.parseVerifyMembershipCommitmentProofs(proofBytes); } function parseMisbehaviourProxyMessage(bytes calldata messageBytes) @@ -95,3 +132,23 @@ library LCPCommitmentTestHelper { return LCPCommitment.parseMisbehaviourProxyMessage(messageBytes); } } + +library LCPOperatorTestHelper { + function computeEIP712UpdateOperators( + uint256 chainId, + address verifyingContract, + string calldata clientId, + uint64 nonce, + address[] memory newOperators, + uint64 thresholdNumerator, + uint64 thresholdDenominator + ) public pure returns (bytes memory) { + return LCPOperator.computeEIP712UpdateOperators( + chainId, verifyingContract, clientId, nonce, newOperators, thresholdNumerator, thresholdDenominator + ); + } + + function computeEIP712RegisterEnclaveKey(bytes calldata avr) public pure returns (bytes memory) { + return LCPOperator.computeEIP712RegisterEnclaveKey(avr); + } +} diff --git a/test/data/client/01/001-avr b/test/data/client/01/001-avr index bc9ce0a..78b99c1 100644 --- a/test/data/client/01/001-avr +++ b/test/data/client/01/001-avr @@ -1 +1 @@ -{"avr":"{\"id\":\"330625823188211437161781110585785244079\",\"timestamp\":\"2023-12-21T06:30:12.341149\",\"version\":4,\"advisoryURL\":\"https://security-center.intel.com\",\"advisoryIDs\":[\"INTEL-SA-00219\",\"INTEL-SA-00289\",\"INTEL-SA-00334\",\"INTEL-SA-00477\",\"INTEL-SA-00614\",\"INTEL-SA-00615\",\"INTEL-SA-00617\",\"INTEL-SA-00828\"],\"isvEnclaveQuoteStatus\":\"GROUP_OUT_OF_DATE\",\"platformInfoBlob\":\"1502006504000F00001010020202800E0000000000000000000D00000C000000020000000000000BF193B02281C0DFC7B397284110F71336B22F41068F5952F0D64A109B6ED77DFDEF652D080491972312C63762FE3BF3CEF3D259AE5B182A3A6D2FBD8547839D4804\",\"isvEnclaveQuoteBody\":\"AgAAAPELAAALAAoAAAAAALCbZcb+Fr6JI5sV5pIlYVtH4lg+B6q3MfguKDhS0vqMDg7//wKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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ZlDvx0+NdO0LR+5pFy+juM0wWbu59MvzcmTXbjsi7HY6zd53Yq5K244fwFHRQ8eOB0IWB+4PfM7FeAApZvlfqlKOlLcZL2uyVmzRkyR5yW72uo9mehX44CiPJ2fse9Y6eQtcfEhMPkmHXI01sN+KwPbpA39+xOsStjhP9N1Y1a2tQAVo+yVgLgV2Hws73Fc0o3wC78qPEA+v2aRs/Be3ZFDgDyghc/1fgU+7C+P6kbqd4poyb6IW8KCJbxfMJvkordNOgOUUxndPHEi/tb/U7uLjLOgPA==","mrenclave":"+fK0ja5puvlYIKBB2xKg/LVGECoG/R9EfP04/qK1l0E=","enclave_key":"W3b459/s/mzuc3gaQ+LfIsre6bs="} \ No newline at end of file +{"avr":"{\"id\":\"82305734235721330313258195182452685352\",\"timestamp\":\"2024-06-15T14:54:05.076187\",\"version\":4,\"advisoryURL\":\"https://security-center.intel.com\",\"advisoryIDs\":[\"INTEL-SA-00219\",\"INTEL-SA-00289\",\"INTEL-SA-00334\",\"INTEL-SA-00477\",\"INTEL-SA-00614\",\"INTEL-SA-00615\",\"INTEL-SA-00617\",\"INTEL-SA-00828\"],\"isvEnclaveQuoteStatus\":\"GROUP_OUT_OF_DATE\",\"platformInfoBlob\":\"1502006504000F00001010020202800E0000000000000000000D00000C000000020000000000000BF15E27AE7DBEA372B58C8E7EA55F29162D44A3BD9FED427495B88F7285714A5D40C28003908ACCED63BB0A84F0F51666B4E1567933ADCD1225CB3E4A7442556CCB\",\"isvEnclaveQuoteBody\":\"AgAAAPELAAALAAoAAAAAALCbZcb+Fr6JI5sV5pIlYVvGLswAqzmOjdUyk842m+GFDg7//wKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAHAAAAAAAAANUJe3YpwAPB/0ZYGkZAHUP0Qdq5GTQBcols6dUKNfCtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACD1xnnferKFHD2uvYqTXdDA8iZ22kC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OsStjhP9N1Y1a2tQAVo+yVgLgV2Hws73Fc0o3wC78qPEA+v2aRs/Be3ZFDgDyghc/1fgU+7C+P6kbqd4poyb6IW8KCJbxfMJvkordNOgOUUxndPHEi/tb/U7uLjLOgPA==","mrenclave":"1Ql7dinAA8H/RlgaRkAdQ/RB2rkZNAFyiWzp1Qo18K0=","enclave_key":"g2/sDMme0CQu0C+6q2SGUrI3LkE="} \ No newline at end of file diff --git a/test/data/client/01/002-init_client_input b/test/data/client/01/002-init_client_input index a95b5c9..83a3e9a 100644 --- a/test/data/client/01/002-init_client_input +++ b/test/data/client/01/002-init_client_input @@ -1 +1 @@ -{"any_client_state":{"type_url":"/ibc.lightclients.tendermint.v1.ClientState","value":"CgVpYmMtMRIECAEQAxoECIDqSSIECIDfbioCCAUyADoECAEQLkIZCgkIARgBIAEqAQASDAoCAAEQIRgEIAwwAUIZCgkIARgBIAEqAQASDAoCAAEQIBgBIAEwAUoHdXBncmFkZUoQdXBncmFkZWRJQkNTdGF0ZVABWAE="},"any_consensus_state":{"type_url":"/ibc.lightclients.tendermint.v1.ConsensusState","value":"CgsI77aPrAYQqNb2AhIiCiB8tDeTLveaEJ/AsiK3f+QPoYYA03FFNMCRgT/SbH9aABogpi9y+Zhm8LdpL4wY8ldm4EtQC0CcMFcwo7OUTUxHilo="},"current_timestamp":1703140212} \ No newline at end of file +{"any_client_state":{"type_url":"/ibc.lightclients.tendermint.v1.ClientState","value":"CgVpYmMtMRIECAEQAxoECIDqSSIECIDfbioCCAUyADoECAEQLUIZCgkIARgBIAEqAQASDAoCAAEQIRgEIAwwAUIZCgkIARgBIAEqAQASDAoCAAEQIBgBIAEwAUoHdXBncmFkZUoQdXBncmFkZWRJQkNTdGF0ZVABWAE="},"any_consensus_state":{"type_url":"/ibc.lightclients.tendermint.v1.ConsensusState","value":"CgwIhta2swYQ9LSIjgMSIgoghKeEP5UnWxmmaXwvFbl2RmZcJA9gVYky7RaxI/vK+lYaIJfgLoPWFkA7g0qavp1IqzRTioK7HtIy0+Ph36HcSWfq"},"current_timestamp":1718463245} \ No newline at end of file diff --git a/test/data/client/01/002-init_client_result b/test/data/client/01/002-init_client_result index 81073dd..a1f6715 100644 --- a/test/data/client/01/002-init_client_result +++ b/test/data/client/01/002-init_client_result @@ -1 +1 @@ -{"client_id":"07-tendermint-0","proof":{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC6nAYWO0hUoqqJeEyMuYT4Ln0cPh3afoUkY1axMWdma+QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABeixP6hSUEoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKkKKy9pYmMubGlnaHRjbGllbnRzLnRlbmRlcm1pbnQudjEuQ2xpZW50U3RhdGUSegoFaWJjLTESBAgBEAMaBAiA6kkiBAiA324qAggFMgA6BAgBEC1CGQoJCAEYASABKgEAEgwKAgABECEYBCAMMAFCGQoJCAEYASABKgEAEgwKAgABECAYASABMAFKB3VwZ3JhZGVKEHVwZ3JhZGVkSUJDU3RhdGVQAVgBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","signature":""}} \ No newline at end of file diff --git a/test/data/client/01/003-update_client_input b/test/data/client/01/003-update_client_input new file mode 100644 index 0000000..c1303bf --- /dev/null +++ b/test/data/client/01/003-update_client_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CscECosDCgIICxIFaWJjLTEYLyIMCIjWtrMGEO7YiJUDKkgKIBxFd2TfyPR73hw4kKqJUuxSkgdPrE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uMw=="},"include_state":true,"current_timestamp":1718463245} \ No newline at end of file diff --git a/test/data/client/01/004-update_client_result b/test/data/client/01/003-update_client_result similarity index 65% rename from test/data/client/01/004-update_client_result rename to test/data/client/01/003-update_client_result index 0f86be4..76a4047 100644 --- a/test/data/client/01/004-update_client_result +++ b/test/data/client/01/003-update_client_result @@ -1 +1 @@ -{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC6nAYWO0hUoqqJeEyMuYT4Ln0cPh3afoUkY1axMWdma+QAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC99iCrwlcJHKT6IMR5oJB4hkkkzrUeMKdC/Qr8ycujdQQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABeixP7dg7H2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAABeixP7dg7H2AAAAAAAAAAAXosT+oUlBK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ature":"NAkrv4Kgj6oTDkNlz2jcszji3fT72Ofv9SL4Y+IGfAIpIvoCtfMyimPvCBp/t8SdMjq1w2OdIFf438N0rc7sdwE="} \ No newline at end of file diff --git a/test/data/client/01/004-update_client_input b/test/data/client/01/004-update_client_input deleted file mode 100644 index 056969f..0000000 --- a/test/data/client/01/004-update_client_input +++ /dev/null @@ -1 +0,0 @@ -{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CsUECooDCgIICxIFaWJjLTEYLyILCPC2j6wGEPaj9QcqSAogF1pOaCrO9y2GwPHL71PNkiTXcN6qAfrpE4gx82xFxd0SJAgBEiCoq0GNy8uOqh+Jvw5zyrk2k473TAmh8ldZqVzZvW7dGTIg3tb6La4ctKiHogb8eqKnvpPyIURuBRrMXw4dvC6hFY06IOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVQiCmL3L5mGbwt2kvjBjyV2bgS1ALQJwwVzCjs5RNTEeKWkogpi9y+Zhm8LdpL4wY8ldm4EtQC0CcMFcwo7OUTUxHilpSIASAkbx93Cg/d7+/kdc8RNpYw9+KnLyGdAXYt/ParaIvWiAl+3CZjvk8xR52R9GoJ6LL8Iwi5TjslvvdB2Vv+d0QJ2Ig47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFVqIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVchRawLgGWG1pLdfPCYO55USxBAExtBK1AQgvGkgKIBKP0FMVZIRejeTmPGmECqkQ4ZzjIbuh4NvX0ZB0Z0v0EiQIARIgN2BOzLRp3xVohc6RnGXun31RyMB/v3eMQdXzZemAPjciZwgCEhRawLgGWG1pLdfPCYO55USxBAExtBoLCPG2j6wGEMrf+wsiQDMMTh9XHjCRjMIP6B8F+VGreQDGwp6ss8sQnYNQrTF6dbz7ipemCX9s2PnPtpMbh0vnle9jcHSN4PhbgZS54QASjQEKQQoUWsC4BlhtaS3XzwmDueVEsQQBMbQSIgogrbwKfO9VKocAjqzlmVnaLUmQc7gr38oIl/mkFoTeczIY8aSL+qkvEkEKFFrAuAZYbWkt188Jg7nlRLEEATG0EiIKIK28CnzvVSqHAI6s5ZlZ2i1JkHO4K9/KCJf5pBaE3nMyGPGki/qpLxjxpIv6qS8aBAgBEC4ijQEKQQoUWsC4BlhtaS3XzwmDueVEsQQBMbQSIgogrbwKfO9VKocAjqzlmVnaLUmQc7gr38oIl/mkFoTeczIY8aSL+qkvEkEKFFrAuAZYbWkt188Jg7nlRLEEATG0EiIKIK28CnzvVSqHAI6s5ZlZ2i1JkHO4K9/KCJf5pBaE3nMyGPGki/qpLxjxpIv6qS8="},"include_state":true,"current_timestamp":1703140212} \ No newline at end of file diff --git a/test/data/client/01/005-verify_channel_input b/test/data/client/01/004-verify_channel_input similarity index 100% rename from test/data/client/01/005-verify_channel_input rename to test/data/client/01/004-verify_channel_input diff --git a/test/data/client/02/005-verify_channel_result b/test/data/client/01/004-verify_channel_result similarity index 60% rename from test/data/client/02/005-verify_channel_result rename to test/data/client/01/004-verify_channel_result index 8d3b0f3..aecee78 100644 --- a/test/data/client/02/005-verify_channel_result +++ b/test/data/client/01/004-verify_channel_result @@ -1 +1 @@ -{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAQDPV3csDWhTaYEuWzn6Ddv+gA8jQjkgmyXsWQbcAKAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAA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bmRzL3BvcnRzL3RyYW5zZmVyL2NoYW5uZWxzL2NoYW5uZWwtMAAAAAAAAAAAAAAAAAAAAAAAAAA=","signature":"ozhUH1rB0G3y/N5m1YfhQ1JFzRWs+dJ7z12GWBFjaIp9JoQEzAlKfyn3npKAVF20tb7LIfb2Q73sKcTtNvhrlAE="} \ No newline at end of file diff --git a/test/data/client/01/005-update_client_input b/test/data/client/01/005-update_client_input new file mode 100644 index 0000000..0ee8c2f --- /dev/null +++ b/test/data/client/01/005-update_client_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CscECosDCgIICxIFaWJjLTEYMCIMCInWtrMGEO+wopoDKkgKILHl2HVKNZ2Co6BFhDORAuU5jJ0T8mlXAd3fiRQZXw3YEiQIARIg8pPRxy78xqb+zEDJRFb+tjsA9dnu6YcCjg98aNWpU9gyIPYObaYu1bMObzfMVxDY/Ur+JmTzFlYgAMbIklcIgdaAOiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VUIgl+Aug9YWQDuDSpq+nUirNFOKgrse0jLT4+HfodxJZ+pKIJfgLoPWFkA7g0qavp1IqzRTioK7HtIy0+Ph36HcSWfqUiAEgJG8fdwoP3e/v5HXPETaWMPfipy8hnQF2Lfz2q2iL1og5+DLZcBPtKvHCZ0TJveOrnA7WTt6vF9EMxfBIdB766ViIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVaiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VXIUf33DAr2Eh08MPwQc2ATltCSPzigStgEIMBpICiC4/44RlmrfYE4YcVBSWvzhoVtkoURiN1pQHsmxB9W4lRIkCAESIGUk+/n5tpixThfJ9g1vg6EaA+QtNJP6OaIgQL0wjs1KImgIAhIUf33DAr2Eh08MPwQc2ATltCSPzigaDAiK1razBhCqoa2fAyJAx72s+fxPF0Y2vFZDbMAjcuGsdEZ5zMvqNWWPlEEMHKDzEgFuacTY+mtLyYTYQvVt3xMqiaonDnx5IpEcCwgyDhKNAQpBChR/fcMCvYSHTww/BBzYBOW0JI/OKBIiCiCLvWZwtXDS52i7aC9LwINYxQ+MIGzAzIfumO7SmtoLSxjmpPue7jMSQQoUf33DAr2Eh08MPwQc2ATltCSPzigSIgogi71mcLVw0udou2gvS8CDWMUPjCBswMyH7pju0praC0sY5qT7nu4zGOak+57uMxoECAEQLyKNAQpBChR/fcMCvYSHTww/BBzYBOW0JI/OKBIiCiCLvWZwtXDS52i7aC9LwINYxQ+MIGzAzIfumO7SmtoLSxjmpPue7jMSQQoUf33DAr2Eh08MPwQc2ATltCSPzigSIgogi71mcLVw0udou2gvS8CDWMUPjCBswMyH7pju0praC0sY5qT7nu4zGOak+57uMw=="},"include_state":true,"current_timestamp":1718463245} \ No newline at end of file diff --git a/test/data/client/01/007-update_client_result b/test/data/client/01/005-update_client_result similarity index 65% rename from test/data/client/01/007-update_client_result rename to test/data/client/01/005-update_client_result index 4079110..f9cff5d 100644 --- a/test/data/client/01/007-update_client_result +++ b/test/data/client/01/005-update_client_result @@ -1 +1 @@ -{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC99iCrwlcJHKT6IMR5oJB4hkkkzrUeMKdC/Qr8ycujdQQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkKox/pcJTFfumx9X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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACpCisvaWJjLmxpZ2h0Y2xpZW50cy50ZW5kZXJtaW50LnYxLkNsaWVudFN0YXRlEnoKBWliYy0xEgQIARADGgQIgOpJIgQIgN9uKgIIBTIAOgQIARAwQhkKCQgBGAEgASoBABIMCgIAARAhGAQgDDABQhkKCQgBGAEgASoBABIMCgIAARAgGAEgATABSgd1cGdyYWRlShB1cGdyYWRlZElCQ1N0YXRlUAFYAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","signature":"ybWr5VWNvSlKQrPsra2WaIjhBcfCvEAiNQnmoG6Nuph5AR/Jw3yiDFMKaBjOqCyzQrsT6x/SzjzDFmWorVAlPgA="} \ No newline at end of file diff --git a/test/data/client/01/006-verify_packet_input b/test/data/client/01/006-verify_packet_input new file mode 100644 index 0000000..e518ac4 --- /dev/null +++ b/test/data/client/01/006-verify_packet_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","prefix":"aWJj","path":"commitments/ports/transfer/channels/channel-0/sequences/1","value":"33m+ua3ISGDkIGqi3rV/kaNgVmL6OK3dG8+qNm6G48w="} \ No newline at end of file diff --git a/test/data/client/01/006-verify_packet_result b/test/data/client/01/006-verify_packet_result new file mode 100644 index 0000000..1d08413 --- /dev/null +++ b/test/data/client/01/006-verify_packet_result @@ -0,0 +1 @@ +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQD0el1HrvzDVQWHYwzNOdQCU+rfS4WGly0MHRn7Ue2i7AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBfs4gt9tlk1hNiu0D+N1PDG1I8mBVGRvKD1dtBsUcKHgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADaWJjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOWNvbW1pdG1lbnRzL3BvcnRzL3RyYW5zZmVyL2NoYW5uZWxzL2NoYW5uZWwtMC9zZXF1ZW5jZXMvMQAAAAAAAAA=","signature":"zPeRRkd+45vBeLJbdqUIhZQ5L75H9Ej/uh647EgFcnw1ucHI+j7EqmURdkGotZ6P7WWORjjPtXACXi6CgIaniwA="} \ No newline at end of file diff --git a/test/data/client/01/007-update_client_input b/test/data/client/01/007-update_client_input deleted file mode 100644 index 802dcb0..0000000 --- a/test/data/client/01/007-update_client_input +++ /dev/null @@ -1 +0,0 @@ -{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CsUECooDCgIICxIFaWJjLTEYMCILCPG2j6wGEMrf+wsqSAogEo/QUxVkhF6N5OY8aYQKqRDhnOMhu6Hg29fRkHRnS/QSJAgBEiA3YE7MtGnfFWiFzpGcZe6ffVHIwH+/d4xB1fNl6YA+NzIguuXWSbYuHCArC2EnYJH1qkoPsN1Ycnbu6uZsksG4SZk6IOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVQiCmL3L5mGbwt2kvjBjyV2bgS1ALQJwwVzCjs5RNTEeKWkogpi9y+Zhm8LdpL4wY8ldm4EtQC0CcMFcwo7OUTUxHilpSIASAkbx93Cg/d7+/kdc8RNpYw9+KnLyGdAXYt/ParaIvWiCDnPfKWRgtgfahm94EFTKW8bWn6/nRb5J5Df2lyO+DlmIg47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFVqIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVchRawLgGWG1pLdfPCYO55USxBAExtBK1AQgwGkgKID4PpbGZhMnuckEilA69FBZhjS/Fp2AhvcCanR+zvb7hEiQIARIg7INRjEppMgGktE/KXRVdLWdeT4ZsAkn3CeglW8ifYsEiZwgCEhRawLgGWG1pLdfPCYO55USxBAExtBoLCPK2j6wGEM6w+A8iQPW1AbkSKAqqT1cNT/AX/iAStg5jEBwG0DaASIRzTqIOY6yhA1CXLDMlIfz5lBnsW5JjxrDssUSS03BTo2bwUw8SjQEKQQoUWsC4BlhtaS3XzwmDueVEsQQBMbQSIgogrbwKfO9VKocAjqzlmVnaLUmQc7gr38oIl/mkFoTeczIY8aSL+qkvEkEKFFrAuAZYbWkt188Jg7nlRLEEATG0EiIKIK28CnzvVSqHAI6s5ZlZ2i1JkHO4K9/KCJf5pBaE3nMyGPGki/qpLxjxpIv6qS8aBAgBEC8ijQEKQQoUWsC4BlhtaS3XzwmDueVEsQQBMbQSIgogrbwKfO9VKocAjqzlmVnaLUmQc7gr38oIl/mkFoTeczIY8aSL+qkvEkEKFFrAuAZYbWkt188Jg7nlRLEEATG0EiIKIK28CnzvVSqHAI6s5ZlZ2i1JkHO4K9/KCJf5pBaE3nMyGPGki/qpLxjxpIv6qS8="},"include_state":true,"current_timestamp":1703140212} \ No newline at end of file diff --git a/test/data/client/01/009-verify_packet_receipt_absence_input b/test/data/client/01/007-verify_packet_receipt_absence_input similarity index 100% rename from test/data/client/01/009-verify_packet_receipt_absence_input rename to test/data/client/01/007-verify_packet_receipt_absence_input diff --git a/test/data/client/01/009-verify_packet_receipt_absence_result b/test/data/client/01/007-verify_packet_receipt_absence_result similarity index 60% rename from test/data/client/01/009-verify_packet_receipt_absence_result rename to test/data/client/01/007-verify_packet_receipt_absence_result index 6347077..d56e84f 100644 --- a/test/data/client/01/009-verify_packet_receipt_absence_result +++ b/test/data/client/01/007-verify_packet_receipt_absence_result @@ -1 +1 @@ -{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkKox/pcJTFfumx9XsffXtVodRKiFXmrxi7RLXq25keAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADaWJjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANnJlY2VpcHRzL3BvcnRzL3RyYW5zZmVyL2NoYW5uZWxzL2NoYW5uZWwtMC9zZXF1ZW5jZXMvMgAAAAAAAAAAAAA=","signer":"W3b459/s/mzuc3gaQ+LfIsre6bs=","signature":"QgDj+Wh9W4XQXjT8Zv0CzH3kA1YBA0/3RkFPMIslqm9NcekqmnhuuEcc2Nw42CICKUdd7u880TDBc61ANr/DNwE="} \ No newline at end of file +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBfs4gt9tlk1hNiu0D+N1PDG1I8mBVGRvKD1dtBsUcKHgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADaWJjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANnJlY2VpcHRzL3BvcnRzL3RyYW5zZmVyL2NoYW5uZWxzL2NoYW5uZWwtMC9zZXF1ZW5jZXMvMgAAAAAAAAAAAAA=","signature":"V21Iqg6GS5xoHcovwARAQaX1NQI71V85ROYcpT1+BLAuavm+70gTOZevSc9S297lR/lujw53QHB/6oBkmbNdYQA="} \ No newline at end of file diff --git a/test/data/client/01/008-verify_packet_input b/test/data/client/01/008-verify_packet_input deleted file mode 100644 index e4ef9d3..0000000 --- a/test/data/client/01/008-verify_packet_input +++ /dev/null @@ -1 +0,0 @@ -{"client_id":"07-tendermint-0","prefix":"aWJj","path":"commitments/ports/transfer/channels/channel-0/sequences/1","value":"LN+ay84wH5YmxuWifVybCXVpshzrQN/jR03ceeuA160="} \ No newline at end of file diff --git a/test/data/client/01/008-verify_packet_result b/test/data/client/01/008-verify_packet_result deleted file mode 100644 index 3d50e36..0000000 --- a/test/data/client/01/008-verify_packet_result +++ /dev/null @@ -1 +0,0 @@ -{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAx+T5VhP4HZ7l0JXLkvhP6Crn7YfY6Jyy1kUQXVxSf+gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADBkKox/pcJTFfumx9XsffXtVodRKiFXmrxi7RLXq25keAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADaWJjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOWNvbW1pdG1lbnRzL3BvcnRzL3RyYW5zZmVyL2NoYW5uZWxzL2NoYW5uZWwtMC9zZXF1ZW5jZXMvMQAAAAAAAAA=","signer":"W3b459/s/mzuc3gaQ+LfIsre6bs=","signature":"S+DGopIWuMF2njLrtM8J8jWZcZmK+56MMhAwwQIb6qE/7mttoJIV5huSYgVijpcUmDDh5UfrjB/VNOa+wl0p3gE="} \ No newline at end of file diff --git a/test/data/client/02/001-avr b/test/data/client/02/001-avr index 05e1083..45ece08 100644 --- a/test/data/client/02/001-avr +++ b/test/data/client/02/001-avr @@ -1 +1 @@ -{"avr":"{\"id\":\"23856791181030202675484781740313693463\",\"timestamp\":\"2023-12-21T05:54:19.753000\",\"version\":4,\"advisoryURL\":\"https://security-center.intel.com\",\"advisoryIDs\":[],\"isvEnclaveQuoteStatus\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kFL49enpDXnCRbd1yJtZZXwe17cItDRNB7k6GrpibuLFfbd2goYR/Rv+lCY/sR5IFwrKuWoxwTvd7pIzYbl9oRurbvpU3srCvNOkQO1oPxP6PpwuScpx7KCha3QtKrJfMGOQ/siGUXMiseT8hQAj5P4DaPV6xFTbYqHEUx6uW5vFzv5QPhCd6Xh3MeUz6Xw2UMbpR2JahkrSM=","mrenclave":"DOetIjopCp0NrdPb2KetYmWX6nLRbVqT5m17LF15YWc=","enclave_key":"MCMgOzwSnCCtN5mIA7VoE31FZqw="} \ No newline at end of file +{"avr":"{\"id\":\"23856791181030202675484781740313693463\",\"timestamp\":\"2024-06-15T14:18:10.991000\",\"version\":4,\"advisoryURL\":\"https://security-center.intel.com\",\"advisoryIDs\":[],\"isvEnclaveQuoteStatus\":\"OK\",\"platformInfoBlob\":null,\"isvEnclaveQuoteBody\":\"AgAAAAsAAADvAO8A7+/v7wAAAAAAAAAAAAAAAAAAAAD88GGOWVm9tJeKlaG1vU9iSCDzN2rmsvIDTTt6S0ineAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAHAAAAAAAAADKAwI4ZtU0VypJeCmwT/tr/Kv9sCX+ThBq9jZ4aMHK4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACD1xnnferKFHD2uvYqTXdDA8iZ22kCD5xw7h38CMfOngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB/8m98CXsYwZVcvhtjz7kn7wN+2YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"}","signature":"KK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lOTFbUUSjXgL6rN2GQD5Dtso5fTwj2ukVmYYumfjctvFj1KJ1c/3Vx9291d8dmBQNxFZ+eleeGOPZKpgrKEj79WGTE1oHqApxBPbwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBgQC39YvP2YVKBbODxkdMG4FQRSAcywdml2GY+ah67sbLF/34i64JzvahLaWo+gl091ivkkUa//fgvGj/BBQq7oLmEJ1K8jsHWR8F3NYQHHSIIf8+vgpqGyox8miwZMrbVkMqIlxiqPnDcLWhiRfeXcwqc3qlfPgtHfGPx3YHlUXZTQLWNffBXXWYxPz5DX5OeMJjlV1VxFd+3xrNltR4klSrGrQLRqyZe7r5AndZ3b9g86xN7eospyhoAGtSOLw0Ml7j3F4zVXkhoPYTVayhi3q71r4AqfaLLdbYGaXMhezqo51l06iRaMkFL49enpDXnCRbd1yJtZZXwe17cItDRNB7k6GrpibuLFfbd2goYR/Rv+lCY/sR5IFwrKuWoxwTvd7pIzYbl9oRurbvpU3srCvNOkQO1oPxP6PpwuScpx7KCha3QtKrJfMGOQ/siGUXMiseT8hQAj5P4DaPV6xFTbYqHEUx6uW5vFzv5QPhCd6Xh3MeUz6Xw2UMbpR2JahkrSM=","mrenclave":"MoDAjhm1TRXKkl4KbBP+2v8q/2wJf5OEGr2Nnhowcrg=","enclave_key":"/8m98CXsYwZVcvhtjz7kn7wN+2Y="} \ No newline at end of file diff --git a/test/data/client/02/002-init_client_input b/test/data/client/02/002-init_client_input index f51a74d..e3b8338 100644 --- a/test/data/client/02/002-init_client_input +++ b/test/data/client/02/002-init_client_input @@ -1 +1 @@ -{"any_client_state":{"type_url":"/ibc.lightclients.tendermint.v1.ClientState","value":"CgVpYmMtMRIECAEQAxoECIDqSSIECIDfbioCCAUyADoECAEQLUIZCgkIARgBIAEqAQASDAoCAAEQIRgEIAwwAUIZCgkIARgBIAEqAQASDAoCAAEQIBgBIAEwAUoHdXBncmFkZUoQdXBncmFkZWRJQkNTdGF0ZVABWAE="},"any_consensus_state":{"type_url":"/ibc.lightclients.tendermint.v1.ConsensusState","value":"CgsIiqaPrAYQiNPFPBIiCiA0Y+WdrO3MFZQKDkpDHCCA5C7+AZnCUfUXJpTmQVJqtRogm3cpTWpWZE9oHhorJSlu+G/hXcnHRPtPeNtcpT9oR+c="},"current_timestamp":1703138059} \ No newline at end of file +{"any_client_state":{"type_url":"/ibc.lightclients.tendermint.v1.ClientState","value":"CgVpYmMtMRIECAEQAxoECIDqSSIECIDfbioCCAUyADoECAEQMUIZCgkIARgBIAEqAQASDAoCAAEQIRgEIAwwAUIZCgkIARgBIAEqAQASDAoCAAEQIBgBIAEwAUoHdXBncmFkZUoQdXBncmFkZWRJQkNTdGF0ZVABWAE="},"any_consensus_state":{"type_url":"/ibc.lightclients.tendermint.v1.ConsensusState","value":"CgwIn8W2swYQi/WutAMSIgoge+/X9K+WPUXwLuPL0rdWFvUTy4zziAMRwyVDf1B+k0UaIN+0pucF4dT7hUiLvOv+H8p44UPyvnYAJktEJRav498p"},"current_timestamp":1718461091} \ No newline at end of file diff --git a/test/data/client/02/002-init_client_result b/test/data/client/02/002-init_client_result index 58545c0..8869b43 100644 --- a/test/data/client/02/002-init_client_result +++ b/test/data/client/02/002-init_client_result @@ -1 +1 @@ -{"client_id":"07-tendermint-0","proof":{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAKkKKy9pYmMubGlnaHRjbGllbnRzLnRlbmRlcm1pbnQudjEuQ2xpZW50U3RhdGUSegoFaWJjLTESBAgBEAMaBAiA6kkiBAiA324qAggFMgA6BAgBEDFCGQoJCAEYASABKgEAEgwKAgABECEYBCAMMAFCGQoJCAEYASABKgEAEgwKAgABECAYASABMAFKB3VwZ3JhZGVKEHVwZ3JhZGVkSUJDU3RhdGVQAVgBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","signature":""}} \ No newline at end of file diff --git a/test/data/client/02/003-update_client_input b/test/data/client/02/003-update_client_input new file mode 100644 index 0000000..4d36ae1 --- /dev/null +++ b/test/data/client/02/003-update_client_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CscECosDCgIICxIFaWJjLTEYMyIMCKHFtrMGEOvp2cgDKkgKIOwyZV+6Japp3vKpvSv5fVcWc62xQs5tWwORP7JoyYoFEiQIARIgiu4ioCSqouTXSZROuJBydDrs+nDxC3JrPVCjPErIMggyIP7gdrOz9m9DSBQHqB6BO2/J8DgYQcLRUNxQzZZ2YN7JOiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VUIg37Sm5wXh1PuFSIu86/4fynjhQ/K+dgAmS0QlFq/j3ylKIN+0pucF4dT7hUiLvOv+H8p44UPyvnYAJktEJRav498pUiAEgJG8fdwoP3e/v5HXPETaWMPfipy8hnQF2Lfz2q2iL1ogZJRMXVKPKAnd/wibpnQ3T/u4CxQiSQg4dP1NzLgi4aBiIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVaiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VXIU0msimKTl62raJaV+H0nF8Q2ouewStgEIMxpICiBblFzw3sac5+BeH64aY2OxSxg4uoN095e7+I7D91m8zRIkCAESIBQIwYV1EOxMtLjZ40NiRSydjxttokxlVx6L2HM0A4NBImgIAhIU0msimKTl62raJaV+H0nF8Q2ouewaDAiixbazBhCN3dfSAyJAPdWdq4RWUtPlhspo6GrXTyJJY3aGwHBrjTWIImqro8UMRvZPqKcYn+HIHI8c0lAaMaZ1dqK1zMNK8cCyvotPARKNAQpBChTSayKYpOXratolpX4fScXxDai57BIiCiBuU4KcdHfIc9IcP1VDNAGW13rfuFyjoeN3aWgdlx6LLBjdkoiIgDgSQQoU0msimKTl62raJaV+H0nF8Q2ouewSIgogblOCnHR3yHPSHD9VQzQBltd637hco6Hjd2loHZceiywY3ZKIiIA4GN2SiIiAOBoECAEQMSKNAQpBChTSayKYpOXratolpX4fScXxDai57BIiCiBuU4KcdHfIc9IcP1VDNAGW13rfuFyjoeN3aWgdlx6LLBjdkoiIgDgSQQoU0msimKTl62raJaV+H0nF8Q2ouewSIgogblOCnHR3yHPSHD9VQzQBltd637hco6Hjd2loHZceiywY3ZKIiIA4GN2SiIiAOA=="},"include_state":true,"current_timestamp":1718461093} \ No newline at end of file diff --git a/test/data/client/02/004-update_client_result b/test/data/client/02/003-update_client_result similarity index 57% rename from test/data/client/02/004-update_client_result rename to test/data/client/02/003-update_client_result index a055c4f..4c57569 100644 --- a/test/data/client/02/004-update_client_result +++ b/test/data/client/02/003-update_client_result @@ -1 +1 @@ -{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC20Rnk82owePlbXKmDJAJKa2H/n/fFJp7Nwcbd4afTrGAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACpCisvaWJjLmxpZ2h0Y2xpZW50cy50ZW5kZXJtaW50LnYxLkNsaWVudFN0YXRlEnoKBWliYy0xEgQIARADGgQIgOpJIgQIgN9uKgIIBTIAOgQIARAzQhkKCQgBGAEgASoBABIMCgIAARAhGAQgDDABQhkKCQgBGAEgASoBABIMCgIAARAgGAEgATABSgd1cGdyYWRlShB1cGdyYWRlZElCQ1N0YXRlUAFYAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","signature":"c8dbOmENmNbglUI/aMvLgUref/55wzm3CUH71waaoOg1abl6trl3ulSp6EuPVjS/wzXrYGOhOA+cE8qa4QVQzAA="} \ No newline at end of file diff --git a/test/data/client/02/004-update_client_input b/test/data/client/02/004-update_client_input deleted file mode 100644 index 4ce7860..0000000 --- a/test/data/client/02/004-update_client_input +++ /dev/null @@ -1 +0,0 @@ -{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CsUECooDCgIICxIFaWJjLTEYLiILCIumj6wGEIjTxTwqSAogfVYRZFyjebZFDrJX7WDHdAvUbKiNICY/R6S0QKSD/+wSJAgBEiD9ptaFAnkfhbbqhzly7YmBC0urPEMSQDvedV+FtP6HcjIgsdBbPfmL7XSEW/xFHW75P8vzQmXtWzsywXlVg1ZENHw6IOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVQiCbdylNalZkT2geGislKW74b+FdycdE+09421ylP2hH50ogm3cpTWpWZE9oHhorJSlu+G/hXcnHRPtPeNtcpT9oR+dSIASAkbx93Cg/d7+/kdc8RNpYw9+KnLyGdAXYt/ParaIvWiA5sifM9eVX/pCto8nrryE/6x9Rz4Bk1iInal5vyk3mhGIg47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFVqIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVchTxZDRoK8l0EWG2lelIdakAKSecwxK1AQguGkgKIIwarW9q3qrQ6cNRtrvXjgQNvNc4lkcZZaFmf1rH3BUpEiQIARIgaMDTnfx6BANZglUclNZ1PL+dGW+h2b8IQKyS6Ui1htEiZwgCEhTxZDRoK8l0EWG2lelIdakAKSecwxoLCIymj6wGEIjTxTwiQPUTLEBI5bFlugDfLFS3ThS9584cWPObWslrQrS6aBSDCQpVTwLDjafApLq0/ICd1KYtgKYS44cOkue1ONC/9g0SjQEKQQoU8WQ0aCvJdBFhtpXpSHWpACknnMMSIgogsdq5TTUhZn22uBTQcnlMEgR3CN2gVRh3SFKLpyb7vskY2LDilZ4vEkEKFPFkNGgryXQRYbaV6Uh1qQApJ5zDEiIKILHauU01IWZ9trgU0HJ5TBIEdwjdoFUYd0hSi6cm+77JGNiw4pWeLxjYsOKVni8aBAgBEC0ijQEKQQoU8WQ0aCvJdBFhtpXpSHWpACknnMMSIgogsdq5TTUhZn22uBTQcnlMEgR3CN2gVRh3SFKLpyb7vskY2LDilZ4vEkEKFPFkNGgryXQRYbaV6Uh1qQApJ5zDEiIKILHauU01IWZ9trgU0HJ5TBIEdwjdoFUYd0hSi6cm+77JGNiw4pWeLxjYsOKVni8="},"include_state":true,"current_timestamp":1703138060} \ No newline at end of file diff --git a/test/data/client/02/005-verify_channel_input b/test/data/client/02/004-verify_channel_input similarity index 100% rename from test/data/client/02/005-verify_channel_input rename to test/data/client/02/004-verify_channel_input diff --git a/test/data/client/01/005-verify_channel_result b/test/data/client/02/004-verify_channel_result similarity index 60% rename from test/data/client/01/005-verify_channel_result rename to test/data/client/02/004-verify_channel_result index f603415..2f62878 100644 --- a/test/data/client/01/005-verify_channel_result +++ b/test/data/client/02/004-verify_channel_result @@ -1 +1 @@ -{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAQDPV3csDWhTaYEuWzn6Ddv+gA8jQjkgmyXsWQbcAKAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC99iCrwlcJHKT6IMR5oJB4hkkkzrUeMKdC/Qr8ycujdQQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADaWJjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALWNoYW5uZWxFbmRzL3BvcnRzL3RyYW5zZmVyL2NoYW5uZWxzL2NoYW5uZWwtMAAAAAAAAAAAAAAAAAAAAAAAAAA=","signer":"W3b459/s/mzuc3gaQ+LfIsre6bs=","signature":"8JYF3xrtsidsg6GARw8ObSlqiDA8awOHYeFUkC9P6JUMze/qx/vzWfx+9ZHGWbVLJdyARjbjRoo0v9wwGuV8ZAE="} \ No newline at end of file +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAQDPV3csDWhTaYEuWzn6Ddv+gA8jQjkgmyXsWQbcAKAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADM0YnceNA+cKP0xuGUKsRE5pqE+c3Bab0xRgVE0tom4iAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADaWJjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALWNoYW5uZWxFbmRzL3BvcnRzL3RyYW5zZmVyL2NoYW5uZWxzL2NoYW5uZWwtMAAAAAAAAAAAAAAAAAAAAAAAAAA=","signature":"3iEqgryg7S00xXplWWtXmXMDqhUeTXvu7gL8EcL/VYg5+HaHOW6sn6QwfIlWwbc0x5CcgUlkeu4Lm+A0C8JzmwA="} \ No newline at end of file diff --git a/test/data/client/02/005-update_client_input b/test/data/client/02/005-update_client_input new file mode 100644 index 0000000..031359d --- /dev/null +++ b/test/data/client/02/005-update_client_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CscECosDCgIICxIFaWJjLTEYNCIMCKLFtrMGEI3d19IDKkgKIFuUXPDexpzn4F4frhpjY7FLGDi6g3T3l7v4jsP3WbzNEiQIARIgFAjBhXUQ7Ey0uNnjQ2JFLJ2PG22iTGVXHovYczQDg0EyIEV4XXuId8AL6CE0b7wy2fmuXyvr14PmZXmaAHxDQGGQOiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VUIg37Sm5wXh1PuFSIu86/4fynjhQ/K+dgAmS0QlFq/j3ylKIN+0pucF4dT7hUiLvOv+H8p44UPyvnYAJktEJRav498pUiAEgJG8fdwoP3e/v5HXPETaWMPfipy8hnQF2Lfz2q2iL1ognhEDcDzMMZlNOrT7AQ/mH3eKzAJixyHmFsoEz6pGFLViIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVaiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VXIU0msimKTl62raJaV+H0nF8Q2ouewStgEINBpICiDbCHUXxKEU/ksytMoi69/jh7QwbIg9Wrrfl06seuAmXRIkCAESID5C0MF78UxW8UMXlLavKSOEoipKXOmKQSDdMvZPqBhNImgIAhIU0msimKTl62raJaV+H0nF8Q2ouewaDAijxbazBhDc7sjbAyJAVzJlzldVmwPCrVzlHas2o+Z83fOnCnY68ejmtwR/c8AQCk8HQTtjXYm1/uOXaq+Z3Hbak40iVrfyShO97KTrChKNAQpBChTSayKYpOXratolpX4fScXxDai57BIiCiBuU4KcdHfIc9IcP1VDNAGW13rfuFyjoeN3aWgdlx6LLBjdkoiIgDgSQQoU0msimKTl62raJaV+H0nF8Q2ouewSIgogblOCnHR3yHPSHD9VQzQBltd637hco6Hjd2loHZceiywY3ZKIiIA4GN2SiIiAOBoECAEQMyKNAQpBChTSayKYpOXratolpX4fScXxDai57BIiCiBuU4KcdHfIc9IcP1VDNAGW13rfuFyjoeN3aWgdlx6LLBjdkoiIgDgSQQoU0msimKTl62raJaV+H0nF8Q2ouewSIgogblOCnHR3yHPSHD9VQzQBltd637hco6Hjd2loHZceiywY3ZKIiIA4GN2SiIiAOA=="},"include_state":true,"current_timestamp":1718461094} \ No newline at end of file diff --git a/test/data/client/02/005-update_client_result b/test/data/client/02/005-update_client_result new file mode 100644 index 0000000..3d5cf40 --- /dev/null +++ b/test/data/client/02/005-update_client_result @@ -0,0 +1 @@ +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAACpCisvaWJjLmxpZ2h0Y2xpZW50cy50ZW5kZXJtaW50LnYxLkNsaWVudFN0YXRlEnoKBWliYy0xEgQIARADGgQIgOpJIgQIgN9uKgIIBTIAOgQIARA0QhkKCQgBGAEgASoBABIMCgIAARAhGAQgDDABQhkKCQgBGAEgASoBABIMCgIAARAgGAEgATABSgd1cGdyYWRlShB1cGdyYWRlZElCQ1N0YXRlUAFYAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","signature":"h9I+Y1Ndu7gOmWoxbQs6HQ1QN6LK/5/qXrRW+/qU4wwdl2PyRFwLIKr6G3kbh93uIe+s5a3Vr4G/uNICzH0ETQA="} \ No newline at end of file diff --git a/test/data/client/02/006-verify_packet_input b/test/data/client/02/006-verify_packet_input new file mode 100644 index 0000000..357afc9 --- /dev/null +++ b/test/data/client/02/006-verify_packet_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","prefix":"aWJj","path":"commitments/ports/transfer/channels/channel-0/sequences/1","value":"8DDlEUFIk4XCnDemETY9nM5JFopD8iu3z5X8qdcakIU="} \ No newline at end of file diff --git a/test/data/client/02/006-verify_packet_result b/test/data/client/02/006-verify_packet_result new file mode 100644 index 0000000..057030e --- /dev/null +++ b/test/data/client/02/006-verify_packet_result @@ -0,0 +1 @@ +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAmuyQCLuuVS7x1nLryzYSvHVgEISa+PqvD+HdCHG0sLgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQlkxlslcws/Rznwft+vehrPA/MhwPciDvroerZZfLKTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADaWJjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOWNvbW1pdG1lbnRzL3BvcnRzL3RyYW5zZmVyL2NoYW5uZWxzL2NoYW5uZWwtMC9zZXF1ZW5jZXMvMQAAAAAAAAA=","signature":"E3oczerfY+q+3HY3oqj/1gWMYCVEYAR7NKz09YGKIYt1hnFUu7o4UETvqHPE6y/ywT/4TL6KvgjVFGesjYnfTgA="} \ No newline at end of file diff --git a/test/data/client/02/007-update_client_input b/test/data/client/02/007-update_client_input deleted file mode 100644 index a7a05b6..0000000 --- a/test/data/client/02/007-update_client_input +++ /dev/null @@ -1 +0,0 @@ -{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CsUECooDCgIICxIFaWJjLTEYLyILCIymj6wGEIjTxTwqSAogjBqtb2reqtDpw1G2u9eOBA281ziWRxlloWZ/WsfcFSkSJAgBEiBowNOd/HoEA1mCVRyU1nU8v50Zb6HZvwhArJLpSLWG0TIgZQLVJpmcQbXehlwCz+GLbMtgDcp4T1QdRXFQbpMYgNE6IOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVQiCbdylNalZkT2geGislKW74b+FdycdE+09421ylP2hH50ogm3cpTWpWZE9oHhorJSlu+G/hXcnHRPtPeNtcpT9oR+dSIASAkbx93Cg/d7+/kdc8RNpYw9+KnLyGdAXYt/ParaIvWiD026JCpTLp9DcM9czhwq1APCqdUCGJH1U+yAjZ9xhyjWIg47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFVqIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVchTxZDRoK8l0EWG2lelIdakAKSecwxK1AQgvGkgKIDl3R20IPGFsO2oLpAcr5GEC4Wbwk/h1mAHachrDKGsjEiQIARIgEqm/D7eHksof2g20f3GX4KsPAi2KnalpGUtYvbftLn0iZwgCEhTxZDRoK8l0EWG2lelIdakAKSecwxoLCI2mj6wGEIjTxTwiQKpPqeFH3Tm8QDBFhOmBUVARpKDJchWxz4jWiZ6ZptgV25qXWtKEVAtpTFI9u/dbe/Z1uRPE8cwXt8PADTKR8w4SjQEKQQoU8WQ0aCvJdBFhtpXpSHWpACknnMMSIgogsdq5TTUhZn22uBTQcnlMEgR3CN2gVRh3SFKLpyb7vskY2LDilZ4vEkEKFPFkNGgryXQRYbaV6Uh1qQApJ5zDEiIKILHauU01IWZ9trgU0HJ5TBIEdwjdoFUYd0hSi6cm+77JGNiw4pWeLxjYsOKVni8aBAgBEC4ijQEKQQoU8WQ0aCvJdBFhtpXpSHWpACknnMMSIgogsdq5TTUhZn22uBTQcnlMEgR3CN2gVRh3SFKLpyb7vskY2LDilZ4vEkEKFPFkNGgryXQRYbaV6Uh1qQApJ5zDEiIKILHauU01IWZ9trgU0HJ5TBIEdwjdoFUYd0hSi6cm+77JGNiw4pWeLxjYsOKVni8="},"include_state":true,"current_timestamp":1703138061} \ No newline at end of file diff --git a/test/data/client/02/009-verify_packet_receipt_absence_input b/test/data/client/02/007-verify_packet_receipt_absence_input similarity index 100% rename from test/data/client/02/009-verify_packet_receipt_absence_input rename to test/data/client/02/007-verify_packet_receipt_absence_input diff --git a/test/data/client/02/009-verify_packet_receipt_absence_result b/test/data/client/02/007-verify_packet_receipt_absence_result similarity index 60% rename from test/data/client/02/009-verify_packet_receipt_absence_result rename to test/data/client/02/007-verify_packet_receipt_absence_result index 56ec30f..48eee77 100644 --- a/test/data/client/02/009-verify_packet_receipt_absence_result +++ b/test/data/client/02/007-verify_packet_receipt_absence_result @@ -1 +1 @@ -{"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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADQlkxlslcws/Rznwft+vehrPA/MhwPciDvroerZZfLKTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADaWJjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANnJlY2VpcHRzL3BvcnRzL3RyYW5zZmVyL2NoYW5uZWxzL2NoYW5uZWwtMC9zZXF1ZW5jZXMvMgAAAAAAAAAAAAA=","signature":"jOAAG68hwCrLXEFIQDNqj5N3dK7i/jiWCtr8dYR/2ZJmFqLKZL93EVirjPlWpwMZAceJElR+kQzDjDomqb/XfwA="} \ No newline at end of file diff --git a/test/data/client/02/008-verify_packet_input b/test/data/client/02/008-verify_packet_input deleted file mode 100644 index 6cbc9cf..0000000 --- a/test/data/client/02/008-verify_packet_input +++ /dev/null @@ -1 +0,0 @@ -{"client_id":"07-tendermint-0","prefix":"aWJj","path":"commitments/ports/transfer/channels/channel-0/sequences/1","value":"9RqjQh7Q0vijrTRujSiIJhCFgtq4F0crP5UoFhZtPcA="} \ No newline at end of file diff --git a/test/data/client/02/008-verify_packet_result b/test/data/client/02/008-verify_packet_result deleted file mode 100644 index d4cef80..0000000 --- a/test/data/client/02/008-verify_packet_result +++ /dev/null @@ -1 +0,0 @@ -{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAlvqax1i2pn5lQelrw7350jBKaV2wUKTE8TtDv2I5vrwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC9I8gbsf6L82mQ1X9nmda7kWLtvGW9ftiJ+6KA6orDcXgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADaWJjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOWNvbW1pdG1lbnRzL3BvcnRzL3RyYW5zZmVyL2NoYW5uZWxzL2NoYW5uZWwtMC9zZXF1ZW5jZXMvMQAAAAAAAAA=","signer":"MCMgOzwSnCCtN5mIA7VoE31FZqw=","signature":"kc5OnGMUjk5q3rSWmJQvwneJ26PoP9FNC/4Rgq1O2XUgB2v8O6+xfHMlHONbgaNaaZ3T3D7k2lNDMC94j27EZQA="} \ No newline at end of file diff --git a/test/data/client/03/001-avr b/test/data/client/03/001-avr new file mode 100644 index 0000000..0f7ba7f --- /dev/null +++ b/test/data/client/03/001-avr @@ -0,0 +1 @@ +{"avr":"{\"id\":\"23856791181030202675484781740313693463\",\"timestamp\":\"2024-06-15T15:33:56.542000\",\"version\":4,\"advisoryURL\":\"https://security-center.intel.com\",\"advisoryIDs\":[],\"isvEnclaveQuoteStatus\":\"OK\",\"platformInfoBlob\":null,\"isvEnclaveQuoteBody\":\"AgAAAAsAAADvAO8A7+/v7wAAAAAAAAAAAAAAAAAAAADKoeNnIvccBDhd0b7SqrWGSCDzN2rmsvIDTTt6S0ineAAAAAAAAAAAAAAAAAAAAAAA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4DaPV6xFTbYqHEUx6uW5vFzv5QPhCd6Xh3MeUz6Xw2UMbpR2JahkrSM=","mrenclave":"MoDAjhm1TRXKkl4KbBP+2v8q/2wJf5OEGr2Nnhowcrg=","enclave_key":"HS/GiFWoDbJxcstWNHk+IDj2ogk="} \ No newline at end of file diff --git a/test/data/client/03/002-avr b/test/data/client/03/002-avr new file mode 100644 index 0000000..0637c12 --- /dev/null +++ b/test/data/client/03/002-avr @@ -0,0 +1 @@ +{"avr":"{\"id\":\"23856791181030202675484781740313693463\",\"timestamp\":\"2024-06-15T15:33:56.553000\",\"version\":4,\"advisoryURL\":\"https://security-center.intel.com\",\"advisoryIDs\":[],\"isvEnclaveQuoteStatus\":\"OK\",\"platformInfoBlob\":null,\"isvEnclaveQuoteBody\":\"AgAAAAsAAADvAO8A7+/v7wAAAAAAAAAAAAAAAAAAAABc5kNUQgt1pxzLE45n41feSCDzN2rmsvIDTTt6S0ineAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAHAAAAAAAAADKAwI4ZtU0VypJeCmwT/tr/Kv9sCX+ThBq9jZ4aMHK4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACD1xnnferKFHD2uvYqTXdDA8iZ22kCD5xw7h38CMfOngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABnrGsv1wnkKRRFiRhiQnvxbyFt34AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"}","signature":"bwLhAw9jWrgb3BlVCns1toFYAughBKBMPk92l+ry6tmGg150C3sccezBI5ZM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291d8dmBQNxFZ+eleeGOPZKpgrKEj79WGTE1oHqApxBPbwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBgQC39YvP2YVKBbODxkdMG4FQRSAcywdml2GY+ah67sbLF/34i64JzvahLaWo+gl091ivkkUa//fgvGj/BBQq7oLmEJ1K8jsHWR8F3NYQHHSIIf8+vgpqGyox8miwZMrbVkMqIlxiqPnDcLWhiRfeXcwqc3qlfPgtHfGPx3YHlUXZTQLWNffBXXWYxPz5DX5OeMJjlV1VxFd+3xrNltR4klSrGrQLRqyZe7r5AndZ3b9g86xN7eospyhoAGtSOLw0Ml7j3F4zVXkhoPYTVayhi3q71r4AqfaLLdbYGaXMhezqo51l06iRaMkFL49enpDXnCRbd1yJtZZXwe17cItDRNB7k6GrpibuLFfbd2goYR/Rv+lCY/sR5IFwrKuWoxwTvd7pIzYbl9oRurbvpU3srCvNOkQO1oPxP6PpwuScpx7KCha3QtKrJfMGOQ/siGUXMiseT8hQAj5P4DaPV6xFTbYqHEUx6uW5vFzv5QPhCd6Xh3MeUz6Xw2UMbpR2JahkrSM=","mrenclave":"MoDAjhm1TRXKkl4KbBP+2v8q/2wJf5OEGr2Nnhowcrg=","enclave_key":"nrGsv1wnkKRRFiRhiQnvxbyFt34="} \ No newline at end of file diff --git a/test/data/client/03/003-avr b/test/data/client/03/003-avr new file mode 100644 index 0000000..e9932ff --- /dev/null +++ b/test/data/client/03/003-avr @@ -0,0 +1 @@ +{"avr":"{\"id\":\"23856791181030202675484781740313693463\",\"timestamp\":\"2024-06-15T15:33:56.567000\",\"version\":4,\"advisoryURL\":\"https://security-center.intel.com\",\"advisoryIDs\":[],\"isvEnclaveQuoteStatus\":\"OK\",\"platformInfoBlob\":null,\"isvEnclaveQuoteBody\":\"AgAAAAsAAADvAO8A7+/v7wAAAAAAAAAAAAAAAAAAAADQ0V7YaWn9QM8OSkYZ/wQQSCDzN2rmsvIDTTt6S0ineAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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Fzv5QPhCd6Xh3MeUz6Xw2UMbpR2JahkrSM=","mrenclave":"MoDAjhm1TRXKkl4KbBP+2v8q/2wJf5OEGr2Nnhowcrg=","enclave_key":"bpV6bhMNp4zFF17QBuQFaGVN07s="} \ No newline at end of file diff --git a/test/data/client/03/004-avr b/test/data/client/03/004-avr new file mode 100644 index 0000000..7875968 --- /dev/null +++ b/test/data/client/03/004-avr @@ -0,0 +1 @@ +{"avr":"{\"id\":\"23856791181030202675484781740313693463\",\"timestamp\":\"2024-06-15T15:33:56.579000\",\"version\":4,\"advisoryURL\":\"https://security-center.intel.com\",\"advisoryIDs\":[],\"isvEnclaveQuoteStatus\":\"OK\",\"platformInfoBlob\":null,\"isvEnclaveQuoteBody\":\"AgAAAAsAAADvAO8A7+/v7wAAAAAAAAAAAAAAAAAAAACtrUXV+8A5Ztf8GN1cGb05SCDzN2rmsvIDTTt6S0ineAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAHAAAAAAAAADKAwI4ZtU0VypJeCmwT/tr/Kv9sCX+ThBq9jZ4aMHK4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACD1xnnferKFHD2uvYqTXdDA8iZ22kCD5xw7h38CMfOngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABxKmrJnGhkxUV6E3c5K3PjtXRHsIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"}","signature":"Jr5Jf0UZn/a5oVpkLkHIQ+/eVqJX4b/dhgfsVQR1lH2OWMDkjSgp//iCIPxiTuZQQE8DD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x9291d8dmBQNxFZ+eleeGOPZKpgrKEj79WGTE1oHqApxBPbwIDAQABMA0GCSqGSIb3DQEBCwUAA4IBgQC39YvP2YVKBbODxkdMG4FQRSAcywdml2GY+ah67sbLF/34i64JzvahLaWo+gl091ivkkUa//fgvGj/BBQq7oLmEJ1K8jsHWR8F3NYQHHSIIf8+vgpqGyox8miwZMrbVkMqIlxiqPnDcLWhiRfeXcwqc3qlfPgtHfGPx3YHlUXZTQLWNffBXXWYxPz5DX5OeMJjlV1VxFd+3xrNltR4klSrGrQLRqyZe7r5AndZ3b9g86xN7eospyhoAGtSOLw0Ml7j3F4zVXkhoPYTVayhi3q71r4AqfaLLdbYGaXMhezqo51l06iRaMkFL49enpDXnCRbd1yJtZZXwe17cItDRNB7k6GrpibuLFfbd2goYR/Rv+lCY/sR5IFwrKuWoxwTvd7pIzYbl9oRurbvpU3srCvNOkQO1oPxP6PpwuScpx7KCha3QtKrJfMGOQ/siGUXMiseT8hQAj5P4DaPV6xFTbYqHEUx6uW5vFzv5QPhCd6Xh3MeUz6Xw2UMbpR2JahkrSM=","mrenclave":"MoDAjhm1TRXKkl4KbBP+2v8q/2wJf5OEGr2Nnhowcrg=","enclave_key":"xKmrJnGhkxUV6E3c5K3PjtXRHsI="} \ No newline at end of file diff --git a/test/data/client/03/005-init_client_input b/test/data/client/03/005-init_client_input new file mode 100644 index 0000000..a011706 --- /dev/null +++ b/test/data/client/03/005-init_client_input @@ -0,0 +1 @@ +{"any_client_state":{"type_url":"/ibc.lightclients.tendermint.v1.ClientState","value":"CgVpYmMtMRIECAEQAxoECIDqSSIECIDfbioCCAUyADoECAEQLkIZCgkIARgBIAEqAQASDAoCAAEQIRgEIAwwAUIZCgkIARgBIAEqAQASDAoCAAEQIBgBIAEwAUoHdXBncmFkZUoQdXBncmFkZWRJQkNTdGF0ZVABWAE="},"any_consensus_state":{"type_url":"/ibc.lightclients.tendermint.v1.ConsensusState","value":"CgwI4ei2swYQzqXO3gESIgogUbxnTUPcWPOu5dKN/ktUVAOAEhriLAkJvimGSuXrDuoaIC6/o1BklvVrf/ZIoNDKuT5nh+ScYAhpfRDImRvXK7Cv"},"current_timestamp":1718465636} \ No newline at end of file diff --git a/test/data/client/03/005-init_client_result b/test/data/client/03/005-init_client_result new file mode 100644 index 0000000..4b38c35 --- /dev/null +++ b/test/data/client/03/005-init_client_result @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","proof":{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC5OlUVN4jdvt0c2fE2nd5vSIP5Bcu/sdFooB849tm+keQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABfZN2OJghzOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKkKKy9pYmMubGlnaHRjbGllbnRzLnRlbmRlcm1pbnQudjEuQ2xpZW50U3RhdGUSegoFaWJjLTESBAgBEAMaBAiA6kkiBAiA324qAggFMgA6BAgBEC5CGQoJCAEYASABKgEAEgwKAgABECEYBCAMMAFCGQoJCAEYASABKgEAEgwKAgABECAYASABMAFKB3VwZ3JhZGVKEHVwZ3JhZGVkSUJDU3RhdGVQAVgBAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=","signature":""}} \ No newline at end of file diff --git a/test/data/client/03/006-update_client_input b/test/data/client/03/006-update_client_input new file mode 100644 index 0000000..7d993c1 --- /dev/null +++ b/test/data/client/03/006-update_client_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CscECosDCgIICxIFaWJjLTEYLyIMCOLotrMGEIKt+egBKkgKIK3y+WC8XtIC1YpKDRUGexVjUO0j5s/fDs26qGADp08cEiQIARIgSzDtiIgQ4JRY2FN/wlsODD7vcfVzgDkHT8dAoL8VLRQyINtPWuAn+0Q7XIl8FiYYfxi+ByffzGM86QucvR6T2VdxOiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VUIgLr+jUGSW9Wt/9kig0Mq5PmeH5JxgCGl9EMiZG9crsK9KIC6/o1BklvVrf/ZIoNDKuT5nh+ScYAhpfRDImRvXK7CvUiAEgJG8fdwoP3e/v5HXPETaWMPfipy8hnQF2Lfz2q2iL1ogE+t0YVhLSx7a8XGyL80drLwsIkAw6nKNBskz+vAL1JJiIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVaiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VXIUgc8CqpU5R+wCZZamY+AH6BOOI4sStgEILxpICiATwEJfPfYawl7PIjsxpHdijqH8oXR3HUE4Ew1IkgVjIBIkCAESIBfT07nSV8Zu/666Hw2D/sZW4niSPAAiok5zdQhXx46LImgIAhIUgc8CqpU5R+wCZZamY+AH6BOOI4saDAjj6LazBhCo8KvxASJA0VRWn+G+5hBsvfEgKaW35om3YzAb00BfUtjoYNJEfDGqGV0GYj8bsotnogqdg59bIOJeOAxlHtaBBUxGgyggCxKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHRoECAEQLiKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHQ=="},"include_state":true,"current_timestamp":1718465637} \ No newline at end of file diff --git a/test/data/client/03/006-update_client_result b/test/data/client/03/006-update_client_result new file mode 100644 index 0000000..8c2fb64 --- /dev/null +++ b/test/data/client/03/006-update_client_result @@ -0,0 +1 @@ +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAA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YxLkNsaWVudFN0YXRlEnoKBWliYy0xEgQIARADGgQIgOpJIgQIgN9uKgIIBTIAOgQIARAvQhkKCQgBGAEgASoBABIMCgIAARAhGAQgDDABQhkKCQgBGAEgASoBABIMCgIAARAgGAEgATABSgd1cGdyYWRlShB1cGdyYWRlZElCQ1N0YXRlUAFYAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","signature":"wEY8xTZHbt4RoHs95UGEmyXXiWIfjhN2vKyMcoxx+r8OSBzq3gXuqzo/xdC2uNW08HuMG2EZ6hMGHYEojaCgFAA="} \ No newline at end of file diff --git a/test/data/client/03/007-update_client_input b/test/data/client/03/007-update_client_input new file mode 100644 index 0000000..7d993c1 --- /dev/null +++ b/test/data/client/03/007-update_client_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CscECosDCgIICxIFaWJjLTEYLyIMCOLotrMGEIKt+egBKkgKIK3y+WC8XtIC1YpKDRUGexVjUO0j5s/fDs26qGADp08cEiQIARIgSzDtiIgQ4JRY2FN/wlsODD7vcfVzgDkHT8dAoL8VLRQyINtPWuAn+0Q7XIl8FiYYfxi+ByffzGM86QucvR6T2VdxOiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VUIgLr+jUGSW9Wt/9kig0Mq5PmeH5JxgCGl9EMiZG9crsK9KIC6/o1BklvVrf/ZIoNDKuT5nh+ScYAhpfRDImRvXK7CvUiAEgJG8fdwoP3e/v5HXPETaWMPfipy8hnQF2Lfz2q2iL1ogE+t0YVhLSx7a8XGyL80drLwsIkAw6nKNBskz+vAL1JJiIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVaiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VXIUgc8CqpU5R+wCZZamY+AH6BOOI4sStgEILxpICiATwEJfPfYawl7PIjsxpHdijqH8oXR3HUE4Ew1IkgVjIBIkCAESIBfT07nSV8Zu/666Hw2D/sZW4niSPAAiok5zdQhXx46LImgIAhIUgc8CqpU5R+wCZZamY+AH6BOOI4saDAjj6LazBhCo8KvxASJA0VRWn+G+5hBsvfEgKaW35om3YzAb00BfUtjoYNJEfDGqGV0GYj8bsotnogqdg59bIOJeOAxlHtaBBUxGgyggCxKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHRoECAEQLiKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHQ=="},"include_state":true,"current_timestamp":1718465637} \ No newline at end of file diff --git a/test/data/client/02/007-update_client_result b/test/data/client/03/007-update_client_result similarity index 65% rename from test/data/client/02/007-update_client_result rename to test/data/client/03/007-update_client_result index 75e0703..4828fd4 100644 --- a/test/data/client/02/007-update_client_result +++ b/test/data/client/03/007-update_client_result @@ -1 +1 @@ -{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC7Abl+KytRXDJcgrvPI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MH/JSAAAAAAAAAAAAAAAAAAEqBfIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACpCisvaWJjLmxpZ2h0Y2xpZW50cy50ZW5kZXJtaW50LnYxLkNsaWVudFN0YXRlEnoKBWliYy0xEgQIARADGgQIgOpJIgQIgN9uKgIIBTIAOgQIARAvQhkKCQgBGAEgASoBABIMCgIAARAhGAQgDDABQhkKCQgBGAEgASoBABIMCgIAARAgGAEgATABSgd1cGdyYWRlShB1cGdyYWRlZElCQ1N0YXRlUAFYAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","signature":"R0VfArGMgS1sLAxe30Mo34eWl5b+WCq9p3GOK0wKDWBygICBZDG+tFI+EOw2EswPE8O+BfKaNpe5PUKg3t+vbAE="} \ No newline at end of file diff --git a/test/data/client/03/008-update_client_input b/test/data/client/03/008-update_client_input new file mode 100644 index 0000000..7d993c1 --- /dev/null +++ b/test/data/client/03/008-update_client_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CscECosDCgIICxIFaWJjLTEYLyIMCOLotrMGEIKt+egBKkgKIK3y+WC8XtIC1YpKDRUGexVjUO0j5s/fDs26qGADp08cEiQIARIgSzDtiIgQ4JRY2FN/wlsODD7vcfVzgDkHT8dAoL8VLRQyINtPWuAn+0Q7XIl8FiYYfxi+ByffzGM86QucvR6T2VdxOiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VUIgLr+jUGSW9Wt/9kig0Mq5PmeH5JxgCGl9EMiZG9crsK9KIC6/o1BklvVrf/ZIoNDKuT5nh+ScYAhpfRDImRvXK7CvUiAEgJG8fdwoP3e/v5HXPETaWMPfipy8hnQF2Lfz2q2iL1ogE+t0YVhLSx7a8XGyL80drLwsIkAw6nKNBskz+vAL1JJiIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVaiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VXIUgc8CqpU5R+wCZZamY+AH6BOOI4sStgEILxpICiATwEJfPfYawl7PIjsxpHdijqH8oXR3HUE4Ew1IkgVjIBIkCAESIBfT07nSV8Zu/666Hw2D/sZW4niSPAAiok5zdQhXx46LImgIAhIUgc8CqpU5R+wCZZamY+AH6BOOI4saDAjj6LazBhCo8KvxASJA0VRWn+G+5hBsvfEgKaW35om3YzAb00BfUtjoYNJEfDGqGV0GYj8bsotnogqdg59bIOJeOAxlHtaBBUxGgyggCxKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHRoECAEQLiKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHQ=="},"include_state":true,"current_timestamp":1718465637} \ No newline at end of file diff --git a/test/data/client/03/008-update_client_result b/test/data/client/03/008-update_client_result new file mode 100644 index 0000000..25e6a84 --- /dev/null +++ b/test/data/client/03/008-update_client_result @@ -0,0 +1 @@ +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACpCisvaWJjLmxpZ2h0Y2xpZW50cy50ZW5kZXJtaW50LnYxLkNsaWVudFN0YXRlEnoKBWliYy0xEgQIARADGgQIgOpJIgQIgN9uKgIIBTIAOgQIARAvQhkKCQgBGAEgASoBABIMCgIAARAhGAQgDDABQhkKCQgBGAEgASoBABIMCgIAARAgGAEgATABSgd1cGdyYWRlShB1cGdyYWRlZElCQ1N0YXRlUAFYAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","signature":"iphlL4Ge2vNtPYgmmw5pKZQuhvoDj9FVw8Q6ttl6AFpY8nPjQlOLV8nUUy7s/1J3zjp2pl4cgYtt2I6CquB6aAA="} \ No newline at end of file diff --git a/test/data/client/03/009-update_client_input b/test/data/client/03/009-update_client_input new file mode 100644 index 0000000..7d993c1 --- /dev/null +++ b/test/data/client/03/009-update_client_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CscECosDCgIICxIFaWJjLTEYLyIMCOLotrMGEIKt+egBKkgKIK3y+WC8XtIC1YpKDRUGexVjUO0j5s/fDs26qGADp08cEiQIARIgSzDtiIgQ4JRY2FN/wlsODD7vcfVzgDkHT8dAoL8VLRQyINtPWuAn+0Q7XIl8FiYYfxi+ByffzGM86QucvR6T2VdxOiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VUIgLr+jUGSW9Wt/9kig0Mq5PmeH5JxgCGl9EMiZG9crsK9KIC6/o1BklvVrf/ZIoNDKuT5nh+ScYAhpfRDImRvXK7CvUiAEgJG8fdwoP3e/v5HXPETaWMPfipy8hnQF2Lfz2q2iL1ogE+t0YVhLSx7a8XGyL80drLwsIkAw6nKNBskz+vAL1JJiIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVaiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VXIUgc8CqpU5R+wCZZamY+AH6BOOI4sStgEILxpICiATwEJfPfYawl7PIjsxpHdijqH8oXR3HUE4Ew1IkgVjIBIkCAESIBfT07nSV8Zu/666Hw2D/sZW4niSPAAiok5zdQhXx46LImgIAhIUgc8CqpU5R+wCZZamY+AH6BOOI4saDAjj6LazBhCo8KvxASJA0VRWn+G+5hBsvfEgKaW35om3YzAb00BfUtjoYNJEfDGqGV0GYj8bsotnogqdg59bIOJeOAxlHtaBBUxGgyggCxKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHRoECAEQLiKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHQ=="},"include_state":true,"current_timestamp":1718465637} \ No newline at end of file diff --git a/test/data/client/03/009-update_client_result b/test/data/client/03/009-update_client_result new file mode 100644 index 0000000..dc549cd --- /dev/null +++ b/test/data/client/03/009-update_client_result @@ -0,0 +1 @@ +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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DDABQhkKCQgBGAEgASoBABIMCgIAARAgGAEgATABSgd1cGdyYWRlShB1cGdyYWRlZElCQ1N0YXRlUAFYAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","signature":"FSBjLFtBlgRiBm1YP9oIA+u6MUwVJ46YXe03ZHy1DdFr41O5ksvR16TY0kh9tP1KOn/42ad9/WN4/AmjurAI4gA="} \ No newline at end of file diff --git a/test/data/client/03/010-update_client_input b/test/data/client/03/010-update_client_input new file mode 100644 index 0000000..7b22f8d --- /dev/null +++ b/test/data/client/03/010-update_client_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CscECosDCgIICxIFaWJjLTEYMCIMCOPotrMGEKjwq/EBKkgKIBPAQl899hrCXs8iOzGkd2KOofyhdHcdQTgTDUiSBWMgEiQIARIgF9PTudJXxm7/rrofDYP+xlbieJI8ACKiTnN1CFfHjosyIHguLuClTpWcwPdTSuDbcIJrqyeYlZzStljdCIwxa/1SOiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VUIgLr+jUGSW9Wt/9kig0Mq5PmeH5JxgCGl9EMiZG9crsK9KIC6/o1BklvVrf/ZIoNDKuT5nh+ScYAhpfRDImRvXK7CvUiAEgJG8fdwoP3e/v5HXPETaWMPfipy8hnQF2Lfz2q2iL1ogo/z6K48CSz/QPY49RVQy4s+r6wY3TPsbHeZwdk1t3w9iIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVaiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VXIUgc8CqpU5R+wCZZamY+AH6BOOI4sStgEIMBpICiChMTd8cky+JAz+ClLcMVonT3OHfz1Mhxb5CHEuyppdpBIkCAESIOC2y7P0N5B1zu3eLRcD3Eqdhj8GKOGIlComnxX3CTnIImgIAhIUgc8CqpU5R+wCZZamY+AH6BOOI4saDAjk6LazBhDZp/b7ASJAxwXmhHKINWvEBed3SI5gSMzljAf5AYrfF5Bwrdzp/VLmH3BNFwLLp00AoitChDXqYNvIJbXc9PSiIxlStceBDxKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHRoECAEQLyKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHQ=="},"include_state":true,"current_timestamp":1718465638} \ No newline at end of file diff --git a/test/data/client/03/010-update_client_result b/test/data/client/03/010-update_client_result new file mode 100644 index 0000000..1284f7b --- /dev/null +++ b/test/data/client/03/010-update_client_result @@ -0,0 +1 @@ +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC+G2GSbuTa3MNRC6sTEYxQRf7MdnC9t6vkWmH4cGMwCkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADA5pHB+CBx8a02xfaVooBGBmfKG6QKBN8wXbbe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03/011-update_client_input b/test/data/client/03/011-update_client_input new file mode 100644 index 0000000..7b22f8d --- /dev/null +++ b/test/data/client/03/011-update_client_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CscECosDCgIICxIFaWJjLTEYMCIMCOPotrMGEKjwq/EBKkgKIBPAQl899hrCXs8iOzGkd2KOofyhdHcdQTgTDUiSBWMgEiQIARIgF9PTudJXxm7/rrofDYP+xlbieJI8ACKiTnN1CFfHjosyIHguLuClTpWcwPdTSuDbcIJrqyeYlZzStljdCIwxa/1SOiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VUIgLr+jUGSW9Wt/9kig0Mq5PmeH5JxgCGl9EMiZG9crsK9KIC6/o1BklvVrf/ZIoNDKuT5nh+ScYAhpfRDImRvXK7CvUiAEgJG8fdwoP3e/v5HXPETaWMPfipy8hnQF2Lfz2q2iL1ogo/z6K48CSz/QPY49RVQy4s+r6wY3TPsbHeZwdk1t3w9iIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVaiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VXIUgc8CqpU5R+wCZZamY+AH6BOOI4sStgEIMBpICiChMTd8cky+JAz+ClLcMVonT3OHfz1Mhxb5CHEuyppdpBIkCAESIOC2y7P0N5B1zu3eLRcD3Eqdhj8GKOGIlComnxX3CTnIImgIAhIUgc8CqpU5R+wCZZamY+AH6BOOI4saDAjk6LazBhDZp/b7ASJAxwXmhHKINWvEBed3SI5gSMzljAf5AYrfF5Bwrdzp/VLmH3BNFwLLp00AoitChDXqYNvIJbXc9PSiIxlStceBDxKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHRoECAEQLyKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHQ=="},"include_state":true,"current_timestamp":1718465638} \ No newline at end of file diff --git a/test/data/client/03/011-update_client_result b/test/data/client/03/011-update_client_result new file mode 100644 index 0000000..6bf0484 --- /dev/null +++ b/test/data/client/03/011-update_client_result @@ -0,0 +1 @@ +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC+G2GSbuTa3MNRC6sTEYxQRf7MdnC9t6vkWmH4cGMwCkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADA5pHB+CBx8a02xfaVooBGBmfKG6QKBN8wXbbeA07FwjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABfZN2QDDxYoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAABfZN2QDDxYoAAAAAAAAAAAX2TdjxmeqggAAAAAAAAAAAARMH/JSAAAAAAAAAAAAAAAAAAEqBfIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACpCisvaWJjLmxpZ2h0Y2xpZW50cy50ZW5kZXJtaW50LnYxLkNsaWVudFN0YXRlEnoKBWliYy0xEgQIARADGgQIgOpJIgQIgN9uKgIIBTIAOgQIARAwQhkKCQgBGAEgASoBABIMCgIAARAhGAQgDDABQhkKCQgBGAEgASoBABIMCgIAARAgGAEgATABSgd1cGdyYWRlShB1cGdyYWRlZElCQ1N0YXRlUAFYAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","signature":"pfnQBNMA0E5XvoJkmyMIGPMrtMWEmtIoDMAui2S33e1ZRLvJfW0Cy4PQTMgogmSSPvnh3cGt78M6VkL6JE7/yAA="} \ No newline at end of file diff --git a/test/data/client/03/012-update_client_input b/test/data/client/03/012-update_client_input new file mode 100644 index 0000000..7b22f8d --- /dev/null +++ b/test/data/client/03/012-update_client_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CscECosDCgIICxIFaWJjLTEYMCIMCOPotrMGEKjwq/EBKkgKIBPAQl899hrCXs8iOzGkd2KOofyhdHc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9YrqHQ=="},"include_state":true,"current_timestamp":1718465638} \ No newline at end of file diff --git a/test/data/client/03/012-update_client_result b/test/data/client/03/012-update_client_result new file mode 100644 index 0000000..d6ad20c --- /dev/null +++ b/test/data/client/03/012-update_client_result @@ -0,0 +1 @@ +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAC+G2GSbuTa3MNRC6sTEYxQRf7MdnC9t6vkWmH4cGMwCkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADA5pHB+CBx8a02xfaVooBGBmfKG6QKBN8wXbbeA07FwjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABfZN2QDDxYoAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAABfZN2QDDxYoAAAAAAAAAAAX2TdjxmeqggAAAAAAAAAAAARMH/JSAAAAAAAAAAAAAAAAAAEqBfIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACpCisvaWJjLmxpZ2h0Y2xpZW50cy50ZW5kZXJtaW50LnYxLkNsaWVudFN0YXRlEnoKBWliYy0xEgQIARADGgQIgOpJIgQIgN9uKgIIBTIAOgQIARAwQhkKCQgBGAEgASoBABIMCgIAARAhGAQgDDABQhkKCQgBGAEgASoBABIMCgIAARAgGAEgATABSgd1cGdyYWRlShB1cGdyYWRlZElCQ1N0YXRlUAFYAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","signature":"zqJYG94HqjCH9YDpTsyWqJF432l2rjv7rKoQdhI0ebYTz/4LusRgdtX0ZGW49DymK1n3DVfd6lHUpigdSbFMJAA="} \ No newline at end of file diff --git a/test/data/client/03/013-update_client_input b/test/data/client/03/013-update_client_input new file mode 100644 index 0000000..7b22f8d --- /dev/null +++ b/test/data/client/03/013-update_client_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CscECosDCgIICxIFaWJjLTEYMCIMCOPotrMGEKjwq/EBKkgKIBPAQl899hrCXs8iOzGkd2KOofyhdHcdQTgTDUiSBWMgEiQIARIgF9PTudJXxm7/rrofDYP+xlbieJI8ACKiTnN1CFfHjosyIHguLuClTpWcwPdTSuDbcIJrqyeYlZzStljdCIwxa/1SOiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VUIgLr+jUGSW9Wt/9kig0Mq5PmeH5JxgCGl9EMiZG9crsK9KIC6/o1BklvVrf/ZIoNDKuT5nh+ScYAhpfRDImRvXK7CvUiAEgJG8fdwoP3e/v5HXPETaWMPfipy8hnQF2Lfz2q2iL1ogo/z6K48CSz/QPY49RVQy4s+r6wY3TPsbHeZwdk1t3w9iIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVaiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VXIUgc8CqpU5R+wCZZamY+AH6BOOI4sStgEIMBpICiChMTd8cky+JAz+ClLcMVonT3OHfz1Mhxb5CHEuyppdpBIkCAESIOC2y7P0N5B1zu3eLRcD3Eqdhj8GKOGIlComnxX3CTnIImgIAhIUgc8CqpU5R+wCZZamY+AH6BOOI4saDAjk6LazBhDZp/b7ASJAxwXmhHKINWvEBed3SI5gSMzljAf5AYrfF5Bwrdzp/VLmH3BNFwLLp00AoitChDXqYNvIJbXc9PSiIxlStceBDxKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHRoECAEQLyKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHQ=="},"include_state":true,"current_timestamp":1718465638} \ No newline at end of file diff --git a/test/data/client/03/013-update_client_result b/test/data/client/03/013-update_client_result new file mode 100644 index 0000000..402229e --- /dev/null +++ b/test/data/client/03/013-update_client_result @@ -0,0 +1 @@ +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACpCisvaWJjLmxpZ2h0Y2xpZW50cy50ZW5kZXJtaW50LnYxLkNsaWVudFN0YXRlEnoKBWliYy0xEgQIARADGgQIgOpJIgQIgN9uKgIIBTIAOgQIARAwQhkKCQgBGAEgASoBABIMCgIAARAhGAQgDDABQhkKCQgBGAEgASoBABIMCgIAARAgGAEgATABSgd1cGdyYWRlShB1cGdyYWRlZElCQ1N0YXRlUAFYAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","signature":"BL9hIX2r/gC9mq4uBHdqZWBpqGCCwpvH4azyjEkP595cpIwYJtRjDt1vlAA3gxlnG+ncMyNnt5K/CraVre9uTQA="} \ No newline at end of file diff --git a/test/data/client/03/014-verify_channel_input b/test/data/client/03/014-verify_channel_input new file mode 100644 index 0000000..2c89de9 --- /dev/null +++ b/test/data/client/03/014-verify_channel_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","prefix":"aWJj","path":"channelEnds/ports/transfer/channels/channel-0","value":"CAMQARoVCgh0cmFuc2ZlchIJY2hhbm5lbC0xIgxjb25uZWN0aW9uLTAqB2ljczIwLTE="} \ No newline at end of file diff --git a/test/data/client/03/014-verify_channel_result b/test/data/client/03/014-verify_channel_result new file mode 100644 index 0000000..d19a7b6 --- /dev/null +++ b/test/data/client/03/014-verify_channel_result @@ -0,0 +1 @@ +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAQDPV3csDWhTaYEuWzn6Ddv+gA8jQjkgmyXsWQbcAKAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADA5pHB+CBx8a02xfaVooBGBmfKG6QKBN8wXbbeA07FwjwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADaWJjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALWNoYW5uZWxFbmRzL3BvcnRzL3RyYW5zZmVyL2NoYW5uZWxzL2NoYW5uZWwtMAAAAAAAAAAAAAAAAAAAAAAAAAA=","signature":"3zdc1FRvWknxtfLGBVUP7VcXmzyIpySEnTNUpJnw6qNfpuOwoHtcip3DDWY1Nh70dy2J/TxXWBWZkpV6RRSyngA="} \ No newline at end of file diff --git a/test/data/client/03/015-update_client_input b/test/data/client/03/015-update_client_input new file mode 100644 index 0000000..c5bf4c0 --- /dev/null +++ b/test/data/client/03/015-update_client_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","any_header":{"type_url":"/ibc.lightclients.tendermint.v1.Header","value":"CscECosDCgIICxIFaWJjLTEYMSIMCOTotrMGENmn9vsBKkgKIKExN3xyTL4kDP4KUtwxWidPc4d/PUyHFvkIcS7Kml2kEiQIARIg4LbLs/Q3kHXO7d4tFwPcSp2GPwYo4YiUKiafFfcJOcgyIG11FwoZ8001rpUNNF/emiYHlmci9asLtaPfmg59S6erOiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VUIgLr+jUGSW9Wt/9kig0Mq5PmeH5JxgCGl9EMiZG9crsK9KIC6/o1BklvVrf/ZIoNDKuT5nh+ScYAhpfRDImRvXK7CvUiAEgJG8fdwoP3e/v5HXPETaWMPfipy8hnQF2Lfz2q2iL1ogzhYpAPHRAReVRuEc2lYOPQzPOpP75AsthhR9g4DBYgFiIOOwxEKY/BwUmvv0yJlvuSQnrkHkZJuTTKSVmRt4UrhVaiDjsMRCmPwcFJr79MiZb7kkJ65B5GSbk0yklZkbeFK4VXIUgc8CqpU5R+wCZZamY+AH6BOOI4sStgEIMRpICiDD9t1abj67B+I1WJ+Y0+m+SaR7MBptkVsISrz+1s7LRBIkCAESIFTYF4iNS6kC/AGZFC0BLudUct5ug1OQa0EfHdPeHVZkImgIAhIUgc8CqpU5R+wCZZamY+AH6BOOI4saDAjl6LazBhCLwNSEAiJAcAR6OO+pneac0g+Uhp8Y24V/Q5KhmLJTG2JWEnDoFZ8o3SvOl1pnzqj7eDZGCvHYNo4kS/9ScV1ykROcjrVfDRKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHRoECAEQMCKNAQpBChSBzwKqlTlH7AJllqZj4AfoE44jixIiCiDWeSMLpH75qYVDTwzN8pWzDdT3eJSEieC8VvgK80xG7hirk/WK6h0SQQoUgc8CqpU5R+wCZZamY+AH6BOOI4sSIgog1nkjC6R++amFQ08MzfKVsw3U93iUhIngvFb4CvNMRu4Yq5P1iuodGKuT9YrqHQ=="},"include_state":true,"current_timestamp":1718465639} \ No newline at end of file diff --git a/test/data/client/03/015-update_client_result b/test/data/client/03/015-update_client_result new file mode 100644 index 0000000..58dd1de --- /dev/null +++ b/test/data/client/03/015-update_client_result @@ -0,0 +1 @@ +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6AAAAAAAAAAAAAAAAA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pJIgQIgN9uKgIIBTIAOgQIARAxQhkKCQgBGAEgASoBABIMCgIAARAhGAQgDDABQhkKCQgBGAEgASoBABIMCgIAARAgGAEgATABSgd1cGdyYWRlShB1cGdyYWRlZElCQ1N0YXRlUAFYAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","signature":"OJrWdl+Or7bIjJGc6MYJgel2VYQ9IAegJ1U+7SmuxORkCfXejGcRJ6f4adia4wfJ3tm3pmbkDa2Q6ukDs6afWAA="} \ No newline at end of file diff --git a/test/data/client/03/016-verify_packet_input b/test/data/client/03/016-verify_packet_input new file mode 100644 index 0000000..d1b3fc7 --- /dev/null +++ b/test/data/client/03/016-verify_packet_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","prefix":"aWJj","path":"commitments/ports/transfer/channels/channel-0/sequences/1","value":"GC/zxp7Bkic5UjpC0mtKlH0cB9HSE38Zll4aMf9q7d8="} \ No newline at end of file diff --git a/test/data/client/03/016-verify_packet_result b/test/data/client/03/016-verify_packet_result new file mode 100644 index 0000000..e0246c2 --- /dev/null +++ b/test/data/client/03/016-verify_packet_result @@ -0,0 +1 @@ +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQCep7yqju1ORV3fljluM7it0/QRYJeNF0ooEUKPTGG/ZQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADEMkfQ04rtJxf7zqIUdZRPl109gjw+a/O7St84Ff0huUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADaWJjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOWNvbW1pdG1lbnRzL3BvcnRzL3RyYW5zZmVyL2NoYW5uZWxzL2NoYW5uZWwtMC9zZXF1ZW5jZXMvMQAAAAAAAAA=","signature":"HVIJTDWWTv6jpM4Givj94c3o+1jEzcq8VzOI+W00/wc8WHo1AnVbLlsa9bZpM+14n32d8rwhzF9zKc6rqXsVhAE="} \ No newline at end of file diff --git a/test/data/client/03/017-verify_packet_receipt_absence_input b/test/data/client/03/017-verify_packet_receipt_absence_input new file mode 100644 index 0000000..ea373cb --- /dev/null +++ b/test/data/client/03/017-verify_packet_receipt_absence_input @@ -0,0 +1 @@ +{"client_id":"07-tendermint-0","prefix":"aWJj","path":"receipts/ports/transfer/channels/channel-0/sequences/2"} \ No newline at end of file diff --git a/test/data/client/03/017-verify_packet_receipt_absence_result b/test/data/client/03/017-verify_packet_receipt_absence_result new file mode 100644 index 0000000..99c1268 --- /dev/null +++ b/test/data/client/03/017-verify_packet_receipt_absence_result @@ -0,0 +1 @@ +{"message":"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAQACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADEMkfQ04rtJxf7zqIUdZRPl109gjw+a/O7St84Ff0huUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADaWJjAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANnJlY2VpcHRzL3BvcnRzL3RyYW5zZmVyL2NoYW5uZWxzL2NoYW5uZWwtMC9zZXF1ZW5jZXMvMgAAAAAAAAAAAAA=","signature":"iieSduKq8iN6REjoTjFm+fW8B1QC6ZiAD3cAnDQjZL0FnE5S/kDfmovsrsKlXtjmiDksMuhlTiJedzOzHOUE0AA="} \ No newline at end of file diff --git a/test/data/reports/invalid/001-avr b/test/data/reports/invalid/001-avr new file mode 100644 index 0000000..ff47690 --- /dev/null +++ b/test/data/reports/invalid/001-avr @@ -0,0 +1 @@ +{"avr":"{\"id\":\"82305734235721330313258195182452685352\",\"timestamp\":\"2024-06-15T14:54:05.076187\",\"version\":4,\"advisoryURL\":\"https://security-center.intel.com\",\"advisoryIDs\":[\"INTEL-SA-00219\",\"INTEL-SA-00289\",\"INTEL-SA-00334\",\"INTEL-SA-00477\",\"INTEL-SA-00614\",\"INTEL-SA-00615\",\"INTEL-SA-00617\",\"INTEL-SA-00828\"],\"isvEnclaveQuoteStatus\":\"GROUP_OUT_OF_DATE\",\"platformInfoBlob\":\"1502006504000F00001010020202800E0000000000000000000D00000C000000020000000000000BF15E27AE7DBEA372B58C8E7EA55F29162D44A3BD9FED427495B88F7285714A5D40C28003908ACCED63BB0A84F0F51666B4E1567933ADCD1225CB3E4A7442556CCB\",\"isvEnclaveQuoteBody\":\"AgAAAPELAAALAAoAAAAAALCbZcb+Fr6JI5sV5pIlYVvGLswAqzmOjdUyk842m+GFDg7//wKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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0LR+5pFy+juM0wWbu59MvzcmTXbjsi7HY6zd53Yq5K244fwFHRQ8eOB0IWB+4PfM7FeAApZvlfqlKOlLcZL2uyVmzRkyR5yW72uo9mehX44CiPJ2fse9Y6eQtcfEhMPkmHXI01sN+KwPbpA39+xOsStjhP9N1Y1a2tQAVo+yVgLgV2Hws73Fc0o3wC78qPEA+v2aRs/Be3ZFDgDyghc/1fgU+7C+P6kbqd4poyb6IW8KCJbxfMJvkordNOgOUUxndPHEi/tb/U7uLjLOgPA==","enclave_key":"g2/sDMme0CQu0C+6q2SGUrI3LkE="} \ No newline at end of file diff --git a/test/data/reports/invalid/avr-01 b/test/data/reports/invalid/avr-01 deleted file mode 100644 index 78e4cb8..0000000 --- a/test/data/reports/invalid/avr-01 +++ /dev/null @@ -1 +0,0 @@ -{"avr":"{\"id\":\"231511564308708696202039454399271386268\",\"timestamp\":\"2022-12-01T09:49:53.473230\",\"version\":4,\"advisoryURL\":\"https://security-center.intel.com\",\"advisoryIDs\":[\"INTEL-SA-00219\",\"INTEL-SA-00289\",\"INTEL-SA-00614\",\"INTEL-SA-00617\",\"INTEL-SA-00477\",\"INTEL-SA-00615\",\"INTEL-SA-00334\"],\"isvEnclaveQuoteStatus\":\"GROUP_OUT_OF_DATE\",\"platformInfoBlob\":\"1502006504000F00000F0F020202800E0000000000000000000D00000C000000020000000000000BF1FF71C73902CC168C67B32BABE311C8DCD69AA9A065D5DA1F575FA5939FD06B43FC187CDBDF97C972CA863F96A6EA5E6BB7313B5A38E28C2D117C990CEAA9CF3A\",\"isvEnclaveQuoteBody\":\"AgAAAPELAAALAAoAAAAAALCbZcb+Fr6JI5sV5pIlYVt2GdTw6l8Ea6v+ySKOFbzvDQ3//wKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAHAAAAAAAAADRdEEo/Gd2j3BUnuFH3PJYMIqpCpDr30GLCEPnHnp+kAAAAAAAAAAAAAAAAAAAAAAA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zRkyR5yW72uo9mehX44CiPJ2fse9Y6eQtcfEhMPkmHXI01sN+KwPbpA39+xOsStjhP9N1Y1a2tQAVo+yVgLgV2Hws73Fc0o3wC78qPEA+v2aRs/Be3ZFDgDyghc/1fgU+7C+P6kbqd4poyb6IW8KCJbxfMJvkordNOgOUUxndPHEi/tb/U7uLjLOgPA=="} \ No newline at end of file diff --git a/test/data/reports/valid/001-avr b/test/data/reports/valid/001-avr new file mode 100644 index 0000000..78b99c1 --- /dev/null +++ b/test/data/reports/valid/001-avr @@ -0,0 +1 @@ +{"avr":"{\"id\":\"82305734235721330313258195182452685352\",\"timestamp\":\"2024-06-15T14:54:05.076187\",\"version\":4,\"advisoryURL\":\"https://security-center.intel.com\",\"advisoryIDs\":[\"INTEL-SA-00219\",\"INTEL-SA-00289\",\"INTEL-SA-00334\",\"INTEL-SA-00477\",\"INTEL-SA-00614\",\"INTEL-SA-00615\",\"INTEL-SA-00617\",\"INTEL-SA-00828\"],\"isvEnclaveQuoteStatus\":\"GROUP_OUT_OF_DATE\",\"platformInfoBlob\":\"1502006504000F00001010020202800E0000000000000000000D00000C000000020000000000000BF15E27AE7DBEA372B58C8E7EA55F29162D44A3BD9FED427495B88F7285714A5D40C28003908ACCED63BB0A84F0F51666B4E1567933ADCD1225CB3E4A7442556CCB\",\"isvEnclaveQuoteBody\":\"AgAAAPELAAALAAoAAAAAALCbZcb+Fr6JI5sV5pIlYVvGLswAqzmOjdUyk842m+GFDg7//wKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAHAAAAAAAAANUJe3YpwAPB/0ZYGkZAHUP0Qdq5GTQBcols6dUKNfCtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACD1xnnferKFHD2uvYqTXdDA8iZ22kCD5xw7h38CMfOngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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yb6IW8KCJbxfMJvkordNOgOUUxndPHEi/tb/U7uLjLOgPA==","mrenclave":"1Ql7dinAA8H/RlgaRkAdQ/RB2rkZNAFyiWzp1Qo18K0=","enclave_key":"g2/sDMme0CQu0C+6q2SGUrI3LkE="} \ No newline at end of file diff --git a/test/data/reports/valid/002-avr b/test/data/reports/valid/002-avr new file mode 100644 index 0000000..64c5d96 --- /dev/null +++ b/test/data/reports/valid/002-avr @@ -0,0 +1 @@ +{"avr":"{\"id\":\"299780094755765409756324070816338710222\",\"timestamp\":\"2024-06-15T15:26:41.435346\",\"version\":4,\"advisoryURL\":\"https://security-center.intel.com\",\"advisoryIDs\":[\"INTEL-SA-00219\",\"INTEL-SA-00289\",\"INTEL-SA-00334\",\"INTEL-SA-00477\",\"INTEL-SA-00614\",\"INTEL-SA-00615\",\"INTEL-SA-00617\",\"INTEL-SA-00828\"],\"isvEnclaveQuoteStatus\":\"GROUP_OUT_OF_DATE\",\"platformInfoBlob\":\"1502006504000F00001010020202800E0000000000000000000D00000C000000020000000000000BF1455E68672300A84CB3AF9346070E51DA1025D4D926CFDC27580CB1AA228C53C0763BA1C3B953EDA0EA67B8A853433F01AE35ECAD9B23B0A7CD8B2C03B3EB6DF0\",\"isvEnclaveQuoteBody\":\"AgAAAPELAAALAAoAAAAAALCbZcb+Fr6JI5sV5pIlYVscBTe7uprtxTHUAUhDjlE9Dg7//wKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAHAAAAAAAAANUJe3YpwAPB/0ZYGkZAHUP0Qdq5GTQBcols6dUKNfCtAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACD1xnnferKFHD2uvYqTXdDA8iZ22kCD5xw7h38CMfOngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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i/tb/U7uLjLOgPA==","mrenclave":"1Ql7dinAA8H/RlgaRkAdQ/RB2rkZNAFyiWzp1Qo18K0=","enclave_key":"yfedXeUtvoQSAFX/KGZCxcMoRm4="} \ No newline at end of file diff --git a/test/data/reports/valid/avr-01 b/test/data/reports/valid/avr-01 deleted file mode 100644 index 3176a88..0000000 --- a/test/data/reports/valid/avr-01 +++ /dev/null @@ -1 +0,0 @@ -{"avr":"{\"id\":\"120273546145229684841731255506776325150\",\"timestamp\":\"2022-12-01T09:49:53.473230\",\"version\":4,\"advisoryURL\":\"https://security-center.intel.com\",\"advisoryIDs\":[\"INTEL-SA-00219\",\"INTEL-SA-00289\",\"INTEL-SA-00614\",\"INTEL-SA-00617\",\"INTEL-SA-00477\",\"INTEL-SA-00615\",\"INTEL-SA-00334\"],\"isvEnclaveQuoteStatus\":\"GROUP_OUT_OF_DATE\",\"platformInfoBlob\":\"1502006504000F00000F0F020202800E0000000000000000000D00000C000000020000000000000BF1FF71C73902CC168C67B32BABE311C8DCD69AA9A065D5DA1F575FA5939FD06B43FC187CDBDF97C972CA863F96A6EA5E6BB7313B5A38E28C2D117C990CEAA9CF3A\",\"isvEnclaveQuoteBody\":\"AgAAAPELAAALAAoAAAAAALCbZcb+Fr6JI5sV5pIlYVt2GdTw6l8Ea6v+ySKOFbzvDQ3//wKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAHAAAAAAAAADRdEEo/Gd2j3BUnuFH3PJYMIqpCpDr30GLCEPnHnp+kAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACD1xnnferKFHD2uvYqTXdDA8iZ22kCD5xw7h38CMfOngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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/reports/valid/avr-02 b/test/data/reports/valid/avr-02 deleted file mode 100644 index 7f28f62..0000000 --- a/test/data/reports/valid/avr-02 +++ /dev/null @@ -1 +0,0 @@ -{"avr":"{\"id\":\"231511564308708696202039454399271386268\",\"timestamp\":\"2022-12-05T02:01:12.282060\",\"version\":4,\"advisoryURL\":\"https://security-center.intel.com\",\"advisoryIDs\":[\"INTEL-SA-00219\",\"INTEL-SA-00289\",\"INTEL-SA-00614\",\"INTEL-SA-00617\",\"INTEL-SA-00477\",\"INTEL-SA-00615\",\"INTEL-SA-00334\"],\"isvEnclaveQuoteStatus\":\"GROUP_OUT_OF_DATE\",\"platformInfoBlob\":\"1502006504000F00000F0F020202800E0000000000000000000D00000C000000020000000000000BF172B0B32CA9D178AAE4F474499C3C41792A289361E9556338F9C2E4DD38DECB40F08FFBE15B1B35995A12F350E4F7602B199317AAEDE27360A9B28024AA7F1E28\",\"isvEnclaveQuoteBody\":\"AgAAAPELAAALAAoAAAAAALCbZcb+Fr6JI5sV5pIlYVvI6E2Fkot9VNZjY2NXf8ZTDQ3//wKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAAAAAAAAAHAAAAAAAAADRdEEo/Gd2j3BUnuFH3PJYMIqpCpDr30GLCEPnHnp+kAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACD1xnnferKFHD2uvYqTXdDA8iZ22kCD5xw7h38CMfOngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACj7ZRgt8VkynSHwM0t1VhKHHb1+gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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