paritytech / paritytech/web3-storage
Investigate optimal provider deregistration
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 12
- Forks
- 3
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 33
Description
Currently we made provider deregistration 2-step (#80), but that may still be suboptimal. We need to think about ease of use locally as well, as e.g. #96 showed that the state remains polluted between test runs due to deregistration period not having passed. In that case it was circumvented with a sudo fast-forward, but there might be something more optimal overall.
Details
Fair point for the runtime, and good to know it's covered. Here though the problem was for local reruns on the same global setup: the account used for acknowledging the UI state didn't completely deregister, so it never saw the right screen. But I guess instead of skipping that particular test if the Ferdie account is already there like I did initially I'll try sudo removing the thing to make tests more reproducible. Not that it's a CI problem, but still.
@ilchu For decentralization, I would not use sudo on specific logic.
Originally, the provider deregistration flow is just check if provider's commit_bytes is 0; to be more specific we should check provider is not in charge any buckets. This way provider can instantly leave; but to do that, we have to iterate the whole buckets storage to examine (not cost effective).
My fixes introduce provider deregistration in 2 steps may not ideal as well. However, we can fallback to original with additional storage mapping to trace provider's buckets easier, or when look deeper there are better solutions for this.
Let's open a issue for this, we'll investigate more.
Originally posted by @danielbui12 in https://github.com/paritytech/web3-storage/issues/96#issuecomment-4569305186
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the two-step deregistration change in #80 and the local rerun problem described in #96. Trace the existing provider deregistration flow and how provider bucket ownership is represented. Done should mean a documented, agreed approach that improves deregistration behavior without making storage checks impractical.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, distributed-systems
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100