Skip to content

Instantly share code, notes, and snippets.

@ltfschoen
Last active March 14, 2021 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ltfschoen/c6c3962e85b17f110bad4e4e17a82238 to your computer and use it in GitHub Desktop.
Save ltfschoen/c6c3962e85b17f110bad4e4e17a82238 to your computer and use it in GitHub Desktop.
Polkadot Address Generation with Subkey
#!/bin/sh
# Start Ubuntu in container and install dependencies
docker run --name ubuntutest -t -i ubuntu /bin/bash
apt-get update
apt-get install -y curl
curl https://getsubstrate.io -sSf | bash -s -- --fast
# Install Substrate and Subkey
cargo install --force subkey --git https://github.com/paritytech/substrate --version 2.0.0 --locked
# Create Polkadot address with Subkey. Run this offline
subkey --network polkadot --password "mypassword" generate --words 24
# Destroy history and securely from the root directory
history -c
apt-get install secure-delete
sfill -v /
exit
# Destroy the Docker container
docker ps -a
docker rm -f ubuntutest
@TomaszWaszczyk
Copy link

I try to compile subkey but got:

   Compiling structopt-derive v0.4.14
error[E0635]: unknown feature `const_type_id`
 --> /home/panta/.cargo/registry/src/github.com-1ecc6299db9ec823/value-bag-1.0.0-alpha.6/src/lib.rs:7:54
  |
7 | #![cfg_attr(value_bag_capture_const_type_id, feature(const_type_id))]
  |                                                      ^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0635`.
error: could not compile `value-bag`.

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile `subkey v2.0.0 (https://github.com/paritytech/substrate#18ab0903)`, intermediate artifacts can be found at `/tmp/cargo-install3V9yg1`

Caused by:
  build failed

any idea why?

panta@rhei-box:~/workspaces/substrate-node-template/target/release$ rustup --version
rustup 1.23.1 (3df2264a9 2020-11-30)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.47.0-nightly (663d2f5cd 2020-08-22)`

@ltfschoen
Copy link
Author

@tom these steps are old. i'd suggest following these ones https://substrate.dev/docs/en/knowledgebase/integrate/subkey
i'm updating this gist now so it's similar but don't have time to test with docker

@TomaszWaszczyk
Copy link

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment