From 37299f423a1ab6309bb64d629957aa380c185eed Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 4 Dec 2024 13:59:20 -0500 Subject: [PATCH 1/7] add legacy curse check to offramps --- contracts/gas-snapshots/ccip.gas-snapshot | 164 ++++++++++---------- contracts/src/v0.8/ccip/offRamp/OffRamp.sol | 6 +- 2 files changed, 86 insertions(+), 84 deletions(-) diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index cfa764656a4..9fe9ff57ec6 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -68,7 +68,7 @@ CCIPHome_setCandidate:test_setCandidate_success() (gas: 1365439) CCIPHome_supportsInterface:test_supportsInterface_success() (gas: 9885) DefensiveExampleTest:test_HappyPath_Success() (gas: 200540) DefensiveExampleTest:test_Recovery() (gas: 425013) -E2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1512323) +E2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1514039) EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 96980) EtherSenderReceiverTest_ccipReceive:test_ccipReceive_happyPath() (gas: 49812) EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongToken() (gas: 17479) @@ -352,12 +352,12 @@ NonceManager_NonceIncrementation:test_getIncrementedOutboundNonce_Success() (gas NonceManager_NonceIncrementation:test_incrementInboundNonce_Skip() (gas: 23706) NonceManager_NonceIncrementation:test_incrementInboundNonce_Success() (gas: 38778) NonceManager_NonceIncrementation:test_incrementNoncesInboundAndOutbound_Success() (gas: 71901) -NonceManager_OffRampUpgrade:test_NoPrevOffRampForChain_Success() (gas: 185776) -NonceManager_OffRampUpgrade:test_UpgradedNonceNewSenderStartsAtZero_Success() (gas: 189229) -NonceManager_OffRampUpgrade:test_UpgradedNonceStartsAtV1Nonce_Success() (gas: 252250) -NonceManager_OffRampUpgrade:test_UpgradedOffRampNonceSkipsIfMsgInFlight_Success() (gas: 220615) +NonceManager_OffRampUpgrade:test_NoPrevOffRampForChain_Success() (gas: 186205) +NonceManager_OffRampUpgrade:test_UpgradedNonceNewSenderStartsAtZero_Success() (gas: 189658) +NonceManager_OffRampUpgrade:test_UpgradedNonceStartsAtV1Nonce_Success() (gas: 253108) +NonceManager_OffRampUpgrade:test_UpgradedOffRampNonceSkipsIfMsgInFlight_Success() (gas: 221473) NonceManager_OffRampUpgrade:test_UpgradedSenderNoncesReadsPreviousRamp_Success() (gas: 60497) -NonceManager_OffRampUpgrade:test_Upgraded_Success() (gas: 152941) +NonceManager_OffRampUpgrade:test_Upgraded_Success() (gas: 153370) NonceManager_OnRampUpgrade:test_UpgradeNonceNewSenderStartsAtZero_Success() (gas: 166101) NonceManager_OnRampUpgrade:test_UpgradeNonceStartsAtV1Nonce_Success() (gas: 195828) NonceManager_OnRampUpgrade:test_UpgradeSenderNoncesReadsPreviousRamp_Success() (gas: 139098) @@ -370,114 +370,114 @@ NonceManager_applyPreviousRampsUpdates:test_PreviousRampAlreadySet_overrideAllow NonceManager_applyPreviousRampsUpdates:test_SingleRampUpdate_success() (gas: 66889) NonceManager_applyPreviousRampsUpdates:test_ZeroInput_success() (gas: 12213) NonceManager_typeAndVersion:test_typeAndVersion() (gas: 9705) -OffRamp_afterOC3ConfigSet:test_afterOCR3ConfigSet_SignatureVerificationDisabled_Revert() (gas: 5887669) +OffRamp_afterOC3ConfigSet:test_afterOCR3ConfigSet_SignatureVerificationDisabled_Revert() (gas: 5942270) OffRamp_applySourceChainConfigUpdates:test_AddMultipleChains_Success() (gas: 626160) OffRamp_applySourceChainConfigUpdates:test_AddNewChain_Success() (gas: 166527) OffRamp_applySourceChainConfigUpdates:test_ApplyZeroUpdates_Success() (gas: 16719) -OffRamp_applySourceChainConfigUpdates:test_InvalidOnRampUpdate_Revert() (gas: 274713) +OffRamp_applySourceChainConfigUpdates:test_InvalidOnRampUpdate_Revert() (gas: 275141) OffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChainOnRamp_Success() (gas: 168604) OffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChain_Success() (gas: 181059) OffRamp_applySourceChainConfigUpdates:test_RouterAddress_Revert() (gas: 13441) OffRamp_applySourceChainConfigUpdates:test_ZeroOnRampAddress_Revert() (gas: 72724) OffRamp_applySourceChainConfigUpdates:test_ZeroSourceChainSelector_Revert() (gas: 15519) -OffRamp_applySourceChainConfigUpdates:test_allowNonOnRampUpdateAfterLaneIsUsed_success() (gas: 285041) -OffRamp_batchExecute:test_MultipleReportsDifferentChainsSkipCursedChain_Success() (gas: 177470) -OffRamp_batchExecute:test_MultipleReportsDifferentChains_Success() (gas: 333296) -OffRamp_batchExecute:test_MultipleReportsSameChain_Success() (gas: 276562) -OffRamp_batchExecute:test_MultipleReportsSkipDuplicate_Success() (gas: 168408) -OffRamp_batchExecute:test_OutOfBoundsGasLimitsAccess_Revert() (gas: 187974) -OffRamp_batchExecute:test_SingleReport_Success() (gas: 156406) -OffRamp_batchExecute:test_Unhealthy_Success() (gas: 545037) +OffRamp_applySourceChainConfigUpdates:test_allowNonOnRampUpdateAfterLaneIsUsed_success() (gas: 285469) +OffRamp_batchExecute:test_MultipleReportsDifferentChainsSkipCursedChain_Success() (gas: 177916) +OffRamp_batchExecute:test_MultipleReportsDifferentChains_Success() (gas: 334153) +OffRamp_batchExecute:test_MultipleReportsSameChain_Success() (gas: 277419) +OffRamp_batchExecute:test_MultipleReportsSkipDuplicate_Success() (gas: 169265) +OffRamp_batchExecute:test_OutOfBoundsGasLimitsAccess_Revert() (gas: 188402) +OffRamp_batchExecute:test_SingleReport_Success() (gas: 156834) +OffRamp_batchExecute:test_Unhealthy_Success() (gas: 545483) OffRamp_batchExecute:test_ZeroReports_Revert() (gas: 10600) -OffRamp_commit:test_CommitOnRampMismatch_Revert() (gas: 92744) +OffRamp_commit:test_CommitOnRampMismatch_Revert() (gas: 93169) OffRamp_commit:test_FailedRMNVerification_Reverts() (gas: 63432) -OffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 69993) -OffRamp_commit:test_InvalidInterval_Revert() (gas: 66119) -OffRamp_commit:test_InvalidRootRevert() (gas: 65214) -OffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6648767) -OffRamp_commit:test_NoConfig_Revert() (gas: 6232185) +OffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 70418) +OffRamp_commit:test_InvalidInterval_Revert() (gas: 66544) +OffRamp_commit:test_InvalidRootRevert() (gas: 65639) +OffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6703796) +OffRamp_commit:test_NoConfig_Revert() (gas: 6287214) OffRamp_commit:test_OnlyGasPriceUpdates_Success() (gas: 112985) OffRamp_commit:test_OnlyPriceUpdateStaleReport_Revert() (gas: 121175) OffRamp_commit:test_OnlyTokenPriceUpdates_Success() (gas: 112917) OffRamp_commit:test_PriceSequenceNumberCleared_Success() (gas: 355254) -OffRamp_commit:test_ReportAndPriceUpdate_Success() (gas: 164263) -OffRamp_commit:test_ReportOnlyRootSuccess_gas() (gas: 141269) -OffRamp_commit:test_RootAlreadyCommitted_Revert() (gas: 148268) -OffRamp_commit:test_RootWithRMNDisabled_success() (gas: 153986) -OffRamp_commit:test_SourceChainNotEnabled_Revert() (gas: 61681) -OffRamp_commit:test_StaleReportWithRoot_Success() (gas: 232354) -OffRamp_commit:test_UnauthorizedTransmitter_Revert() (gas: 125230) -OffRamp_commit:test_Unhealthy_Revert() (gas: 60482) -OffRamp_commit:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 206800) +OffRamp_commit:test_ReportAndPriceUpdate_Success() (gas: 164691) +OffRamp_commit:test_ReportOnlyRootSuccess_gas() (gas: 141697) +OffRamp_commit:test_RootAlreadyCommitted_Revert() (gas: 149121) +OffRamp_commit:test_RootWithRMNDisabled_success() (gas: 154414) +OffRamp_commit:test_SourceChainNotEnabled_Revert() (gas: 62106) +OffRamp_commit:test_StaleReportWithRoot_Success() (gas: 233210) +OffRamp_commit:test_UnauthorizedTransmitter_Revert() (gas: 125658) +OffRamp_commit:test_Unhealthy_Revert() (gas: 60499) +OffRamp_commit:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 207228) OffRamp_commit:test_ZeroEpochAndRound_Revert() (gas: 53621) -OffRamp_constructor:test_Constructor_Success() (gas: 6194282) -OffRamp_constructor:test_SourceChainSelector_Revert() (gas: 136585) -OffRamp_constructor:test_ZeroChainSelector_Revert() (gas: 103622) -OffRamp_constructor:test_ZeroNonceManager_Revert() (gas: 101471) -OffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 162065) -OffRamp_constructor:test_ZeroRMNRemote_Revert() (gas: 101388) -OffRamp_constructor:test_ZeroTokenAdminRegistry_Revert() (gas: 101392) +OffRamp_constructor:test_Constructor_Success() (gas: 6248885) +OffRamp_constructor:test_SourceChainSelector_Revert() (gas: 136674) +OffRamp_constructor:test_ZeroChainSelector_Revert() (gas: 103710) +OffRamp_constructor:test_ZeroNonceManager_Revert() (gas: 101559) +OffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 162154) +OffRamp_constructor:test_ZeroRMNRemote_Revert() (gas: 101476) +OffRamp_constructor:test_ZeroTokenAdminRegistry_Revert() (gas: 101480) OffRamp_execute:test_IncorrectArrayType_Revert() (gas: 17639) -OffRamp_execute:test_LargeBatch_Success() (gas: 3376243) -OffRamp_execute:test_MultipleReportsWithPartialValidationFailures_Success() (gas: 371146) -OffRamp_execute:test_MultipleReports_Success() (gas: 298685) -OffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 7056935) -OffRamp_execute:test_NoConfig_Revert() (gas: 6281405) +OffRamp_execute:test_LargeBatch_Success() (gas: 3380575) +OffRamp_execute:test_MultipleReportsWithPartialValidationFailures_Success() (gas: 372003) +OffRamp_execute:test_MultipleReports_Success() (gas: 299542) +OffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 7111965) +OffRamp_execute:test_NoConfig_Revert() (gas: 6336435) OffRamp_execute:test_NonArray_Revert() (gas: 27680) -OffRamp_execute:test_SingleReport_Success() (gas: 175664) -OffRamp_execute:test_UnauthorizedTransmitter_Revert() (gas: 147820) -OffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 6948577) +OffRamp_execute:test_SingleReport_Success() (gas: 176093) +OffRamp_execute:test_UnauthorizedTransmitter_Revert() (gas: 148249) +OffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 7003178) OffRamp_execute:test_ZeroReports_Revert() (gas: 17361) OffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens() (gas: 56135) OffRamp_executeSingleMessage:test_executeSingleMessage_NonContract() (gas: 20463) OffRamp_executeSingleMessage:test_executeSingleMessage_NonContractWithTokens() (gas: 237997) OffRamp_executeSingleMessage:test_executeSingleMessage_WithMessageInterceptor() (gas: 91972) OffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens() (gas: 268069) -OffRamp_executeSingleReport:test_DisabledSourceChain_Revert() (gas: 28703) -OffRamp_executeSingleReport:test_EmptyReport_Revert() (gas: 15574) -OffRamp_executeSingleReport:test_InvalidSourcePoolAddress() (gas: 474583) -OffRamp_executeSingleReport:test_ManualExecutionNotYetEnabled_Revert() (gas: 48340) -OffRamp_executeSingleReport:test_MismatchingDestChainSelector_Revert() (gas: 34145) -OffRamp_executeSingleReport:test_NonExistingSourceChain_Revert() (gas: 28868) -OffRamp_executeSingleReport:test_ReceiverError_Success() (gas: 187644) -OffRamp_executeSingleReport:test_RetryFailedMessageWithoutManualExecution_Revert() (gas: 197820) -OffRamp_executeSingleReport:test_RootNotCommitted_Revert() (gas: 40731) -OffRamp_executeSingleReport:test_RouterYULCall_Revert() (gas: 404990) -OffRamp_executeSingleReport:test_SingleMessageNoTokensOtherChain_Success() (gas: 248718) -OffRamp_executeSingleReport:test_SingleMessageNoTokensUnordered_Success() (gas: 192362) -OffRamp_executeSingleReport:test_SingleMessageNoTokens_Success() (gas: 212388) -OffRamp_executeSingleReport:test_SingleMessageToNonCCIPReceiver_Success() (gas: 243698) -OffRamp_executeSingleReport:test_SingleMessagesNoTokensSuccess_gas() (gas: 141476) -OffRamp_executeSingleReport:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 402512) -OffRamp_executeSingleReport:test_SkippedIncorrectNonce_Success() (gas: 58286) -OffRamp_executeSingleReport:test_TokenDataMismatch_Revert() (gas: 73856) -OffRamp_executeSingleReport:test_TwoMessagesWithTokensAndGE_Success() (gas: 574072) -OffRamp_executeSingleReport:test_TwoMessagesWithTokensSuccess_gas() (gas: 522623) -OffRamp_executeSingleReport:test_UnexpectedTokenData_Revert() (gas: 26839) -OffRamp_executeSingleReport:test_UnhealthySingleChainCurse_Revert() (gas: 540743) -OffRamp_executeSingleReport:test_Unhealthy_Success() (gas: 540690) -OffRamp_executeSingleReport:test_WithCurseOnAnotherSourceChain_Success() (gas: 451736) -OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 135241) -OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 164902) +OffRamp_executeSingleReport:test_DisabledSourceChain_Revert() (gas: 29131) +OffRamp_executeSingleReport:test_EmptyReport_Revert() (gas: 16002) +OffRamp_executeSingleReport:test_InvalidSourcePoolAddress() (gas: 475012) +OffRamp_executeSingleReport:test_ManualExecutionNotYetEnabled_Revert() (gas: 48768) +OffRamp_executeSingleReport:test_MismatchingDestChainSelector_Revert() (gas: 34573) +OffRamp_executeSingleReport:test_NonExistingSourceChain_Revert() (gas: 29296) +OffRamp_executeSingleReport:test_ReceiverError_Success() (gas: 188073) +OffRamp_executeSingleReport:test_RetryFailedMessageWithoutManualExecution_Revert() (gas: 198677) +OffRamp_executeSingleReport:test_RootNotCommitted_Revert() (gas: 41159) +OffRamp_executeSingleReport:test_RouterYULCall_Revert() (gas: 405419) +OffRamp_executeSingleReport:test_SingleMessageNoTokensOtherChain_Success() (gas: 249576) +OffRamp_executeSingleReport:test_SingleMessageNoTokensUnordered_Success() (gas: 193218) +OffRamp_executeSingleReport:test_SingleMessageNoTokens_Success() (gas: 213246) +OffRamp_executeSingleReport:test_SingleMessageToNonCCIPReceiver_Success() (gas: 244127) +OffRamp_executeSingleReport:test_SingleMessagesNoTokensSuccess_gas() (gas: 141905) +OffRamp_executeSingleReport:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 402940) +OffRamp_executeSingleReport:test_SkippedIncorrectNonce_Success() (gas: 58715) +OffRamp_executeSingleReport:test_TokenDataMismatch_Revert() (gas: 74284) +OffRamp_executeSingleReport:test_TwoMessagesWithTokensAndGE_Success() (gas: 574501) +OffRamp_executeSingleReport:test_TwoMessagesWithTokensSuccess_gas() (gas: 523052) +OffRamp_executeSingleReport:test_UnexpectedTokenData_Revert() (gas: 27267) +OffRamp_executeSingleReport:test_UnhealthySingleChainCurse_Revert() (gas: 541189) +OffRamp_executeSingleReport:test_Unhealthy_Success() (gas: 541136) +OffRamp_executeSingleReport:test_WithCurseOnAnotherSourceChain_Success() (gas: 452165) +OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 136097) +OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 165759) OffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3888846) OffRamp_getExecutionState:test_GetDifferentChainExecutionState_Success() (gas: 121048) OffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 89561) OffRamp_manuallyExecute:test_ManualExecGasLimitMismatchSingleReport_Revert() (gas: 81514) OffRamp_manuallyExecute:test_manuallyExecute_DestinationGasAmountCountMismatch_Revert() (gas: 74194) -OffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 172517) -OffRamp_manuallyExecute:test_manuallyExecute_FailedTx_Revert() (gas: 213009) +OffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 172946) +OffRamp_manuallyExecute:test_manuallyExecute_FailedTx_Revert() (gas: 213865) OffRamp_manuallyExecute:test_manuallyExecute_ForkedChain_Revert() (gas: 27203) OffRamp_manuallyExecute:test_manuallyExecute_GasLimitMismatchMultipleReports_Revert() (gas: 165665) OffRamp_manuallyExecute:test_manuallyExecute_InvalidReceiverExecutionGasLimit_Revert() (gas: 27740) OffRamp_manuallyExecute:test_manuallyExecute_InvalidTokenGasOverride_Revert() (gas: 55317) -OffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 489426) -OffRamp_manuallyExecute:test_manuallyExecute_MultipleReportsWithSingleCursedLane_Revert() (gas: 314585) -OffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails_Success() (gas: 2224632) -OffRamp_manuallyExecute:test_manuallyExecute_SourceChainSelectorMismatch_Revert() (gas: 165207) -OffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 225918) -OffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 226458) -OffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 773856) -OffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 344327) +OffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 490282) +OffRamp_manuallyExecute:test_manuallyExecute_MultipleReportsWithSingleCursedLane_Revert() (gas: 315031) +OffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails_Success() (gas: 2225488) +OffRamp_manuallyExecute:test_manuallyExecute_SourceChainSelectorMismatch_Revert() (gas: 166061) +OffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 226774) +OffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 227314) +OffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 775573) +OffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 345183) OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_NotACompatiblePool_Revert() (gas: 37676) OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 101487) OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_InvalidDataLength_Revert() (gas: 36812) diff --git a/contracts/src/v0.8/ccip/offRamp/OffRamp.sol b/contracts/src/v0.8/ccip/offRamp/OffRamp.sol index 4937373d653..0d85ce0df3b 100644 --- a/contracts/src/v0.8/ccip/offRamp/OffRamp.sol +++ b/contracts/src/v0.8/ccip/offRamp/OffRamp.sol @@ -362,7 +362,8 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { ) internal { uint64 sourceChainSelector = report.sourceChainSelector; bool manualExecution = manualExecGasExecOverrides.length != 0; - if (i_rmnRemote.isCursed(bytes16(uint128(sourceChainSelector)))) { + // The double call to the RMNRemote is to check for both chainwise and legacy cursing before proceeding + if (i_rmnRemote.isCursed(bytes16(uint128(sourceChainSelector))) || i_rmnRemote.isCursed()) { if (manualExecution) { // For manual execution we don't want to silently fail so we revert. revert CursedByRMN(sourceChainSelector); @@ -811,7 +812,8 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { Internal.MerkleRoot memory root = commitReport.merkleRoots[i]; uint64 sourceChainSelector = root.sourceChainSelector; - if (i_rmnRemote.isCursed(bytes16(uint128(sourceChainSelector)))) { + // Check for both chainwise cursing or legacy cursing + if (i_rmnRemote.isCursed(bytes16(uint128(sourceChainSelector))) || i_rmnRemote.isCursed()) { revert CursedByRMN(sourceChainSelector); } From 894b1ce213db6835520c12e1c1627bad4d99547e Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 5 Dec 2024 10:39:55 -0500 Subject: [PATCH 2/7] fill in coverage test gap --- contracts/gas-snapshots/ccip.gas-snapshot | 298 +++++++++--------- contracts/src/v0.8/ccip/offRamp/OffRamp.sol | 4 +- .../test/offRamp/OffRamp/OffRamp.commit.t.sol | 18 ++ .../OffRamp/OffRamp.manuallyExecute.t.sol | 20 ++ 4 files changed, 190 insertions(+), 150 deletions(-) diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 9fe9ff57ec6..ec180897f7d 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -1,9 +1,9 @@ -ARMProxy_constructor:test_Constructor() (gas: 302231) -ARMProxy_isCursed:test_IsCursed_Success() (gas: 47209) -ARMProxy_isCursed:test_call_ARMCallEmptyContract_Revert() (gas: 19412) -ARMProxy_isCursed:test_isCursed_RevertReasonForwarded_Revert() (gas: 45210) -ARMProxy_setARM:test_SetARM() (gas: 16599) -ARMProxy_setARM:test_SetARMzero() (gas: 11275) +ARMProxy_constructor:test_Constructor() (gas: 543485) +ARMProxy_isCursed:test_IsCursed_Success() (gas: 49195) +ARMProxy_isCursed:test_call_ARMCallEmptyContract_Revert() (gas: 20200) +ARMProxy_isCursed:test_isCursed_RevertReasonForwarded_Revert() (gas: 47022) +ARMProxy_setARM:test_SetARM() (gas: 18216) +ARMProxy_setARM:test_SetARMzero() (gas: 12144) BurnFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 27346) BurnFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 54878) BurnFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 244452) @@ -21,75 +21,75 @@ BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 244496) BurnWithFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 24223) CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2077691) -CCIPHome__validateConfig:test__validateConfigLessTransmittersThanSigners_Success() (gas: 332619) -CCIPHome__validateConfig:test__validateConfigSmallerFChain_Success() (gas: 458568) -CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_OfframpAddressCannotBeZero_Reverts() (gas: 289191) -CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_RMNHomeAddressCannotBeZero_Reverts() (gas: 289486) -CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 292216) -CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 288824) -CCIPHome__validateConfig:test__validateConfig_FChainTooHigh_Reverts() (gas: 336363) -CCIPHome__validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 290590) -CCIPHome__validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 290055) -CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmittersEmptyAddresses_Reverts() (gas: 308646) -CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1191231) -CCIPHome__validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 288918) -CCIPHome__validateConfig:test__validateConfig_RMNHomeAddressCannotBeZero_Reverts() (gas: 289112) -CCIPHome__validateConfig:test__validateConfig_Success() (gas: 299797) -CCIPHome__validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 773105) -CCIPHome__validateConfig:test__validateConfig_ZeroP2PId_Reverts() (gas: 293455) -CCIPHome__validateConfig:test__validateConfig_ZeroSignerKey_Reverts() (gas: 293503) -CCIPHome_applyChainConfigUpdates:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 187738) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 349623) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 18065) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 272742) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 14952) -CCIPHome_applyChainConfigUpdates:test_getPaginatedCCIPHomes_Success() (gas: 372561) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_DONIdMismatch_reverts() (gas: 38098) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InnerCallReverts_reverts() (gas: 11827) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InvalidSelector_reverts() (gas: 11015) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_reverts() (gas: 37072) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_success() (gas: 1455716) -CCIPHome_constructor:test_constructor_CapabilitiesRegistryAddressZero_reverts() (gas: 63767) -CCIPHome_constructor:test_constructor_success() (gas: 3455841) -CCIPHome_getAllConfigs:test_getAllConfigs_success() (gas: 2773000) -CCIPHome_getCapabilityConfiguration:test_getCapabilityConfiguration_success() (gas: 9138) -CCIPHome_getConfigDigests:test_getConfigDigests_success() (gas: 2547397) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_CanOnlySelfCall_reverts() (gas: 9087) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 23005) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 8817) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_multiplePlugins_success() (gas: 5113570) -CCIPHome_revokeCandidate:test_revokeCandidate_CanOnlySelfCall_reverts() (gas: 9068) -CCIPHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 19105) -CCIPHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 8817) -CCIPHome_revokeCandidate:test_revokeCandidate_success() (gas: 30674) -CCIPHome_setCandidate:test_setCandidate_CanOnlySelfCall_reverts() (gas: 29383) -CCIPHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 1395154) -CCIPHome_setCandidate:test_setCandidate_success() (gas: 1365439) -CCIPHome_supportsInterface:test_supportsInterface_success() (gas: 9885) +CCIPHome__validateConfig:test__validateConfigLessTransmittersThanSigners_Success() (gas: 380773) +CCIPHome__validateConfig:test__validateConfigSmallerFChain_Success() (gas: 558994) +CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_OfframpAddressCannotBeZero_Reverts() (gas: 323319) +CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_RMNHomeAddressCannotBeZero_Reverts() (gas: 323792) +CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 326840) +CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 322566) +CCIPHome__validateConfig:test__validateConfig_FChainTooHigh_Reverts() (gas: 396028) +CCIPHome__validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 325553) +CCIPHome__validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 324473) +CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmittersEmptyAddresses_Reverts() (gas: 354424) +CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1424879) +CCIPHome__validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 322684) +CCIPHome__validateConfig:test__validateConfig_RMNHomeAddressCannotBeZero_Reverts() (gas: 323067) +CCIPHome__validateConfig:test__validateConfig_Success() (gas: 340335) +CCIPHome__validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 1177201) +CCIPHome__validateConfig:test__validateConfig_ZeroP2PId_Reverts() (gas: 328982) +CCIPHome__validateConfig:test__validateConfig_ZeroSignerKey_Reverts() (gas: 329095) +CCIPHome_applyChainConfigUpdates:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 199206) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 371830) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 23171) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 286616) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 16588) +CCIPHome_applyChainConfigUpdates:test_getPaginatedCCIPHomes_Success() (gas: 411194) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_DONIdMismatch_reverts() (gas: 53139) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InnerCallReverts_reverts() (gas: 14017) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InvalidSelector_reverts() (gas: 12740) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_reverts() (gas: 51199) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_success() (gas: 1553472) +CCIPHome_constructor:test_constructor_CapabilitiesRegistryAddressZero_reverts() (gas: 67022) +CCIPHome_constructor:test_constructor_success() (gas: 5322506) +CCIPHome_getAllConfigs:test_getAllConfigs_success() (gas: 2917876) +CCIPHome_getCapabilityConfiguration:test_getCapabilityConfiguration_success() (gas: 10244) +CCIPHome_getConfigDigests:test_getConfigDigests_success() (gas: 2632384) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_CanOnlySelfCall_reverts() (gas: 10152) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 27337) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 9924) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_multiplePlugins_success() (gas: 5320500) +CCIPHome_revokeCandidate:test_revokeCandidate_CanOnlySelfCall_reverts() (gas: 10097) +CCIPHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 21525) +CCIPHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 9666) +CCIPHome_revokeCandidate:test_revokeCandidate_success() (gas: 39075) +CCIPHome_setCandidate:test_setCandidate_CanOnlySelfCall_reverts() (gas: 43957) +CCIPHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 1489850) +CCIPHome_setCandidate:test_setCandidate_success() (gas: 1435475) +CCIPHome_supportsInterface:test_supportsInterface_success() (gas: 11363) DefensiveExampleTest:test_HappyPath_Success() (gas: 200540) DefensiveExampleTest:test_Recovery() (gas: 425013) E2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1514039) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 96980) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_happyPath() (gas: 49812) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongToken() (gas: 17479) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongTokenAmount() (gas: 15753) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_feeToken() (gas: 99953) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_native() (gas: 76182) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_weth() (gas: 99974) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_feeToken() (gas: 145007) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_native() (gas: 80439) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_nativeExcess() (gas: 80604) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_weth() (gas: 96107) -EtherSenderReceiverTest_constructor:test_constructor() (gas: 17575) -EtherSenderReceiverTest_getFee:test_getFee() (gas: 27456) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_reverts_feeToken_tokenAmountNotEqualToMsgValue() (gas: 20355) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_feeToken() (gas: 16682) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_native() (gas: 16615) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_dataOverwrittenToMsgSender() (gas: 25456) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_emptyDataOverwrittenToMsgSender() (gas: 25373) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_invalidTokenAmounts() (gas: 17969) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_tokenOverwrittenToWeth() (gas: 25328) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_validMessage_extraArgs() (gas: 26348) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 103832) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_happyPath() (gas: 54732) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongToken() (gas: 21903) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongTokenAmount() (gas: 20674) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_feeToken() (gas: 116423) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_native() (gas: 91360) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_weth() (gas: 116371) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_feeToken() (gas: 167929) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_native() (gas: 98200) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_nativeExcess() (gas: 98574) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_weth() (gas: 117880) +EtherSenderReceiverTest_constructor:test_constructor() (gas: 19659) +EtherSenderReceiverTest_getFee:test_getFee() (gas: 41273) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_reverts_feeToken_tokenAmountNotEqualToMsgValue() (gas: 22872) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_feeToken() (gas: 18368) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_native() (gas: 18398) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_dataOverwrittenToMsgSender() (gas: 34950) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_emptyDataOverwrittenToMsgSender() (gas: 34719) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_invalidTokenAmounts() (gas: 23796) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_tokenOverwrittenToWeth() (gas: 34674) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_validMessage_extraArgs() (gas: 36217) FactoryBurnMintERC20_approve:test_Approve_Success() (gas: 55819) FactoryBurnMintERC20_approve:test_InvalidAddress_Reverts() (gas: 10703) FactoryBurnMintERC20_burn:test_BasicBurn_Success() (gas: 172464) @@ -252,11 +252,11 @@ LockReleaseTokenPool_transferLiquidity:test_transferLiquidity_Success() (gas: 83 LockReleaseTokenPool_transferLiquidity:test_transferLiquidity_transferTooMuch_Revert() (gas: 56056) LockReleaseTokenPool_withdrawalLiquidity:test_InsufficientLiquidity_Revert() (gas: 60188) LockReleaseTokenPool_withdrawalLiquidity:test_Unauthorized_Revert() (gas: 11464) -MerkleMultiProofTest:test_CVE_2023_34459() (gas: 5456) -MerkleMultiProofTest:test_EmptyLeaf_Revert() (gas: 3563) -MerkleMultiProofTest:test_MerkleRoot256() (gas: 394891) -MerkleMultiProofTest:test_MerkleRootSingleLeaf_Success() (gas: 3661) -MerkleMultiProofTest:test_SpecSync_gas() (gas: 34152) +MerkleMultiProofTest:test_CVE_2023_34459() (gas: 6328) +MerkleMultiProofTest:test_EmptyLeaf_Revert() (gas: 3975) +MerkleMultiProofTest:test_MerkleRoot256() (gas: 668330) +MerkleMultiProofTest:test_MerkleRootSingleLeaf_Success() (gas: 4074) +MerkleMultiProofTest:test_SpecSync_gas() (gas: 49316) MockRouterTest:test_ccipSendWithEVMExtraArgsV1_Success() (gas: 110095) MockRouterTest:test_ccipSendWithEVMExtraArgsV2_Success() (gas: 132614) MockRouterTest:test_ccipSendWithInsufficientNativeTokens_Revert() (gas: 34059) @@ -392,24 +392,25 @@ OffRamp_batchExecute:test_ZeroReports_Revert() (gas: 10600) OffRamp_commit:test_CommitOnRampMismatch_Revert() (gas: 93169) OffRamp_commit:test_FailedRMNVerification_Reverts() (gas: 63432) OffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 70418) -OffRamp_commit:test_InvalidInterval_Revert() (gas: 66544) -OffRamp_commit:test_InvalidRootRevert() (gas: 65639) -OffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6703796) -OffRamp_commit:test_NoConfig_Revert() (gas: 6287214) +OffRamp_commit:test_InvalidInterval_Revert() (gas: 66632) +OffRamp_commit:test_InvalidRootRevert() (gas: 65617) +OffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6703774) +OffRamp_commit:test_NoConfig_Revert() (gas: 6287192) OffRamp_commit:test_OnlyGasPriceUpdates_Success() (gas: 112985) -OffRamp_commit:test_OnlyPriceUpdateStaleReport_Revert() (gas: 121175) -OffRamp_commit:test_OnlyTokenPriceUpdates_Success() (gas: 112917) +OffRamp_commit:test_OnlyPriceUpdateStaleReport_Revert() (gas: 121153) +OffRamp_commit:test_OnlyTokenPriceUpdates_Success() (gas: 112984) OffRamp_commit:test_PriceSequenceNumberCleared_Success() (gas: 355254) -OffRamp_commit:test_ReportAndPriceUpdate_Success() (gas: 164691) +OffRamp_commit:test_ReportAndPriceUpdate_Success() (gas: 164669) OffRamp_commit:test_ReportOnlyRootSuccess_gas() (gas: 141697) OffRamp_commit:test_RootAlreadyCommitted_Revert() (gas: 149121) OffRamp_commit:test_RootWithRMNDisabled_success() (gas: 154414) -OffRamp_commit:test_SourceChainNotEnabled_Revert() (gas: 62106) -OffRamp_commit:test_StaleReportWithRoot_Success() (gas: 233210) -OffRamp_commit:test_UnauthorizedTransmitter_Revert() (gas: 125658) -OffRamp_commit:test_Unhealthy_Revert() (gas: 60499) -OffRamp_commit:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 207228) +OffRamp_commit:test_SourceChainNotEnabled_Revert() (gas: 62084) +OffRamp_commit:test_StaleReportWithRoot_Success() (gas: 233277) +OffRamp_commit:test_UnauthorizedTransmitter_Revert() (gas: 125745) +OffRamp_commit:test_Unhealthy_Revert() (gas: 60503) +OffRamp_commit:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 207206) OffRamp_commit:test_ZeroEpochAndRound_Revert() (gas: 53621) +OffRamp_commit:test_legacyCurse_Revert() (gas: 60770) OffRamp_constructor:test_Constructor_Success() (gas: 6248885) OffRamp_constructor:test_SourceChainSelector_Revert() (gas: 136674) OffRamp_constructor:test_ZeroChainSelector_Revert() (gas: 103710) @@ -462,22 +463,23 @@ OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessage_Success( OffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3888846) OffRamp_getExecutionState:test_GetDifferentChainExecutionState_Success() (gas: 121048) OffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 89561) -OffRamp_manuallyExecute:test_ManualExecGasLimitMismatchSingleReport_Revert() (gas: 81514) -OffRamp_manuallyExecute:test_manuallyExecute_DestinationGasAmountCountMismatch_Revert() (gas: 74194) -OffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 172946) -OffRamp_manuallyExecute:test_manuallyExecute_FailedTx_Revert() (gas: 213865) -OffRamp_manuallyExecute:test_manuallyExecute_ForkedChain_Revert() (gas: 27203) -OffRamp_manuallyExecute:test_manuallyExecute_GasLimitMismatchMultipleReports_Revert() (gas: 165665) -OffRamp_manuallyExecute:test_manuallyExecute_InvalidReceiverExecutionGasLimit_Revert() (gas: 27740) -OffRamp_manuallyExecute:test_manuallyExecute_InvalidTokenGasOverride_Revert() (gas: 55317) -OffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 490282) -OffRamp_manuallyExecute:test_manuallyExecute_MultipleReportsWithSingleCursedLane_Revert() (gas: 315031) -OffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails_Success() (gas: 2225488) -OffRamp_manuallyExecute:test_manuallyExecute_SourceChainSelectorMismatch_Revert() (gas: 166061) -OffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 226774) -OffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 227314) -OffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 775573) -OffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 345183) +OffRamp_manuallyExecute:test_ManualExecGasLimitMismatchSingleReport_Revert() (gas: 81592) +OffRamp_manuallyExecute:test_manuallyExecute_CursedByRMNLegacySubject_Revert() (gas: 35820) +OffRamp_manuallyExecute:test_manuallyExecute_DestinationGasAmountCountMismatch_Revert() (gas: 74227) +OffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 173045) +OffRamp_manuallyExecute:test_manuallyExecute_FailedTx_Revert() (gas: 213931) +OffRamp_manuallyExecute:test_manuallyExecute_ForkedChain_Revert() (gas: 27236) +OffRamp_manuallyExecute:test_manuallyExecute_GasLimitMismatchMultipleReports_Revert() (gas: 165742) +OffRamp_manuallyExecute:test_manuallyExecute_InvalidReceiverExecutionGasLimit_Revert() (gas: 27773) +OffRamp_manuallyExecute:test_manuallyExecute_InvalidTokenGasOverride_Revert() (gas: 55350) +OffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 490414) +OffRamp_manuallyExecute:test_manuallyExecute_MultipleReportsWithSingleCursedLane_Revert() (gas: 315251) +OffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails_Success() (gas: 2225587) +OffRamp_manuallyExecute:test_manuallyExecute_SourceChainSelectorMismatch_Revert() (gas: 166127) +OffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 226873) +OffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 227413) +OffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 775870) +OffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 345447) OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_NotACompatiblePool_Revert() (gas: 37676) OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 101487) OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_InvalidDataLength_Revert() (gas: 36812) @@ -551,28 +553,28 @@ PingPong_setOutOfOrderExecution:test_OutOfOrderExecution_Success() (gas: 20283) PingPong_setPaused:test_Pausing_Success() (gas: 17738) PingPong_startPingPong:test_StartPingPong_With_OOO_Success() (gas: 151971) PingPong_startPingPong:test_StartPingPong_With_Sequenced_Ordered_Success() (gas: 177586) -RMNHome_getConfigDigests:test_getConfigDigests_success() (gas: 1079685) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 23879) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 10597) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_OnlyOwner_reverts() (gas: 10843) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_success() (gas: 1085033) -RMNHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 19041) -RMNHome_revokeCandidate:test_revokeCandidate_OnlyOwner_reverts() (gas: 10889) -RMNHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 10628) -RMNHome_revokeCandidate:test_revokeCandidate_success() (gas: 28147) -RMNHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 597564) -RMNHome_setCandidate:test_setCandidate_OnlyOwner_reverts() (gas: 15071) -RMNHome_setCandidate:test_setCandidate_success() (gas: 589330) -RMNHome_setDynamicConfig:test_setDynamicConfig_DigestNotFound_reverts() (gas: 30186) -RMNHome_setDynamicConfig:test_setDynamicConfig_MinObserversTooHigh_reverts() (gas: 18854) -RMNHome_setDynamicConfig:test_setDynamicConfig_OnlyOwner_reverts() (gas: 14009) -RMNHome_setDynamicConfig:test_setDynamicConfig_success() (gas: 104862) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateOffchainPublicKey_reverts() (gas: 18850) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicatePeerId_reverts() (gas: 18710) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateSourceChain_reverts() (gas: 20387) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_NotEnoughObservers_reverts() (gas: 21405) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsNodesLength_reverts() (gas: 137318) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsObserverNodeIndex_reverts() (gas: 20522) +RMNHome_getConfigDigests:test_getConfigDigests_success() (gas: 1141201) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 27408) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 11404) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_OnlyOwner_reverts() (gas: 11832) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_success() (gas: 1155666) +RMNHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 20941) +RMNHome_revokeCandidate:test_revokeCandidate_OnlyOwner_reverts() (gas: 11645) +RMNHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 11193) +RMNHome_revokeCandidate:test_revokeCandidate_success() (gas: 34858) +RMNHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 663743) +RMNHome_setCandidate:test_setCandidate_OnlyOwner_reverts() (gas: 19206) +RMNHome_setCandidate:test_setCandidate_success() (gas: 634730) +RMNHome_setDynamicConfig:test_setDynamicConfig_DigestNotFound_reverts() (gas: 35645) +RMNHome_setDynamicConfig:test_setDynamicConfig_MinObserversTooHigh_reverts() (gas: 21662) +RMNHome_setDynamicConfig:test_setDynamicConfig_OnlyOwner_reverts() (gas: 16620) +RMNHome_setDynamicConfig:test_setDynamicConfig_success() (gas: 130187) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateOffchainPublicKey_reverts() (gas: 27054) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicatePeerId_reverts() (gas: 26920) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateSourceChain_reverts() (gas: 29055) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_NotEnoughObservers_reverts() (gas: 31068) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsNodesLength_reverts() (gas: 370126) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsObserverNodeIndex_reverts() (gas: 29313) RMNRemote_constructor:test_constructor() (gas: 8398) RMNRemote_curse:test_curse_AlreadyCursed_duplicateSubject_reverts() (gas: 154501) RMNRemote_curse:test_curse_calledByNonOwner_reverts() (gas: 18734) @@ -594,27 +596,27 @@ RMNRemote_verify_withConfigSet:test_verify_OutOfOrderSignatures_not_sorted_rever RMNRemote_verify_withConfigSet:test_verify_ThresholdNotMet_reverts() (gas: 304744) RMNRemote_verify_withConfigSet:test_verify_UnexpectedSigner_reverts() (gas: 428284) RMNRemote_verify_withConfigSet:test_verify_success() (gas: 86181) -RateLimiter_constructor:test_Constructor_Success() (gas: 19806) -RateLimiter_consume:test_AggregateValueMaxCapacityExceeded_Revert() (gas: 16042) -RateLimiter_consume:test_AggregateValueRateLimitReached_Revert() (gas: 22435) -RateLimiter_consume:test_ConsumeAggregateValue_Success() (gas: 31495) -RateLimiter_consume:test_ConsumeTokens_Success() (gas: 20403) -RateLimiter_consume:test_ConsumeUnlimited_Success() (gas: 40693) -RateLimiter_consume:test_ConsumingMoreThanUint128_Revert() (gas: 15800) -RateLimiter_consume:test_RateLimitReachedOverConsecutiveBlocks_Revert() (gas: 25781) -RateLimiter_consume:test_Refill_Success() (gas: 37447) -RateLimiter_consume:test_TokenMaxCapacityExceeded_Revert() (gas: 18388) -RateLimiter_consume:test_TokenRateLimitReached_Revert() (gas: 24930) -RateLimiter_currentTokenBucketState:test_CurrentTokenBucketState_Success() (gas: 38947) -RateLimiter_currentTokenBucketState:test_Refill_Success() (gas: 46852) -RateLimiter_setTokenBucketConfig:test_SetRateLimiterConfig_Success() (gas: 38509) -RegistryModuleOwnerCustom_constructor:test_constructor_Revert() (gas: 36107) -RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Revert() (gas: 20200) -RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Success() (gas: 130631) -RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Revert() (gas: 19797) -RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Success() (gas: 130126) -RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Revert() (gas: 19602) -RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Success() (gas: 129930) +RateLimiter_constructor:test_Constructor_Success() (gas: 22964) +RateLimiter_consume:test_AggregateValueMaxCapacityExceeded_Revert() (gas: 19839) +RateLimiter_consume:test_AggregateValueRateLimitReached_Revert() (gas: 28311) +RateLimiter_consume:test_ConsumeAggregateValue_Success() (gas: 39405) +RateLimiter_consume:test_ConsumeTokens_Success() (gas: 21919) +RateLimiter_consume:test_ConsumeUnlimited_Success() (gas: 57402) +RateLimiter_consume:test_ConsumingMoreThanUint128_Revert() (gas: 19531) +RateLimiter_consume:test_RateLimitReachedOverConsecutiveBlocks_Revert() (gas: 33020) +RateLimiter_consume:test_Refill_Success() (gas: 48170) +RateLimiter_consume:test_TokenMaxCapacityExceeded_Revert() (gas: 22450) +RateLimiter_consume:test_TokenRateLimitReached_Revert() (gas: 31168) +RateLimiter_currentTokenBucketState:test_CurrentTokenBucketState_Success() (gas: 49681) +RateLimiter_currentTokenBucketState:test_Refill_Success() (gas: 63750) +RateLimiter_setTokenBucketConfig:test_SetRateLimiterConfig_Success() (gas: 48144) +RegistryModuleOwnerCustom_constructor:test_constructor_Revert() (gas: 36866) +RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Revert() (gas: 24071) +RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Success() (gas: 139023) +RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Revert() (gas: 22539) +RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Success() (gas: 137363) +RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Revert() (gas: 22381) +RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Success() (gas: 137204) Router_applyRampUpdates:test_OffRampMismatch_Revert() (gas: 89591) Router_applyRampUpdates:test_OffRampUpdatesWithRouting() (gas: 10750087) Router_applyRampUpdates:test_OnRampDisable() (gas: 56445) diff --git a/contracts/src/v0.8/ccip/offRamp/OffRamp.sol b/contracts/src/v0.8/ccip/offRamp/OffRamp.sol index 0d85ce0df3b..f2adb836086 100644 --- a/contracts/src/v0.8/ccip/offRamp/OffRamp.sol +++ b/contracts/src/v0.8/ccip/offRamp/OffRamp.sol @@ -362,7 +362,7 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { ) internal { uint64 sourceChainSelector = report.sourceChainSelector; bool manualExecution = manualExecGasExecOverrides.length != 0; - // The double call to the RMNRemote is to check for both chainwise and legacy cursing before proceeding + // A double call to the RMNRemote is to check for both chainwise and legacy cursing before proceeding if (i_rmnRemote.isCursed(bytes16(uint128(sourceChainSelector))) || i_rmnRemote.isCursed()) { if (manualExecution) { // For manual execution we don't want to silently fail so we revert. @@ -812,7 +812,7 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { Internal.MerkleRoot memory root = commitReport.merkleRoots[i]; uint64 sourceChainSelector = root.sourceChainSelector; - // Check for both chainwise cursing or legacy cursing + // Check for both chainwise cursing and legacy cursing if (i_rmnRemote.isCursed(bytes16(uint128(sourceChainSelector))) || i_rmnRemote.isCursed()) { revert CursedByRMN(sourceChainSelector); } diff --git a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.commit.t.sol b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.commit.t.sol index a942b98cc1e..0e3153cc432 100644 --- a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.commit.t.sol +++ b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.commit.t.sol @@ -361,6 +361,24 @@ contract OffRamp_commit is OffRampSetup { _commit(commitReport, s_latestSequenceNumber); } + function test_legacyCurse_Revert() public { + _setMockRMNGlobalCurse(true); + Internal.MerkleRoot[] memory roots = new Internal.MerkleRoot[](1); + roots[0] = Internal.MerkleRoot({ + sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, + minSeqNr: 1, + maxSeqNr: 2, + merkleRoot: "Only a single root", + onRampAddress: abi.encode(ON_RAMP_ADDRESS_1) + }); + + OffRamp.CommitReport memory commitReport = + OffRamp.CommitReport({priceUpdates: _getEmptyPriceUpdates(), merkleRoots: roots, rmnSignatures: s_rmnSignatures}); + + vm.expectRevert(abi.encodeWithSelector(OffRamp.CursedByRMN.selector, roots[0].sourceChainSelector)); + _commit(commitReport, s_latestSequenceNumber); + } + function test_InvalidRootRevert() public { Internal.MerkleRoot[] memory roots = new Internal.MerkleRoot[](1); roots[0] = Internal.MerkleRoot({ diff --git a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.manuallyExecute.t.sol b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.manuallyExecute.t.sol index 0422053bdd7..18bf062ddc4 100644 --- a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.manuallyExecute.t.sol +++ b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.manuallyExecute.t.sol @@ -562,6 +562,26 @@ contract OffRamp_manuallyExecute is OffRampSetup { s_offRamp.manuallyExecute(reports, gasLimitOverrides); } + function test_manuallyExecute_CursedByRMNLegacySubject_Revert() public { + _setMockRMNGlobalCurse(true); + + Internal.Any2EVMRampMessage[] memory messages1 = new Internal.Any2EVMRampMessage[](1); + + messages1[0] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); + messages1[0].receiver = address(s_reverting_receiver); + messages1[0].header.messageId = _hashMessage(messages1[0], ON_RAMP_ADDRESS_1); + + Internal.ExecutionReport[] memory reports = new Internal.ExecutionReport[](1); + reports[0] = _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages1); + + OffRamp.GasLimitOverride[][] memory gasLimitOverrides = new OffRamp.GasLimitOverride[][](1); + gasLimitOverrides[0] = _getGasLimitsFromMessages(messages1); + + vm.expectRevert(abi.encodeWithSelector(OffRamp.CursedByRMN.selector, SOURCE_CHAIN_SELECTOR_1)); + + s_offRamp.manuallyExecute(reports, gasLimitOverrides); + } + function test_manuallyExecute_SourceChainSelectorMismatch_Revert() public { Internal.Any2EVMRampMessage[] memory messages1 = new Internal.Any2EVMRampMessage[](1); Internal.Any2EVMRampMessage[] memory messages2 = new Internal.Any2EVMRampMessage[](1); From fd9f82bd1f720471d09ff61e46176963fa1fce01 Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 5 Dec 2024 11:44:15 -0500 Subject: [PATCH 3/7] remove legacy curse subject from RMNRemote --- contracts/gas-snapshots/ccip.gas-snapshot | 184 +++++++++--------- contracts/src/v0.8/ccip/offRamp/OffRamp.sol | 5 +- contracts/src/v0.8/ccip/rmn/RMNRemote.sol | 9 +- .../test/offRamp/OffRamp/OffRamp.commit.t.sol | 18 -- .../OffRamp/OffRamp.manuallyExecute.t.sol | 20 -- .../RMNRemote.globalAndLegacyCurses.t.sol | 14 +- 6 files changed, 98 insertions(+), 152 deletions(-) diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index ec180897f7d..8c59d7f8b12 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -68,7 +68,7 @@ CCIPHome_setCandidate:test_setCandidate_success() (gas: 1435475) CCIPHome_supportsInterface:test_supportsInterface_success() (gas: 11363) DefensiveExampleTest:test_HappyPath_Success() (gas: 200540) DefensiveExampleTest:test_Recovery() (gas: 425013) -E2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1514039) +E2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1512323) EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 103832) EtherSenderReceiverTest_ccipReceive:test_ccipReceive_happyPath() (gas: 54732) EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongToken() (gas: 21903) @@ -352,12 +352,12 @@ NonceManager_NonceIncrementation:test_getIncrementedOutboundNonce_Success() (gas NonceManager_NonceIncrementation:test_incrementInboundNonce_Skip() (gas: 23706) NonceManager_NonceIncrementation:test_incrementInboundNonce_Success() (gas: 38778) NonceManager_NonceIncrementation:test_incrementNoncesInboundAndOutbound_Success() (gas: 71901) -NonceManager_OffRampUpgrade:test_NoPrevOffRampForChain_Success() (gas: 186205) -NonceManager_OffRampUpgrade:test_UpgradedNonceNewSenderStartsAtZero_Success() (gas: 189658) -NonceManager_OffRampUpgrade:test_UpgradedNonceStartsAtV1Nonce_Success() (gas: 253108) -NonceManager_OffRampUpgrade:test_UpgradedOffRampNonceSkipsIfMsgInFlight_Success() (gas: 221473) +NonceManager_OffRampUpgrade:test_NoPrevOffRampForChain_Success() (gas: 185776) +NonceManager_OffRampUpgrade:test_UpgradedNonceNewSenderStartsAtZero_Success() (gas: 189229) +NonceManager_OffRampUpgrade:test_UpgradedNonceStartsAtV1Nonce_Success() (gas: 252250) +NonceManager_OffRampUpgrade:test_UpgradedOffRampNonceSkipsIfMsgInFlight_Success() (gas: 220615) NonceManager_OffRampUpgrade:test_UpgradedSenderNoncesReadsPreviousRamp_Success() (gas: 60497) -NonceManager_OffRampUpgrade:test_Upgraded_Success() (gas: 153370) +NonceManager_OffRampUpgrade:test_Upgraded_Success() (gas: 152941) NonceManager_OnRampUpgrade:test_UpgradeNonceNewSenderStartsAtZero_Success() (gas: 166101) NonceManager_OnRampUpgrade:test_UpgradeNonceStartsAtV1Nonce_Success() (gas: 195828) NonceManager_OnRampUpgrade:test_UpgradeSenderNoncesReadsPreviousRamp_Success() (gas: 139098) @@ -370,116 +370,114 @@ NonceManager_applyPreviousRampsUpdates:test_PreviousRampAlreadySet_overrideAllow NonceManager_applyPreviousRampsUpdates:test_SingleRampUpdate_success() (gas: 66889) NonceManager_applyPreviousRampsUpdates:test_ZeroInput_success() (gas: 12213) NonceManager_typeAndVersion:test_typeAndVersion() (gas: 9705) -OffRamp_afterOC3ConfigSet:test_afterOCR3ConfigSet_SignatureVerificationDisabled_Revert() (gas: 5942270) +OffRamp_afterOC3ConfigSet:test_afterOCR3ConfigSet_SignatureVerificationDisabled_Revert() (gas: 5887669) OffRamp_applySourceChainConfigUpdates:test_AddMultipleChains_Success() (gas: 626160) OffRamp_applySourceChainConfigUpdates:test_AddNewChain_Success() (gas: 166527) OffRamp_applySourceChainConfigUpdates:test_ApplyZeroUpdates_Success() (gas: 16719) -OffRamp_applySourceChainConfigUpdates:test_InvalidOnRampUpdate_Revert() (gas: 275141) +OffRamp_applySourceChainConfigUpdates:test_InvalidOnRampUpdate_Revert() (gas: 274713) OffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChainOnRamp_Success() (gas: 168604) OffRamp_applySourceChainConfigUpdates:test_ReplaceExistingChain_Success() (gas: 181059) OffRamp_applySourceChainConfigUpdates:test_RouterAddress_Revert() (gas: 13441) OffRamp_applySourceChainConfigUpdates:test_ZeroOnRampAddress_Revert() (gas: 72724) OffRamp_applySourceChainConfigUpdates:test_ZeroSourceChainSelector_Revert() (gas: 15519) -OffRamp_applySourceChainConfigUpdates:test_allowNonOnRampUpdateAfterLaneIsUsed_success() (gas: 285469) -OffRamp_batchExecute:test_MultipleReportsDifferentChainsSkipCursedChain_Success() (gas: 177916) -OffRamp_batchExecute:test_MultipleReportsDifferentChains_Success() (gas: 334153) -OffRamp_batchExecute:test_MultipleReportsSameChain_Success() (gas: 277419) -OffRamp_batchExecute:test_MultipleReportsSkipDuplicate_Success() (gas: 169265) -OffRamp_batchExecute:test_OutOfBoundsGasLimitsAccess_Revert() (gas: 188402) -OffRamp_batchExecute:test_SingleReport_Success() (gas: 156834) -OffRamp_batchExecute:test_Unhealthy_Success() (gas: 545483) +OffRamp_applySourceChainConfigUpdates:test_allowNonOnRampUpdateAfterLaneIsUsed_success() (gas: 285041) +OffRamp_batchExecute:test_MultipleReportsDifferentChainsSkipCursedChain_Success() (gas: 177470) +OffRamp_batchExecute:test_MultipleReportsDifferentChains_Success() (gas: 333296) +OffRamp_batchExecute:test_MultipleReportsSameChain_Success() (gas: 276562) +OffRamp_batchExecute:test_MultipleReportsSkipDuplicate_Success() (gas: 168408) +OffRamp_batchExecute:test_OutOfBoundsGasLimitsAccess_Revert() (gas: 187974) +OffRamp_batchExecute:test_SingleReport_Success() (gas: 156406) +OffRamp_batchExecute:test_Unhealthy_Success() (gas: 545037) OffRamp_batchExecute:test_ZeroReports_Revert() (gas: 10600) -OffRamp_commit:test_CommitOnRampMismatch_Revert() (gas: 93169) +OffRamp_commit:test_CommitOnRampMismatch_Revert() (gas: 92744) OffRamp_commit:test_FailedRMNVerification_Reverts() (gas: 63432) -OffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 70418) -OffRamp_commit:test_InvalidInterval_Revert() (gas: 66632) -OffRamp_commit:test_InvalidRootRevert() (gas: 65617) -OffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6703774) -OffRamp_commit:test_NoConfig_Revert() (gas: 6287192) +OffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 69993) +OffRamp_commit:test_InvalidInterval_Revert() (gas: 66119) +OffRamp_commit:test_InvalidRootRevert() (gas: 65214) +OffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6648767) +OffRamp_commit:test_NoConfig_Revert() (gas: 6232185) OffRamp_commit:test_OnlyGasPriceUpdates_Success() (gas: 112985) -OffRamp_commit:test_OnlyPriceUpdateStaleReport_Revert() (gas: 121153) -OffRamp_commit:test_OnlyTokenPriceUpdates_Success() (gas: 112984) +OffRamp_commit:test_OnlyPriceUpdateStaleReport_Revert() (gas: 121175) +OffRamp_commit:test_OnlyTokenPriceUpdates_Success() (gas: 112917) OffRamp_commit:test_PriceSequenceNumberCleared_Success() (gas: 355254) -OffRamp_commit:test_ReportAndPriceUpdate_Success() (gas: 164669) -OffRamp_commit:test_ReportOnlyRootSuccess_gas() (gas: 141697) -OffRamp_commit:test_RootAlreadyCommitted_Revert() (gas: 149121) -OffRamp_commit:test_RootWithRMNDisabled_success() (gas: 154414) -OffRamp_commit:test_SourceChainNotEnabled_Revert() (gas: 62084) -OffRamp_commit:test_StaleReportWithRoot_Success() (gas: 233277) -OffRamp_commit:test_UnauthorizedTransmitter_Revert() (gas: 125745) -OffRamp_commit:test_Unhealthy_Revert() (gas: 60503) -OffRamp_commit:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 207206) +OffRamp_commit:test_ReportAndPriceUpdate_Success() (gas: 164263) +OffRamp_commit:test_ReportOnlyRootSuccess_gas() (gas: 141269) +OffRamp_commit:test_RootAlreadyCommitted_Revert() (gas: 148268) +OffRamp_commit:test_RootWithRMNDisabled_success() (gas: 153986) +OffRamp_commit:test_SourceChainNotEnabled_Revert() (gas: 61681) +OffRamp_commit:test_StaleReportWithRoot_Success() (gas: 232354) +OffRamp_commit:test_UnauthorizedTransmitter_Revert() (gas: 125230) +OffRamp_commit:test_Unhealthy_Revert() (gas: 60482) +OffRamp_commit:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 206800) OffRamp_commit:test_ZeroEpochAndRound_Revert() (gas: 53621) -OffRamp_commit:test_legacyCurse_Revert() (gas: 60770) -OffRamp_constructor:test_Constructor_Success() (gas: 6248885) -OffRamp_constructor:test_SourceChainSelector_Revert() (gas: 136674) -OffRamp_constructor:test_ZeroChainSelector_Revert() (gas: 103710) -OffRamp_constructor:test_ZeroNonceManager_Revert() (gas: 101559) -OffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 162154) -OffRamp_constructor:test_ZeroRMNRemote_Revert() (gas: 101476) -OffRamp_constructor:test_ZeroTokenAdminRegistry_Revert() (gas: 101480) +OffRamp_constructor:test_Constructor_Success() (gas: 6194282) +OffRamp_constructor:test_SourceChainSelector_Revert() (gas: 136585) +OffRamp_constructor:test_ZeroChainSelector_Revert() (gas: 103622) +OffRamp_constructor:test_ZeroNonceManager_Revert() (gas: 101471) +OffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 162065) +OffRamp_constructor:test_ZeroRMNRemote_Revert() (gas: 101388) +OffRamp_constructor:test_ZeroTokenAdminRegistry_Revert() (gas: 101392) OffRamp_execute:test_IncorrectArrayType_Revert() (gas: 17639) -OffRamp_execute:test_LargeBatch_Success() (gas: 3380575) -OffRamp_execute:test_MultipleReportsWithPartialValidationFailures_Success() (gas: 372003) -OffRamp_execute:test_MultipleReports_Success() (gas: 299542) -OffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 7111965) -OffRamp_execute:test_NoConfig_Revert() (gas: 6336435) +OffRamp_execute:test_LargeBatch_Success() (gas: 3376243) +OffRamp_execute:test_MultipleReportsWithPartialValidationFailures_Success() (gas: 371146) +OffRamp_execute:test_MultipleReports_Success() (gas: 298685) +OffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 7056935) +OffRamp_execute:test_NoConfig_Revert() (gas: 6281405) OffRamp_execute:test_NonArray_Revert() (gas: 27680) -OffRamp_execute:test_SingleReport_Success() (gas: 176093) -OffRamp_execute:test_UnauthorizedTransmitter_Revert() (gas: 148249) -OffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 7003178) +OffRamp_execute:test_SingleReport_Success() (gas: 175664) +OffRamp_execute:test_UnauthorizedTransmitter_Revert() (gas: 147820) +OffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 6948577) OffRamp_execute:test_ZeroReports_Revert() (gas: 17361) OffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens() (gas: 56135) OffRamp_executeSingleMessage:test_executeSingleMessage_NonContract() (gas: 20463) OffRamp_executeSingleMessage:test_executeSingleMessage_NonContractWithTokens() (gas: 237997) OffRamp_executeSingleMessage:test_executeSingleMessage_WithMessageInterceptor() (gas: 91972) OffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens() (gas: 268069) -OffRamp_executeSingleReport:test_DisabledSourceChain_Revert() (gas: 29131) -OffRamp_executeSingleReport:test_EmptyReport_Revert() (gas: 16002) -OffRamp_executeSingleReport:test_InvalidSourcePoolAddress() (gas: 475012) -OffRamp_executeSingleReport:test_ManualExecutionNotYetEnabled_Revert() (gas: 48768) -OffRamp_executeSingleReport:test_MismatchingDestChainSelector_Revert() (gas: 34573) -OffRamp_executeSingleReport:test_NonExistingSourceChain_Revert() (gas: 29296) -OffRamp_executeSingleReport:test_ReceiverError_Success() (gas: 188073) -OffRamp_executeSingleReport:test_RetryFailedMessageWithoutManualExecution_Revert() (gas: 198677) -OffRamp_executeSingleReport:test_RootNotCommitted_Revert() (gas: 41159) -OffRamp_executeSingleReport:test_RouterYULCall_Revert() (gas: 405419) -OffRamp_executeSingleReport:test_SingleMessageNoTokensOtherChain_Success() (gas: 249576) -OffRamp_executeSingleReport:test_SingleMessageNoTokensUnordered_Success() (gas: 193218) -OffRamp_executeSingleReport:test_SingleMessageNoTokens_Success() (gas: 213246) -OffRamp_executeSingleReport:test_SingleMessageToNonCCIPReceiver_Success() (gas: 244127) -OffRamp_executeSingleReport:test_SingleMessagesNoTokensSuccess_gas() (gas: 141905) -OffRamp_executeSingleReport:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 402940) -OffRamp_executeSingleReport:test_SkippedIncorrectNonce_Success() (gas: 58715) -OffRamp_executeSingleReport:test_TokenDataMismatch_Revert() (gas: 74284) -OffRamp_executeSingleReport:test_TwoMessagesWithTokensAndGE_Success() (gas: 574501) -OffRamp_executeSingleReport:test_TwoMessagesWithTokensSuccess_gas() (gas: 523052) -OffRamp_executeSingleReport:test_UnexpectedTokenData_Revert() (gas: 27267) -OffRamp_executeSingleReport:test_UnhealthySingleChainCurse_Revert() (gas: 541189) -OffRamp_executeSingleReport:test_Unhealthy_Success() (gas: 541136) -OffRamp_executeSingleReport:test_WithCurseOnAnotherSourceChain_Success() (gas: 452165) -OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 136097) -OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 165759) +OffRamp_executeSingleReport:test_DisabledSourceChain_Revert() (gas: 28703) +OffRamp_executeSingleReport:test_EmptyReport_Revert() (gas: 15574) +OffRamp_executeSingleReport:test_InvalidSourcePoolAddress() (gas: 474583) +OffRamp_executeSingleReport:test_ManualExecutionNotYetEnabled_Revert() (gas: 48340) +OffRamp_executeSingleReport:test_MismatchingDestChainSelector_Revert() (gas: 34145) +OffRamp_executeSingleReport:test_NonExistingSourceChain_Revert() (gas: 28868) +OffRamp_executeSingleReport:test_ReceiverError_Success() (gas: 187644) +OffRamp_executeSingleReport:test_RetryFailedMessageWithoutManualExecution_Revert() (gas: 197820) +OffRamp_executeSingleReport:test_RootNotCommitted_Revert() (gas: 40731) +OffRamp_executeSingleReport:test_RouterYULCall_Revert() (gas: 404990) +OffRamp_executeSingleReport:test_SingleMessageNoTokensOtherChain_Success() (gas: 248718) +OffRamp_executeSingleReport:test_SingleMessageNoTokensUnordered_Success() (gas: 192362) +OffRamp_executeSingleReport:test_SingleMessageNoTokens_Success() (gas: 212388) +OffRamp_executeSingleReport:test_SingleMessageToNonCCIPReceiver_Success() (gas: 243698) +OffRamp_executeSingleReport:test_SingleMessagesNoTokensSuccess_gas() (gas: 141476) +OffRamp_executeSingleReport:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 402512) +OffRamp_executeSingleReport:test_SkippedIncorrectNonce_Success() (gas: 58286) +OffRamp_executeSingleReport:test_TokenDataMismatch_Revert() (gas: 73856) +OffRamp_executeSingleReport:test_TwoMessagesWithTokensAndGE_Success() (gas: 574072) +OffRamp_executeSingleReport:test_TwoMessagesWithTokensSuccess_gas() (gas: 522623) +OffRamp_executeSingleReport:test_UnexpectedTokenData_Revert() (gas: 26839) +OffRamp_executeSingleReport:test_UnhealthySingleChainCurse_Revert() (gas: 540743) +OffRamp_executeSingleReport:test_Unhealthy_Success() (gas: 540690) +OffRamp_executeSingleReport:test_WithCurseOnAnotherSourceChain_Success() (gas: 451736) +OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 135241) +OffRamp_executeSingleReport:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 164902) OffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3888846) OffRamp_getExecutionState:test_GetDifferentChainExecutionState_Success() (gas: 121048) OffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 89561) -OffRamp_manuallyExecute:test_ManualExecGasLimitMismatchSingleReport_Revert() (gas: 81592) -OffRamp_manuallyExecute:test_manuallyExecute_CursedByRMNLegacySubject_Revert() (gas: 35820) -OffRamp_manuallyExecute:test_manuallyExecute_DestinationGasAmountCountMismatch_Revert() (gas: 74227) -OffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 173045) -OffRamp_manuallyExecute:test_manuallyExecute_FailedTx_Revert() (gas: 213931) -OffRamp_manuallyExecute:test_manuallyExecute_ForkedChain_Revert() (gas: 27236) -OffRamp_manuallyExecute:test_manuallyExecute_GasLimitMismatchMultipleReports_Revert() (gas: 165742) -OffRamp_manuallyExecute:test_manuallyExecute_InvalidReceiverExecutionGasLimit_Revert() (gas: 27773) -OffRamp_manuallyExecute:test_manuallyExecute_InvalidTokenGasOverride_Revert() (gas: 55350) -OffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 490414) -OffRamp_manuallyExecute:test_manuallyExecute_MultipleReportsWithSingleCursedLane_Revert() (gas: 315251) -OffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails_Success() (gas: 2225587) -OffRamp_manuallyExecute:test_manuallyExecute_SourceChainSelectorMismatch_Revert() (gas: 166127) -OffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 226873) -OffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 227413) -OffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 775870) -OffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 345447) +OffRamp_manuallyExecute:test_ManualExecGasLimitMismatchSingleReport_Revert() (gas: 81514) +OffRamp_manuallyExecute:test_manuallyExecute_DestinationGasAmountCountMismatch_Revert() (gas: 74194) +OffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 172517) +OffRamp_manuallyExecute:test_manuallyExecute_FailedTx_Revert() (gas: 213009) +OffRamp_manuallyExecute:test_manuallyExecute_ForkedChain_Revert() (gas: 27203) +OffRamp_manuallyExecute:test_manuallyExecute_GasLimitMismatchMultipleReports_Revert() (gas: 165665) +OffRamp_manuallyExecute:test_manuallyExecute_InvalidReceiverExecutionGasLimit_Revert() (gas: 27740) +OffRamp_manuallyExecute:test_manuallyExecute_InvalidTokenGasOverride_Revert() (gas: 55317) +OffRamp_manuallyExecute:test_manuallyExecute_LowGasLimit_Success() (gas: 489426) +OffRamp_manuallyExecute:test_manuallyExecute_MultipleReportsWithSingleCursedLane_Revert() (gas: 314585) +OffRamp_manuallyExecute:test_manuallyExecute_ReentrancyFails_Success() (gas: 2224632) +OffRamp_manuallyExecute:test_manuallyExecute_SourceChainSelectorMismatch_Revert() (gas: 165207) +OffRamp_manuallyExecute:test_manuallyExecute_Success() (gas: 225918) +OffRamp_manuallyExecute:test_manuallyExecute_WithGasOverride_Success() (gas: 226458) +OffRamp_manuallyExecute:test_manuallyExecute_WithMultiReportGasOverride_Success() (gas: 773856) +OffRamp_manuallyExecute:test_manuallyExecute_WithPartialMessages_Success() (gas: 344327) OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_NotACompatiblePool_Revert() (gas: 37676) OffRamp_releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 101487) OffRamp_releaseOrMintSingleToken:test_releaseOrMintToken_InvalidDataLength_Revert() (gas: 36812) @@ -579,7 +577,7 @@ RMNRemote_constructor:test_constructor() (gas: 8398) RMNRemote_curse:test_curse_AlreadyCursed_duplicateSubject_reverts() (gas: 154501) RMNRemote_curse:test_curse_calledByNonOwner_reverts() (gas: 18734) RMNRemote_curse:test_curse_success() (gas: 149475) -RMNRemote_global_and_legacy_curses:test_global_and_legacy_curses_success() (gas: 133441) +RMNRemote_global_curses:test_global_curses_success() (gas: 71750) RMNRemote_isBlessed:test_isBlessed() (gas: 17588) RMNRemote_setConfig:test_setConfig_ZeroValueNotAllowed_revert() (gas: 37971) RMNRemote_setConfig:test_setConfig_addSigner_removeSigner_success() (gas: 993448) diff --git a/contracts/src/v0.8/ccip/offRamp/OffRamp.sol b/contracts/src/v0.8/ccip/offRamp/OffRamp.sol index f2adb836086..1c34fd3a1c3 100644 --- a/contracts/src/v0.8/ccip/offRamp/OffRamp.sol +++ b/contracts/src/v0.8/ccip/offRamp/OffRamp.sol @@ -363,7 +363,7 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { uint64 sourceChainSelector = report.sourceChainSelector; bool manualExecution = manualExecGasExecOverrides.length != 0; // A double call to the RMNRemote is to check for both chainwise and legacy cursing before proceeding - if (i_rmnRemote.isCursed(bytes16(uint128(sourceChainSelector))) || i_rmnRemote.isCursed()) { + if (i_rmnRemote.isCursed(bytes16(uint128(sourceChainSelector)))) { if (manualExecution) { // For manual execution we don't want to silently fail so we revert. revert CursedByRMN(sourceChainSelector); @@ -812,8 +812,7 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { Internal.MerkleRoot memory root = commitReport.merkleRoots[i]; uint64 sourceChainSelector = root.sourceChainSelector; - // Check for both chainwise cursing and legacy cursing - if (i_rmnRemote.isCursed(bytes16(uint128(sourceChainSelector))) || i_rmnRemote.isCursed()) { + if (i_rmnRemote.isCursed(bytes16(uint128(sourceChainSelector)))) { revert CursedByRMN(sourceChainSelector); } diff --git a/contracts/src/v0.8/ccip/rmn/RMNRemote.sol b/contracts/src/v0.8/ccip/rmn/RMNRemote.sol index 4e7ce766443..087d0184310 100644 --- a/contracts/src/v0.8/ccip/rmn/RMNRemote.sol +++ b/contracts/src/v0.8/ccip/rmn/RMNRemote.sol @@ -9,11 +9,6 @@ import {Ownable2StepMsgSender} from "../../shared/access/Ownable2StepMsgSender.s import {EnumerableSet} from "../../shared/enumerable/EnumerableSetWithBytes16.sol"; import {Internal} from "../libraries/Internal.sol"; -/// @dev An active curse on this subject will cause isCursed() to return true. Use this subject if there is an issue -/// with a remote chain, for which there exists a legacy lane contract deployed on the same chain as this RMN contract -/// is deployed, relying on isCursed(). -bytes16 constant LEGACY_CURSE_SUBJECT = 0x01000000000000000000000000000000; - /// @dev An active curse on this subject will cause isCursed() and isCursed(bytes16) to return true. Use this subject /// for issues affecting all of CCIP chains, or pertaining to the chain that this contract is deployed on, instead of /// using the local chain selector as a subject. @@ -256,11 +251,11 @@ contract RMNRemote is Ownable2StepMsgSender, ITypeAndVersion, IRMNRemote, IRMN { /// @inheritdoc IRMNRemote function isCursed() external view override(IRMN, IRMNRemote) returns (bool) { // There are zero curses under normal circumstances, which means it's cheaper to check for the absence of curses. - // than to check the subject list twice, as we have to check for both the legacy and global curse subjects. + // than to check the subject list twice, as we have to check for the global curse subjects. if (s_cursedSubjects.length() == 0) { return false; } - return s_cursedSubjects.contains(LEGACY_CURSE_SUBJECT) || s_cursedSubjects.contains(GLOBAL_CURSE_SUBJECT); + return s_cursedSubjects.contains(GLOBAL_CURSE_SUBJECT); } /// @inheritdoc IRMNRemote diff --git a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.commit.t.sol b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.commit.t.sol index 0e3153cc432..a942b98cc1e 100644 --- a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.commit.t.sol +++ b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.commit.t.sol @@ -361,24 +361,6 @@ contract OffRamp_commit is OffRampSetup { _commit(commitReport, s_latestSequenceNumber); } - function test_legacyCurse_Revert() public { - _setMockRMNGlobalCurse(true); - Internal.MerkleRoot[] memory roots = new Internal.MerkleRoot[](1); - roots[0] = Internal.MerkleRoot({ - sourceChainSelector: SOURCE_CHAIN_SELECTOR_1, - minSeqNr: 1, - maxSeqNr: 2, - merkleRoot: "Only a single root", - onRampAddress: abi.encode(ON_RAMP_ADDRESS_1) - }); - - OffRamp.CommitReport memory commitReport = - OffRamp.CommitReport({priceUpdates: _getEmptyPriceUpdates(), merkleRoots: roots, rmnSignatures: s_rmnSignatures}); - - vm.expectRevert(abi.encodeWithSelector(OffRamp.CursedByRMN.selector, roots[0].sourceChainSelector)); - _commit(commitReport, s_latestSequenceNumber); - } - function test_InvalidRootRevert() public { Internal.MerkleRoot[] memory roots = new Internal.MerkleRoot[](1); roots[0] = Internal.MerkleRoot({ diff --git a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.manuallyExecute.t.sol b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.manuallyExecute.t.sol index 18bf062ddc4..0422053bdd7 100644 --- a/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.manuallyExecute.t.sol +++ b/contracts/src/v0.8/ccip/test/offRamp/OffRamp/OffRamp.manuallyExecute.t.sol @@ -562,26 +562,6 @@ contract OffRamp_manuallyExecute is OffRampSetup { s_offRamp.manuallyExecute(reports, gasLimitOverrides); } - function test_manuallyExecute_CursedByRMNLegacySubject_Revert() public { - _setMockRMNGlobalCurse(true); - - Internal.Any2EVMRampMessage[] memory messages1 = new Internal.Any2EVMRampMessage[](1); - - messages1[0] = _generateAny2EVMMessageNoTokens(SOURCE_CHAIN_SELECTOR_1, ON_RAMP_ADDRESS_1, 1); - messages1[0].receiver = address(s_reverting_receiver); - messages1[0].header.messageId = _hashMessage(messages1[0], ON_RAMP_ADDRESS_1); - - Internal.ExecutionReport[] memory reports = new Internal.ExecutionReport[](1); - reports[0] = _generateReportFromMessages(SOURCE_CHAIN_SELECTOR_1, messages1); - - OffRamp.GasLimitOverride[][] memory gasLimitOverrides = new OffRamp.GasLimitOverride[][](1); - gasLimitOverrides[0] = _getGasLimitsFromMessages(messages1); - - vm.expectRevert(abi.encodeWithSelector(OffRamp.CursedByRMN.selector, SOURCE_CHAIN_SELECTOR_1)); - - s_offRamp.manuallyExecute(reports, gasLimitOverrides); - } - function test_manuallyExecute_SourceChainSelectorMismatch_Revert() public { Internal.Any2EVMRampMessage[] memory messages1 = new Internal.Any2EVMRampMessage[](1); Internal.Any2EVMRampMessage[] memory messages2 = new Internal.Any2EVMRampMessage[](1); diff --git a/contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalAndLegacyCurses.t.sol b/contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalAndLegacyCurses.t.sol index da6677678fe..e955ac5bfac 100644 --- a/contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalAndLegacyCurses.t.sol +++ b/contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalAndLegacyCurses.t.sol @@ -1,11 +1,11 @@ // SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.24; -import {GLOBAL_CURSE_SUBJECT, LEGACY_CURSE_SUBJECT} from "../../../rmn/RMNRemote.sol"; +import {GLOBAL_CURSE_SUBJECT} from "../../../rmn/RMNRemote.sol"; import {RMNRemoteSetup} from "./RMNRemoteSetup.t.sol"; -contract RMNRemote_global_and_legacy_curses is RMNRemoteSetup { - function test_global_and_legacy_curses_success() public { +contract RMNRemote_global_curses is RMNRemoteSetup { + function test_global_curses_success() public { bytes16 randSubject = bytes16(keccak256("random subject")); assertFalse(s_rmnRemote.isCursed()); assertFalse(s_rmnRemote.isCursed(randSubject)); @@ -17,13 +17,5 @@ contract RMNRemote_global_and_legacy_curses is RMNRemoteSetup { s_rmnRemote.uncurse(GLOBAL_CURSE_SUBJECT); assertFalse(s_rmnRemote.isCursed()); assertFalse(s_rmnRemote.isCursed(randSubject)); - - s_rmnRemote.curse(LEGACY_CURSE_SUBJECT); - assertTrue(s_rmnRemote.isCursed()); - assertFalse(s_rmnRemote.isCursed(randSubject)); // legacy curse doesn't affect specific subjects - - s_rmnRemote.uncurse(LEGACY_CURSE_SUBJECT); - assertFalse(s_rmnRemote.isCursed()); - assertFalse(s_rmnRemote.isCursed(randSubject)); } } From 59b3fa5e292049baee8ec544c65cddd8e3e4935f Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 5 Dec 2024 13:42:15 -0500 Subject: [PATCH 4/7] snapshot, wrapper, and changeset fix --- contracts/.changeset/eighty-cycles-film.md | 5 + contracts/gas-snapshots/ccip.gas-snapshot | 176 +++++++++--------- contracts/src/v0.8/ccip/offRamp/OffRamp.sol | 1 - .../ccip/generated/rmn_remote/rmn_remote.go | 2 +- ...rapper-dependency-versions-do-not-edit.txt | 2 +- 5 files changed, 95 insertions(+), 91 deletions(-) create mode 100644 contracts/.changeset/eighty-cycles-film.md diff --git a/contracts/.changeset/eighty-cycles-film.md b/contracts/.changeset/eighty-cycles-film.md new file mode 100644 index 00000000000..e5f06ca8cf3 --- /dev/null +++ b/contracts/.changeset/eighty-cycles-film.md @@ -0,0 +1,5 @@ +--- +'@chainlink/contracts': patch +--- + +remove legacy curse check from RMNRemote isCursed() method #bugfix diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 318ecb5b554..6eae4d36c7e 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -21,75 +21,75 @@ BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 244496) BurnWithFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 24223) CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2077779) -CCIPHome__validateConfig:test__validateConfigLessTransmittersThanSigners_Success() (gas: 332619) -CCIPHome__validateConfig:test__validateConfigSmallerFChain_Success() (gas: 458568) -CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_OfframpAddressCannotBeZero_Reverts() (gas: 289191) -CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_RMNHomeAddressCannotBeZero_Reverts() (gas: 289486) -CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 292216) -CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 288824) -CCIPHome__validateConfig:test__validateConfig_FChainTooHigh_Reverts() (gas: 336363) -CCIPHome__validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 290590) -CCIPHome__validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 290055) -CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmittersEmptyAddresses_Reverts() (gas: 308646) -CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1191231) -CCIPHome__validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 288918) -CCIPHome__validateConfig:test__validateConfig_RMNHomeAddressCannotBeZero_Reverts() (gas: 289112) -CCIPHome__validateConfig:test__validateConfig_Success() (gas: 299797) -CCIPHome__validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 773105) -CCIPHome__validateConfig:test__validateConfig_ZeroP2PId_Reverts() (gas: 293455) -CCIPHome__validateConfig:test__validateConfig_ZeroSignerKey_Reverts() (gas: 293503) -CCIPHome_applyChainConfigUpdates:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 187738) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 349623) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 18065) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 272742) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 14952) -CCIPHome_applyChainConfigUpdates:test_getPaginatedCCIPHomes_Success() (gas: 372561) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_DONIdMismatch_reverts() (gas: 38098) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InnerCallReverts_reverts() (gas: 11827) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InvalidSelector_reverts() (gas: 11015) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_reverts() (gas: 37072) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_success() (gas: 1455716) -CCIPHome_constructor:test_constructor_CapabilitiesRegistryAddressZero_reverts() (gas: 63767) -CCIPHome_constructor:test_constructor_success() (gas: 3455841) -CCIPHome_getAllConfigs:test_getAllConfigs_success() (gas: 2773000) -CCIPHome_getCapabilityConfiguration:test_getCapabilityConfiguration_success() (gas: 9138) -CCIPHome_getConfigDigests:test_getConfigDigests_success() (gas: 2547397) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_CanOnlySelfCall_reverts() (gas: 9087) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 23005) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 8817) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_multiplePlugins_success() (gas: 5113570) -CCIPHome_revokeCandidate:test_revokeCandidate_CanOnlySelfCall_reverts() (gas: 9068) -CCIPHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 19105) -CCIPHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 8817) -CCIPHome_revokeCandidate:test_revokeCandidate_success() (gas: 30674) -CCIPHome_setCandidate:test_setCandidate_CanOnlySelfCall_reverts() (gas: 29383) -CCIPHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 1395154) -CCIPHome_setCandidate:test_setCandidate_success() (gas: 1365439) -CCIPHome_supportsInterface:test_supportsInterface_success() (gas: 9885) +CCIPHome__validateConfig:test__validateConfigLessTransmittersThanSigners_Success() (gas: 380773) +CCIPHome__validateConfig:test__validateConfigSmallerFChain_Success() (gas: 558994) +CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_OfframpAddressCannotBeZero_Reverts() (gas: 323319) +CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_RMNHomeAddressCannotBeZero_Reverts() (gas: 323792) +CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 326840) +CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 322566) +CCIPHome__validateConfig:test__validateConfig_FChainTooHigh_Reverts() (gas: 396028) +CCIPHome__validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 325553) +CCIPHome__validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 324473) +CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmittersEmptyAddresses_Reverts() (gas: 354424) +CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1424879) +CCIPHome__validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 322684) +CCIPHome__validateConfig:test__validateConfig_RMNHomeAddressCannotBeZero_Reverts() (gas: 323067) +CCIPHome__validateConfig:test__validateConfig_Success() (gas: 340335) +CCIPHome__validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 1177201) +CCIPHome__validateConfig:test__validateConfig_ZeroP2PId_Reverts() (gas: 328982) +CCIPHome__validateConfig:test__validateConfig_ZeroSignerKey_Reverts() (gas: 329095) +CCIPHome_applyChainConfigUpdates:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 199206) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 371830) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 23171) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 286616) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 16588) +CCIPHome_applyChainConfigUpdates:test_getPaginatedCCIPHomes_Success() (gas: 411194) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_DONIdMismatch_reverts() (gas: 53139) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InnerCallReverts_reverts() (gas: 14017) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InvalidSelector_reverts() (gas: 12740) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_reverts() (gas: 51199) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_success() (gas: 1553472) +CCIPHome_constructor:test_constructor_CapabilitiesRegistryAddressZero_reverts() (gas: 67022) +CCIPHome_constructor:test_constructor_success() (gas: 5322506) +CCIPHome_getAllConfigs:test_getAllConfigs_success() (gas: 2917876) +CCIPHome_getCapabilityConfiguration:test_getCapabilityConfiguration_success() (gas: 10244) +CCIPHome_getConfigDigests:test_getConfigDigests_success() (gas: 2632384) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_CanOnlySelfCall_reverts() (gas: 10152) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 27337) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 9924) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_multiplePlugins_success() (gas: 5320500) +CCIPHome_revokeCandidate:test_revokeCandidate_CanOnlySelfCall_reverts() (gas: 10097) +CCIPHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 21525) +CCIPHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 9666) +CCIPHome_revokeCandidate:test_revokeCandidate_success() (gas: 39075) +CCIPHome_setCandidate:test_setCandidate_CanOnlySelfCall_reverts() (gas: 43957) +CCIPHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 1489850) +CCIPHome_setCandidate:test_setCandidate_success() (gas: 1435475) +CCIPHome_supportsInterface:test_supportsInterface_success() (gas: 11363) DefensiveExampleTest:test_HappyPath_Success() (gas: 200540) DefensiveExampleTest:test_Recovery() (gas: 425013) E2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1512127) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 96980) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_happyPath() (gas: 49812) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongToken() (gas: 17479) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongTokenAmount() (gas: 15753) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_feeToken() (gas: 99953) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_native() (gas: 76182) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_weth() (gas: 99974) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_feeToken() (gas: 145007) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_native() (gas: 80439) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_nativeExcess() (gas: 80604) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_weth() (gas: 96107) -EtherSenderReceiverTest_constructor:test_constructor() (gas: 17575) -EtherSenderReceiverTest_getFee:test_getFee() (gas: 27456) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_reverts_feeToken_tokenAmountNotEqualToMsgValue() (gas: 20355) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_feeToken() (gas: 16682) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_native() (gas: 16615) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_dataOverwrittenToMsgSender() (gas: 25456) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_emptyDataOverwrittenToMsgSender() (gas: 25373) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_invalidTokenAmounts() (gas: 17969) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_tokenOverwrittenToWeth() (gas: 25328) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_validMessage_extraArgs() (gas: 26348) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 103832) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_happyPath() (gas: 54732) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongToken() (gas: 21903) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongTokenAmount() (gas: 20674) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_feeToken() (gas: 116423) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_native() (gas: 91360) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_weth() (gas: 116371) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_feeToken() (gas: 167929) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_native() (gas: 98200) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_nativeExcess() (gas: 98574) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_weth() (gas: 117880) +EtherSenderReceiverTest_constructor:test_constructor() (gas: 19659) +EtherSenderReceiverTest_getFee:test_getFee() (gas: 41273) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_reverts_feeToken_tokenAmountNotEqualToMsgValue() (gas: 22872) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_feeToken() (gas: 18368) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_native() (gas: 18398) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_dataOverwrittenToMsgSender() (gas: 34950) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_emptyDataOverwrittenToMsgSender() (gas: 34719) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_invalidTokenAmounts() (gas: 23796) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_tokenOverwrittenToWeth() (gas: 34674) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_validMessage_extraArgs() (gas: 36217) FactoryBurnMintERC20_approve:test_Approve_Success() (gas: 55819) FactoryBurnMintERC20_approve:test_InvalidAddress_Reverts() (gas: 10703) FactoryBurnMintERC20_burn:test_BasicBurn_Success() (gas: 172464) @@ -550,28 +550,28 @@ PingPong_setOutOfOrderExecution:test_OutOfOrderExecution_Success() (gas: 20283) PingPong_setPaused:test_Pausing_Success() (gas: 17738) PingPong_startPingPong:test_StartPingPong_With_OOO_Success() (gas: 151993) PingPong_startPingPong:test_StartPingPong_With_Sequenced_Ordered_Success() (gas: 177608) -RMNHome_getConfigDigests:test_getConfigDigests_success() (gas: 1079685) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 23879) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 10597) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_OnlyOwner_reverts() (gas: 10843) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_success() (gas: 1085033) -RMNHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 19041) -RMNHome_revokeCandidate:test_revokeCandidate_OnlyOwner_reverts() (gas: 10889) -RMNHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 10628) -RMNHome_revokeCandidate:test_revokeCandidate_success() (gas: 28147) -RMNHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 597564) -RMNHome_setCandidate:test_setCandidate_OnlyOwner_reverts() (gas: 15071) -RMNHome_setCandidate:test_setCandidate_success() (gas: 589330) -RMNHome_setDynamicConfig:test_setDynamicConfig_DigestNotFound_reverts() (gas: 30186) -RMNHome_setDynamicConfig:test_setDynamicConfig_MinObserversTooHigh_reverts() (gas: 18854) -RMNHome_setDynamicConfig:test_setDynamicConfig_OnlyOwner_reverts() (gas: 14009) -RMNHome_setDynamicConfig:test_setDynamicConfig_success() (gas: 104862) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateOffchainPublicKey_reverts() (gas: 18850) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicatePeerId_reverts() (gas: 18710) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateSourceChain_reverts() (gas: 20387) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_NotEnoughObservers_reverts() (gas: 21405) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsNodesLength_reverts() (gas: 137318) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsObserverNodeIndex_reverts() (gas: 20522) +RMNHome_getConfigDigests:test_getConfigDigests_success() (gas: 1141201) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 27408) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 11404) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_OnlyOwner_reverts() (gas: 11832) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_success() (gas: 1155666) +RMNHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 20941) +RMNHome_revokeCandidate:test_revokeCandidate_OnlyOwner_reverts() (gas: 11645) +RMNHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 11193) +RMNHome_revokeCandidate:test_revokeCandidate_success() (gas: 34858) +RMNHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 663743) +RMNHome_setCandidate:test_setCandidate_OnlyOwner_reverts() (gas: 19206) +RMNHome_setCandidate:test_setCandidate_success() (gas: 634730) +RMNHome_setDynamicConfig:test_setDynamicConfig_DigestNotFound_reverts() (gas: 35645) +RMNHome_setDynamicConfig:test_setDynamicConfig_MinObserversTooHigh_reverts() (gas: 21662) +RMNHome_setDynamicConfig:test_setDynamicConfig_OnlyOwner_reverts() (gas: 16620) +RMNHome_setDynamicConfig:test_setDynamicConfig_success() (gas: 130187) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateOffchainPublicKey_reverts() (gas: 27054) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicatePeerId_reverts() (gas: 26920) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateSourceChain_reverts() (gas: 29055) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_NotEnoughObservers_reverts() (gas: 31068) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsNodesLength_reverts() (gas: 370126) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsObserverNodeIndex_reverts() (gas: 29313) RMNRemote_constructor:test_constructor() (gas: 8398) RMNRemote_curse:test_curse_AlreadyCursed_duplicateSubject_reverts() (gas: 154501) RMNRemote_curse:test_curse_calledByNonOwner_reverts() (gas: 18734) diff --git a/contracts/src/v0.8/ccip/offRamp/OffRamp.sol b/contracts/src/v0.8/ccip/offRamp/OffRamp.sol index 91371aaf5a6..d276ce26a96 100644 --- a/contracts/src/v0.8/ccip/offRamp/OffRamp.sol +++ b/contracts/src/v0.8/ccip/offRamp/OffRamp.sol @@ -362,7 +362,6 @@ contract OffRamp is ITypeAndVersion, MultiOCR3Base { ) internal { uint64 sourceChainSelector = report.sourceChainSelector; bool manualExecution = manualExecGasExecOverrides.length != 0; - // A double call to the RMNRemote is to check for both chainwise and legacy cursing before proceeding if (i_rmnRemote.isCursed(bytes16(uint128(sourceChainSelector)))) { if (manualExecution) { // For manual execution we don't want to silently fail so we revert. diff --git a/core/gethwrappers/ccip/generated/rmn_remote/rmn_remote.go b/core/gethwrappers/ccip/generated/rmn_remote/rmn_remote.go index 2c7c367ab1f..31b657c6ce0 100644 --- a/core/gethwrappers/ccip/generated/rmn_remote/rmn_remote.go +++ b/core/gethwrappers/ccip/generated/rmn_remote/rmn_remote.go @@ -61,7 +61,7 @@ type RMNRemoteSigner struct { var RMNRemoteMetaData = &bind.MetaData{ ABI: "[{\"inputs\":[{\"internalType\":\"uint64\",\"name\":\"localChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"contractIRMN\",\"name\":\"legacyRMN\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"}],\"name\":\"AlreadyCursed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"CannotTransferToSelf\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ConfigNotSet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"DuplicateOnchainPublicKey\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSignature\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidSignerOrder\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"IsBlessedNotAvailable\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"MustBeProposedOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"}],\"name\":\"NotCursed\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotEnoughSigners\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OnlyCallableByOwner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OutOfOrderSignatures\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"OwnerCannotBeZero\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ThresholdNotMet\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UnexpectedSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ZeroValueNotAllowed\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"rmnHomeContractConfigDigest\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"onchainPublicKey\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"nodeIndex\",\"type\":\"uint64\"}],\"internalType\":\"structRMNRemote.Signer[]\",\"name\":\"signers\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"f\",\"type\":\"uint64\"}],\"indexed\":false,\"internalType\":\"structRMNRemote.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"name\":\"ConfigSet\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"bytes16[]\",\"name\":\"subjects\",\"type\":\"bytes16[]\"}],\"name\":\"Cursed\",\"type\":\"event\"},{\"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\":false,\"internalType\":\"bytes16[]\",\"name\":\"subjects\",\"type\":\"bytes16[]\"}],\"name\":\"Uncursed\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"acceptOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"}],\"name\":\"curse\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes16[]\",\"name\":\"subjects\",\"type\":\"bytes16[]\"}],\"name\":\"curse\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCursedSubjects\",\"outputs\":[{\"internalType\":\"bytes16[]\",\"name\":\"subjects\",\"type\":\"bytes16[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLocalChainSelector\",\"outputs\":[{\"internalType\":\"uint64\",\"name\":\"localChainSelector\",\"type\":\"uint64\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getReportDigestHeader\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"digestHeader\",\"type\":\"bytes32\"}],\"stateMutability\":\"pure\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getVersionedConfig\",\"outputs\":[{\"internalType\":\"uint32\",\"name\":\"version\",\"type\":\"uint32\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"rmnHomeContractConfigDigest\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"onchainPublicKey\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"nodeIndex\",\"type\":\"uint64\"}],\"internalType\":\"structRMNRemote.Signer[]\",\"name\":\"signers\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"f\",\"type\":\"uint64\"}],\"internalType\":\"structRMNRemote.Config\",\"name\":\"config\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"address\",\"name\":\"commitStore\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"root\",\"type\":\"bytes32\"}],\"internalType\":\"structIRMN.TaggedRoot\",\"name\":\"taggedRoot\",\"type\":\"tuple\"}],\"name\":\"isBlessed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"}],\"name\":\"isCursed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isCursed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"rmnHomeContractConfigDigest\",\"type\":\"bytes32\"},{\"components\":[{\"internalType\":\"address\",\"name\":\"onchainPublicKey\",\"type\":\"address\"},{\"internalType\":\"uint64\",\"name\":\"nodeIndex\",\"type\":\"uint64\"}],\"internalType\":\"structRMNRemote.Signer[]\",\"name\":\"signers\",\"type\":\"tuple[]\"},{\"internalType\":\"uint64\",\"name\":\"f\",\"type\":\"uint64\"}],\"internalType\":\"structRMNRemote.Config\",\"name\":\"newConfig\",\"type\":\"tuple\"}],\"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\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes16\",\"name\":\"subject\",\"type\":\"bytes16\"}],\"name\":\"uncurse\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes16[]\",\"name\":\"subjects\",\"type\":\"bytes16[]\"}],\"name\":\"uncurse\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"offrampAddress\",\"type\":\"address\"},{\"components\":[{\"internalType\":\"uint64\",\"name\":\"sourceChainSelector\",\"type\":\"uint64\"},{\"internalType\":\"bytes\",\"name\":\"onRampAddress\",\"type\":\"bytes\"},{\"internalType\":\"uint64\",\"name\":\"minSeqNr\",\"type\":\"uint64\"},{\"internalType\":\"uint64\",\"name\":\"maxSeqNr\",\"type\":\"uint64\"},{\"internalType\":\"bytes32\",\"name\":\"merkleRoot\",\"type\":\"bytes32\"}],\"internalType\":\"structInternal.MerkleRoot[]\",\"name\":\"merkleRoots\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"internalType\":\"structIRMNRemote.Signature[]\",\"name\":\"signatures\",\"type\":\"tuple[]\"}],\"name\":\"verify\",\"outputs\":[],\"stateMutability\":\"view\",\"type\":\"function\"}]", - Bin: "0x60c06040523480156200001157600080fd5b506040516200230438038062002304833981016040819052620000349162000150565b336000816200005657604051639b15e16f60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b038481169190911790915581161562000089576200008981620000d6565b5050816001600160401b0316600003620000b65760405163273e150360e21b815260040160405180910390fd5b6001600160401b039091166080526001600160a01b031660a052620001a5565b336001600160a01b038216036200010057604051636d6c4ee560e11b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b03838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600080604083850312156200016457600080fd5b82516001600160401b03811681146200017c57600080fd5b60208401519092506001600160a01b03811681146200019a57600080fd5b809150509250929050565b60805160a05161212b620001d9600039600081816108c5015261096d0152600081816102a80152610b7c015261212b6000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c80636d2d3993116100b25780639a19b32911610081578063eaa83ddd11610066578063eaa83ddd1461029a578063f2fde38b146102d2578063f8bb876e146102e557600080fd5b80639a19b32914610272578063d881e0921461028557600080fd5b80636d2d39931461021c57806370a9089e1461022f57806379ba5097146102425780638da5cb5b1461024a57600080fd5b8063397796f7116100ee578063397796f7146101c05780634d616771146101c857806362eed415146101db5780636509a954146101ee57600080fd5b8063181f5a7714610120578063198f0f77146101725780631add205f146101875780632cbc26bb1461019d575b600080fd5b61015c6040518060400160405280601381526020017f524d4e52656d6f746520312e362e302d6465760000000000000000000000000081525081565b60405161016991906114d9565b60405180910390f35b6101856101803660046114ec565b6102f8565b005b61018f6106f2565b604051610169929190611527565b6101b06101ab366004611605565b6107ea565b6040519015158152602001610169565b6101b0610847565b6101b06101d6366004611620565b6108c1565b6101856101e9366004611605565b6109e3565b6040517f9651943783dbf81935a60e98f218a9d9b5b28823fb2228bbd91320d632facf538152602001610169565b61018561022a366004611605565b610a57565b61018561023d3660046116a6565b610ac7565b610185610e22565b60015460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610169565b610185610280366004611825565b610ef0565b61028d610ff6565b60405161016991906118c2565b60405167ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610169565b6101856102e0366004611928565b611002565b6101856102f3366004611825565b611016565b610300611108565b8035610338576040517f9cf8540c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015b6103486020830183611945565b90508110156104185761035e6020830183611945565b8281811061036e5761036e6119ad565b905060400201602001602081019061038691906119fd565b67ffffffffffffffff1661039d6020840184611945565b6103a8600185611a49565b8181106103b7576103b76119ad565b90506040020160200160208101906103cf91906119fd565b67ffffffffffffffff1610610410576040517f4485151700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60010161033b565b5061042960608201604083016119fd565b610434906002611a5c565b61043f906001611a88565b67ffffffffffffffff166104566020830183611945565b90501015610490576040517f014c502000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003545b8015610522576008600060036104ab600185611a49565b815481106104bb576104bb6119ad565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905561051b81611aa9565b9050610494565b5060005b6105336020830183611945565b9050811015610668576008600061054d6020850185611945565b8481811061055d5761055d6119ad565b6105739260206040909202019081019150611928565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205460ff16156105d4576040517f28cae27d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600860006105e76020860186611945565b858181106105f7576105f76119ad565b61060d9260206040909202019081019150611928565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610526565b508060026106768282611b97565b5050600580546000919082906106919063ffffffff16611cd2565b91906101000a81548163ffffffff021916908363ffffffff160217905590508063ffffffff167f7f22bf988149dbe8de8fb879c6b97a4e56e68b2bd57421ce1a4e79d4ef6b496c836040516106e69190611cf5565b60405180910390a25050565b6040805160608082018352600080835260208301919091529181018290526005546040805160608101825260028054825260038054845160208281028201810190965281815263ffffffff9096169592948593818601939092909160009084015b828210156107c1576000848152602090819020604080518082019091529084015473ffffffffffffffffffffffffffffffffffffffff8116825274010000000000000000000000000000000000000000900467ffffffffffffffff1681830152825260019092019101610753565b505050908252506002919091015467ffffffffffffffff16602090910152919491935090915050565b60006107f6600661115b565b60000361080557506000919050565b610810600683611165565b80610841575061084160067f0100000000000000000000000000000100000000000000000000000000000000611165565b92915050565b6000610853600661115b565b6000036108605750600090565b61088b60067f0100000000000000000000000000000000000000000000000000000000000000611165565b806108bc57506108bc60067f0100000000000000000000000000000100000000000000000000000000000000611165565b905090565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16610930576040517f0a7c4edd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f4d61677100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634d616771906109a2908590600401611dff565b602060405180830381865afa1580156109bf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108419190611e38565b604080516001808252818301909252600091602080830190803683370190505090508181600081518110610a1957610a196119ad565b7fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921660209283029190910190910152610a5381611016565b5050565b604080516001808252818301909252600091602080830190803683370190505090508181600081518110610a8d57610a8d6119ad565b7fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921660209283029190910190910152610a5381610ef0565b60055463ffffffff16600003610b09576040517face124bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600454610b219067ffffffffffffffff166001611a88565b67ffffffffffffffff16811015610b64576040517f59fa4a9300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160c08101825246815267ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166020820152309181019190915273ffffffffffffffffffffffffffffffffffffffff8616606082015260025460808201526000907f9651943783dbf81935a60e98f218a9d9b5b28823fb2228bbd91320d632facf539060a08101610c008789611e5a565b9052604051610c13929190602001611fba565b60405160208183030381529060405280519060200120905060008060005b84811015610e1757600184601b888885818110610c5057610c506119ad565b90506040020160000135898986818110610c6c57610c6c6119ad565b9050604002016020013560405160008152602001604052604051610cac949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015610cce573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015192505073ffffffffffffffffffffffffffffffffffffffff8216610d46576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1610610dab576040517fbbe15e7f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526008602052604090205460ff16610e0a576040517faaaa914100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9091508190600101610c31565b505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e73576040517f02b543c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000008082163390811790935560008054909116815560405173ffffffffffffffffffffffffffffffffffffffff909216929183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610ef8611108565b60005b8151811015610fbb57610f31828281518110610f1957610f196119ad565b602002602001015160066111a390919063ffffffff16565b610fb357818181518110610f4757610f476119ad565b60200260200101516040517f73281fa1000000000000000000000000000000000000000000000000000000008152600401610faa91907fffffffffffffffffffffffffffffffff0000000000000000000000000000000091909116815260200190565b60405180910390fd5b600101610efb565b507f0676e709c9cc74fa0519fd78f7c33be0f1b2b0bae0507c724aef7229379c6ba181604051610feb91906118c2565b60405180910390a150565b60606108bc60066111d1565b61100a611108565b611013816111de565b50565b61101e611108565b60005b81518110156110d85761105782828151811061103f5761103f6119ad565b602002602001015160066112a290919063ffffffff16565b6110d05781818151811061106d5761106d6119ad565b60200260200101516040517f19d5c79b000000000000000000000000000000000000000000000000000000008152600401610faa91907fffffffffffffffffffffffffffffffff0000000000000000000000000000000091909116815260200190565b600101611021565b507f1716e663a90a76d3b6c7e5f680673d1b051454c19c627e184c8daf28f3104f7481604051610feb91906118c2565b60015473ffffffffffffffffffffffffffffffffffffffff163314611159576040517f2b5c74de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6000610841825490565b7fffffffffffffffffffffffffffffffff000000000000000000000000000000008116600090815260018301602052604081205415155b9392505050565b600061119c837fffffffffffffffffffffffffffffffff0000000000000000000000000000000084166112d0565b6060600061119c836113ca565b3373ffffffffffffffffffffffffffffffffffffffff82160361122d576040517fdad89dca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600061119c837fffffffffffffffffffffffffffffffff000000000000000000000000000000008416611426565b600081815260018301602052604081205480156113b95760006112f4600183611a49565b855490915060009061130890600190611a49565b905080821461136d576000866000018281548110611328576113286119ad565b906000526020600020015490508087600001848154811061134b5761134b6119ad565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061137e5761137e6120ef565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610841565b6000915050610841565b5092915050565b60608160000180548060200260200160405190810160405280929190818152602001828054801561141a57602002820191906000526020600020905b815481526020019060010190808311611406575b50505050509050919050565b600081815260018301602052604081205461146d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610841565b506000610841565b6000815180845260005b8181101561149b5760208185018101518683018201520161147f565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061119c6020830184611475565b6000602082840312156114fe57600080fd5b813567ffffffffffffffff81111561151557600080fd5b82016060818503121561119c57600080fd5b63ffffffff831681526040602080830182905283518383015283810151606080850152805160a085018190526000939291820190849060c08701905b808310156115ac578351805173ffffffffffffffffffffffffffffffffffffffff16835285015167ffffffffffffffff1685830152928401926001929092019190850190611563565b50604088015167ffffffffffffffff81166080890152945098975050505050505050565b80357fffffffffffffffffffffffffffffffff000000000000000000000000000000008116811461160057600080fd5b919050565b60006020828403121561161757600080fd5b61119c826115d0565b60006040828403121561163257600080fd5b50919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461101357600080fd5b60008083601f84011261166c57600080fd5b50813567ffffffffffffffff81111561168457600080fd5b6020830191508360208260061b850101111561169f57600080fd5b9250929050565b6000806000806000606086880312156116be57600080fd5b85356116c981611638565b9450602086013567ffffffffffffffff808211156116e657600080fd5b818801915088601f8301126116fa57600080fd5b81358181111561170957600080fd5b8960208260051b850101111561171e57600080fd5b60208301965080955050604088013591508082111561173c57600080fd5b506117498882890161165a565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff811182821017156117ac576117ac61175a565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117f9576117f961175a565b604052919050565b600067ffffffffffffffff82111561181b5761181b61175a565b5060051b60200190565b6000602080838503121561183857600080fd5b823567ffffffffffffffff81111561184f57600080fd5b8301601f8101851361186057600080fd5b803561187361186e82611801565b6117b2565b81815260059190911b8201830190838101908783111561189257600080fd5b928401925b828410156118b7576118a8846115d0565b82529284019290840190611897565b979650505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561191c5783517fffffffffffffffffffffffffffffffff0000000000000000000000000000000016835292840192918401916001016118de565b50909695505050505050565b60006020828403121561193a57600080fd5b813561119c81611638565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261197a57600080fd5b83018035915067ffffffffffffffff82111561199557600080fd5b6020019150600681901b360382131561169f57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b67ffffffffffffffff8116811461101357600080fd5b8035611600816119dc565b600060208284031215611a0f57600080fd5b813561119c816119dc565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b8181038181111561084157610841611a1a565b67ffffffffffffffff818116838216028082169190828114611a8057611a80611a1a565b505092915050565b67ffffffffffffffff8181168382160190808211156113c3576113c3611a1a565b600081611ab857611ab8611a1a565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60008135610841816119dc565b8135611af681611638565b73ffffffffffffffffffffffffffffffffffffffff811690508154817fffffffffffffffffffffffff000000000000000000000000000000000000000082161783556020840135611b46816119dc565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b16837fffffffff000000000000000000000000000000000000000000000000000000008416171784555050505050565b81358155600180820160208401357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1853603018112611bd557600080fd5b8401803567ffffffffffffffff811115611bee57600080fd5b6020820191508060061b3603821315611c0657600080fd5b68010000000000000000811115611c1f57611c1f61175a565b825481845580821015611c54576000848152602081208381019083015b80821015611c505782825590870190611c3c565b5050505b50600092835260208320925b81811015611c8457611c728385611aeb565b92840192604092909201918401611c60565b5050505050610a53611c9860408401611ade565b6002830167ffffffffffffffff82167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008254161781555050565b600063ffffffff808316818103611ceb57611ceb611a1a565b6001019392505050565b6000602080835260808301843582850152818501357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1863603018112611d3a57600080fd5b8501828101903567ffffffffffffffff80821115611d5757600080fd5b8160061b3603831315611d6957600080fd5b6040606060408901528483865260a089019050849550600094505b83851015611dd4578535611d9781611638565b73ffffffffffffffffffffffffffffffffffffffff16815285870135611dbc816119dc565b83168188015294810194600194909401938101611d84565b611de060408b016119f2565b67ffffffffffffffff811660608b015296509998505050505050505050565b604081018235611e0e81611638565b73ffffffffffffffffffffffffffffffffffffffff81168352506020830135602083015292915050565b600060208284031215611e4a57600080fd5b8151801515811461119c57600080fd5b6000611e6861186e84611801565b80848252602080830192508560051b850136811115611e8657600080fd5b855b81811015611fae57803567ffffffffffffffff80821115611ea95760008081fd5b818901915060a08236031215611ebf5760008081fd5b611ec7611789565b8235611ed2816119dc565b81528286013582811115611ee65760008081fd5b8301601f3681830112611ef95760008081fd5b813584811115611f0b57611f0b61175a565b611f3a897fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe084840116016117b2565b94508085523689828501011115611f5357600091508182fd5b808984018a8701376000898287010152505050818682015260409150611f7a8284016119f2565b8282015260609150611f8d8284016119f2565b91810191909152608091820135918101919091528552938201938201611e88565b50919695505050505050565b60006040848352602060408185015261010084018551604086015281860151606067ffffffffffffffff808316606089015260408901519250608073ffffffffffffffffffffffffffffffffffffffff80851660808b015260608b0151945060a081861660a08c015260808c015160c08c015260a08c0151955060c060e08c015286915085518088526101209750878c019250878160051b8d01019750888701965060005b818110156120dc577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee08d8a030184528751868151168a528a810151848c8c01526120ab858c0182611475565b828e015189168c8f01528983015189168a8d0152918701519a87019a909a529850968901969289019260010161205f565b50969d9c50505050505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000818000a", + Bin: "0x60c06040523480156200001157600080fd5b50604051620022d3380380620022d3833981016040819052620000349162000150565b336000816200005657604051639b15e16f60e01b815260040160405180910390fd5b600180546001600160a01b0319166001600160a01b038481169190911790915581161562000089576200008981620000d6565b5050816001600160401b0316600003620000b65760405163273e150360e21b815260040160405180910390fd5b6001600160401b039091166080526001600160a01b031660a052620001a5565b336001600160a01b038216036200010057604051636d6c4ee560e11b815260040160405180910390fd5b600080546001600160a01b0319166001600160a01b03838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600080604083850312156200016457600080fd5b82516001600160401b03811681146200017c57600080fd5b60208401519092506001600160a01b03811681146200019a57600080fd5b809150509250929050565b60805160a0516120fa620001d960003960008181610894015261093c0152600081816102a80152610b4b01526120fa6000f3fe608060405234801561001057600080fd5b506004361061011b5760003560e01c80636d2d3993116100b25780639a19b32911610081578063eaa83ddd11610066578063eaa83ddd1461029a578063f2fde38b146102d2578063f8bb876e146102e557600080fd5b80639a19b32914610272578063d881e0921461028557600080fd5b80636d2d39931461021c57806370a9089e1461022f57806379ba5097146102425780638da5cb5b1461024a57600080fd5b8063397796f7116100ee578063397796f7146101c05780634d616771146101c857806362eed415146101db5780636509a954146101ee57600080fd5b8063181f5a7714610120578063198f0f77146101725780631add205f146101875780632cbc26bb1461019d575b600080fd5b61015c6040518060400160405280601381526020017f524d4e52656d6f746520312e362e302d6465760000000000000000000000000081525081565b60405161016991906114a8565b60405180910390f35b6101856101803660046114bb565b6102f8565b005b61018f6106f2565b6040516101699291906114f6565b6101b06101ab3660046115d4565b6107ea565b6040519015158152602001610169565b6101b0610847565b6101b06101d63660046115ef565b610890565b6101856101e93660046115d4565b6109b2565b6040517f9651943783dbf81935a60e98f218a9d9b5b28823fb2228bbd91320d632facf538152602001610169565b61018561022a3660046115d4565b610a26565b61018561023d366004611675565b610a96565b610185610df1565b60015460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610169565b6101856102803660046117f4565b610ebf565b61028d610fc5565b6040516101699190611891565b60405167ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610169565b6101856102e03660046118f7565b610fd1565b6101856102f33660046117f4565b610fe5565b6103006110d7565b8035610338576040517f9cf8540c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60015b6103486020830183611914565b90508110156104185761035e6020830183611914565b8281811061036e5761036e61197c565b905060400201602001602081019061038691906119cc565b67ffffffffffffffff1661039d6020840184611914565b6103a8600185611a18565b8181106103b7576103b761197c565b90506040020160200160208101906103cf91906119cc565b67ffffffffffffffff1610610410576040517f4485151700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60010161033b565b5061042960608201604083016119cc565b610434906002611a2b565b61043f906001611a57565b67ffffffffffffffff166104566020830183611914565b90501015610490576040517f014c502000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6003545b8015610522576008600060036104ab600185611a18565b815481106104bb576104bb61197c565b600091825260208083209091015473ffffffffffffffffffffffffffffffffffffffff168352820192909252604001902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016905561051b81611a78565b9050610494565b5060005b6105336020830183611914565b9050811015610668576008600061054d6020850185611914565b8481811061055d5761055d61197c565b61057392602060409092020190810191506118f7565b73ffffffffffffffffffffffffffffffffffffffff16815260208101919091526040016000205460ff16156105d4576040517f28cae27d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600860006105e76020860186611914565b858181106105f7576105f761197c565b61060d92602060409092020190810191506118f7565b73ffffffffffffffffffffffffffffffffffffffff168152602081019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055600101610526565b508060026106768282611b66565b5050600580546000919082906106919063ffffffff16611ca1565b91906101000a81548163ffffffff021916908363ffffffff160217905590508063ffffffff167f7f22bf988149dbe8de8fb879c6b97a4e56e68b2bd57421ce1a4e79d4ef6b496c836040516106e69190611cc4565b60405180910390a25050565b6040805160608082018352600080835260208301919091529181018290526005546040805160608101825260028054825260038054845160208281028201810190965281815263ffffffff9096169592948593818601939092909160009084015b828210156107c1576000848152602090819020604080518082019091529084015473ffffffffffffffffffffffffffffffffffffffff8116825274010000000000000000000000000000000000000000900467ffffffffffffffff1681830152825260019092019101610753565b505050908252506002919091015467ffffffffffffffff16602090910152919491935090915050565b60006107f6600661112a565b60000361080557506000919050565b610810600683611134565b80610841575061084160067f0100000000000000000000000000000100000000000000000000000000000000611134565b92915050565b6000610853600661112a565b6000036108605750600090565b61088b60067f0100000000000000000000000000000100000000000000000000000000000000611134565b905090565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166108ff576040517f0a7c4edd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f4d61677100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001690634d61677190610971908590600401611dce565b602060405180830381865afa15801561098e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108419190611e07565b6040805160018082528183019092526000916020808301908036833701905050905081816000815181106109e8576109e861197c565b7fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921660209283029190910190910152610a2281610fe5565b5050565b604080516001808252818301909252600091602080830190803683370190505090508181600081518110610a5c57610a5c61197c565b7fffffffffffffffffffffffffffffffff0000000000000000000000000000000090921660209283029190910190910152610a2281610ebf565b60055463ffffffff16600003610ad8576040517face124bc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600454610af09067ffffffffffffffff166001611a57565b67ffffffffffffffff16811015610b33576040517f59fa4a9300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805160c08101825246815267ffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000166020820152309181019190915273ffffffffffffffffffffffffffffffffffffffff8616606082015260025460808201526000907f9651943783dbf81935a60e98f218a9d9b5b28823fb2228bbd91320d632facf539060a08101610bcf8789611e29565b9052604051610be2929190602001611f89565b60405160208183030381529060405280519060200120905060008060005b84811015610de657600184601b888885818110610c1f57610c1f61197c565b90506040020160000135898986818110610c3b57610c3b61197c565b9050604002016020013560405160008152602001604052604051610c7b949392919093845260ff9290921660208401526040830152606082015260800190565b6020604051602081039080840390855afa158015610c9d573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015192505073ffffffffffffffffffffffffffffffffffffffff8216610d15576040517f8baa579f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1610610d7a576040517fbbe15e7f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff821660009081526008602052604090205460ff16610dd9576040517faaaa914100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b9091508190600101610c00565b505050505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610e42576040517f02b543c600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000008082163390811790935560008054909116815560405173ffffffffffffffffffffffffffffffffffffffff909216929183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b610ec76110d7565b60005b8151811015610f8a57610f00828281518110610ee857610ee861197c565b6020026020010151600661117290919063ffffffff16565b610f8257818181518110610f1657610f1661197c565b60200260200101516040517f73281fa1000000000000000000000000000000000000000000000000000000008152600401610f7991907fffffffffffffffffffffffffffffffff0000000000000000000000000000000091909116815260200190565b60405180910390fd5b600101610eca565b507f0676e709c9cc74fa0519fd78f7c33be0f1b2b0bae0507c724aef7229379c6ba181604051610fba9190611891565b60405180910390a150565b606061088b60066111a0565b610fd96110d7565b610fe2816111ad565b50565b610fed6110d7565b60005b81518110156110a75761102682828151811061100e5761100e61197c565b6020026020010151600661127190919063ffffffff16565b61109f5781818151811061103c5761103c61197c565b60200260200101516040517f19d5c79b000000000000000000000000000000000000000000000000000000008152600401610f7991907fffffffffffffffffffffffffffffffff0000000000000000000000000000000091909116815260200190565b600101610ff0565b507f1716e663a90a76d3b6c7e5f680673d1b051454c19c627e184c8daf28f3104f7481604051610fba9190611891565b60015473ffffffffffffffffffffffffffffffffffffffff163314611128576040517f2b5c74de00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b6000610841825490565b7fffffffffffffffffffffffffffffffff000000000000000000000000000000008116600090815260018301602052604081205415155b9392505050565b600061116b837fffffffffffffffffffffffffffffffff00000000000000000000000000000000841661129f565b6060600061116b83611399565b3373ffffffffffffffffffffffffffffffffffffffff8216036111fc576040517fdad89dca00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff838116918217835560015460405192939116917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b600061116b837fffffffffffffffffffffffffffffffff0000000000000000000000000000000084166113f5565b600081815260018301602052604081205480156113885760006112c3600183611a18565b85549091506000906112d790600190611a18565b905080821461133c5760008660000182815481106112f7576112f761197c565b906000526020600020015490508087600001848154811061131a5761131a61197c565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061134d5761134d6120be565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610841565b6000915050610841565b5092915050565b6060816000018054806020026020016040519081016040528092919081815260200182805480156113e957602002820191906000526020600020905b8154815260200190600101908083116113d5575b50505050509050919050565b600081815260018301602052604081205461143c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610841565b506000610841565b6000815180845260005b8181101561146a5760208185018101518683018201520161144e565b5060006020828601015260207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f83011685010191505092915050565b60208152600061116b6020830184611444565b6000602082840312156114cd57600080fd5b813567ffffffffffffffff8111156114e457600080fd5b82016060818503121561116b57600080fd5b63ffffffff831681526040602080830182905283518383015283810151606080850152805160a085018190526000939291820190849060c08701905b8083101561157b578351805173ffffffffffffffffffffffffffffffffffffffff16835285015167ffffffffffffffff1685830152928401926001929092019190850190611532565b50604088015167ffffffffffffffff81166080890152945098975050505050505050565b80357fffffffffffffffffffffffffffffffff00000000000000000000000000000000811681146115cf57600080fd5b919050565b6000602082840312156115e657600080fd5b61116b8261159f565b60006040828403121561160157600080fd5b50919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610fe257600080fd5b60008083601f84011261163b57600080fd5b50813567ffffffffffffffff81111561165357600080fd5b6020830191508360208260061b850101111561166e57600080fd5b9250929050565b60008060008060006060868803121561168d57600080fd5b853561169881611607565b9450602086013567ffffffffffffffff808211156116b557600080fd5b818801915088601f8301126116c957600080fd5b8135818111156116d857600080fd5b8960208260051b85010111156116ed57600080fd5b60208301965080955050604088013591508082111561170b57600080fd5b5061171888828901611629565b969995985093965092949392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b60405160a0810167ffffffffffffffff8111828210171561177b5761177b611729565b60405290565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156117c8576117c8611729565b604052919050565b600067ffffffffffffffff8211156117ea576117ea611729565b5060051b60200190565b6000602080838503121561180757600080fd5b823567ffffffffffffffff81111561181e57600080fd5b8301601f8101851361182f57600080fd5b803561184261183d826117d0565b611781565b81815260059190911b8201830190838101908783111561186157600080fd5b928401925b82841015611886576118778461159f565b82529284019290840190611866565b979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156118eb5783517fffffffffffffffffffffffffffffffff0000000000000000000000000000000016835292840192918401916001016118ad565b50909695505050505050565b60006020828403121561190957600080fd5b813561116b81611607565b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261194957600080fd5b83018035915067ffffffffffffffff82111561196457600080fd5b6020019150600681901b360382131561166e57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b67ffffffffffffffff81168114610fe257600080fd5b80356115cf816119ab565b6000602082840312156119de57600080fd5b813561116b816119ab565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b81810381811115610841576108416119e9565b67ffffffffffffffff818116838216028082169190828114611a4f57611a4f6119e9565b505092915050565b67ffffffffffffffff818116838216019080821115611392576113926119e9565b600081611a8757611a876119e9565b507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190565b60008135610841816119ab565b8135611ac581611607565b73ffffffffffffffffffffffffffffffffffffffff811690508154817fffffffffffffffffffffffff000000000000000000000000000000000000000082161783556020840135611b15816119ab565b7bffffffffffffffff00000000000000000000000000000000000000008160a01b16837fffffffff000000000000000000000000000000000000000000000000000000008416171784555050505050565b81358155600180820160208401357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1853603018112611ba457600080fd5b8401803567ffffffffffffffff811115611bbd57600080fd5b6020820191508060061b3603821315611bd557600080fd5b68010000000000000000811115611bee57611bee611729565b825481845580821015611c23576000848152602081208381019083015b80821015611c1f5782825590870190611c0b565b5050505b50600092835260208320925b81811015611c5357611c418385611aba565b92840192604092909201918401611c2f565b5050505050610a22611c6760408401611aad565b6002830167ffffffffffffffff82167fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000008254161781555050565b600063ffffffff808316818103611cba57611cba6119e9565b6001019392505050565b6000602080835260808301843582850152818501357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1863603018112611d0957600080fd5b8501828101903567ffffffffffffffff80821115611d2657600080fd5b8160061b3603831315611d3857600080fd5b6040606060408901528483865260a089019050849550600094505b83851015611da3578535611d6681611607565b73ffffffffffffffffffffffffffffffffffffffff16815285870135611d8b816119ab565b83168188015294810194600194909401938101611d53565b611daf60408b016119c1565b67ffffffffffffffff811660608b015296509998505050505050505050565b604081018235611ddd81611607565b73ffffffffffffffffffffffffffffffffffffffff81168352506020830135602083015292915050565b600060208284031215611e1957600080fd5b8151801515811461116b57600080fd5b6000611e3761183d846117d0565b80848252602080830192508560051b850136811115611e5557600080fd5b855b81811015611f7d57803567ffffffffffffffff80821115611e785760008081fd5b818901915060a08236031215611e8e5760008081fd5b611e96611758565b8235611ea1816119ab565b81528286013582811115611eb55760008081fd5b8301601f3681830112611ec85760008081fd5b813584811115611eda57611eda611729565b611f09897fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08484011601611781565b94508085523689828501011115611f2257600091508182fd5b808984018a8701376000898287010152505050818682015260409150611f498284016119c1565b8282015260609150611f5c8284016119c1565b91810191909152608091820135918101919091528552938201938201611e57565b50919695505050505050565b60006040848352602060408185015261010084018551604086015281860151606067ffffffffffffffff808316606089015260408901519250608073ffffffffffffffffffffffffffffffffffffffff80851660808b015260608b0151945060a081861660a08c015260808c015160c08c015260a08c0151955060c060e08c015286915085518088526101209750878c019250878160051b8d01019750888701965060005b818110156120ab577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffee08d8a030184528751868151168a528a810151848c8c015261207a858c0182611444565b828e015189168c8f01528983015189168a8d0152918701519a87019a909a529850968901969289019260010161202e565b50969d9c50505050505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea164736f6c6343000818000a", } var RMNRemoteABI = RMNRemoteMetaData.ABI diff --git a/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt b/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt index dd2799ba810..7ace8c949a8 100644 --- a/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt +++ b/core/gethwrappers/ccip/generation/generated-wrapper-dependency-versions-do-not-edit.txt @@ -23,7 +23,7 @@ registry_module_owner_custom: ../../../contracts/solc/v0.8.24/RegistryModuleOwne report_codec: ../../../contracts/solc/v0.8.24/ReportCodec/ReportCodec.abi ../../../contracts/solc/v0.8.24/ReportCodec/ReportCodec.bin 6c943b39f003aa67c3cefa19a8ff99e846236a058e1ceae77569c3a065ffd5c7 rmn_home: ../../../contracts/solc/v0.8.24/RMNHome/RMNHome.abi ../../../contracts/solc/v0.8.24/RMNHome/RMNHome.bin 84ca84b3d0c00949905a3d10a91255f877cf32b2a0d7f7f7ce3121ced34a8cb7 rmn_proxy_contract: ../../../contracts/solc/v0.8.24/ARMProxy/ARMProxy.abi ../../../contracts/solc/v0.8.24/ARMProxy/ARMProxy.bin b048d8e752e3c41113ebb305c1efa06737ad36b4907b93e627fb0a3113023454 -rmn_remote: ../../../contracts/solc/v0.8.24/RMNRemote/RMNRemote.abi ../../../contracts/solc/v0.8.24/RMNRemote/RMNRemote.bin 941118dfdc6bb042c339cfe8d8e0c7a0b486afb731a785d58a64994e7a13c459 +rmn_remote: ../../../contracts/solc/v0.8.24/RMNRemote/RMNRemote.abi ../../../contracts/solc/v0.8.24/RMNRemote/RMNRemote.bin 2bf58225d1ceec21f3dd9e65b8088945c643ec527ae54b9983ec46316f5bca1f router: ../../../contracts/solc/v0.8.24/Router/Router.abi ../../../contracts/solc/v0.8.24/Router/Router.bin 2e4f0a7826c8abb49d882bb49fc5ff20a186dbd3137624b9097ffed903ae4888 token_admin_registry: ../../../contracts/solc/v0.8.24/TokenAdminRegistry/TokenAdminRegistry.abi ../../../contracts/solc/v0.8.24/TokenAdminRegistry/TokenAdminRegistry.bin 397bc7be08c2848c0f4715f90b16206d6367f78ffb7cd48e2b1dfc0ccc5aea26 token_pool: ../../../contracts/solc/v0.8.24/TokenPool/TokenPool.abi ../../../contracts/solc/v0.8.24/TokenPool/TokenPool.bin da86a1407f31134e7246bde63c80ce8c78ce7d7b44e267f3c1f6030441ff4252 From b5cb41fd557e105688f95a4e5c5a6618ebbd21fb Mon Sep 17 00:00:00 2001 From: "app-token-issuer-infra-releng[bot]" <120227048+app-token-issuer-infra-releng[bot]@users.noreply.github.com> Date: Thu, 5 Dec 2024 18:43:46 +0000 Subject: [PATCH 5/7] [Bot] Update changeset file with jira issues --- contracts/.changeset/eighty-cycles-film.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contracts/.changeset/eighty-cycles-film.md b/contracts/.changeset/eighty-cycles-film.md index e5f06ca8cf3..6cd56afa80a 100644 --- a/contracts/.changeset/eighty-cycles-film.md +++ b/contracts/.changeset/eighty-cycles-film.md @@ -3,3 +3,8 @@ --- remove legacy curse check from RMNRemote isCursed() method #bugfix + + +PR issue: CCIP-4476 + +Solidity Review issue: CCIP-3966 \ No newline at end of file From bfa46141fc2169c4746068add1688ac54efefcea Mon Sep 17 00:00:00 2001 From: Josh Date: Thu, 5 Dec 2024 13:59:05 -0500 Subject: [PATCH 6/7] snapshot fix --- contracts/gas-snapshots/ccip.gas-snapshot | 240 +++++++++++----------- 1 file changed, 120 insertions(+), 120 deletions(-) diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 6eae4d36c7e..7e2ab8222ad 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -1,9 +1,9 @@ -ARMProxy_constructor:test_Constructor() (gas: 543485) -ARMProxy_isCursed:test_IsCursed_Success() (gas: 49195) -ARMProxy_isCursed:test_call_ARMCallEmptyContract_Revert() (gas: 20200) -ARMProxy_isCursed:test_isCursed_RevertReasonForwarded_Revert() (gas: 47022) -ARMProxy_setARM:test_SetARM() (gas: 18216) -ARMProxy_setARM:test_SetARMzero() (gas: 12144) +ARMProxy_constructor:test_Constructor() (gas: 302231) +ARMProxy_isCursed:test_IsCursed_Success() (gas: 47209) +ARMProxy_isCursed:test_call_ARMCallEmptyContract_Revert() (gas: 19412) +ARMProxy_isCursed:test_isCursed_RevertReasonForwarded_Revert() (gas: 45210) +ARMProxy_setARM:test_SetARM() (gas: 16599) +ARMProxy_setARM:test_SetARMzero() (gas: 11275) BurnFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 27346) BurnFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 54878) BurnFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 244452) @@ -21,75 +21,75 @@ BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 244496) BurnWithFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 24223) CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2077779) -CCIPHome__validateConfig:test__validateConfigLessTransmittersThanSigners_Success() (gas: 380773) -CCIPHome__validateConfig:test__validateConfigSmallerFChain_Success() (gas: 558994) -CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_OfframpAddressCannotBeZero_Reverts() (gas: 323319) -CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_RMNHomeAddressCannotBeZero_Reverts() (gas: 323792) -CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 326840) -CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 322566) -CCIPHome__validateConfig:test__validateConfig_FChainTooHigh_Reverts() (gas: 396028) -CCIPHome__validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 325553) -CCIPHome__validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 324473) -CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmittersEmptyAddresses_Reverts() (gas: 354424) -CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1424879) -CCIPHome__validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 322684) -CCIPHome__validateConfig:test__validateConfig_RMNHomeAddressCannotBeZero_Reverts() (gas: 323067) -CCIPHome__validateConfig:test__validateConfig_Success() (gas: 340335) -CCIPHome__validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 1177201) -CCIPHome__validateConfig:test__validateConfig_ZeroP2PId_Reverts() (gas: 328982) -CCIPHome__validateConfig:test__validateConfig_ZeroSignerKey_Reverts() (gas: 329095) -CCIPHome_applyChainConfigUpdates:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 199206) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 371830) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 23171) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 286616) -CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 16588) -CCIPHome_applyChainConfigUpdates:test_getPaginatedCCIPHomes_Success() (gas: 411194) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_DONIdMismatch_reverts() (gas: 53139) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InnerCallReverts_reverts() (gas: 14017) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InvalidSelector_reverts() (gas: 12740) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_reverts() (gas: 51199) -CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_success() (gas: 1553472) -CCIPHome_constructor:test_constructor_CapabilitiesRegistryAddressZero_reverts() (gas: 67022) -CCIPHome_constructor:test_constructor_success() (gas: 5322506) -CCIPHome_getAllConfigs:test_getAllConfigs_success() (gas: 2917876) -CCIPHome_getCapabilityConfiguration:test_getCapabilityConfiguration_success() (gas: 10244) -CCIPHome_getConfigDigests:test_getConfigDigests_success() (gas: 2632384) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_CanOnlySelfCall_reverts() (gas: 10152) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 27337) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 9924) -CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_multiplePlugins_success() (gas: 5320500) -CCIPHome_revokeCandidate:test_revokeCandidate_CanOnlySelfCall_reverts() (gas: 10097) -CCIPHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 21525) -CCIPHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 9666) -CCIPHome_revokeCandidate:test_revokeCandidate_success() (gas: 39075) -CCIPHome_setCandidate:test_setCandidate_CanOnlySelfCall_reverts() (gas: 43957) -CCIPHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 1489850) -CCIPHome_setCandidate:test_setCandidate_success() (gas: 1435475) -CCIPHome_supportsInterface:test_supportsInterface_success() (gas: 11363) +CCIPHome__validateConfig:test__validateConfigLessTransmittersThanSigners_Success() (gas: 332619) +CCIPHome__validateConfig:test__validateConfigSmallerFChain_Success() (gas: 458568) +CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_OfframpAddressCannotBeZero_Reverts() (gas: 289191) +CCIPHome__validateConfig:test__validateConfig_ABIEncodedAddress_RMNHomeAddressCannotBeZero_Reverts() (gas: 289486) +CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 292216) +CCIPHome__validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 288824) +CCIPHome__validateConfig:test__validateConfig_FChainTooHigh_Reverts() (gas: 336363) +CCIPHome__validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 290590) +CCIPHome__validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 290055) +CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmittersEmptyAddresses_Reverts() (gas: 308646) +CCIPHome__validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1191231) +CCIPHome__validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 288918) +CCIPHome__validateConfig:test__validateConfig_RMNHomeAddressCannotBeZero_Reverts() (gas: 289112) +CCIPHome__validateConfig:test__validateConfig_Success() (gas: 299797) +CCIPHome__validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 773105) +CCIPHome__validateConfig:test__validateConfig_ZeroP2PId_Reverts() (gas: 293455) +CCIPHome__validateConfig:test__validateConfig_ZeroSignerKey_Reverts() (gas: 293503) +CCIPHome_applyChainConfigUpdates:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 187738) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 349623) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 18065) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 272742) +CCIPHome_applyChainConfigUpdates:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 14952) +CCIPHome_applyChainConfigUpdates:test_getPaginatedCCIPHomes_Success() (gas: 372561) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_DONIdMismatch_reverts() (gas: 38098) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InnerCallReverts_reverts() (gas: 11827) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_InvalidSelector_reverts() (gas: 11015) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_reverts() (gas: 37072) +CCIPHome_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_success() (gas: 1455716) +CCIPHome_constructor:test_constructor_CapabilitiesRegistryAddressZero_reverts() (gas: 63767) +CCIPHome_constructor:test_constructor_success() (gas: 3455841) +CCIPHome_getAllConfigs:test_getAllConfigs_success() (gas: 2773000) +CCIPHome_getCapabilityConfiguration:test_getCapabilityConfiguration_success() (gas: 9138) +CCIPHome_getConfigDigests:test_getConfigDigests_success() (gas: 2547397) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_CanOnlySelfCall_reverts() (gas: 9087) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 23005) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 8817) +CCIPHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_multiplePlugins_success() (gas: 5113570) +CCIPHome_revokeCandidate:test_revokeCandidate_CanOnlySelfCall_reverts() (gas: 9068) +CCIPHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 19105) +CCIPHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 8817) +CCIPHome_revokeCandidate:test_revokeCandidate_success() (gas: 30674) +CCIPHome_setCandidate:test_setCandidate_CanOnlySelfCall_reverts() (gas: 29383) +CCIPHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 1395154) +CCIPHome_setCandidate:test_setCandidate_success() (gas: 1365439) +CCIPHome_supportsInterface:test_supportsInterface_success() (gas: 9885) DefensiveExampleTest:test_HappyPath_Success() (gas: 200540) DefensiveExampleTest:test_Recovery() (gas: 425013) E2E:test_E2E_3MessagesMMultiOffRampSuccess_gas() (gas: 1512127) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 103832) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_happyPath() (gas: 54732) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongToken() (gas: 21903) -EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongTokenAmount() (gas: 20674) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_feeToken() (gas: 116423) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_native() (gas: 91360) -EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_weth() (gas: 116371) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_feeToken() (gas: 167929) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_native() (gas: 98200) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_nativeExcess() (gas: 98574) -EtherSenderReceiverTest_ccipSend:test_ccipSend_success_weth() (gas: 117880) -EtherSenderReceiverTest_constructor:test_constructor() (gas: 19659) -EtherSenderReceiverTest_getFee:test_getFee() (gas: 41273) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_reverts_feeToken_tokenAmountNotEqualToMsgValue() (gas: 22872) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_feeToken() (gas: 18368) -EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_native() (gas: 18398) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_dataOverwrittenToMsgSender() (gas: 34950) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_emptyDataOverwrittenToMsgSender() (gas: 34719) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_invalidTokenAmounts() (gas: 23796) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_tokenOverwrittenToWeth() (gas: 34674) -EtherSenderReceiverTest_validatedMessage:test_validatedMessage_validMessage_extraArgs() (gas: 36217) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_fallbackToWethTransfer() (gas: 96980) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_happyPath() (gas: 49812) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongToken() (gas: 17479) +EtherSenderReceiverTest_ccipReceive:test_ccipReceive_wrongTokenAmount() (gas: 15753) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_feeToken() (gas: 99953) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_native() (gas: 76182) +EtherSenderReceiverTest_ccipSend:test_ccipSend_reverts_insufficientFee_weth() (gas: 99974) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_feeToken() (gas: 145007) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_native() (gas: 80439) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_nativeExcess() (gas: 80604) +EtherSenderReceiverTest_ccipSend:test_ccipSend_success_weth() (gas: 96107) +EtherSenderReceiverTest_constructor:test_constructor() (gas: 17575) +EtherSenderReceiverTest_getFee:test_getFee() (gas: 27456) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_reverts_feeToken_tokenAmountNotEqualToMsgValue() (gas: 20355) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_feeToken() (gas: 16682) +EtherSenderReceiverTest_validateFeeToken:test_validateFeeToken_valid_native() (gas: 16615) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_dataOverwrittenToMsgSender() (gas: 25456) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_emptyDataOverwrittenToMsgSender() (gas: 25373) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_invalidTokenAmounts() (gas: 17969) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_tokenOverwrittenToWeth() (gas: 25328) +EtherSenderReceiverTest_validatedMessage:test_validatedMessage_validMessage_extraArgs() (gas: 26348) FactoryBurnMintERC20_approve:test_Approve_Success() (gas: 55819) FactoryBurnMintERC20_approve:test_InvalidAddress_Reverts() (gas: 10703) FactoryBurnMintERC20_burn:test_BasicBurn_Success() (gas: 172464) @@ -251,11 +251,11 @@ LockReleaseTokenPool_transferLiquidity:test_transferLiquidity_Success() (gas: 83 LockReleaseTokenPool_transferLiquidity:test_transferLiquidity_transferTooMuch_Revert() (gas: 56056) LockReleaseTokenPool_withdrawalLiquidity:test_InsufficientLiquidity_Revert() (gas: 60188) LockReleaseTokenPool_withdrawalLiquidity:test_Unauthorized_Revert() (gas: 11464) -MerkleMultiProofTest:test_CVE_2023_34459() (gas: 6328) -MerkleMultiProofTest:test_EmptyLeaf_Revert() (gas: 3975) -MerkleMultiProofTest:test_MerkleRoot256() (gas: 668330) -MerkleMultiProofTest:test_MerkleRootSingleLeaf_Success() (gas: 4074) -MerkleMultiProofTest:test_SpecSync_gas() (gas: 49316) +MerkleMultiProofTest:test_CVE_2023_34459() (gas: 5456) +MerkleMultiProofTest:test_EmptyLeaf_Revert() (gas: 3563) +MerkleMultiProofTest:test_MerkleRoot256() (gas: 394891) +MerkleMultiProofTest:test_MerkleRootSingleLeaf_Success() (gas: 3661) +MerkleMultiProofTest:test_SpecSync_gas() (gas: 34152) MockRouterTest:test_ccipSendWithEVMExtraArgsV1_Success() (gas: 110095) MockRouterTest:test_ccipSendWithEVMExtraArgsV2_Success() (gas: 132614) MockRouterTest:test_ccipSendWithInsufficientNativeTokens_Revert() (gas: 34059) @@ -550,28 +550,28 @@ PingPong_setOutOfOrderExecution:test_OutOfOrderExecution_Success() (gas: 20283) PingPong_setPaused:test_Pausing_Success() (gas: 17738) PingPong_startPingPong:test_StartPingPong_With_OOO_Success() (gas: 151993) PingPong_startPingPong:test_StartPingPong_With_Sequenced_Ordered_Success() (gas: 177608) -RMNHome_getConfigDigests:test_getConfigDigests_success() (gas: 1141201) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 27408) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 11404) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_OnlyOwner_reverts() (gas: 11832) -RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_success() (gas: 1155666) -RMNHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 20941) -RMNHome_revokeCandidate:test_revokeCandidate_OnlyOwner_reverts() (gas: 11645) -RMNHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 11193) -RMNHome_revokeCandidate:test_revokeCandidate_success() (gas: 34858) -RMNHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 663743) -RMNHome_setCandidate:test_setCandidate_OnlyOwner_reverts() (gas: 19206) -RMNHome_setCandidate:test_setCandidate_success() (gas: 634730) -RMNHome_setDynamicConfig:test_setDynamicConfig_DigestNotFound_reverts() (gas: 35645) -RMNHome_setDynamicConfig:test_setDynamicConfig_MinObserversTooHigh_reverts() (gas: 21662) -RMNHome_setDynamicConfig:test_setDynamicConfig_OnlyOwner_reverts() (gas: 16620) -RMNHome_setDynamicConfig:test_setDynamicConfig_success() (gas: 130187) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateOffchainPublicKey_reverts() (gas: 27054) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicatePeerId_reverts() (gas: 26920) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateSourceChain_reverts() (gas: 29055) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_NotEnoughObservers_reverts() (gas: 31068) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsNodesLength_reverts() (gas: 370126) -RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsObserverNodeIndex_reverts() (gas: 29313) +RMNHome_getConfigDigests:test_getConfigDigests_success() (gas: 1079685) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_ConfigDigestMismatch_reverts() (gas: 23879) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_NoOpStateTransitionNotAllowed_reverts() (gas: 10597) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_OnlyOwner_reverts() (gas: 10843) +RMNHome_promoteCandidateAndRevokeActive:test_promoteCandidateAndRevokeActive_success() (gas: 1085033) +RMNHome_revokeCandidate:test_revokeCandidate_ConfigDigestMismatch_reverts() (gas: 19041) +RMNHome_revokeCandidate:test_revokeCandidate_OnlyOwner_reverts() (gas: 10889) +RMNHome_revokeCandidate:test_revokeCandidate_RevokingZeroDigestNotAllowed_reverts() (gas: 10628) +RMNHome_revokeCandidate:test_revokeCandidate_success() (gas: 28147) +RMNHome_setCandidate:test_setCandidate_ConfigDigestMismatch_reverts() (gas: 597564) +RMNHome_setCandidate:test_setCandidate_OnlyOwner_reverts() (gas: 15071) +RMNHome_setCandidate:test_setCandidate_success() (gas: 589330) +RMNHome_setDynamicConfig:test_setDynamicConfig_DigestNotFound_reverts() (gas: 30186) +RMNHome_setDynamicConfig:test_setDynamicConfig_MinObserversTooHigh_reverts() (gas: 18854) +RMNHome_setDynamicConfig:test_setDynamicConfig_OnlyOwner_reverts() (gas: 14009) +RMNHome_setDynamicConfig:test_setDynamicConfig_success() (gas: 104862) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateOffchainPublicKey_reverts() (gas: 18850) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicatePeerId_reverts() (gas: 18710) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_DuplicateSourceChain_reverts() (gas: 20387) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_NotEnoughObservers_reverts() (gas: 21405) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsNodesLength_reverts() (gas: 137318) +RMNHome_validateStaticAndDynamicConfig:test_validateStaticAndDynamicConfig_OutOfBoundsObserverNodeIndex_reverts() (gas: 20522) RMNRemote_constructor:test_constructor() (gas: 8398) RMNRemote_curse:test_curse_AlreadyCursed_duplicateSubject_reverts() (gas: 154501) RMNRemote_curse:test_curse_calledByNonOwner_reverts() (gas: 18734) @@ -593,27 +593,27 @@ RMNRemote_verify_withConfigSet:test_verify_OutOfOrderSignatures_not_sorted_rever RMNRemote_verify_withConfigSet:test_verify_ThresholdNotMet_reverts() (gas: 304744) RMNRemote_verify_withConfigSet:test_verify_UnexpectedSigner_reverts() (gas: 428284) RMNRemote_verify_withConfigSet:test_verify_success() (gas: 86181) -RateLimiter_constructor:test_Constructor_Success() (gas: 22964) -RateLimiter_consume:test_AggregateValueMaxCapacityExceeded_Revert() (gas: 19839) -RateLimiter_consume:test_AggregateValueRateLimitReached_Revert() (gas: 28311) -RateLimiter_consume:test_ConsumeAggregateValue_Success() (gas: 39405) -RateLimiter_consume:test_ConsumeTokens_Success() (gas: 21919) -RateLimiter_consume:test_ConsumeUnlimited_Success() (gas: 57402) -RateLimiter_consume:test_ConsumingMoreThanUint128_Revert() (gas: 19531) -RateLimiter_consume:test_RateLimitReachedOverConsecutiveBlocks_Revert() (gas: 33020) -RateLimiter_consume:test_Refill_Success() (gas: 48170) -RateLimiter_consume:test_TokenMaxCapacityExceeded_Revert() (gas: 22450) -RateLimiter_consume:test_TokenRateLimitReached_Revert() (gas: 31168) -RateLimiter_currentTokenBucketState:test_CurrentTokenBucketState_Success() (gas: 49681) -RateLimiter_currentTokenBucketState:test_Refill_Success() (gas: 63750) -RateLimiter_setTokenBucketConfig:test_SetRateLimiterConfig_Success() (gas: 48144) -RegistryModuleOwnerCustom_constructor:test_constructor_Revert() (gas: 36866) -RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Revert() (gas: 24071) -RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Success() (gas: 139023) -RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Revert() (gas: 22539) -RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Success() (gas: 137363) -RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Revert() (gas: 22381) -RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Success() (gas: 137204) +RateLimiter_constructor:test_Constructor_Success() (gas: 19806) +RateLimiter_consume:test_AggregateValueMaxCapacityExceeded_Revert() (gas: 16042) +RateLimiter_consume:test_AggregateValueRateLimitReached_Revert() (gas: 22435) +RateLimiter_consume:test_ConsumeAggregateValue_Success() (gas: 31495) +RateLimiter_consume:test_ConsumeTokens_Success() (gas: 20403) +RateLimiter_consume:test_ConsumeUnlimited_Success() (gas: 40693) +RateLimiter_consume:test_ConsumingMoreThanUint128_Revert() (gas: 15800) +RateLimiter_consume:test_RateLimitReachedOverConsecutiveBlocks_Revert() (gas: 25781) +RateLimiter_consume:test_Refill_Success() (gas: 37447) +RateLimiter_consume:test_TokenMaxCapacityExceeded_Revert() (gas: 18388) +RateLimiter_consume:test_TokenRateLimitReached_Revert() (gas: 24930) +RateLimiter_currentTokenBucketState:test_CurrentTokenBucketState_Success() (gas: 38947) +RateLimiter_currentTokenBucketState:test_Refill_Success() (gas: 46852) +RateLimiter_setTokenBucketConfig:test_SetRateLimiterConfig_Success() (gas: 38509) +RegistryModuleOwnerCustom_constructor:test_constructor_Revert() (gas: 36107) +RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Revert() (gas: 20200) +RegistryModuleOwnerCustom_registerAccessControlDefaultAdmin:test_registerAccessControlDefaultAdmin_Success() (gas: 130631) +RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Revert() (gas: 19797) +RegistryModuleOwnerCustom_registerAdminViaGetCCIPAdmin:test_registerAdminViaGetCCIPAdmin_Success() (gas: 130126) +RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Revert() (gas: 19602) +RegistryModuleOwnerCustom_registerAdminViaOwner:test_registerAdminViaOwner_Success() (gas: 129930) Router_applyRampUpdates:test_OffRampMismatch_Revert() (gas: 89591) Router_applyRampUpdates:test_OffRampUpdatesWithRouting() (gas: 10750087) Router_applyRampUpdates:test_OnRampDisable() (gas: 56445) From decf834cfc2e72d21a909a40ac7630e1e80c1a8e Mon Sep 17 00:00:00 2001 From: Josh Date: Tue, 10 Dec 2024 11:18:32 -0500 Subject: [PATCH 7/7] Update test naming and comments --- contracts/gas-snapshots/ccip.gas-snapshot | 2 +- contracts/src/v0.8/ccip/rmn/RMNRemote.sol | 2 +- ...globalAndLegacyCurses.t.sol => RMNRemote.globalCurses.t.sol} | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename contracts/src/v0.8/ccip/test/rmn/RMNRemote/{RMNRemote.globalAndLegacyCurses.t.sol => RMNRemote.globalCurses.t.sol} (92%) diff --git a/contracts/gas-snapshots/ccip.gas-snapshot b/contracts/gas-snapshots/ccip.gas-snapshot index 7e2ab8222ad..fa768c40bb5 100644 --- a/contracts/gas-snapshots/ccip.gas-snapshot +++ b/contracts/gas-snapshots/ccip.gas-snapshot @@ -576,7 +576,7 @@ RMNRemote_constructor:test_constructor() (gas: 8398) RMNRemote_curse:test_curse_AlreadyCursed_duplicateSubject_reverts() (gas: 154501) RMNRemote_curse:test_curse_calledByNonOwner_reverts() (gas: 18734) RMNRemote_curse:test_curse_success() (gas: 149475) -RMNRemote_global_curses:test_global_curses_success() (gas: 71750) +RMNRemote_global_curses:test_isCursed_globalCurseSubject() (gas: 71715) RMNRemote_isBlessed:test_isBlessed() (gas: 17588) RMNRemote_setConfig:test_setConfig_ZeroValueNotAllowed_revert() (gas: 37971) RMNRemote_setConfig:test_setConfig_addSigner_removeSigner_success() (gas: 993448) diff --git a/contracts/src/v0.8/ccip/rmn/RMNRemote.sol b/contracts/src/v0.8/ccip/rmn/RMNRemote.sol index 087d0184310..83445193ad1 100644 --- a/contracts/src/v0.8/ccip/rmn/RMNRemote.sol +++ b/contracts/src/v0.8/ccip/rmn/RMNRemote.sol @@ -251,7 +251,7 @@ contract RMNRemote is Ownable2StepMsgSender, ITypeAndVersion, IRMNRemote, IRMN { /// @inheritdoc IRMNRemote function isCursed() external view override(IRMN, IRMNRemote) returns (bool) { // There are zero curses under normal circumstances, which means it's cheaper to check for the absence of curses. - // than to check the subject list twice, as we have to check for the global curse subjects. + // than to check the subject list for the global curse subject. if (s_cursedSubjects.length() == 0) { return false; } diff --git a/contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalAndLegacyCurses.t.sol b/contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalCurses.t.sol similarity index 92% rename from contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalAndLegacyCurses.t.sol rename to contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalCurses.t.sol index e955ac5bfac..6524e2545e5 100644 --- a/contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalAndLegacyCurses.t.sol +++ b/contracts/src/v0.8/ccip/test/rmn/RMNRemote/RMNRemote.globalCurses.t.sol @@ -5,7 +5,7 @@ import {GLOBAL_CURSE_SUBJECT} from "../../../rmn/RMNRemote.sol"; import {RMNRemoteSetup} from "./RMNRemoteSetup.t.sol"; contract RMNRemote_global_curses is RMNRemoteSetup { - function test_global_curses_success() public { + function test_isCursed_globalCurseSubject() public { bytes16 randSubject = bytes16(keccak256("random subject")); assertFalse(s_rmnRemote.isCursed()); assertFalse(s_rmnRemote.isCursed(randSubject));