Skip to content

Instantly share code, notes, and snippets.

@nkcr
Last active February 22, 2021 08:24
Show Gist options
  • Save nkcr/53f9ba165f12e259fa9374588850a320 to your computer and use it in GitHub Desktop.
Save nkcr/53f9ba165f12e259fa9374588850a320 to your computer and use it in GitHub Desktop.
Create a simple chain with Byzcoin
# clone the Cothority repo, install bcadmin
mkdir chain
cd chain
git clone https://github.com/dedis/cothority.git
cd cothority/byzcoin/bcadmin
# will install in GOPATH/bin/
go install
# run some conodes
cd ../../conode
go build --tags test
./run_nodes.sh -d tmp -v 3
# open another shell in the same "conode" folder
# create a chain, add some blocks
bcadmin -config tmp create tmp/public.toml
export BC="tmp/bc-XXXXX.cfg"
bcadmin darc rule --rule "test:test" -id ed25519:aef123
# you can run it multiple times to create blocks
bcadmin -c tmp darc rule --rule "test:test" -id ed25519:aef123 --replace
# you can get the roster in "tmp/public.toml"
# the byzcoin ID (ie. the first block) is print after "bcadmin create"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment