Skip to content
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

feat(sealevel): read / write igp gas oracle config #2705

Merged
merged 11 commits into from
Sep 7, 2023

Conversation

daniel-savu
Copy link
Contributor

@daniel-savu daniel-savu commented Sep 4, 2023

Description

Tooling to get / set gas oracle data for sealevel, part of https://github.com/hyperlane-xyz/issues/issues/568

The PR adds two IGP oracle commands. If the values to be set are specified, then the command performs a write using the key configured. Otherwise, it performs a read. Unsure whether this is the best UX, happy to change it.

Usage example:

# Get gas values
cargo run --bin hyperlane-sealevel-client igp destination-gas-overhead --environments-dir ./sealevel/environments --environment testnet3 --chain-name solanadevnet --remote-domain 88002

# Set gas values. Note the added `--gas-overhead 159736` flag
cargo run --bin hyperlane-sealevel-client igp destination-gas-overhead --environments-dir ./sealevel/environments --environment testnet3 --chain-name solanadevnet --remote-domain 88002 --gas-overhead 159736

There's also a small warp route util added to read the destination gas:

 cargo run --bin hyperlane-sealevel-client warp-route destination-gas --program-id 84DAG9VX5CvefQrBUGh9Gp66kmkat2voaM4MB2YwpGW1 --destination-domain 88002

Drive-by changes

Related issues

Backward compatibility

Testing

Manual

@daniel-savu daniel-savu changed the title feat(sealevel): read igp gas oracle config feat(sealevel): read / write igp gas oracle config Sep 5, 2023
@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (556efdb) 64.50% compared to head (3703e3d) 64.50%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2705   +/-   ##
=======================================
  Coverage   64.50%   64.50%           
=======================================
  Files          91       91           
  Lines        1386     1386           
  Branches      185      185           
=======================================
  Hits          894      894           
  Misses        485      485           
  Partials        7        7           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@daniel-savu daniel-savu marked this pull request as ready for review September 6, 2023 16:24
Copy link
Collaborator

@tkporter tkporter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just wondering if there's a way to make the read vs write thing more explicit, maybe something like --write needs to be passed in or something? Idk, just would be nice to make it really hard to accidentally misuse it

@daniel-savu
Copy link
Contributor Author

LGTM, just wondering if there's a way to make the read vs write thing more explicit, maybe something like --write needs to be passed in or something? Idk, just would be nice to make it really hard to accidentally misuse it

came up with this (set and get subcmds):

# get
cargo run --bin hyperlane-sealevel-client igp destination-gas-overhead --environments-dir ./sealevel/environments --environment mainnet2 --chain-name solana --remote-domain 56 get

# set
cargo run --bin hyperlane-sealevel-client igp destination-gas-overhead --environments-dir ./sealevel/environments --environment mainnet2 --chain-name solana --remote-domain 56 set --gas-overhead 159736

@daniel-savu daniel-savu enabled auto-merge (squash) September 7, 2023 13:08
@daniel-savu daniel-savu merged commit 4a5209d into main Sep 7, 2023
24 checks passed
@daniel-savu daniel-savu deleted the dan/sealevel-igp-tooling branch September 7, 2023 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants