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: refactor warp monitor to use WarpCore config #4835

Merged
merged 33 commits into from
Nov 8, 2024

Conversation

tkporter
Copy link
Collaborator

@tkporter tkporter commented Nov 7, 2024

Description

  • Removes the warp monitor specific config format and all the handcrafted yamls from infra

  • Massive refactor to warp monitor to accommodate this -- tried to make it a bit easier to work work by splitting it into a few files. The changes are generally backward compatible with some small exceptions, like now the metrics use the TokenStandard instead of TokenType (the former is present in the warp core config, the latter isn't, and there's no way atm to map from the former to the latter)

  • The warp monitor now takes in a warp ID and gets its config from the registry (recall this is the registry version defined in .registryrc if running in the monorepo image)

  • Deploying the warp monitor now lets you do many at a time and select the ones to deploy interactively. This makes it a bit easier to work with the warp IDs

  • The names of the warp deploys are based on the warp IDs. Because warp IDs can change as new chains are added, this may cause issues in the future - we'll just need to be cautious of removing the old release to avoid accidentally having 2 of them. For now I think this is fine. The helm release names are also capped at 53 chars so they needed to be truncated

  • Some changes to the SDK to get the necessary data here. Happy to pull some of these into the warp monitor if people feel they're inappropriate for the SDK (like the getBridgedSupply)

  • Added a test to make sure any warp route IDs in infra are found in the registry

  • Corresponding PR to the registry here feat: add coinGeckoId to tokens in warp configs hyperlane-registry#370

Drive-by changes

Related issues

Backward compatibility

Testing

Copy link

changeset-bot bot commented Nov 7, 2024

⚠️ No Changeset found

Latest commit: 3aa7042

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.58%. Comparing base (0754d62) to head (3aa7042).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4835   +/-   ##
=======================================
  Coverage   74.58%   74.58%           
=======================================
  Files         103      103           
  Lines        1515     1515           
  Branches      195      195           
=======================================
  Hits         1130     1130           
  Misses        364      364           
  Partials       21       21           
Components Coverage Δ
core 84.61% <ø> (ø)
hooks 77.77% <ø> (ø)
isms 79.02% <ø> (ø)
token 89.01% <ø> (ø)
middlewares 77.58% <ø> (ø)

@tkporter tkporter changed the title DRAFT warp monitor refactor feat: refactor warp monitor to use WarpCore config Nov 7, 2024
@tkporter tkporter marked this pull request as ready for review November 7, 2024 20:07
github-merge-queue bot pushed a commit that referenced this pull request Nov 8, 2024
…ema (#4842)

### Description

- Ripped out of
#4835, which is
necessary so I can merge and release
hyperlane-xyz/hyperlane-registry#370 before 4835

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
Copy link
Contributor

@jmrossy jmrossy left a comment

Choose a reason for hiding this comment

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

This is great 🔥

typescript/infra/scripts/warp-routes/monitor/utils.ts Outdated Show resolved Hide resolved
typescript/sdk/src/token/Token.ts Show resolved Hide resolved
typescript/sdk/src/token/Token.ts Outdated Show resolved Hide resolved
github-merge-queue bot pushed a commit to hyperlane-xyz/hyperlane-registry that referenced this pull request Nov 8, 2024
### Description

This adds a `coinGeckoId` to get an approximate USD value of the token.
Some tokens are not yet listed on Coingecko, so an appropriate
substitute is chosen.

The motivation for this is
hyperlane-xyz/hyperlane-monorepo#4835 -- we are
removing the special "deployment yaml" that was used by the warp monitor
service in favor of WarpCore.

~~The corresponding zod change is in
hyperlane-xyz/hyperlane-monorepo#4835 here
https://github.com/hyperlane-xyz/hyperlane-monorepo/pull/4835/files#diff-5d9f643079328fbbe587e59bc31d809c46b98037c045d2df3931b22acf87691fR50
and hasn't yet been released. I'm happy to get that zod change in and do
an SDK release first if preferred, though as extra fields are permitted
by our types I am cheekliy trying to save myself the hassle~~

This needs to be merged first
hyperlane-xyz/hyperlane-monorepo#4842, then this
PR, then hyperlane-xyz/hyperlane-monorepo#4835

### Backward compatibility

Backward compatible (our schemas allow extra params, see above, happy to
do the sdk release though)

### Testing

<!--
Have any new metadata configs and deployment addresses been used with
any Hyperlane tooling, such as the CLI?
-->
Copy link
Contributor

@jmrossy jmrossy left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@tkporter tkporter enabled auto-merge November 8, 2024 19:17
Copy link
Contributor

@paulbalaji paulbalaji left a comment

Choose a reason for hiding this comment

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

lgtm overall

@tkporter tkporter added this pull request to the merge queue Nov 8, 2024
Merged via the queue into main with commit 9fcd592 Nov 8, 2024
34 checks passed
@tkporter tkporter deleted the trevor/warp-monitor-warpcore branch November 8, 2024 21:33
github-merge-queue bot pushed a commit that referenced this pull request Nov 11, 2024
### Description

- Forgot to add a changeset here
#4835 - this is
the changeset for that PR

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
tiendn pushed a commit to tiendn/hyperlane-monorepo that referenced this pull request Jan 11, 2025
…ema (hyperlane-xyz#4842)

### Description

- Ripped out of
hyperlane-xyz#4835, which is
necessary so I can merge and release
hyperlane-xyz/hyperlane-registry#370 before 4835

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
tiendn pushed a commit to tiendn/hyperlane-monorepo that referenced this pull request Jan 11, 2025
### Description

- Removes the warp monitor specific config format and all the
handcrafted yamls from infra
- Massive refactor to warp monitor to accommodate this -- tried to make
it a bit easier to work work by splitting it into a few files. The
changes are generally backward compatible with some small exceptions,
like now the metrics use the `TokenStandard` instead of `TokenType` (the
former is present in the warp core config, the latter isn't, and there's
no way atm to map from the former to the latter)
- The warp monitor now takes in a warp ID and gets its config from the
registry (recall this is the registry version defined in `.registryrc`
if running in the monorepo image)
- Deploying the warp monitor now lets you do many at a time and select
the ones to deploy interactively. This makes it a bit easier to work
with the warp IDs
- The names of the warp deploys are based on the warp IDs. Because warp
IDs can change as new chains are added, this may cause issues in the
future - we'll just need to be cautious of removing the old release to
avoid accidentally having 2 of them. For now I think this is fine. The
helm release names are also capped at 53 chars so they needed to be
truncated
- Some changes to the SDK to get the necessary data here. Happy to pull
some of these into the warp monitor if people feel they're inappropriate
for the SDK (like the `getBridgedSupply`)
- Added a test to make sure any warp route IDs in infra are found in the
registry

- Corresponding PR to the registry here
hyperlane-xyz/hyperlane-registry#370

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
tiendn pushed a commit to tiendn/hyperlane-monorepo that referenced this pull request Jan 11, 2025
…4846)

### Description

- Forgot to add a changeset here
hyperlane-xyz#4835 - this is
the changeset for that PR

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
tiendn pushed a commit to tiendn/hyperlane-monorepo that referenced this pull request Jan 11, 2025
…ema (hyperlane-xyz#4842)

### Description

- Ripped out of
hyperlane-xyz#4835, which is
necessary so I can merge and release
hyperlane-xyz/hyperlane-registry#370 before 4835

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
tiendn pushed a commit to tiendn/hyperlane-monorepo that referenced this pull request Jan 11, 2025
### Description

- Removes the warp monitor specific config format and all the
handcrafted yamls from infra
- Massive refactor to warp monitor to accommodate this -- tried to make
it a bit easier to work work by splitting it into a few files. The
changes are generally backward compatible with some small exceptions,
like now the metrics use the `TokenStandard` instead of `TokenType` (the
former is present in the warp core config, the latter isn't, and there's
no way atm to map from the former to the latter)
- The warp monitor now takes in a warp ID and gets its config from the
registry (recall this is the registry version defined in `.registryrc`
if running in the monorepo image)
- Deploying the warp monitor now lets you do many at a time and select
the ones to deploy interactively. This makes it a bit easier to work
with the warp IDs
- The names of the warp deploys are based on the warp IDs. Because warp
IDs can change as new chains are added, this may cause issues in the
future - we'll just need to be cautious of removing the old release to
avoid accidentally having 2 of them. For now I think this is fine. The
helm release names are also capped at 53 chars so they needed to be
truncated
- Some changes to the SDK to get the necessary data here. Happy to pull
some of these into the warp monitor if people feel they're inappropriate
for the SDK (like the `getBridgedSupply`)
- Added a test to make sure any warp route IDs in infra are found in the
registry

- Corresponding PR to the registry here
hyperlane-xyz/hyperlane-registry#370

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
tiendn pushed a commit to tiendn/hyperlane-monorepo that referenced this pull request Jan 11, 2025
…4846)

### Description

- Forgot to add a changeset here
hyperlane-xyz#4835 - this is
the changeset for that PR

### Drive-by changes

<!--
Are there any minor or drive-by changes also included?
-->

### Related issues

<!--
- Fixes #[issue number here]
-->

### Backward compatibility

<!--
Are these changes backward compatible? Are there any infrastructure
implications, e.g. changes that would prohibit deploying older commits
using this infra tooling?

Yes/No
-->

### Testing

<!--
What kind of testing have these changes undergone?

None/Manual/Unit Tests
-->
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.

4 participants