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

Cyclic dependency between light-client and testgen crates #605

Closed
adizere opened this issue Oct 2, 2020 · 0 comments · Fixed by #606
Closed

Cyclic dependency between light-client and testgen crates #605

adizere opened this issue Oct 2, 2020 · 0 comments · Fixed by #606
Labels
feature light-client Issues/features which involve the light client

Comments

@adizere
Copy link
Member

adizere commented Oct 2, 2020

As part of testing the IBC relayer in ibc-rs, we would like to have the capability of generating light blocks. See, for instance, this issue informalsystems/hermes#158.

After discussing briefly with @andrey-kuprianov and @Shivani912, I understand that this is the current state of the light block generation testgen feature:

  • light block generation feature was added (Adds light block generation to testgen #534) but unfortunately it also introduced a circular dependency between crates testgen and light-client;
  • the feature was subsequently reverted (Fixes dependency loop #545), fixing the dependency loop;
  • the cause for the dependency loop seems to be in the LightBlock struct, which testgen needs but it's defined in light-client (so the former crate would need to depend on the latter)

Possible solutions to avoiding the dependency loop:

  • Option 1. Shivani has a branch Testgen: LightBlock generation without cyclic dependency #606 with the feature, and the temporary fix is to copy the LightBlock definition into testgen
  • Option 2. Move the LightBlock outside of light-client crate and into some (new?) "common types" crate, so that both light-client and testgen would depend on this new crate.

Other solutions or thoughts?

@adizere adizere added light-client Issues/features which involve the light client feature labels Oct 2, 2020
@adizere adizere linked a pull request Oct 2, 2020 that will close this issue
5 tasks
@romac romac changed the title Light block generation [testgen] Cyclic dependency between light-client and testgen crates Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature light-client Issues/features which involve the light client
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant