-
Notifications
You must be signed in to change notification settings - Fork 369
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
Epic: VMs without keccak should be supported by Hyperlane #2399
Comments
@serejke @HariSeldon23 would love your read on this and see if that makes sense for y'all |
Thanks for the detailed response. The way I normally look at these types of issues are to determine what are my non negotiables and then work from there. For me, it would be:
With that being said from my interpretation of the above solution there are the following issues:
So then it comes down to the age old question of a short term fix for today vs planning years in advance. The Bridge Wars are a competitive space and while market share is important today, it's going to be a battle that occurs over, at a minimum, the next decade. Keccak will eventually be replaced. Quantum computing will arrive. Lock/Burn and Mint bridge use cases will eventually be viewed as quaint. So a short term solution is just kicking the can down the road. Which tbf is what most competitors will do. My preferred approach would be:
There are quite a few short term negatives to this approach:
|
Thanks for your input @HariSeldon23 ! Your non-negotiable unfortunately runs into another non-negotiable, in that the message ID needs to commit to the contents of the message. If you just do it around the metadata, then you lose a whole host of benefits from that commitment unless you write the whole message to storage. If you didn't need the commitment, you could just use the It's not clear to me that processing merkle trees is a non-negotiable though, especially since it feels impossible to support. Censorship resistance is a very nice property, but I don't think its a must have (and can always be added later) |
Ok, that's fair enough. I realize I made quite a few bad assumptions in my original reply, now that I've done a deeper dive, I believe I've got a better understanding. Let's talk about a connection between Ethereum (Domain = 1) and BlakeChain (Domain = 987). We will use the We want to send a message to BlakeChain which should be used to execute a contract So let's break down into how that will be achieved:
So this covers sending a message to Ethereum from BlakeChain. Now let's say after the successful sending of the message referenced above, we now want to send a message from BlakeChain to Ethereum. We just want to send a simple "Hello World" string.
Have I understood this correctly? If so, then I agree with your assessment and this provides a good starting point to start. |
Thanks @nambrot for putting the ideas together. I confirm the proposed solution to support non-EVM chains should work.
|
@HariSeldon23 I think the ordering of actions in the For example,
|
Replay protection we refer to as the guarantee that a message that was already processed, can't be replayed again, i.e. processed again (i.e. what you call at-most-once processing)
I'm not sure I would call this "re-hashing", but hashing a message for its ID differently depending on the destination chain is what I suggested I believe. My main point is that you could start without needing to actually build the alt-VM merkle tree if you just start with only verifying signatures over the message ID (instead of in addition to the merkle tree proof). Building the alt-VM merkle tree is a nice-to-have only IMO (since you can't slash for misbehavior on the origin chain cross-VM) |
This is fantastic. Thank you. This whole thread has been incredibly insightful. Going to work through a few small PoC's and will then track back here if anything comes out of it that hasn't been addressed here |
Context
The EVM is the most popular and widespread VM for blockchains to offer smart contracting abilities as Ethereum led the ways. Many alt-L1s and rollups specifically emphasize their EVM compatibility to attract developers as solidity/EVM has the best resources for developers to build their applications. Additionally, existing applications and code for Ethereum can be reused mostly out of the box on other EVM chains. Hyperlane's architecture was conceived to be able to support many diverse environments and the Sealevel and Fuel implementations in progress show that the surface area is rather doable.
However, one of the big assumptions that the Hyperlane protocol makes is the usage of keccak as a hashing function to construct
The main use of keccak is to support a merkle tree which commits to all messages in the tree for both censorship resistance and fraud proof purposes. On the destination chain, the merkle tree can be used with signatures from validators over the root of the tree alongside a merkle proof to prove inclusion of the message. For processing, the message ID is used to do replay protection. Invalid signatures can be given as input to prove their lack of validity against.
This ticket tries to capture what supporting VMs without keccak requires or could look like (referred to as alt-VMs in this ticket)
Option 1: Status-quo, i.e. no/minimal changes to the protocol itself
Contracts
Agents
CheckpointWithMessageId
probably has to be changed toCheckpointWithMessage
to include the full messagePros:
Cons:
Open Questions:
Option/Step 2
Have mailboxes support multiple merkle trees (in environments that support multiple hashing functions)?
Examples
Related Issues
#2388
#2258
The text was updated successfully, but these errors were encountered: