Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 3 additions & 1 deletion deployment/ccip/changeset/internal/deploy_home_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,9 @@ func DONIdExists(cr *capabilities_registry.CapabilitiesRegistry, donIDs []uint32
func replaceAptosPublicKeys(transmitterKey ocrtypes.Account) ocrtypes.Account {
// Due to missing support in Operator UI, nodes will currently submit their account address to JD, when we actually need their pubkeys
// As a temporary fix, hardcoding a mapping of address->pubkey, until we've got this fixed with https://github.com/smartcontractkit/operator-ui/pull/105
// at which point we can remove this mapping and use the AccountAddressPublicKey returned by JD directly
// at which point we can remove this mapping and use the AccountAddressPublicKey returned by JD directly.
// Note: The operator-ui PR got merged, but JD is currently missing support for the field, to fix: https://github.com/smartcontractkit/job-distributor/pull/658
// Also, we'll need to ensure that all NOPs have re-submitted the chain config to JD first, before removing this mapping.
if pubkey, ok := map[ocrtypes.Account]ocrtypes.Account{
// address -> pubkey
"abf583b6a78104352571ac4c26c0c21cc300ac4721f20e7ccafe8fef0165994c": "df0abd3db66ac53143414283d80a989ab7952977a1829eb411a1866ec59b2e63",
Expand Down
12 changes: 11 additions & 1 deletion deployment/environment.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,11 +408,21 @@ func ChainConfigsToOCRConfig(chainConfigs []*nodev1.ChainConfig) (map[chain_sele
return nil, err
}

transmitAccount := chainConfig.AccountAddress
chainFamily, err := chain_selectors.GetSelectorFamily(details.ChainSelector)
if err != nil {
return nil, fmt.Errorf("failed to get chain family for selector %d: %w", details.ChainSelector, err)
}
// For Aptos and Sui, the transmit account must be set to the public key, which is submitted to and retrieved from JD
if chainConfig.AccountAddressPublicKey != nil && (chainFamily == chain_selectors.FamilyAptos || chainFamily == chain_selectors.FamilySui) {
transmitAccount = *chainConfig.AccountAddressPublicKey
}

selToOCRConfig[details] = OCRConfig{
OffchainPublicKey: opk,
OnchainPublicKey: pubkey,
PeerID: MustPeerIDFromString(chainConfig.Ocr2Config.P2PKeyBundle.PeerId),
TransmitAccount: types2.Account(chainConfig.AccountAddress),
TransmitAccount: types2.Account(transmitAccount),
ConfigEncryptionPublicKey: cpk,
KeyBundleID: chainConfig.Ocr2Config.OcrKeyBundle.BundleId,
}
Expand Down
Loading