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

Storage Mining Module #587

Closed
wants to merge 21 commits into from
Closed

Storage Mining Module #587

wants to merge 21 commits into from

Conversation

ergastic
Copy link

@ergastic ergastic commented Nov 12, 2019

What's in this PR?

  • Definition of the interface for storage mining module.
  • Definition of the Interface for the Node functionality needed by the storage mining module.
  • Implementation of the Node interface for Lotus.

ergastic added 9 commits November 4, 2019 09:42
…mentations for MostRecentState (renamed from MostRecentStateId,) GetMinerState, GetRandomness and GetProvingPeriod.
…mentations for MostRecentState (renamed from MostRecentStateId,) GetMinerState, GetRandomness and GetProvingPeriod.
…Deal, SubmitDeclaredRecoveries and GetSealSeed. Improved state change notifications.
2. Changed deals from []cid.Cid to []uint64 on SubmitSectorPreCommitment.

3. Added deals ([]uint64) to SubmitSectorCommitment.
@deltazxm
Copy link

Can a storage miner adapter multiple fullnode

Copy link
Member

@anorth anorth left a comment

Choose a reason for hiding this comment

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

Great progress.

Process-wise, I think you're trying to do slightly too much all at once. Scope this down to just the subscription mechanism and the straightforward Node methods, then let's fill out the rest in subsequent PRs. When this PR is ready for Lotus team review, it would ideally contain only working code.

The adapter needs tests. I'm not yet familiar with how to set up a unit test involving a full node (hopefully there's an in-process way to construct one). If there's not an obvious example lying around please ask lotus-dev directly (in public, so we can all learn).

smm/node.go Outdated Show resolved Hide resolved
smm/node.go Outdated Show resolved Hide resolved
smm/node.go Show resolved Hide resolved
smm/node.go Outdated Show resolved Hide resolved
smm/node.go Outdated Show resolved Hide resolved
smm/lotus_adapter.go Outdated Show resolved Hide resolved
smm/lotus_adapter.go Show resolved Hide resolved
smm/lotus_adapter.go Outdated Show resolved Hide resolved
smm/lotus_adapter.go Outdated Show resolved Hide resolved
smm/lotus_adapter.go Outdated Show resolved Hide resolved
@anorth
Copy link
Member

anorth commented Nov 13, 2019

Can a storage miner adapter multiple fullnode

No plan for a miner module to work with multiple nodes at present, though there should be no great barrier to operators implementing something like that.

ergastic added 5 commits November 13, 2019 13:10
2. Added synchronization for event listeners.

3. Reading and returning the initial state when adapter is created.
2. Added actor address.

3. Removed epoch from GetRandomness as StateKey has implicit epoch.

4. Added unit tests for node creation, GetMinerState, GetProvingPeriod and GetRandomness.
2. Refactoring to reduce code duplication.

3. Implementation sketch for SubmitSelfDeals.
@mishmosh
Copy link
Contributor

More test coverage is coming, as are self-deals. But this is ready for another look from @anorth and a first pass from @magik6k or @Kubuxu or @whyrusleeping.

smm/lotus_adapter.go Outdated Show resolved Hide resolved
smm/lotus_adapter.go Outdated Show resolved Hide resolved
smm/lotus_adapter.go Outdated Show resolved Hide resolved
smm/lotus_adapter.go Outdated Show resolved Hide resolved
smm/lotus_adapter.go Outdated Show resolved Hide resolved
smm/lotus_adapter.go Outdated Show resolved Hide resolved
smm/lotus_adapter.go Outdated Show resolved Hide resolved
smm/lotus_adapter_test.go Outdated Show resolved Hide resolved
smm/lotus_adapter.go Outdated Show resolved Hide resolved
@ergastic ergastic changed the title WIP: Storage Mining Module Storage Mining Module Nov 20, 2019
@ergastic ergastic requested a review from anorth November 20, 2019 17:47
@ergastic ergastic marked this pull request as ready for review November 20, 2019 18:11
@whyrusleeping
Copy link
Member

Closing this as abandoned

@Kubuxu Kubuxu deleted the feat/storage-mining-module branch May 13, 2020 20:48
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.

6 participants