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(commd): calculate commd #423

Merged
merged 26 commits into from
Oct 9, 2024
Merged

feat(commd): calculate commd #423

merged 26 commits into from
Oct 9, 2024

Conversation

cernicc
Copy link
Member

@cernicc cernicc commented Oct 3, 2024

Description

I am very very sorry for the large PR, but when I started implementing commd. I noticed that there are other things needed and that stuff was just piling on.

This PR contains:

  • Added PaddedSectorSize and UnpaddedSectorSize. To easier reason what kind of sizes are being passed around.
  • commitments to cids conversions were moved to one place
  • Changed the CommP calculation so that the source received should be already padded
  • Implement the CommD calculation

Checklist

  • Make sure that you described what this change does.
  • Have you tested this solution?
  • Did you document new (or modified) APIs?

@cernicc cernicc added this to the Phase 2 milestone Oct 3, 2024
@cernicc cernicc self-assigned this Oct 3, 2024
@cernicc cernicc linked an issue Oct 3, 2024 that may be closed by this pull request
cli/polka-storage-provider/src/commands/utils/mod.rs Outdated Show resolved Hide resolved
pallets/market/src/commd.rs Outdated Show resolved Hide resolved
pallets/market/src/commd.rs Outdated Show resolved Hide resolved
pallets/market/src/commd.rs Outdated Show resolved Hide resolved
pallets/market/src/commd.rs Outdated Show resolved Hide resolved
pallets/market/src/lib.rs Outdated Show resolved Hide resolved
pallets/market/src/lib.rs Outdated Show resolved Hide resolved
primitives/proofs/src/types.rs Show resolved Hide resolved
primitives/shared/src/commitment/mod.rs Outdated Show resolved Hide resolved
primitives/shared/src/commitment/mod.rs Outdated Show resolved Hide resolved
primitives/shared/src/piece.rs Outdated Show resolved Hide resolved
primitives/shared/Cargo.toml Outdated Show resolved Hide resolved
primitives/shared/src/piece.rs Outdated Show resolved Hide resolved
primitives/shared/src/piece.rs Outdated Show resolved Hide resolved
primitives/shared/Cargo.toml Outdated Show resolved Hide resolved
primitives/shared/src/commitment/zero.rs Outdated Show resolved Hide resolved
primitives/shared/src/commitment/mod.rs Outdated Show resolved Hide resolved
primitives/proofs/src/types.rs Show resolved Hide resolved
pallets/market/src/commd.rs Outdated Show resolved Hide resolved
cli/polka-storage-provider/src/commands/utils/mod.rs Outdated Show resolved Hide resolved
cli/polka-storage-provider/src/commands/utils/mod.rs Outdated Show resolved Hide resolved
@th7nder th7nder mentioned this pull request Oct 8, 2024
38 tasks
@cernicc cernicc added the ready for review Review is needed label Oct 9, 2024
@cernicc cernicc added ready for review Review is needed and removed ready for review Review is needed labels Oct 9, 2024
th7nder
th7nder previously approved these changes Oct 9, 2024
pallets/market/src/mock.rs Outdated Show resolved Hide resolved
pallets/market/src/commd.rs Outdated Show resolved Hide resolved
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.

I think the docs need improvement.

It's hard to pick them up without the context that you have and we should improve upon that since the final client is a community after all.

I've left some comments on some interfaces too

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.

Amazing job ❤️

primitives/commitment/src/commd.rs Show resolved Hide resolved
@jmg-duarte jmg-duarte enabled auto-merge (squash) October 9, 2024 12:49
@jmg-duarte jmg-duarte added ready for review Review is needed and removed ready for review Review is needed labels Oct 9, 2024
@jmg-duarte jmg-duarte merged commit 7541a46 into develop Oct 9, 2024
5 checks passed
@jmg-duarte jmg-duarte deleted the feat'92/compute_commd branch October 9, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for review Review is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Market Pallet: port compute_commd
4 participants