Skip to content

Commit

Permalink
Merge pull request #528 from paritytech/AndreiEres/remove-metadata-fr…
Browse files Browse the repository at this point in the history
…om-docs

Remove metadata references
  • Loading branch information
AndreiEres authored Aug 29, 2023
2 parents 92e015c + 1751410 commit 974b096
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 149 deletions.
14 changes: 0 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ members = [
"essentials",
"jaeger",
"kvdb",
"metadata-checker",
"parachain-tracer",
"priority-channel",
"whois",
Expand Down
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,6 @@ The tools utilize data sources such as [subxt](https://github.com/paritytech/sub

## Building

**TODO: the following information is outdated, needs to be edited.**
We utilize the latest polkadot metadata to decode block data. It is possible that we might lack some types, which are already present in test networks but not yet in polkadot. In such instances, we implement our own provisional types, which should be removed once they are included in the polkadot metadata.

It is mandatory to specify which `Runtime` the build will target. Currently, the tools can only build for a single runtime version by enabling one of the following features:

- `rococo` - for Rococo and Versi test networks
- `kusama` - for Kusama production networks
- `polkadot` - for Polkadot production networks

These features will select which metadata to use for decoding block data. To enable a specific feature, use the following command:

```
cargo build --release --no-default-features --features=polkadot
```

See also: [Updating or supporting a new `Runtime`](essentials/README.md#updating-or-supporting-a-new-runtime)
See also: [Updating a `Runtime`](essentials/README.md#updating-a-runtime)
18 changes: 5 additions & 13 deletions essentials/README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
# polkadot-introspector-essentials

This repository contains essential components for the Polkadot Introspector toolset, including pre-built runtime modules for Polkadot- and Rococo-like Substrate-based blockchains.
This repository contains essential components for the Polkadot Introspector toolset, including pre-built runtime modules for Polkadot-like Substrate-based blockchains.

## Updating or supporting a new `Runtime`
## Updating a `Runtime`

**TODO: the following information is outdated, needs to be edited.**
The deployed `Runtime` version on a network might be newer and incompatible with the metadata included in the repository. To keeo the metadata up-to-date, we employ automated metadata updates [within our CI/CD workflow](./../.github/workflows/update_metadata.yml).

The `Runtime` version deployed on a network might be newer and incompatible with the metadata bundled in the repository. To check whether the metadata is up-to-date, we run [polkadot-metadata-checker](../metadata-checker/README.md) on our CI/CD pipelines. In case it fails, to bring the new metadata, we use [subxt-cli](https://github.com/paritytech/subxt/#downloading-metadata-from-a-substrate-node).

Here's an example of how to update the metadata:
For manually updating the metadata, we utilize [subxt-cli](https://github.com/paritytech/subxt/#downloading-metadata-from-a-substrate-node).

```
# Update metadata for Rococo
subxt metadata --format bytes --url wss://rococo-rpc.polkadot.io:443 > assets/rococo_metadata.scale
# Update metadata for Kusama
subxt metadata --format bytes --url wss://kusama-rpc.polkadot.io:443 > assets/kusama_metadata.scale
# Update metadata for Polkadot
subxt metadata --format bytes --url wss://rpc.polkadot.io:443 > assets/polkadot_metadata.scale
```

After replacing metadata files in the assets' folder with new ones, we need to rebuild the tools.
After replacing the existing metadata file in the assets folder with the updated one, we need to rebuild the tools.
18 changes: 0 additions & 18 deletions metadata-checker/Cargo.toml

This file was deleted.

21 changes: 0 additions & 21 deletions metadata-checker/README.md

This file was deleted.

68 changes: 0 additions & 68 deletions metadata-checker/src/main.rs

This file was deleted.

0 comments on commit 974b096

Please sign in to comment.