-
Notifications
You must be signed in to change notification settings - Fork 429
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
Audit config shapes #1867
Comments
Currently, the config we use are the following Types of config
UsagesSDK chain metadataContains: 1) Usage:
ISMConfigContains: 5) Usage:
Agent config fileContains: 1), 3), 7), 8) Usage:
Agent config ENV varsContains: 2), 11) Usage:
Hyperlane-deploy artifactsContains: 3), 4), 7), 9) Usage:
Warp route configContains: 10), 3), 4), 7), 13) Usage:
Warp Route Template UI chains configContains: 1) Usage:
Warp Route Template UI tokens configContains: 12) + the token metadata + token logo Usage:
Explorer PI configContains: 1), 3) Usage:
|
Questions:
|
Here is an attempt to harmonize the agent config and existing SDK configs better so that existing chain metadata + contract artifacts can just be used out of the box. Would then also suggest for the explorer to use this. Looking for your feedback @mattiecnvr @jmrossy "chains": {
"celo": {
+ // SDK chain metadata schema
"name": "celo",
- "domain": 42220,
- "addresses": {
- "mailbox": "0x35231d4c2D8B8ADcB5617A638A0c4548684c7C70",
- "interchainGasPaymaster": "0x6cA0B6D22da47f091B7613223cD4BB03a2d77918",
- "validatorAnnounce": "0x9bBdef63594D5FFc2f370Fe52115DdFFe97Bc524"
- },
- "protocol": "ethereum",
- "finalityBlocks": 0,
+ "displayName": "Celo", // optional
+ "chainId": 42220,
+ "blocks": {
+ "reorgPeriod": 0, // the old finality blocks
+ },
+ "publicRpcUrls": [{
+ "http": "https://forno.celo.org"
+ }],
+
+ // SDK contract addresses schema
+ "mailbox": "0x35231d4c2D8B8ADcB5617A638A0c4548684c7C70",
+ "interchainGasPaymaster": "0x6cA0B6D22da47f091B7613223cD4BB03a2d77918",
+ "validatorAnnounce": "0x9bBdef63594D5FFc2f370Fe52115DdFFe97Bc524",
+
+
+ // agent specific
+ "protocol": "ethereum", // can be defaulted to ethereum
+ "rpcUrlAggregationType": "quorum", // use this to determine whether the public RPC urls is quorum or fallback or whether just the first entry should be used, and maybe default to fallback for relayer and quorum for validator
- "connection": {
+ "connectionUrl": "https://forno.celo.org" // use this if there are no public RPC urls (probably override with ENV var)"
- "type": "http"
- },
+
+ // right now specific to the agent, but can be moved via https://github.com/hyperlane-xyz/hyperlane-monorepo/issues/2004#issuecomment-1497709408
"index": {
"from": 16884144
|
I don't understand the shape of What is I guess I also don't understand The Otherwise I think it should be a config shape we can support, but it does seem to imply some other code changes and I am a little confused by some of the specifics. |
This is the current SDK chain metadata shape
What do you mean by
This is just what it is in sdk's chain metadata
The name
Any other confusion besides what you have specified above? |
Be careful about making the chainId === domainId assumption.. |
Also curious, what do we get out of this? Are we expecting people to manually create these configs? If not, do we get anything other than simplification of the code that creates the agent config? |
Good call out, the sdk chain metadata right now assumes domainId to be the same as chainID unless it's specified separately in the metadata
We do expect folks to currently copy and paste the related config for the explorer. For the agents, i would say ideally most folks do not need to actually look at the file ideally (let along create). Though I also feel that it would be quite nice for folks to specify chain metadata only once and then be able to reuse things like the rpc urls in the agent config (admittedly a somewhat orthogonal point). I do think the main benefit is the simplification of our config surface area in general. |
@mattiecnvr friendly ping on your opinion on whether the suggested config shape changes are easy to do |
After discussing in person, there are just a couple name changes and clarifications I would like to see added, but otherwise I am in support of this.
|
@mattiecnvr a few quick thoughts/responses:
|
@mattiecnvr @jmrossy Made a spec via this PR https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/2203/files#diff-0dda34e51b45fcb259676791b216443495e465f6ec7c372fc77ec9abe9b8409aR90 Lmk if that matches what we have discussed here. If so, I would suggest to make two tickets:
|
Made some comments on the PR, generally looking good to me |
### Description - Refactor ChainMetadata types into new folder - Create metadata extensions for deployment artifacts, and agent config - Remove explicit ChainMetadata interface and infer from zod schema instead ### Related issues Implements new schema discussed in: - #1867 - #2203 - #2214 Fixes #2214 ### Backward compatibility **No**: users of chain metadata configs would need to slightly modify their shape (the `rpcUrl` field)
We have a bunch of different configs and artifacts of varying shapes that are slightly different which makes it very annoying.
things like:
The text was updated successfully, but these errors were encountered: