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

Add Protocol Address to RelayerID #337

Open
cam-schultz opened this issue Jun 17, 2024 · 0 comments
Open

Add Protocol Address to RelayerID #337

cam-schultz opened this issue Jun 17, 2024 · 0 comments
Assignees
Labels
design enhancement New feature or request idea Consider as a possible enhancement

Comments

@cam-schultz
Copy link
Collaborator

Context and scope
ApplicationRelayers are associated with exactly one RelayerID, which is the Keccak256 hash of the tuple (sourceBlockchainID, destinationBlockchainID, sourceAddress, destinationAddress). This key is used to store the checkpointed height that each ApplicationRelayer has processed.

This issue is to investigate adding protocolAddress to the RelayerID tuple. This has both logical and architectural advantages. Logically, an ApplicationRelayer is intended to represent a distinct cross-chain message route. They do not, however, consider the message protocol, meaning that a distinct address on a specific blockchain sending messages over two protocols is not distinguished by the ApplicationRelayer. There are edge cases in which messages may be missed if the relayer application's configuration adds and removes message protocols. Associating the protocol address with the checkpointed block height would address these.

On the architectural side, distinct message protocol handling is implemented by MessageHandler and MessageHandlerFactory. MessageHandlers are created external to the ApplicationRelayer and passed in as arguments to ProceeHeight. This requires a two-pass approach, as well as a MessageCoordinator to perform the correct mapping. With the proposed change, MessageHandlerFactory could instead be encapsulated in ApplicationRelayer, simplifying the processing logic for ApplicationRelayer callers, and simplifying the ProcessHeight interface.

Discussion and alternatives

  • Add protocolAddress to the RelayerID tuple

Open questions
What are the migration steps for existing awm-relayer instances with databases keyed without the protocolAddress?

@cam-schultz cam-schultz added enhancement New feature or request idea Consider as a possible enhancement design labels Jun 17, 2024
@cam-schultz cam-schultz added this to the Relayer extensibility milestone Jun 17, 2024
@cam-schultz cam-schultz self-assigned this Jun 17, 2024
@cam-schultz cam-schultz moved this from Backlog 🗄️ to Researching 📚 in Platform Engineering Group Jun 17, 2024
@cam-schultz cam-schultz moved this from Researching 📚 to In Progress 🏗 in Platform Engineering Group Jun 25, 2024
@cam-schultz cam-schultz moved this from In Progress 🏗 to Paused 🧊 in Platform Engineering Group Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design enhancement New feature or request idea Consider as a possible enhancement
Projects
Status: Paused 🧊
Development

No branches or pull requests

1 participant