We were overusing DomainAddress in places where we did not really need it, generating extra complexity that offuscate some parts of the codebase (i.e affecting to how the forwarder needs to be implemented).
Change list:
Simplify sending/receiving methods:
Sending methods use as origin an AccountId instead of DomainAddress.
Receiving methods use as origin a Domain instead of DomainAddress.
Move gateway::Allowliststorage for instances its methods from the gateway to the axelar-router.
The reason: we need to check if the address is valid or not as soon as possible. Doing it in the gateway is late. We want to only forward messages (which is reached before the gateway) for allowed instances.
This check could not be super ideal here. i.e, in the future, several routers can use the same allowlist information. If that is the case, this should be extracted as a precondition or as a new entity in the chain:
Description
We were overusing
DomainAddress
in places where we did not really need it, generating extra complexity that offuscate some parts of the codebase (i.e affecting to how the forwarder needs to be implemented).Change list:
AccountId
instead ofDomainAddress
.Domain
instead ofDomainAddress
.gateway::Allowlist
storage for instances its methods from thegateway
to theaxelar-router
.axelar-router -> (new) allowlist-checker -> deserializer -> forwarder -> gatewat -> lp