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

pvf-precheck: Strip PastCodeMeta #4408

Merged
merged 1 commit into from
Dec 8, 2021

Commits on Dec 7, 2021

  1. pvf-precheck: Strip PastCodeMeta

    This PR is a part of
    #3211.
    
    This PR prepares ground for the following runtime changes required for
    PVF pre-checking. Specifically, we do several changes here:
    
    1. We remove `validation_code_at` and `validation_code_hash_at`. Those
       functions are not used. They were added in the early days with intent
       to use it later but turned out that we do not need them.
    2. We replace `validation_code_hash_at` with just `current_code_hash`
       for the case of inclusion and candidate checking.
    3. We also replace `last_code_upgrade` with a direct query into
       `FutureCodeHash` and `UpgradeRestrictionSignal`. Those in conjunction
       should replace the logic that was used for allowing/disallowing
       upgrades. This requires special attention of the reviewers.
    4. Then we remove the machinery required to support those queries.
       Specifically the code related to `UseCodeAt`. We do not need it since
       we do not answer the historical queries. However, we still leave all
       the data on-chain. At some point we may clean it up, but that would
       be needed to be done with a dedicated migration which can be done as
       follow-up.
    5. Some now irrelevant tests were removed and/or adapted.
    pepyakin committed Dec 7, 2021
    Configuration menu
    Copy the full SHA
    e094cf2 View commit details
    Browse the repository at this point in the history