diff --git a/deployment/ccip/changeset/internal/deploy_home_chain.go b/deployment/ccip/changeset/internal/deploy_home_chain.go index 82052677646..306fa2dd044 100644 --- a/deployment/ccip/changeset/internal/deploy_home_chain.go +++ b/deployment/ccip/changeset/internal/deploy_home_chain.go @@ -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", diff --git a/deployment/environment.go b/deployment/environment.go index 335cc3086ee..d0109efc8ff 100644 --- a/deployment/environment.go +++ b/deployment/environment.go @@ -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, }