Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] CCIP capability config contract #858

Merged
merged 40 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
1d3f59c
initial commit
makramkd May 15, 2024
ff6e8dd
add blue/green support
makramkd May 15, 2024
929d516
rudimentary test cases
makramkd May 15, 2024
c9d2133
add some more tests
makramkd May 15, 2024
1101773
basic config validation tests
makramkd May 16, 2024
8907bfc
more config tests
makramkd May 16, 2024
ef2bdd0
group by plugin tests
makramkd May 16, 2024
0443c46
more tests
makramkd May 16, 2024
addebe5
more tests
makramkd May 16, 2024
de4e4ce
more tests
makramkd May 16, 2024
88a6aa2
Merge branch 'ccip-develop' into ccip/cr-config-contract
makramkd May 27, 2024
7228752
more tests
makramkd May 27, 2024
4da32b0
more tests
makramkd May 28, 2024
a15d291
validate all new configs
makramkd May 28, 2024
6de0405
remove getAllOCRConfigs for now
makramkd May 28, 2024
0944c23
CR feedback
makramkd May 30, 2024
db6f3fc
CR Changes
makramkd May 30, 2024
ddf86b5
Merge branch 'ccip-develop' into ccip/cr-config-contract
makramkd May 30, 2024
4dff73d
address more cr comments
makramkd Jun 4, 2024
330c5e9
check transmitter length against fChain
makramkd Jun 4, 2024
f102053
offramp address in ocr3 config
makramkd Jun 5, 2024
906baeb
add chain selector to getAllChainConfigs return val
makramkd Jun 6, 2024
a76864b
offramp address to bytes32
makramkd Jun 6, 2024
cf2f337
add ocr config getter
makramkd Jun 6, 2024
8394f24
config digest prefix
makramkd Jun 7, 2024
b8d91ad
update digest prefix
makramkd Jun 10, 2024
82a1a50
some cr updates
makramkd Jun 11, 2024
7dd6b5c
Merge branch 'ccip-develop' into ccip/cr-config-contract
makramkd Jun 19, 2024
99179e5
simplify ocr config
makramkd Jun 20, 2024
9574d83
more cr comments
makramkd Jun 20, 2024
e5cd879
add missing validation
makramkd Jun 20, 2024
13e3723
fmt
makramkd Jun 20, 2024
ef33666
Merge branch 'ccip-develop' into ccip/cr-config-contract
makramkd Jun 20, 2024
a7aec01
more cr comments
makramkd Jun 20, 2024
a902d9b
Merge branch 'ccip-develop' into ccip/cr-config-contract
makramkd Jun 20, 2024
a7aac65
bytes32 -> bytes
makramkd Jun 20, 2024
049cc03
add bootstrap nodes to ocr config
makramkd Jun 20, 2024
ef97195
bytes32 -> bytes for offramp address
makramkd Jun 20, 2024
8111d24
gas optimizations, readability
makramkd Jun 21, 2024
9298f8a
Merge branch 'ccip-develop' into ccip/cr-config-contract
makramkd Jun 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions contracts/gas-snapshots/ccip.gas-snapshot
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,56 @@ BurnWithFromMintTokenPool_lockOrBurn:test_ChainNotAllowed_Revert() (gas: 28789)
BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurnRevertNotHealthy_Revert() (gas: 55208)
BurnWithFromMintTokenPool_lockOrBurn:test_PoolBurn_Success() (gas: 243659)
BurnWithFromMintTokenPool_lockOrBurn:test_Setup_Success() (gas: 24260)
CCIPCapabilityConfigurationSetup:test_getCapabilityConfiguration_Success() (gas: 9561)
CCIPCapabilityConfiguration_ConfigStateMachine:test__computeConfigDigest_Success() (gas: 70645)
CCIPCapabilityConfiguration_ConfigStateMachine:test__computeNewConfigWithMeta_InitToRunning_Success() (gas: 350565)
CCIPCapabilityConfiguration_ConfigStateMachine:test__computeNewConfigWithMeta_RunningToStaging_Success() (gas: 471510)
CCIPCapabilityConfiguration_ConfigStateMachine:test__computeNewConfigWithMeta_StagingToRunning_Success() (gas: 440232)
CCIPCapabilityConfiguration_ConfigStateMachine:test__groupByPluginType_TooManyOCR3Configs_Reverts() (gas: 37027)
CCIPCapabilityConfiguration_ConfigStateMachine:test__groupByPluginType_threeCommitConfigs_Reverts() (gas: 61043)
CCIPCapabilityConfiguration_ConfigStateMachine:test__groupByPluginType_threeExecutionConfigs_Reverts() (gas: 60963)
CCIPCapabilityConfiguration_ConfigStateMachine:test__stateFromConfigLength_Success() (gas: 11764)
CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigStateTransition_Success() (gas: 9028)
CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_InitToRunning_Success() (gas: 303038)
CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_InitToRunning_WrongConfigCount_Reverts() (gas: 49619)
CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_NonExistentConfigTransition_Reverts() (gas: 32253)
CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_Success() (gas: 367516)
CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_WrongConfigCount_Reverts() (gas: 120877)
CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_RunningToStaging_WrongConfigDigestBlueGreen_Reverts() (gas: 156973)
CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_StagingToRunning_Success() (gas: 367292)
CCIPCapabilityConfiguration_ConfigStateMachine:test__validateConfigTransition_StagingToRunning_WrongConfigDigest_Reverts() (gas: 157040)
CCIPCapabilityConfiguration_ConfigStateMachine:test_getCapabilityConfiguration_Success() (gas: 9648)
CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_InitToRunning_Success() (gas: 1044432)
CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_InvalidConfigLength_Reverts() (gas: 27539)
CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_InvalidConfigStateTransition_Reverts() (gas: 23118)
CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_RunningToStaging_Success() (gas: 1992348)
CCIPCapabilityConfiguration__updatePluginConfig:test__updatePluginConfig_StagingToRunning_Success() (gas: 2595930)
CCIPCapabilityConfiguration__updatePluginConfig:test_getCapabilityConfiguration_Success() (gas: 9626)
CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_CommitAndExecConfig_Success() (gas: 1834017)
CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_CommitConfigOnly_Success() (gas: 1055344)
CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_ExecConfigOnly_Success() (gas: 1055375)
CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_OnlyCapabilityRegistryCanCall_Reverts() (gas: 9576)
CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_beforeCapabilityConfigSet_ZeroLengthConfig_Success() (gas: 16070)
CCIPCapabilityConfiguration_beforeCapabilityConfigSet:test_getCapabilityConfiguration_Success() (gas: 9626)
CCIPCapabilityConfiguration_chainConfig:test__applyChainConfigUpdates_FChainNotPositive_Reverts() (gas: 182909)
CCIPCapabilityConfiguration_chainConfig:test_applyChainConfigUpdates_addChainConfigs_Success() (gas: 342472)
CCIPCapabilityConfiguration_chainConfig:test_applyChainConfigUpdates_nodeNotInRegistry_Reverts() (gas: 19116)
CCIPCapabilityConfiguration_chainConfig:test_applyChainConfigUpdates_removeChainConfigs_Success() (gas: 266071)
CCIPCapabilityConfiguration_chainConfig:test_applyChainConfigUpdates_selectorNotFound_Reverts() (gas: 14807)
CCIPCapabilityConfiguration_chainConfig:test_getCapabilityConfiguration_Success() (gas: 9604)
CCIPCapabilityConfiguration_validateConfig:test__validateConfig_ChainSelectorNotFound_Reverts() (gas: 285383)
CCIPCapabilityConfiguration_validateConfig:test__validateConfig_ChainSelectorNotSet_Reverts() (gas: 282501)
CCIPCapabilityConfiguration_validateConfig:test__validateConfig_FMustBePositive_Reverts() (gas: 283422)
CCIPCapabilityConfiguration_validateConfig:test__validateConfig_FTooHigh_Reverts() (gas: 283588)
CCIPCapabilityConfiguration_validateConfig:test__validateConfig_NodeNotInRegistry_Reverts() (gas: 287815)
CCIPCapabilityConfiguration_validateConfig:test__validateConfig_NotEnoughTransmitters_Reverts() (gas: 1068544)
CCIPCapabilityConfiguration_validateConfig:test__validateConfig_OfframpAddressCannotBeZero_Reverts() (gas: 282309)
CCIPCapabilityConfiguration_validateConfig:test__validateConfig_P2PIdsLengthNotMatching_Reverts() (gas: 284277)
CCIPCapabilityConfiguration_validateConfig:test__validateConfig_Success() (gas: 289222)
CCIPCapabilityConfiguration_validateConfig:test__validateConfig_TooManyBootstrapP2PIds_Reverts() (gas: 285518)
CCIPCapabilityConfiguration_validateConfig:test__validateConfig_TooManySigners_Reverts() (gas: 1120660)
CCIPCapabilityConfiguration_validateConfig:test__validateConfig_TooManyTransmitters_Reverts() (gas: 1119000)
CCIPCapabilityConfiguration_validateConfig:test_getCapabilityConfiguration_Success() (gas: 9540)
CCIPClientExample_sanity:test_ImmutableExamples_Success() (gas: 2133850)
CommitStore_constructor:test_Constructor_Success() (gas: 3091440)
CommitStore_isUnpausedAndRMNHealthy:test_RMN_Success() (gas: 75331)
Expand Down
1 change: 1 addition & 0 deletions contracts/scripts/native_solc_compile_all_ccip
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ compileContract ccip/RMN.sol
compileContract ccip/ARMProxy.sol
compileContract ccip/tokenAdminRegistry/TokenAdminRegistry.sol
compileContract ccip/tokenAdminRegistry/RegistryModuleOwnerCustom.sol
compileContract ccip/capability/CCIPCapabilityConfiguration.sol
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I love Configuration for a contract name

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love it either, its super long and verbose, but they're called "capability configuration" contracts. Any other name suggestions?


# Test helpers
compileContract ccip/test/helpers/BurnMintERC677Helper.sol
Expand Down
Loading
Loading