• Marcin S.'s avatar
    PVF: Don't dispute on missing artifact (#7011) · 0940cdd1
    Marcin S. authored
    * PVF: Don't dispute on missing artifact
    
    A dispute should never be raised if the local cache doesn't provide a certain
    artifact. You can not dispute based on this reason, as it is a local hardware
    issue and not related to the candidate to check.
    
    Design:
    
    Currently we assume that if we prepared an artifact, it remains there on-disk
    until we prune it, i.e. we never check again if it's still there.
    
    We can change it so that instead of artifact-not-found triggering a dispute, we
    retry once (like we do for AmbiguousWorkerDeath, except we don't dispute if it
    still doesn't work). And when enqueuing an execute job, we check for the
    artifact on-disk, and start preparation if not found.
    
    Changes:
    
    - [x] Integration test (should fail without the following changes)
    - [x] Check if artifact exists when executing, prepare if not
    - [x] Return an internal error when file is missing
    - [x] Retry once on internal errors
    - [x] Document design (update impl guide)
    
    * Add some context to wasm error message (it is quite long)
    
    * Fix impl guide
    
    * Add check for missing/inaccessible file
    
    * Add comment referencing Substrate issue
    
    * Add test for retrying internal errors
    
    ---------
    
    Co-authored-by: parity-processbot <>
    0940cdd1