hyperlane-xyz / hyperlane-monorepo

The home for Hyperlane core contracts, sdk packages, and other infrastructure
https://hyperlane.xyz
Other
332 stars 360 forks source link

Warp Route deployment should be smoother #1863

Closed nambrot closed 1 year ago

nambrot commented 1 year ago

Catch all issue

Ultimately, you should be able to deploy a warp route yourself and not run into issues.

asaj commented 1 year ago

Wondering if we should build them in the interoperable router pattern instead of these bandaids

nambrot commented 1 year ago

I'm not sure that interopable router pattern solves all of these (i.e. config still needs to be validated, docs should indicate what the options are), so I would still suggest to fix these as relatively low-hanging fruit and then observe what difficulties people experience when actually doing this.

This does bring up the question, how do interopable router patterns pay for gas? I guess that's ultimately up to the user of the router?

asaj commented 1 year ago

This does bring up the question, how do interopable router patterns pay for gas? I guess that's ultimately up to the user of the router?

I would imagine that, similar to the other fields (e.g. router, ism) there are defaults (probably per-destination) that can be overridden by users.

nambrot commented 1 year ago

Other issues folks are running into:

Unclear what type to use in config https://discord.com/channels/935678348330434570/961710804011458621/1088469754500612158

All the outputs of the deployment are just router, not clear what hypCollateralContract and synthetic contracts are, or where to use those https://discord.com/channels/935678348330434570/1088447897319776266/1088497431953547365

Unclear what the actual flow is for a transfer https://discord.com/channels/935678348330434570/1088447897319776266/1088502845516562533 Probably should split this diagram into a simple and a detailed one, maybe i'll try to do it, especially since i had been prodding @yorhodes for the simplify, but should have said to keep a detailed one as well

nambrot commented 1 year ago

https://discord.com/channels/935678348330434570/935678477246554132/1088552463700869141

Unclear where to add a new chain for the UI

asaj commented 1 year ago

It feels like you need to specify a bunch of redundant info rn.

Feels like type/name/symbol/totalSupply are all unnecessary, we can infer the type from the presence of "token", and name/symbol/totalSupply can all be pulled from the token contract on the collateral chain.

asaj commented 1 year ago

Mailbox and IGP can/should also default to what's present in the SDK, so you only need to put them for PI chains

asaj commented 1 year ago

@nambrot wdyt?

nambrot commented 1 year ago

Another comment about the lack of clarity of what you have to do for the UI

https://discord.com/channels/935678348330434570/961710804011458621/1088867745673777212

nambrot commented 1 year ago

It feels like you need to specify a bunch of redundant info rn.

Feels like type/name/symbol/totalSupply are all unnecessary, we can infer the type from the presence of "token", and name/symbol/totalSupply can all be pulled from the token contract on the collateral chain.

Yes, that was the intention behind https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/1867, sounds like i should be able to get to it now that your hyperlane-deploy PR has stabilized and then from there we can determine better config/artifact handling?

nambrot commented 1 year ago

https://discord.com/channels/935678348330434570/961710804011458621/1088876856620626040

We should consider making chains.json and tokens.json not jsons but .ts files that allow for comments for context. In this case, they likely thought they have to put default chain metadata in there and set it incorrectly.

asaj commented 1 year ago

yes if you look at my hyperlane-deploy PR configs are in ts files. when we move warp route deployment into hyperlane-deploy we presumably will do the same

jmrossy commented 1 year ago

We should consider making chains.json and tokens.json not jsons but .ts files

The advantage of JSON is it's more natural to have one script output JSON which a user then picks up as the config to the next step (e.g. configure UI)

nambrot commented 1 year ago

But we are doing neither right now :P

nambrot commented 1 year ago

This is quite out of date, so closing in favor of other tickets capturing things not already fixed