Skip to content

Instantly share code, notes, and snippets.

@yourbuddyconner
Last active January 23, 2020 18:19
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 yourbuddyconner/4b2eb0be9a4f102b974eeccd16a6bdc9 to your computer and use it in GitHub Desktop.
Save yourbuddyconner/4b2eb0be9a4f102b974eeccd16a6bdc9 to your computer and use it in GitHub Desktop.

Related Reading

Generate a private key:

It's important to note here that without the -v argument, your generated key would be stuck inside the container and deleted when the container exits! This example mounts the current directory pwd inside the container at the /keys path.

docker run --entrypoint /bin/bash -it -v $(pwd)/:/keys codaprotocol/coda-daemon:0.0.11-beta1-release-0.0.12-beta-493b4c6 -c "CODA_PRIVKEY_PASS='password' coda client-old generate-keypair -privkey-path /keys/my_key"

Basic Daemon:

This will run a full node without any extra features.

docker run -d --entrypoint /bin/bash codaprotocol/coda-daemon:0.0.11-beta1-release-0.0.12-beta-493b4c6 -c "coda daemon \
-log-level Info -config-directory /root/.coda-config \
-client-port 8301 -rest-port 3085 \
-external-port 8302 -discovery-port 8303 \
-metrics-port 10000  \
 -peer /dns4/seed-one.genesis.o1test.net/tcp/10002/ipfs/12D3KooWP7fTKbyiUcYJGajQDpCFo2rDexgTHFJTxCH8jvcL1eAH \
-peer /dns4/seed-two.genesis.o1test.net/tcp/10002/ipfs/12D3KooWL9ywbiXNfMBqnUKHSB1Q1BaHFNUzppu6JLMVn9TTPFSA"

Block Producers:

This will run a block producer with a key you specify.

export MY_KEY_DIRECTORY=/absolute/path/to/keys
docker run  -d -v $(MY_KEY_DIRECTORY)/:/keys --entrypoint /bin/bash codaprotocol/coda-daemon:0.0.11-beta1-release-0.0.12-beta-493b4c6 -c "coda daemon \
-privkey-path /keys/my_key
-log-level Info -config-directory /root/.coda-config \
-client-port 8301 -rest-port 3085 \
-external-port 8302 -discovery-port 8303 \
-metrics-port 10000  \
 -peer /dns4/seed-one.genesis.o1test.net/tcp/10002/ipfs/12D3KooWP7fTKbyiUcYJGajQDpCFo2rDexgTHFJTxCH8jvcL1eAH \
-peer /dns4/seed-two.genesis.o1test.net/tcp/10002/ipfs/12D3KooWL9ywbiXNfMBqnUKHSB1Q1BaHFNUzppu6JLMVn9TTPFSA"

Snark Worker:

This will run a SNARK worker. As there are no external components (like a private key) that need to be provided, no volumes!

docker run  -d --entrypoint /bin/bash codaprotocol/coda-daemon:0.0.11-beta1-release-0.0.12-beta-493b4c6 -c "coda daemon \
-snark-key <PUBLIC_KEY> 
-snark-fee 20
-log-level Info -config-directory /root/.coda-config \
-client-port 8301 -rest-port 3085 \
-external-port 8302 -discovery-port 8303 \
-metrics-port 10000  \
 -peer /dns4/seed-one.genesis.o1test.net/tcp/10002/ipfs/12D3KooWP7fTKbyiUcYJGajQDpCFo2rDexgTHFJTxCH8jvcL1eAH \
-peer /dns4/seed-two.genesis.o1test.net/tcp/10002/ipfs/12D3KooWL9ywbiXNfMBqnUKHSB1Q1BaHFNUzppu6JLMVn9TTPFSA"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment