-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[NONEVM-904] Update address book to support nonevm #15269
[NONEVM-904] Update address book to support nonevm #15269
Conversation
I see you updated files related to
|
AER Report: CI Core ran successfully ✅AER Report: Operator UI CI ran successfully ✅ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A large number of the comments are a little redundant because they are in EVM specific contexts but fine just keep em and over-communicate imo.
address = common.HexToAddress(address).Hex() | ||
} else { | ||
return errors.Wrapf(ErrInvalidAddress, "address %s is not a valid Ethereum address, only Ethereum addresses supported", address) | ||
if family == chainsel.FamilyEVM { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could add your aptos specific validation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't have any yet, but we'll create a ticket to add it later. We are already tackling hardening tasks like this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was toying with an idea of building in aptos and other chain or family validations into the chainlink-selectors repo, so we'd have a set of reusable validations keyed off of chain ID in a way that hides all the conditionality from calling code. Valid addresses was definitely in the right zone. Doing it here is fine, but we should think about making this more generally usable.
deployment/address_book.go
Outdated
_, exists := chainsel.ChainBySelector(chainSelector) | ||
if !exists { | ||
// Save will save an address for a given chain selector. It will error if there is a conflicting existing address. | ||
func (m *AddressBookMap) Save(chainSelector uint64, address string, typeAndVersion TypeAndVersion) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update the Save test with some other family addresses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why did this become public? i don't see anything that using it in other packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
case added!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah +1 @krehermann this should remain a private helper, there's already a public Save. Not sure how this actually compiles it looks like it has the same signature as the public Save?
…update-addressbook-to-support-nonevm
…update-addressbook-to-support-nonevm
core/services/relay/evm/evm.go
Outdated
@@ -197,6 +197,7 @@ func NewRelayer(ctx context.Context, lggr logger.Logger, chain legacyevm.Chain, | |||
sugared := logger.Sugared(lggr).Named("Relayer") | |||
mercuryORM := mercury.NewORM(opts.DS) | |||
cdcFactory := sync.OnceValues(func() (llo.ChannelDefinitionCacheFactory, error) { | |||
// NOTE: This does not support non-evm chains |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these notes intended to be TODOs, or is this purely documentary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
documentation
I see you added a changeset file but it does not contain a tag. Please edit the text include at least one of the following tags:
|
fb24bb7
986a6a4
…update-addressbook-to-support-nonevm
Requires
Supports