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

fix(storagext): implement declare faults_recovered #206

Merged
merged 2 commits into from
Aug 16, 2024
Merged

Conversation

jmg-duarte
Copy link
Contributor

@jmg-duarte jmg-duarte commented Aug 14, 2024

Description

As described in the title.

Closes #166

Checklist

  • Have you tested this solution?
  • Did you document new (or modified) APIs?

@jmg-duarte jmg-duarte self-assigned this Aug 14, 2024
@jmg-duarte jmg-duarte added the ready for review Review is needed label Aug 14, 2024
@jmg-duarte jmg-duarte added ready for review Review is needed pallet-storage-provider Relates to the Storage Provider Pallet and removed ready for review Review is needed labels Aug 14, 2024
aidan46
aidan46 previously approved these changes Aug 15, 2024
@th7nder th7nder added ready for review Review is needed and removed ready for review Review is needed labels Aug 15, 2024
@th7nder th7nder enabled auto-merge August 15, 2024 15:26
@th7nder th7nder added this to the Phase 1 milestone Aug 15, 2024
Copy link
Contributor

@th7nder th7nder left a comment

Choose a reason for hiding this comment

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

target/debug/storagext-cli --sr25519-key //Charlie storage-provider register charlie

target/debug/storagext-cli --sr25519-key //Alice market add-balance 25100200300
target/debug/storagext-cli --sr25519-key //Charlie market add-balance 25100200300
RUST_LOG=trace target/debug/storagext-cli --sr25519-key //Charlie market publish-storage-deals --client-sr25519-key //Alice @examples/deals.json

target/debug/storagext-cli --sr25519-key //Charlie storage-provider pre-commit @examples/pre-commit-sector.json
target/debug/storagext-cli --sr25519-key //Charlie storage-provider prove-commit @examples/prove-commit-sector.json
➜  polka-storage git:(feat/166/faults) ✗ target/debug/storagext-cli --sr25519-key //Charlie storage-provider declare-faults @examples/fault-declaration.json

thread 'main' panicked at cli/polka-storage/storagext-cli/src/cmd/storage_provider.rs:63:17:
Mismatch between definition and access of `faults`. Could not downcast to storagext::FaultDeclaration, need to downcast to alloc::vec::Vec<storagext::FaultDeclaration>

note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

fault-declaration.json contents:

[
    {
        "deadline": 0,
        "partition": 0,
        "sectors": [
            0
        ]
    }
]

@jmg-duarte jmg-duarte added ready for review Review is needed and removed ready for review Review is needed labels Aug 15, 2024
@jmg-duarte jmg-duarte requested review from th7nder and aidan46 August 15, 2024 16:30
Copy link
Contributor

@th7nder th7nder left a comment

Choose a reason for hiding this comment

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

business logic may be flawed, but the CLI works:

a79e53de99fd5310d221326e0051c0f1986515cf3aa8e32dddcd80dd1"
2024-08-15T16:49:50.849045Z  INFO run{address="5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y"}: storagext_cli::cmd::market: [0x916f…0dd1] Successfully published storage deals
2024-08-15T16:50:50.889228Z  INFO run{address="5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y"}: storagext_cli::cmd::storage_provider: [0x6622…4934] Successfully pre-commited sector 1.
2024-08-15T16:51:50.918989Z  INFO run{address="5FLSigC9HGRKVhB9FiEo4Y3koPsNmBmLJbpXg2mp1hXcS59Y"}: storagext_cli::cmd::storage_provider: [0x0947…ab01] Successfully proven sector 1.
Error: Runtime error: Pallet error: StorageProvider::DeadlineError

@th7nder th7nder merged commit eb92775 into develop Aug 16, 2024
3 checks passed
@th7nder th7nder deleted the feat/166/faults branch August 16, 2024 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pallet-storage-provider Relates to the Storage Provider Pallet ready for review Review is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SP: add missing CLI extrinsics from the SP pallet
3 participants