Last active
February 22, 2021 08:24
-
-
Save nkcr/53f9ba165f12e259fa9374588850a320 to your computer and use it in GitHub Desktop.
Create a simple chain with Byzcoin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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