-
Notifications
You must be signed in to change notification settings - Fork 378
Computation of real message bandwidth available in asynchronous backing #1866
Comments
Based on this comment I posted elsewhere ^ |
Since this requires an extra relay-chain state proof (for the currently included head of the parachain at the given relay-parent), we have a 4 distinct cases we will encounter:
The upgrade path will probably be something like:
|
Why do we need to track watermarks for each unincluded candidate when we have Highest HRMP watermark? We do need to track per-candidate messages counts and sizes in order to update aggregated struct, but the watermark only depends on the latest candidate |
Yes, it seems like we could get away with not storing the watermark for each block in the segment and still obey the watermark rules. |
|
The |
It would have a required parent data for new candidates, yes. This is exactly how prospective parachains fetch modifications constraints from the runtime And the very same line used for constructing PVD: What's the difference? Thinking of it, parachains system should represent a path in a fragment tree, thus we also need to read pending availability similar to paritytech/polkadot#6791 |
The difference is the point in time when we read the last included head. Cumulus makes its PVD way before
This is missing the point of the whole unincluded segment mechanism. After asynchronous backing, we'll have prospective parachain blocks which don't yet exist in any relay chain state and are only stored offchain on nodes, until they can be posted. The unincluded segment mechanism tells us about all parachain blocks since the most recently included one. Example: Consider 4 parachain blocks
In relay-parent X, A is the most recently included block. B has been posted on-chain but is pending availability. C is backable but hasn't been posted on-chain. D is backable but hasn't been posted on-chain. C and D both have relay-parent X. The The I hope this makes sense now. |
The parachain-system pallet should keep track of the 'unincluded segment' of the parachain. This is all recent blocks which have not been included in a referenced relay-parent.
For each block in the unincluded segment, parachain-system should track:
We also keep a struct aggregating the data from the whole unincluded segment:
Note that if the unincluded segment of the parachain is empty, this is equivalent to the protocol before asynchronous backing, where we only build parablocks once the parent parablock has been included and therefore the unincluded segment is always empty.
On initialization of parachain-system, we:
The aggregate struct will be used to further limit message bandwidth and processing beyond just what is stated by the relay-parent storage proofs
The text was updated successfully, but these errors were encountered: