Skip to content
DAO.Casino blockchain - empowering Gambling 3.0
Branch: master
Clone or download
Pull request Compare This branch is 7 commits ahead, 7 commits behind mixbytes:master.
Latest commit e2bd2b9 Jun 4, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CMakeModules [cyb-236] renaming eosio -> haya and remove unused eosio stuff May 7, 2019
Docker [cyb-240] add tests to CI and add ccache (mixbytes#6) May 14, 2019
debian [cyb-236] renaming eosio -> haya and remove unused eosio stuff May 7, 2019
docs remove additional generated doxygen files Jul 17, 2018
images Merge branch 'master' of github.com:DaoCasino/dc-blockchain May 16, 2019
libraries [cyb-240] add tests to CI and add ccache (mixbytes#6) May 14, 2019
plugins [cyb-240] add tests to CI and add ccache (mixbytes#6) May 14, 2019
programs
scripts [cyb-236] renaming eosio -> haya and remove unused eosio stuff May 7, 2019
simulator [cyb-240] add tests to CI and add ccache (mixbytes#6) May 14, 2019
tests [cyb-240] add tests to CI and add ccache (mixbytes#6) May 14, 2019
tools Fixing encoding error on some platforms. Dec 27, 2018
tutorials [cyb-240] add tests to CI and add ccache (mixbytes#6) May 14, 2019
unittests Add test for recover_keys without start_recover_keys Apr 1, 2019
.dockerignore [cyb-240] add tests to CI and add ccache (mixbytes#6) May 14, 2019
.gitignore [cyb-240] add tests to CI and add ccache (mixbytes#6) May 14, 2019
.gitlab-ci.yml [cyb-205] renaming and remove PR template Apr 29, 2019
.gitmodules [bloc-92][cyb-99] telemetry plugin Apr 19, 2019
.travis.yml [cyb-240] add tests to CI and add ccache (mixbytes#6) May 14, 2019
CMakeLists.txt [cyb-240] add tests to CI and add ccache (mixbytes#6) May 14, 2019
CONTRIBUTING.md [cyb-236] renaming eosio -> haya and remove unused eosio stuff May 7, 2019
HEADER Initial commit Apr 5, 2017
LICENSE Update LICENSE Mar 28, 2019
README.md Node startup script added Jun 4, 2019
haya.doxygen.in [cyb-236] renaming eosio -> haya and remove unused eosio stuff May 7, 2019
haya.version.in [cyb-236] renaming eosio -> haya and remove unused eosio stuff May 7, 2019
run-node.sh Config update Jun 4, 2019
testnet.template [cyb-240] add tests to CI and add ccache (mixbytes#6) May 14, 2019

README.md

DAO.Casino - blockchain for Gambling 3.0 with fast finality and on-chain pRNG

Welcome to DAO.Casino Blockchain repository!

This project is based on Haya, which implements RANDPA finality for EOSio.

RANDPA was inspired by GRANDPA. It achieves deterministic finality within 2-3 seconds in the real-world network conditions. This improvement significantly reduces waiting time for transactions and all smart contract based operations, including Game Channels. RANDPA is implementation is still in development, so please use it for the test purposes only.

We also provide some test and benchmarking tools, so you can actually run RANDPA on your own machine.

Build

./scripts/eosio_build.sh

Run full node (testnet)

./run-node.sh

RANDPA development

Run tests

./plugins/randpa_plugin/tests/randpa_plugin_unit_test

We have also coded our own blockchain simulator for testing. It saves us a ton of time when debugging.

Run randpa_finality.three_nodes test:

./simulator/simulator --gtest_filter=randpa_finality.three_nodes

Run one node

For the purpose of this tutorial we have provided basic config files in the tutorials/randpa-tutorial/configs directory.

Assuming you have your executable in the build directory you can start the node by running

./bin/nodeos --delete-all-blocks -c ../tutorials/randpa-tutorial/configs/config0.ini

...

info  2019-04-24T11:42:24.505 thread-0  producer_plugin.cpp:1597      produce_block        ] Produced block 00000002c38eb2c3... #2 @ 2019-04-24T11:42:24.500 signed by eosio [trxs: 0, lib: 0, confirmed: 0]
info  2019-04-24T11:42:24.509 thread-2  randpa.hpp:585                finish_round         ] Randpa round reached supermajority, round num: 0, best block id: 00000002c38eb2c3cbebceb88129aa6d189c33d1449bb0397e0340cccc81840d, best block num: 2
info  2019-04-24T11:42:25.004 thread-0  producer_plugin.cpp:1597      produce_block        ] Produced block 000000039de520a9... #3 @ 2019-04-24T11:42:25.000 signed by eosio [trxs: 0, lib: 2, confirmed: 0]
info  2019-04-24T11:42:25.504 thread-0  producer_plugin.cpp:1597      produce_block        ] Produced block 000000043a87c431... #4 @ 2019-04-24T11:42:25.500 signed by eosio [trxs: 0, lib: 3, confirmed: 0]
info  2019-04-24T11:42:25.507 thread-2  randpa.hpp:585                finish_round         ] Randpa round reached supermajority, round num: 1, best block id: 000000039de520a9a62390ed3abc545ef3ae80428513fc35ba515edba09acd1c, best block num: 3
info  2019-04-24T11:42:26.004 thread-0  producer_plugin.cpp:1597      produce_block        ] Produced block 0000000590e6067f... #5 @ 2019-04-24T11:42:26.000 signed by eosio [trxs: 0, lib: 4, confirmed: 0]
info  2019-04-24T11:42:26.508 thread-0  producer_plugin.cpp:1597      produce_block        ] Produced block 00000006510daf43... #6 @ 2019-04-24T11:42:26.500 signed by eosio [trxs: 0, lib: 5, confirmed: 0]
info  2019-04-24T11:42:26.511 thread-2  randpa.hpp:585                finish_round         ] Randpa round reached supermajority, round num: 2, best block id: 0000000590e6067f9390cfe2e643de0ffc6dc5094ab750bd5bf1f3b159e62595, best block num: 5
info  2019-04-24T11:42:27.003 thread-0  producer_plugin.cpp:1597      produce_block        ] Produced block 00000007b7dbaaf8... #7 @ 2019-04-24T11:42:27.000 signed by eosio [trxs: 0, lib: 6, confirmed: 0]
info  2019-04-24T11:42:27.506 thread-0  producer_plugin.cpp:1597      produce_block        ] Produced block 00000008e2d399a5... #8 @ 2019-04-24T11:42:27.500 signed by eosio [trxs: 0, lib: 7, confirmed: 0]
info  2019-04-24T11:42:27.508 thread-2  randpa.hpp:585                finish_round         ] Randpa round reached supermajority, round num: 3, best block id: 00000007b7dbaaf833cfa95495192a2dd117fb81428c9ba6e25f141a0cd37e19, best block num: 7

If you see "Randpa reached supermajority" messages then you have successfully launched your node.

Run multiple nodes

Running N nodes is as easy as running one with an additional step of setting block producers

1.Run 3 nodes

./bin/nodeos --delete-all-blocks -c ../tutorials/randpa-tutorial/config0.ini
./bin/nodeos --delete-all-blocks -c ../tutorials/randpa-tutorial/config1.ini
./bin/nodeos --delete-all-blocks -c ../tutorials/randpa-tutorial/config2.ini

2.Set block producers

./../tutorials/randpa-tutorial/setup.sh <your-wallet-pass>

3.Check for "Randpa reached suppermajority" messages in node logs

Contributing to DAO.Casino Blockchain

Interested in contributing? That's awesome! Please follow our git flow:

Alt text

You can’t perform that action at this time.