diff --git a/contracts/foundry.toml b/contracts/foundry.toml index bbc9f395942..533336d1b53 100644 --- a/contracts/foundry.toml +++ b/contracts/foundry.toml @@ -53,10 +53,10 @@ test = 'src/v0.8/llo-feeds/test' solc_version = '0.8.19' [profile.keystone] +optimizer_runs = 1_000_000 solc_version = '0.8.19' src = 'src/v0.8/keystone' test = 'src/v0.8/keystone/test' -optimizer_runs = 10_000 [profile.operatorforwarder] optimizer_runs = 1_000_000 diff --git a/contracts/gas-snapshots/keystone.gas-snapshot b/contracts/gas-snapshots/keystone.gas-snapshot index 47c59a149a6..7fd567189ef 100644 --- a/contracts/gas-snapshots/keystone.gas-snapshot +++ b/contracts/gas-snapshots/keystone.gas-snapshot @@ -1,90 +1,92 @@ -CapabilityRegistry_AddCapabilityTest:test_AddCapability_NoConfigurationContract() (gas: 146887) -CapabilityRegistry_AddCapabilityTest:test_AddCapability_WithConfiguration() (gas: 171153) -CapabilityRegistry_AddCapabilityTest:test_DeprecatesCapability() (gas: 88700) -CapabilityRegistry_AddCapabilityTest:test_EmitsEvent() (gas: 88821) -CapabilityRegistry_AddCapabilityTest:test_RevertWhen_CalledByNonAdmin() (gas: 21734) -CapabilityRegistry_AddCapabilityTest:test_RevertWhen_CalledByNonAdmin() (gas: 22208) +CapabilityRegistry_AddCapabilityTest:test_AddCapability_NoConfigurationContract() (gas: 146839) +CapabilityRegistry_AddCapabilityTest:test_AddCapability_WithConfiguration() (gas: 171105) +CapabilityRegistry_AddCapabilityTest:test_DeprecatesCapability() (gas: 88694) +CapabilityRegistry_AddCapabilityTest:test_EmitsEvent() (gas: 88815) +CapabilityRegistry_AddCapabilityTest:test_RevertWhen_CalledByNonAdmin() (gas: 21728) +CapabilityRegistry_AddCapabilityTest:test_RevertWhen_CalledByNonAdmin() (gas: 22199) CapabilityRegistry_AddCapabilityTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 15521) -CapabilityRegistry_AddCapabilityTest:test_RevertWhen_CapabilityExists() (gas: 138709) -CapabilityRegistry_AddCapabilityTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 89502) -CapabilityRegistry_AddCapabilityTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 3889776) -CapabilityRegistry_AddCapabilityTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 25007) -CapabilityRegistry_AddDONTest:test_AddDON() (gas: 332981) -CapabilityRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19294) -CapabilityRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 155475) -CapabilityRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 224972) -CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 239517) -CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 108063) -CapabilityRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 40167) -CapabilityRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 169939) -CapabilityRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 134000) -CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 16961) -CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 17813) -CapabilityRegistry_AddNodesTest:test_AddsNodeInfo() (gas: 355902) -CapabilityRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 355890) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301737) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55394) -CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27730) -CapabilityRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 24597) -CapabilityRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27436) -CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27069) -CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 310150) -CapabilityRegistry_GetCapabilitiesTest:test_ExcludesDeprecatedCapabilities() (gas: 115108) -CapabilityRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 54030) -CapabilityRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 72024) -CapabilityRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 116236) -CapabilityRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 10848) -CapabilityRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 11927) -CapabilityRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 34409) -CapabilityRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 99043) -CapabilityRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 60003) -CapabilityRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 73840) -CapabilityRegistry_RemoveDONsTest:test_RemovesDON() (gas: 99917) -CapabilityRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 15675) -CapabilityRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 14166) -CapabilityRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 141827) -CapabilityRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 15767) -CapabilityRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 80925) -CapabilityRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 57877) -CapabilityRegistry_RemoveNodesTest:test_RemovesNode() (gas: 57876) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25091) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 18407) -CapabilityRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 18397) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19379) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 133511) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 17799) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 203008) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 217599) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 86101) -CapabilityRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 148020) -CapabilityRegistry_UpdateDONTest:test_UpdatesDON() (gas: 331007) -CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 17727) -CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 17651) -CapabilityRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 72390) -CapabilityRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 252355) -CapabilityRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 159643) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 36277) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 24598) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 27368) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 29330) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27356) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27033) -CapabilityRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 25690) -CapabilityRegistry_UpdateNodesTest:test_UpdatesNodeInfo() (gas: 159632) -KeystoneForwarder_ReportTest:test_Report_SuccessfulDelivery() (gas: 143626) -KeystoneForwarder_ReportTest:test_RevertWhen_AnySignatureIsInvalid() (gas: 109344) -KeystoneForwarder_ReportTest:test_RevertWhen_AnySignerIsInvalid() (gas: 140918) -KeystoneForwarder_ReportTest:test_RevertWhen_ReportAlreadyProcessed() (gas: 152819) -KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasDuplicateSignatures() (gas: 117273) -KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasIncorrectDON() (gas: 93443) -KeystoneForwarder_ReportTest:test_RevertWhen_ReportIsMalformed() (gas: 67749) -KeystoneForwarder_ReportTest:test_RevertWhen_TooFewSignatures() (gas: 78061) -KeystoneForwarder_ReportTest:test_RevertWhen_TooManySignatures() (gas: 78741) -KeystoneForwarder_SetConfigTest:test_RevertWhen_ExcessSigners() (gas: 19965) -KeystoneForwarder_SetConfigTest:test_RevertWhen_FaultToleranceIsZero() (gas: 89956) -KeystoneForwarder_SetConfigTest:test_RevertWhen_InsufficientSigners() (gas: 14315) -KeystoneForwarder_SetConfigTest:test_RevertWhen_NotOwner() (gas: 90678) -KeystoneForwarder_SetConfigTest:test_RevertWhen_ProvidingDuplicateSigners() (gas: 847316) -KeystoneForwarder_SetConfigTest:test_SetConfig_FirstTime() (gas: 2224343) -KeystoneForwarder_SetConfigTest:test_SetConfig_WhenSignersAreRemoved() (gas: 2367289) -KeystoneForwarder_TypeAndVersionTest:test_TypeAndVersion() (gas: 9663) \ No newline at end of file +CapabilityRegistry_AddCapabilityTest:test_RevertWhen_CapabilityExists() (gas: 138685) +CapabilityRegistry_AddCapabilityTest:test_RevertWhen_CapabilityIsDeprecated() (gas: 89496) +CapabilityRegistry_AddCapabilityTest:test_RevertWhen_ConfigurationContractDoesNotMatchInterface() (gas: 3998052) +CapabilityRegistry_AddCapabilityTest:test_RevertWhen_ConfigurationContractNotDeployed() (gas: 24995) +CapabilityRegistry_AddDONTest:test_AddDON() (gas: 332870) +CapabilityRegistry_AddDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19285) +CapabilityRegistry_AddDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 155460) +CapabilityRegistry_AddDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 224960) +CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 239487) +CapabilityRegistry_AddDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 108051) +CapabilityRegistry_AddDONTest:test_RevertWhen_FaultToleranceIsZero() (gas: 40158) +CapabilityRegistry_AddDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 169921) +CapabilityRegistry_AddNodeOperatorsTest:test_AddNodeOperators() (gas: 133916) +CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_CalledByNonAdmin() (gas: 16949) +CapabilityRegistry_AddNodeOperatorsTest:test_RevertWhen_NodeOperatorAdminAddressZero() (gas: 17795) +CapabilityRegistry_AddNodesTest:test_AddsNodeInfo() (gas: 355866) +CapabilityRegistry_AddNodesTest:test_OwnerCanAddNodes() (gas: 355854) +CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingDuplicateP2PId() (gas: 301701) +CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 55370) +CapabilityRegistry_AddNodesTest:test_RevertWhen_AddingNodeWithoutCapabilities() (gas: 27706) +CapabilityRegistry_AddNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 24579) +CapabilityRegistry_AddNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27412) +CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27051) +CapabilityRegistry_AddNodesTest:test_RevertWhen_SignerAddressNotUnique() (gas: 310108) +CapabilityRegistry_GetCapabilitiesTest:test_ExcludesDeprecatedCapabilities() (gas: 115054) +CapabilityRegistry_GetCapabilitiesTest:test_ReturnsCapabilities() (gas: 53946) +CapabilityRegistry_GetDONsTest:test_CorrectlyFetchesDONs() (gas: 71958) +CapabilityRegistry_GetDONsTest:test_DoesNotIncludeRemovedDONs() (gas: 116197) +CapabilityRegistry_GetHashedCapabilityTest:test_CorrectlyGeneratesHashedCapabilityId() (gas: 10842) +CapabilityRegistry_GetHashedCapabilityTest:test_DoesNotCauseIncorrectClashes() (gas: 11915) +CapabilityRegistry_GetNodeOperatorsTest:test_CorrectlyFetchesNodeOperators() (gas: 34361) +CapabilityRegistry_GetNodeOperatorsTest:test_DoesNotIncludeRemovedNodeOperators() (gas: 99004) +CapabilityRegistry_GetNodesTest:test_CorrectlyFetchesNodes() (gas: 59970) +CapabilityRegistry_GetNodesTest:test_DoesNotIncludeRemovedNodes() (gas: 73816) +CapabilityRegistry_RemoveDONsTest:test_RemovesDON() (gas: 99887) +CapabilityRegistry_RemoveDONsTest:test_RevertWhen_CalledByNonAdmin() (gas: 15669) +CapabilityRegistry_RemoveDONsTest:test_RevertWhen_DONDoesNotExist() (gas: 14160) +CapabilityRegistry_RemoveNodeOperatorsTest:test_RemovesNodeOperator() (gas: 141779) +CapabilityRegistry_RemoveNodeOperatorsTest:test_RevertWhen_CalledByNonOwner() (gas: 15761) +CapabilityRegistry_RemoveNodesTest:test_CanAddNodeWithSameSignerAddressAfterRemoving() (gas: 80895) +CapabilityRegistry_RemoveNodesTest:test_OwnerCanRemoveNodes() (gas: 57865) +CapabilityRegistry_RemoveNodesTest:test_RemovesNode() (gas: 57864) +CapabilityRegistry_RemoveNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 25085) +CapabilityRegistry_RemoveNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 18395) +CapabilityRegistry_RemoveNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 18385) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_CalledByNonAdmin() (gas: 19370) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_CapabilityDoesNotExist() (gas: 133496) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_DONDoesNotExist() (gas: 17790) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_DeprecatedCapabilityAdded() (gas: 202996) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateCapabilityAdded() (gas: 217569) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_DuplicateNodeAdded() (gas: 86089) +CapabilityRegistry_UpdateDONTest:test_RevertWhen_NodeDoesNotSupportCapability() (gas: 148002) +CapabilityRegistry_UpdateDONTest:test_UpdatesDON() (gas: 330869) +CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_CalledByNonAdminAndNonOwner() (gas: 17712) +CapabilityRegistry_UpdateNodeOperatorTest:test_RevertWhen_NodeOperatorAdminIsZeroAddress() (gas: 17636) +CapabilityRegistry_UpdateNodeOperatorTest:test_UpdatesNodeOperator() (gas: 72345) +CapabilityRegistry_UpdateNodesTest:test_CanUpdateParamsIfNodeSignerAddressNoLongerUsed() (gas: 252301) +CapabilityRegistry_UpdateNodesTest:test_OwnerCanUpdateNodes() (gas: 159616) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_AddingNodeWithInvalidCapability() (gas: 36253) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_CalledByNonNodeOperatorAdminAndNonOwner() (gas: 24580) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeDoesNotExist() (gas: 27344) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_NodeSignerAlreadyAssignedToAnotherNode() (gas: 29312) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_P2PIDEmpty() (gas: 27332) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_SignerAddressEmpty() (gas: 27015) +CapabilityRegistry_UpdateNodesTest:test_RevertWhen_UpdatingNodeWithoutCapabilities() (gas: 25666) +CapabilityRegistry_UpdateNodesTest:test_UpdatesNodeInfo() (gas: 159605) +KeystoneForwarder_ReportTest:test_Report_ConfigVersion() (gas: 2676465) +KeystoneForwarder_ReportTest:test_Report_SuccessfulDelivery() (gas: 150738) +KeystoneForwarder_ReportTest:test_RevertWhen_AlreadyProcessed() (gas: 158024) +KeystoneForwarder_ReportTest:test_RevertWhen_AnySignatureIsInvalid() (gas: 111634) +KeystoneForwarder_ReportTest:test_RevertWhen_AnySignerIsInvalid() (gas: 143377) +KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasDuplicateSignatures() (gas: 119553) +KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasIncorrectDON() (gas: 98500) +KeystoneForwarder_ReportTest:test_RevertWhen_ReportHasInexistentConfigVersion() (gas: 98757) +KeystoneForwarder_ReportTest:test_RevertWhen_ReportIsMalformed() (gas: 67777) +KeystoneForwarder_ReportTest:test_RevertWhen_TooFewSignatures() (gas: 77819) +KeystoneForwarder_ReportTest:test_RevertWhen_TooManySignatures() (gas: 78543) +KeystoneForwarder_SetConfigTest:test_RevertWhen_ExcessSigners() (gas: 20162) +KeystoneForwarder_SetConfigTest:test_RevertWhen_FaultToleranceIsZero() (gas: 90143) +KeystoneForwarder_SetConfigTest:test_RevertWhen_InsufficientSigners() (gas: 14511) +KeystoneForwarder_SetConfigTest:test_RevertWhen_NotOwner() (gas: 90874) +KeystoneForwarder_SetConfigTest:test_RevertWhen_ProvidingDuplicateSigners() (gas: 847644) +KeystoneForwarder_SetConfigTest:test_SetConfig_FirstTime() (gas: 2224138) +KeystoneForwarder_SetConfigTest:test_SetConfig_WhenSignersAreRemoved() (gas: 2365984) +KeystoneForwarder_TypeAndVersionTest:test_TypeAndVersion() (gas: 9641) \ No newline at end of file diff --git a/contracts/src/v0.8/keystone/KeystoneForwarder.sol b/contracts/src/v0.8/keystone/KeystoneForwarder.sol index a54c3686f0c..e8885bb7543 100644 --- a/contracts/src/v0.8/keystone/KeystoneForwarder.sol +++ b/contracts/src/v0.8/keystone/KeystoneForwarder.sol @@ -47,10 +47,11 @@ contract KeystoneForwarder is IForwarder, ConfirmedOwner, TypeAndVersionInterfac /// @param received The number of signatures received error InvalidSignatureCount(uint256 expected, uint256 received); - /// @notice This error is thrown whenever a report specifies a DON ID that - /// does not have a configuration. + /// @notice This error is thrown whenever a report specifies a configuration that + /// does not exist. /// @param donId The DON ID that was provided in the report - error InvalidDonId(uint32 donId); + /// @param configVersion The config version that was provided in the report + error InvalidConfig(uint32 donId, uint32 configVersion); /// @notice This error is thrown whenever a signer address is not in the /// configuration. @@ -75,7 +76,8 @@ contract KeystoneForwarder is IForwarder, ConfirmedOwner, TypeAndVersionInterfac } /// @notice Contains the configuration for each DON ID - mapping(uint32 donId => OracleSet) internal s_configs; + // @param configId keccak256(donId, donConfigVersion) + mapping(bytes32 configId => OracleSet) internal s_configs; struct DeliveryStatus { address transmitter; @@ -97,29 +99,41 @@ contract KeystoneForwarder is IForwarder, ConfirmedOwner, TypeAndVersionInterfac uint256 internal constant FORWARDER_METADATA_LENGTH = 45; uint256 internal constant SIGNATURE_LENGTH = 65; - function setConfig(uint32 donId, uint8 f, address[] calldata signers) external onlyOwner { + function setConfig(uint32 donId, uint32 configVersion, uint8 f, address[] calldata signers) external onlyOwner { if (f == 0) revert FaultToleranceMustBePositive(); if (signers.length > MAX_ORACLES) revert ExcessSigners(signers.length, MAX_ORACLES); if (signers.length <= 3 * f) revert InsufficientSigners(signers.length, 3 * f + 1); - // TODO: how does setConfig handle expiration? e.g. if the signer set changes + bytes32 configId = keccak256(abi.encode(donId, configVersion)); // remove any old signer addresses - for (uint256 i; i < s_configs[donId].signers.length; ++i) { - address signer = s_configs[donId].signers[i]; - delete s_configs[donId]._positions[signer]; + for (uint256 i; i < s_configs[configId].signers.length; ++i) { + address signer = s_configs[configId].signers[i]; + delete s_configs[configId]._positions[signer]; } // add new signer addresses - s_configs[donId].signers = signers; + s_configs[configId].signers = signers; for (uint256 i; i < signers.length; ++i) { // assign indices, detect duplicates address signer = signers[i]; - if (s_configs[donId]._positions[signer] != 0) revert DuplicateSigner(signer); - s_configs[donId]._positions[signer] = uint8(i) + 1; - s_configs[donId].signers.push(signer); + if (s_configs[configId]._positions[signer] != 0) revert DuplicateSigner(signer); + s_configs[configId]._positions[signer] = uint8(i) + 1; + s_configs[configId].signers.push(signer); } - s_configs[donId].f = f; + s_configs[configId].f = f; + } + + function clearConfig(uint32 donId, uint32 configVersion) external onlyOwner { + bytes32 configId = keccak256(abi.encode(donId, configVersion)); + + // remove any old signer addresses + for (uint256 i; i < s_configs[configId].signers.length; ++i) { + address signer = s_configs[configId].signers[i]; + delete s_configs[configId]._positions[signer]; + } + + s_configs[configId].f = 0; } // send a report to receiver @@ -133,19 +147,25 @@ contract KeystoneForwarder is IForwarder, ConfirmedOwner, TypeAndVersionInterfac revert InvalidReport(); } - (bytes32 workflowExecutionId, uint32 donId /* uint32 donConfigVersion */, , bytes2 reportId) = _getMetadata( - rawReport - ); + bytes32 workflowExecutionId; + bytes2 reportId; + bytes32 configId; + { + uint32 donId; + uint32 configVersion; + (workflowExecutionId, donId, configVersion, reportId) = _getMetadata(rawReport); - // f can never be 0, so this means the config doesn't actually exist - if (s_configs[donId].f == 0) revert InvalidDonId(donId); + configId = keccak256(abi.encode(donId, configVersion)); + + uint8 f = s_configs[configId].f; + // f can never be 0, so this means the config doesn't actually exist + if (f == 0) revert InvalidConfig(donId, configVersion); + if (f + 1 != signatures.length) revert InvalidSignatureCount(f + 1, signatures.length); + } bytes32 combinedId = _combinedId(receiverAddress, workflowExecutionId, reportId); if (s_reports[combinedId].transmitter != address(0)) revert AlreadyProcessed(combinedId); - if (s_configs[donId].f + 1 != signatures.length) - revert InvalidSignatureCount(s_configs[donId].f + 1, signatures.length); - // validate signatures { bytes32 completeHash = keccak256(abi.encodePacked(keccak256(rawReport), reportContext)); @@ -153,12 +173,11 @@ contract KeystoneForwarder is IForwarder, ConfirmedOwner, TypeAndVersionInterfac address[MAX_ORACLES] memory signed; uint8 index; for (uint256 i; i < signatures.length; ++i) { - // TODO: is libocr-style multiple bytes32 arrays more optimal, gas-wise? (bytes32 r, bytes32 s, uint8 v) = _splitSignature(signatures[i]); address signer = ecrecover(completeHash, v + 27, r, s); // validate signer is trusted and signature is unique - index = uint8(s_configs[donId]._positions[signer]); + index = uint8(s_configs[configId]._positions[signer]); if (index == 0) revert InvalidSigner(signer); // index is 1-indexed so we can detect unset signers index -= 1; if (signed[index] != address(0)) revert DuplicateSigner(signer); diff --git a/contracts/src/v0.8/keystone/test/KeystoneForwarderBaseTest.t.sol b/contracts/src/v0.8/keystone/test/KeystoneForwarderBaseTest.t.sol index 16b85f79fdb..fc5c3a160d5 100644 --- a/contracts/src/v0.8/keystone/test/KeystoneForwarderBaseTest.t.sol +++ b/contracts/src/v0.8/keystone/test/KeystoneForwarderBaseTest.t.sol @@ -51,4 +51,20 @@ contract BaseTest is Test { } return signerAddrs; } + + function _signReport( + bytes memory report, + bytes memory reportContext, + uint256 requiredSignatures + ) internal view returns (bytes[] memory signatures) { + signatures = new bytes[](requiredSignatures); + for (uint256 i = 0; i < requiredSignatures; i++) { + (uint8 v, bytes32 r, bytes32 s) = vm.sign( + s_signers[i].mockPrivateKey, + keccak256(abi.encodePacked(keccak256(report), reportContext)) + ); + signatures[i] = bytes.concat(r, s, bytes1(v - 27)); + } + return signatures; + } } diff --git a/contracts/src/v0.8/keystone/test/KeystoneForwarder_ReportTest.t.sol b/contracts/src/v0.8/keystone/test/KeystoneForwarder_ReportTest.t.sol index 236851fde14..f68917ba85a 100644 --- a/contracts/src/v0.8/keystone/test/KeystoneForwarder_ReportTest.t.sol +++ b/contracts/src/v0.8/keystone/test/KeystoneForwarder_ReportTest.t.sol @@ -27,7 +27,7 @@ contract KeystoneForwarder_ReportTest is BaseTest { function setUp() public override { BaseTest.setUp(); - s_forwarder.setConfig(DON_ID, F, _getSignerAddresses()); + s_forwarder.setConfig(DON_ID, CONFIG_VERSION, F, _getSignerAddresses()); mercuryReports[0] = hex"010203"; mercuryReports[1] = hex"aabbccdd"; @@ -37,13 +37,7 @@ contract KeystoneForwarder_ReportTest is BaseTest { header = abi.encodePacked(version, executionId, timestamp, DON_ID, CONFIG_VERSION, metadata); report = abi.encodePacked(header, rawReports); - for (uint256 i = 0; i < requiredSignaturesNum; i++) { - (uint8 v, bytes32 r, bytes32 s) = vm.sign( - s_signers[i].mockPrivateKey, - keccak256(abi.encodePacked(keccak256(report), reportContext)) - ); - signatures[i] = bytes.concat(r, s, bytes1(v - 27)); - } + signatures = _signReport(report, reportContext, requiredSignaturesNum); vm.startPrank(TRANSMITTER); } @@ -63,7 +57,25 @@ contract KeystoneForwarder_ReportTest is BaseTest { rawReports ); - vm.expectRevert(abi.encodeWithSelector(KeystoneForwarder.InvalidDonId.selector, invalidDONId)); + vm.expectRevert(abi.encodeWithSelector(KeystoneForwarder.InvalidConfig.selector, invalidDONId, CONFIG_VERSION)); + s_forwarder.report(address(s_receiver), reportWithInvalidDONId, reportContext, signatures); + } + + function test_RevertWhen_ReportHasInexistentConfigVersion() public { + bytes memory reportWithInvalidDONId = abi.encodePacked( + version, + executionId, + timestamp, + DON_ID, + CONFIG_VERSION + 1, + workflowId, + workflowName, + workflowOwner, + reportId, + rawReports + ); + + vm.expectRevert(abi.encodeWithSelector(KeystoneForwarder.InvalidConfig.selector, DON_ID, CONFIG_VERSION + 1)); s_forwarder.report(address(s_receiver), reportWithInvalidDONId, reportContext, signatures); } @@ -129,9 +141,6 @@ contract KeystoneForwarder_ReportTest is BaseTest { } function test_Report_SuccessfulDelivery() public { - // taken from https://github.com/smartcontractkit/chainlink/blob/2390ec7f3c56de783ef4e15477e99729f188c524/core/services/relay/evm/cap_encoder_test.go#L42-L55 - // bytes memory report = hex"6d795f6964000000000000000000000000000000000000000000000000000000010203046d795f657865637574696f6e5f696400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000301020300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004aabbccdd00000000000000000000000000000000000000000000000000000000"; - vm.expectEmit(address(s_receiver)); emit MessageReceived(metadata, mercuryReports); @@ -144,4 +153,57 @@ contract KeystoneForwarder_ReportTest is BaseTest { address transmitter = s_forwarder.getTransmitter(address(s_receiver), executionId, reportId); assertEq(transmitter, TRANSMITTER, "transmitter mismatch"); } + + function test_Report_ConfigVersion() public { + vm.stopPrank(); + // configure a new configVersion + vm.prank(ADMIN); + s_forwarder.setConfig(DON_ID, CONFIG_VERSION + 1, F, _getSignerAddresses()); + + // old version still works + vm.expectEmit(address(s_receiver)); + emit MessageReceived(metadata, mercuryReports); + + vm.expectEmit(address(s_forwarder)); + emit ReportProcessed(address(s_receiver), executionId, true); + + vm.prank(TRANSMITTER); + s_forwarder.report(address(s_receiver), report, reportContext, signatures); + + // after clear the old version doesn't work anymore + vm.prank(ADMIN); + s_forwarder.clearConfig(DON_ID, CONFIG_VERSION); + + vm.expectRevert(abi.encodeWithSelector(KeystoneForwarder.InvalidConfig.selector, DON_ID, CONFIG_VERSION)); + vm.prank(TRANSMITTER); + s_forwarder.report(address(s_receiver), report, reportContext, signatures); + + // but new config does + bytes32 newExecutionId = hex"6d795f657865637574696f6e5f69640000000000000000000000000000000001"; + bytes memory newMetadata = abi.encodePacked(workflowId, workflowName, workflowOwner, reportId); + bytes memory newHeader = abi.encodePacked( + version, + newExecutionId, + timestamp, + DON_ID, + CONFIG_VERSION + 1, + newMetadata + ); + bytes memory newReport = abi.encodePacked(newHeader, rawReports); + // resign the new report + bytes[] memory newSignatures = _signReport(newReport, reportContext, requiredSignaturesNum); + + vm.expectEmit(address(s_receiver)); + emit MessageReceived(newMetadata, mercuryReports); + + vm.expectEmit(address(s_forwarder)); + emit ReportProcessed(address(s_receiver), newExecutionId, true); + + vm.prank(TRANSMITTER); + s_forwarder.report(address(s_receiver), newReport, reportContext, newSignatures); + + // validate transmitter was recorded + address transmitter = s_forwarder.getTransmitter(address(s_receiver), newExecutionId, reportId); + assertEq(transmitter, TRANSMITTER, "transmitter mismatch"); + } } diff --git a/contracts/src/v0.8/keystone/test/KeystoneForwarder_SetConfigTest.t.sol b/contracts/src/v0.8/keystone/test/KeystoneForwarder_SetConfigTest.t.sol index b6b37faff2f..4b908bb702f 100644 --- a/contracts/src/v0.8/keystone/test/KeystoneForwarder_SetConfigTest.t.sol +++ b/contracts/src/v0.8/keystone/test/KeystoneForwarder_SetConfigTest.t.sol @@ -11,26 +11,26 @@ contract KeystoneForwarder_SetConfigTest is BaseTest { vm.stopPrank(); // BaseTest sets ADMIN vm.prank(STRANGER); vm.expectRevert(); - s_forwarder.setConfig(DON_ID, F, _getSignerAddresses()); + s_forwarder.setConfig(DON_ID, CONFIG_VERSION, F, _getSignerAddresses()); } function test_RevertWhen_FaultToleranceIsZero() public { vm.expectRevert(KeystoneForwarder.FaultToleranceMustBePositive.selector); - s_forwarder.setConfig(DON_ID, 0, _getSignerAddresses()); + s_forwarder.setConfig(DON_ID, CONFIG_VERSION, 0, _getSignerAddresses()); } function test_RevertWhen_InsufficientSigners() public { address[] memory signers = new address[](1); vm.expectRevert(abi.encodeWithSelector(KeystoneForwarder.InsufficientSigners.selector, 1, 4)); - s_forwarder.setConfig(DON_ID, F, signers); + s_forwarder.setConfig(DON_ID, CONFIG_VERSION, F, signers); } function test_RevertWhen_ExcessSigners() public { address[] memory signers = new address[](64); vm.expectRevert(abi.encodeWithSelector(KeystoneForwarder.ExcessSigners.selector, 64, 31)); - s_forwarder.setConfig(DON_ID, F, signers); + s_forwarder.setConfig(DON_ID, CONFIG_VERSION, F, signers); } function test_RevertWhen_ProvidingDuplicateSigners() public { @@ -38,16 +38,16 @@ contract KeystoneForwarder_SetConfigTest is BaseTest { signers[1] = signers[0]; vm.expectRevert(abi.encodeWithSelector(KeystoneForwarder.DuplicateSigner.selector, signers[0])); - s_forwarder.setConfig(DON_ID, F, signers); + s_forwarder.setConfig(DON_ID, CONFIG_VERSION, F, signers); } function test_SetConfig_FirstTime() public { - s_forwarder.setConfig(DON_ID, F, _getSignerAddresses()); + s_forwarder.setConfig(DON_ID, CONFIG_VERSION, F, _getSignerAddresses()); } function test_SetConfig_WhenSignersAreRemoved() public { - s_forwarder.setConfig(DON_ID, F, _getSignerAddresses()); + s_forwarder.setConfig(DON_ID, CONFIG_VERSION, F, _getSignerAddresses()); - s_forwarder.setConfig(DON_ID, F, _getSignerAddresses(16)); + s_forwarder.setConfig(DON_ID, CONFIG_VERSION, F, _getSignerAddresses(16)); } } diff --git a/core/gethwrappers/keystone/generated/forwarder/forwarder.go b/core/gethwrappers/keystone/generated/forwarder/forwarder.go index 6fd963d7886..b4f209f1c32 100644 --- a/core/gethwrappers/keystone/generated/forwarder/forwarder.go +++ b/core/gethwrappers/keystone/generated/forwarder/forwarder.go @@ -31,8 +31,8 @@ var ( ) var KeystoneForwarderMetaData = &bind.MetaData{ - ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"AlreadyProcessed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"DuplicateSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSigners\",\"type\":\"uint256\"}],\"name\":\"ExcessSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FaultToleranceMustBePositive\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minSigners\",\"type\":\"uint256\"}],\"name\":\"InsufficientSigners\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"}],\"name\":\"InvalidDonId\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"InvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"received\",\"type\":\"uint256\"}],\"name\":\"InvalidSignatureCount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"InvalidVersion\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"workflowExecutionId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"result\",\"type\":\"bool\"}],\"name\":\"ReportProcessed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"workflowExecutionId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes2\",\"name\":\"reportId\",\"type\":\"bytes2\"}],\"name\":\"getTransmitter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiverAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"rawReport\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"reportContext\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"report\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", - Bin: "0x608060405234801561001057600080fd5b5033806000816100675760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615610097576100978161009f565b505050610148565b336001600160a01b038216036100f75760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161005e565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b6115ec806101576000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806379ba50971161005b57806379ba5097146100f25780638864b864146100fa5780638da5cb5b146101d3578063f2fde38b146101f157600080fd5b80631128956514610082578063134a46f014610097578063181f5a77146100aa575b600080fd5b61009561009036600461119d565b610204565b005b6100956100a5366004611248565b61093e565b604080518082018252601781527f4b657973746f6e65466f7277617264657220312e302e30000000000000000000602082015290516100e99190611320565b60405180910390f35b610095610c9f565b6101ae61010836600461133a565b6040805160609490941b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660208086019190915260348501939093527fffff000000000000000000000000000000000000000000000000000000000000919091166054840152805160368185030181526056909301815282519282019290922060009081526003909152205473ffffffffffffffffffffffffffffffffffffffff1690565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e9565b60005473ffffffffffffffffffffffffffffffffffffffff166101ae565b6100956101ff36600461139f565b610d9c565b60015474010000000000000000000000000000000000000000900460ff1615610259576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055606d8510156102d3576040517fb55ac75400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080600061031789898080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610db092505050565b63ffffffff831660009081526002602052604081205494975092955093505060ff9091169003610380576040517fea1b312900000000000000000000000000000000000000000000000000000000815263ffffffff831660048201526024015b60405180910390fd5b604080517fffffffffffffffffffffffffffffffffffffffff00000000000000000000000060608d901b16602080830191909152603482018690527fffff000000000000000000000000000000000000000000000000000000000000841660548301528251808303603601815260569092018352815191810191909120600081815260039092529190205473ffffffffffffffffffffffffffffffffffffffff161561045b576040517f1a20d3e600000000000000000000000000000000000000000000000000000000815260048101829052602401610377565b63ffffffff831660009081526002602052604090205485906104819060ff1660016113e9565b60ff16146104ec5763ffffffff83166000908152600260205260409020546104ad9060ff1660016113e9565b6040517fd6022e8e00000000000000000000000000000000000000000000000000000000815260ff909116600482015260248101869052604401610377565b60008a8a6040516104fe929190611408565b604051908190038120610517918b908b90602001611418565b60405160208183030381529060405280519060200120905061053761102a565b6000805b888110156107a55760008060006105a98d8d8681811061055d5761055d611432565b905060200281019061056f9190611461565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610e5292505050565b9194509250905060006001886105c084601b6113e9565b6040805160008152602081018083529390935260ff90911690820152606081018690526080810185905260a0016020604051602081039080840390855afa15801561060f573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015163ffffffff8e1660009081526002602081815284832073ffffffffffffffffffffffffffffffffffffffff851684529091019052918220549850925060ff8816900390506106ca576040517fbf18af4300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610377565b6106d56001876114c6565b955060008760ff8816601f81106106ee576106ee611432565b602002015173ffffffffffffffffffffffffffffffffffffffff1614610758576040517fe021c4f200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610377565b80878760ff16601f811061076e5761076e611432565b73ffffffffffffffffffffffffffffffffffffffff90921660209290920201525061079e92508391506114df9050565b905061053b565b5050505060008b73ffffffffffffffffffffffffffffffffffffffff1663805f21328c8c602d90606d926107db93929190611517565b8e8e606d9080926107ee93929190611517565b6040518563ffffffff1660e01b815260040161080d949392919061158a565b600060405180830381600087803b15801561082757600080fd5b505af1925050508015610838575060015b15610841575060015b604080518082018252338152821515602080830191825260008681526003909152839020915182549151151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff9182161791909117909155905186918e16907fbe015fd2fd7c1a00158e111095c794ae7030eb413d2a0990e5b78d3114df1d499061090090851515815260200190565b60405180910390a35050600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16905550505050505050505050565b610946610eb2565b8260ff16600003610983576040517f0743bae600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601f8111156109c8576040517f61750f4000000000000000000000000000000000000000000000000000000000815260048101829052601f6024820152604401610377565b6109d38360036115bc565b60ff168111610a3157806109e88460036115bc565b6109f39060016113e9565b6040517f9dd9e6d8000000000000000000000000000000000000000000000000000000008152600481019290925260ff166024820152604401610377565b60005b63ffffffff8516600090815260026020526040902060010154811015610ad25763ffffffff85166000908152600260205260408120600101805483908110610a7e57610a7e611432565b600091825260208083209091015463ffffffff891683526002808352604080852073ffffffffffffffffffffffffffffffffffffffff9093168552910190915281205550610acb816114df565b9050610a34565b5063ffffffff84166000908152600260205260409020610af6906001018383611049565b5060005b81811015610c54576000838383818110610b1657610b16611432565b9050602002016020810190610b2b919061139f565b63ffffffff8716600090815260026020818152604080842073ffffffffffffffffffffffffffffffffffffffff86168552909201905290205490915015610bb6576040517fe021c4f200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff82166004820152602401610377565b610bc18260016113e9565b63ffffffff8716600090815260026020818152604080842073ffffffffffffffffffffffffffffffffffffffff909616808552868401835290842060ff959095169094559081526001938401805494850181558252902090910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055610c4d816114df565b9050610afa565b50505063ffffffff91909116600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff909216919091179055565b60015473ffffffffffffffffffffffffffffffffffffffff163314610d20576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e6572000000000000000000006044820152606401610377565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610da4610eb2565b610dad81610f35565b50565b60008060008084600081518110610dc957610dc9611432565b60209101015160f81c600114610e2a5784600081518110610dec57610dec611432565b01602001516040517f7207be2000000000000000000000000000000000000000000000000000000000815260f89190911c6004820152602401610377565b50505050602181015160458201516049830151608b90930151919360e091821c9390911c9190565b60008060006041845114610e9457836040517f2adfdc300000000000000000000000000000000000000000000000000000000081526004016103779190611320565b50505060208101516040820151606090920151909260009190911a90565b60005473ffffffffffffffffffffffffffffffffffffffff163314610f33576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e6572000000000000000000006044820152606401610377565b565b3373ffffffffffffffffffffffffffffffffffffffff821603610fb4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610377565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b604051806103e00160405280601f906020820280368337509192915050565b8280548282559060005260206000209081019282156110c1579160200282015b828111156110c15781547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff843516178255602090920191600190910190611069565b506110cd9291506110d1565b5090565b5b808211156110cd57600081556001016110d2565b803573ffffffffffffffffffffffffffffffffffffffff8116811461110a57600080fd5b919050565b60008083601f84011261112157600080fd5b50813567ffffffffffffffff81111561113957600080fd5b60208301915083602082850101111561115157600080fd5b9250929050565b60008083601f84011261116a57600080fd5b50813567ffffffffffffffff81111561118257600080fd5b6020830191508360208260051b850101111561115157600080fd5b60008060008060008060006080888a0312156111b857600080fd5b6111c1886110e6565b9650602088013567ffffffffffffffff808211156111de57600080fd5b6111ea8b838c0161110f565b909850965060408a013591508082111561120357600080fd5b61120f8b838c0161110f565b909650945060608a013591508082111561122857600080fd5b506112358a828b01611158565b989b979a50959850939692959293505050565b6000806000806060858703121561125e57600080fd5b843563ffffffff8116811461127257600080fd5b9350602085013560ff8116811461128857600080fd5b9250604085013567ffffffffffffffff8111156112a457600080fd5b6112b087828801611158565b95989497509550505050565b6000815180845260005b818110156112e2576020818501810151868301820152016112c6565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061133360208301846112bc565b9392505050565b60008060006060848603121561134f57600080fd5b611358846110e6565b92506020840135915060408401357fffff0000000000000000000000000000000000000000000000000000000000008116811461139457600080fd5b809150509250925092565b6000602082840312156113b157600080fd5b611333826110e6565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff8181168382160190811115611402576114026113ba565b92915050565b8183823760009101908152919050565b838152818360208301376000910160200190815292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261149657600080fd5b83018035915067ffffffffffffffff8211156114b157600080fd5b60200191503681900382131561115157600080fd5b60ff8281168282160390811115611402576114026113ba565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611510576115106113ba565b5060010190565b6000808585111561152757600080fd5b8386111561153457600080fd5b5050820193919092039150565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b60408152600061159e604083018688611541565b82810360208401526115b1818587611541565b979650505050505050565b60ff81811683821602908116908181146115d8576115d86113ba565b509291505056fea164736f6c6343000813000a", + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"messageId\",\"type\":\"bytes32\"}],\"name\":\"AlreadyProcessed\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"DuplicateSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxSigners\",\"type\":\"uint256\"}],\"name\":\"ExcessSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FaultToleranceMustBePositive\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"numSigners\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"minSigners\",\"type\":\"uint256\"}],\"name\":\"InsufficientSigners\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"}],\"name\":\"InvalidConfig\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidReport\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes\",\"name\":\"signature\",\"type\":\"bytes\"}],\"name\":\"InvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"expected\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"received\",\"type\":\"uint256\"}],\"name\":\"InvalidSignatureCount\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"}],\"name\":\"InvalidSigner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint8\",\"name\":\"version\",\"type\":\"uint8\"}],\"name\":\"InvalidVersion\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ReentrantCall\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferRequested\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"workflowExecutionId\",\"type\":\"bytes32\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"result\",\"type\":\"bool\"}],\"name\":\"ReportProcessed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"}],\"name\":\"clearConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"workflowExecutionId\",\"type\":\"bytes32\"},{\"internalType\":\"bytes2\",\"name\":\"reportId\",\"type\":\"bytes2\"}],\"name\":\"getTransmitter\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiverAddress\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"rawReport\",\"type\":\"bytes\"},{\"internalType\":\"bytes\",\"name\":\"reportContext\",\"type\":\"bytes\"},{\"internalType\":\"bytes[]\",\"name\":\"signatures\",\"type\":\"bytes[]\"}],\"name\":\"report\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint32\",\"name\":\"donId\",\"type\":\"uint32\"},{\"internalType\":\"uint32\",\"name\":\"configVersion\",\"type\":\"uint32\"},{\"internalType\":\"uint8\",\"name\":\"f\",\"type\":\"uint8\"},{\"internalType\":\"address[]\",\"name\":\"signers\",\"type\":\"address[]\"}],\"name\":\"setConfig\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"typeAndVersion\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"pure\",\"type\":\"function\"}]", + Bin: "0x608060405234801561001057600080fd5b5033806000816100675760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b600080546001600160a01b0319166001600160a01b0384811691909117909155811615610097576100978161009f565b505050610148565b336001600160a01b038216036100f75760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161005e565b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b611786806101576000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80638da5cb5b1161005b5780638da5cb5b146101cb578063ee59d26c146101e9578063ef6e17a0146101fc578063f2fde38b1461020f57600080fd5b8063112895651461008d578063181f5a77146100a257806379ba5097146100ea5780638864b864146100f2575b600080fd5b6100a061009b3660046112e6565b610222565b005b604080518082018252601781527f4b657973746f6e65466f7277617264657220312e302e30000000000000000000602082015290516100e191906113f5565b60405180910390f35b6100a0610983565b6101a661010036600461140f565b6040805160609490941b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660208086019190915260348501939093527fffff000000000000000000000000000000000000000000000000000000000000919091166054840152805160368185030181526056909301815282519282019290922060009081526003909152205473ffffffffffffffffffffffffffffffffffffffff1690565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100e1565b60005473ffffffffffffffffffffffffffffffffffffffff166101a6565b6100a06101f7366004611488565b610a80565b6100a061020a366004611506565b610de5565b6100a061021d366004611539565b610ee5565b60015474010000000000000000000000000000000000000000900460ff1615610277576040517f37ed32e800000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055606d8510156102f1576040517fb55ac75400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008060008060006103388b8b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610ef992505050565b6040805163ffffffff808616602083015284169181019190915293985096509093509150606001604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529181528151602092830120600081815260029093529082205490945060ff16908190036103f8576040517f16c0791600000000000000000000000000000000000000000000000000000000815263ffffffff8085166004830152831660248201526044015b60405180910390fd5b86610404826001611583565b60ff161461045657610417816001611583565b6040517fd6022e8e00000000000000000000000000000000000000000000000000000000815260ff9091166004820152602481018890526044016103ef565b50506040805160608d901b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000016602080830191909152603482018790527fffff0000000000000000000000000000000000000000000000000000000000008616605483015282516036818403018152605690920190925280519101206000915060008181526003602052604090205490915073ffffffffffffffffffffffffffffffffffffffff1615610538576040517f1a20d3e6000000000000000000000000000000000000000000000000000000008152600481018290526024016103ef565b60008a8a60405161054a9291906115a2565b604051908190038120610563918b908b906020016115b2565b604051602081830303815290604052805190602001209050610583611173565b6000805b888110156107ea5760008060006105f58d8d868181106105a9576105a96115cc565b90506020028101906105bb91906115fb565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f9b92505050565b91945092509050600060018861060c84601b611583565b6040805160008152602081018083529390935260ff90911690820152606081018690526080810185905260a0016020604051602081039080840390855afa15801561065b573d6000803e3d6000fd5b5050604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015160008d81526002602081815284832073ffffffffffffffffffffffffffffffffffffffff851684529091019052918220549850925060ff88169003905061070f576040517fbf18af4300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016103ef565b61071a600187611660565b955060008760ff8816601f8110610733576107336115cc565b602002015173ffffffffffffffffffffffffffffffffffffffff161461079d576040517fe021c4f200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016103ef565b80878760ff16601f81106107b3576107b36115cc565b73ffffffffffffffffffffffffffffffffffffffff9092166020929092020152506107e392508391506116799050565b9050610587565b5050505060008b73ffffffffffffffffffffffffffffffffffffffff1663805f21328c8c602d90606d92610820939291906116b1565b8e8e606d908092610833939291906116b1565b6040518563ffffffff1660e01b81526004016108529493929190611724565b600060405180830381600087803b15801561086c57600080fd5b505af192505050801561087d575060015b15610886575060015b604080518082018252338152821515602080830191825260008681526003909152839020915182549151151574010000000000000000000000000000000000000000027fffffffffffffffffffffff00000000000000000000000000000000000000000090921673ffffffffffffffffffffffffffffffffffffffff9182161791909117909155905186918e16907fbe015fd2fd7c1a00158e111095c794ae7030eb413d2a0990e5b78d3114df1d499061094590851515815260200190565b60405180910390a35050600180547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16905550505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610a04576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e65720000000000000000000060448201526064016103ef565b60008054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610a88610ffb565b8260ff16600003610ac5576040517f0743bae600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b601f811115610b0a576040517f61750f4000000000000000000000000000000000000000000000000000000000815260048101829052601f60248201526044016103ef565b610b15836003611756565b60ff168111610b735780610b2a846003611756565b610b35906001611583565b6040517f9dd9e6d8000000000000000000000000000000000000000000000000000000008152600481019290925260ff1660248201526044016103ef565b6040805163ffffffff878116602080840191909152908716828401528251808303840181526060909201909252805191012060005b600082815260026020526040902060010154811015610c32576000828152600260205260408120600101805483908110610be457610be46115cc565b60009182526020808320909101548583526002808352604080852073ffffffffffffffffffffffffffffffffffffffff9093168552910190915281205550610c2b81611679565b9050610ba8565b506000818152600260205260409020610c4f906001018484611192565b5060005b82811015610d9f576000848483818110610c6f57610c6f6115cc565b9050602002016020810190610c849190611539565b600084815260026020818152604080842073ffffffffffffffffffffffffffffffffffffffff86168552909201905290205490915015610d08576040517fe021c4f200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff821660048201526024016103ef565b610d13826001611583565b600084815260026020818152604080842073ffffffffffffffffffffffffffffffffffffffff909616808552868401835290842060ff959095169094559081526001938401805494850181558252902090910180547fffffffffffffffffffffffff0000000000000000000000000000000000000000169091179055610d9881611679565b9050610c53565b50600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff949094169390931790925550505050565b610ded610ffb565b6040805163ffffffff848116602080840191909152908416828401528251808303840181526060909201909252805191012060005b600082815260026020526040902060010154811015610eac576000828152600260205260408120600101805483908110610e5e57610e5e6115cc565b60009182526020808320909101548583526002808352604080852073ffffffffffffffffffffffffffffffffffffffff9093168552910190915281205550610ea581611679565b9050610e22565b50600090815260026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690555050565b610eed610ffb565b610ef68161107e565b50565b60008060008084600081518110610f1257610f126115cc565b60209101015160f81c600114610f735784600081518110610f3557610f356115cc565b01602001516040517f7207be2000000000000000000000000000000000000000000000000000000000815260f89190911c60048201526024016103ef565b50505050602181015160458201516049830151608b90930151919360e091821c9390911c9190565b60008060006041845114610fdd57836040517f2adfdc300000000000000000000000000000000000000000000000000000000081526004016103ef91906113f5565b50505060208101516040820151606090920151909260009190911a90565b60005473ffffffffffffffffffffffffffffffffffffffff16331461107c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e65720000000000000000000060448201526064016103ef565b565b3373ffffffffffffffffffffffffffffffffffffffff8216036110fd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c6600000000000000000060448201526064016103ef565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b604051806103e00160405280601f906020820280368337509192915050565b82805482825590600052602060002090810192821561120a579160200282015b8281111561120a5781547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8435161782556020909201916001909101906111b2565b5061121692915061121a565b5090565b5b80821115611216576000815560010161121b565b803573ffffffffffffffffffffffffffffffffffffffff8116811461125357600080fd5b919050565b60008083601f84011261126a57600080fd5b50813567ffffffffffffffff81111561128257600080fd5b60208301915083602082850101111561129a57600080fd5b9250929050565b60008083601f8401126112b357600080fd5b50813567ffffffffffffffff8111156112cb57600080fd5b6020830191508360208260051b850101111561129a57600080fd5b60008060008060008060006080888a03121561130157600080fd5b61130a8861122f565b9650602088013567ffffffffffffffff8082111561132757600080fd5b6113338b838c01611258565b909850965060408a013591508082111561134c57600080fd5b6113588b838c01611258565b909650945060608a013591508082111561137157600080fd5b5061137e8a828b016112a1565b989b979a50959850939692959293505050565b6000815180845260005b818110156113b75760208185018101518683018201520161139b565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b6020815260006114086020830184611391565b9392505050565b60008060006060848603121561142457600080fd5b61142d8461122f565b92506020840135915060408401357fffff0000000000000000000000000000000000000000000000000000000000008116811461146957600080fd5b809150509250925092565b803563ffffffff8116811461125357600080fd5b6000806000806000608086880312156114a057600080fd5b6114a986611474565b94506114b760208701611474565b9350604086013560ff811681146114cd57600080fd5b9250606086013567ffffffffffffffff8111156114e957600080fd5b6114f5888289016112a1565b969995985093965092949392505050565b6000806040838503121561151957600080fd5b61152283611474565b915061153060208401611474565b90509250929050565b60006020828403121561154b57600080fd5b6114088261122f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff818116838216019081111561159c5761159c611554565b92915050565b8183823760009101908152919050565b838152818360208301376000910160200190815292915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261163057600080fd5b83018035915067ffffffffffffffff82111561164b57600080fd5b60200191503681900382131561129a57600080fd5b60ff828116828216039081111561159c5761159c611554565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036116aa576116aa611554565b5060010190565b600080858511156116c157600080fd5b838611156116ce57600080fd5b5050820193919092039150565b8183528181602085013750600060208284010152600060207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f840116840101905092915050565b6040815260006117386040830186886116db565b828103602084015261174b8185876116db565b979650505050505050565b60ff818116838216029081169081811461177257611772611554565b509291505056fea164736f6c6343000813000a", } var KeystoneForwarderABI = KeystoneForwarderMetaData.ABI @@ -249,6 +249,18 @@ func (_KeystoneForwarder *KeystoneForwarderTransactorSession) AcceptOwnership() return _KeystoneForwarder.Contract.AcceptOwnership(&_KeystoneForwarder.TransactOpts) } +func (_KeystoneForwarder *KeystoneForwarderTransactor) ClearConfig(opts *bind.TransactOpts, donId uint32, configVersion uint32) (*types.Transaction, error) { + return _KeystoneForwarder.contract.Transact(opts, "clearConfig", donId, configVersion) +} + +func (_KeystoneForwarder *KeystoneForwarderSession) ClearConfig(donId uint32, configVersion uint32) (*types.Transaction, error) { + return _KeystoneForwarder.Contract.ClearConfig(&_KeystoneForwarder.TransactOpts, donId, configVersion) +} + +func (_KeystoneForwarder *KeystoneForwarderTransactorSession) ClearConfig(donId uint32, configVersion uint32) (*types.Transaction, error) { + return _KeystoneForwarder.Contract.ClearConfig(&_KeystoneForwarder.TransactOpts, donId, configVersion) +} + func (_KeystoneForwarder *KeystoneForwarderTransactor) Report(opts *bind.TransactOpts, receiverAddress common.Address, rawReport []byte, reportContext []byte, signatures [][]byte) (*types.Transaction, error) { return _KeystoneForwarder.contract.Transact(opts, "report", receiverAddress, rawReport, reportContext, signatures) } @@ -261,16 +273,16 @@ func (_KeystoneForwarder *KeystoneForwarderTransactorSession) Report(receiverAdd return _KeystoneForwarder.Contract.Report(&_KeystoneForwarder.TransactOpts, receiverAddress, rawReport, reportContext, signatures) } -func (_KeystoneForwarder *KeystoneForwarderTransactor) SetConfig(opts *bind.TransactOpts, donId uint32, f uint8, signers []common.Address) (*types.Transaction, error) { - return _KeystoneForwarder.contract.Transact(opts, "setConfig", donId, f, signers) +func (_KeystoneForwarder *KeystoneForwarderTransactor) SetConfig(opts *bind.TransactOpts, donId uint32, configVersion uint32, f uint8, signers []common.Address) (*types.Transaction, error) { + return _KeystoneForwarder.contract.Transact(opts, "setConfig", donId, configVersion, f, signers) } -func (_KeystoneForwarder *KeystoneForwarderSession) SetConfig(donId uint32, f uint8, signers []common.Address) (*types.Transaction, error) { - return _KeystoneForwarder.Contract.SetConfig(&_KeystoneForwarder.TransactOpts, donId, f, signers) +func (_KeystoneForwarder *KeystoneForwarderSession) SetConfig(donId uint32, configVersion uint32, f uint8, signers []common.Address) (*types.Transaction, error) { + return _KeystoneForwarder.Contract.SetConfig(&_KeystoneForwarder.TransactOpts, donId, configVersion, f, signers) } -func (_KeystoneForwarder *KeystoneForwarderTransactorSession) SetConfig(donId uint32, f uint8, signers []common.Address) (*types.Transaction, error) { - return _KeystoneForwarder.Contract.SetConfig(&_KeystoneForwarder.TransactOpts, donId, f, signers) +func (_KeystoneForwarder *KeystoneForwarderTransactorSession) SetConfig(donId uint32, configVersion uint32, f uint8, signers []common.Address) (*types.Transaction, error) { + return _KeystoneForwarder.Contract.SetConfig(&_KeystoneForwarder.TransactOpts, donId, configVersion, f, signers) } func (_KeystoneForwarder *KeystoneForwarderTransactor) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) { @@ -733,9 +745,11 @@ type KeystoneForwarderInterface interface { AcceptOwnership(opts *bind.TransactOpts) (*types.Transaction, error) + ClearConfig(opts *bind.TransactOpts, donId uint32, configVersion uint32) (*types.Transaction, error) + Report(opts *bind.TransactOpts, receiverAddress common.Address, rawReport []byte, reportContext []byte, signatures [][]byte) (*types.Transaction, error) - SetConfig(opts *bind.TransactOpts, donId uint32, f uint8, signers []common.Address) (*types.Transaction, error) + SetConfig(opts *bind.TransactOpts, donId uint32, configVersion uint32, f uint8, signers []common.Address) (*types.Transaction, error) TransferOwnership(opts *bind.TransactOpts, to common.Address) (*types.Transaction, error) diff --git a/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt index ee15b49b181..e11ebba404d 100644 --- a/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/keystone/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -1,4 +1,4 @@ GETH_VERSION: 1.13.8 -forwarder: ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.abi ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.bin 892c6ced16576bebd887eb581147c02139853d5143a0c9b77704efefd4ab7ec7 +forwarder: ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.abi ../../../contracts/solc/v0.8.19/KeystoneForwarder/KeystoneForwarder.bin ec6e94293700d400ca7b22989d54793e905d6febce3b84054727a58c473b9cf3 keystone_capability_registry: ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.abi ../../../contracts/solc/v0.8.19/CapabilityRegistry/CapabilityRegistry.bin 462c8a4c5cba9c429320f6ed041a8ea64749ec7c8cec7938c10767d07e3053e3 ocr3_capability: ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.abi ../../../contracts/solc/v0.8.19/OCR3Capability/OCR3Capability.bin 9dcbdf55bd5729ba266148da3f17733eb592c871c2108ccca546618628fd9ad2