From 6ed625b1da3aac05a85ca428c944991f5333b4d8 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Thu, 7 Mar 2024 08:17:12 -0500 Subject: [PATCH 1/5] Update docs in types-support for retrieving metadata for typegen --- packages/types-support/src/metadata/README.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/packages/types-support/src/metadata/README.md b/packages/types-support/src/metadata/README.md index 394726f6de1c..9315a6061a1c 100644 --- a/packages/types-support/src/metadata/README.md +++ b/packages/types-support/src/metadata/README.md @@ -8,6 +8,26 @@ Clone the [polkadot-sdk](https://github.com/paritytech/polkadot-sdk) repository `--dev` sets the flag `--tmp` automatically so there is no need for purging the dev db. +For Polkadot & Kusama - + +Clone the [polkadot-fellows/runtimes](https://github.com/polkadot-fellows/runtimes/tree/main) repository and from the ROOT run: + +```bash +$ unset SKIP_WASM_BUILD +$ cargo build --release -p chain-spec-generator --features fast-runtime +$ ./target/release/chain-spec-generator polkadot-dev > polkadotDevChainSpec.json +``` + +Note: For kusama just change the `polkadotDevChainSpec.json` to `kusamaDevChainSpec.json`. + +Clone the [polkadot-sdk](https://github.com/paritytech/polkadot-sdk) repository and from the ROOT run: + +```bash +$ cargo build --release --bin polkadot-prepare-worker --features fast-runtime +$ cargo build --release --bin polkadot-execute-worker --features fast-runtime +$ ./target/release/polkadot --chain polkadotDevChainSpec.json +``` + To retrieve the metadata - `curl -H "Content-Type: application/json" -d '{"id":"1", "jsonrpc":"2.0", "method": "state_getMetadata", "params":[]}' http://localhost:9944` From bbb4394fa9d469d0d20a86b11be6f6d23b0cca2a Mon Sep 17 00:00:00 2001 From: tarikgul Date: Thu, 7 Mar 2024 08:18:09 -0500 Subject: [PATCH 2/5] nit --- packages/types-support/src/metadata/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/types-support/src/metadata/README.md b/packages/types-support/src/metadata/README.md index 9315a6061a1c..128886cdc447 100644 --- a/packages/types-support/src/metadata/README.md +++ b/packages/types-support/src/metadata/README.md @@ -20,7 +20,7 @@ $ ./target/release/chain-spec-generator polkadot-dev > polkadotDevChainSpec.json Note: For kusama just change the `polkadotDevChainSpec.json` to `kusamaDevChainSpec.json`. -Clone the [polkadot-sdk](https://github.com/paritytech/polkadot-sdk) repository and from the ROOT run: +Clone the [polkadot-sdk](https://github.com/paritytech/polkadot-sdk) repository, checkout the most recent releases tag and from the ROOT run: ```bash $ cargo build --release --bin polkadot-prepare-worker --features fast-runtime From e00255d9d3b03d65b9fcdd1936d54d5acdce64e3 Mon Sep 17 00:00:00 2001 From: tarikgul Date: Thu, 7 Mar 2024 08:21:29 -0500 Subject: [PATCH 3/5] copy notes --- packages/types-support/src/metadata/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/types-support/src/metadata/README.md b/packages/types-support/src/metadata/README.md index 128886cdc447..c11ee6c106b7 100644 --- a/packages/types-support/src/metadata/README.md +++ b/packages/types-support/src/metadata/README.md @@ -18,7 +18,8 @@ $ cargo build --release -p chain-spec-generator --features fast-runtime $ ./target/release/chain-spec-generator polkadot-dev > polkadotDevChainSpec.json ``` -Note: For kusama just change the `polkadotDevChainSpec.json` to `kusamaDevChainSpec.json`. +- For kusama just change the `polkadotDevChainSpec.json` to `kusamaDevChainSpec.json`. +- When you have the `polkadot-sdk` cloned, make sure to copy the chainspec from the `runtimes` repository to `polkadot-sdk` repository. Clone the [polkadot-sdk](https://github.com/paritytech/polkadot-sdk) repository, checkout the most recent releases tag and from the ROOT run: From 2ab13058c235d3ad20d38f11ae08810321ae7985 Mon Sep 17 00:00:00 2001 From: Tarik Gul <47201679+TarikGul@users.noreply.github.com> Date: Thu, 7 Mar 2024 08:22:34 -0500 Subject: [PATCH 4/5] Update packages/types-support/src/metadata/README.md Co-authored-by: Alberto Nicolas Penayo <74352651+bee344@users.noreply.github.com> --- packages/types-support/src/metadata/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/types-support/src/metadata/README.md b/packages/types-support/src/metadata/README.md index c11ee6c106b7..4b0664756cab 100644 --- a/packages/types-support/src/metadata/README.md +++ b/packages/types-support/src/metadata/README.md @@ -26,6 +26,7 @@ Clone the [polkadot-sdk](https://github.com/paritytech/polkadot-sdk) repository, ```bash $ cargo build --release --bin polkadot-prepare-worker --features fast-runtime $ cargo build --release --bin polkadot-execute-worker --features fast-runtime +$ cargo build --release --bin polkadot --features fast-runtime $ ./target/release/polkadot --chain polkadotDevChainSpec.json ``` From 353042e18222c889c237f2d31157dec9d82cef55 Mon Sep 17 00:00:00 2001 From: Tarik Gul <47201679+TarikGul@users.noreply.github.com> Date: Thu, 7 Mar 2024 08:26:47 -0500 Subject: [PATCH 5/5] Update packages/types-support/src/metadata/README.md Co-authored-by: Alberto Nicolas Penayo <74352651+bee344@users.noreply.github.com> --- packages/types-support/src/metadata/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/types-support/src/metadata/README.md b/packages/types-support/src/metadata/README.md index 4b0664756cab..b29d00a283d2 100644 --- a/packages/types-support/src/metadata/README.md +++ b/packages/types-support/src/metadata/README.md @@ -27,6 +27,7 @@ Clone the [polkadot-sdk](https://github.com/paritytech/polkadot-sdk) repository, $ cargo build --release --bin polkadot-prepare-worker --features fast-runtime $ cargo build --release --bin polkadot-execute-worker --features fast-runtime $ cargo build --release --bin polkadot --features fast-runtime +$ cp ../runtimes/polkadotDevChainSpec.json . $ ./target/release/polkadot --chain polkadotDevChainSpec.json ```