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

Aptos LOOP setup #14076

Merged
merged 12 commits into from
Aug 16, 2024
Merged

Aptos LOOP setup #14076

merged 12 commits into from
Aug 16, 2024

Conversation

archseer
Copy link
Contributor

@archseer archseer commented Aug 8, 2024

No description provided.

@archseer archseer requested review from jmank88 and cfal August 8, 2024 12:24
@archseer archseer requested review from a team as code owners August 8, 2024 12:24
Copy link
Contributor

github-actions bot commented Aug 8, 2024

I see you updated files related to core. Please run pnpm changeset in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

🎖️ No JIRA issue number found in: PR title, commit message, or branch name. Please include the issue ID in one of these.

@archseer archseer enabled auto-merge August 8, 2024 12:33
Comment on lines +188 to +189
// the plugin should handle it's own defaults and merging
c.Aptos = f.Aptos
Copy link
Contributor

Choose a reason for hiding this comment

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

This is unfortunately not so simple, because we also support passing multiple files that override one another. I can't think of a simple short-term fix, but this will have to be solved another way eventually regardless 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

could you concat the files together, then only do the parse once?

Copy link
Contributor

Choose a reason for hiding this comment

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

Plain concat only works in special cases. We could write logic to crawl through the maps and set individual fields, but I'm not sure how easy that will be 🤔

krebernisak
krebernisak previously approved these changes Aug 13, 2024
TOMLConfigs RawConfigs
}

func (r *RelayerFactory) NewAptos(ks keystore.Aptos, chainCfgs RawConfigs) (map[types.RelayID]loop.Relayer, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: shouldn't we use the AptosFactoryConfig as input param here?

@@ -301,3 +301,65 @@ func (r *RelayerFactory) NewCosmos(config CosmosFactoryConfig) (map[types.RelayI
}
return relayers, nil
}

type AptosFactoryConfig struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

[non-blocking discussion] We should also ideally get Beholder integrated and configured in the core Node itself, and then inject it here to make it available to the LOOP as a common core service. @mathewdgardner wdyt?

Copy link
Contributor

Choose a reason for hiding this comment

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

Draft in progress here to follow beholder client PR: smartcontractkit/chainlink-common#696

return r.NewLOOPRelayer("Aptos", corerelay.NetworkAptos, plugin, loopKs, chainCfgs)
}

func (r *RelayerFactory) NewLOOPRelayer(name string, network string, plugin env.Plugin, ks coretypes.Keystore, chainCfgs RawConfigs) (map[types.RelayID]loop.Relayer, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: consider grouping the keystore, config, and capRegistry in a type like PluginContext

@@ -88,6 +85,9 @@ func (akr *aptosKeyring) verifyBlob(pubkey ocrtypes.OnchainPublicKey, b, sig []b
if len(sig) != akr.MaxSignatureLength() {
return false
}
// we ignore the passed in publicKey since that will be the EVM key if using multi-chain config
// instead we use the embedded publicKey that's part of the ed25519 signature
pubkey = sig[:32]
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm, this feels like magic. Shouldn't the caller configure this on input?

@archseer archseer added this pull request to the merge queue Aug 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 16, 2024
@archseer archseer added this pull request to the merge queue Aug 16, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 16, 2024
@archseer archseer added this pull request to the merge queue Aug 16, 2024
Merged via the queue into develop with commit 69a0090 Aug 16, 2024
138 of 140 checks passed
@archseer archseer deleted the aptos-loop branch August 16, 2024 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants