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

Agile Coretime #1

Merged
merged 47 commits into from
Aug 11, 2023
Merged
Changes from 7 commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
c94858e
RFC-0001
gavofyork Jun 29, 2023
72d2787
Typo
gavofyork Jun 30, 2023
5ec35d1
Typo
gavofyork Jun 30, 2023
ef71a4b
Detail on migrations
gavofyork Jun 30, 2023
4c907f2
Merge branch 'gav-agile-coretime' of https://github.com/polkadot-fell…
gavofyork Jun 30, 2023
f1c3ce4
Update RFC-0001-Agile Coretime.md
gavofyork Jul 4, 2023
f84d030
Update RFC-0001-Agile Coretime.md
gavofyork Jul 4, 2023
e020237
Update RFC-0001-Agile Coretime.md
gavofyork Jul 4, 2023
2bfc3de
Update RFC-0001-Agile Coretime.md
gavofyork Jul 4, 2023
6a07faf
Address some grumbles
gavofyork Jul 4, 2023
814c44b
Merge branch 'gav-agile-coretime' of https://github.com/polkadot-fell…
gavofyork Jul 4, 2023
eb8a681
Weighted allocations
gavofyork Jul 4, 2023
2538bb0
Relay-chain API
gavofyork Jul 4, 2023
e95b2e9
Bitmapping
gavofyork Jul 6, 2023
015f92a
Core Parts
gavofyork Jul 7, 2023
e6654fd
Rename
gavofyork Jul 7, 2023
71c5c47
Typo
gavofyork Jul 7, 2023
591b62a
Much more efficient schema
gavofyork Jul 8, 2023
562ef32
mention RFC-5
gavofyork Jul 8, 2023
642782d
Details
gavofyork Jul 9, 2023
cbbf41e
typo
gavofyork Jul 9, 2023
3117eb2
Intro PUC
gavofyork Jul 9, 2023
9a97546
Bulktime definitions
gavofyork Jul 9, 2023
d4cdf69
Correct example price setting algo
gavofyork Jul 9, 2023
bc4235c
Update sale period/renewas
gavofyork Jul 10, 2023
ececc83
Explanation
gavofyork Jul 10, 2023
7c92da0
Update text/0001-agile-coretime.md
gavofyork Jul 17, 2023
38a0189
Update text/0001-agile-coretime.md
gavofyork Jul 17, 2023
6213a2c
Update with insights from implementation
gavofyork Jul 18, 2023
56c2bf4
Update example pricing with sellout price and edge cases
gavofyork Jul 18, 2023
34a9581
Use Mask terminology
gavofyork Jul 18, 2023
36ee156
Update text/0001-agile-coretime.md
gavofyork Jul 25, 2023
0c3121f
Update text/0001-agile-coretime.md
gavofyork Jul 25, 2023
f939d75
Update text/0001-agile-coretime.md
gavofyork Jul 25, 2023
056cc23
Update text/0001-agile-coretime.md
gavofyork Jul 25, 2023
fae6b26
Update text/0001-agile-coretime.md
gavofyork Jul 25, 2023
532cead
Update text/0001-agile-coretime.md
gavofyork Jul 25, 2023
5fd1c37
Address grumbles.
gavofyork Jul 25, 2023
13166ea
Update text/0001-agile-coretime.md
gavofyork Jul 31, 2023
e50e717
Renewal price is only a cap
gavofyork Jul 31, 2023
1b01ee6
Merge branch 'gav-agile-coretime' of https://github.com/polkadot-fell…
gavofyork Jul 31, 2023
b39e7f8
Better wording
gavofyork Jul 31, 2023
c9ae929
Better wording
gavofyork Jul 31, 2023
28aed69
Typo
gavofyork Jul 31, 2023
b756283
Typo
gavofyork Jul 31, 2023
095884e
Add reference
gavofyork Aug 1, 2023
6f29561
Rephrase according to comment
gavofyork Aug 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions text/0001-agile-coretime.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ The Coretime-chain includes some governance-set reservations of Coretime; these

A *Region* is an assignable period of Coretime with a known regularity.

All Regions are associated with a unique *Core Index*, to identify which core the Region controls the assignment of.
All Regions are associated with a unique *Core Index*, to identify which core the assignment of which ownership of the Region controls.

