-
Notifications
You must be signed in to change notification settings - Fork 0
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
Market Pallet: integration tests #108
Comments
Issue 1: #137
|
Issue 2:
|
Issue 3: #138
It happens, because: #[derive(RuntimeDebug)]
pub enum ProposalError {
So the debug is not implemented in WASM. log::error!(target: LOG_TARGET, "insane deal: idx {}, error: {:?}", idx, e); Possible solutions:
On the other hand... |
Issue 4: #139
https://github.com/eigerco/polka-storage/blob/develop/runtime/src/configs/mod.rs#L349 |
Feature gate this or similar |
@jmg-duarte wdym by feature gate? |
I think he means that we could have a feature "testnet" or similar. And when we compile the parachain with that feature we would use a different pallet config. Is it possible to do it that way? .. Could we create a Testnet runtime that specifies it's own config? Like the Test runtime that we are using for tests? |
Could we have something like that? Checking of the future flags is wrong, but the idea is there :D
|
Or maybe better yet
|
Issue 5: #135 |
Issue 6: #136 When calling register_storage_provider, getting ConversionError (god knows why). There are mismatch issues with BlockNumber and block types... (u64 in register_storage_provider (assign proving period)) and BlockNumber configuration in runtime. BlockNumber in runtime == u32 |
Issue 7: #139 Cannot pre_commit sector, as the numbers for |
Issue 8: |
Issue 9: #140 |
Issue 10: #141 Even though the deal has been activated, it cannot be settled after it ended.
|
Done! |
The testing should be done by running a local zombienet cluster, on kuberenetes or native (
just testnet
,just kube-testnet
#124 ).Min Deal Duration = 180 days = 180 * 7200 = 1 296 000 blocks
The flows we want to test:
Current test-helper PR:
cli/polka-storage-provider/src/commands/deal.rs
and runningcargo run -p polka-storage-provider deal
to get thedeal_cid
andsigned client proposal
.1. Publishing and slashing the deal
Client calls
market.add_balance(1 100 200 * 25)
(5 minutes in blocks)Provider calls
market.add_balance(25 100 200)
(storage_provider_collateral)Client and Storage Provider discuss the deal off-chain. When they're finished, Storage Provider calls
market.publish_storage_deals
Rough draft of parameters:
market.withdraw_balance(25 100 200)
, it succeeds.market.withdraw_balance(25 100 200)
, it fails.2. Publishing and successfully finishing a deal
market.add_balance(1 100 200 * 25)
(5 minutes in blocks)market.add_balance(25 100 200)
(storage_provider_collateral)market.publish_storage_deals
Rough draft of parameters:
pre_commit
:prove_commit
:cron_tick
.market.settle_deal_payments
, so client's money gets transfered to the provider.market.withdraw_balance(25 100 200)
, it fails (it got transferred to the provider)market.withdraw_balance(25 100 200 + 25 100 200)
, from the successful deal) it succeeds.Verify deals for activation (blocked):
on_sector_terminate (blocked):
terminate_sector
#109 )The text was updated successfully, but these errors were encountered: