fix: revert provider deregistration#163
Conversation
- committed_bytes == 0 is the authoritative gate, proven faithful by auditing every StorageAgreements insert/remove site; each is balanced against a counter increment/decrement. No provider→bucket reverse index needed. - remove cancel_deregistration, complete_deregistration
|
/cmd bench --runtime web3-storage-paseo --runtime storage-parachain-runtime |
|
/cmd fmt |
|
/cmd fmt |
|
/cmd fmt |
|
/cmd bench --runtime web3-storage-paseo --runtime storage-parachain-runtime |
|
Command "bench --runtime web3-storage-paseo --runtime storage-parachain-runtime" has started 🚀 See logs here |
…-storage-paseo --runtime storage-parachain-runtime'
|
Command "bench --runtime web3-storage-paseo --runtime storage-parachain-runtime" has finished ✅ See logs here DetailsSubweight results:
Command output:args: Namespace(command='bench', continue_on_fail=False, quiet=False, clean=False, runtime=['storage-parachain-runtime'], pallet=[], steps=50, repeat=20, profile='production') |
Replace the two-phase announce/cancel/complete flow (removed from the
runtime) with tests for the new single-step deregister_provider:
- 8.1: succeeds with no active agreements, asserts ProviderDeregistered
event and that the Providers record is fully removed
- 8.2: re-registration works after deregister (slot fully freed)
- 8.3: fails with ProviderHasActiveAgreements when committed_bytes > 0
- 8.4: fails with ProviderNotFound for a non-provider account
Drops old 8.2/8.5/8.6 (cancel/complete paths no longer in runtime) and
old 8.8 (ProviderNotAcceptingPrimary — unrelated to deregistration).
The two-phase deregistration extrinsics (complete_deregister, cancel_deregister) were removed from the runtime in favor of a single one-shot deregister_provider, leaving these wrappers calling nonexistent extrinsics. deregisterProvider is kept.
Changes
Issue