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

Sealevel igp indexing #2585

Merged
merged 52 commits into from
Aug 30, 2023
Merged

Sealevel igp indexing #2585

merged 52 commits into from
Aug 30, 2023

Conversation

daniel-savu
Copy link
Contributor

@daniel-savu daniel-savu commented Jul 31, 2023

Description

Depends on #2583

Indexes IGP payments related to the relayer's data pda address. Unless this address is specified in the config (sealevel.relayer_account ), no filtering is applied and all IGP payments are stored in the local database.

Drive-by changes

  • Sets HYP_BASE_GASPAYMENTENFORCEMENT in run-locally for the relayer, to test that it correctly indexes the IGP payment before submitting the message
  • A new config section (sealevel) is added to the relayer
  • The MessageIndexer trait is replaced with SequenceIndexer<HyperlaneMessage>, renaming fetch_count_at_tip to sequence_at_tip. SequenceIndexer is now common to both the message and igp indexers.
  • The parse_addr macro is modified so it can be reused when parsing the sealevel relayer address config too
  • rust/utils/sealevel-test.bash is included because I was using it to test locally, but I can remove it if the sealevel e2e test already does all the steps there @mattiecnvr
  • Performs a try_into conversion that can be removed once 64-bit block heights #2610 is done

Related issues

Backward compatibility

Testing

e2e tests but the pipeline is failing, likely fixed by #2602

@codecov
Copy link

codecov bot commented Jul 31, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (17a6e79) 64.50% compared to head (c17129a) 64.50%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2585   +/-   ##
=======================================
  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 changed the title WIP: sealevel igp indexing Sealevel igp indexing Aug 3, 2023
@daniel-savu daniel-savu marked this pull request as ready for review August 3, 2023 16:33
Copy link
Contributor

@mattiekat mattiekat left a comment

Choose a reason for hiding this comment

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

Approved assuming the E2E tests get resolved

rust/chains/hyperlane-sealevel/src/interchain_gas.rs Outdated Show resolved Hide resolved
rust/chains/hyperlane-ethereum/src/interchain_gas.rs Outdated Show resolved Hide resolved
rust/chains/hyperlane-ethereum/src/mailbox.rs Outdated Show resolved Hide resolved
rust/chains/hyperlane-sealevel/src/interchain_gas.rs Outdated Show resolved Hide resolved
rust/chains/hyperlane-sealevel/src/interchain_gas.rs Outdated Show resolved Hide resolved
rust/chains/hyperlane-sealevel/src/utils.rs Show resolved Hide resolved
rust/utils/run-locally/src/main.rs Show resolved Hide resolved
rust/utils/sealevel-test.bash Outdated Show resolved Hide resolved
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! Only thing that's important is my question about backward sequence indexing

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! some suggestions and questions

rust/agents/scraper/src/agent.rs Outdated Show resolved Hide resolved
rust/chains/hyperlane-ethereum/src/mailbox.rs Show resolved Hide resolved
rust/utils/run-locally/src/config.rs Show resolved Hide resolved
rust/utils/run-locally/src/invariants.rs Show resolved Hide resolved
rust/utils/run-locally/src/main.rs Show resolved Hide resolved
rust/utils/run-locally/src/invariants.rs Outdated Show resolved Hide resolved
@daniel-savu daniel-savu enabled auto-merge (squash) August 30, 2023 18:07
@daniel-savu daniel-savu merged commit 71e8988 into main Aug 30, 2023
23 of 24 checks passed
@daniel-savu daniel-savu deleted the dan/sealevel-igp-indexing branch August 30, 2023 18:27
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.

Sealevel: index gas payments in relayer
3 participants