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

PVF prechecking #4209

Closed
wants to merge 60 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
f271c09
pvf host: store only compiled artifacts on disk
slumber Sep 22, 2021
554b8a0
Correctly handle failed artifacts
slumber Sep 23, 2021
8bdc7d3
Serialize result of PVF preparation uniquely
slumber Sep 23, 2021
7c0b8ed
Set the artifact state depending on the result
slumber Sep 27, 2021
11de207
Return the result of PVF preparation directly
slumber Sep 27, 2021
d323ac6
Move PrepareError to the error module
slumber Sep 27, 2021
f129cd6
Update doc comments
slumber Sep 27, 2021
cae0540
Update misleading comment
slumber Sep 27, 2021
5c12abb
Commit everything so far
pepyakin Sep 29, 2021
e5e905e
.
pepyakin Sep 29, 2021
574dc40
first revision
pepyakin Oct 1, 2021
9eff8d5
work
pepyakin Oct 2, 2021
c81cdc6
Stuff
pepyakin Oct 3, 2021
67e0395
fix reference counting for rejecting
pepyakin Oct 3, 2021
b8487ed
fixes
pepyakin Oct 4, 2021
a6863ce
rename
pepyakin Oct 4, 2021
d387231
paragenesisargs
pepyakin Oct 4, 2021
33127f4
prepare to pivot
pepyakin Oct 5, 2021
d3f51aa
Restore ParaPastCodeMeta
pepyakin Oct 5, 2021
ce67024
Restore stealing mechanism
pepyakin Oct 5, 2021
ad4fe78
Fix test compilation
pepyakin Oct 5, 2021
efdb781
Fix tests
pepyakin Oct 11, 2021
81bb85d
Update rustdoc for paras
pepyakin Oct 12, 2021
dbe031e
get back validation code length check
pepyakin Oct 12, 2021
6481e26
Merge master
pepyakin Oct 13, 2021
b73f244
small test refactor
pepyakin Oct 13, 2021
a7e9890
General clean up
pepyakin Oct 14, 2021
8af822f
Merge master
pepyakin Oct 14, 2021
0f61c09
Runtime API
pepyakin Oct 14, 2021
8805d5c
Client side implementation
pepyakin Oct 21, 2021
e84d310
pvf host: turn off parallel compilation
slumber Oct 21, 2021
78fad55
pvf host: implement precheck requests
slumber Oct 21, 2021
7e25dc0
Fix warnings
slumber Oct 21, 2021
c90f64f
Unnecessary clone
slumber Oct 22, 2021
57255fa
Add a note about timed out outcome
slumber Oct 22, 2021
2f05716
Revert the pool outcome handling behavior
slumber Oct 22, 2021
66f05c5
Move the prepare result type into error mod
slumber Oct 22, 2021
3cca95a
Merge master
pepyakin Oct 22, 2021
8f51e94
Test prepare done
slumber Oct 22, 2021
b17eb79
Merge remote-tracking branch 'origin/master' into slumber-pvf-host-pr…
slumber Oct 22, 2021
d38e164
fmt
slumber Oct 22, 2021
a6c6f1a
Add an explanation to wasmtime config
slumber Nov 1, 2021
907c4a5
Split pvf host test
slumber Nov 1, 2021
84e1481
Merge remote-tracking branch 'origin/pep-pvfcheck-runtime' into slumb…
slumber Nov 2, 2021
e7001e7
Handle precheck request in candidate validation subsystem
slumber Nov 3, 2021
2751871
Complete runtime impls
slumber Nov 3, 2021
31af008
Merge remote-tracking branch 'origin/master' into slumber-pvf-prechec…
slumber Nov 3, 2021
49cf80c
Integrate node changes
slumber Nov 16, 2021
47e52ba
Expand the debug log
pepyakin Nov 16, 2021
74a1b25
0.9.13 is the current upcoming version
pepyakin Nov 17, 2021
cc09b8f
Pass the outcome
pepyakin Nov 17, 2021
c272f04
Merge master
pepyakin Nov 17, 2021
9f8fe1c
Make paras module backwards compatible with pre-go-ahead runtimes
pepyakin Nov 18, 2021
31b95fd
Fix tests for the backwards compatible approach
pepyakin Nov 18, 2021
7c15bf2
Use non-empty validation code
pepyakin Nov 18, 2021
f49cbf3
fmt
pepyakin Nov 18, 2021
892e7fa
Doc changes
pepyakin Nov 18, 2021
53f4d8c
Drive by comment
pepyakin Nov 23, 2021
7e4ba34
merge master
pepyakin Nov 23, 2021
92d620d
Fix
pepyakin Nov 23, 2021
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
Prev Previous commit
Next Next commit
fixes
pepyakin committed Oct 4, 2021

