compute-runtime-blob-hash.sh 762 B

12345678910111213141516
  1. #!/usr/bin/env bash
  2. # Create a non running container from joystream/node
  3. docker create --name temp-container-joystream-node joystream/node
  4. # Copy the compiled wasm blob from the docker container to our host
  5. docker cp temp-container-joystream-node:/joystream/runtime.compact.wasm joystream_runtime.wasm
  6. docker rm temp-container-joystream-node
  7. # compute blake2_256 hash of the wasm blob - this should match the hash computed when the runtime file is
  8. # used to create a runtime upgrade proposal.
  9. # osx with: brew install b2sum; b2sum -b blake2b -l 256 joystream_runtime.wasm
  10. # ubuntu 17.0+ with: apt-get install coreutils; b2sum -l 256 joystream_runtime.wasm
  11. # TODO: add install of b2sum to setup.sh
  12. b2sum -l 256 joystream_runtime.wasm
  13. rm joystream_runtime.wasm