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

test: make prove commit work with maat #684

Merged
merged 8 commits into from
Jan 22, 2025
Merged

test: make prove commit work with maat #684

merged 8 commits into from
Jan 22, 2025

Conversation

th7nder
Copy link
Contributor

@th7nder th7nder commented Jan 20, 2025

Description

Partially fixes #615, #381.
Now maat does not depend on hard-coded values but uses the same logic as the pipeline does.
The PoSt logic will come in a follow-up PR, I don't want to make this a bigger one.

2025-01-22T12:53:41.132156Z DEBUG subxt_core::events: Decoding Event 'System::ExtrinsicSuccess'
2025-01-22T12:53:41.132207Z  INFO polka_storage_provider_common::sector: Successfully proven sectors on-chain: [SectorsProven { owner: AccountId32([144, 181, 171, 32, 92, 105, 116, 201, 234, 132, 27, 230, 136, 134, 70, 51, 220, 156, 168, 163, 87, 132, 62, 234, 207, 35, 20, 100, 153, 101, 254, 34]), sectors: BoundedVec([ProveCommitResult { sector_number: SectorNumber(1), partition_number: 0, deadline_idx: 0 }]) }]
test real_world_use_case ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 648.44s

   Doc-tests maat

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

Important points for reviewers

It basically moves the important logic to the UnsealedSector, PreCommittedSector, ProvenSector types.
Those structs become empowered so they can be used in the maat.
Pipeline is just calling them and saving state.

Checklist

  • Are there important points that reviewers should know?
    • If yes, which ones?
  • Make sure that you described what this change does.
  • If there are follow-ups, have you created issues for them?
    • If yes, which ones? / List them here
  • Have you tested this solution?
  • Were there any alternative implementations considered?
  • Did you document new (or modified) APIs?

@th7nder th7nder added the tech debt Flags technical debt label Jan 20, 2025
@th7nder th7nder added this to the Phase 3 milestone Jan 20, 2025
@th7nder th7nder self-assigned this Jan 20, 2025
@th7nder th7nder changed the title refactor: extract pipeline steps test: make prove commit work with maat Jan 22, 2025
@th7nder th7nder marked this pull request as ready for review January 22, 2025 12:59
@th7nder th7nder added the ready for review Review is needed label Jan 22, 2025
jmg-duarte
jmg-duarte previously approved these changes Jan 22, 2025
Copy link
Contributor

@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.

LGTM

storage-provider/common/src/sector.rs Show resolved Hide resolved
storage-provider/common/src/sector.rs Outdated Show resolved Hide resolved
maat/Cargo.toml Outdated Show resolved Hide resolved
storage-provider/common/src/sector.rs Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
@th7nder th7nder added ready for review Review is needed and removed ready for review Review is needed labels Jan 22, 2025
@th7nder th7nder requested review from jmg-duarte and cernicc January 22, 2025 14:57
@th7nder th7nder enabled auto-merge (squash) January 22, 2025 15:06
@th7nder th7nder merged commit 220fc92 into develop Jan 22, 2025
5 checks passed
@th7nder th7nder deleted the fix/615/maat branch January 22, 2025 15:23
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 tech debt Flags technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix(maat): refactor it so it uses pipeline as a library
3 participants