Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

move the Repo from Ipfs to IpfsFuture#264

Closed
ljedrz wants to merge 9 commits intors-ipfs:masterfrom
ljedrz:current
Closed

move the Repo from Ipfs to IpfsFuture#264
ljedrz wants to merge 9 commits intors-ipfs:masterfrom
ljedrz:current

Conversation

@ljedrz
Copy link
Member

@ljedrz ljedrz commented Jul 27, 2020

As far as I can tell from the comments, this has been the plan / target design for a while now. These changes carry a few important improvements:

  • Ipfs is no longer generic 🎉 (a huge advantage for IPFS-as-a-library)
  • no more back-and-forth between Ipfs and IpfsFuture via RepoEvents
  • the Ipfs methods become uniform in the way they work
  • there is no longer a need for Ipfs to be within an Arc (though it might be preferable for future-proofing)

This is still a work in progress, as:

  • 2 Ipfs methods remain to be converted
  • 2 RepoEvent functionalities need to be re-introduced
  • the crate tests need to be adjusted
  • the wantlist_and_cancellation test needs to be fixed

The conformance tests (excluding the aforementioned missing bits) agree with these changes.

@ljedrz ljedrz force-pushed the current branch 3 times, most recently from 1927c5b to 0efe8f6 Compare July 28, 2020 12:42
ljedrz added 6 commits July 28, 2020 15:10
Signed-off-by: ljedrz <ljedrz@gmail.com>
Signed-off-by: ljedrz <ljedrz@gmail.com>
Signed-off-by: ljedrz <ljedrz@gmail.com>
Signed-off-by: ljedrz <ljedrz@gmail.com>
if let RequestKind::GetBlock(cid) = req {
Ok(IpfsEvent::CancelBlock(cid))
} else {
Err("logic error: RepoEvent can only be created from a Request::GetBlock")
Copy link
Member Author

Choose a reason for hiding this comment

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

Suggested change
Err("logic error: RepoEvent can only be created from a Request::GetBlock")
Err("logic error: IpfsEvent can only be created from a Request::GetBlock")

ljedrz added 2 commits July 28, 2020 16:50
Signed-off-by: ljedrz <ljedrz@gmail.com>
Signed-off-by: ljedrz <ljedrz@gmail.com>
Signed-off-by: ljedrz <ljedrz@gmail.com>
bors bot added a commit that referenced this pull request Jul 30, 2020
271: Adjust subscription locking r=ljedrz a=koivunej

Fixes the number of critical sections in SubscriptionFuture from 2 to 1, helping out with the hangs in exchange_block which have been recorded in #134. Also backports the `related_subs` cleanup from #264.

Co-authored-by: Joonas Koivunen <joonas@equilibrium.co>
@ljedrz
Copy link
Member Author

ljedrz commented Jul 30, 2020

Closing this one for now, as it's a spicy change set; we might go back to this approach in the future.

@ljedrz ljedrz closed this Jul 30, 2020
@ljedrz ljedrz deleted the current branch September 10, 2020 10:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant