-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Labels
e2e testsRelated to end-to-end testsRelated to end-to-end testsenhancementNew feature or requestNew feature or request
Milestone
Description
Summary
Implement end-to-end tests for coretime operations, ideally between coretime system parachains and relay chains.
Background
The broker pallet provides extrinsics to manage coretime allocation.
There are no E2E tests for coretime features, and PET is a decent place to start.
Broker functions to test
Administrative Functions
configure: Set broker parameters (admin only)reserve: Reserve cores for permanent workloads (admin only)unreserve: Cancel workload reservations (admin only)set_lease: Reserve cores for limited periods (admin only)start_sales: Begin bulk coretime sales rotation (admin only)request_core_count: Request change to available core count (admin only)notify_core_count: Notify core count changes (admin only)notify_revenue: Notify revenue from on-demand sales (admin only)force_reserve: Reserve core for workload immediately (admin only)remove_lease: Remove a lease (admin only)remove_assignment: Remove assignment from workplan (admin only)swap_leases: Swap leases between tasks (admin only)
Market Operations
purchase: Buy bulk coretime in ongoing salerenew: Renew bulk coretime for existing corestransfer: Transfer region ownership between accountspartition: Split regions into non-overlapping partsinterlace: Split regions into overlapping parts with complementary masks
Assignment and Pooling
assign: Assign regions to specific tasks (final or provisional)pool: Place regions into instantaneous coretime poolclaim_revenue: Claim revenue from pool participationpurchase_credit: Buy on-demand coretime credits
Auto-Renewal
enable_auto_renew: Enable automatic core renewal (sovereign account only)disable_auto_renew: Disable automatic core renewal (sovereign account only)
Cleanup
drop_region: Remove expired regionsdrop_contribution: Remove expired pool contributionsdrop_history: Remove expired historical recordsdrop_renewal: Remove expired renewal records
Test Scenarios
- Complete sale lifecycle from start to purchase
- Region management (transfer, partition, interlace)
- Task assignment and pool participation
- Revenue claiming and credit purchasing
- Auto-renewal enabling/disabling and operation
- Cross-chain core count modifications
- Immediate core reservation and assignment
- Lease management and swapping
- Administrative cleanup of expired records
As in previous E2E suites, tests should verify extrinsic execution/failures causes + events.
Features which require non-signed origins (root or admin) should rely on XCM containing a Transact.send wrapper over the broker extrinsic, with the appropriate origin, scheduled to be sent from the relay chain to the coretime SP.
In the case of cross-chain communication (e.g. core count modification requests) similar scheduler+XCM workarounds may also be necessary.
Metadata
Metadata
Assignees
Labels
e2e testsRelated to end-to-end testsRelated to end-to-end testsenhancementNew feature or requestNew feature or request