diff --git a/contract3/OCR3AttestationVerifierBase.sol b/contract3/OCR3AttestationVerifierBase.sol index 05138106..acbc2347 100644 --- a/contract3/OCR3AttestationVerifierBase.sol +++ b/contract3/OCR3AttestationVerifierBase.sol @@ -6,13 +6,15 @@ pragma solidity ^0.8.19; /// @dev Defines the common method used to compute a Keccak-256 digest over a report and its context information. abstract contract OCR3AttestationVerifierBase { /// @notice Verifies and stores the list of provided public keys for later use within `verifyAttestation(...)`. - /// Reverts if an invalid number of keys was provided or any key is found invalid. + /// Reverts if an invalid number of keys was provided, any key is found invalid, or a duplicate key is + /// provided. /// @param n The number of keys expected to be set by this call. Must match the actual number of keys present in - /// the `keys` parameter. The maximum number of keys supported is 32 (based on the width of the - /// attribution bitmask). - /// @param keys A concatenation of `n` public keys. The exact format of the key depends on the signature scheme used - /// for verification (for example, for ECDSA, addresses of 20 bytes each would be used). - function _setVerificationKeys(uint8 n, bytes calldata keys) internal virtual; + /// the `ocr3SignerPublicKeys` parameter. The maximum number of keys supported is 32 (based on the width of + /// the attribution bitmask). + /// @param ocr3SignerPublicKeys A concatenation of `n` public keys from the OCR3 signers. The exact format of the + /// keys depends on the signature scheme used for verification (for example, for ECDSA, addresses of 20 bytes + /// each would be used). + function _setVerificationKeys(uint8 n, bytes calldata ocr3SignerPublicKeys) internal virtual; /// @notice Verifies the attestation for the given report. /// Reverts if the attestation could not be verified successfully. diff --git a/contract3/OCR3AttestationVerifierErrors.sol b/contract3/OCR3AttestationVerifierErrors.sol index 9e01ef6f..d927b72d 100644 --- a/contract3/OCR3AttestationVerifierErrors.sol +++ b/contract3/OCR3AttestationVerifierErrors.sol @@ -1,10 +1,10 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; -// Raised when the number of provided verifications keys does not match the expected number of keys (parameter: n). +// Raised when the number of provided verification keys does not match the expected number of keys (parameter: n). error InvalidNumberOfKeys(); -// Raised when the provided verifications keys are of invalid size. +// Raised when the provided verification keys are of invalid size. error KeysOfInvalidSize(); // Raised when an attempt to set more than 32 verification keys is made. @@ -17,6 +17,10 @@ error MaximumNumberOfKeysExceeded(); // - BLS: a key with an invalid proof-of-possession error InvalidKey(); +// Raised when a duplicate verification key is provided during key set. +// Each key must be unique to ensure correct attribution during attestation verification. +error DuplicateKey(); + // Raised when the signature verification failed for the provided attestation. error InvalidAttestation(); diff --git a/contract3/OCR3BLSAttestationVerifier.sol b/contract3/OCR3BLSAttestationVerifier.sol index ac2ac838..d2cf9ee3 100644 --- a/contract3/OCR3BLSAttestationVerifier.sol +++ b/contract3/OCR3BLSAttestationVerifier.sol @@ -11,11 +11,11 @@ import "./OCR3BLSAttestationVerifierLib.sol"; contract OCR3BLSAttestationVerifier is OCR3AttestationVerifierBase { // Reserve storage for up to 32 BLS public keys. The current implementation supports up to 32 keys, limited by the // width of the attribution bitmask used. Keeping the array size fixed at 32 entries is fine for smaller - // configurations, storage costs are only payed for the used number of keys. - OCR3BLSAttestationVerifierLib.G2PointAffine[32] s_keys; + // configurations, storage costs are only paid for the used number of keys. + OCR3BLSAttestationVerifierLib.G2PointAffine[32] s_ocr3BlsSignerPublicKeys; - function _setVerificationKeys(uint8 n, bytes calldata keys) internal override { - OCR3BLSAttestationVerifierLib.setVerificationKeys(s_keys, n, keys); + function _setVerificationKeys(uint8 n, bytes calldata ocr3BlsSignerPublicKeys) internal override { + OCR3BLSAttestationVerifierLib.setVerificationKeys(s_ocr3BlsSignerPublicKeys, n, ocr3BlsSignerPublicKeys); } function _verifyAttestation( @@ -27,6 +27,6 @@ contract OCR3BLSAttestationVerifier is OCR3AttestationVerifierBase { bytes calldata attestation ) internal view override { bytes32 reportHash = _hashReport(configDigest, seqNr, report); - OCR3BLSAttestationVerifierLib.verifyAttestation(s_keys, n, f, reportHash, attestation); + OCR3BLSAttestationVerifierLib.verifyAttestation(s_ocr3BlsSignerPublicKeys, n, f, reportHash, attestation); } } diff --git a/contract3/OCR3BLSAttestationVerifierLib.sol b/contract3/OCR3BLSAttestationVerifierLib.sol index 5662ea2a..1461a7f6 100644 --- a/contract3/OCR3BLSAttestationVerifierLib.sol +++ b/contract3/OCR3BLSAttestationVerifierLib.sol @@ -13,15 +13,17 @@ library OCR3BLSAttestationVerifierLib { // ################################################################################################################# /// @notice Verifies and stores the provided BLS public keys for later use within `verifyAttestation(...)`. - /// @param s_keys A list (stored in the application contract) holding the BLS public keys of all oracles in - /// uncompressed, affine form. The size of 32 is the maximum number of keys supported (based on the width of - // the attribution bitmask). Storage costs are only payed for the number of keys used `n`. + /// Reverts if an invalid number of keys was provided, any key is found invalid, or a duplicate key is + /// provided. + /// @param s_ocr3BlsSignerPublicKeys A list (stored in the application contract) holding the BLS public keys of all + /// oracles in uncompressed, affine form. The size of 32 is the maximum number of keys supported (based on + /// the width of the attribution bitmask). Storage costs are only paid for the number of keys used `n`. /// @param n The number of keys expected to be set by this call. Must match the actual number of keys present in - /// the `keys` parameter. - /// @param keys A concatenation of `n` BLS public keys (uncompressed affine format with appended - /// proof-of-possession). + /// the `ocr3BlsSignerPublicKeys` parameter. + /// @param ocr3BlsSignerPublicKeys A concatenation of `n` BLS public keys (uncompressed affine format with appended + /// proof-of-possession). /// - /// @dev Detailed format for parameter `keys`: + /// @dev Detailed format for parameter `ocr3BlsSignerPublicKeys`: /// - concatenation of `n` values /// - each value is composed of /// - BLS public key in uncompressed affine format (128 bytes) @@ -34,22 +36,31 @@ library OCR3BLSAttestationVerifierLib { /// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... innerHash /// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^... outerHash /// - function setVerificationKeys(G2PointAffine[32] storage s_keys, uint8 n, bytes calldata keys) internal { - // Verify that `n` is consistent with the amount of data being passed in the `keys` parameter. + function setVerificationKeys( + G2PointAffine[32] storage s_ocr3BlsSignerPublicKeys, + uint8 n, + bytes calldata ocr3BlsSignerPublicKeys + ) internal { + // Verify that `n` is consistent with the amount of data being passed in the `ocr3BlsSignerPublicKeys` parameter. // The maximum of 32 keys is based on the width of the attribution bitmask (currently set to 32 bits). - if (keys.length % KEYSIZE_WITH_POP != 0) { + if (ocr3BlsSignerPublicKeys.length % KEYSIZE_WITH_POP != 0) { revert KeysOfInvalidSize(); } - if (keys.length / KEYSIZE_WITH_POP != n) { + if (ocr3BlsSignerPublicKeys.length / KEYSIZE_WITH_POP != n) { revert InvalidNumberOfKeys(); } if (n > 32) { revert MaximumNumberOfKeysExceeded(); } + // Temporary in-memory storage for the keys. This is used to check for duplicate keys at the end of this + // function. The size of 32 is the maximum number of keys supported (based on the width of the attribution + // bitmask). + G2PointAffine[32] memory ocr3BlsSignerPublicKeysMemory; + // Temporary variable for the key to be verified in memory before it is written to storage. This value is // updated in each loop iteration and copied to storage after successful verification. - G2PointAffine memory key; + G2PointAffine memory ocr3BlsSignerPublicKey; // Reserve space for 160 bytes (=32x5 bytes) holding the domain separation tag and public key. // Initialize with the domain separation tag. The public key is set/updated in each loop iteration. @@ -68,17 +79,21 @@ library OCR3BLSAttestationVerifierLib { // involved call to the ecPairing precompiles can only succeed if all inputs are indeed valid points in the // respective groups. In this regard, we (and the auditors) checked the specification (EIP-197, and the // Ethereum Yellowpaper) as well as the geth source code implementing the precompile. - innerHashInput[1] = key.x_imag = uint256(bytes32(keys[inputPosition:inputPosition += 32])); - innerHashInput[2] = key.x_real = uint256(bytes32(keys[inputPosition:inputPosition += 32])); - innerHashInput[3] = key.y_imag = uint256(bytes32(keys[inputPosition:inputPosition += 32])); - innerHashInput[4] = key.y_real = uint256(bytes32(keys[inputPosition:inputPosition += 32])); + innerHashInput[1] = ocr3BlsSignerPublicKey.x_imag = + uint256(bytes32(ocr3BlsSignerPublicKeys[inputPosition:inputPosition += 32])); + innerHashInput[2] = ocr3BlsSignerPublicKey.x_real = + uint256(bytes32(ocr3BlsSignerPublicKeys[inputPosition:inputPosition += 32])); + innerHashInput[3] = ocr3BlsSignerPublicKey.y_imag = + uint256(bytes32(ocr3BlsSignerPublicKeys[inputPosition:inputPosition += 32])); + innerHashInput[4] = ocr3BlsSignerPublicKey.y_real = + uint256(bytes32(ocr3BlsSignerPublicKeys[inputPosition:inputPosition += 32])); // Read the proof-of-possession, i.e., the signature value and signature counter byte. // The signature counter byte (type: bytes1) is, considered as 32 byte word, is left-aligned in memory. // (The most significant byte holds the counter value.) This alignment is critical for the hash computation // of `outerHash := keccak256(inputHash || counter byte)`. - bytes32 popSignature = bytes32(keys[inputPosition:inputPosition += 32]); - bytes1 popSignatureCounter = keys[inputPosition]; + bytes32 popSignature = bytes32(ocr3BlsSignerPublicKeys[inputPosition:inputPosition += 32]); + bytes1 popSignatureCounter = ocr3BlsSignerPublicKeys[inputPosition]; inputPosition += 1; // Prepare the signature verification by computing the actual value that was signed, i.e., `outerHash`, @@ -95,27 +110,51 @@ library OCR3BLSAttestationVerifierLib { outerHash := keccak256(outerHashInput, 33) } - // Actually verify the signature against the computed outer hash and revert on failure. - if (!_verifySignature(key, outerHash, popSignature)) { + // Actually verify the signature against the computed outer hash and revert on failure. If successful, the + // underlying call to the pairing-check precompile ensures that all fields from the provided public key are + // below the field modulus. This is required to ensure the comparison performed in the duplicate keys check + // is not susceptible to maliciously crafted keys. + if (!_verifySignature(ocr3BlsSignerPublicKey, outerHash, popSignature)) { revert InvalidKey(); } - // Write the verified key to the application contract's storage. - s_keys[i] = key; + // Write the verified key to the application contract's storage and to the temporary in-memory storage + // for the duplicate check at the end of this function. (For the in-memory values, we need to copy the + // individual fields of the struct to avoid just aliasing the source struct.) + ocr3BlsSignerPublicKeysMemory[i].x_imag = ocr3BlsSignerPublicKey.x_imag; + ocr3BlsSignerPublicKeysMemory[i].x_real = ocr3BlsSignerPublicKey.x_real; + ocr3BlsSignerPublicKeysMemory[i].y_imag = ocr3BlsSignerPublicKey.y_imag; + ocr3BlsSignerPublicKeysMemory[i].y_real = ocr3BlsSignerPublicKey.y_real; + s_ocr3BlsSignerPublicKeys[i] = ocr3BlsSignerPublicKey; + } + + // Check for duplicate keys. Each key must be unique to ensure that no two oracles share the same signing + // identity, which could otherwise lead to incorrect attribution during attestation verification. + for (uint256 i = 0; i < n; ++i) { + for (uint256 j = i + 1; j < n; ++j) { + if ( + ocr3BlsSignerPublicKeysMemory[i].x_imag == ocr3BlsSignerPublicKeysMemory[j].x_imag + && ocr3BlsSignerPublicKeysMemory[i].x_real == ocr3BlsSignerPublicKeysMemory[j].x_real + && ocr3BlsSignerPublicKeysMemory[i].y_imag == ocr3BlsSignerPublicKeysMemory[j].y_imag + && ocr3BlsSignerPublicKeysMemory[i].y_real == ocr3BlsSignerPublicKeysMemory[j].y_real + ) { + revert DuplicateKey(); + } + } } } /// @notice Verifies the attestation for the given report hash. Reverts on verification failure. - /// @param s_keys A list (stored in the application contract) holding the BLS public keys of all oracles in - /// uncompressed, affine form. + /// @param s_ocr3BlsSignerPublicKeys A list (stored in the application contract) holding the BLS public keys of all + /// oracles in uncompressed, affine form. /// @param n The total number of oracles. Used to verify the attribution bitmask as part of the attestation data. /// @param f Maximum number of faulty/dishonest oracles the protocol can tolerate while still working correctly. /// An aggregate signature from exactly `f + 1` oracles is expected. /// @param reportHash hash of the report data with context information to be attested /// @param attestation A concatenation of the attribution bitmask (4 bytes), a BLS aggregate signature (32 bytes), - // and the counter byte for the BLS signature. + /// and the counter byte for the BLS signature. function verifyAttestation( - G2PointAffine[32] storage s_keys, + G2PointAffine[32] storage s_ocr3BlsSignerPublicKeys, uint8 n, uint8 f, bytes32 reportHash, @@ -132,7 +171,7 @@ library OCR3BLSAttestationVerifierLib { // reverts if the attribution data is invalid or contains less than the required number of signers. OCR3BLSAttestationVerifierLib.G2PointAffine memory verificationKey; uint256 numSigners; - (verificationKey, numSigners) = _computeVerificationKey(s_keys, n, attestation); + (verificationKey, numSigners) = _computeVerificationKey(s_ocr3BlsSignerPublicKeys, n, attestation); // Ensure the correct number of nodes participated in generating the attestation, f+1 signers are required. if (numSigners != f + 1) { @@ -166,7 +205,7 @@ library OCR3BLSAttestationVerifierLib { // ################################################################################################################# // Various constants defined below. These values are carefully chosen, and the implementation assumes that these - // values are set as they are - be careful when changing them. Defined here to improving readability of the code. + // values are set as they are - be careful when changing them. Defined here to improve readability of the code. // Size of a BLS public key in compressed affine format in bytes. uint256 private constant KEYSIZE = 128; @@ -174,7 +213,7 @@ library OCR3BLSAttestationVerifierLib { // Size of a BLS public key in compressed affine format including a proof-of-possession in bytes. uint256 private constant KEYSIZE_WITH_POP = 161; - // // Size of the domain separation tag used for the proof-of-possession in bytes. + // Size of the domain separation tag used for the proof-of-possession in bytes. uint256 private constant DOMAIN_SEPARATION_TAG_SIZE = 32; // Size of a BLS signature in compressed format with appended counter byte in bytes. @@ -197,7 +236,7 @@ library OCR3BLSAttestationVerifierLib { uint256 private constant DOMAIN_SEPARATION_TAG_BLS_PROOF_OF_POSSESSION = 0x79537812dfe48a92fc860b8b010e8d6078b5c19e7037c4cf07f7bed69b54fffc; - // G2 points is on curve y² = x³ + twistB in GFp2, where TWIST_B = TWIST_B_REAL + i*TWIST+B_IMAG + // G2 points are on curve y² = x³ + twistB in GFp2, where TWIST_B = TWIST_B_REAL + i*TWIST_B_IMAG uint256 private constant TWIST_B_IMAG = 0x009713b03af0fed4cd2cafadeed8fdf4a74fa084e52d1852e4a2bd0685c315d2; uint256 private constant TWIST_B_REAL = 0x2b149d40ceb8aaae81be18991be06ac3b5b4c5e559dbefa33267e6dc24a138e5; @@ -251,7 +290,7 @@ library OCR3BLSAttestationVerifierLib { uint256 hY; // Unpack the signature data into a point on G1. - // Return false if the unpacked failed. + // Return false if the unpacking failed. (ok, sX, sY) = _unpackToG1(uint256(signature)); if (!ok) { return false; @@ -313,11 +352,11 @@ library OCR3BLSAttestationVerifierLib { /// aggregate signature. /// @return verificationKey the computed verification key /// @return numSigners the number of keys aggregated to form the verification key - function _computeVerificationKey(G2PointAffine[32] storage s_keys, uint256 n, bytes calldata attestation) - private - view - returns (G2PointAffine memory verificationKey, uint256 numSigners) - { + function _computeVerificationKey( + G2PointAffine[32] storage s_ocr3BlsSignerPublicKeys, + uint256 n, + bytes calldata attestation + ) private view returns (G2PointAffine memory verificationKey, uint256 numSigners) { // Ensure the attribution bitmask is non-zero and that at the highest possibly set bit cannot exceed the bit for // the oracle with highest index. The non-zero check is needed to ensure we have a valid starting point for the // aggregation of the keys. @@ -339,7 +378,7 @@ library OCR3BLSAttestationVerifierLib { // Set the basis for the aggregation to the public key corresponding to the lowest bit set. numSigners = 1; - G2PointJacobian memory vkJacobian = _jacobian(s_keys[i]); + G2PointJacobian memory vkJacobian = _jacobian(s_ocr3BlsSignerPublicKeys[i]); // Move to the next possibly set bit. ++i; @@ -347,7 +386,7 @@ library OCR3BLSAttestationVerifierLib { while (bitmask > 0) { if ((bitmask & 1) > 0) { - vkJacobian = _addPoints(vkJacobian, s_keys[i]); // add the public key of the next oracle + vkJacobian = _addPoints(vkJacobian, s_ocr3BlsSignerPublicKeys[i]); // add the public key of the next oracle ++numSigners; // keep track of the number of keys we aggregated } bitmask >>= 1; @@ -694,7 +733,7 @@ library OCR3BLSAttestationVerifierLib { } /// @notice Return the affine representation of p. The value of p must not be zero, which cannot happen within the - /// context this function _is used (i.e. for converting aggregated public keys into affine format). + /// context in which this function is used (i.e. for converting aggregated public keys into affine format). /// @param p Jacobian-represented point of which to return affine representation. /// @return q affine representation of p /// @@ -751,7 +790,7 @@ library OCR3BLSAttestationVerifierLib { mstore(add(ptr, 0x80), exponent) // exponent mstore(add(ptr, 0xa0), P) // modulus - // Invoke the bipModExp precompile, revert on failure. + // Invoke the bigModExp precompile, revert on failure. if iszero( staticcall( gas(), // gas cost: no limit diff --git a/contract3/OCR3DynamicallyDispatchedAttestationVerifier.sol b/contract3/OCR3DynamicallyDispatchedAttestationVerifier.sol index 6414c941..7ee0f81d 100644 --- a/contract3/OCR3DynamicallyDispatchedAttestationVerifier.sol +++ b/contract3/OCR3DynamicallyDispatchedAttestationVerifier.sol @@ -4,11 +4,11 @@ pragma solidity ^0.8.19; import "./OCR3AttestationVerifierBase.sol"; /// @title Base contract for on-deployment linking of a ECDSA or BLS attestation verifier library -/// @dev The constructor takes an library address which must point to a deployed library of the following types: -// - OCR3DynamicallyDispatchedECDSAAttestationVerifierLib, or -// - OCR3DynamicallyDispatchedBLSAttestationVerifierLib. +/// @dev The constructor takes a library address which must point to a deployed library of the following types: +/// - OCR3DynamicallyDispatchedECDSAAttestationVerifierLib, or +/// - OCR3DynamicallyDispatchedBLSAttestationVerifierLib. contract OCR3DynamicallyDispatchedAttestationVerifier is OCR3AttestationVerifierBase { - // Address of the pre-deployed library contact. + // Address of the pre-deployed library contract. address immutable i_verifierLibraryAddress; // Function selectors for the setVerificationKeys(...) and verifyAttestation(...) functions of the library. @@ -18,7 +18,7 @@ contract OCR3DynamicallyDispatchedAttestationVerifier is OCR3AttestationVerifier // Placeholder for reserving storage for up to 32 verification keys. The used library stores an implementation // specific data structure within these reserved storages slots. 128 words are required for 32 keys, as each key is // composed of 4 words in the BLS case. - uint256[128] s_keys; + uint256[128] s_ocr3SignerPublicKeys; // Constructor used to specify the address of the predeployed verifier library to which the calls should be // forwarded to. @@ -30,7 +30,7 @@ contract OCR3DynamicallyDispatchedAttestationVerifier is OCR3AttestationVerifier // where i_verifierLibraryAddress does not point to a contract. Additional details are provided in the comment // in the _delegatecall(...) helper below. (i_selectorSetVerificationKeys, i_selectorVerifyAttestation) = - (OCR3DynamicallyDispatchedAttestationVerifierSelectorInterface(verifierLibraryAddress).getSelectors()); + (OCR3DynamicallyDispatchedAttestationVerifierSelectorInterface(verifierLibraryAddress).getSelectors()); } // Helper function to perform a delegate call to the underlying verifier library. @@ -56,12 +56,12 @@ contract OCR3DynamicallyDispatchedAttestationVerifier is OCR3AttestationVerifier } } - function _setVerificationKeys(uint8 n, bytes calldata keys) internal override { + function _setVerificationKeys(uint8 n, bytes calldata ocr3SignerPublicKeys) internal override { uint256 storagePtr; assembly { - storagePtr := s_keys.slot + storagePtr := s_ocr3SignerPublicKeys.slot } - _delegatecall(abi.encodeWithSelector(i_selectorSetVerificationKeys, storagePtr, n, keys)); + _delegatecall(abi.encodeWithSelector(i_selectorSetVerificationKeys, storagePtr, n, ocr3SignerPublicKeys)); } function _verifyAttestation( @@ -75,7 +75,7 @@ contract OCR3DynamicallyDispatchedAttestationVerifier is OCR3AttestationVerifier bytes32 reportHash = _hashReport(configDigest, seqNr, report); uint256 storagePtr; assembly { - storagePtr := s_keys.slot + storagePtr := s_ocr3SignerPublicKeys.slot } _delegatecall(abi.encodeWithSelector(i_selectorVerifyAttestation, storagePtr, n, f, reportHash, attestation)); } diff --git a/contract3/OCR3DynamicallyDispatchedBLSAttestationVerifierLib.sol b/contract3/OCR3DynamicallyDispatchedBLSAttestationVerifierLib.sol index 6daf17ed..29ca69d9 100644 --- a/contract3/OCR3DynamicallyDispatchedBLSAttestationVerifierLib.sol +++ b/contract3/OCR3DynamicallyDispatchedBLSAttestationVerifierLib.sol @@ -7,21 +7,21 @@ import "./OCR3BLSAttestationVerifierLib.sol"; /// @dev The function modifiers of the main interface functions are updated from internal to external. library OCR3DynamicallyDispatchedBLSAttestationVerifierLib { function setVerificationKeys( - OCR3BLSAttestationVerifierLib.G2PointAffine[32] storage s_verificationKeys, + OCR3BLSAttestationVerifierLib.G2PointAffine[32] storage s_ocr3BlsSignerPublicKeys, uint8 n, - bytes calldata keys + bytes calldata ocr3BlsSignerPublicKeys ) external { - OCR3BLSAttestationVerifierLib.setVerificationKeys(s_verificationKeys, n, keys); + OCR3BLSAttestationVerifierLib.setVerificationKeys(s_ocr3BlsSignerPublicKeys, n, ocr3BlsSignerPublicKeys); } function verifyAttestation( - OCR3BLSAttestationVerifierLib.G2PointAffine[32] storage s_verificationKeys, + OCR3BLSAttestationVerifierLib.G2PointAffine[32] storage s_ocr3BlsSignerPublicKeys, uint8 n, uint8 f, bytes32 reportHash, bytes calldata attestation ) external view { - OCR3BLSAttestationVerifierLib.verifyAttestation(s_verificationKeys, n, f, reportHash, attestation); + OCR3BLSAttestationVerifierLib.verifyAttestation(s_ocr3BlsSignerPublicKeys, n, f, reportHash, attestation); } // Function to initialize the selectors for delegate-calling into this library. diff --git a/contract3/OCR3DynamicallyDispatchedECDSAAttestationVerifierLib.sol b/contract3/OCR3DynamicallyDispatchedECDSAAttestationVerifierLib.sol index 53dc4d32..a258bb7a 100644 --- a/contract3/OCR3DynamicallyDispatchedECDSAAttestationVerifierLib.sol +++ b/contract3/OCR3DynamicallyDispatchedECDSAAttestationVerifierLib.sol @@ -6,18 +6,22 @@ import "./OCR3ECDSAAttestationVerifierLib.sol"; /// @title Shim for the core ECDSA attestation verifier library, allowing it to be pre-deployed separately. /// @dev The function modifiers of the main interface functions are updated from internal to external. library OCR3DynamicallyDispatchedECDSAAttestationVerifierLib { - function setVerificationKeys(uint256[32] storage s_keys, uint8 n, bytes calldata keys) external { - OCR3ECDSAAttestationVerifierLib.setVerificationKeys(s_keys, n, keys); + function setVerificationKeys( + uint256[32] storage s_ocr3EcdsaSignerPublicKeys, + uint8 n, + bytes calldata ocr3EcdsaSignerPublicKeys + ) external { + OCR3ECDSAAttestationVerifierLib.setVerificationKeys(s_ocr3EcdsaSignerPublicKeys, n, ocr3EcdsaSignerPublicKeys); } function verifyAttestation( - uint256[32] storage s_keys, + uint256[32] storage s_ocr3EcdsaSignerPublicKeys, uint8 n, uint8 f, bytes32 reportHash, bytes calldata attestation ) external view { - OCR3ECDSAAttestationVerifierLib.verifyAttestation(s_keys, n, f, reportHash, attestation); + OCR3ECDSAAttestationVerifierLib.verifyAttestation(s_ocr3EcdsaSignerPublicKeys, n, f, reportHash, attestation); } // Function to initialize the selectors for delegate-calling into this library. diff --git a/contract3/OCR3ECDSAAttestationVerifier.sol b/contract3/OCR3ECDSAAttestationVerifier.sol index f4376cf7..5be281f2 100644 --- a/contract3/OCR3ECDSAAttestationVerifier.sol +++ b/contract3/OCR3ECDSAAttestationVerifier.sol @@ -12,11 +12,11 @@ import "./OCR3ECDSAAttestationVerifierLib.sol"; contract OCR3ECDSAAttestationVerifier is OCR3AttestationVerifierBase { // Reserve storage for up to 32 ECDSA public keys (i.e., the oracle's addresses). The current implementation // supports up to 32 keys, limited by the width of the attribution bitmask used. Keeping the array size fixed at 32 - // entries is fine for smaller configurations, storage costs are only payed for the used number of keys. - uint256[32] s_keys; + // entries is fine for smaller configurations, storage costs are only paid for the used number of keys. + uint256[32] s_ocr3EcdsaSignerPublicKeys; - function _setVerificationKeys(uint8 n, bytes calldata keys) internal override { - OCR3ECDSAAttestationVerifierLib.setVerificationKeys(s_keys, n, keys); + function _setVerificationKeys(uint8 n, bytes calldata ocr3EcdsaSignerPublicKeys) internal override { + OCR3ECDSAAttestationVerifierLib.setVerificationKeys(s_ocr3EcdsaSignerPublicKeys, n, ocr3EcdsaSignerPublicKeys); } function _verifyAttestation( @@ -28,6 +28,6 @@ contract OCR3ECDSAAttestationVerifier is OCR3AttestationVerifierBase { bytes calldata attestation ) internal view override { bytes32 reportHash = _hashReport(configDigest, seqNr, report); - OCR3ECDSAAttestationVerifierLib.verifyAttestation(s_keys, n, f, reportHash, attestation); + OCR3ECDSAAttestationVerifierLib.verifyAttestation(s_ocr3EcdsaSignerPublicKeys, n, f, reportHash, attestation); } } diff --git a/contract3/OCR3ECDSAAttestationVerifierLib.sol b/contract3/OCR3ECDSAAttestationVerifierLib.sol index 31097cfd..13d23dbe 100644 --- a/contract3/OCR3ECDSAAttestationVerifierLib.sol +++ b/contract3/OCR3ECDSAAttestationVerifierLib.sol @@ -4,51 +4,75 @@ pragma solidity ^0.8.19; import "./OCR3AttestationVerifierErrors.sol"; /// @title Internal library for attestation verification using ECDSA signatures -/// @dev Developers should inherit from OCR3eCDSAAttestationVerifier for this functionality to be compiled with the +/// @dev Developers should inherit from OCR3ECDSAAttestationVerifier for this functionality to be compiled with the /// application contract or see OCR3DynamicallyDispatchedAttestationVerifier for using it as a pre-deployed /// library. library OCR3ECDSAAttestationVerifierLib { /// @notice Verifies and stores the provided ECDSA public keys for later use within `verifyAttestation(...)`. - /// @param s_keys Storage space for holding all ECDSA verification keys (in the form of addresses). The first `n` - /// values are populated with values from the `keys` parameter. The size of 32 is the maximum number of keys - /// supported (based on the width of the attribution bitmask). Storage costs are only payed for the number of - /// keys used `n`. + /// Reverts if an invalid number of keys was provided, any key is found invalid, or a duplicate key is + /// provided. + /// @param s_ocr3EcdsaSignerPublicKeys Storage space for holding all ECDSA verification keys (in the form of + /// addresses). The first `n` values are populated with values from the `ocr3EcdsaSignerPublicKeys` parameter. + /// The size of 32 is the maximum number of keys supported (based on the width of the attribution bitmask). + /// Storage costs are only paid for the number of keys used `n`. /// @param n The number of keys expected to be set by this call. Must match the actual number of keys present in - /// the `keys` parameter. - /// @param keys A concatenation of `n` ECDSA public keys (i.e., addresses, 20 bytes each). - function setVerificationKeys(uint256[32] storage s_keys, uint8 n, bytes calldata keys) internal { - // Verify that `n` is consistent with the amount of data being passed in the `keys` parameter. + /// the `ocr3EcdsaSignerPublicKeys` parameter. + /// @param ocr3EcdsaSignerPublicKeys A concatenation of `n` ECDSA public keys (i.e., addresses, 20 bytes each). + function setVerificationKeys( + uint256[32] storage s_ocr3EcdsaSignerPublicKeys, + uint8 n, + bytes calldata ocr3EcdsaSignerPublicKeys + ) internal { + // Verify that `n` is consistent with the amount of data being passed in the `ocr3EcdsaSignerPublicKeys` parameter. // The maximum of 32 keys is based on the width of the attribution bitmask (currently set to 32 bits). - if (keys.length % 20 != 0) { + if (ocr3EcdsaSignerPublicKeys.length % 20 != 0) { revert KeysOfInvalidSize(); } - if (keys.length / 20 != n) { + if (ocr3EcdsaSignerPublicKeys.length / 20 != n) { revert InvalidNumberOfKeys(); } if (n > 32) { revert MaximumNumberOfKeysExceeded(); } - // Copy the provided keys from calldata (keys) to storage (s_keys). After copying, the i-th 32 byte storage slot - // holds the i-th 20 byte key (i.e., the signer's address) in its lower bytes. + // Temporary in-memory storage for the keys. This is used to check for duplicate keys at the end of this + // function. The size of 32 is the maximum number of keys supported (based on the width of the attribution + // bitmask). + uint160[32] memory ocr3EcdsaSignerPublicKeysMemory; + + // Copy the provided keys from calldata (ocr3EcdsaSignerPublicKeys) to storage (s_ocr3EcdsaSignerPublicKeys). + // After copying, the i-th 32 byte storage slot holds the i-th 20 byte key (i.e., the signer's address) in its + // lower bytes. uint256 pos = 0; for (uint256 i = 0; i < n; ++i) { - // Read the next 20 byte key/address from the keys parameter and ensure the key/address is non-zero. - // Clearly the value 0x0000000000000000000000000000000000000000 is an invalid key/address, however, during - // signature verification the call to the ecRecover precompile returns zero on failure, and its return - // value is directly compared to s_keys[i], which therefore must never be zero. - uint160 key = uint160(bytes20(keys[pos:pos + 20])); + // Read the next 20 byte key/address from the ocr3EcdsaSignerPublicKeys parameter and ensure the key/address + // is non-zero. Clearly the value 0x0000000000000000000000000000000000000000 is an invalid key/address, + // however, during signature verification the call to the ecRecover precompile returns zero on failure, and + // its return value is directly compared to s_ocr3EcdsaSignerPublicKeys[i], which therefore must never be + // zero. + uint160 key = uint160(bytes20(ocr3EcdsaSignerPublicKeys[pos:pos + 20])); if (key == 0) { revert InvalidKey(); } - s_keys[i] = key; + ocr3EcdsaSignerPublicKeysMemory[i] = key; + s_ocr3EcdsaSignerPublicKeys[i] = key; pos += 20; } + + // Check for duplicate keys. Each key must be unique to ensure that no two oracles share the same signing + // identity, which could otherwise lead to incorrect attribution during attestation verification. + for (uint256 i = 0; i < n; ++i) { + for (uint256 j = i + 1; j < n; ++j) { + if (ocr3EcdsaSignerPublicKeysMemory[i] == ocr3EcdsaSignerPublicKeysMemory[j]) { + revert DuplicateKey(); + } + } + } } /// @notice Verifies the attestation for the given report hash. Reverts on verification failure. - /// @param s_keys A list (stored in the application contract) holding the ECDSA public keys (i.e., addresses) of all - /// oracles. + /// @param s_ocr3EcdsaSignerPublicKeys A list (stored in the application contract) holding the ECDSA public keys + /// (i.e., addresses) of all oracles. /// @param n The total number of oracles. Used to verify the attribution bitmask as part of the attestation data. /// @param f Maximum number of faulty/dishonest oracles the protocol can tolerate while still working correctly. /// Signatures from exactly `f + 1` oracles are expected. @@ -63,7 +87,7 @@ library OCR3ECDSAAttestationVerifierLib { /// - the signatures are sorted by oracle index (ascending order), the least significant set bit of the /// attribution bitmask corresponds to the first signature provided function verifyAttestation( - uint256[32] storage s_keys, + uint256[32] storage s_ocr3EcdsaSignerPublicKeys, uint8 n, uint8 f, bytes32 reportHash, @@ -96,7 +120,7 @@ library OCR3ECDSAAttestationVerifierLib { // attribution bitmask and enforce it to be equal to f + 1. // // Caution: At a first glance the "more than" case may not seem safety critical. However, the implementation - // of the main verification loop below, assume this fact to be checked!. + // of the main verification loop below assumes this fact to be checked. uint256 numAttributionBitsSet = 0; assembly { @@ -127,9 +151,9 @@ library OCR3ECDSAAttestationVerifierLib { // oracles' public key. // At the end of each loop iteration, the attribution bitmask is right-shifted by a single bit, so in each // iteration the least significant bit can be used to check if the i-th bit of the original bitmask was set. - for { let i := s_keys.slot } gt(attributionBitmask, 0) {} { - // The variable `i` holds the storage index of the oracle's public public key. If the it is set, the - // next signature is verified against the i-th public key. + for { let i := s_ocr3EcdsaSignerPublicKeys.slot } gt(attributionBitmask, 0) {} { + // The variable `i` holds the storage index of the oracle's public key. If it is set, the next + // signature is verified against the i-th public key. if and(attributionBitmask, 1) { // numAttributionBitsSet += 1 numAttributionBitsSet := add(numAttributionBitsSet, 1) @@ -140,7 +164,7 @@ library OCR3ECDSAAttestationVerifierLib { // a) zero-bytes (no other calldata after attestation) // b) or arbitrary data (extra calldata after attestation). // This may lead to over-counting the number of valid signatures, which however, is not a safety - // consider in this particular case, because, at the end of this functions, we only accept an + // concern in this particular case, because, at the end of this function, we only accept an // attestation if exactly f + 1 bits are set in the attribution bitmask. calldatacopy(ptr_ecrecoverInput_RS, ptr_nextSignatureFromAttestation, 64) @@ -170,7 +194,7 @@ library OCR3ECDSAAttestationVerifierLib { // Load the recovered and stored public keys. // recoveredKey = mem[0:32] - // storedKey = s_keys[i] + // storedKey = s_ocr3EcdsaSignerPublicKeys[i] let recoveredKey := mload(0) // zero if ecRecover failed let storedKey := sload(i) // always non-zero, ensured by `setVerificationKeys` diff --git a/contract3/dev/DemoBLSAttestationVerifier.sol b/contract3/dev/DemoBLSAttestationVerifier.sol index 79310e6a..e063b3f8 100644 --- a/contract3/dev/DemoBLSAttestationVerifier.sol +++ b/contract3/dev/DemoBLSAttestationVerifier.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.19; +pragma solidity ^0.8.19; import "../OCR3BLSAttestationVerifier.sol"; @@ -21,9 +21,9 @@ contract DemoBLSAttestationVerifier is OCR3BLSAttestationVerifier { uint8 f; // maximum number of faulty/dishonest oracles the protocol can tolerate while still working correctly } - function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes calldata keys) external { + function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes calldata ocr3BlsSignerPublicKeys) external { s_hotVars = HotVars({configVersion: configVersion, n: n, f: f}); - _setVerificationKeys(n, keys); + _setVerificationKeys(n, ocr3BlsSignerPublicKeys); } // We may want to load configDigest from storage instead. diff --git a/contract3/dev/DemoDynamicallyDispatchedAttestationVerifier.sol b/contract3/dev/DemoDynamicallyDispatchedAttestationVerifier.sol index 0052fbc3..90059369 100644 --- a/contract3/dev/DemoDynamicallyDispatchedAttestationVerifier.sol +++ b/contract3/dev/DemoDynamicallyDispatchedAttestationVerifier.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.19; +pragma solidity ^0.8.19; import "../OCR3DynamicallyDispatchedAttestationVerifier.sol"; @@ -23,9 +23,9 @@ contract DemoDynamicallyDispatchedAttestationVerifier is OCR3DynamicallyDispatch constructor(address verifierLibraryAddress) OCR3DynamicallyDispatchedAttestationVerifier(verifierLibraryAddress) {} - function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes calldata keys) external { + function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes calldata ocr3SignerPublicKeys) external { s_hotVars = HotVars({configVersion: configVersion, n: n, f: f}); - _setVerificationKeys(n, keys); + _setVerificationKeys(n, ocr3SignerPublicKeys); } // We may want to load configDigest from storage instead. diff --git a/contract3/dev/DemoECDSAAttestationVerifier.sol b/contract3/dev/DemoECDSAAttestationVerifier.sol index 18cf7074..e2715559 100644 --- a/contract3/dev/DemoECDSAAttestationVerifier.sol +++ b/contract3/dev/DemoECDSAAttestationVerifier.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.19; +pragma solidity ^0.8.19; import "../OCR3ECDSAAttestationVerifier.sol"; @@ -21,9 +21,9 @@ contract DemoECDSAAttestationVerifier is OCR3ECDSAAttestationVerifier { uint8 f; // maximum number of faulty/dishonest oracles the protocol can tolerate while still working correctly } - function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes calldata keys) external { + function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes calldata ocr3EcdsaSignerPublicKeys) external { s_hotVars = HotVars({configVersion: configVersion, n: n, f: f}); - _setVerificationKeys(n, keys); + _setVerificationKeys(n, ocr3EcdsaSignerPublicKeys); } // We may want to load configDigest from storage instead. diff --git a/gethwrappers3/demoblsattestationverifier/demoblsattestationverifier.go b/gethwrappers3/demoblsattestationverifier/demoblsattestationverifier.go index b14b0318..ac46d529 100644 --- a/gethwrappers3/demoblsattestationverifier/demoblsattestationverifier.go +++ b/gethwrappers3/demoblsattestationverifier/demoblsattestationverifier.go @@ -31,8 +31,8 @@ var ( // DemoBLSAttestationVerifierMetaData contains all meta data concerning the DemoBLSAttestationVerifier contract. var DemoBLSAttestationVerifierMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"InvalidAttestation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationAttributionBitmask\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNumberOfKeys\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KeysOfInvalidSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaximumNumberOfKeysExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"n\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"keys\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"seqNr\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"attestation\",\"type\":\"bytes\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b506116ac806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80636f289d411461003b57806395fd15c814610050575b600080fd5b61004e6100493660046112e9565b610063565b005b61004e61005e366004611399565b610104565b6040805160608101825263ffffffff871680825260ff8781166020840181905290871692909301829052608080547fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000016909117640100000000909302929092177fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff16650100000000009091021790556100fd8483836101d7565b5050505050565b6040805160608101825260805463ffffffff8116825260ff6401000000008204811660208401819052650100000000009092041692820183905290916101519188918891908888886101e9565b805160808054602084015160409094015163ffffffff9093167fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009091161764010000000060ff94851602177fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff166501000000000093909216929092021790555050505050565b6101e46000848484610211565b505050565b60006101f688888661054b565b905061020760008787848787610594565b5050505050505050565b61021c60a1826114d5565b15610253576040517fadd4994500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60ff831661026260a183611518565b14610299576040517fa07f647e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208360ff1611156102d7576040517f1ede571b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103026040518060800160405280600081526020016000815260200160008152602001600081525090565b61030a611237565b7f79537812dfe48a92fc860b8b010e8d6078b5c19e7037c4cf07f7bed69b54fffc8152610335611255565b6000805b8760ff168160ff1610156105405786828761035560208361155b565b9450610364928592919061156e565b61036d91611598565b808652602080860191909152879083908890610389908361155b565b9450610398928592919061156e565b6103a191611598565b602086810182905260408601919091528790839088906103c1908361155b565b94506103d0928592919061156e565b6103d991611598565b6040860181905260608501528682876103f360208361155b565b9450610402928592919061156e565b61040b91611598565b606086018190526080850152600087838861042760208361155b565b9550610436928692919061156e565b61043f91611598565b905060008888858181106104555761045561152c565b9050013560f81c60f81b905060018461046e919061155b565b60a087208087527fff000000000000000000000000000000000000000000000000000000000000008316602088015260218720919550906104b08982866106be565b6104e6576040517f76d4e1e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b888d8660ff16602081106104fc576104fc61152c565b60040201600082015181600001556020820151816001015560408201518160020155606082015181600301559050505050505080610539906115d4565b9050610339565b505050505050505050565b80516020808301919091206040805180840187905267ffffffffffffffff86168183015260608082019390935281518082039093018352608001905280519101205b9392505050565b602581146105ce576040517f1174ad8500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6105f96040518060800160405280600081526020016000815260200160008152602001600081525090565b600061060a888860ff16868661083e565b909250905061061a8660016115f3565b60ff168114610655576040517fddbf0b4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806021600487016000376000519150866000526021600020905061067c8482846106be565b6106b2576040517fbd8ba84d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b600080808080806106ce876109fc565b91965094509250846106e85760009550505050505061058d565b6107137fbfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff89166109fc565b919650925090508461072d5760009550505050505061058d565b60006040518061018001604052808681526020018581526020017f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c281526020017f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed81526020017f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec81526020017f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d81526020018481526020018381526020018b6000015181526020018b6020015181526020018b6040015181526020018b60600151815250905061081b611273565b6020816101808460085afa61082f57600080fd5b519a9950505050505050505050565b6108696040518060800160405280600081526020016000815260200160008152602001600081525090565b600080610879600482868861156e565b6108829161160c565b60e01c905080158061089757506001861b8110155b156108ce576040517ff4e04eaa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b816001166000036108f35760019190911c906108ec81611654565b90506108d1565b60019250600061094a89836020811061090e5761090e61152c565b60040201604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050610b90565b905061095582611654565b9150600183901c92505b82156109e55760018316156109ce576109c0818a84602081106109845761098461152c565b60040201604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050610bff565b90506109cb84611654565b93505b60019290921c916109de82611654565b915061095f565b6109ee81610e9a565b945050505094509492505050565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8216817f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478210610a5757506000915081905080610b89565b60007f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4760037f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47857f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4787880909089050610afe816002610af77f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47600161155b565b901c610f46565b9150807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4783840914610b3b57600080600093509350935050610b89565b60ff85901c600183168114610b82577f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47610b75848261168c565b610b7f91906114d5565b92505b6001945050505b9193909250565b610bc96040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b8151815260208083015190820152604080830151908201526060918201519181019190915260006080820152600160a082015290565b610c386040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b7f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47608084015160a08501518281830983818208905083848485098503858485090884858286098684860908858684870987038784870908885160208a015188898684098a88840908898a8885098b038b888509088d51935060208e015192508a848c03830891508a838c03820890508a828b0899508a818a089850898b8a8c099a508b8b8c089a508b8c8283098d038d8c8d09089950508a888c038b0899508a878c038a0898508a81830997508a88890897508a8b8384098c038c8384090896508a888c038b0899508a878c038a0898508960808d01528860a08d01528a8860040999508a8760040998508a8b8a84098c8c84090897508a8b8b84098c038c8b84090896508a8b8a86098c8c86090891508a8b8b86098c038c8b860908905060408d0151995060608d015198508a8b868c098c888c090893508a8b878c098c038c878c0908925060408e0151995060608e015198508a8a8c03850895508a898c03840894508a8660020993508a8560020992508a83850995508a86870895508a8b8586098c038c8586090894508a888c03870895508a878c03860894508a8b888c098c8a8c09088b8c8a8d098d038d8a8d09088c826002099b508c816002099a5050508a8260020997508a8160020996508a888c03870897508a878c0386089650878c528660208d01528a888c03830897508a878c0382089650505088898684098a88840908935088898784098a038a878409089250505086868803830895508685880382089450505050508160408501528060608501525050505b92915050565b610ec56040518060800160405280600081526020016000815260200160008152602001600081525090565b600080610eda84608001518560a00151610fa9565b91509150600080610eeb84846110ad565b91509150610f03828288600001518960200151611171565b60208701528552610f1682828686611171565b8092508193505050610f32828288604001518960600151611171565b606087015260408601525092949350505050565b600060405160208152602080820152602060408201528360608201528260808201527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4760a082015260208160c08360055afa610fa157600080fd5b519392505050565b600080807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808687097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4786870908905061102d8161102860027f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4761168c565b610f46565b90507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478161107b877f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4761168c565b0992507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478185099150505b9250929050565b6000807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4784840991507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4782830891507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808586097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47037f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478586090890509250929050565b6000807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808488097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478688090891507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808588097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47037f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4785880908905094509492505050565b6040518060a001604052806005906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b803560ff811681146112a257600080fd5b919050565b60008083601f8401126112b957600080fd5b50813567ffffffffffffffff8111156112d157600080fd5b6020830191508360208285010111156110a657600080fd5b60008060008060006080868803121561130157600080fd5b853563ffffffff8116811461131557600080fd5b945061132360208701611291565b935061133160408701611291565b9250606086013567ffffffffffffffff81111561134d57600080fd5b611359888289016112a7565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000806000608086880312156113b157600080fd5b85359450602086013567ffffffffffffffff80821682146113d157600080fd5b909450604087013590808211156113e757600080fd5b818801915088601f8301126113fb57600080fd5b81358181111561140d5761140d61136a565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156114535761145361136a565b816040528281528b602084870101111561146c57600080fd5b82602086016020830137600060208483010152809750505050606088013591508082111561149957600080fd5b50611359888289016112a7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826114e4576114e46114a6565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082611527576115276114a6565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80820180821115610e9457610e946114e9565b6000808585111561157e57600080fd5b8386111561158b57600080fd5b5050820193919092039150565b80356020831015610e94577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b600060ff821660ff81036115ea576115ea6114e9565b60010192915050565b60ff8181168382160190811115610e9457610e946114e9565b7fffffffff00000000000000000000000000000000000000000000000000000000813581811691600485101561164c5780818660040360031b1b83161692505b505092915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611685576116856114e9565b5060010190565b81810381811115610e9457610e946114e956fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[],\"name\":\"DuplicateKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationAttributionBitmask\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNumberOfKeys\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KeysOfInvalidSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaximumNumberOfKeysExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"n\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"ocr3BlsSignerPublicKeys\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"seqNr\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"attestation\",\"type\":\"bytes\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50611906806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80636f289d411461003b57806395fd15c814610050575b600080fd5b61004e610049366004611543565b610063565b005b61004e61005e3660046115f3565b610104565b6040805160608101825263ffffffff871680825260ff8781166020840181905290871692909301829052608080547fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000016909117640100000000909302929092177fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff16650100000000009091021790556100fd8483836101d7565b5050505050565b6040805160608101825260805463ffffffff8116825260ff6401000000008204811660208401819052650100000000009092041692820183905290916101519188918891908888886101e9565b805160808054602084015160409094015163ffffffff9093167fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009091161764010000000060ff94851602177fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff166501000000000093909216929092021790555050505050565b6101e46000848484610211565b505050565b60006101f6888886610760565b9050610207600087878487876107a9565b5050505050505050565b61021c60a18261172f565b15610253576040517fadd4994500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60ff831661026260a183611772565b14610299576040517fa07f647e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208360ff1611156102d7576040517f1ede571b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102df611440565b61030a6040518060800160405280600081526020016000815260200160008152602001600081525090565b610312611491565b7f79537812dfe48a92fc860b8b010e8d6078b5c19e7037c4cf07f7bed69b54fffc815261033d6114af565b6000805b8860ff168160ff1610156105e15787828861035d6020836117b5565b945061036c92859291906117c8565b610375916117f2565b80865260208086019190915288908390899061039190836117b5565b94506103a092859291906117c8565b6103a9916117f2565b602086810182905260408601919091528890839089906103c990836117b5565b94506103d892859291906117c8565b6103e1916117f2565b6040860181905260608501528782886103fb6020836117b5565b945061040a92859291906117c8565b610413916117f2565b606086018190526080850152600088838961042f6020836117b5565b955061043e92869291906117c8565b610447916117f2565b9050600089898581811061045d5761045d611786565b9050013560f81c60f81b905060018461047691906117b5565b60a087208087527fff000000000000000000000000000000000000000000000000000000000000008316602088015260218720919550906104b88982866108c7565b6104ee576040517f76d4e1e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b88518a60ff87166020811061050557610505611786565b6020020151600001818152505088602001518a8660ff166020811061052c5761052c611786565b6020020151602001818152505088604001518a8660ff166020811061055357610553611786565b6020020151604001818152505088606001518a8660ff166020811061057a5761057a611786565b60200201516060018181525050888e8660ff166020811061059d5761059d611786565b600402016000820151816000015560208201518160010155604082015181600201556060820151816003015590505050505050806105da9061182e565b9050610341565b5060005b8860ff168110156107545760006105fd8260016117b5565b90505b8960ff168110156107435786816020811061061d5761061d611786565b60200201516000015187836020811061063857610638611786565b60200201515114801561067e575086816020811061065857610658611786565b60200201516020015187836020811061067357610673611786565b602002015160200151145b80156106bd575086816020811061069757610697611786565b6020020151604001518783602081106106b2576106b2611786565b602002015160400151145b80156106fc57508681602081106106d6576106d6611786565b6020020151606001518783602081106106f1576106f1611786565b602002015160600151145b15610733576040517f96bfdb4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61073c8161184d565b9050610600565b5061074d8161184d565b90506105e5565b50505050505050505050565b80516020808301919091206040805180840187905267ffffffffffffffff86168183015260608082019390935281518082039093018352608001905280519101205b9392505050565b602581146107e3576040517f1174ad8500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61080e6040518060800160405280600081526020016000815260200160008152602001600081525090565b600061081f888860ff168686610a47565b909250905061082f866001611885565b60ff16811461086a576040517fddbf0b4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080602160048701600037600051915086600052602160002090506108918482846108c7565b610754576040517fbd8ba84d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080808080806108d787610c05565b91965094509250846108f1576000955050505050506107a2565b61091c7fbfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8916610c05565b9196509250905084610936576000955050505050506107a2565b60006040518061018001604052808681526020018581526020017f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c281526020017f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed81526020017f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec81526020017f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d81526020018481526020018381526020018b6000015181526020018b6020015181526020018b6040015181526020018b606001518152509050610a246114cd565b6020816101808460085afa610a3857600080fd5b519a9950505050505050505050565b610a726040518060800160405280600081526020016000815260200160008152602001600081525090565b600080610a8260048286886117c8565b610a8b9161189e565b60e01c9050801580610aa057506001861b8110155b15610ad7576040517ff4e04eaa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b81600116600003610afc5760019190911c90610af58161184d565b9050610ada565b600192506000610b53898360208110610b1757610b17611786565b60040201604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050610d99565b9050610b5e8261184d565b9150600183901c92505b8215610bee576001831615610bd757610bc9818a8460208110610b8d57610b8d611786565b60040201604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050610e08565b9050610bd48461184d565b93505b60019290921c91610be78261184d565b9150610b68565b610bf7816110a3565b945050505094509492505050565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8216817f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478210610c6057506000915081905080610d92565b60007f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4760037f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47857f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4787880909089050610d07816002610d007f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4760016117b5565b901c61114f565b9150807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4783840914610d4457600080600093509350935050610d92565b60ff85901c600183168114610d8b577f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47610d7e84826118e6565b610d88919061172f565b92505b6001945050505b9193909250565b610dd26040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b8151815260208083015190820152604080830151908201526060918201519181019190915260006080820152600160a082015290565b610e416040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b7f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47608084015160a08501518281830983818208905083848485098503858485090884858286098684860908858684870987038784870908885160208a015188898684098a88840908898a8885098b038b888509088d51935060208e015192508a848c03830891508a838c03820890508a828b0899508a818a089850898b8a8c099a508b8b8c089a508b8c8283098d038d8c8d09089950508a888c038b0899508a878c038a0898508a81830997508a88890897508a8b8384098c038c8384090896508a888c038b0899508a878c038a0898508960808d01528860a08d01528a8860040999508a8760040998508a8b8a84098c8c84090897508a8b8b84098c038c8b84090896508a8b8a86098c8c86090891508a8b8b86098c038c8b860908905060408d0151995060608d015198508a8b868c098c888c090893508a8b878c098c038c878c0908925060408e0151995060608e015198508a8a8c03850895508a898c03840894508a8660020993508a8560020992508a83850995508a86870895508a8b8586098c038c8586090894508a888c03870895508a878c03860894508a8b888c098c8a8c09088b8c8a8d098d038d8a8d09088c826002099b508c816002099a5050508a8260020997508a8160020996508a888c03870897508a878c0386089650878c528660208d01528a888c03830897508a878c0382089650505088898684098a88840908935088898784098a038a878409089250505086868803830895508685880382089450505050508160408501528060608501525050505b92915050565b6110ce6040518060800160405280600081526020016000815260200160008152602001600081525090565b6000806110e384608001518560a001516111b2565b915091506000806110f484846112b6565b9150915061110c82828860000151896020015161137a565b6020870152855261111f8282868661137a565b809250819350505061113b82828860400151896060015161137a565b606087015260408601525092949350505050565b600060405160208152602080820152602060408201528360608201528260808201527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4760a082015260208160c08360055afa6111aa57600080fd5b519392505050565b600080807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808687097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478687090890506112368161123160027f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd476118e6565b61114f565b90507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4781611284877f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd476118e6565b0992507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478185099150505b9250929050565b6000807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4784840991507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4782830891507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808586097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47037f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478586090890509250929050565b6000807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808488097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478688090891507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808588097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47037f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4785880908905094509492505050565b6040518061040001604052806020905b61147b6040518060800160405280600081526020016000815260200160008152602001600081525090565b8152602001906001900390816114505790505090565b6040518060a001604052806005906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b803560ff811681146114fc57600080fd5b919050565b60008083601f84011261151357600080fd5b50813567ffffffffffffffff81111561152b57600080fd5b6020830191508360208285010111156112af57600080fd5b60008060008060006080868803121561155b57600080fd5b853563ffffffff8116811461156f57600080fd5b945061157d602087016114eb565b935061158b604087016114eb565b9250606086013567ffffffffffffffff8111156115a757600080fd5b6115b388828901611501565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060008060006080868803121561160b57600080fd5b85359450602086013567ffffffffffffffff808216821461162b57600080fd5b9094506040870135908082111561164157600080fd5b818801915088601f83011261165557600080fd5b813581811115611667576116676115c4565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156116ad576116ad6115c4565b816040528281528b60208487010111156116c657600080fd5b8260208601602083013760006020848301015280975050505060608801359150808211156116f357600080fd5b506115b388828901611501565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261173e5761173e611700565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008261178157611781611700565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b8082018082111561109d5761109d611743565b600080858511156117d857600080fd5b838611156117e557600080fd5b5050820193919092039150565b8035602083101561109d577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b600060ff821660ff810361184457611844611743565b60010192915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361187e5761187e611743565b5060010190565b60ff818116838216019081111561109d5761109d611743565b7fffffffff0000000000000000000000000000000000000000000000000000000081358181169160048510156118de5780818660040360031b1b83161692505b505092915050565b8181038181111561109d5761109d61174356fea164736f6c6343000813000a", } // DemoBLSAttestationVerifierABI is the input ABI used to generate the binding from. @@ -204,23 +204,23 @@ func (_DemoBLSAttestationVerifier *DemoBLSAttestationVerifierTransactorRaw) Tran // SetConfig is a paid mutator transaction binding the contract method 0x6f289d41. // -// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes keys) returns() -func (_DemoBLSAttestationVerifier *DemoBLSAttestationVerifierTransactor) SetConfig(opts *bind.TransactOpts, configVersion uint32, n uint8, f uint8, keys []byte) (*types.Transaction, error) { - return _DemoBLSAttestationVerifier.contract.Transact(opts, "setConfig", configVersion, n, f, keys) +// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes ocr3BlsSignerPublicKeys) returns() +func (_DemoBLSAttestationVerifier *DemoBLSAttestationVerifierTransactor) SetConfig(opts *bind.TransactOpts, configVersion uint32, n uint8, f uint8, ocr3BlsSignerPublicKeys []byte) (*types.Transaction, error) { + return _DemoBLSAttestationVerifier.contract.Transact(opts, "setConfig", configVersion, n, f, ocr3BlsSignerPublicKeys) } // SetConfig is a paid mutator transaction binding the contract method 0x6f289d41. // -// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes keys) returns() -func (_DemoBLSAttestationVerifier *DemoBLSAttestationVerifierSession) SetConfig(configVersion uint32, n uint8, f uint8, keys []byte) (*types.Transaction, error) { - return _DemoBLSAttestationVerifier.Contract.SetConfig(&_DemoBLSAttestationVerifier.TransactOpts, configVersion, n, f, keys) +// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes ocr3BlsSignerPublicKeys) returns() +func (_DemoBLSAttestationVerifier *DemoBLSAttestationVerifierSession) SetConfig(configVersion uint32, n uint8, f uint8, ocr3BlsSignerPublicKeys []byte) (*types.Transaction, error) { + return _DemoBLSAttestationVerifier.Contract.SetConfig(&_DemoBLSAttestationVerifier.TransactOpts, configVersion, n, f, ocr3BlsSignerPublicKeys) } // SetConfig is a paid mutator transaction binding the contract method 0x6f289d41. // -// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes keys) returns() -func (_DemoBLSAttestationVerifier *DemoBLSAttestationVerifierTransactorSession) SetConfig(configVersion uint32, n uint8, f uint8, keys []byte) (*types.Transaction, error) { - return _DemoBLSAttestationVerifier.Contract.SetConfig(&_DemoBLSAttestationVerifier.TransactOpts, configVersion, n, f, keys) +// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes ocr3BlsSignerPublicKeys) returns() +func (_DemoBLSAttestationVerifier *DemoBLSAttestationVerifierTransactorSession) SetConfig(configVersion uint32, n uint8, f uint8, ocr3BlsSignerPublicKeys []byte) (*types.Transaction, error) { + return _DemoBLSAttestationVerifier.Contract.SetConfig(&_DemoBLSAttestationVerifier.TransactOpts, configVersion, n, f, ocr3BlsSignerPublicKeys) } // Transmit is a paid mutator transaction binding the contract method 0x95fd15c8. diff --git a/gethwrappers3/demodynamicallydispatchedattestationverifier/demodynamicallydispatchedattestationverifier.go b/gethwrappers3/demodynamicallydispatchedattestationverifier/demodynamicallydispatchedattestationverifier.go index 0570e47e..ee8daa68 100644 --- a/gethwrappers3/demodynamicallydispatchedattestationverifier/demodynamicallydispatchedattestationverifier.go +++ b/gethwrappers3/demodynamicallydispatchedattestationverifier/demodynamicallydispatchedattestationverifier.go @@ -31,7 +31,7 @@ var ( // DemoDynamicallyDispatchedAttestationVerifierMetaData contains all meta data concerning the DemoDynamicallyDispatchedAttestationVerifier contract. var DemoDynamicallyDispatchedAttestationVerifierMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"verifierLibraryAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"n\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"keys\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"seqNr\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"attestation\",\"type\":\"bytes\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + ABI: "[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"verifierLibraryAddress\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"n\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"ocr3SignerPublicKeys\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"seqNr\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"attestation\",\"type\":\"bytes\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", Bin: "0x60e060405234801561001057600080fd5b5060405161083938038061083983398101604081905261002f916100b6565b6001600160a01b038116608081905260408051634b503f0b60e01b81528151849392634b503f0b92600480820193918290030181865afa158015610077573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061009b9190610103565b6001600160e01b031990811660c0521660a052506101369050565b6000602082840312156100c857600080fd5b81516001600160a01b03811681146100df57600080fd5b9392505050565b80516001600160e01b0319811681146100fe57600080fd5b919050565b6000806040838503121561011657600080fd5b61011f836100e6565b915061012d602084016100e6565b90509250929050565b60805160a05160c0516106d461016560003960006102e4015260006101de0152600061032e01526106d46000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80636f289d411461003b57806395fd15c814610050575b600080fd5b61004e610049366004610427565b610063565b005b61004e61005e3660046104d7565b610104565b6040805160608101825263ffffffff871680825260ff8781166020840181905290871692909301829052608080547fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000016909117640100000000909302929092177fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff16650100000000009091021790556100fd8483836101d7565b5050505050565b6040805160608101825260805463ffffffff8116825260ff64010000000082048116602084018190526501000000000090920416928201839052909161015191889188919088888861029c565b805160808054602084015160409094015163ffffffff9093167fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009091161764010000000060ff94851602177fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff166501000000000093909216929092021790555050505050565b60006102967f000000000000000000000000000000000000000000000000000000000000000082868686604051602401610214949392919061062d565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152610329565b50505050565b8251602080850191909120604080518084018b905267ffffffffffffffff8a16818301526060808201939093528151808203909301835260800190528051910120600061031e7f00000000000000000000000000000000000000000000000000000000000000008289898689896040516024016102149695949392919061065a565b505050505050505050565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16836040516103719190610698565b600060405180830381855af49150503d80600081146103ac576040519150601f19603f3d011682016040523d82523d6000602084013e6103b1565b606091505b5091509150816103c357805181602001fd5b505050565b803560ff811681146103d957600080fd5b919050565b60008083601f8401126103f057600080fd5b50813567ffffffffffffffff81111561040857600080fd5b60208301915083602082850101111561042057600080fd5b9250929050565b60008060008060006080868803121561043f57600080fd5b853563ffffffff8116811461045357600080fd5b9450610461602087016103c8565b935061046f604087016103c8565b9250606086013567ffffffffffffffff81111561048b57600080fd5b610497888289016103de565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000806000608086880312156104ef57600080fd5b85359450602086013567ffffffffffffffff808216821461050f57600080fd5b9094506040870135908082111561052557600080fd5b818801915088601f83011261053957600080fd5b81358181111561054b5761054b6104a8565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610591576105916104a8565b816040528281528b60208487010111156105aa57600080fd5b8260208601602083013760006020848301015280975050505060608801359150808211156105d757600080fd5b50610497888289016103de565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b84815260ff841660208201526060604082015260006106506060830184866105e4565b9695505050505050565b86815260ff8616602082015260ff8516604082015283606082015260a06080820152600061068c60a0830184866105e4565b98975050505050505050565b6000825160005b818110156106b9576020818601810151858301520161069f565b50600092019182525091905056fea164736f6c6343000813000a", } @@ -204,23 +204,23 @@ func (_DemoDynamicallyDispatchedAttestationVerifier *DemoDynamicallyDispatchedAt // SetConfig is a paid mutator transaction binding the contract method 0x6f289d41. // -// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes keys) returns() -func (_DemoDynamicallyDispatchedAttestationVerifier *DemoDynamicallyDispatchedAttestationVerifierTransactor) SetConfig(opts *bind.TransactOpts, configVersion uint32, n uint8, f uint8, keys []byte) (*types.Transaction, error) { - return _DemoDynamicallyDispatchedAttestationVerifier.contract.Transact(opts, "setConfig", configVersion, n, f, keys) +// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes ocr3SignerPublicKeys) returns() +func (_DemoDynamicallyDispatchedAttestationVerifier *DemoDynamicallyDispatchedAttestationVerifierTransactor) SetConfig(opts *bind.TransactOpts, configVersion uint32, n uint8, f uint8, ocr3SignerPublicKeys []byte) (*types.Transaction, error) { + return _DemoDynamicallyDispatchedAttestationVerifier.contract.Transact(opts, "setConfig", configVersion, n, f, ocr3SignerPublicKeys) } // SetConfig is a paid mutator transaction binding the contract method 0x6f289d41. // -// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes keys) returns() -func (_DemoDynamicallyDispatchedAttestationVerifier *DemoDynamicallyDispatchedAttestationVerifierSession) SetConfig(configVersion uint32, n uint8, f uint8, keys []byte) (*types.Transaction, error) { - return _DemoDynamicallyDispatchedAttestationVerifier.Contract.SetConfig(&_DemoDynamicallyDispatchedAttestationVerifier.TransactOpts, configVersion, n, f, keys) +// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes ocr3SignerPublicKeys) returns() +func (_DemoDynamicallyDispatchedAttestationVerifier *DemoDynamicallyDispatchedAttestationVerifierSession) SetConfig(configVersion uint32, n uint8, f uint8, ocr3SignerPublicKeys []byte) (*types.Transaction, error) { + return _DemoDynamicallyDispatchedAttestationVerifier.Contract.SetConfig(&_DemoDynamicallyDispatchedAttestationVerifier.TransactOpts, configVersion, n, f, ocr3SignerPublicKeys) } // SetConfig is a paid mutator transaction binding the contract method 0x6f289d41. // -// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes keys) returns() -func (_DemoDynamicallyDispatchedAttestationVerifier *DemoDynamicallyDispatchedAttestationVerifierTransactorSession) SetConfig(configVersion uint32, n uint8, f uint8, keys []byte) (*types.Transaction, error) { - return _DemoDynamicallyDispatchedAttestationVerifier.Contract.SetConfig(&_DemoDynamicallyDispatchedAttestationVerifier.TransactOpts, configVersion, n, f, keys) +// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes ocr3SignerPublicKeys) returns() +func (_DemoDynamicallyDispatchedAttestationVerifier *DemoDynamicallyDispatchedAttestationVerifierTransactorSession) SetConfig(configVersion uint32, n uint8, f uint8, ocr3SignerPublicKeys []byte) (*types.Transaction, error) { + return _DemoDynamicallyDispatchedAttestationVerifier.Contract.SetConfig(&_DemoDynamicallyDispatchedAttestationVerifier.TransactOpts, configVersion, n, f, ocr3SignerPublicKeys) } // Transmit is a paid mutator transaction binding the contract method 0x95fd15c8. diff --git a/gethwrappers3/demoecdsaattestationverifier/demoecdsaattestationverifier.go b/gethwrappers3/demoecdsaattestationverifier/demoecdsaattestationverifier.go index 9a08b9ed..985bd0d7 100644 --- a/gethwrappers3/demoecdsaattestationverifier/demoecdsaattestationverifier.go +++ b/gethwrappers3/demoecdsaattestationverifier/demoecdsaattestationverifier.go @@ -31,8 +31,8 @@ var ( // DemoECDSAAttestationVerifierMetaData contains all meta data concerning the DemoECDSAAttestationVerifier contract. var DemoECDSAAttestationVerifierMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"InvalidAttestationAttributionBitmask\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNumberOfKeys\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KeysOfInvalidSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaximumNumberOfKeysExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"n\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"keys\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"seqNr\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"attestation\",\"type\":\"bytes\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b50610985806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80636f289d411461003b57806395fd15c814610050575b600080fd5b61004e6100493660046105cd565b610063565b005b61004e61005e36600461067d565b610103565b6040805160608101825263ffffffff871680825260ff87811660208085018290529188169390940183905280547fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000016909117640100000000909302929092177fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff16650100000000009091021790556100fc8483836101d5565b5050505050565b604080516060810182526020805463ffffffff8116835260ff64010000000082048116928401839052650100000000009091041692820183905290916101509188918891908888886101e7565b8051602080548184015160409094015163ffffffff9093167fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009091161764010000000060ff94851602177fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff166501000000000093909216929092021790555050505050565b6101e26000848484610241565b505050565b8251602080850191909120604080518084018b905267ffffffffffffffff8a16818301526060808201939093528151808203909301835260800190528051910120610237600087878487876103ce565b5050505050505050565b61024c6014826107b9565b15610283576040517fadd4994500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60ff83166102926014836107fc565b146102c9576040517fa07f647e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208360ff161115610307576040517f1ede571b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8460ff168110156103c6576000848385610326826014610810565b9261033393929190610829565b61033c91610853565b60601c9050600081900361037c576040517f76d4e1e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff168783602081106103a5576103a561089b565b01556103b2601484610810565b925050806103bf906108ca565b905061030b565b505050505050565b60006103db856001610902565b60ff1690506103eb81604061091b565b6103f6906004610810565b821461042e576040517f1174ad8500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061043d6004828587610829565b61044691610932565b60e01c9050600160ff88161b811061048a576040517ff4e04eaa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080604051878152601b602082015260408101600488018c5b86156104ec5760018716156104e0576001850194506040828437604082019150600080526020600060808660015afa5060005181541495909501945b600196871c96016104a4565b50505050838214610529576040517fddbf0b4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838114610562576040517ff4e04eaa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b803560ff8116811461057f57600080fd5b919050565b60008083601f84011261059657600080fd5b50813567ffffffffffffffff8111156105ae57600080fd5b6020830191508360208285010111156105c657600080fd5b9250929050565b6000806000806000608086880312156105e557600080fd5b853563ffffffff811681146105f957600080fd5b94506106076020870161056e565b93506106156040870161056e565b9250606086013567ffffffffffffffff81111561063157600080fd5b61063d88828901610584565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60008060008060006080868803121561069557600080fd5b85359450602086013567ffffffffffffffff80821682146106b557600080fd5b909450604087013590808211156106cb57600080fd5b818801915088601f8301126106df57600080fd5b8135818111156106f1576106f161064e565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156107375761073761064e565b816040528281528b602084870101111561075057600080fd5b82602086016020830137600060208483010152809750505050606088013591508082111561077d57600080fd5b5061063d88828901610584565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826107c8576107c861078a565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008261080b5761080b61078a565b500490565b80820180821115610823576108236107cd565b92915050565b6000808585111561083957600080fd5b8386111561084657600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156108935780818660140360031b1b83161692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036108fb576108fb6107cd565b5060010190565b60ff8181168382160190811115610823576108236107cd565b8082028115828204841417610823576108236107cd565b7fffffffff0000000000000000000000000000000000000000000000000000000081358181169160048510156108935760049490940360031b84901b169092169291505056fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[],\"name\":\"DuplicateKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationAttributionBitmask\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNumberOfKeys\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KeysOfInvalidSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaximumNumberOfKeysExceeded\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"n\",\"type\":\"uint8\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"bytes\",\"name\":\"ocr3EcdsaSignerPublicKeys\",\"type\":\"bytes\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"configDigest\",\"type\":\"bytes32\"},{\"internalType\":\"uint64\",\"name\":\"seqNr\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"report\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"attestation\",\"type\":\"bytes\"}],\"name\":\"transmit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b50610ad3806100206000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80636f289d411461003b57806395fd15c814610050575b600080fd5b61004e61004936600461071b565b610063565b005b61004e61005e3660046107cb565b610103565b6040805160608101825263ffffffff871680825260ff87811660208085018290529188169390940183905280547fffffffffffffffffffffffffffffffffffffffffffffffffffffff000000000016909117640100000000909302929092177fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff16650100000000009091021790556100fc8483836101d5565b5050505050565b604080516060810182526020805463ffffffff8116835260ff64010000000082048116928401839052650100000000009091041692820183905290916101509188918891908888886101e7565b8051602080548184015160409094015163ffffffff9093167fffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000009091161764010000000060ff94851602177fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff166501000000000093909216929092021790555050505050565b6101e26000848484610241565b505050565b8251602080850191909120604080518084018b905267ffffffffffffffff8a16818301526060808201939093528151808203909301835260800190528051910120610237600087878487876104fd565b5050505050505050565b61024c601482610907565b15610283576040517fadd4994500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60ff831661029260148361094a565b146102c9576040517fa07f647e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208360ff161115610307576040517f1ede571b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61030f61069d565b6000805b8560ff1681101561041857600085838661032e82601461095e565b9261033b93929190610977565b610344916109a1565b60601c90506000819003610384576040517f76d4e1e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80848360208110610397576103976109e9565b602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff168883602081106103f7576103f76109e9565b015561040460148461095e565b9250508061041190610a18565b9050610313565b5060005b8560ff168110156104f457600061043482600161095e565b90505b8660ff168110156104e357838160208110610454576104546109e9565b602002015173ffffffffffffffffffffffffffffffffffffffff16848360208110610481576104816109e9565b602002015173ffffffffffffffffffffffffffffffffffffffff16036104d3576040517f96bfdb4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6104dc81610a18565b9050610437565b506104ed81610a18565b905061041c565b50505050505050565b600061050a856001610a50565b60ff16905061051a816040610a69565b61052590600461095e565b821461055d576040517f1174ad8500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600061056c6004828587610977565b61057591610a80565b60e01c9050600160ff88161b81106105b9576040517ff4e04eaa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080604051878152601b602082015260408101600488018c5b861561061b57600187161561060f576001850194506040828437604082019150600080526020600060808660015afa5060005181541495909501945b600196871c96016105d3565b50505050838214610658576040517fddbf0b4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838114610691576040517ff4e04eaa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b6040518061040001604052806020906020820280368337509192915050565b803560ff811681146106cd57600080fd5b919050565b60008083601f8401126106e457600080fd5b50813567ffffffffffffffff8111156106fc57600080fd5b60208301915083602082850101111561071457600080fd5b9250929050565b60008060008060006080868803121561073357600080fd5b853563ffffffff8116811461074757600080fd5b9450610755602087016106bc565b9350610763604087016106bc565b9250606086013567ffffffffffffffff81111561077f57600080fd5b61078b888289016106d2565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000806000806000608086880312156107e357600080fd5b85359450602086013567ffffffffffffffff808216821461080357600080fd5b9094506040870135908082111561081957600080fd5b818801915088601f83011261082d57600080fd5b81358181111561083f5761083f61079c565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019083821181831017156108855761088561079c565b816040528281528b602084870101111561089e57600080fd5b8260208601602083013760006020848301015280975050505060608801359150808211156108cb57600080fd5b5061078b888289016106d2565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082610916576109166108d8565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082610959576109596108d8565b500490565b808201808211156109715761097161091b565b92915050565b6000808585111561098757600080fd5b8386111561099457600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156109e15780818660140360031b1b83161692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610a4957610a4961091b565b5060010190565b60ff81811683821601908111156109715761097161091b565b80820281158282048414176109715761097161091b565b7fffffffff0000000000000000000000000000000000000000000000000000000081358181169160048510156109e15760049490940360031b84901b169092169291505056fea164736f6c6343000813000a", } // DemoECDSAAttestationVerifierABI is the input ABI used to generate the binding from. @@ -204,23 +204,23 @@ func (_DemoECDSAAttestationVerifier *DemoECDSAAttestationVerifierTransactorRaw) // SetConfig is a paid mutator transaction binding the contract method 0x6f289d41. // -// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes keys) returns() -func (_DemoECDSAAttestationVerifier *DemoECDSAAttestationVerifierTransactor) SetConfig(opts *bind.TransactOpts, configVersion uint32, n uint8, f uint8, keys []byte) (*types.Transaction, error) { - return _DemoECDSAAttestationVerifier.contract.Transact(opts, "setConfig", configVersion, n, f, keys) +// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes ocr3EcdsaSignerPublicKeys) returns() +func (_DemoECDSAAttestationVerifier *DemoECDSAAttestationVerifierTransactor) SetConfig(opts *bind.TransactOpts, configVersion uint32, n uint8, f uint8, ocr3EcdsaSignerPublicKeys []byte) (*types.Transaction, error) { + return _DemoECDSAAttestationVerifier.contract.Transact(opts, "setConfig", configVersion, n, f, ocr3EcdsaSignerPublicKeys) } // SetConfig is a paid mutator transaction binding the contract method 0x6f289d41. // -// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes keys) returns() -func (_DemoECDSAAttestationVerifier *DemoECDSAAttestationVerifierSession) SetConfig(configVersion uint32, n uint8, f uint8, keys []byte) (*types.Transaction, error) { - return _DemoECDSAAttestationVerifier.Contract.SetConfig(&_DemoECDSAAttestationVerifier.TransactOpts, configVersion, n, f, keys) +// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes ocr3EcdsaSignerPublicKeys) returns() +func (_DemoECDSAAttestationVerifier *DemoECDSAAttestationVerifierSession) SetConfig(configVersion uint32, n uint8, f uint8, ocr3EcdsaSignerPublicKeys []byte) (*types.Transaction, error) { + return _DemoECDSAAttestationVerifier.Contract.SetConfig(&_DemoECDSAAttestationVerifier.TransactOpts, configVersion, n, f, ocr3EcdsaSignerPublicKeys) } // SetConfig is a paid mutator transaction binding the contract method 0x6f289d41. // -// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes keys) returns() -func (_DemoECDSAAttestationVerifier *DemoECDSAAttestationVerifierTransactorSession) SetConfig(configVersion uint32, n uint8, f uint8, keys []byte) (*types.Transaction, error) { - return _DemoECDSAAttestationVerifier.Contract.SetConfig(&_DemoECDSAAttestationVerifier.TransactOpts, configVersion, n, f, keys) +// Solidity: function setConfig(uint32 configVersion, uint8 n, uint8 f, bytes ocr3EcdsaSignerPublicKeys) returns() +func (_DemoECDSAAttestationVerifier *DemoECDSAAttestationVerifierTransactorSession) SetConfig(configVersion uint32, n uint8, f uint8, ocr3EcdsaSignerPublicKeys []byte) (*types.Transaction, error) { + return _DemoECDSAAttestationVerifier.Contract.SetConfig(&_DemoECDSAAttestationVerifier.TransactOpts, configVersion, n, f, ocr3EcdsaSignerPublicKeys) } // Transmit is a paid mutator transaction binding the contract method 0x95fd15c8. diff --git a/gethwrappers3/ocr3dynamicallydispatchedblsattestationverifierlib/ocr3dynamicallydispatchedblsattestationverifierlib.go b/gethwrappers3/ocr3dynamicallydispatchedblsattestationverifierlib/ocr3dynamicallydispatchedblsattestationverifierlib.go index dcf523dc..c0361b56 100644 --- a/gethwrappers3/ocr3dynamicallydispatchedblsattestationverifierlib/ocr3dynamicallydispatchedblsattestationverifierlib.go +++ b/gethwrappers3/ocr3dynamicallydispatchedblsattestationverifierlib/ocr3dynamicallydispatchedblsattestationverifierlib.go @@ -204,8 +204,8 @@ func (_OCR3BLSAttestationVerifierLib *OCR3BLSAttestationVerifierLibTransactorRaw // OCR3DynamicallyDispatchedBLSAttestationVerifierLibMetaData contains all meta data concerning the OCR3DynamicallyDispatchedBLSAttestationVerifierLib contract. var OCR3DynamicallyDispatchedBLSAttestationVerifierLibMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"InvalidAttestation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationAttributionBitmask\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNumberOfKeys\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KeysOfInvalidSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaximumNumberOfKeysExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"getSelectors\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"},{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x61146f61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c806322c95de3146100505780634b503f0b14610065578063e5eae2f6146100be575b600080fd5b61006361005e366004611197565b6100de565b005b604080517fe5eae2f60000000000000000000000000000000000000000000000000000000081527f22c95de300000000000000000000000000000000000000000000000000000000602082015281519081900390910190f35b8180156100ca57600080fd5b506100636100d936600461120f565b6100f4565b6100ec868686868686610106565b505050505050565b61010084848484610230565b50505050565b60258114610140576040517f1174ad8500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61016b6040518060800160405280600081526020016000815260200160008152602001600081525090565b600061017c888860ff16868661056a565b909250905061018c866001611298565b60ff1681146101c7576040517fddbf0b4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080602160048701600037600051915086600052602160002090506101ee848284610728565b610224576040517fbd8ba84d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b61023b60a1826112e0565b15610272576040517fadd4994500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60ff831661028160a1836112f4565b146102b8576040517fa07f647e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208360ff1611156102f6576040517f1ede571b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103216040518060800160405280600081526020016000815260200160008152602001600081525090565b6103296110e5565b7f79537812dfe48a92fc860b8b010e8d6078b5c19e7037c4cf07f7bed69b54fffc8152610354611103565b6000805b8760ff168160ff16101561055f57868287610374602083611337565b9450610383928592919061134a565b61038c91611374565b8086526020808601919091528790839088906103a89083611337565b94506103b7928592919061134a565b6103c091611374565b602086810182905260408601919091528790839088906103e09083611337565b94506103ef928592919061134a565b6103f891611374565b604086018190526060850152868287610412602083611337565b9450610421928592919061134a565b61042a91611374565b6060860181905260808501526000878388610446602083611337565b9550610455928692919061134a565b61045e91611374565b9050600088888581811061047457610474611308565b9050013560f81c60f81b905060018461048d9190611337565b60a087208087527fff000000000000000000000000000000000000000000000000000000000000008316602088015260218720919550906104cf898286610728565b610505576040517f76d4e1e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b888d8660ff166020811061051b5761051b611308565b60040201600082015181600001556020820151816001015560408201518160020155606082015181600301559050505050505080610558906113b0565b9050610358565b505050505050505050565b6105956040518060800160405280600081526020016000815260200160008152602001600081525090565b6000806105a5600482868861134a565b6105ae916113cf565b60e01c90508015806105c357506001861b8110155b156105fa576040517ff4e04eaa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b8160011660000361061f5760019190911c9061061881611417565b90506105fd565b60019250600061067689836020811061063a5761063a611308565b600402016040518060800160405290816000820154815260200160018201548152602001600282015481526020016003820154815250506108aa565b905061068182611417565b9150600183901c92505b82156107115760018316156106fa576106ec818a84602081106106b0576106b0611308565b60040201604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050610919565b90506106f784611417565b93505b60019290921c9161070a82611417565b915061068b565b61071a81610bb4565b945050505094509492505050565b6000808080808061073887610c60565b9196509450925084610752576000955050505050506108a3565b61077d7fbfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8916610c60565b9196509250905084610797576000955050505050506108a3565b60006040518061018001604052808681526020018581526020017f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c281526020017f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed81526020017f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec81526020017f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d81526020018481526020018381526020018b6000015181526020018b6020015181526020018b6040015181526020018b606001518152509050610885611121565b6020816101808460085afa61089957600080fd5b5196505050505050505b9392505050565b6108e36040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b8151815260208083015190820152604080830151908201526060918201519181019190915260006080820152600160a082015290565b6109526040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b7f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47608084015160a08501518281830983818208905083848485098503858485090884858286098684860908858684870987038784870908885160208a015188898684098a88840908898a8885098b038b888509088d51935060208e015192508a848c03830891508a838c03820890508a828b0899508a818a089850898b8a8c099a508b8b8c089a508b8c8283098d038d8c8d09089950508a888c038b0899508a878c038a0898508a81830997508a88890897508a8b8384098c038c8384090896508a888c038b0899508a878c038a0898508960808d01528860a08d01528a8860040999508a8760040998508a8b8a84098c8c84090897508a8b8b84098c038c8b84090896508a8b8a86098c8c86090891508a8b8b86098c038c8b860908905060408d0151995060608d015198508a8b868c098c888c090893508a8b878c098c038c878c0908925060408e0151995060608e015198508a8a8c03850895508a898c03840894508a8660020993508a8560020992508a83850995508a86870895508a8b8586098c038c8586090894508a888c03870895508a878c03860894508a8b888c098c8a8c09088b8c8a8d098d038d8a8d09088c826002099b508c816002099a5050508a8260020997508a8160020996508a888c03870897508a878c0386089650878c528660208d01528a888c03830897508a878c0382089650505088898684098a88840908935088898784098a038a878409089250505086868803830895508685880382089450505050508160408501528060608501525050505b92915050565b610bdf6040518060800160405280600081526020016000815260200160008152602001600081525090565b600080610bf484608001518560a00151610df4565b91509150600080610c058484610ef8565b91509150610c1d828288600001518960200151610fbc565b60208701528552610c3082828686610fbc565b8092508193505050610c4c828288604001518960600151610fbc565b606087015260408601525092949350505050565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8216817f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478210610cbb57506000915081905080610ded565b60007f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4760037f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47857f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4787880909089050610d62816002610d5b7f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd476001611337565b901c611082565b9150807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4783840914610d9f57600080600093509350935050610ded565b60ff85901c600183168114610de6577f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47610dd9848261144f565b610de391906112e0565b92505b6001945050505b9193909250565b600080807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808687097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47868709089050610e7881610e7360027f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4761144f565b611082565b90507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4781610ec6877f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4761144f565b0992507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478185099150505b9250929050565b6000807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4784840991507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4782830891507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808586097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47037f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478586090890509250929050565b6000807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808488097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478688090891507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808588097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47037f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4785880908905094509492505050565b600060405160208152602080820152602060408201528360608201528260808201527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4760a082015260208160c08360055afa6110dd57600080fd5b519392505050565b6040518060a001604052806005906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b803560ff8116811461115057600080fd5b919050565b60008083601f84011261116757600080fd5b50813567ffffffffffffffff81111561117f57600080fd5b602083019150836020828501011115610ef157600080fd5b60008060008060008060a087890312156111b057600080fd5b863595506111c06020880161113f565b94506111ce6040880161113f565b935060608701359250608087013567ffffffffffffffff8111156111f157600080fd5b6111fd89828a01611155565b979a9699509497509295939492505050565b6000806000806060858703121561122557600080fd5b843593506112356020860161113f565b9250604085013567ffffffffffffffff81111561125157600080fd5b61125d87828801611155565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff8181168382160190811115610bae57610bae611269565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826112ef576112ef6112b1565b500690565b600082611303576113036112b1565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80820180821115610bae57610bae611269565b6000808585111561135a57600080fd5b8386111561136757600080fd5b5050820193919092039150565b80356020831015610bae577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b600060ff821660ff81036113c6576113c6611269565b60010192915050565b7fffffffff00000000000000000000000000000000000000000000000000000000813581811691600485101561140f5780818660040360031b1b83161692505b505092915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361144857611448611269565b5060010190565b81810381811115610bae57610bae61126956fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[],\"name\":\"DuplicateKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationAttributionBitmask\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNumberOfKeys\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KeysOfInvalidSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaximumNumberOfKeysExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"getSelectors\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"},{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", + Bin: "0x6116c961003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c806322c95de3146100505780634b503f0b14610065578063e5eae2f6146100be575b600080fd5b61006361005e3660046113f1565b6100de565b005b604080517fe5eae2f60000000000000000000000000000000000000000000000000000000081527f22c95de300000000000000000000000000000000000000000000000000000000602082015281519081900390910190f35b8180156100ca57600080fd5b506100636100d9366004611469565b6100f4565b6100ec868686868686610106565b505050505050565b61010084848484610230565b50505050565b60258114610140576040517f1174ad8500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61016b6040518060800160405280600081526020016000815260200160008152602001600081525090565b600061017c888860ff168686610773565b909250905061018c8660016114f2565b60ff1681146101c7576040517fddbf0b4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080602160048701600037600051915086600052602160002090506101ee848284610931565b610224576040517fbd8ba84d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b61023b60a18261153a565b15610272576040517fadd4994500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60ff831661028160a18361154e565b146102b8576040517fa07f647e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208360ff1611156102f6576040517f1ede571b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6102fe6112ee565b6103296040518060800160405280600081526020016000815260200160008152602001600081525090565b61033161133f565b7f79537812dfe48a92fc860b8b010e8d6078b5c19e7037c4cf07f7bed69b54fffc815261035c61135d565b6000805b8860ff168160ff1610156106005787828861037c602083611591565b945061038b92859291906115a4565b610394916115ce565b8086526020808601919091528890839089906103b09083611591565b94506103bf92859291906115a4565b6103c8916115ce565b602086810182905260408601919091528890839089906103e89083611591565b94506103f792859291906115a4565b610400916115ce565b60408601819052606085015287828861041a602083611591565b945061042992859291906115a4565b610432916115ce565b606086018190526080850152600088838961044e602083611591565b955061045d92869291906115a4565b610466916115ce565b9050600089898581811061047c5761047c611562565b9050013560f81c60f81b90506001846104959190611591565b60a087208087527fff000000000000000000000000000000000000000000000000000000000000008316602088015260218720919550906104d7898286610931565b61050d576040517f76d4e1e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b88518a60ff87166020811061052457610524611562565b6020020151600001818152505088602001518a8660ff166020811061054b5761054b611562565b6020020151602001818152505088604001518a8660ff166020811061057257610572611562565b6020020151604001818152505088606001518a8660ff166020811061059957610599611562565b60200201516060018181525050888e8660ff16602081106105bc576105bc611562565b600402016000820151816000015560208201518160010155604082015181600201556060820151816003015590505050505050806105f99061160a565b9050610360565b5060005b8860ff1681101561022457600061061c826001611591565b90505b8960ff168110156107625786816020811061063c5761063c611562565b60200201516000015187836020811061065757610657611562565b60200201515114801561069d575086816020811061067757610677611562565b60200201516020015187836020811061069257610692611562565b602002015160200151145b80156106dc57508681602081106106b6576106b6611562565b6020020151604001518783602081106106d1576106d1611562565b602002015160400151145b801561071b57508681602081106106f5576106f5611562565b60200201516060015187836020811061071057610710611562565b602002015160600151145b15610752576040517f96bfdb4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61075b81611629565b905061061f565b5061076c81611629565b9050610604565b61079e6040518060800160405280600081526020016000815260200160008152602001600081525090565b6000806107ae60048286886115a4565b6107b791611661565b60e01c90508015806107cc57506001861b8110155b15610803576040517ff4e04eaa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b816001166000036108285760019190911c9061082181611629565b9050610806565b60019250600061087f89836020811061084357610843611562565b60040201604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050610ab3565b905061088a82611629565b9150600183901c92505b821561091a576001831615610903576108f5818a84602081106108b9576108b9611562565b60040201604051806080016040529081600082015481526020016001820154815260200160028201548152602001600382015481525050610b22565b905061090084611629565b93505b60019290921c9161091382611629565b9150610894565b61092381610dbd565b945050505094509492505050565b6000808080808061094187610e69565b919650945092508461095b57600095505050505050610aac565b6109867fbfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8916610e69565b91965092509050846109a057600095505050505050610aac565b60006040518061018001604052808681526020018581526020017f198e9393920d483a7260bfb731fb5d25f1aa493335a9e71297e485b7aef312c281526020017f1800deef121f1e76426a00665e5c4479674322d4f75edadd46debd5cd992f6ed81526020017f275dc4a288d1afb3cbb1ac09187524c7db36395df7be3b99e673b13a075a65ec81526020017f1d9befcd05a5323e6da4d435f3b617cdb3af83285c2df711ef39c01571827f9d81526020018481526020018381526020018b6000015181526020018b6020015181526020018b6040015181526020018b606001518152509050610a8e61137b565b6020816101808460085afa610aa257600080fd5b5196505050505050505b9392505050565b610aec6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b8151815260208083015190820152604080830151908201526060918201519181019190915260006080820152600160a082015290565b610b5b6040518060c001604052806000815260200160008152602001600081526020016000815260200160008152602001600081525090565b7f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47608084015160a08501518281830983818208905083848485098503858485090884858286098684860908858684870987038784870908885160208a015188898684098a88840908898a8885098b038b888509088d51935060208e015192508a848c03830891508a838c03820890508a828b0899508a818a089850898b8a8c099a508b8b8c089a508b8c8283098d038d8c8d09089950508a888c038b0899508a878c038a0898508a81830997508a88890897508a8b8384098c038c8384090896508a888c038b0899508a878c038a0898508960808d01528860a08d01528a8860040999508a8760040998508a8b8a84098c8c84090897508a8b8b84098c038c8b84090896508a8b8a86098c8c86090891508a8b8b86098c038c8b860908905060408d0151995060608d015198508a8b868c098c888c090893508a8b878c098c038c878c0908925060408e0151995060608e015198508a8a8c03850895508a898c03840894508a8660020993508a8560020992508a83850995508a86870895508a8b8586098c038c8586090894508a888c03870895508a878c03860894508a8b888c098c8a8c09088b8c8a8d098d038d8a8d09088c826002099b508c816002099a5050508a8260020997508a8160020996508a888c03870897508a878c0386089650878c528660208d01528a888c03830897508a878c0382089650505088898684098a88840908935088898784098a038a878409089250505086868803830895508685880382089450505050508160408501528060608501525050505b92915050565b610de86040518060800160405280600081526020016000815260200160008152602001600081525090565b600080610dfd84608001518560a00151610ffd565b91509150600080610e0e8484611101565b91509150610e268282886000015189602001516111c5565b60208701528552610e39828286866111c5565b8092508193505050610e558282886040015189606001516111c5565b606087015260408601525092949350505050565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8216817f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478210610ec457506000915081905080610ff6565b60007f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4760037f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47857f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4787880909089050610f6b816002610f647f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd476001611591565b901c61128b565b9150807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4783840914610fa857600080600093509350935050610ff6565b60ff85901c600183168114610fef577f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47610fe284826116a9565b610fec919061153a565b92505b6001945050505b9193909250565b600080807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808687097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478687090890506110818161107c60027f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd476116a9565b61128b565b90507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47816110cf877f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd476116a9565b0992507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478185099150505b9250929050565b6000807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4784840991507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4782830891507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808586097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47037f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478586090890509250929050565b6000807f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808488097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd478688090891507f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47808588097f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd47037f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4785880908905094509492505050565b600060405160208152602080820152602060408201528360608201528260808201527f30644e72e131a029b85045b68181585d97816a916871ca8d3c208c16d87cfd4760a082015260208160c08360055afa6112e657600080fd5b519392505050565b6040518061040001604052806020905b6113296040518060800160405280600081526020016000815260200160008152602001600081525090565b8152602001906001900390816112fe5790505090565b6040518060a001604052806005906020820280368337509192915050565b60405180604001604052806002906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b803560ff811681146113aa57600080fd5b919050565b60008083601f8401126113c157600080fd5b50813567ffffffffffffffff8111156113d957600080fd5b6020830191508360208285010111156110fa57600080fd5b60008060008060008060a0878903121561140a57600080fd5b8635955061141a60208801611399565b945061142860408801611399565b935060608701359250608087013567ffffffffffffffff81111561144b57600080fd5b61145789828a016113af565b979a9699509497509295939492505050565b6000806000806060858703121561147f57600080fd5b8435935061148f60208601611399565b9250604085013567ffffffffffffffff8111156114ab57600080fd5b6114b7878288016113af565b95989497509550505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff8181168382160190811115610db757610db76114c3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826115495761154961150b565b500690565b60008261155d5761155d61150b565b500490565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b80820180821115610db757610db76114c3565b600080858511156115b457600080fd5b838611156115c157600080fd5b5050820193919092039150565b80356020831015610db7577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff602084900360031b1b1692915050565b600060ff821660ff8103611620576116206114c3565b60010192915050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361165a5761165a6114c3565b5060010190565b7fffffffff0000000000000000000000000000000000000000000000000000000081358181169160048510156116a15780818660040360031b1b83161692505b505092915050565b81810381811115610db757610db76114c356fea164736f6c6343000813000a", } // OCR3DynamicallyDispatchedBLSAttestationVerifierLibABI is the input ABI used to generate the binding from. diff --git a/gethwrappers3/ocr3dynamicallydispatchedecdsaattestationverifierlib/ocr3dynamicallydispatchedecdsaattestationverifierlib.go b/gethwrappers3/ocr3dynamicallydispatchedecdsaattestationverifierlib/ocr3dynamicallydispatchedecdsaattestationverifierlib.go index d58e2b0d..8ab5faaa 100644 --- a/gethwrappers3/ocr3dynamicallydispatchedecdsaattestationverifierlib/ocr3dynamicallydispatchedecdsaattestationverifierlib.go +++ b/gethwrappers3/ocr3dynamicallydispatchedecdsaattestationverifierlib/ocr3dynamicallydispatchedecdsaattestationverifierlib.go @@ -31,8 +31,8 @@ var ( // OCR3DynamicallyDispatchedECDSAAttestationVerifierLibMetaData contains all meta data concerning the OCR3DynamicallyDispatchedECDSAAttestationVerifierLib contract. var OCR3DynamicallyDispatchedECDSAAttestationVerifierLibMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"name\":\"InvalidAttestationAttributionBitmask\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNumberOfKeys\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KeysOfInvalidSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaximumNumberOfKeysExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"getSelectors\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"},{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x61075761003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c806349e333a6146100505780634b503f0b146100725780635cc513a6146100cb575b600080fd5b81801561005c57600080fd5b5061007061006b36600461048a565b6100de565b005b604080517f49e333a60000000000000000000000000000000000000000000000000000000081527f5cc513a600000000000000000000000000000000000000000000000000000000602082015281519081900390910190f35b6100706100d93660046104e4565b6100f0565b6100ea84848484610106565b50505050565b6100fe86868686868661028b565b505050505050565b61011160148261058b565b15610148576040517fadd4994500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60ff83166101576014836105ce565b1461018e576040517fa07f647e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208360ff1611156101cc576040517f1ede571b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000805b8460ff168110156100fe5760008483856101eb8260146105e2565b926101f8939291906105fb565b61020191610625565b60601c90506000819003610241576040517f76d4e1e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1687836020811061026a5761026a61066d565b01556102776014846105e2565b925050806102849061069c565b90506101d0565b60006102988560016106d4565b60ff1690506102a88160406106ed565b6102b39060046105e2565b82146102eb576040517f1174ad8500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006102fa60048285876105fb565b61030391610704565b60e01c9050600160ff88161b8110610347576040517ff4e04eaa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080604051878152601b602082015260408101600488018c5b86156103a957600187161561039d576001850194506040828437604082019150600080526020600060808660015afa5060005181541495909501945b600196871c9601610361565b505050508382146103e6576040517fddbf0b4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b83811461041f576040517ff4e04eaa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b803560ff8116811461043c57600080fd5b919050565b60008083601f84011261045357600080fd5b50813567ffffffffffffffff81111561046b57600080fd5b60208301915083602082850101111561048357600080fd5b9250929050565b600080600080606085870312156104a057600080fd5b843593506104b06020860161042b565b9250604085013567ffffffffffffffff8111156104cc57600080fd5b6104d887828801610441565b95989497509550505050565b60008060008060008060a087890312156104fd57600080fd5b8635955061050d6020880161042b565b945061051b6040880161042b565b935060608701359250608087013567ffffffffffffffff81111561053e57600080fd5b61054a89828a01610441565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261059a5761059a61055c565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000826105dd576105dd61055c565b500490565b808201808211156105f5576105f561059f565b92915050565b6000808585111561060b57600080fd5b8386111561061857600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156106655780818660140360031b1b83161692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036106cd576106cd61059f565b5060010190565b60ff81811683821601908111156105f5576105f561059f565b80820281158282048414176105f5576105f561059f565b7fffffffff0000000000000000000000000000000000000000000000000000000081358181169160048510156106655760049490940360031b84901b169092169291505056fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[],\"name\":\"DuplicateKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationAttributionBitmask\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationLength\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidAttestationNumberOfSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidNumberOfKeys\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"KeysOfInvalidSize\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MaximumNumberOfKeysExceeded\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"getSelectors\",\"outputs\":[{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"},{\"internalType\":\"bytes4\",\"name\":\"\",\"type\":\"bytes4\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", + Bin: "0x6108ad61003a600b82828239805160001a60731461002d57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061004b5760003560e01c806349e333a6146100505780634b503f0b146100725780635cc513a6146100cb575b600080fd5b81801561005c57600080fd5b5061007061006b3660046105e0565b6100de565b005b604080517f49e333a60000000000000000000000000000000000000000000000000000000081527f5cc513a600000000000000000000000000000000000000000000000000000000602082015281519081900390910190f35b6100706100d936600461063a565b6100f0565b6100ea84848484610106565b50505050565b6100fe8686868686866103c2565b505050505050565b6101116014826106e1565b15610148576040517fadd4994500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60ff8316610157601483610724565b1461018e576040517fa07f647e00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60208360ff1611156101cc576040517f1ede571b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6101d4610562565b6000805b8560ff168110156102dd5760008583866101f3826014610738565b9261020093929190610751565b6102099161077b565b60601c90506000819003610249576040517f76d4e1e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8084836020811061025c5761025c6107c3565b602002019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508073ffffffffffffffffffffffffffffffffffffffff168883602081106102bc576102bc6107c3565b01556102c9601484610738565b925050806102d6906107f2565b90506101d8565b5060005b8560ff168110156103b95760006102f9826001610738565b90505b8660ff168110156103a857838160208110610319576103196107c3565b602002015173ffffffffffffffffffffffffffffffffffffffff16848360208110610346576103466107c3565b602002015173ffffffffffffffffffffffffffffffffffffffff1603610398576040517f96bfdb4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6103a1816107f2565b90506102fc565b506103b2816107f2565b90506102e1565b50505050505050565b60006103cf85600161082a565b60ff1690506103df816040610843565b6103ea906004610738565b8214610422576040517f1174ad8500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006104316004828587610751565b61043a9161085a565b60e01c9050600160ff88161b811061047e576040517ff4e04eaa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080604051878152601b602082015260408101600488018c5b86156104e05760018716156104d4576001850194506040828437604082019150600080526020600060808660015afa5060005181541495909501945b600196871c9601610498565b5050505083821461051d576040517fddbf0b4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b838114610556576040517ff4e04eaa00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b6040518061040001604052806020906020820280368337509192915050565b803560ff8116811461059257600080fd5b919050565b60008083601f8401126105a957600080fd5b50813567ffffffffffffffff8111156105c157600080fd5b6020830191508360208285010111156105d957600080fd5b9250929050565b600080600080606085870312156105f657600080fd5b8435935061060660208601610581565b9250604085013567ffffffffffffffff81111561062257600080fd5b61062e87828801610597565b95989497509550505050565b60008060008060008060a0878903121561065357600080fd5b8635955061066360208801610581565b945061067160408801610581565b935060608701359250608087013567ffffffffffffffff81111561069457600080fd5b6106a089828a01610597565b979a9699509497509295939492505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000826106f0576106f06106b2565b500690565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082610733576107336106b2565b500490565b8082018082111561074b5761074b6106f5565b92915050565b6000808585111561076157600080fd5b8386111561076e57600080fd5b5050820193919092039150565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156107bb5780818660140360031b1b83161692505b505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610823576108236106f5565b5060010190565b60ff818116838216019081111561074b5761074b6106f5565b808202811582820484141761074b5761074b6106f5565b7fffffffff0000000000000000000000000000000000000000000000000000000081358181169160048510156107bb5760049490940360031b84901b169092169291505056fea164736f6c6343000813000a", } // OCR3DynamicallyDispatchedECDSAAttestationVerifierLibABI is the input ABI used to generate the binding from. diff --git a/go.mod b/go.mod index 8b13021a..87c316ea 100644 --- a/go.mod +++ b/go.mod @@ -1,18 +1,17 @@ module github.com/smartcontractkit/libocr -go 1.24.0 +go 1.26.4 require ( github.com/cockroachdb/pebble v1.1.5 - github.com/ethereum/go-ethereum v1.17.0 + github.com/ethereum/go-ethereum v1.17.4 github.com/google/btree v1.1.3 github.com/leanovate/gopter v0.2.11 github.com/mr-tron/base58 v1.2.0 github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.15.0 + github.com/prometheus/client_golang v1.23.2 github.com/sirupsen/logrus v1.9.3 - golang.org/x/crypto v0.44.0 - golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f + golang.org/x/crypto v0.53.0 google.golang.org/protobuf v1.36.11 ) @@ -34,16 +33,17 @@ require ( github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/consensys/gnark-crypto v0.18.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.5 // indirect - github.com/crate-crypto/go-eth-kzg v1.4.0 // indirect + github.com/crate-crypto/go-eth-kzg v1.5.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/dchest/siphash v1.2.3 // indirect github.com/deckarep/golang-set/v2 v2.6.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect github.com/deepmap/oapi-codegen v1.8.2 // indirect github.com/emicklei/dot v1.6.2 // indirect - github.com/ethereum/c-kzg-4844/v2 v2.1.5 // indirect + github.com/ethereum/c-kzg-4844/v2 v2.1.6 // indirect github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab // indirect github.com/ferranbt/fastssz v0.1.4 // indirect + github.com/fjl/jsonw v0.1.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect github.com/getsentry/sentry-go v0.27.0 // indirect @@ -53,7 +53,6 @@ require ( github.com/gofrs/flock v0.12.1 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.5.2 // indirect - github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v1.0.0 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.4.2 // indirect @@ -76,45 +75,47 @@ require ( github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect - github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/minio/sha256-simd v1.0.0 // indirect github.com/mitchellh/mapstructure v1.4.1 // indirect github.com/mitchellh/pointerstructure v1.2.0 // indirect + github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect github.com/onsi/ginkgo v1.14.1 // indirect github.com/onsi/gomega v1.10.3 // indirect github.com/opentracing/opentracing-go v1.2.0 // indirect github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 // indirect - github.com/pion/dtls/v2 v2.2.7 // indirect - github.com/pion/logging v0.2.2 // indirect - github.com/pion/stun/v2 v2.0.0 // indirect - github.com/pion/transport/v2 v2.2.1 // indirect - github.com/pion/transport/v3 v3.0.1 // indirect - github.com/prometheus/client_model v0.3.0 // indirect - github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.9.0 // indirect + github.com/pion/dtls/v3 v3.1.2 // indirect + github.com/pion/logging v0.2.4 // indirect + github.com/pion/stun/v3 v3.1.2 // indirect + github.com/pion/transport/v4 v4.0.1 // indirect + github.com/prometheus/client_model v0.6.2 // indirect + github.com/prometheus/common v0.66.1 // indirect + github.com/prometheus/procfs v0.16.1 // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/rogpeppe/go-internal v1.14.1 // indirect github.com/rs/cors v1.7.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect github.com/smartcontractkit/go-sumtype2 v0.0.0-20250903174514-31585731b5a3 // indirect - github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe // indirect + github.com/supranational/blst v0.3.16 // indirect github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect github.com/tklauser/numcpus v0.6.1 // indirect github.com/urfave/cli/v2 v2.27.5 // indirect + github.com/wlynxg/anet v0.0.5 // indirect github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 // indirect go.opentelemetry.io/auto/sdk v1.2.1 // indirect - go.opentelemetry.io/otel v1.39.0 // indirect - go.opentelemetry.io/otel/metric v1.39.0 // indirect - go.opentelemetry.io/otel/trace v1.39.0 // indirect - golang.org/x/mod v0.29.0 // indirect - golang.org/x/net v0.47.0 // indirect - golang.org/x/sync v0.18.0 // indirect - golang.org/x/sys v0.39.0 // indirect - golang.org/x/text v0.31.0 // indirect - golang.org/x/time v0.9.0 // indirect - golang.org/x/tools v0.38.0 // indirect + go.opentelemetry.io/otel v1.41.0 // indirect + go.opentelemetry.io/otel/metric v1.41.0 // indirect + go.opentelemetry.io/otel/trace v1.41.0 // indirect + go.yaml.in/yaml/v2 v2.4.2 // indirect + golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect + golang.org/x/mod v0.36.0 // indirect + golang.org/x/net v0.55.0 // indirect + golang.org/x/sync v0.21.0 // indirect + golang.org/x/sys v0.46.0 // indirect + golang.org/x/text v0.38.0 // indirect + golang.org/x/time v0.10.0 // indirect + golang.org/x/tools v0.45.0 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect diff --git a/go.sum b/go.sum index d79d639a..e6706f40 100644 --- a/go.sum +++ b/go.sum @@ -36,8 +36,8 @@ github.com/consensys/gnark-crypto v0.18.1 h1:RyLV6UhPRoYYzaFnPQA4qK3DyuDgkTgskDd github.com/consensys/gnark-crypto v0.18.1/go.mod h1:L3mXGFTe1ZN+RSJ+CLjUt9x7PNdx8ubaYfDROyp2Z8c= github.com/cpuguy83/go-md2man/v2 v2.0.5 h1:ZtcqGrnekaHpVLArFSe4HK5DoKx1T0rq2DwVB0alcyc= github.com/cpuguy83/go-md2man/v2 v2.0.5/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/crate-crypto/go-eth-kzg v1.4.0 h1:WzDGjHk4gFg6YzV0rJOAsTK4z3Qkz5jd4RE3DAvPFkg= -github.com/crate-crypto/go-eth-kzg v1.4.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI= +github.com/crate-crypto/go-eth-kzg v1.5.0 h1:FYRiJMJG2iv+2Dy3fi14SVGjcPteZ5HAAUe4YWlJygc= +github.com/crate-crypto/go-eth-kzg v1.5.0/go.mod h1:J9/u5sWfznSObptgfa92Jq8rTswn6ahQWEuiLHOjCUI= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -57,14 +57,16 @@ github.com/deepmap/oapi-codegen v1.8.2/go.mod h1:YLgSKSDv/bZQB7N4ws6luhozi3cEdRk github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/emicklei/dot v1.6.2 h1:08GN+DD79cy/tzN6uLCT84+2Wk9u+wvqP+Hkx/dIR8A= github.com/emicklei/dot v1.6.2/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= -github.com/ethereum/c-kzg-4844/v2 v2.1.5 h1:aVtoLK5xwJ6c5RiqO8g8ptJ5KU+2Hdquf6G3aXiHh5s= -github.com/ethereum/c-kzg-4844/v2 v2.1.5/go.mod h1:u59hRTTah4Co6i9fDWtiCjTrblJv0UwsqZKCc0GfgUs= +github.com/ethereum/c-kzg-4844/v2 v2.1.6 h1:xQymkKCT5E2Jiaoqf3v4wsNgjZLY0lRSkZn27fRjSls= +github.com/ethereum/c-kzg-4844/v2 v2.1.6/go.mod h1:8HMkUZ5JRv4hpw/XUrYWSQNAUzhHMg2UDb/U+5m+XNw= github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab h1:rvv6MJhy07IMfEKuARQ9TKojGqLVNxQajaXEp/BoqSk= github.com/ethereum/go-bigmodexpfix v0.0.0-20250911101455-f9e208c548ab/go.mod h1:IuLm4IsPipXKF7CW5Lzf68PIbZ5yl7FFd74l/E0o9A8= -github.com/ethereum/go-ethereum v1.17.0 h1:2D+1Fe23CwZ5tQoAS5DfwKFNI1HGcTwi65/kRlAVxes= -github.com/ethereum/go-ethereum v1.17.0/go.mod h1:2W3msvdosS/MCWytpqTcqgFiRYbTH59FxDJzqah120o= +github.com/ethereum/go-ethereum v1.17.4 h1:uA4q+qiLp7QImBsjdRbINu8iX6OEVmj4DPc5/E5Fsxc= +github.com/ethereum/go-ethereum v1.17.4/go.mod h1:qMdgwqqRAen+aT8P7KKQKi0Qt6RzG4cfejVAbCpJgqA= github.com/ferranbt/fastssz v0.1.4 h1:OCDB+dYDEQDvAgtAGnTSidK1Pe2tW3nFV40XyMkTeDY= github.com/ferranbt/fastssz v0.1.4/go.mod h1:Ea3+oeoRGGLGm5shYAeDgu6PGUlcvQhE2fILyD9+tGg= +github.com/fjl/jsonw v0.1.0 h1:V3MyR79fjLpn/+bMgvegdGUIhoJOzjmqWcKDgcOmY1I= +github.com/fjl/jsonw v0.1.0/go.mod h1:2KMLevM6FXEJnfhtk7naXu9vZdVfOma1GlnGdPRlumU= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= @@ -96,15 +98,12 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69 github.com/golang-jwt/jwt/v4 v4.5.2 h1:YtQM7lnr8iZ+j5q71MGKkNw9Mn7AjHM68uc9g5fXeUI= github.com/golang-jwt/jwt/v4 v4.5.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v1.0.0 h1:Oy607GVXHs7RtbggtPBnr2RmDArIsAefDwvrdWvRhGs= github.com/golang/snappy v1.0.0/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= @@ -186,8 +185,6 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= @@ -196,6 +193,8 @@ github.com/mitchellh/pointerstructure v1.2.0 h1:O+i9nHnXS3l/9Wu7r4NrEdwA2VFTicjU github.com/mitchellh/pointerstructure v1.2.0/go.mod h1:BRAsLI5zgXmw97Lf6s25bs8ohIXc3tViBH44KcwB2g4= github.com/mr-tron/base58 v1.2.0 h1:T/HDJBh4ZCPbU39/+c3rRvE0uKBQlU27+QI8LJ4t64o= github.com/mr-tron/base58 v1.2.0/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= +github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -214,30 +213,28 @@ github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7 h1:oYW+YCJ1pachXTQm github.com/peterh/liner v1.1.1-0.20190123174540-a2c9a5303de7/go.mod h1:CRroGNssyjTd/qIG2FyxByd2S8JEAZXBl4qUrZf8GS0= github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4= github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8= -github.com/pion/dtls/v2 v2.2.7 h1:cSUBsETxepsCSFSxC3mc/aDo14qQLMSL+O6IjG28yV8= -github.com/pion/dtls/v2 v2.2.7/go.mod h1:8WiMkebSHFD0T+dIU+UeBaoV7kDhOW5oDCzZ7WZ/F9s= -github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY= -github.com/pion/logging v0.2.2/go.mod h1:k0/tDVsRCX2Mb2ZEmTqNa7CWsQPc+YYCB7Q+5pahoms= -github.com/pion/stun/v2 v2.0.0 h1:A5+wXKLAypxQri59+tmQKVs7+l6mMM+3d+eER9ifRU0= -github.com/pion/stun/v2 v2.0.0/go.mod h1:22qRSh08fSEttYUmJZGlriq9+03jtVmXNODgLccj8GQ= -github.com/pion/transport/v2 v2.2.1 h1:7qYnCBlpgSJNYMbLCKuSY9KbQdBFoETvPNETv0y4N7c= -github.com/pion/transport/v2 v2.2.1/go.mod h1:cXXWavvCnFF6McHTft3DWS9iic2Mftcz1Aq29pGcU5g= -github.com/pion/transport/v3 v3.0.1 h1:gDTlPJwROfSfz6QfSi0ZmeCSkFcnWWiiR9ES0ouANiM= -github.com/pion/transport/v3 v3.0.1/go.mod h1:UY7kiITrlMv7/IKgd5eTUcaahZx5oUN3l9SzK5f5xE0= +github.com/pion/dtls/v3 v3.1.2 h1:gqEdOUXLtCGW+afsBLO0LtDD8GnuBBjEy6HRtyofZTc= +github.com/pion/dtls/v3 v3.1.2/go.mod h1:Hw/igcX4pdY69z1Hgv5x7wJFrUkdgHwAn/Q/uo7YHRo= +github.com/pion/logging v0.2.4 h1:tTew+7cmQ+Mc1pTBLKH2puKsOvhm32dROumOZ655zB8= +github.com/pion/logging v0.2.4/go.mod h1:DffhXTKYdNZU+KtJ5pyQDjvOAh/GsNSyv1lbkFbe3so= +github.com/pion/stun/v3 v3.1.2 h1:86IhD8wFn6IDW4b1/0QzoQS+f5PeA8OHHRn8UZW5ErY= +github.com/pion/stun/v3 v3.1.2/go.mod h1:H7gDic7nNwlUL05pbs6T1dtaBehh/KjupxfWw3ZI7cA= +github.com/pion/transport/v4 v4.0.1 h1:sdROELU6BZ63Ab7FrOLn13M6YdJLY20wldXW2Cu2k8o= +github.com/pion/transport/v4 v4.0.1/go.mod h1:nEuEA4AD5lPdcIegQDpVLgNoDGreqM/YqmEx3ovP4jM= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.15.0 h1:5fCgGYogn0hFdhyhLbw7hEsWxufKtY9klyvdNfFlFhM= -github.com/prometheus/client_golang v1.15.0/go.mod h1:e9yaBhRPU2pPNsZwE+JdQl0KEt1N9XgF6zxWmaC0xOk= -github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= -github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= -github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= -github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= -github.com/prometheus/procfs v0.9.0 h1:wzCHvIvM5SxWqYvwgVL7yJY8Lz3PKn49KQtpgMYJfhI= -github.com/prometheus/procfs v0.9.0/go.mod h1:+pB4zwohETzFnmlpe6yd2lSc+0/46IYZRB/chUwxUZY= +github.com/prometheus/client_golang v1.23.2 h1:Je96obch5RDVy3FDMndoUsjAhG5Edi49h0RJWRi/o0o= +github.com/prometheus/client_golang v1.23.2/go.mod h1:Tb1a6LWHB3/SPIzCoaDXI4I8UHKeFTEQ1YCr+0Gyqmg= +github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk= +github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE= +github.com/prometheus/common v0.66.1 h1:h5E0h5/Y8niHc5DlaLlWLArTQI7tMrsfQjHV+d9ZoGs= +github.com/prometheus/common v0.66.1/go.mod h1:gcaUsgf3KfRSwHY4dIMXLPV0K/Wg1oZ8+SbZk/HH/dA= +github.com/prometheus/procfs v0.16.1 h1:hZ15bTNuirocR6u0JZ6BAHHmwS1p8B4P6MRqxtzMyRg= +github.com/prometheus/procfs v0.16.1/go.mod h1:teAbpZRB1iIAJYREa1LsoWUXykVXA1KlTmWl8x/U+Is= github.com/prysmaticlabs/gohashtree v0.0.4-beta h1:H/EbCuXPeTV3lpKeXGPpEV9gsUpkqOOVnWapUyeWro4= github.com/prysmaticlabs/gohashtree v0.0.4-beta/go.mod h1:BFdtALS+Ffhg3lGQIHv9HDWuHS8cTvHZzrHWxwOtGOs= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= @@ -256,22 +253,16 @@ github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVs github.com/smartcontractkit/go-sumtype2 v0.0.0-20250903174514-31585731b5a3 h1:8DQfNbAPbN749k+XRi1tK+Ofur5eq0VHDypnwipqluw= github.com/smartcontractkit/go-sumtype2 v0.0.0-20250903174514-31585731b5a3/go.mod h1:z89MmYNUz23UMWPgHr/26uYyeWJjTtlDvLS+xOS3sAs= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= -github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe h1:nbdqkIGOGfUAD54q1s2YBcBz/WcsxCO9HUQ4aGV5hUw= -github.com/supranational/blst v0.3.16-0.20250831170142-f48500c1fdbe/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= +github.com/supranational/blst v0.3.16 h1:bTDadT+3fK497EvLdWRQEjiGnUtzJ7jjIUMF0jqwYhE= +github.com/supranational/blst v0.3.16/go.mod h1:jZJtfjgudtNl4en1tzwPIV3KjUnQUvG3/j+w+fVonLw= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= @@ -283,39 +274,39 @@ github.com/urfave/cli/v2 v2.27.5/go.mod h1:3Sevf16NykTbInEnD0yKkjDAeZDS0A6bzhBH5 github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= github.com/valyala/fasttemplate v1.2.1/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= +github.com/wlynxg/anet v0.0.5 h1:J3VJGi1gvo0JwZ/P1/Yc/8p63SoW98B5dHkYDmpgvvU= +github.com/wlynxg/anet v0.0.5/go.mod h1:eay5PRQr7fIVAMbTbchTnO9gG65Hg/uYGdc7mguHxoA= github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= go.opentelemetry.io/auto/sdk v1.2.1 h1:jXsnJ4Lmnqd11kwkBV2LgLoFMZKizbCi5fNZ/ipaZ64= go.opentelemetry.io/auto/sdk v1.2.1/go.mod h1:KRTj+aOaElaLi+wW1kO/DZRXwkF4C5xPbEe3ZiIhN7Y= -go.opentelemetry.io/otel v1.39.0 h1:8yPrr/S0ND9QEfTfdP9V+SiwT4E0G7Y5MO7p85nis48= -go.opentelemetry.io/otel v1.39.0/go.mod h1:kLlFTywNWrFyEdH0oj2xK0bFYZtHRYUdv1NklR/tgc8= -go.opentelemetry.io/otel/metric v1.39.0 h1:d1UzonvEZriVfpNKEVmHXbdf909uGTOQjA0HF0Ls5Q0= -go.opentelemetry.io/otel/metric v1.39.0/go.mod h1:jrZSWL33sD7bBxg1xjrqyDjnuzTUB0x1nBERXd7Ftcs= -go.opentelemetry.io/otel/sdk v1.39.0 h1:nMLYcjVsvdui1B/4FRkwjzoRVsMK8uL/cj0OyhKzt18= -go.opentelemetry.io/otel/sdk v1.39.0/go.mod h1:vDojkC4/jsTJsE+kh+LXYQlbL8CgrEcwmt1ENZszdJE= -go.opentelemetry.io/otel/trace v1.39.0 h1:2d2vfpEDmCJ5zVYz7ijaJdOF59xLomrvj7bjt6/qCJI= -go.opentelemetry.io/otel/trace v1.39.0/go.mod h1:88w4/PnZSazkGzz/w84VHpQafiU4EtqqlVdxWy+rNOA= +go.opentelemetry.io/otel v1.41.0 h1:YlEwVsGAlCvczDILpUXpIpPSL/VPugt7zHThEMLce1c= +go.opentelemetry.io/otel v1.41.0/go.mod h1:Yt4UwgEKeT05QbLwbyHXEwhnjxNO6D8L5PQP51/46dE= +go.opentelemetry.io/otel/metric v1.41.0 h1:rFnDcs4gRzBcsO9tS8LCpgR0dxg4aaxWlJxCno7JlTQ= +go.opentelemetry.io/otel/metric v1.41.0/go.mod h1:xPvCwd9pU0VN8tPZYzDZV/BMj9CM9vs00GuBjeKhJps= +go.opentelemetry.io/otel/sdk v1.41.0 h1:YPIEXKmiAwkGl3Gu1huk1aYWwtpRLeskpV+wPisxBp8= +go.opentelemetry.io/otel/sdk v1.41.0/go.mod h1:ahFdU0G5y8IxglBf0QBJXgSe7agzjE4GiTJ6HT9ud90= +go.opentelemetry.io/otel/trace v1.41.0 h1:Vbk2co6bhj8L59ZJ6/xFTskY+tGAbOnCtQGVVa9TIN0= +go.opentelemetry.io/otel/trace v1.41.0/go.mod h1:U1NU4ULCoxeDKc09yCWdWe+3QoyweJcISEVa1RBzOis= +go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= +go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= -golang.org/x/crypto v0.8.0/go.mod h1:mRqEX+O9/h5TFCrQhkgjo2yKi0yYA+9ecGkdQoHrywE= -golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw= -golang.org/x/crypto v0.44.0 h1:A97SsFvM3AIwEEmTBiaxPPTYpDC47w720rdiiUvgoAU= -golang.org/x/crypto v0.44.0/go.mod h1:013i+Nw79BMiQiMsOPcVCB5ZIJbYkerPrGnOa00tvmc= +golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto= +golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio= golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f h1:99ci1mjWVBWwJiEKYY6jWa4d2nTQVIEhZIptnrVb1XY= golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f/go.mod h1:/lliqkxwWAhPjf5oSOIJup2XcqJaw8RGS6k3TGEc7GI= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.29.0 h1:HV8lRxZC4l2cr3Zq1LvtOsi/ThTgWnUk/y64QSs8GwA= -golang.org/x/mod v0.29.0/go.mod h1:NyhrlYXJ2H4eJiRy/WDBO6HMqZQ6q9nk4JzS3NuCK+w= +golang.org/x/mod v0.36.0 h1:JJjpVx6myfUsUdAzZuOSTTmRE0PfZeNWzzvKrP7amb4= +golang.org/x/mod v0.36.0/go.mod h1:moc6ELqsWcOw5Ef3xVprK5ul/MvtVvkIXLziUOICjUQ= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -326,24 +317,15 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= -golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns= -golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= -golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= -golang.org/x/net v0.47.0 h1:Mx+4dIFzqraBXUugkia1OOvlD6LemFo1ALMHjrXDOhY= -golang.org/x/net v0.47.0/go.mod h1:/jNxtkgq5yWUGYkaZGqo27cfGZ1c5Nen03aYrrKpVRU= +golang.org/x/net v0.55.0 h1:bcvxaJn3e1U6InsFWt1JUq1aSjnRxLzT2rtD2KfkDF8= +golang.org/x/net v0.55.0/go.mod h1:L5U2KuzuOe1lY7Z+aWVIKK6qEeJXnXV9yzGA+WCHJww= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I= -golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI= +golang.org/x/sync v0.21.0 h1:HLII4xRRTtCRkxYp4HNFF0Js/Og6q2i++KXbg0gHCwM= +golang.org/x/sync v0.21.0/go.mod h1:9xrNwdLfx4jkKbNva9FpL6vEN7evnE43NNNJQ2LF3+0= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -363,50 +345,34 @@ golang.org/x/sys v0.0.0-20200826173525-f9321e4c35a6/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.39.0 h1:CvCKL8MeisomCi6qNZ+wbb0DN9E5AATixKsvNtMoMFk= -golang.org/x/sys v0.39.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks= +golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= +golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= -golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY= -golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= -golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= -golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= -golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= -golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM= -golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM= +golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE= +golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4= golang.org/x/time v0.0.0-20201208040808-7e3f01d25324/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.9.0 h1:EsRrnYcQiGH+5FfbgvV4AP7qEZstoyrHB0DzarOQ4ZY= -golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4= +golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= -golang.org/x/tools v0.38.0 h1:Hx2Xv8hISq8Lm16jvBZ2VQf+RLmbd7wVUsALibYI/IQ= -golang.org/x/tools v0.38.0/go.mod h1:yEsQ/d/YK8cjh0L6rZlY8tgtlKiBNTL14pGDJPJpYQs= +golang.org/x/tools v0.45.0 h1:18qN3FAooORvApf5XjCXgsuayZOEtXf6JK18I3+ONa8= +golang.org/x/tools v0.45.0/go.mod h1:LuUGqqaXcXMEFEruIVJVm5mgDD8vww/z/SR1gQ4uE/0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/internal/ringbuffer/ringbuffer.go b/internal/ringbuffer/ringbuffer.go index 48a02b70..7ce6d3e3 100644 --- a/internal/ringbuffer/ringbuffer.go +++ b/internal/ringbuffer/ringbuffer.go @@ -93,7 +93,6 @@ func (rb *RingBuffer[T]) PushEvict(item T) (evicted T, didEvict bool) { } func (rb *RingBuffer[T]) SetCap(cap int) { - // KISS ! temp := NewRingBuffer[T](cap) // will panic if cap <= 0 for { diff --git a/internal/util/generic.go b/internal/util/generic.go index 4dc3601a..896c62f7 100644 --- a/internal/util/generic.go +++ b/internal/util/generic.go @@ -2,15 +2,21 @@ package util import ( "maps" - - "golang.org/x/exp/constraints" ) +type integer interface { + ~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr +} + +type unsigned interface { + ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr +} + func PointerTo[T any](v T) *T { return &v } -func PointerIntegerCast[U constraints.Integer, T constraints.Integer](p *T) *U { +func PointerIntegerCast[U integer, T integer](p *T) *U { if p == nil { return nil } @@ -18,7 +24,7 @@ func PointerIntegerCast[U constraints.Integer, T constraints.Integer](p *T) *U { return &v } -func SaturatingSub[T constraints.Unsigned](a T, b T) T { +func SaturatingSub[T unsigned](a T, b T) T { if b > a { var zero T return zero diff --git a/networking/ragedisco/announcement.go b/networking/ragedisco/announcement.go index 6e6d7f49..fccf901a 100644 --- a/networking/ragedisco/announcement.go +++ b/networking/ragedisco/announcement.go @@ -9,8 +9,10 @@ import ( ragetypes "github.com/smartcontractkit/libocr/ragep2p/types" + "github.com/smartcontractkit/libocr/internal/protopreparsevalidation" "github.com/smartcontractkit/libocr/networking/ragedisco/serialization" "google.golang.org/protobuf/proto" + "google.golang.org/protobuf/reflect/protoreflect" ) type unsignedAnnouncement struct { @@ -277,7 +279,38 @@ func (ann Announcement) toProtoWrapped() (*serialization.MessageWrapper, error) return &msgWrapper, nil } -func fromProtoWrappedBytes(b []byte) (WrappableMessage, error) { +// deserializer owns reusable raw validation state and decodes untrusted +// peer discovery network messages. It is not safe for concurrent use. +type deserializer struct { + validator *protopreparsevalidation.Validator +} + +func newDeserializer() (*deserializer, error) { + root := (&serialization.MessageWrapper{}).ProtoReflect().Descriptor() + validator, err := protopreparsevalidation.Compile(root, map[protoreflect.FullName]int{ + // Be careful if you ever want to raise this. We are not guaranteed that other nodes have the same raised limit. + "ragedisco.Reconcile.anns": MaxOracles, + "ragedisco.SignedAnnouncement.addrs": maxAddrsInAnnouncement, + }) + if err != nil { + return nil, fmt.Errorf("compile ragedisco deserializer: %w", err) + } + return &deserializer{validator}, nil +} + +func mustNewDeserializer() *deserializer { + deserializer, err := newDeserializer() + if err != nil { + panic(err) + } + return deserializer +} + +func (deserializer *deserializer) fromProtoWrappedBytes(b []byte) (WrappableMessage, error) { + if err := deserializer.validator.Validate(b); err != nil { + return nil, fmt.Errorf("could not validate raw protobuf: %w", err) + } + wrapper := &serialization.MessageWrapper{} err := (proto.UnmarshalOptions{DiscardUnknown: true}).Unmarshal(b, wrapper) if err != nil { diff --git a/networking/ragedisco/ragep2p_discoverer.go b/networking/ragedisco/ragep2p_discoverer.go index d868d1e8..6c8ad2e5 100644 --- a/networking/ragedisco/ragep2p_discoverer.go +++ b/networking/ragedisco/ragep2p_discoverer.go @@ -142,6 +142,17 @@ func (r *Ragep2pDiscoverer) connectivityLoop() { r.streamsMu.Unlock() break } + // The deserializer owns reusable raw validation state and is not + // safe for concurrent use, so each stream goroutine gets its own. + // Construct it here (rather than inside the goroutine) so a + // compilation failure, which would indicate a programming error, + // is surfaced instead of panicking. + deserializer, err := newDeserializer() + if err != nil { + logger.Critical("Failed to construct message deserializer. This should never happen!", reason(err)) + r.streamsMu.Unlock() + break + } // no point in keeping very large buffers, since only // the latest messages matter anyways. bufferSize := 2 @@ -182,7 +193,7 @@ func (r *Ragep2pDiscoverer) connectivityLoop() { if !ok { // stream Close() will signal us when it's time to go return } - w, err := fromProtoWrappedBytes(m) + w, err := deserializer.fromProtoWrappedBytes(m) if err != nil { logger.Warn("Failed to unwrap incoming message", reason(err)) break diff --git a/networking/rageping/metrics.go b/networking/rageping/metrics.go index b4a7742e..1f3666f9 100644 --- a/networking/rageping/metrics.go +++ b/networking/rageping/metrics.go @@ -48,7 +48,10 @@ func newLatencyMetrics( } roundTripLatencyBuckets := config.Buckets - if config.Buckets == nil { + // If no buckets are provided, use the default buckets. This matches the + // behavior of prometheus.NewHistogram when no buckets are provided, but we + // use our default instead of prometheus'. + if len(config.Buckets) == 0 { roundTripLatencyBuckets = DefaultLatencyBuckets() } roundTripLatencySeconds := prometheus.NewHistogram(prometheus.HistogramOpts{ diff --git a/networking/rageping/types.go b/networking/rageping/types.go index 9b314e6e..5e19f0c2 100644 --- a/networking/rageping/types.go +++ b/networking/rageping/types.go @@ -1,6 +1,7 @@ package rageping import ( + "math" "sync" "time" @@ -55,7 +56,7 @@ type LatencyMetricsServiceConfig struct { // - 1 s < x <= 5 s // - 5 s < x <= infinity // - // The value `nil` may be specified to use a set of pre-configured default bucket values. + // The value `nil` (or an empty slice) may be specified to use a set of pre-configured default bucket values. // See DefaultLatencyBuckets() for the default values. Buckets []float64 } @@ -72,6 +73,23 @@ func DefaultLatencyBuckets() []float64 { } } +// latencyBucketsValid reports whether buckets is acceptable for the round-trip latency histogram. nil and empty slices +// are accepted (both select DefaultLatencyBuckets in newLatencyMetrics). Otherwise every bound must be a positive +// number of fractional seconds and the bounds must be strictly increasing. The strictly-increasing requirement matches +// the check in prometheus.NewHistogram that panics during RegisterPeers; the positivity requirement is slightly +// stricter than Prometheus but rejects bounds that are meaningless for a (non-negative) latency. +func latencyBucketsValid(buckets []float64) bool { + for i, upperBound := range buckets { + if math.IsNaN(upperBound) || upperBound <= 0 { + return false + } + if i > 0 && upperBound <= buckets[i-1] { + return false + } + } + return true +} + // Initializes a new instance for collecting latency metrics. Metrics are collected for each passed configuration // (PING request size, periods, ...). The passed configurations must be pairwise distinct, i.e., do not pass the same // configuration multiple times as parameter. (This minor restriction is a result of how the underlying streams are @@ -103,6 +121,46 @@ func NewLatencyMetricsService( continue } + // The period and timeout values are used to derive stream rate limits and to drive the ticker in the run + // loop. Invalid values lead to broken rate limits (division by a zero MinPeriod) or panics in + // time.NewTicker/ticker.Reset (which require strictly positive durations). Reject such configurations here + // rather than crashing the run goroutine later. + if config.MinPeriod <= 0 { + logger.Error( + "invalid MinPeriod, ignoring configuration", + commontypes.LogFields{"minPeriod": config.MinPeriod}, + ) + continue + } + if config.MaxPeriod < config.MinPeriod { + logger.Error( + "invalid MaxPeriod (must be >= MinPeriod), ignoring configuration", + commontypes.LogFields{"minPeriod": config.MinPeriod, "maxPeriod": config.MaxPeriod}, + ) + continue + } + if config.Timeout <= 0 { + logger.Error( + "invalid Timeout (must be > 0), ignoring configuration", + commontypes.LogFields{"timeout": config.Timeout}, + ) + continue + } + if config.StartupDelay < 0 { + logger.Error( + "invalid StartupDelay (must be >= 0), ignoring configuration", + commontypes.LogFields{"startupDelay": config.StartupDelay}, + ) + continue + } + if !latencyBucketsValid(config.Buckets) { + logger.Error( + "invalid Buckets (must be positive, strictly increasing upper bounds in seconds), ignoring configuration", + commontypes.LogFields{"buckets": config.Buckets}, + ) + continue + } + serviceInstance := latencyMetricsService{ host, registerer, @@ -115,6 +173,13 @@ func NewLatencyMetricsService( serviceGroup.instances = append(serviceGroup.instances, &serviceInstance) } + if len(configs) > 0 && len(serviceGroup.instances) == 0 { + logger.Warn("latency metrics service not starting, no valid configs", commontypes.LogFields{ + "hostPeerID": host.ID(), + "lenConfigs": len(configs), + }) + } + return &serviceGroup } diff --git a/offchainreporting2plus/cmd/kvdbtool/checks.go b/offchainreporting2plus/cmd/kvdbtool/checks.go index eaa57513..277e896e 100644 --- a/offchainreporting2plus/cmd/kvdbtool/checks.go +++ b/offchainreporting2plus/cmd/kvdbtool/checks.go @@ -84,6 +84,30 @@ func findConsistentExtendedPrevFields( } else { blockSeqNr = treeRootVersion } + + // Sanity check: Logic in the managed package agrees with our derived blockSeqNr <-> treeRootVersion mapping. + { + foundSnapshotVersion, foundStateRootDigest, err := managed.FindRoundedUpSnapshot( + loghelper.MakeRootLoggerWithContext(DevnullLogger{}), + DevnullRegisterer{}, + prevRawKVDB, + prevPublicConfig.ConfigDigest, + blockSeqNr, + ) + if err != nil { + return ExtendedPrevFields{}, fmt.Errorf("managed.FindRoundedUpSnapshot would have errored for PrevSeqNr/BlockSeqNr %v", blockSeqNr) + } + + if foundSnapshotVersion != treeRootVersion { + return ExtendedPrevFields{}, fmt.Errorf("managed.FindRoundedUpSnapshot would have returned snapshot version "+ + "%d for PrevSeqNr/BlockSeqNr %v, but we are considering tree root version %d", foundSnapshotVersion, blockSeqNr, treeRootVersion) + } + if foundStateRootDigest != rootDigest { + return ExtendedPrevFields{}, fmt.Errorf("managed.FindRoundedUpSnapshot would have returned state root digest %x "+ + "for PrevSeqNr/BlockSeqNr %v, but we are considering tree root version %d with state root digest %x", foundStateRootDigest, blockSeqNr, treeRootVersion, rootDigest) + } + } + prevAstb, err := prevTxn.ReadAttestedStateTransitionBlock(blockSeqNr) if err != nil { return ExtendedPrevFields{}, fmt.Errorf("failed to read attested state transition block %d: %w", blockSeqNr, err) diff --git a/offchainreporting2plus/cmd/kvdbtool/main.go b/offchainreporting2plus/cmd/kvdbtool/main.go index 5cf148a0..b89b4943 100644 --- a/offchainreporting2plus/cmd/kvdbtool/main.go +++ b/offchainreporting2plus/cmd/kvdbtool/main.go @@ -217,11 +217,9 @@ func main() { continue } - if version <= highestCommittedSeqNr { - suitablePrevFields = append(suitablePrevFields, prevFields) - if prevFields.PrevSeqNr > maxPrevSeqNr { - maxPrevSeqNr = prevFields.PrevSeqNr - } + suitablePrevFields = append(suitablePrevFields, prevFields) + if prevFields.PrevSeqNr > maxPrevSeqNr { + maxPrevSeqNr = prevFields.PrevSeqNr } } diff --git a/offchainreporting2plus/internal/config/ocr3_1config/public_config.go b/offchainreporting2plus/internal/config/ocr3_1config/public_config.go index 307b02f4..b4473711 100644 --- a/offchainreporting2plus/internal/config/ocr3_1config/public_config.go +++ b/offchainreporting2plus/internal/config/ocr3_1config/public_config.go @@ -206,14 +206,18 @@ type PublicConfig struct { // instance will continue from. Sequence numbers in the next instance will // continue from PrevSeqNr. This must be a snapshot sequence number for the // previous instance, i.e., PrevSeqNr % PrevInstanceConfig.SnapshotInterval - // == 0. The overlapping oracle must have locally committed the state as of - // PrevSeqNr and the snapshot associated with PrevSeqNr must be in the - // retention window implied by - // PrevInstanceConfig.MaxHistoricalSnapshotsRetained and + // == 0, or the highest committed seq nr available locally on a backup. The + // overlapping oracle must have locally committed the state as of PrevSeqNr + // and the snapshot associated with PrevSeqNr must be in the retention + // window implied by PrevInstanceConfig.MaxHistoricalSnapshotsRetained and // PrevInstanceConfig.SnapshotInterval. (For instances whose previous // instance already has a PrevSeqNr, this imples PrevSeqNr > // PrevInstanceConfig.PrevSeqNr.) // + // It is highly recommended to rely on the + // lib/offchainreporting2plus/cmd/kvdbtool/ for determining this and other + // Prev fields. + // // Be aware that any state transitions committed after PrevSeqNr in the // previous instance will not be available in the next instance (and // typically be lost forever). diff --git a/offchainreporting2plus/internal/managed/managed_ocr3_1_oracle.go b/offchainreporting2plus/internal/managed/managed_ocr3_1_oracle.go index 19183ca1..6d3aa6f7 100644 --- a/offchainreporting2plus/internal/managed/managed_ocr3_1_oracle.go +++ b/offchainreporting2plus/internal/managed/managed_ocr3_1_oracle.go @@ -362,14 +362,32 @@ func tryCopyFromPrevInstance( } defer prevKeyValueDatabase.Close() + candidatePrevSnapshotVersion, candidatePrevStateRootDigest, err := FindRoundedUpSnapshot( + logger, + prevRegisterer, + prevKeyValueDatabase, + prevConfigDigest, + prevSeqNr, + ) + if err != nil { + logger.Warn("⚙️ tryCopyFromPrevInstance: error during FindRoundedUpSnapshot, couldn't find suitable snapshot in prev instance kvdb", commontypes.LogFields{ + "prevConfigDigest": prevConfigDigest, + "prevSeqNr": prevSeqNr, + "error": err, + }) + return nil + } + // We do not have access to the public config of the prev instance, so we // reconstruct a good-enough public config for opening the semantic kvdb of // the prev instance and reading the tree sync chunks. prevPublicConfig := ocr3_1config.PublicConfig{ - // We do not know the snapshot interval of the prev instance, but - // PrevSeqNr is guaranteed to be a snapshot sequence number in the prev - // instance, and we will call ReadTreeSyncChunk with it. - SnapshotInterval: util.PointerTo(uint64(1)), + // We do not know the snapshot interval of the prev instance, but we + // know that our snapshot of interest is of version + // candidatePrevSnapshotVersion. Setting that as SnapshotInterval will + // cause this snapshot to be read in ReadTreeSyncChunk(prevSeqNr, ...) + // calls. + SnapshotInterval: util.PointerTo(uint64(candidatePrevSnapshotVersion)), ConfigDigest: prevConfigDigest, // Set all tree sync chunking parameters to be the same as the next // instance. They are guaranteed to fit a maximally sized key-value due @@ -407,6 +425,23 @@ func tryCopyFromPrevInstance( return nil } + // Check that the (known good, due to history digest check in + // findGenesisBlockInPrevKeyValueDatabase) genesis state root digest matches + // the root digest of the round-up snapshot we've found, otherwise the + // round-up snapshot is not usable for local tree-sync. + if genesisBlock.StateRootDigest != candidatePrevStateRootDigest { + logger.Warn("⚙️ tryCopyFromPrevInstance: state root digest mismatch between found prev block and root of round-up snapshot, can't use prev block. "+ + "This is most likely due to *our* prev kvdb not containing the snapshot of interest, which could in rare cases be an indication of corruption. "+ + "If this is the case for all oracles, the PrevFields are likely misconfigured.", commontypes.LogFields{ + "prevSeqNr": prevSeqNr, + "prevConfigDigest": prevConfigDigest, + "candidatePrevSnapshotVersion": candidatePrevSnapshotVersion, + "candidatePrevStateRootDigest": candidatePrevStateRootDigest, + "genesisBlockStateRootDigest": genesisBlock.StateRootDigest, + }) + return nil + } + err = CopyAllTreeSyncChunksFromPrevInstance( ctx, logger, publicConfig, prevSeqNr, genesisBlock.StateRootDigest, prevTxn, nextSemanticKeyValueDatabase) if err != nil { @@ -442,6 +477,52 @@ func tryCopyFromPrevInstance( return nil } +// Returns the snapshot/tree root version and the digest of the tree root at +// that version, for the minimum snapshot version that is expected to cover +// prevSeqNr, without knowing the snapshot interval. The caller is responsible +// for checking that indeed the state root is valid and covers up to and +// including prevSeqNr but no further sequence numbers. +func FindRoundedUpSnapshot( + logger loghelper.LoggerWithContext, + prevRegisterer prometheus.Registerer, + prevKeyValueDatabase ocr3_1types.KeyValueDatabase, + prevConfigDigest types.ConfigDigest, + prevSeqNr uint64, +) (jmt.Version, protocol.StateRootDigest, error) { + prevSemanticKeyValueDatabase, err := shim.NewSemanticOCR3_1KeyValueDatabase( + prevKeyValueDatabase, + ocr3_1types.ReportingPluginLimits{}, + ocr3_1config.PublicConfig{ConfigDigest: prevConfigDigest}, + logger, + prevRegisterer, + ) + if err != nil { + return 0, protocol.StateRootDigest{}, fmt.Errorf("error during NewSemanticOCR3_1KeyValueDatabase: %w", err) + } + defer prevSemanticKeyValueDatabase.Close() + + prevTxn, err := prevSemanticKeyValueDatabase.NewReadTransactionUnchecked() + if err != nil { + return 0, protocol.StateRootDigest{}, fmt.Errorf("error during NewReadTransactionUnchecked: %w", err) + } + defer prevTxn.Discard() + + versions, _, err := prevTxn.ReadRootVersions(prevSeqNr, 1) + if err != nil { + return 0, protocol.StateRootDigest{}, fmt.Errorf("error during ReadRootVersions: %w", err) + } + if len(versions) == 0 { + return 0, protocol.StateRootDigest{}, fmt.Errorf("no snapshots covering PrevSeqNr %v found", prevSeqNr) + } + + candidate := versions[0] + rootDigest, err := jmt.ReadRootDigest(prevTxn, prevTxn, candidate) + if err != nil { + return 0, protocol.StateRootDigest{}, fmt.Errorf("error during ReadRootDigest: %w", err) + } + return candidate, rootDigest, nil +} + func CopyAllTreeSyncChunksFromPrevInstance( ctx context.Context, logger loghelper.LoggerWithContext, @@ -564,7 +645,6 @@ func findGenesisBlockInPrevKeyValueDatabase( return nil, nil } - // check that history digest matches the block at prevSeqNr prevAstb, err := prevTxn.ReadAttestedStateTransitionBlock(prevSeqNr) if err != nil { return nil, fmt.Errorf("error during ReadAttestedStateTransitionBlock: %w", err) @@ -575,9 +655,13 @@ func findGenesisBlockInPrevKeyValueDatabase( } gstb := protocol.AttestedToGenesisStateTransitionBlock(prev.PrevConfigDigest, prevAstb) + + // Checks that history digest matches the block at prevSeqNr, among other + // things. Errors because verification failure is most likely indicative of + // misconfigured PrevFields. err = protocol.VerifyGenesisStateTransitionBlockFromPrevInstance(publicConfig, gstb) if err != nil { - return nil, fmt.Errorf("error during VerifyGenesisStateTransitionBlockFromPrevInstance: %w", err) + return nil, fmt.Errorf("error during VerifyGenesisStateTransitionBlockFromPrevInstance, likely due to misconfigured PrevHistoryDigest in PublicConfig: %w", err) } return &gstb, nil } diff --git a/offchainreporting2plus/internal/ocr2/protocol/oracle.go b/offchainreporting2plus/internal/ocr2/protocol/oracle.go index e6f717d8..41cc9adc 100644 --- a/offchainreporting2plus/internal/ocr2/protocol/oracle.go +++ b/offchainreporting2plus/internal/ocr2/protocol/oracle.go @@ -123,6 +123,8 @@ type oracleState struct { // (with the exception of ReportGeneration which is explicitly managed by Pacemaker). // This enables us to wait for their completion before exiting. func (o *oracleState) run() { + defer o.logger.Info("Oracle: exiting", nil) + o.logger.Info("Oracle: running", commontypes.LogFields{ "localConfig": fmt.Sprintf("%+v", o.localConfig), "publicConfig": fmt.Sprintf("%+v", o.config.PublicConfig), @@ -150,6 +152,7 @@ func (o *oracleState) run() { // be careful if you want to change anything here. // chNetTo* sends in message.go assume that their recipients are running. o.childCtx, o.childCancel = context.WithCancel(context.Background()) + defer o.childCancel() o.subprocesses.Go(func() { @@ -213,9 +216,19 @@ func (o *oracleState) run() { chNet := o.netEndpoint.Receive() chDone := o.ctx.Done() + windDown := func() { + o.logger.Info("Oracle: winding down", nil) + o.childCancel() + o.subprocesses.Wait() + } for { select { - case msg := <-chNet: + case msg, ok := <-chNet: + if !ok { + o.logger.Info("Oracle: netEndpoint receive channel closed", nil) + windDown() + return + } // This bounds check should never trigger since it's the netEndpoint's // responsibility to only provide valid senders. We perform it for // defense-in-depth. @@ -235,10 +248,7 @@ func (o *oracleState) run() { // ensure prompt exit select { case <-chDone: - o.logger.Debug("Oracle: winding down", nil) - o.childCancel() - o.subprocesses.Wait() - o.logger.Debug("Oracle: exiting", nil) + windDown() return default: } diff --git a/offchainreporting2plus/internal/ocr3/protocol/oracle.go b/offchainreporting2plus/internal/ocr3/protocol/oracle.go index e6cc7f85..645635d9 100644 --- a/offchainreporting2plus/internal/ocr3/protocol/oracle.go +++ b/offchainreporting2plus/internal/ocr3/protocol/oracle.go @@ -132,6 +132,8 @@ type oracleState[RI any] struct { // Finally, all sub-goroutines spawned in the protocol are attached to o.subprocesses // This enables us to wait for their completion before exiting. func (o *oracleState[RI]) run() { + defer o.logger.Info("Oracle: exiting", nil) + o.logger.Info("Oracle: running", commontypes.LogFields{ "localConfig": fmt.Sprintf("%+v", o.localConfig), "publicConfig": fmt.Sprintf("%+v", o.config.PublicConfig), @@ -247,9 +249,19 @@ func (o *oracleState[RI]) run() { chNet := o.netEndpoint.Receive() chDone := o.ctx.Done() + windDown := func() { + o.logger.Info("Oracle: winding down", nil) + o.childCancel() + o.subprocesses.Wait() + } for { select { - case msg := <-chNet: + case msg, ok := <-chNet: + if !ok { + o.logger.Info("Oracle: netEndpoint receive channel closed", nil) + windDown() + return + } // This bounds check should never trigger since it's the netEndpoint's // responsibility to only provide valid senders. We perform it for // defense-in-depth. @@ -267,10 +279,7 @@ func (o *oracleState[RI]) run() { // ensure prompt exit select { case <-chDone: - o.logger.Debug("Oracle: winding down", nil) - o.childCancel() - o.subprocesses.Wait() - o.logger.Debug("Oracle: exiting", nil) + windDown() return default: } diff --git a/offchainreporting2plus/internal/ocr3_1/protocol/event.go b/offchainreporting2plus/internal/ocr3_1/protocol/event.go index 9a3a6854..2e31ad35 100644 --- a/offchainreporting2plus/internal/ocr3_1/protocol/event.go +++ b/offchainreporting2plus/internal/ocr3_1/protocol/event.go @@ -235,3 +235,14 @@ var _ EventToBlobExchange[struct{}] = EventBlobBroadcastGraceTimeout[struct{}]{} func (ev EventBlobBroadcastGraceTimeout[RI]) processBlobExchange(bex *blobExchangeState[RI]) { bex.eventBlobBroadcastGraceTimeout(ev) } + +// Internal state sync <-> state sync subprocesses events for which we do not +// implement EventToX. + +type EventStateSyncBlockReplayWake struct{} + +type EventStateSyncBlockReplayFailure struct { + SeqNr uint64 +} + +type EventStateSyncDestroyIfNeededWake struct{} diff --git a/offchainreporting2plus/internal/ocr3_1/protocol/kvdb.go b/offchainreporting2plus/internal/ocr3_1/protocol/kvdb.go index 364a0bf0..e5ec18d4 100644 --- a/offchainreporting2plus/internal/ocr3_1/protocol/kvdb.go +++ b/offchainreporting2plus/internal/ocr3_1/protocol/kvdb.go @@ -30,7 +30,7 @@ type KeyValueDatabaseSemanticRead interface { // ReadRootVersions returns up to maxItems version numbers of tree roots at or // above minRootVersion, in ascending order. Intended for tooling/inspection. - ReadRootVersions(minRootVersion uint64, maxItems int) (versions []uint64, more bool, err error) + ReadRootVersions(minRootVersion jmt.Version, maxItems int) (versions []jmt.Version, more bool, err error) ReadTreeSyncStatus() (TreeSyncStatus, error) // ReadTreeSyncChunk retrieves a chunk of undigested key-value pairs in the diff --git a/offchainreporting2plus/internal/ocr3_1/protocol/oracle.go b/offchainreporting2plus/internal/ocr3_1/protocol/oracle.go index 2909a912..a2fa2a18 100644 --- a/offchainreporting2plus/internal/ocr3_1/protocol/oracle.go +++ b/offchainreporting2plus/internal/ocr3_1/protocol/oracle.go @@ -145,6 +145,8 @@ type oracleState[RI any] struct { // Finally, all sub-goroutines spawned in the protocol are attached to o.subprocesses // This enables us to wait for their completion before exiting. func (o *oracleState[RI]) run() { + defer o.logger.Info("Oracle: exiting", nil) + o.logger.Info("Oracle: running", commontypes.LogFields{ "localConfig": fmt.Sprintf("%+v", o.localConfig), "publicConfig": fmt.Sprintf("%+v", o.config.PublicConfig), @@ -186,8 +188,6 @@ func (o *oracleState[RI]) run() { o.childCtx, o.childCancel = context.WithCancel(context.Background()) defer o.childCancel() - defer o.kvDb.Close() - paceState, cert, err := o.restoreFromDatabase() if err != nil { o.logger.Error("restoreFromDatabase returned an error, exiting oracle", commontypes.LogFields{ @@ -341,9 +341,19 @@ func (o *oracleState[RI]) run() { chNet := o.netEndpoint.Receive() chDone := o.ctx.Done() + windDown := func() { + o.logger.Info("Oracle: winding down", nil) + o.childCancel() + o.subprocesses.Wait() + } for { select { - case msg := <-chNet: + case msg, ok := <-chNet: + if !ok { + o.logger.Info("Oracle: netEndpoint receive channel closed", nil) + windDown() + return + } // This bounds check should never trigger since it's the netEndpoint's // responsibility to only provide valid senders. We perform it for // defense-in-depth. @@ -361,10 +371,7 @@ func (o *oracleState[RI]) run() { // ensure prompt exit select { case <-chDone: - o.logger.Debug("Oracle: winding down", nil) - o.childCancel() - o.subprocesses.Wait() - o.logger.Debug("Oracle: exiting", nil) + windDown() return default: } diff --git a/offchainreporting2plus/internal/ocr3_1/protocol/outcome_generation.go b/offchainreporting2plus/internal/ocr3_1/protocol/outcome_generation.go index f178057f..8434d5a8 100644 --- a/offchainreporting2plus/internal/ocr3_1/protocol/outcome_generation.go +++ b/offchainreporting2plus/internal/ocr3_1/protocol/outcome_generation.go @@ -576,7 +576,7 @@ func (outgen *outcomeGenerationState[RI]) tryToMoveCertAndKVStateToCommitQC(comm return } if err := outgen.isCompatibleUnattestedStateTransitionBlockSanityCheck(commitQC, ustb); err != nil { - outgen.logger.Critical("sanity check of unattested state transition block failed, very surprising!", commontypes.LogFields{ + outgen.logger.Warn("sanity check of unattested state transition block failed. This is commonly caused by non-determinism in the ReportingPlugin", commontypes.LogFields{ "commitQCSeqNr": commitQC.CommitSeqNr, "commitQC": commitQC, "unattestedStateTransitionBlock": ustb, @@ -685,16 +685,16 @@ func (outgen *outcomeGenerationState[RI]) isCompatibleUnattestedStateTransitionB ) if stb.PrevHistoryDigest != commitQC.PrevHistoryDigest { - return fmt.Errorf("local state transition block prev history digest does not match commitQC: expected %s but got %s", commitQC.PrevHistoryDigest, stb.PrevHistoryDigest) + return fmt.Errorf("local state transition block prev history digest does not match commitQC: expected %v but got %v", commitQC.PrevHistoryDigest, stb.PrevHistoryDigest) } if stbStateWriteSetDigest != commitQC.StateWriteSetDigest { - return fmt.Errorf("local state transition block write set digest does not match commitQC: expected %s but got %s", commitQC.StateWriteSetDigest, stbStateWriteSetDigest) + return fmt.Errorf("local state transition block write set digest does not match commitQC: expected %v but got %v", commitQC.StateWriteSetDigest, stbStateWriteSetDigest) } if stb.StateRootDigest != commitQC.StateRootDigest { - return fmt.Errorf("local state transition block state root digest does not match commitQC: expected %s but got %s", commitQC.StateRootDigest, stb.StateRootDigest) + return fmt.Errorf("local state transition block state root digest does not match commitQC: expected %v but got %v", commitQC.StateRootDigest, stb.StateRootDigest) } if stb.ReportsPlusPrecursorDigest != commitQC.ReportsPlusPrecursorDigest { - return fmt.Errorf("local state transition block reportsPlusPrecursor digest does not match commitQC: expected %s but got %s", commitQC.ReportsPlusPrecursorDigest, stb.ReportsPlusPrecursorDigest) + return fmt.Errorf("local state transition block reportsPlusPrecursor digest does not match commitQC: expected %v but got %v", commitQC.ReportsPlusPrecursorDigest, stb.ReportsPlusPrecursorDigest) } return nil } diff --git a/offchainreporting2plus/internal/ocr3_1/protocol/outcome_generation_follower.go b/offchainreporting2plus/internal/ocr3_1/protocol/outcome_generation_follower.go index eab90fe6..b511bf89 100644 --- a/offchainreporting2plus/internal/ocr3_1/protocol/outcome_generation_follower.go +++ b/offchainreporting2plus/internal/ocr3_1/protocol/outcome_generation_follower.go @@ -1031,14 +1031,14 @@ func (outgen *outcomeGenerationState[RI]) backgroundCommitted( roundCtx RoundContext, kvReadTxn KeyValueDatabaseReadTransaction, ) { - _, ok := callPluginFromOutcomeGenerationBackground[error]( + _, ok := callPluginFromOutcomeGenerationBackground[struct{}]( ctx, logger, "Committed", outgen.config.WarnDurationCommitted, roundCtx, - func(ctx context.Context, roundCtx RoundContext) (error, error) { - return outgen.reportingPlugin.Committed(ctx, roundCtx.SeqNr, kvReadTxn), nil + func(ctx context.Context, roundCtx RoundContext) (struct{}, error) { + return struct{}{}, outgen.reportingPlugin.Committed(ctx, roundCtx.SeqNr, kvReadTxn) }, ) kvReadTxn.Discard() @@ -1047,7 +1047,6 @@ func (outgen *outcomeGenerationState[RI]) backgroundCommitted( logger.Info("continuing after ReportingPlugin.Committed returned an error", commontypes.LogFields{ "seqNr": roundCtx.SeqNr, }) - } select { diff --git a/offchainreporting2plus/internal/ocr3_1/protocol/signed_data.go b/offchainreporting2plus/internal/ocr3_1/protocol/signed_data.go index 05e2885c..41934090 100644 --- a/offchainreporting2plus/internal/ocr3_1/protocol/signed_data.go +++ b/offchainreporting2plus/internal/ocr3_1/protocol/signed_data.go @@ -757,7 +757,7 @@ func (gprev *GenesisFromPrevInstance) Verify(config ocr3_1config.PublicConfig) e return fmt.Errorf("GenesisFromPrevInstance is invalid when previous instance is not specified in PublicConfig") } if gprev.PrevHistoryDigest != prev.PrevHistoryDigest { - return fmt.Errorf("GenesisFromPrevInstance.PrevHistoryDigest (%x) does not match config.PrevHistoryDigest (%x)", gprev.PrevHistoryDigest, prev.PrevHistoryDigest) + return fmt.Errorf("GenesisFromPrevInstance.PrevHistoryDigest (%v) does not match config.PrevHistoryDigest (%v)", gprev.PrevHistoryDigest, prev.PrevHistoryDigest) } if gprev.PrevSeqNr != prev.PrevSeqNr { return fmt.Errorf("GenesisFromPrevInstance.PrevSeqNr (%d) does not match config.PrevSeqNr (%d)", gprev.PrevSeqNr, prev.PrevSeqNr) diff --git a/offchainreporting2plus/internal/ocr3_1/protocol/state_sync.go b/offchainreporting2plus/internal/ocr3_1/protocol/state_sync.go index 268356aa..19aec6e8 100644 --- a/offchainreporting2plus/internal/ocr3_1/protocol/state_sync.go +++ b/offchainreporting2plus/internal/ocr3_1/protocol/state_sync.go @@ -34,23 +34,25 @@ func RunStateSync[RI any]( ctx, cancel := context.WithCancel(ctx) defer cancel() - chNotificationToStateBlockReplay := make(chan struct{}) - chNotificationToStateDestroyIfNeeded := make(chan struct{}) + chStateSyncToStateSyncBlockReplay := make(chan EventStateSyncBlockReplayWake) + chStateSyncBlockReplayToStateSync := make(chan EventStateSyncBlockReplayFailure) + chStateSyncToStateSyncDestroyIfNeeded := make(chan EventStateSyncDestroyIfNeededWake) subs.Go(func() { - RunStateSyncDestroyIfNeeded(ctx, logger, kvDb, chNotificationToStateDestroyIfNeeded) + RunStateSyncDestroyIfNeeded(ctx, logger, kvDb, chStateSyncToStateSyncDestroyIfNeeded) }) subs.Go(func() { RunStateSyncReap(ctx, config, logger, database, kvDb) }) subs.Go(func() { - RunStateSyncBlockReplay(ctx, logger, kvDb, chNotificationToStateBlockReplay) + RunStateSyncBlockReplay(ctx, logger, kvDb, chStateSyncToStateSyncBlockReplay, chStateSyncBlockReplayToStateSync) }) newStateSyncState(ctx, chNetToStateSync, - chNotificationToStateBlockReplay, - chNotificationToStateDestroyIfNeeded, + chStateSyncToStateSyncBlockReplay, + chStateSyncBlockReplayToStateSync, + chStateSyncToStateSyncDestroyIfNeeded, chOutcomeGenerationToStateSync, chReportAttestationToStateSync, config, database, id, kvDb, logger, netSender).run() @@ -68,17 +70,18 @@ const ( type stateSyncState[RI any] struct { ctx context.Context - chNetToStateSync <-chan MessageToStateSyncWithSender[RI] - chNotificationToStateBlockReplay chan<- struct{} - chNotificationToStateDestroyIfNeeded chan<- struct{} - chOutcomeGenerationToStateSync <-chan EventToStateSync[RI] - chReportAttestationToStateSync <-chan EventToStateSync[RI] - config ocr3_1config.SharedConfig - database Database - id commontypes.OracleID - kvDb KeyValueDatabase - logger loghelper.LoggerWithContext - netSender NetworkSender[RI] + chNetToStateSync <-chan MessageToStateSyncWithSender[RI] + chStateSyncToStateSyncBlockReplay chan<- EventStateSyncBlockReplayWake + chStateSyncBlockReplayToStateSync <-chan EventStateSyncBlockReplayFailure + chStateSyncToStateSyncDestroyIfNeeded chan<- EventStateSyncDestroyIfNeededWake + chOutcomeGenerationToStateSync <-chan EventToStateSync[RI] + chReportAttestationToStateSync <-chan EventToStateSync[RI] + config ocr3_1config.SharedConfig + database Database + id commontypes.OracleID + kvDb KeyValueDatabase + logger loghelper.LoggerWithContext + netSender NetworkSender[RI] genesisSeqNr uint64 @@ -121,6 +124,8 @@ func (stasy *stateSyncState[RI]) run() { ev.processStateSync(stasy) case ev := <-stasy.chReportAttestationToStateSync: ev.processStateSync(stasy) + case ev := <-stasy.chStateSyncBlockReplayToStateSync: + stasy.eventStateBlockReplayFailure(ev.SeqNr) case <-stasy.tSendSummary: stasy.eventTSendSummaryTimeout() case <-stasy.blockSyncState.blockRequesterGadget.Ticker(): @@ -142,14 +147,14 @@ func (stasy *stateSyncState[RI]) run() { func (stasy *stateSyncState[RI]) pleaseTryToReplayBlock() { select { - case stasy.chNotificationToStateBlockReplay <- struct{}{}: + case stasy.chStateSyncToStateSyncBlockReplay <- EventStateSyncBlockReplayWake{}: default: } } func (stasy *stateSyncState[RI]) pleaseDestroyStateIfNeeded() { select { - case stasy.chNotificationToStateDestroyIfNeeded <- struct{}{}: + case stasy.chStateSyncToStateSyncDestroyIfNeeded <- EventStateSyncDestroyIfNeededWake{}: default: } } @@ -223,6 +228,29 @@ func (stasy *stateSyncState[RI]) refreshStateSyncState() (ok bool) { return } +func (stasy *stateSyncState[RI]) eventStateBlockReplayFailure(failedReplaySeqNr uint64) { + if !stasy.refreshStateSyncState() { + return + } + + if failedReplaySeqNr != stasy.highestCommittedSeqNr+1 { + return + } + if stasy.highestPersistedStateTransitionBlockSeqNr <= stasy.highestCommittedSeqNr { + return + } + oldHighestPersistedStateTransitionBlockSeqNr := stasy.highestPersistedStateTransitionBlockSeqNr + stasy.logger.Warn("StateSync: block replay failed, rewinding highestPersistedStateTransitionBlockSeqNr to highestCommittedSeqNr", commontypes.LogFields{ + "failedReplaySeqNr": failedReplaySeqNr, + "highestCommittedSeqNr": stasy.highestCommittedSeqNr, + "oldHighestPersistedStateTransitionBlockSeqNr": oldHighestPersistedStateTransitionBlockSeqNr, + "highestHeardSeqNr": stasy.highestHeardSeqNr, + }) + stasy.highestPersistedStateTransitionBlockSeqNr = stasy.highestCommittedSeqNr + stasy.blockSyncState.sortedBlockBuffer.Clear(false) + stasy.blockSyncState.blockRequesterGadget.PleaseRecheckPendingItems() +} + func (stasy *stateSyncState[RI]) eventTSendSummaryTimeout() { defer func() { stasy.tSendSummary = time.After(stasy.config.GetDeltaStateSyncSummaryInterval()) @@ -451,8 +479,9 @@ func (stasy *stateSyncState[RI]) mustTreeSyncToPrevInstance() bool { func newStateSyncState[RI any]( ctx context.Context, chNetToStateSync <-chan MessageToStateSyncWithSender[RI], - chNotificationToStateBlockReplay chan<- struct{}, - chNotificationToStateDestroyIfNeeded chan<- struct{}, + chStateSyncToStateSyncBlockReplay chan<- EventStateSyncBlockReplayWake, + chStateSyncBlockReplayToStateSync <-chan EventStateSyncBlockReplayFailure, + chStateSyncToStateSyncDestroyIfNeeded chan<- EventStateSyncDestroyIfNeededWake, chOutcomeGenerationToStateSync <-chan EventToStateSync[RI], chReportAttestationToStateSync <-chan EventToStateSync[RI], config ocr3_1config.SharedConfig, @@ -477,8 +506,9 @@ func newStateSyncState[RI any]( ctx, chNetToStateSync, - chNotificationToStateBlockReplay, - chNotificationToStateDestroyIfNeeded, + chStateSyncToStateSyncBlockReplay, + chStateSyncBlockReplayToStateSync, + chStateSyncToStateSyncDestroyIfNeeded, chOutcomeGenerationToStateSync, chReportAttestationToStateSync, config, diff --git a/offchainreporting2plus/internal/ocr3_1/protocol/state_sync_block_replay.go b/offchainreporting2plus/internal/ocr3_1/protocol/state_sync_block_replay.go index 030e4d7b..a37d2767 100644 --- a/offchainreporting2plus/internal/ocr3_1/protocol/state_sync_block_replay.go +++ b/offchainreporting2plus/internal/ocr3_1/protocol/state_sync_block_replay.go @@ -2,6 +2,7 @@ package protocol import ( "context" + "errors" "fmt" "time" @@ -16,6 +17,19 @@ const ( maxBlocksToReplayInOneGo = 100 ) +type errReplayVerifiedBlock struct { + SeqNr uint64 + Cause error +} + +func (e *errReplayVerifiedBlock) Error() string { + return fmt.Sprintf("failed to replay verified block %d: %v", e.SeqNr, e.Cause) +} + +func (e *errReplayVerifiedBlock) Unwrap() error { + return e.Cause +} + func tryReplay(ctx context.Context, kvDb KeyValueDatabase, logger loghelper.LoggerWithContext) error { kvReadTxn, err := kvDb.NewReadTransactionUnchecked() if err != nil { @@ -52,7 +66,7 @@ func tryReplay(ctx context.Context, kvDb KeyValueDatabase, logger loghelper.Logg // next block found, has been verified before being persisted so we don't check again err = replayVerifiedBlock(logger, tx, &block) if err != nil { - return fmt.Errorf("failed to replay verified block %d: %w", seqNr, err) + return &errReplayVerifiedBlock{seqNr, err} } err = tx.Commit() if err != nil { @@ -102,7 +116,7 @@ func replayVerifiedBlock(logger loghelper.LoggerWithContext, kvReadWriteTxn KeyV } if stateRootDigest != stb.StateRootDigest { - return fmt.Errorf("state root digest mismatch from block replay for seq nr %d: expected %s, actual %s", seqNr, stb.StateRootDigest, stateRootDigest) + return fmt.Errorf("state root digest mismatch from block replay for seq nr %d: expected %v, actual %v", seqNr, stb.StateRootDigest, stateRootDigest) } return nil @@ -112,15 +126,34 @@ func RunStateSyncBlockReplay( ctx context.Context, logger loghelper.LoggerWithContext, kvDb KeyValueDatabase, - chNotificationFromStateSync <-chan struct{}, + chStateSyncToStateSyncBlockReplay <-chan EventStateSyncBlockReplayWake, + chStateSyncBlockReplayToStateSync chan<- EventStateSyncBlockReplayFailure, ) { chDone := ctx.Done() chTick := time.After(0) + notifyStateSyncOfFailedReplay := false + var failedReplaySeqNr uint64 for { + if notifyStateSyncOfFailedReplay { + + select { + case chStateSyncBlockReplayToStateSync <- EventStateSyncBlockReplayFailure{failedReplaySeqNr}: + notifyStateSyncOfFailedReplay = false + logger.Info("StateBlockReplay: notified state sync of failed replay", commontypes.LogFields{ + "failedReplaySeqNr": failedReplaySeqNr, + }) + + chTick = time.After(stateBlockReplayInterval) + case <-chDone: + return + } + continue + } + select { case <-chTick: - case <-chNotificationFromStateSync: + case <-chStateSyncToStateSyncBlockReplay: case <-chDone: return } @@ -131,7 +164,18 @@ func RunStateSyncBlockReplay( logger.Warn("StateBlockReplay: failed while trying to replay blocks", commontypes.LogFields{ "error": err, }) - chTick = time.After(stateBlockReplayFastFollowOnError) + var errReplayVerifiedBlock *errReplayVerifiedBlock + if errors.As(err, &errReplayVerifiedBlock) { + failedReplaySeqNr = errReplayVerifiedBlock.SeqNr + notifyStateSyncOfFailedReplay = true + logger.Info("StateBlockReplay: will notify state sync of failed replay", commontypes.LogFields{ + "failedReplaySeqNr": errReplayVerifiedBlock.SeqNr, + }) + } else { + + chTick = time.After(stateBlockReplayFastFollowOnError) + } + } else { chTick = time.After(stateBlockReplayInterval) } diff --git a/offchainreporting2plus/internal/ocr3_1/protocol/state_sync_destroy_if_needed.go b/offchainreporting2plus/internal/ocr3_1/protocol/state_sync_destroy_if_needed.go index 5839f406..35a357e4 100644 --- a/offchainreporting2plus/internal/ocr3_1/protocol/state_sync_destroy_if_needed.go +++ b/offchainreporting2plus/internal/ocr3_1/protocol/state_sync_destroy_if_needed.go @@ -74,7 +74,7 @@ func RunStateSyncDestroyIfNeeded( ctx context.Context, logger loghelper.LoggerWithContext, kvDb KeyValueDatabase, - chNotificationFromStateSync <-chan struct{}, + chStateSyncToStateSyncDestroyIfNeeded <-chan EventStateSyncDestroyIfNeededWake, ) { logger = logger.MakeChild(commontypes.LogFields{"proto": "stateSyncDestroyIfNeeded"}) @@ -82,7 +82,7 @@ func RunStateSyncDestroyIfNeeded( for { select { - case <-chNotificationFromStateSync: + case <-chStateSyncToStateSyncDestroyIfNeeded: case <-chDone: return } diff --git a/offchainreporting2plus/internal/shim/ocr3_1_key_value_store.go b/offchainreporting2plus/internal/shim/ocr3_1_key_value_store.go index 686e49e7..6502090e 100644 --- a/offchainreporting2plus/internal/shim/ocr3_1_key_value_store.go +++ b/offchainreporting2plus/internal/shim/ocr3_1_key_value_store.go @@ -234,7 +234,7 @@ func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Delete(key []byte) if err := s.nilOrWriteSet.Delete(key); err != nil { s.mu.Unlock() - return fmt.Errorf("failed to delete key %s from write set: %w", key, err) + return fmt.Errorf("failed to delete key %v from write set: %w", key, err) } s.mu.Unlock() return s.rawTransaction.Delete(pluginPrefixedUnhashedKey(key)) @@ -264,7 +264,7 @@ func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) deletePrefixedKeys( break } if err := s.rawTransaction.Delete(key); err != nil { - return false, numDeleted, fmt.Errorf("failed to delete key %s: %w", key, err) + return false, numDeleted, fmt.Errorf("failed to delete key %v: %w", key, err) } numDeleted++ } @@ -469,13 +469,13 @@ func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) Write(key []byte, v } if err := s.nilOrWriteSet.Write(key, value); err != nil { s.mu.Unlock() - return fmt.Errorf("failed to write key %s to write set: %w", key, err) + return fmt.Errorf("failed to write key %v to write set: %w", key, err) } s.mu.Unlock() err := s.rawTransaction.Write(pluginPrefixedUnhashedKey(key), value) if err != nil { - return fmt.Errorf("failed to write key %s to write set: %w", key, err) + return fmt.Errorf("failed to write key %v to write set: %w", key, err) } return nil } @@ -577,7 +577,7 @@ func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteAttestedState } for _, key := range keys { if err := s.rawTransaction.Delete(key); err != nil { - return false, fmt.Errorf("failed to delete key %s: %w", key, err) + return false, fmt.Errorf("failed to delete key %v: %w", key, err) } } return !more, nil @@ -798,7 +798,7 @@ func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) VerifyAndWriteTreeS func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobPayload(blobDigest protocol.BlobDigest) ([]byte, error) { blobMeta, err := s.ReadBlobMeta(blobDigest) if err != nil { - return nil, fmt.Errorf("error reading blob meta for %s: %w", blobDigest, err) + return nil, fmt.Errorf("error reading blob meta for %v: %w", blobDigest, err) } if blobMeta == nil { return nil, nil @@ -829,7 +829,7 @@ func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobPayload(blobDige value, err := it.Value() if err != nil { - return nil, fmt.Errorf("error reading value for key %s: %w", key, err) + return nil, fmt.Errorf("error reading value for key %v: %w", key, err) } expectedChunkSize := min(uint64(s.config.GetBlobChunkBytes()), residualLength) @@ -872,7 +872,7 @@ func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadNode(nodeKey jmt.Nod // ReadRootVersions returns up to maxItems version numbers of tree roots at or // above minRootVersion, in ascending order. -func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadRootVersions(minRootVersion uint64, maxItems int) ([]uint64, bool, error) { +func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadRootVersions(minRootVersion jmt.Version, maxItems int) ([]jmt.Version, bool, error) { rootKeys, more, err := s.partialInclusiveRangeKeys(rootKey(minRootVersion), rootKey(math.MaxUint64), maxItems) if err != nil { return nil, false, fmt.Errorf("failed to range tree roots: %w", err) @@ -923,7 +923,7 @@ func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteRoots(minVers } for _, key := range keys { if err := s.rawTransaction.Delete(key); err != nil { - return false, fmt.Errorf("failed to delete key %s: %w", key, err) + return false, fmt.Errorf("failed to delete key %v: %w", key, err) } } return !more, nil @@ -980,7 +980,7 @@ func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteBlobChunk(blo func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobMeta(blobDigest protocol.BlobDigest) (*protocol.BlobMeta, error) { metaBytes, err := s.rawTransaction.Read(blobMetaPrefixKey(blobDigest)) if err != nil { - return nil, fmt.Errorf("error reading blob meta for %s: %w", blobDigest, err) + return nil, fmt.Errorf("error reading blob meta for %v: %w", blobDigest, err) } if metaBytes == nil { // no record of the blob at all @@ -989,7 +989,7 @@ func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobMeta(blobDigest blobMeta, err := serialization.DeserializeBlobMeta(metaBytes) if err != nil { - return nil, fmt.Errorf("error unmarshaling blob meta for %s: %w", blobDigest, err) + return nil, fmt.Errorf("error unmarshaling blob meta for %v: %w", blobDigest, err) } return &blobMeta, nil } @@ -1019,11 +1019,11 @@ func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobDigestExpirySeqN return nil, false, fmt.Errorf("error reading blob meta value: %w", err) } if blobMetaBytes == nil { - return nil, false, fmt.Errorf("blob meta bytes are unexpectedly nil for blob digest %s", blobDigest) + return nil, false, fmt.Errorf("blob meta bytes are unexpectedly nil for blob digest %v", blobDigest) } blobMeta, err := serialization.DeserializeBlobMeta(blobMetaBytes) if err != nil { - return nil, false, fmt.Errorf("error unmarshaling blob meta for blob digest %s: %w", blobDigest, err) + return nil, false, fmt.Errorf("error unmarshaling blob meta for blob digest %v: %w", blobDigest, err) } result = append(result, protocol.BlobDigestExpirySeqNr{ blobDigest, @@ -1041,7 +1041,7 @@ func (s *SemanticOCR3_1KeyValueDatabaseReadTransaction) ReadBlobDigestExpirySeqN func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) WriteBlobMeta(blobDigest protocol.BlobDigest, blobMeta protocol.BlobMeta) error { metaBytes, err := serialization.SerializeBlobMeta(blobMeta) if err != nil { - return fmt.Errorf("error marshaling blob meta for %s: %w", blobDigest, err) + return fmt.Errorf("error marshaling blob meta for %v: %w", blobDigest, err) } return s.rawTransaction.Write(blobMetaPrefixKey(blobDigest), metaBytes) } @@ -1138,7 +1138,7 @@ func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteReportsPlusPr } for _, key := range keys { if err := s.rawTransaction.Delete(key); err != nil { - return false, fmt.Errorf("failed to delete key %s: %w", key, err) + return false, fmt.Errorf("failed to delete key %v: %w", key, err) } } return !more, nil @@ -1188,7 +1188,7 @@ func (s *SemanticOCR3_1KeyValueDatabaseReadWriteTransaction) DeleteUnattestedSta ) for _, key := range keys { if err := s.rawTransaction.Delete(key); err != nil { - return false, fmt.Errorf("failed to delete key %s: %w", key, err) + return false, fmt.Errorf("failed to delete key %v: %w", key, err) } } return !more, err diff --git a/offchainreporting2plus/keyvaluedatabase/pebble_key_value_database.go b/offchainreporting2plus/keyvaluedatabase/pebble_key_value_database.go index 95e49e48..9922bda4 100644 --- a/offchainreporting2plus/keyvaluedatabase/pebble_key_value_database.go +++ b/offchainreporting2plus/keyvaluedatabase/pebble_key_value_database.go @@ -14,6 +14,15 @@ import ( "github.com/smartcontractkit/libocr/offchainreporting2plus/types" ) +const ( + // The default max memtable size for Pebble is 4MiB (quite low for today's machines). + // However, very large memtable sizes can also have more impact than just memory usage: + // allocating a large memtable requires a large contiguous memory region, which can take some time + // (pebble devs have observed that allocating a 64MiB memtable can take over 10ms. This is partially + // alleviated by a pebble internal memtable recycling mechanism). + pebbleBetterDefaultMaxMemTableSize = 64 << 20 // 64 MiB +) + var ErrPebbleReadWriteTransactionAlreadyOpen = errors.New("a read-write transaction is already open") // NewPebbleKeyValueDatabaseFactory produces a @@ -61,7 +70,7 @@ type keyValueDatabaseReadOnlyForTooling interface { } func openPebbleKeyValueDatabase(dbPath string, createIfNotExists bool, readWrite bool) (ocr3_1types.KeyValueDatabase, error) { - opts := pebble.Options{} + opts := pebble.Options{MemTableSize: pebbleBetterDefaultMaxMemTableSize} errorIfNotExists := !createIfNotExists opts.ErrorIfNotExists = errorIfNotExists opts.ReadOnly = !readWrite diff --git a/ragep2p/ragep2pnew/internal/muxer/muxer.go b/ragep2p/ragep2pnew/internal/muxer/muxer.go index 612cfc2d..2806dbb3 100644 --- a/ragep2p/ragep2pnew/internal/muxer/muxer.go +++ b/ragep2p/ragep2pnew/internal/muxer/muxer.go @@ -267,6 +267,6 @@ func (mux *Muxer) Pop() (stream2types.OutboundBinaryMessage, internaltypes.Strea return msg, sid } - mux.logger.Info("Muxer: nothing to pop", commontypes.LogFields{}) + mux.logger.Trace("Muxer: nothing to pop", commontypes.LogFields{}) return nil, internaltypes.StreamID{} }