diff --git a/core/capabilities/ccip/oraclecreator/bootstrap.go b/core/capabilities/ccip/oraclecreator/bootstrap.go index 5e4331197d0..d0b4bccc353 100644 --- a/core/capabilities/ccip/oraclecreator/bootstrap.go +++ b/core/capabilities/ccip/oraclecreator/bootstrap.go @@ -26,7 +26,7 @@ import ( ccipreaderpkg "github.com/smartcontractkit/chainlink-ccip/pkg/reader" cciptypes "github.com/smartcontractkit/chainlink-ccip/pkg/types/ccipocr3" - "github.com/smartcontractkit/chainlink-ccip/commit/merkleroot/rmn" + "github.com/smartcontractkit/chainlink-ccip/pkg/peergroup" "github.com/smartcontractkit/chainlink-common/pkg/types" "github.com/smartcontractkit/chainlink/v2/core/capabilities/ccip/ocrimpls" @@ -230,7 +230,7 @@ func (i *bootstrapOracleCreator) getRmnHomeReader(ctx context.Context, config cc type peerGroupDialer struct { lggr logger.Logger - peerGroupFactory rmn.PeerGroupFactory + peerGroupCreator *peergroup.Creator rmnHomeReader ccipreaderpkg.RMNHome // common oracle config @@ -238,7 +238,7 @@ type peerGroupDialer struct { oraclePeerIDs []ragep2ptypes.PeerID commitConfigDigest [32]byte - activePeerGroups []rmn.PeerGroup + activePeerGroups []peergroup.PeerGroup activeConfigDigests []cciptypes.Bytes32 syncInterval time.Duration @@ -261,7 +261,7 @@ const ( func newPeerGroupDialer( lggr logger.Logger, - peerGroupFactory rmn.PeerGroupFactory, + peerGroupFactory peergroup.PeerGroupFactory, rmnHomeReader ccipreaderpkg.RMNHome, bootstrapLocators []commontypes.BootstrapperLocator, oraclePeerIDs []ragep2ptypes.PeerID, @@ -270,14 +270,14 @@ func newPeerGroupDialer( return &peerGroupDialer{ lggr: lggr, - peerGroupFactory: peerGroupFactory, + peerGroupCreator: peergroup.NewCreator(lggr, peerGroupFactory, bootstrapLocators), rmnHomeReader: rmnHomeReader, bootstrapLocators: bootstrapLocators, oraclePeerIDs: oraclePeerIDs, commitConfigDigest: commitConfigDigest, - activePeerGroups: []rmn.PeerGroup{}, + activePeerGroups: []peergroup.PeerGroup{}, syncInterval: 12 * time.Second, // todo: make it configurable @@ -444,17 +444,18 @@ func (d *peerGroupDialer) createPeerGroup(rmnHomeConfigDigest cciptypes.Bytes32) ) lggr.Infow("Creating new peer group") - peerGroup, err := d.peerGroupFactory.NewPeerGroup( - [32]byte(genericEndpointConfigDigest), - peerIDs, - d.bootstrapLocators, - ) + peerGroup, err := d.peerGroupCreator.Create(peergroup.CreateOpts{ + CommitConfigDigest: cciptypes.Bytes32(d.commitConfigDigest), + RMNHomeConfigDigest: rmnHomeConfigDigest, + OraclePeerIDs: d.oraclePeerIDs, + RMNNodes: rmnNodesInfo, + }) if err != nil { return fmt.Errorf("new peer group: %w", err) } lggr.Infow("Created new peer group successfully") - d.activePeerGroups = append(d.activePeerGroups, peerGroup) + d.activePeerGroups = append(d.activePeerGroups, peerGroup.PeerGroup) d.activeConfigDigests = append(d.activeConfigDigests, genericEndpointConfigDigest) return nil @@ -470,7 +471,7 @@ func (d *peerGroupDialer) closeExistingPeerGroups() { d.lggr.Infow("Closed peer group successfully") } - d.activePeerGroups = []rmn.PeerGroup{} + d.activePeerGroups = []peergroup.PeerGroup{} d.activeConfigDigests = []cciptypes.Bytes32{} } diff --git a/core/scripts/go.mod b/core/scripts/go.mod index 5be2ca52ed2..45a09161e8c 100644 --- a/core/scripts/go.mod +++ b/core/scripts/go.mod @@ -288,7 +288,7 @@ require ( github.com/shirou/gopsutil/v3 v3.24.3 // indirect github.com/smartcontractkit/ccip-owner-contracts v0.0.0-20240926212305-a6deabdfce86 // indirect github.com/smartcontractkit/chain-selectors v1.0.27 // indirect - github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9 // indirect + github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73 // indirect github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f // indirect github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241018134907-a00ba3729b5e // indirect github.com/smartcontractkit/chainlink-feeds v0.1.1 // indirect diff --git a/core/scripts/go.sum b/core/scripts/go.sum index 915e6a239ea..456f5ec5c38 100644 --- a/core/scripts/go.sum +++ b/core/scripts/go.sum @@ -1090,8 +1090,8 @@ github.com/smartcontractkit/chain-selectors v1.0.27 h1:VE/ftX9Aae4gnw67yR1raKi+3 github.com/smartcontractkit/chain-selectors v1.0.27/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9 h1:PFPFFfFeihXnvB0gcwX32VgVtzmthxngxM4Pn4R3YEs= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73 h1:F+WjcRCHZ4lVk69qDXMb4GpZ2+8kx/j93PreuK+8xe8= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241025132045-cfad02139595 h1:H6i0LEvXB0se/63E3jE9N0/7TugOYLpK4e6TT6a0omc= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241025132045-cfad02139595/go.mod h1:TQ9/KKXZ9vr8QAlUquqGpSvDCpR+DtABKPXZY4CiRns= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f h1:BwrIaQIx5Iy6eT+DfLhFfK2XqjxRm74mVdlX8gbu4dw= diff --git a/deployment/go.mod b/deployment/go.mod index b079512602a..76853d76e1b 100644 --- a/deployment/go.mod +++ b/deployment/go.mod @@ -23,7 +23,7 @@ require ( github.com/sethvargo/go-retry v0.2.4 github.com/smartcontractkit/ccip-owner-contracts v0.0.0-20240926212305-a6deabdfce86 github.com/smartcontractkit/chain-selectors v1.0.27 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9 + github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73 github.com/smartcontractkit/chainlink-common v0.3.1-0.20241025132045-cfad02139595 github.com/smartcontractkit/chainlink-protos/job-distributor v0.4.0 github.com/smartcontractkit/chainlink-testing-framework/lib v1.50.12 diff --git a/deployment/go.sum b/deployment/go.sum index 405544be42d..b0e51c7482b 100644 --- a/deployment/go.sum +++ b/deployment/go.sum @@ -1385,8 +1385,8 @@ github.com/smartcontractkit/chain-selectors v1.0.27 h1:VE/ftX9Aae4gnw67yR1raKi+3 github.com/smartcontractkit/chain-selectors v1.0.27/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9 h1:PFPFFfFeihXnvB0gcwX32VgVtzmthxngxM4Pn4R3YEs= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73 h1:F+WjcRCHZ4lVk69qDXMb4GpZ2+8kx/j93PreuK+8xe8= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241025132045-cfad02139595 h1:H6i0LEvXB0se/63E3jE9N0/7TugOYLpK4e6TT6a0omc= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241025132045-cfad02139595/go.mod h1:TQ9/KKXZ9vr8QAlUquqGpSvDCpR+DtABKPXZY4CiRns= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f h1:BwrIaQIx5Iy6eT+DfLhFfK2XqjxRm74mVdlX8gbu4dw= diff --git a/go.mod b/go.mod index 5528194b6ae..f097eaa6a68 100644 --- a/go.mod +++ b/go.mod @@ -75,7 +75,7 @@ require ( github.com/shopspring/decimal v1.4.0 github.com/smartcontractkit/chain-selectors v1.0.27 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9 + github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73 github.com/smartcontractkit/chainlink-common v0.3.1-0.20241025132045-cfad02139595 github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f github.com/smartcontractkit/chainlink-data-streams v0.1.1-0.20241018134907-a00ba3729b5e diff --git a/go.sum b/go.sum index 4c4c381f61a..1b2662e7768 100644 --- a/go.sum +++ b/go.sum @@ -1075,8 +1075,8 @@ github.com/smartcontractkit/chain-selectors v1.0.27 h1:VE/ftX9Aae4gnw67yR1raKi+3 github.com/smartcontractkit/chain-selectors v1.0.27/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9 h1:PFPFFfFeihXnvB0gcwX32VgVtzmthxngxM4Pn4R3YEs= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73 h1:F+WjcRCHZ4lVk69qDXMb4GpZ2+8kx/j93PreuK+8xe8= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241025132045-cfad02139595 h1:H6i0LEvXB0se/63E3jE9N0/7TugOYLpK4e6TT6a0omc= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241025132045-cfad02139595/go.mod h1:TQ9/KKXZ9vr8QAlUquqGpSvDCpR+DtABKPXZY4CiRns= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f h1:BwrIaQIx5Iy6eT+DfLhFfK2XqjxRm74mVdlX8gbu4dw= diff --git a/integration-tests/go.mod b/integration-tests/go.mod index ab95e68b7d9..7530e47a7ac 100644 --- a/integration-tests/go.mod +++ b/integration-tests/go.mod @@ -35,7 +35,7 @@ require ( github.com/slack-go/slack v0.15.0 github.com/smartcontractkit/chain-selectors v1.0.27 github.com/smartcontractkit/chainlink-automation v0.8.1 - github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9 + github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73 github.com/smartcontractkit/chainlink-common v0.3.1-0.20241025132045-cfad02139595 github.com/smartcontractkit/chainlink-protos/job-distributor v0.4.0 github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 diff --git a/integration-tests/go.sum b/integration-tests/go.sum index 736d703beb4..688b791c8b2 100644 --- a/integration-tests/go.sum +++ b/integration-tests/go.sum @@ -1403,8 +1403,8 @@ github.com/smartcontractkit/chain-selectors v1.0.27 h1:VE/ftX9Aae4gnw67yR1raKi+3 github.com/smartcontractkit/chain-selectors v1.0.27/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9 h1:PFPFFfFeihXnvB0gcwX32VgVtzmthxngxM4Pn4R3YEs= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73 h1:F+WjcRCHZ4lVk69qDXMb4GpZ2+8kx/j93PreuK+8xe8= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241025132045-cfad02139595 h1:H6i0LEvXB0se/63E3jE9N0/7TugOYLpK4e6TT6a0omc= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241025132045-cfad02139595/go.mod h1:TQ9/KKXZ9vr8QAlUquqGpSvDCpR+DtABKPXZY4CiRns= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f h1:BwrIaQIx5Iy6eT+DfLhFfK2XqjxRm74mVdlX8gbu4dw= diff --git a/integration-tests/load/go.mod b/integration-tests/load/go.mod index 971eceb1ae7..a44847d59a7 100644 --- a/integration-tests/load/go.mod +++ b/integration-tests/load/go.mod @@ -64,7 +64,7 @@ require ( github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sagikazarmark/locafero v0.4.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect - github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9 // indirect + github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73 // indirect github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f // indirect github.com/smartcontractkit/chainlink-testing-framework/havoc v1.50.2 // indirect github.com/smartcontractkit/grpc-proxy v0.0.0-20240830132753-a7e17fec5ab7 // indirect diff --git a/integration-tests/load/go.sum b/integration-tests/load/go.sum index 89d025e17d8..20e46b9d689 100644 --- a/integration-tests/load/go.sum +++ b/integration-tests/load/go.sum @@ -1392,8 +1392,8 @@ github.com/smartcontractkit/chain-selectors v1.0.27 h1:VE/ftX9Aae4gnw67yR1raKi+3 github.com/smartcontractkit/chain-selectors v1.0.27/go.mod h1:d4Hi+E1zqjy9HqMkjBE5q1vcG9VGgxf5VxiRHfzi2kE= github.com/smartcontractkit/chainlink-automation v0.8.1 h1:sTc9LKpBvcKPc1JDYAmgBc2xpDKBco/Q4h4ydl6+UUU= github.com/smartcontractkit/chainlink-automation v0.8.1/go.mod h1:Iij36PvWZ6blrdC5A/nrQUBuf3MH3JvsBB9sSyc9W08= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9 h1:PFPFFfFeihXnvB0gcwX32VgVtzmthxngxM4Pn4R3YEs= -github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031095646-6d86812d0db9/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73 h1:F+WjcRCHZ4lVk69qDXMb4GpZ2+8kx/j93PreuK+8xe8= +github.com/smartcontractkit/chainlink-ccip v0.0.0-20241031135640-ac3278008a73/go.mod h1:4adKaHNaxFsRvV/lYfqtbsWyyvIPUMLR0FdOJN/ljis= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241025132045-cfad02139595 h1:H6i0LEvXB0se/63E3jE9N0/7TugOYLpK4e6TT6a0omc= github.com/smartcontractkit/chainlink-common v0.3.1-0.20241025132045-cfad02139595/go.mod h1:TQ9/KKXZ9vr8QAlUquqGpSvDCpR+DtABKPXZY4CiRns= github.com/smartcontractkit/chainlink-cosmos v0.5.2-0.20241017133723-5277829bd53f h1:BwrIaQIx5Iy6eT+DfLhFfK2XqjxRm74mVdlX8gbu4dw=