Unverified

This user has not yet uploaded their public signing key.
commit b8487ed63f95dbafb5c7a50628890cee5db38aae
7 changes: 0 additions & 7 deletions roadmap/implementers-guide/src/runtime/paras.md
Original file line number Diff line number Diff line change
@@ -217,13 +217,6 @@ CodeByHash: map ValidationCodeHash => Option<ValidationCode>
* `note_new_head(ParaId, HeadData, BlockNumber)`: note that a para has progressed to a new head,
where the new head was executed in the context of a relay-chain block with given number. This will
apply pending code upgrades based on the block number provided. If an upgrade took place it will clear the `UpgradeGoAheadSignal`.
* `validation_code_at(ParaId, at: BlockNumber, assume_intermediate: Option<BlockNumber>)`: Fetches
the validation code to be used when validating a block in the context of the given relay-chain
height. A second block number parameter may be used to tell the lookup to proceed as if an
intermediate parablock has been included at the given relay-chain height. This may return past,
current, or (with certain choices of `assume_intermediate`) future code. `assume_intermediate`, if
provided, must be before `at`. If the validation code has been pruned, this will return `None`.
* `validation_code_hash_at(ParaId, at: BlockNumber, assume_intermediate: Option<BlockNumber>)`: Just like `validation_code_at`, but returns the code hash.
* `lifecycle(ParaId) -> Option<ParaLifecycle>`: Return the `ParaLifecycle` of a para.
* `is_parachain(ParaId) -> bool`: Returns true if the para ID references any live parachain,
including those which may be transitioning to a parathread in the future.
2 changes: 2 additions & 0 deletions runtime/parachains/src/configuration.rs
Original file line number Diff line number Diff line change
@@ -73,6 +73,8 @@ pub struct HostConfiguration<BlockNumber> {
/// This parameter affects the upper bound of size of `CandidateCommitments`.
pub hrmp_max_message_num_per_candidate: u32,
/// The minimum frequency at which parachains can update their validation code.
/// TODO: This should mention the relationships to other parameters.
/// FOr example, (unchecked) this should be bigger than the PVF pre-checking time and so on.
pub validation_upgrade_frequency: BlockNumber,
/// The delay, in blocks, before a validation upgrade is applied.
pub validation_upgrade_delay: BlockNumber,
8 changes: 3 additions & 5 deletions runtime/parachains/src/inclusion.rs
Original file line number Diff line number Diff line change
@@ -459,10 +459,9 @@ impl<T: Config> Pallet<T> {
Error::<T>::NotCollatorSigned,
);

let validation_code_hash =
<paras::Pallet<T>>::validation_code_hash_at(para_id, now, None)
// A candidate for a parachain without current validation code is not scheduled.
.ok_or_else(|| Error::<T>::UnscheduledCandidate)?;
let validation_code_hash = <paras::Pallet<T>>::current_code_hash(&para_id)
// A candidate for a parachain without current validation code is not scheduled.
.ok_or_else(|| Error::<T>::UnscheduledCandidate)?;
ensure!(
candidate.descriptor().validation_code_hash == validation_code_hash,
Error::<T>::InvalidValidationCodeHash,
@@ -745,7 +744,6 @@ impl<T: Config> Pallet<T> {
receipt.descriptor.para_id,
commitments.head_data,
relay_parent_number,
&config,
)
}

Loading