Implementer's guide: notes on contextual execution (#1525)

* Add notes about contextual execution

* Clarify that `validation_data_hash` consists of global and local data

* Update roadmap/implementers-guide/src/runtime/inclusion.md

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>

* Incorporate rphmeier's suggestion.

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
Sergei Shulepov
2020-08-03 21:30:12 +02:00
committed by GitHub
parent c36b47c242
commit 2afa2b035f
2 changed files with 8 additions and 1 deletions
@@ -63,6 +63,7 @@ All failed checks should lead to an unrecoverable error making the block invalid
1. check that `scheduled` is sorted ascending by `CoreIndex`, without duplicates.
1. check that there is no candidate pending availability for any scheduled `ParaId`.
1. check that each candidate's `validation_data_hash` corresponds to a `(LocalValidationData, GlobalValidationData)` computed from the current state.
> NOTE: With contextual execution in place, local and global validation data will be obtained as of the state of the context block. However, only the state of the current block can be used for such a query.
1. If the core assignment includes a specific collator, ensure the backed candidate is issued by that collator.
1. Ensure that any code upgrade scheduled by the candidate does not happen within `config.validation_upgrade_frequency` of `Paras::last_code_upgrade(para_id, true)`, if any, comparing against the value of `Paras::FutureCodeUpgrades` for the given para ID.
1. Check the collator's signature on the candidate data.