Adding a new core chain to the Rust KnownHyperlaneDomain and some impl functions is cumbersome.
We've had a few hiccups doing this in the past too:
misspelling the name of the domain - it may even compile, but it doesn't match what's in the registry. Because there would be conflicting names for the same domain ID, runtime errors occur
forgetting to update functions like domain_type, domain_protocol, and domain_technical_stack
I believe the main reasons we need/want KnownHyperlaneDomain are:
special cased behavior for some chains, like Polygon to use a certain gas oracle, or Solana to use Jito
special cased behavior for some domain technical stacks, like arbitrumnitro (tbf we can get this from just the runtime domain config and doesn't need to be at compile time)
I think we may have friendlier logs in the relayer?
Solution
I'd consider it within scope to consider removing KnownHyperlaneDomain entirely if we have some other more config-friendly heuristic for the special cases
Maybe a macro that generates the enum from the agent config json?
less urgent, now that we don't update the KnownHyperlaneDomains enum with each addition of chains - we ensure the agent config is updated and baked into the resulting agent image
Problem
Adding a new core chain to the Rust KnownHyperlaneDomain and some impl functions is cumbersome.
We've had a few hiccups doing this in the past too:
domain_type
,domain_protocol
, anddomain_technical_stack
I believe the main reasons we need/want KnownHyperlaneDomain are:
Solution
KnownHyperlaneDomain
entirely if we have some other more config-friendly heuristic for the special cases