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

BlockId removal: runtime-api refactor #13255

Merged
merged 19 commits into from
Feb 20, 2023

Commits on Feb 15, 2023

  1. BlockId removal: refactor of runtime API

    It changes the arguments of:
    - `ApiExt` methods:  `has_api`, `has_api_with`, `api_version`
    - `CallApiAt` method: `runtime_version_at`
    from: `BlockId<Block>` to: `Block::Hash`
    
    It also changes the first argument of all generated runtime API calls from: `BlockId<Block>` to: `Block::Hash`
    
    This PR is part of BlockId::Number refactoring analysis (paritytech/substrate#11292)
    michalkucharczyk committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    a3ec707 View commit details
    Browse the repository at this point in the history
  2. BlockId removal: refactor of runtime API - tests

    - tests adjusted to new runtime API,
    - some tests migrated from block number to block hash
    michalkucharczyk committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    480857b View commit details
    Browse the repository at this point in the history
  3. benchmarking-cli: BlockId(0) migrated to info().genesis_hash

    `runtime_api.call()` now requires the block hash instead of BlockId::Number.
    To access the genesis hash widely used in benchmarking engine the Client
    was constrained to satisfy `sp_blockchain::HeaderBackend<Block>` trait
    which provides `info().genesis_hash`.
    michalkucharczyk committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    2ff8645 View commit details
    Browse the repository at this point in the history
  4. trivial: api.call(BlockId) -> api.call(Hash)

    - Migrated all `runtime_api.calls` to use Hash
    - Noteworthy (?):
    -- `validate_transaction_blocking` in transaction pool,
    michalkucharczyk committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    0c151ec View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ab70a23 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    1b1c2ac View commit details
    Browse the repository at this point in the history
  7. missed doc updated

    michalkucharczyk committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    a809327 View commit details
    Browse the repository at this point in the history
  8. Apply suggestions from code review

    Co-authored-by: Bastian Köcher <git@kchr.de>
    michalkucharczyk and bkchr authored Feb 15, 2023
    Configuration menu
    Copy the full SHA
    431de9a View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2023

  1. ".git/.scripts/commands/fmt/fmt.sh"

    command-bot committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    afc2d49 View commit details
    Browse the repository at this point in the history
  2. BlockId removal: Benchmark::consumed_weight

    Little refactor around `Benchmark::consumed_weight`: `BlockId` removed.
    michalkucharczyk committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    939aa9e View commit details
    Browse the repository at this point in the history
  3. at_hash renamed

    michalkucharczyk committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    3d4d6e4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    291d162 View commit details
    Browse the repository at this point in the history
  5. wrong merge fixed

    michalkucharczyk committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    708c8e0 View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2023

  1. Configuration menu
    Copy the full SHA
    a0aed2d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    29dcaa6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    35583b9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    53578d3 View commit details
    Browse the repository at this point in the history
  5. fix

    michalkucharczyk committed Feb 20, 2023
    Configuration menu
    Copy the full SHA
    4b8da43 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4d41fb8 View commit details
    Browse the repository at this point in the history