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

feat(polka-storage-provider): submit PoSt on the pipeline #617

Merged
merged 23 commits into from
Dec 4, 2024

Conversation

th7nder
Copy link
Contributor

@th7nder th7nder commented Nov 28, 2024

Description

Here it is.

  1. When the pipeline starts it schedules a PipelineMessage::SchedulePoSts message, which spawns a message per deadline index.
  2. Each PipelineMessage::SubmitWindowedPoSt message gets the deadline info, waits for its challenge block to be finalized, then generates the proof with fetching partitions and sectors from on-chain.
  3. After it's done, it ain't proving more, as there is a follow-up task to reschedule the message.

From the 'code' perspective:

  1. Adds/changes two runtime APIs StorageProviderApi::deadline_info and StorageProviderApi::deadline_state. I separated them just because, not sure about this design decision, maybe will improve in the followup.
  2. Queries the chain for a constant, nice example StorageProviderClientExt::proving_period_info.
  3. Exports lots of types to primitives, like PartitionNumbers and some constants.
  4. Forces storage provider server to require post-proof key at the start-up, hence the docs changes as well.

Oh yeah, I'd forget...
just testnet && examples/rpc_publish.sh examples/test-data-big.txt and go make yourself some tea!
The proofs just work.

Closes #596.

Checklist

@th7nder th7nder added the node-storage-provider Related to the storage provider node. label Nov 28, 2024
@th7nder th7nder added this to the Phase 3 milestone Nov 28, 2024
@th7nder th7nder self-assigned this Nov 28, 2024
@th7nder th7nder force-pushed the feat/596/post-pipeline branch from e444fe9 to b593cf8 Compare November 29, 2024 11:48
@th7nder th7nder force-pushed the feat/596/post-pipeline branch from 31f7fd9 to ed6258c Compare December 2, 2024 22:37
@th7nder th7nder marked this pull request as ready for review December 2, 2024 22:37
@th7nder th7nder requested a review from a team December 2, 2024 22:38
Copy link
Collaborator

@jmg-duarte jmg-duarte left a comment

Choose a reason for hiding this comment

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

Small nits

docs/src/getting-started/storage-provider.md Outdated Show resolved Hide resolved
storagext/lib/src/types/storage_provider.rs Outdated Show resolved Hide resolved
pallets/storage-provider/src/lib.rs Outdated Show resolved Hide resolved
storage-provider/server/src/main.rs Outdated Show resolved Hide resolved
@th7nder th7nder added the ready for review Review is needed label Dec 3, 2024
@th7nder th7nder added ready for review Review is needed and removed ready for review Review is needed labels Dec 3, 2024
@th7nder th7nder mentioned this pull request Dec 3, 2024
17 tasks
@th7nder th7nder added ready for review Review is needed and removed ready for review Review is needed labels Dec 3, 2024
@th7nder th7nder requested a review from jmg-duarte December 3, 2024 12:05
@th7nder th7nder added ready for review Review is needed and removed ready for review Review is needed labels Dec 3, 2024
@th7nder th7nder added ready for review Review is needed and removed ready for review Review is needed labels Dec 3, 2024
cernicc
cernicc previously approved these changes Dec 4, 2024
Copy link
Member

@cernicc cernicc left a comment

Choose a reason for hiding this comment

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

Good work 💪

@th7nder th7nder added ready for review Review is needed and removed ready for review Review is needed labels Dec 4, 2024
@th7nder th7nder requested review from cernicc and aidan46 December 4, 2024 08:48
@jmg-duarte jmg-duarte merged commit 8728c61 into develop Dec 4, 2024
5 checks passed
@jmg-duarte jmg-duarte deleted the feat/596/post-pipeline branch December 4, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node-storage-provider Related to the storage provider node. ready for review Review is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Submit Windowed PoSt in the Pipeline
4 participants