All Regions are also associated with a *Core Mask*, an 80-bit bitmap, to denote the regularity on which it may be scheduled on the core. If all bits are set in the Core Mask value, it is said to be *Complete*. 80 is selected since this results in the size of the datatype used to identify any Region of Polkadot Coretime to be a very convenient 128-bit. Additionally, if `TIMESLICE` (the number of Relay-chain blocks in a Timeslice) is 80, then a single bit in the Core Mask bitmap represents exactly one Core for one Relay-chain block in one Timeslice.
All Regions are also associated with a *Core Mask*, an 80-bit bitmap, to denote the regularity at which it may be scheduled on the core. If all bits are set in the Core Mask value, it is said to be *Complete*. 80 is selected since this results in the size of the datatype used to identify any Region of Polkadot Coretime to be a very convenient 128-bit. Additionally, if `TIMESLICE` (the number of Relay-chain blocks in a Timeslice) is 80, then a single bit in the Core Mask bitmap represents exactly one Core for one Relay-chain block in one Timeslice.

All Regions have a span. Region spans are quantized into periods of `TIMESLICE` blocks; `BULK_PERIOD` divides into `TIMESLICE` a whole number of times.

Expand Down Expand Up @@ -167,7 +167,7 @@ The Sale Price varies during an initial portion of the Purchasing Period called

At any time when there are remaining Regions of Bulk Coretime to be sold, *including during the Interlude Period*, then certain Bulk Coretime assignmnents may be *Renewed*. This is similar to a purchase in that funds must be paid and it consumes one of the Regions of Bulk Coretime which would otherwise be placed for purchase. However there are two key differences.

Firstly, the price paid is exactly `RENEWAL_PRICE_CAP` more than what the purchase/renewal price was in the previous sale.
Firstly, the price paid is the minimum of `RENEWAL_PRICE_CAP` more than what the purchase/renewal price was in the previous renewal and the current (or initial, if yet to begin) regular Sale Price.
Copy link

Choose a reason for hiding this comment

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

Thank you for incorporating this change! Simplifies the purchase strategy that Centrifuge would choose significantly and increases certainty over core availability.


Secondly, the purchased Region comes preassigned with exactly the same workload as before. It cannot be traded, repartitioned, interlaced or exchanged. As such unlike regular purchasing the Region never has an owner.

Expand Down Expand Up @@ -273,17 +273,17 @@ Renewal is only valid where a Region's span is assigned to Tasks (not placed in

**Renewal Price**

The Renewal Price is:
The Renewal Price is the minimum of the current regular Sale Price (or the initial Sale Price if in the Interlude Period) and:

- If the workload being renewed came to be through the *Purchase and Assignment* of Bulk Coretime, then the price paid during the Purchase operation.
- If the workload being renewed came to be through the *Purchase and Assignment* of Bulk Coretime, then the price paid during that Purchase operation.
- If the workload being renewed was previously renewed, then the price paid during this previous Renewal operation plus `RENEWAL_PRICE_CAP`.
- If the workload being renewed is a migation from a legacy slot auction lease, then the nominal price for a Regular Purchase (outside of the Lead-in Period) of the Sale during which the legacy lease expired.
- If the workload being renewed is a migation from a legacy slot auction lease, then the nominal price for a Regular Purchase (outside of the Lead-in Period) of the Sale during which the legacy lease expires.

#### 8. Instantaneous Coretime Credits
gavofyork marked this conversation as resolved.
Show resolved Hide resolved

A dispatchable `purchase_credit(amount: Balance, beneficiary: RelayChainAccountId)` shall be provided. Any account with at least `amount` spendable funds may call this. This increases the Instantaneous Coretime Credit balance on the Relay-chain of the `beneficiary` by the given `amount`.

This Credit is consumable on the Relay-chain as part of the Task scheduling system and its specifics are out of scope within this proposal. When consumed, revenue is recorded and provided to the Coretime-chain for proper distribution. The API for doing this is specified in RFC-5.
This Credit is consumable on the Relay-chain as part of the Task scheduling system and its specifics are out of the scope of this proposal. When consumed, revenue is recorded and provided to the Coretime-chain for proper distribution. The API for doing this is specified in RFC-5.

### Notes on the Instantaneous Coretime Market

Expand Down Expand Up @@ -464,7 +464,7 @@ struct InstaPoolHistoryRecord {
type InstaPoolHistory = Map<Timeslice, InstaPoolHistoryRecord>;
```

`CoreMask` tracks unique "parts" of a single core. It is used with interlacing in order to give a unique identifier to each compnent of any possible interlacing configuration of a core, allowing for simple self-describing keys for all core ownership and allocation information. It also allows for each core's workload to be tracked and updated progressively, keeping ongoing compute costs well-bounded and low.
`CoreMask` tracks unique "parts" of a single core. It is used with interlacing in order to give a unique identifier to each component of any possible interlacing configuration of a core, allowing for simple self-describing keys for all core ownership and allocation information. It also allows for each core's workload to be tracked and updated progressively, keeping ongoing compute costs well-bounded and low.

Regions are issued into the `Regions` map and can be transferred, partitioned and interlaced as the owner desires. Regions can only be tasked if they begin after the current scheduling deadline (if they have missed this, then the region can be auto-trimmed until it is).

Expand Down