-
Notifications
You must be signed in to change notification settings - Fork 17
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
[Bug]: Teleporter deployment failure #306
Comments
AHHH shoot I was just thinking about how you could repro this and I realized that this is probably due to the deployment Allowlist precompile not having the teleporter deploy address in it. |
Maybe this is a feature request to check the Allowlist precompile before execution then lmao |
Yeah absolutely. The script should definitely check prior to sending the transaction, and also check the status of the transaction afterward since it could potentially revert for other reasons depending on the subnet's configuration. Thanks going through this and calling it out! |
Just manually upgraded my subnet to deploy the appropriate code to the teleporter address, thanks for the suggestion on twitter. It occurred to me that I borked this by accident, but a malicious user could deliberately bork the upgrade, causing work for the subnet operator, so this might be a more common thing to do than expected. |
Great to hear, I've actually never have gone through that state upgrade flow myself, but we will document it as a possible fallback option.
I think the only case where the deployer allowlist specifically would be an issue here is if a Subnet initially does not want to support Teleporter (and doesn't set the deployer address as an allowed deployer), and then later on decides that they do want to support Teleporter. In that event, it would require a network upgrade either way to either add the deployer address as an allowed deployer, or to directly add the code at the address via a state upgrade. If they want to support it from the start and are limiting who is able to deploy contracts on their new chain, then they should include the deployer address on the deploy list. If they never want to support Teleporter, it's not an issue that the transaction gets sent and reverts. Aside from the deployer allowlist though, different rulesets and conditions on different chains makes it impossible to ensure the Nick's method transaction will work on all chains. For instance, a chain could have a minimum gas price above the gas price set in the transaction (2500 GWEI), or could have different gas costs for certain opcodes such that the transaction runs out of gas (4M gas limit). We'll continue exploring options for improvements. Ensuring that the same bytecode can be deployed to the same address on arbitrary chains without needing a central authority to explicitly support new chains is a frustrating problem. One option would be to include the Teleporter bytecode baked into |
Agree in general, but the deployer address is different for every teleporter release right? Which means that it's not just 'if they want to support teleporter' but 'if they want to support an updated version of teleporter'. I thought that was the point of the teleporter registry right? Basically I'm saying you could be an annoying troll by watching for teleporter release publications and then pre-borking them on subnets. But as you mentioned elsewhere in this post there's not really a good solution for this. The state upgrade wasn't that bad, I think just making it documented / easy as possible for people to do is good enough. |
Ah yeah, great point about the future releases. The deployer allowlist really doesn't play nicely with this model.
|
Describe the bug
Deploying teleporter failed.
I got all the way through setting up a token bridge and enabling relayer, but the relayer kept failing with this error:
Turns out, the teleporter contract doesn't exist on my subnet.
This surprised me, since I 'successfully' deployed it yesterday. The logs are gone though. So I tried to deploy the v0.1.0 version instead.
You'll notice that the status of the fund transfer is 0x1, but the status of the deployment is 0x0. Oops. The
Success! TeleporterMessenger v0.1.0 deployed
from yesterday LIED TO ME.The warp precompile is enabled on my subnet. I don't have a good explorer running yet, but the routescan dev explorer shows that the TX used 4M gas and failed (I think, it seems to not show contract deployments properly).
Not sure what you can personally do to repro this. You could deploy the v0.0.0 version I guess?
I think my subnet is kind of borked now, until a new teleporter version is released, right?
The text was updated successfully, but these errors were encountered: