Skip to content

Instantly share code, notes, and snippets.

@eduffield222
Last active August 1, 2016 20:08
Show Gist options
  • Save eduffield222/e4ac7e3d20a6002c839f59e0c53f42bd to your computer and use it in GitHub Desktop.
Save eduffield222/e4ac7e3d20a6002c839f59e0c53f42bd to your computer and use it in GitHub Desktop.
Sentinel Object Creation And Voting
################################################################
######## dash.conf
################################################################
testnet=1
addnode=52.90.74.124:19999
masternode=1
masternodeaddr=52.90.74.124:19999
masternodeprivkey=92sNnwxRUHqNj1NQ6hffmujsQ6fBsQ7dj1LqD7PTh7cPZhaXghe
################################################################
#### setup dashd
checkout https://github.com/evan82/dash/tree/v0.12.1.x-triggers
compile from source (no binaries exist yet for the required code)
setup a masternode in dash.conf (see dash.conf above or make one from scratch)
#### setup sentinel
checkout https://github.com/evan82/sentinel
install mysql (sqllite should be optional, however no one has tested it)
cp config.py.example config.py
edit config.py => """
dashd_path = "/home/evan/dash/testnet/bin/dash-cli" #cli path
datadir = "/home/evan/dash/testnet/data" #data directory where dashd is
masternodes = ["masternode_01", "masternode_02"] #named masternodes from masternode.conf
hostname="localhost"
username="sentinel"
password="changeme"
database="sentinel"
"""
mysql -u sentinel -p < ./sentinel/database/001.sql
python ./cli.py
#### create new superblock - 1
(sentinel) superblock --create --event_block_height="48332" --payments="yNaE8Le2MVwk1zpwuEKveTMCEQHVxdcfCS=100"
successful result => "event queued successfully"
#### create new superblock - 2
(sentinel) crontab --prepare_events
first time I got """_mysql_exceptions.OperationalError: (1366, "Incorrect integer value: '' for column 'event_block_height' at row 1")"""
successful result => "1 events successfully prepared (stage 1)"
#### create new superblock - 3
(sentinel) crontab --prepare_events
should say "1 events successfully prepared (stage 1)"
#### create new superblock - 4
(sentinel) crontab --submit_events
failed result => " -- waiting for confirmation
0 events successfully submitted (stage 2)"
this means sentinel is waiting on confirmation of the collateral transaction that was created in the prepare
successful result => "1 events successfully submitted (stage 2)"
#### create new proposal - 1
(sentinel) proposal --create --proposal_name="sb-test" --description_url="www.dashwhale.org/p/sb-test" --start_date="2016/8/1" --end_date="2017/1/1" --payment_address="ydE7B1A7htNwSTvvER6xBdgpKZqNDbbEhPydE7B1A7htNwSTvvER6xBdgpKZqNDbbEhP" --payment_amount="23"
#### funding on governance objects
## this will vote via dash.conf
./dash-cli gobject vote-conf govobjhash funding yes
## voting with masternode.conf
./dash-cli gobject vote-alias govobjhash funding yes masternode_001
3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment