Skip to content

Commit

Permalink
chore: wrappers and snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
elatoskinas committed Sep 12, 2024
1 parent 535a28e commit 0d6f63c
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 61 deletions.
111 changes: 59 additions & 52 deletions contracts/gas-snapshots/ccip.gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -37,26 +37,26 @@ BurnWithFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 23951)
CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2091438)
CCIPConfigSetup:test_getCapabilityConfiguration_Success() (gas: 9539)
CCIPConfig_ConfigStateMachine:test__computeConfigDigest_Success() (gas: 66000)
CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_InitToRunning_Success() (gas: 358041)
CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_RunningToStaging_Success() (gas: 474705)
CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_StagingToRunning_Success() (gas: 441908)
CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_InitToRunning_Success() (gas: 358959)
CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_RunningToStaging_Success() (gas: 476474)
CCIPConfig_ConfigStateMachine:test__computeNewConfigWithMeta_StagingToRunning_Success() (gas: 442826)
CCIPConfig_ConfigStateMachine:test__groupByPluginType_TooManyOCR3Configs_Reverts() (gas: 33848)
CCIPConfig_ConfigStateMachine:test__groupByPluginType_threeCommitConfigs_Reverts() (gas: 56914)
CCIPConfig_ConfigStateMachine:test__groupByPluginType_threeExecutionConfigs_Reverts() (gas: 56852)
CCIPConfig_ConfigStateMachine:test__stateFromConfigLength_Success() (gas: 11719)
CCIPConfig_ConfigStateMachine:test__validateConfigStateTransition_Success() (gas: 8849)
CCIPConfig_ConfigStateMachine:test__validateConfigTransition_InitToRunning_Success() (gas: 309722)
CCIPConfig_ConfigStateMachine:test__validateConfigTransition_InitToRunning_Success() (gas: 309789)
CCIPConfig_ConfigStateMachine:test__validateConfigTransition_InitToRunning_WrongConfigCount_Reverts() (gas: 45865)
CCIPConfig_ConfigStateMachine:test__validateConfigTransition_NonExistentConfigTransition_Reverts() (gas: 29690)
CCIPConfig_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_Success() (gas: 370009)
CCIPConfig_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_Success() (gas: 370076)
CCIPConfig_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_WrongConfigCount_Reverts() (gas: 111376)
CCIPConfig_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_WrongConfigDigestBlueGreen_Reverts() (gas: 145446)
CCIPConfig_ConfigStateMachine:test__validateConfigTransition_StagingToRunning_Success() (gas: 369785)
CCIPConfig_ConfigStateMachine:test__validateConfigTransition_StagingToRunning_Success() (gas: 369852)
CCIPConfig_ConfigStateMachine:test__validateConfigTransition_StagingToRunning_WrongConfigDigest_Reverts() (gas: 145513)
CCIPConfig_ConfigStateMachine:test_getCapabilityConfiguration_Success() (gas: 9627)
CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_CommitAndExecConfig_Success() (gas: 1790808)
CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_CommitConfigOnly_Success() (gas: 1038239)
CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_ExecConfigOnly_Success() (gas: 1038270)
CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_CommitAndExecConfig_Success() (gas: 1792577)
CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_CommitConfigOnly_Success() (gas: 1039157)
CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_ExecConfigOnly_Success() (gas: 1039188)
CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilitiesRegistryCanCall_Reverts() (gas: 9611)
CCIPConfig_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_ZeroLengthConfig_Success() (gas: 15996)
CCIPConfig_beforeCapabilityConfigSet:test_getCapabilityConfiguration_Success() (gas: 9627)
Expand All @@ -67,26 +67,30 @@ CCIPConfig_chainConfig:test_applyChainConfigUpdates_removeChainConfigs_Success()
CCIPConfig_chainConfig:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 14819)
CCIPConfig_chainConfig:test_getCapabilityConfiguration_Success() (gas: 9648)
CCIPConfig_chainConfig:test_getPaginatedCCIPConfigs_Success() (gas: 370293)
CCIPConfig_constructor:test_constructor_Success() (gas: 3363163)
CCIPConfig_constructor:test_constructor_Success() (gas: 3364563)
CCIPConfig_constructor:test_constructor_ZeroAddressNotAllowed_Revert() (gas: 61471)
CCIPConfig_updatePluginConfig:test__updatePluginConfig_InvalidConfigLength_Reverts() (gas: 25819)
CCIPConfig_updatePluginConfig:test__updatePluginConfig_InvalidConfigStateTransition_Reverts() (gas: 21913)
CCIPConfig_updatePluginConfig:test_getCapabilityConfiguration_Success() (gas: 9649)
CCIPConfig_updatePluginConfig:test_updatePluginConfig_InitToRunning_Success() (gas: 1087677)
CCIPConfig_updatePluginConfig:test_updatePluginConfig_RunningToStaging_Success() (gas: 2032286)
CCIPConfig_updatePluginConfig:test_updatePluginConfig_StagingToRunning_Success() (gas: 2032320)
CCIPConfig_validateConfig:test__validateConfig_ABIEncodedAddress_OfframpAddressCannotBeZero_Reverts() (gas: 290828)
CCIPConfig_validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 293559)
CCIPConfig_validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 290461)
CCIPConfig_validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 291668)
CCIPConfig_validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 291766)
CCIPConfig_validateConfig:test__validateConfig_NodeNotInRegistry_Reverts() (gas: 344947)
CCIPConfig_validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1208593)
CCIPConfig_validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 290544)
CCIPConfig_validateConfig:test__validateConfig_P2PIdsLengthNotMatching_Reverts() (gas: 292459)
CCIPConfig_validateConfig:test__validateConfig_Success() (gas: 299632)
CCIPConfig_validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 493084)
CCIPConfig_validateConfig:test_getCapabilityConfiguration_Success() (gas: 9606)
CCIPConfig_updatePluginConfig:test_updatePluginConfig_InitToRunning_Success() (gas: 1088595)
CCIPConfig_updatePluginConfig:test_updatePluginConfig_RunningToStaging_Success() (gas: 2034382)
CCIPConfig_updatePluginConfig:test_updatePluginConfig_StagingToRunning_Success() (gas: 2034416)
CCIPConfig_validateConfig:test__validateConfigLessTransmittersThanSigners_Success() (gas: 334727)
CCIPConfig_validateConfig:test__validateConfigSmallerFChain_Success() (gas: 470319)
CCIPConfig_validateConfig:test__validateConfig_ABIEncodedAddress_OfframpAddressCannotBeZero_Reverts() (gas: 291171)
CCIPConfig_validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 293905)
CCIPConfig_validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 290826)
CCIPConfig_validateConfig:test__validateConfig_FChainTooHigh_Reverts() (gas: 339498)
CCIPConfig_validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 291640)
CCIPConfig_validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 292976)
CCIPConfig_validateConfig:test__validateConfig_NodeNotInRegistry_Reverts() (gas: 346203)
CCIPConfig_validateConfig:test__validateConfig_NotEnoughTransmittersEmptyAddresses_Reverts() (gas: 308248)
CCIPConfig_validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1209756)
CCIPConfig_validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 290865)
CCIPConfig_validateConfig:test__validateConfig_P2PIdsLengthNotMatching_Reverts() (gas: 293693)
CCIPConfig_validateConfig:test__validateConfig_Success() (gas: 300892)
CCIPConfig_validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 494367)
CCIPConfig_validateConfig:test_getCapabilityConfiguration_Success() (gas: 9584)
CommitStore_constructor:test_Constructor_Success() (gas: 3013980)
CommitStore_isUnpausedAndRMNHealthy:test_RMN_Success() (gas: 73477)
CommitStore_report:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 28676)
Expand Down Expand Up @@ -530,21 +534,24 @@ MultiAggregateRateLimiter_updateRateLimitTokens:test_UpdateRateLimitTokens_Remov
MultiAggregateRateLimiter_updateRateLimitTokens:test_ZeroDestToken_Revert() (gas: 18279)
MultiAggregateRateLimiter_updateRateLimitTokens:test_ZeroSourceToken_Revert() (gas: 18208)
MultiOCR3Base_setOCR3Configs:test_FMustBePositive_Revert() (gas: 59255)
MultiOCR3Base_setOCR3Configs:test_FTooHigh_Revert() (gas: 43629)
MultiOCR3Base_setOCR3Configs:test_RepeatSignerAddress_Revert() (gas: 283636)
MultiOCR3Base_setOCR3Configs:test_RepeatTransmitterAddress_Revert() (gas: 422261)
MultiOCR3Base_setOCR3Configs:test_SetConfigIgnoreSigners_Success() (gas: 511281)
MultiOCR3Base_setOCR3Configs:test_SetConfigWithSigners_Success() (gas: 828440)
MultiOCR3Base_setOCR3Configs:test_SetConfigWithoutSigners_Success() (gas: 456886)
MultiOCR3Base_setOCR3Configs:test_FTooHigh_Revert() (gas: 44148)
MultiOCR3Base_setOCR3Configs:test_MoreTransmittersThanSigners_Revert() (gas: 104780)
MultiOCR3Base_setOCR3Configs:test_NoTransmitters_Revert() (gas: 18844)
MultiOCR3Base_setOCR3Configs:test_RepeatSignerAddress_Revert() (gas: 283694)
MultiOCR3Base_setOCR3Configs:test_RepeatTransmitterAddress_Revert() (gas: 422319)
MultiOCR3Base_setOCR3Configs:test_SetConfigIgnoreSigners_Success() (gas: 511285)
MultiOCR3Base_setOCR3Configs:test_SetConfigWithSignersMismatchingTransmitters_Success() (gas: 679921)
MultiOCR3Base_setOCR3Configs:test_SetConfigWithSigners_Success() (gas: 828498)
MultiOCR3Base_setOCR3Configs:test_SetConfigWithoutSigners_Success() (gas: 456890)
MultiOCR3Base_setOCR3Configs:test_SetConfigsZeroInput_Success() (gas: 12382)
MultiOCR3Base_setOCR3Configs:test_SetMultipleConfigs_Success() (gas: 2140159)
MultiOCR3Base_setOCR3Configs:test_SignerCannotBeZeroAddress_Revert() (gas: 141717)
MultiOCR3Base_setOCR3Configs:test_StaticConfigChange_Revert() (gas: 807340)
MultiOCR3Base_setOCR3Configs:test_TooManySigners_Revert() (gas: 158799)
MultiOCR3Base_setOCR3Configs:test_SetMultipleConfigs_Success() (gas: 2140311)
MultiOCR3Base_setOCR3Configs:test_SignerCannotBeZeroAddress_Revert() (gas: 141775)
MultiOCR3Base_setOCR3Configs:test_StaticConfigChange_Revert() (gas: 807464)
MultiOCR3Base_setOCR3Configs:test_TooManySigners_Revert() (gas: 158825)
MultiOCR3Base_setOCR3Configs:test_TooManyTransmitters_Revert() (gas: 112293)
MultiOCR3Base_setOCR3Configs:test_TransmitterCannotBeZeroAddress_Revert() (gas: 254083)
MultiOCR3Base_setOCR3Configs:test_UpdateConfigSigners_Success() (gas: 860224)
MultiOCR3Base_setOCR3Configs:test_UpdateConfigTransmittersWithoutSigners_Success() (gas: 475193)
MultiOCR3Base_setOCR3Configs:test_TransmitterCannotBeZeroAddress_Revert() (gas: 254141)
MultiOCR3Base_setOCR3Configs:test_UpdateConfigSigners_Success() (gas: 860299)
MultiOCR3Base_setOCR3Configs:test_UpdateConfigTransmittersWithoutSigners_Success() (gas: 475235)
MultiOCR3Base_transmit:test_ConfigDigestMismatch_Revert() (gas: 42845)
MultiOCR3Base_transmit:test_ForkedChain_Revert() (gas: 48450)
MultiOCR3Base_transmit:test_InsufficientSignatures_Revert() (gas: 76928)
Expand Down Expand Up @@ -608,7 +615,7 @@ OCR2Base_transmit:test_Transmit2SignersSuccess_gas() (gas: 51689)
OCR2Base_transmit:test_UnAuthorizedTransmitter_Revert() (gas: 23499)
OCR2Base_transmit:test_UnauthorizedSigner_Revert() (gas: 39695)
OCR2Base_transmit:test_WrongNumberOfSignatures_Revert() (gas: 20572)
OffRamp_afterOC3ConfigSet:test_afterOCR3ConfigSet_SignatureVerificationDisabled_Revert() (gas: 6056933)
OffRamp_afterOC3ConfigSet:test_afterOCR3ConfigSet_SignatureVerificationDisabled_Revert() (gas: 6071998)
OffRamp_applySourceChainConfigUpdates:test_AddMultipleChains_Success() (gas: 468074)
OffRamp_applySourceChainConfigUpdates:test_AddNewChain_Success() (gas: 99238)
OffRamp_applySourceChainConfigUpdates:test_ApplyZeroUpdates_Success() (gas: 12414)
Expand All @@ -630,12 +637,12 @@ OffRamp_commit:test_FailedRMNVerification_Reverts() (gas: 64420)
OffRamp_commit:test_InvalidIntervalMinLargerThanMax_Revert() (gas: 67632)
OffRamp_commit:test_InvalidInterval_Revert() (gas: 59886)
OffRamp_commit:test_InvalidRootRevert() (gas: 58921)
OffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6661100)
OffRamp_commit:test_NoConfig_Revert() (gas: 6244915)
OffRamp_commit:test_NoConfigWithOtherConfigPresent_Revert() (gas: 6676165)
OffRamp_commit:test_NoConfig_Revert() (gas: 6259954)
OffRamp_commit:test_OnlyGasPriceUpdates_Success() (gas: 112473)
OffRamp_commit:test_OnlyPriceUpdateStaleReport_Revert() (gas: 120501)
OffRamp_commit:test_OnlyTokenPriceUpdates_Success() (gas: 112494)
OffRamp_commit:test_PriceSequenceNumberCleared_Success() (gas: 353540)
OffRamp_commit:test_PriceSequenceNumberCleared_Success() (gas: 353624)
OffRamp_commit:test_ReportAndPriceUpdate_Success() (gas: 164945)
OffRamp_commit:test_ReportOnlyRootSuccess_gas() (gas: 139934)
OffRamp_commit:test_RootAlreadyCommitted_Revert() (gas: 141925)
Expand All @@ -645,23 +652,23 @@ OffRamp_commit:test_UnauthorizedTransmitter_Revert() (gas: 121451)
OffRamp_commit:test_Unhealthy_Revert() (gas: 57938)
OffRamp_commit:test_ValidPriceUpdateThenStaleReportWithRoot_Success() (gas: 206779)
OffRamp_commit:test_ZeroEpochAndRound_Revert() (gas: 51273)
OffRamp_constructor:test_Constructor_Success() (gas: 6244332)
OffRamp_constructor:test_SourceChainSelector_Revert() (gas: 136075)
OffRamp_constructor:test_ZeroChainSelector_Revert() (gas: 103518)
OffRamp_constructor:test_ZeroNonceManager_Revert() (gas: 101418)
OffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 138723)
OffRamp_constructor:test_ZeroRMNRemote_Revert() (gas: 101338)
OffRamp_constructor:test_ZeroTokenAdminRegistry_Revert() (gas: 101376)
OffRamp_constructor:test_Constructor_Success() (gas: 6259397)
OffRamp_constructor:test_SourceChainSelector_Revert() (gas: 136095)
OffRamp_constructor:test_ZeroChainSelector_Revert() (gas: 103537)
OffRamp_constructor:test_ZeroNonceManager_Revert() (gas: 101437)
OffRamp_constructor:test_ZeroOnRampAddress_Revert() (gas: 138742)
OffRamp_constructor:test_ZeroRMNRemote_Revert() (gas: 101357)
OffRamp_constructor:test_ZeroTokenAdminRegistry_Revert() (gas: 101395)
OffRamp_execute:test_IncorrectArrayType_Revert() (gas: 17505)
OffRamp_execute:test_LargeBatch_Success() (gas: 3391111)
OffRamp_execute:test_MultipleReportsWithPartialValidationFailures_Success() (gas: 372353)
OffRamp_execute:test_MultipleReports_Success() (gas: 299779)
OffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 7069102)
OffRamp_execute:test_NoConfig_Revert() (gas: 6293902)
OffRamp_execute:test_NoConfigWithOtherConfigPresent_Revert() (gas: 7084199)
OffRamp_execute:test_NoConfig_Revert() (gas: 6308941)
OffRamp_execute:test_NonArray_Revert() (gas: 27787)
OffRamp_execute:test_SingleReport_Success() (gas: 175730)
OffRamp_execute:test_UnauthorizedTransmitter_Revert() (gas: 147970)
OffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 7071845)
OffRamp_execute:test_WrongConfigWithSigners_Revert() (gas: 7086942)
OffRamp_execute:test_ZeroReports_Revert() (gas: 17227)
OffRamp_executeSingleMessage:test_MessageSender_Revert() (gas: 18682)
OffRamp_executeSingleMessage:test_NonContractWithTokens_Success() (gas: 247849)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ library CCIPConfigTypes {
}

/// @notice OCR3 configuration.
/// Note that F >= fChain, since F represents the role DON, and fChain represents committees.
/// Note that F >= fChain, since F represents the role DON, and fChain represents sub-committees.
/// F values are typically identical across multiple OCR3 configs since the chains pertain to one role DON,
/// but F values can change across OCR3 configs to indicate role DON splits.
struct OCR3Config {
Expand All @@ -43,7 +43,7 @@ library CCIPConfigTypes {
// len(p2pIds) == len(signers) == len(transmitters) >= 3 * F + 1
// NOTE: indexes matter here! The p2p ID at index i corresponds to the signer at index i and the transmitter at index i.
// This is crucial in order to build the oracle ID <-> peer ID mapping offchain.
// Transmitters can be set to 0-bytes to represent that a node is a signer but not a transmitter (since len(signers) >= len(transmitters))
// Transmitters can be set to 0-bytes to represent that a node is a signer but not a transmitter
bytes32[] p2pIds; // The P2P IDs of the oracles that are part of the role DON.
bytes[] signers; // The onchain signing keys of nodes in the don.
bytes[] transmitters; // The onchain transmitter keys of nodes in the don.
Expand Down
1 change: 1 addition & 0 deletions contracts/src/v0.8/ccip/ocr/MultiOCR3Base.sol
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ abstract contract MultiOCR3Base is ITypeAndVersion, OwnerIsCreator {
/// @param ocrConfigArgs OCR config update args.
/// @dev precondition number of transmitters should match the expected F/fChain relationship.
/// For transmitters, the function only validates that len(transmitters) > 0 && len(transmitters) <= MAX_NUM_ORACLES
/// && len(transmitters) <= len(signers) [if sig verification is enabled]
function setOCR3Configs(OCRConfigArgs[] memory ocrConfigArgs) external onlyOwner {
for (uint256 i; i < ocrConfigArgs.length; ++i) {
_setOCR3Config(ocrConfigArgs[i]);
Expand Down
Loading

0 comments on commit 0d6f63c

Please sign in to comment.