From 15c8a532632cae87061ee487e62af1d28e2f50d8 Mon Sep 17 00:00:00 2001 From: d-roak Date: Thu, 12 Oct 2023 17:50:57 +0900 Subject: [PATCH 1/4] add key gen commands testing in the ci --- .github/workflows/madara-commands.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/madara-commands.yml b/.github/workflows/madara-commands.yml index c4ccb2a79c..ace0bbcbdf 100644 --- a/.github/workflows/madara-commands.yml +++ b/.github/workflows/madara-commands.yml @@ -31,3 +31,15 @@ jobs: - name: Create build-spec (raw) run: | target/release/madara build-spec --chain chain-plain.json --raw > chain-raw.json + - name: Generate Sr25519 key for Aura (Leader Election) + id: key-gen + run: | + target/release/madara key generate --scheme Sr25519 + echo "SEED_PHRASE=$(target/release/madara key generate --scheme Sr25519 | sed -n 's/Secret phrase:\s*//p' >> "$GITHUB_OUTPUT" + - name: Derive Ed25519 key for Grandpa (Finality) + run: | + target/release/madara key inspect --scheme Ed25519 "${{ steps.key-gen.outputs.SEED_PHRASE }}" + - name: Add keys to the node keystore + run: | + target/release/madara key insert --scheme Sr25519 --suri "${{ steps.key-gen.outputs.SEED_PHRASE }}" --key-type aura + target/release/madara key insert --scheme Ed25519 --suri "${{ steps.key-gen.outputs.SEED_PHRASE }}" --key-type grandpa From ceb459deb00272e31fb605c0bf8f7fe9bcbcedec Mon Sep 17 00:00:00 2001 From: d-roak Date: Thu, 12 Oct 2023 17:51:41 +0900 Subject: [PATCH 2/4] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7b25dce17..c4c7562efd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Next release +- ci: added testing key generation in the ci - feat(cli): `run` is the by default command when running the `madara` bin - refacto(cli): `run` and `setup` commands are defined in their own files - refacto(cli): `run.testnet` argument removed in favor of the substrate native From 99d790161e7796cd06bd936d0be673f7934fb700 Mon Sep 17 00:00:00 2001 From: d-roak Date: Thu, 12 Oct 2023 18:01:15 +0900 Subject: [PATCH 3/4] add missing ); change keytype to gran --- .github/workflows/madara-commands.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/madara-commands.yml b/.github/workflows/madara-commands.yml index ace0bbcbdf..fbd96ba0e5 100644 --- a/.github/workflows/madara-commands.yml +++ b/.github/workflows/madara-commands.yml @@ -35,11 +35,11 @@ jobs: id: key-gen run: | target/release/madara key generate --scheme Sr25519 - echo "SEED_PHRASE=$(target/release/madara key generate --scheme Sr25519 | sed -n 's/Secret phrase:\s*//p' >> "$GITHUB_OUTPUT" + echo "SEED_PHRASE=$(target/release/madara key generate --scheme Sr25519 | sed -n 's/Secret phrase:\s*//p') >> "$GITHUB_OUTPUT" - name: Derive Ed25519 key for Grandpa (Finality) run: | target/release/madara key inspect --scheme Ed25519 "${{ steps.key-gen.outputs.SEED_PHRASE }}" - name: Add keys to the node keystore run: | target/release/madara key insert --scheme Sr25519 --suri "${{ steps.key-gen.outputs.SEED_PHRASE }}" --key-type aura - target/release/madara key insert --scheme Ed25519 --suri "${{ steps.key-gen.outputs.SEED_PHRASE }}" --key-type grandpa + target/release/madara key insert --scheme Ed25519 --suri "${{ steps.key-gen.outputs.SEED_PHRASE }}" --key-type gran From 7f0c3de44bc55316bb4a21bddd327789084852de Mon Sep 17 00:00:00 2001 From: d-roak Date: Thu, 12 Oct 2023 18:07:47 +0900 Subject: [PATCH 4/4] add missing " --- .github/workflows/madara-commands.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/madara-commands.yml b/.github/workflows/madara-commands.yml index fbd96ba0e5..5b6e907d27 100644 --- a/.github/workflows/madara-commands.yml +++ b/.github/workflows/madara-commands.yml @@ -35,7 +35,7 @@ jobs: id: key-gen run: | target/release/madara key generate --scheme Sr25519 - echo "SEED_PHRASE=$(target/release/madara key generate --scheme Sr25519 | sed -n 's/Secret phrase:\s*//p') >> "$GITHUB_OUTPUT" + echo "SEED_PHRASE=$(target/release/madara key generate --scheme Sr25519 | sed -n 's/Secret phrase:\s*//p')" >> "$GITHUB_OUTPUT" - name: Derive Ed25519 key for Grandpa (Finality) run: | target/release/madara key inspect --scheme Ed25519 "${{ steps.key-gen.outputs.SEED_PHRASE }}"