Skip to content

Commit

Permalink
Gas golf for manual exec (#1262)
Browse files Browse the repository at this point in the history
## Motivation


## Solution
  • Loading branch information
RensR authored Aug 6, 2024
1 parent c4d19cc commit cd3c1a2
Show file tree
Hide file tree
Showing 7 changed files with 110 additions and 113 deletions.
172 changes: 86 additions & 86 deletions contracts/gas-snapshots/ccip.gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ CommitStore_verify:test_Paused_Revert() (gas: 18496)
CommitStore_verify:test_TooManyLeaves_Revert() (gas: 36785)
DefensiveExampleTest:test_HappyPath_Success() (gas: 200018)
DefensiveExampleTest:test_Recovery() (gas: 424253)
E2E:test_E2E_3MessagesSuccess_gas() (gas: 1112902)
E2E:test_E2E_3MessagesSuccess_gas() (gas: 1112564)
EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_NotACompatiblePool_Revert() (gas: 38157)
EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_Success() (gas: 108321)
EVM2EVMMultiOffRamp__releaseOrMintSingleToken:test__releaseOrMintSingleToken_TokenHandlingError_revert_Revert() (gas: 116789)
Expand Down Expand Up @@ -290,85 +290,85 @@ EVM2EVMMultiOnRamp_setDynamicConfig:test_SetConfigInvalidConfig_Revert() (gas: 1
EVM2EVMMultiOnRamp_setDynamicConfig:test_SetConfigOnlyOwner_Revert() (gas: 16287)
EVM2EVMMultiOnRamp_setDynamicConfig:test_SetDynamicConfig_Success() (gas: 58439)
EVM2EVMMultiOnRamp_withdrawFeeTokens:test_WithdrawFeeTokens_Success() (gas: 97185)
EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_NotACompatiblePool_Revert() (gas: 38253)
EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_Success() (gas: 106262)
EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_TokenHandlingError_revert_Revert() (gas: 114740)
EVM2EVMOffRamp__releaseOrMintTokens:test_OverValueWithARLOff_Success() (gas: 393707)
EVM2EVMOffRamp__releaseOrMintTokens:test_PriceNotFoundForToken_Reverts() (gas: 146343)
EVM2EVMOffRamp__releaseOrMintTokens:test_RateLimitErrors_Reverts() (gas: 793261)
EVM2EVMOffRamp__releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 177282)
EVM2EVMOffRamp__releaseOrMintTokens:test__releaseOrMintTokens_NotACompatiblePool_Reverts() (gas: 30601)
EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 62459)
EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidEVMAddress_Revert() (gas: 45676)
EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 215233)
EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 307795)
EVM2EVMOffRamp__report:test_Report_Success() (gas: 128212)
EVM2EVMOffRamp__trialExecute:test_RateLimitError_Success() (gas: 256721)
EVM2EVMOffRamp__trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 265312)
EVM2EVMOffRamp__trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 340341)
EVM2EVMOffRamp__trialExecute:test_trialExecute_Success() (gas: 316387)
EVM2EVMOffRamp_ccipReceive:test_Reverts() (gas: 17009)
EVM2EVMOffRamp_constructor:test_CommitStoreAlreadyInUse_Revert() (gas: 153250)
EVM2EVMOffRamp_constructor:test_Constructor_Success() (gas: 5339229)
EVM2EVMOffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 143984)
EVM2EVMOffRamp_execute:test_EmptyReport_Revert() (gas: 21340)
EVM2EVMOffRamp_execute:test_InvalidMessageId_Revert() (gas: 36529)
EVM2EVMOffRamp_execute:test_InvalidSourceChain_Revert() (gas: 51802)
EVM2EVMOffRamp_execute:test_InvalidSourcePoolAddress_Success() (gas: 474694)
EVM2EVMOffRamp_execute:test_ManualExecutionNotYetEnabled_Revert() (gas: 47673)
EVM2EVMOffRamp_execute:test_MessageTooLarge_Revert() (gas: 152563)
EVM2EVMOffRamp_execute:test_Paused_Revert() (gas: 102736)
EVM2EVMOffRamp_execute:test_ReceiverError_Success() (gas: 165602)
EVM2EVMOffRamp_execute:test_RetryFailedMessageWithoutManualExecution_Success() (gas: 180030)
EVM2EVMOffRamp_execute:test_RootNotCommitted_Revert() (gas: 42529)
EVM2EVMOffRamp_execute:test_SingleMessageNoTokensUnordered_Success() (gas: 160937)
EVM2EVMOffRamp_execute:test_SingleMessageNoTokens_Success() (gas: 176106)
EVM2EVMOffRamp_execute:test_SingleMessageToNonCCIPReceiver_Success() (gas: 249390)
EVM2EVMOffRamp_execute:test_SingleMessagesNoTokensSuccess_gas() (gas: 115772)
EVM2EVMOffRamp_execute:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 411709)
EVM2EVMOffRamp_execute:test_SkippedIncorrectNonce_Success() (gas: 54299)
EVM2EVMOffRamp_execute:test_StrictUntouchedToSuccess_Success() (gas: 132842)
EVM2EVMOffRamp_execute:test_TokenDataMismatch_Revert() (gas: 52244)
EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensAndGE_Success() (gas: 567326)
EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensSuccess_gas() (gas: 501893)
EVM2EVMOffRamp_execute:test_UnexpectedTokenData_Revert() (gas: 35518)
EVM2EVMOffRamp_execute:test_Unhealthy_Revert() (gas: 550938)
EVM2EVMOffRamp_execute:test_UnsupportedNumberOfTokens_Revert() (gas: 64176)
EVM2EVMOffRamp_execute:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 124075)
EVM2EVMOffRamp_execute:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 144241)
EVM2EVMOffRamp_execute:test_execute_RouterYULCall_Success() (gas: 429003)
EVM2EVMOffRamp_executeSingleMessage:test_MessageSender_Revert() (gas: 21290)
EVM2EVMOffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 283068)
EVM2EVMOffRamp_executeSingleMessage:test_NonContract_Success() (gas: 20919)
EVM2EVMOffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 220503)
EVM2EVMOffRamp_executeSingleMessage:test_ZeroGasDONExecution_Revert() (gas: 49340)
EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens_Success() (gas: 48808)
EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 318084)
EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_ZeroGasZeroData_Success() (gas: 73870)
EVM2EVMOffRamp_execute_upgrade:test_V2NonceNewSenderStartsAtZero_Success() (gas: 232864)
EVM2EVMOffRamp_execute_upgrade:test_V2NonceStartsAtV1Nonce_Success() (gas: 282196)
EVM2EVMOffRamp_execute_upgrade:test_V2OffRampNonceSkipsIfMsgInFlight_Success() (gas: 262818)
EVM2EVMOffRamp_execute_upgrade:test_V2SenderNoncesReadsPreviousRamp_Success() (gas: 231770)
EVM2EVMOffRamp_execute_upgrade:test_V2_Success() (gas: 132429)
EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_NotACompatiblePool_Revert() (gas: 38147)
EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_Success() (gas: 106186)
EVM2EVMOffRamp__releaseOrMintToken:test__releaseOrMintToken_TokenHandlingError_revert_Revert() (gas: 114669)
EVM2EVMOffRamp__releaseOrMintTokens:test_OverValueWithARLOff_Success() (gas: 393688)
EVM2EVMOffRamp__releaseOrMintTokens:test_PriceNotFoundForToken_Reverts() (gas: 146300)
EVM2EVMOffRamp__releaseOrMintTokens:test_RateLimitErrors_Reverts() (gas: 792936)
EVM2EVMOffRamp__releaseOrMintTokens:test_TokenHandlingError_Reverts() (gas: 177217)
EVM2EVMOffRamp__releaseOrMintTokens:test__releaseOrMintTokens_NotACompatiblePool_Reverts() (gas: 30579)
EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidDataLengthReturnData_Revert() (gas: 62395)
EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_InvalidEVMAddress_Revert() (gas: 45654)
EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_Success() (gas: 215189)
EVM2EVMOffRamp__releaseOrMintTokens:test_releaseOrMintTokens_destDenominatedDecimals_Success() (gas: 307760)
EVM2EVMOffRamp__report:test_Report_Success() (gas: 128098)
EVM2EVMOffRamp__trialExecute:test_RateLimitError_Success() (gas: 256634)
EVM2EVMOffRamp__trialExecute:test_TokenHandlingErrorIsCaught_Success() (gas: 265225)
EVM2EVMOffRamp__trialExecute:test_TokenPoolIsNotAContract_Success() (gas: 340187)
EVM2EVMOffRamp__trialExecute:test_trialExecute_Success() (gas: 316321)
EVM2EVMOffRamp_ccipReceive:test_Reverts() (gas: 16987)
EVM2EVMOffRamp_constructor:test_CommitStoreAlreadyInUse_Revert() (gas: 153241)
EVM2EVMOffRamp_constructor:test_Constructor_Success() (gas: 5335554)
EVM2EVMOffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 143975)
EVM2EVMOffRamp_execute:test_EmptyReport_Revert() (gas: 21318)
EVM2EVMOffRamp_execute:test_InvalidMessageId_Revert() (gas: 36507)
EVM2EVMOffRamp_execute:test_InvalidSourceChain_Revert() (gas: 51692)
EVM2EVMOffRamp_execute:test_InvalidSourcePoolAddress_Success() (gas: 474394)
EVM2EVMOffRamp_execute:test_ManualExecutionNotYetEnabled_Revert() (gas: 47651)
EVM2EVMOffRamp_execute:test_MessageTooLarge_Revert() (gas: 152453)
EVM2EVMOffRamp_execute:test_Paused_Revert() (gas: 102714)
EVM2EVMOffRamp_execute:test_ReceiverError_Success() (gas: 165422)
EVM2EVMOffRamp_execute:test_RetryFailedMessageWithoutManualExecution_Success() (gas: 179806)
EVM2EVMOffRamp_execute:test_RootNotCommitted_Revert() (gas: 42507)
EVM2EVMOffRamp_execute:test_SingleMessageNoTokensUnordered_Success() (gas: 160577)
EVM2EVMOffRamp_execute:test_SingleMessageNoTokens_Success() (gas: 175812)
EVM2EVMOffRamp_execute:test_SingleMessageToNonCCIPReceiver_Success() (gas: 249254)
EVM2EVMOffRamp_execute:test_SingleMessagesNoTokensSuccess_gas() (gas: 115658)
EVM2EVMOffRamp_execute:test_SkippedIncorrectNonceStillExecutes_Success() (gas: 411499)
EVM2EVMOffRamp_execute:test_SkippedIncorrectNonce_Success() (gas: 54189)
EVM2EVMOffRamp_execute:test_StrictUntouchedToSuccess_Success() (gas: 132662)
EVM2EVMOffRamp_execute:test_TokenDataMismatch_Revert() (gas: 52156)
EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensAndGE_Success() (gas: 567248)
EVM2EVMOffRamp_execute:test_TwoMessagesWithTokensSuccess_gas() (gas: 501657)
EVM2EVMOffRamp_execute:test_UnexpectedTokenData_Revert() (gas: 35496)
EVM2EVMOffRamp_execute:test_Unhealthy_Revert() (gas: 550680)
EVM2EVMOffRamp_execute:test_UnsupportedNumberOfTokens_Revert() (gas: 64066)
EVM2EVMOffRamp_execute:test__execute_SkippedAlreadyExecutedMessageUnordered_Success() (gas: 123903)
EVM2EVMOffRamp_execute:test__execute_SkippedAlreadyExecutedMessage_Success() (gas: 144091)
EVM2EVMOffRamp_execute:test_execute_RouterYULCall_Success() (gas: 428867)
EVM2EVMOffRamp_executeSingleMessage:test_MessageSender_Revert() (gas: 21268)
EVM2EVMOffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 283024)
EVM2EVMOffRamp_executeSingleMessage:test_NonContract_Success() (gas: 20897)
EVM2EVMOffRamp_executeSingleMessage:test_TokenHandlingError_Revert() (gas: 220438)
EVM2EVMOffRamp_executeSingleMessage:test_ZeroGasDONExecution_Revert() (gas: 49318)
EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_NoTokens_Success() (gas: 48786)
EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_WithTokens_Success() (gas: 318040)
EVM2EVMOffRamp_executeSingleMessage:test_executeSingleMessage_ZeroGasZeroData_Success() (gas: 73826)
EVM2EVMOffRamp_execute_upgrade:test_V2NonceNewSenderStartsAtZero_Success() (gas: 232527)
EVM2EVMOffRamp_execute_upgrade:test_V2NonceStartsAtV1Nonce_Success() (gas: 281657)
EVM2EVMOffRamp_execute_upgrade:test_V2OffRampNonceSkipsIfMsgInFlight_Success() (gas: 262239)
EVM2EVMOffRamp_execute_upgrade:test_V2SenderNoncesReadsPreviousRamp_Success() (gas: 231186)
EVM2EVMOffRamp_execute_upgrade:test_V2_Success() (gas: 132294)
EVM2EVMOffRamp_getAllRateLimitTokens:test_GetAllRateLimitTokens_Success() (gas: 38446)
EVM2EVMOffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3246952)
EVM2EVMOffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 82871)
EVM2EVMOffRamp_manuallyExecute:test_LowGasLimitManualExec_Success() (gas: 485626)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecFailedTx_Revert() (gas: 188746)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecForkedChain_Revert() (gas: 26991)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecGasLimitMismatch_Revert() (gas: 45246)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecInvalidGasLimit_Revert() (gas: 27179)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithGasOverride_Success() (gas: 192546)
EVM2EVMOffRamp_manuallyExecute:test_ManualExec_Success() (gas: 190249)
EVM2EVMOffRamp_manuallyExecute:test_ReentrancyManualExecuteFails_Success() (gas: 2062897)
EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 145382)
EVM2EVMOffRamp_metadataHash:test_MetadataHash_Success() (gas: 8882)
EVM2EVMOffRamp_setDynamicConfig:test_NonOwner_Revert() (gas: 40153)
EVM2EVMOffRamp_setDynamicConfig:test_RouterZeroAddress_Revert() (gas: 38236)
EVM2EVMOffRamp_setDynamicConfig:test_SetDynamicConfig_Success() (gas: 142050)
EVM2EVMOffRamp_updateRateLimitTokens:test_updateRateLimitTokens_AddsAndRemoves_Success() (gas: 162488)
EVM2EVMOffRamp_updateRateLimitTokens:test_updateRateLimitTokens_NonOwner_Revert() (gas: 16667)
EVM2EVMOffRamp_updateRateLimitTokens:test_updateRateLimitTokens_Success() (gas: 197698)
EVM2EVMOffRamp_getExecutionState:test_FillExecutionState_Success() (gas: 3213556)
EVM2EVMOffRamp_getExecutionState:test_GetExecutionState_Success() (gas: 83091)
EVM2EVMOffRamp_manuallyExecute:test_LowGasLimitManualExec_Success() (gas: 485534)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecFailedTx_Revert() (gas: 188654)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecForkedChain_Revert() (gas: 27057)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecGasLimitMismatch_Revert() (gas: 45444)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecInvalidGasLimit_Revert() (gas: 27245)
EVM2EVMOffRamp_manuallyExecute:test_ManualExecWithGasOverride_Success() (gas: 192524)
EVM2EVMOffRamp_manuallyExecute:test_ManualExec_Success() (gas: 190157)
EVM2EVMOffRamp_manuallyExecute:test_ReentrancyManualExecuteFails_Success() (gas: 2062971)
EVM2EVMOffRamp_manuallyExecute:test_manuallyExecute_DoesNotRevertIfUntouched_Success() (gas: 145360)
EVM2EVMOffRamp_metadataHash:test_MetadataHash_Success() (gas: 8860)
EVM2EVMOffRamp_setDynamicConfig:test_NonOwner_Revert() (gas: 40131)
EVM2EVMOffRamp_setDynamicConfig:test_RouterZeroAddress_Revert() (gas: 38214)
EVM2EVMOffRamp_setDynamicConfig:test_SetDynamicConfig_Success() (gas: 141984)
EVM2EVMOffRamp_updateRateLimitTokens:test_updateRateLimitTokens_AddsAndRemoves_Success() (gas: 162596)
EVM2EVMOffRamp_updateRateLimitTokens:test_updateRateLimitTokens_NonOwner_Revert() (gas: 16734)
EVM2EVMOffRamp_updateRateLimitTokens:test_updateRateLimitTokens_Success() (gas: 197765)
EVM2EVMOnRamp_constructor:test_Constructor_Success() (gas: 5579769)
EVM2EVMOnRamp_forwardFromRouter:test_CannotSendZeroTokens_Revert() (gas: 35778)
EVM2EVMOnRamp_forwardFromRouter:test_EnforceOutOfOrder_Revert() (gas: 98428)
Expand Down Expand Up @@ -600,13 +600,13 @@ NonceManager_NonceIncrementation:test_getIncrementedOutboundNonce_Success() (gas
NonceManager_NonceIncrementation:test_incrementInboundNonce_Skip() (gas: 23694)
NonceManager_NonceIncrementation:test_incrementInboundNonce_Success() (gas: 38763)
NonceManager_NonceIncrementation:test_incrementNoncesInboundAndOutbound_Success() (gas: 71847)
NonceManager_OffRampUpgrade:test_NoPrevOffRampForChain_Success() (gas: 253259)
NonceManager_OffRampUpgrade:test_UpgradedNonceNewSenderStartsAtZero_Success() (gas: 255559)
NonceManager_OffRampUpgrade:test_UpgradedNonceStartsAtV1Nonce_Success() (gas: 308529)
NonceManager_OffRampUpgrade:test_UpgradedOffRampNonceSkipsIfMsgInFlight_Success() (gas: 291650)
NonceManager_OffRampUpgrade:test_UpgradedSenderNoncesReadsPreviousRampTransitive_Success() (gas: 250348)
NonceManager_OffRampUpgrade:test_UpgradedSenderNoncesReadsPreviousRamp_Success() (gas: 238382)
NonceManager_OffRampUpgrade:test_Upgraded_Success() (gas: 144725)
NonceManager_OffRampUpgrade:test_NoPrevOffRampForChain_Success() (gas: 253145)
NonceManager_OffRampUpgrade:test_UpgradedNonceNewSenderStartsAtZero_Success() (gas: 255401)
NonceManager_OffRampUpgrade:test_UpgradedNonceStartsAtV1Nonce_Success() (gas: 308349)
NonceManager_OffRampUpgrade:test_UpgradedOffRampNonceSkipsIfMsgInFlight_Success() (gas: 291404)
NonceManager_OffRampUpgrade:test_UpgradedSenderNoncesReadsPreviousRampTransitive_Success() (gas: 249764)
NonceManager_OffRampUpgrade:test_UpgradedSenderNoncesReadsPreviousRamp_Success() (gas: 237886)
NonceManager_OffRampUpgrade:test_Upgraded_Success() (gas: 144703)
NonceManager_OnRampUpgrade:test_UpgradeNonceNewSenderStartsAtZero_Success() (gas: 186694)
NonceManager_OnRampUpgrade:test_UpgradeNonceStartsAtV1Nonce_Success() (gas: 237762)
NonceManager_OnRampUpgrade:test_UpgradeSenderNoncesReadsPreviousRamp_Success() (gas: 125070)
Expand Down
2 changes: 1 addition & 1 deletion contracts/scripts/native_solc_compile_all_ccip
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ OPTIMIZE_RUNS_MULTI_OFFRAMP=2500


SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
python3 -m pip install --require-hashes -r "$SCRIPTPATH"/requirements.txt
#python3 -m pip install --require-hashes -r "$SCRIPTPATH"/requirements.txt
solc-select install $SOLC_VERSION
solc-select use $SOLC_VERSION
export SOLC_VERSION=$SOLC_VERSION
Expand Down
Loading

0 comments on commit cd3c1a2

Please sign in to comment.