Skip to content
DAOBet blockchain - empowering Gambling 3.0
C++ WebAssembly Python Shell CMake C
Branch: master
Clone or download
Pull request Compare This branch is 91 commits ahead of mixbytes:master.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
CMakeModules CYB-409 cmake functions for node & contracts Oct 29, 2019
Docker
cicd
debian full renaming haya to daobet (#7) Oct 4, 2019
docs
images
libraries V1.7.7 (#40) Oct 17, 2019
plugins [cyb-443] validate network msg Nov 20, 2019
programs
scripts
simulator
tests [cyb-451] renaming in daobet-cli Nov 20, 2019
tools
tutorials
unittests CYB-409 SYS->BET; fixed tests Oct 29, 2019
.dockerignore
.gitignore CYB-409 cmake scripts refactoring; .gitignore Oct 28, 2019
.gitlab-ci.yml
.gitmodules Merge haya_v0.2.2 into develop Sep 10, 2019
.travis.yml update version in run-node.sh Nov 1, 2019
CMakeLists.txt disabled warnings and added ccache stats Oct 31, 2019
CONTRIBUTING.md V1.7.7 (#40) Oct 17, 2019
HEADER Initial commit Apr 5, 2017
LICENSE Update LICENSE Mar 28, 2019
Makefile
README.md Merge tag 'v0.3.0' into release/0.3.x Nov 1, 2019
daobet.doxygen.in [cyb-374] haya -> daobet Oct 4, 2019
daobet.version.in [cyb-374] haya -> daobet Oct 4, 2019
run-node.sh fix paths in run-node.sh Nov 5, 2019
testnet.template

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 Status

Branch Build Status
Master master
Develop develop

Build

./scripts/daobet_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/daobet-node --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/daobet-node --delete-all-blocks -c ../tutorials/randpa-tutorial/config0.ini
./bin/daobet-node --delete-all-blocks -c ../tutorials/randpa-tutorial/config1.ini
./bin/daobet-node --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.