Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Watermarks and watermark rules #286

Closed
rphmeier opened this issue Jun 7, 2019 · 2 comments
Closed

Watermarks and watermark rules #286

rphmeier opened this issue Jun 7, 2019 · 2 comments
Labels
J0-enhancement An additional feature request.

Comments

@rphmeier
Copy link
Contributor

rphmeier commented Jun 7, 2019

Introduce a new field to CandidateReceipt which is a BlockNumber. Setting the watermark to X indicates that all messages sent at or before X to the parachain the candidate is for have been processed before or within that block.

Since CandidateReceipts are always associated with a specific relay chain block hash, the numbers can easily be converted to hashes.

The watermark must be set as high as possible based on the messages that have been processed within the chain. As a result, every parachain candidate must have its watermark at least as high as its parent.

The relay chain tracks the latest watermarks of included parachain candidates.

The open question is what other rules we should institute for setting watermarks. If we are currently at block Y and the watermark for parachain P is at X, we might require that no parachain candidate can be included where the watermark is less than X + max(min(Y - X, K), (Y - X)/2) where K is some constant like 5 or 10. This kind of logarithmic approach means that a P which falls far behind in routing will catch up in ~log2(Y - X) blocks, assuming that candidates for P are regularly included.

@rphmeier rphmeier added the J0-enhancement An additional feature request. label Jun 7, 2019
@rphmeier
Copy link
Contributor Author

rphmeier commented Mar 15, 2020

Also, watermarks should not be allowed to surpass any pending code changes. cc @burdges @AlistairStewart

tomusdrw added a commit that referenced this issue Mar 26, 2021
* Update rustup.

* Allow updating multiple things at once.
@rphmeier
Copy link
Contributor Author

done

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request.
Projects
None yet
Development

No branches or pull requests

1 participant