-
Notifications
You must be signed in to change notification settings - Fork 112
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
Split out Wormhole relayer #1284
Conversation
dfd2a32
to
7828db3
Compare
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.
Nice. Why write it in typescript? Was it needed to use the libraries, or just a good opportunity to try it out?
It wasn't needed, but was certainly helpful for some of this. I also think it's just better for things being deployed to production. |
69de687
to
5cc2bc9
Compare
With these last changes, we've started running in to this even for the first run of the tests, so deleting the |
5cc2bc9
to
2ee1eff
Compare
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.
Looks pretty good! A few minor comments.
With the current multichain functionality, we focussed on the contracts and not on the additional infrastructure around it. This PR is intended to at least create the scaffolding for that infrastructure, which we can hopefully build on.
As it stands, the
mockBridgeMonitor
script represents three components of the Wormhole system:We certainly aren't going to be responsible for the Guardian Network. We might end up running our own spy. However, we will certainly need our own relayer to deliver the desired experience for people - they sign a message on one chain and it appears on the other chain, with no further interaction from them. This ends up very similar to the Metatransaction Broadcaster - they execute a transaction that emits an event on one chain, and the relayer ends up executing a transaction on the other chain, paying for gas.
This PR splits out the relayer from the
mockBridgeMonitor
script, and has it running in a separate process, communicating with the spy via the protocol that it would use in a real deployment. This give us a platform to build a robust relayer on as we go forward. The relayer is extremely simple at the moment. One thing that we had avoided doing 'properly' previously was considering VAAs, but given the libraries being used expect to see VAAs at various points, I've had to do those much more 'properly'.Some of the changes here we just... stumbled across being necessary. Changing providers to use
RetryProvider
where I could is certainly something that coul be in a separate PR (and will move if desired), but splitting this relayer out made us more sensitive to connection errors during builds, somehow? We also started to reliably run across issues withhardhat
's memory usage during the cross-chain tests, which we've avoided for now by deleting thebuild-info
between the two sets of tests. It feels like that's not going to be able to be a long-term solution, but it's what we've got for now.There's a lot here, so keen to answer questions and get this in to a mergeable (and understandable) state.