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

Integrate relayer spike into relayer crate #335

Merged
merged 30 commits into from
Oct 22, 2020
Merged

Conversation

romac
Copy link
Member

@romac romac commented Oct 21, 2020

Description

This PR is based on #210 (and supersedes it) and integrate the relayer spike into the relayer crate.

For now, only minimal changes have been made to the original code, just what was needed to depend on the actual tendermint and ibc types + clippy lints.

Additionally, a new v0 command has been added, which contains the code of the spike's main function.

Also, the relayer-spike README has been moved to the docs/architecture folder.


For contributor use:

  • Unit tests written
  • Added test to CI if applicable
  • Updated CHANGELOG_PENDING.md
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Updated relevant documentation (docs/) and code comments
  • Re-reviewed Files changed in the Github PR explorer

brapse and others added 25 commits August 17, 2020 12:28
    + Implement the proper pipeline of types from IBCEvent to Packet to
    Transactions etc.
    + Move client updates to be bundled in transactions
    + The system model for IBC requires that a correct relayer persist
    in trying to submit packets even with semantic failures.
    + Implement a sketch of retry logic
    + TODO: Add proper error handling
    + Introduce a Failed link error to signal to a future supervisor
    process that a link needs to be re-established with a different full
    node.
Copy link
Collaborator

@ancazamfir ancazamfir left a comment

Choose a reason for hiding this comment

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

Looks great, we can start working on the different pieces.

@codecov-io
Copy link

Codecov Report

Merging #335 into master will increase coverage by 22.8%.
The diff coverage is 64.8%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #335      +/-   ##
=========================================
+ Coverage    13.6%   36.5%   +22.8%     
=========================================
  Files          69     127      +58     
  Lines        3752    8168    +4416     
  Branches     1374    2827    +1453     
=========================================
+ Hits          513    2986    +2473     
- Misses       2618    5009    +2391     
+ Partials      621     173     -448     
Impacted Files Coverage Δ
modules/src/events.rs 0.0% <0.0%> (ø)
modules/src/ics02_client/events.rs 0.0% <ø> (ø)
modules/src/ics02_client/raw.rs 0.0% <0.0%> (ø)
modules/src/ics03_connection/error.rs 15.0% <0.0%> (-18.4%) ⬇️
modules/src/ics04_channel/error.rs 75.0% <ø> (+50.0%) ⬆️
modules/src/ics04_channel/packet.rs 0.0% <0.0%> (ø)
modules/src/ics07_tendermint/client_def.rs 0.0% <0.0%> (ø)
modules/src/ics07_tendermint/error.rs 75.0% <ø> (+75.0%) ⬆️
modules/src/ics18_relayer/error.rs 0.0% <0.0%> (ø)
modules/src/ics26_routing/error.rs 75.0% <0.0%> (ø)
... and 233 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2495af7...9f3ce6b. Read the comment docs.

@romac romac merged commit e3e28b5 into master Oct 22, 2020
@romac romac deleted the romac/integrate-spike branch October 22, 2020 10:22
@brapse brapse mentioned this pull request Nov 2, 2020
hu55a1n1 pushed a commit to hu55a1n1/hermes that referenced this pull request Sep 13, 2022
* Incomplete Pseudo code which compiles

* commit notes and sketches from first sync

* It compiles but still very rough

* Introduce ForeignClient

* Move update client to ForeignClient

* Introduce ChainRuntime

* Introduce subscriptions

* Type alias

* Introduce Chain as a trait ^_^

* Re-add update_client logic

* update notes

* Silence warnings for now

* Add error handling

* Fixup sequences of dependencies

* move client updates to ForeignClient

* Significant progress:

    + Implement the proper pipeline of types from IBCEvent to Packet to
    Transactions etc.
    + Move client updates to be bundled in transactions

* Add error handling for packet creation

* Implement submission retry:

    + The system model for IBC requires that a correct relayer persist
    in trying to submit packets even with semantic failures.
    + Implement a sketch of retry logic
    + TODO: Add proper error handling

* Attempt to add proper error handling to retry loop

* Bugfix: ClientUpdate should be attempt specific

* LinkError:Failed

    + Introduce a Failed link error to signal to a future supervisor
    process that a link needs to be re-established with a different full
    node.

* Make chains private to links

* Document intentions

* Integrate relayer spike into relayer crate

* Remove comment in workspace Cargo.toml

* Move spike main function into v0 command

* Update changelog

Co-authored-by: Sean Braithwaite <brapse@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants