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

Use component delegation pattern for core relayer components #3539

Merged
merged 28 commits into from
Aug 15, 2023

Conversation

soareschen
Copy link
Contributor

Part of: informalsystems/hermes-sdk#9

Description

This PR introduces a component delegation pattern, and allow auto implementation of components when they implement the trait DelegateComponent<ComponentName>.

Compared to the earlier work in #3528, we only need a delegate_component! macro to implement DelegateComponent for components to delegate the implementation to another component. This eliminates the need to define multiple macros for each component trait. A plural delegate_components! macro is also introduced, to allow forwarding of multiple component implementations to the same delegated component.


PR author checklist:

  • Added changelog entry, using unclog.
  • Added tests: integration (for Hermes) or unit/mock tests (for modules).
  • Linked to GitHub issue.
  • Updated code comments and documentation (e.g., docs/).
  • Tagged one reviewer who will be the one responsible for shepherding this PR.

Reviewer checklist:

  • Reviewed Files changed in the GitHub PR explorer.
  • Manually tested (in case integration/unit/mock tests are absent).

@soareschen soareschen added the O: relayer-next Objective: work toward relayer v2 label Aug 15, 2023
@soareschen soareschen merged commit 9579ec6 into soares/relayer-next Aug 15, 2023
50 of 51 checks passed
@soareschen soareschen deleted the soares/delegate-component branch August 15, 2023 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O: relayer-next Objective: work toward relayer v2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant