Skip to content

Commit

Permalink
Merge pull request #81 from fioprotocol/feature/bd-4619-start-script-…
Browse files Browse the repository at this point in the history
…updates

BD-4619 launch script updates for useability
  • Loading branch information
misterleet authored Feb 19, 2024
2 parents a130419 + 5f9b7fc commit 4635534
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 62 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.idea/

bin/
walletkey.ini
.idea/
clio
node*.txt
7 changes: 5 additions & 2 deletions scripts/fio_launch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,9 +226,10 @@ if [ $mChoice == 1 ]; then
#else
# tChoice=$2
#fi
#Start Both Nodes
#Start Nodes
# launch dev nodes listening on all interfaces to allow docker nodes to connect
$oldpath/launch/03_start_test_nodes.sh
# Provide '2' to start with increased max transaction time
$oldpath/launch/03_start_test_nodes.sh 2

if [ $restartneeded == 0 ]; then
#Create Accounts
Expand All @@ -250,6 +251,8 @@ if [ $mChoice == 1 ]; then
if [ $restartneeded == 0 ]; then
echo Setting up inline permissions incl eosio.code on contracts
$oldpath/launch/09_set_permissions.sh
#manually execute from cmd line; bash ./scripts/launch/09_update_permissions.sh
#$oldpath/launch/09_update_permissions.sh
fi

echo regdomain
Expand Down
6 changes: 6 additions & 0 deletions scripts/launch/03_start_test_nodes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,14 @@ if [ -z "$1" ]; then
read -p $'\n1. Default 2. Increased Transaction Time\nChoose(#):' tChoice
else
tChoice=$1
sleep 1.0
fi

#start the bios node, this starts up, and eventually goes into dormancy.
echo
if [ $tChoice == 1 ]; then
echo "Starting nodeos with default Max Transaction Time..."
echo
mkdir -p $HOME/node1
pushd $HOME/node1 >/dev/null
"${NODEOS_BIN}" --http-server-address localhost:8879 --p2p-listen-endpoint 0.0.0.0:9876 --config-dir=$HOME/node1 --http-validate-host=0 --logconf=$oldpath/launch/logging.json --enable-stale-production --producer-name eosio --plugin eosio::chain_api_plugin --plugin eosio::net_api_plugin --contracts-console 2> $oldpath/../node1.txt &
Expand All @@ -42,6 +46,8 @@ if [ $tChoice == 1 ]; then
popd >/dev/null
fi
if [ $tChoice == 2 ]; then
echo "Starting nodeos with Max Transaction Time set to 6000..."
echo
mkdir -p $HOME/node1
pushd $HOME/node1 >/dev/null
"${NODEOS_BIN}" --max-transaction-time=6000 --http-server-address localhost:8879 --p2p-listen-endpoint 0.0.0.0:9876 --config-dir=$HOME/node1 --http-validate-host=0 --logconf=$oldpath/launch/logging.json --enable-stale-production --producer-name eosio --plugin eosio::chain_api_plugin --plugin eosio::net_api_plugin --contracts-console 2> $oldpath/../node1.txt &
Expand Down
56 changes: 0 additions & 56 deletions scripts/launch/09_set_permissions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,60 +51,4 @@ sleep 1
./clio -u http://localhost:8879 set account permission fio.oracle active '{"threshold": 1,"keys": [{"key": "FIO7isxEua78KPVbGzKemH4nj2bWE52gqj8Hkac3tc7jKNvpfWzYS","weight": 1}],"accounts": [{"permission":{"actor":"fio.oracle","permission":"eosio.code"},"weight":1}]}}' 4000000000 owner -p fio.oracle@owner
./clio -u http://localhost:8879 push action eosio setpriv '["fio.oracle",1]' -p eosio@active

echo $'\nUpdating eosio and contract accounts for mSig support'
# eosio system account with key
sleep 0.5
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "eosio", "permission": "active", "max_fee":4000000000, "parent": "owner", "auth": {"threshold": 1, "keys": [{"key":"FIO6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV", "weight":1}], "waits": [], "accounts":[{"permission":{"actor":"eosio.prods","permission":"active"},"weight":1}]}}' -p eosio@owner
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "eosio", "permission": "owner", "max_fee":4000000000, "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio.prods","permission":"active"}, "weight":1}]}}' -p eosio@owner

# fio system accounts (no key)
sleep 0.5
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "eosio.msig", "permission": "active", "max_fee":4000000000, "parent": "owner", "auth": {"threshold": 1, "keys": [{"key":"FIO7isxEua78KPVbGzKemH4nj2bWE52gqj8Hkac3tc7jKNvpfWzYS", "weight":1}], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1},{"permission":{"actor":"eosio.msig", "permission":"eosio.code"}, "weight":1}]}}' -p eosio.msig@active
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "eosio.msig", "permission": "owner", "max_fee":4000000000, "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1}]}}' -p eosio.msig@owner

# Note that eosio.wrap does NOT have eosio.code perm on active
sleep 0.5
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "eosio.wrap", "permission": "active", "max_fee":4000000000, "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1}]}}' -p eosio.wrap@active
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "eosio.wrap", "permission": "owner", "max_fee":4000000000, "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1}]}}' -p eosio.wrap@owner

sleep 0.5
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.address", "permission": "active", "max_fee":4000000000, "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1},{"permission":{"actor":"fio.address", "permission":"eosio.code"}, "weight":1}]}}' -p fio.address@active
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.address", "permission": "owner", "max_fee":4000000000, "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1}]}}' -p fio.address@owner

sleep 0.5
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.escrow", "permission": "active", "max_fee":4000000000, "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1},{"permission":{"actor":"fio.escrow", "permission":"eosio.code"}, "weight":1}]}}' -p fio.escrow@active
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.escrow", "permission": "owner", "max_fee":4000000000, "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1}]}}' -p fio.escrow@owner

sleep 0.5
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.fee", "permission": "active", "max_fee":4000000000, "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1},{"permission":{"actor":"fio.fee", "permission":"eosio.code"}, "weight":1}]}}' -p fio.fee@active
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.fee", "permission": "owner", "max_fee":4000000000, "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1}]}}' -p fio.fee@owner

sleep 0.5
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.oracle", "permission": "active", "max_fee":4000000000, "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1},{"permission":{"actor":"fio.oracle", "permission":"eosio.code"}, "weight":1}]}}' -p fio.oracle@active
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.oracle", "permission": "owner", "max_fee":4000000000, "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1}]}}' -p fio.oracle@owner

sleep 0.5
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.perms", "permission": "active", "max_fee":4000000000, "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1},{"permission":{"actor":"fio.perms", "permission":"eosio.code"}, "weight":1}]}}' -p fio.perms@active
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.perms", "permission": "owner", "max_fee":4000000000, "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1}]}}' -p fio.perms@owner

sleep 0.5
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.reqobt", "permission": "active", "max_fee":4000000000, "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1},{"permission":{"actor":"fio.reqobt", "permission":"eosio.code"}, "weight":1}]}}' -p fio.reqobt@active
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.reqobt", "permission": "owner", "max_fee":4000000000, "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1}]}}' -p fio.reqobt@owner

sleep 0.5
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.staking", "permission": "active", "max_fee":4000000000, "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1},{"permission":{"actor":"fio.staking", "permission":"eosio.code"}, "weight":1}]}}' -p fio.staking@active
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.staking", "permission": "owner", "max_fee":4000000000, "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1}]}}' -p fio.staking@owner

sleep 0.5
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.token", "permission": "active", "max_fee":4000000000, "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1},{"permission":{"actor":"fio.token", "permission":"eosio.code"}, "weight":1}]}}' -p fio.token@active
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.token", "permission": "owner", "max_fee":4000000000, "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1}]}}' -p fio.token@owner

sleep 0.5
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.tpid", "permission": "active", "max_fee":4000000000, "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1},{"permission":{"actor":"fio.tpid", "permission":"eosio.code"}, "weight":1}]}}' -p fio.tpid@active
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.tpid", "permission": "owner", "max_fee":4000000000, "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1}]}}' -p fio.tpid@owner

sleep 0.5
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.treasury", "permission": "active", "max_fee":4000000000, "parent": "owner", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1},{"permission":{"actor":"fio.treasury", "permission":"eosio.code"}, "weight":1}]}}' -p fio.treasury@active
./clio -u http://localhost:8879 push action eosio updateauth '{"account": "fio.treasury", "permission": "owner", "max_fee":4000000000, "parent": "", "auth": {"threshold": 1, "keys": [], "waits": [], "accounts":[{"permission":{"actor":"eosio","permission":"active"}, "weight":1}]}}' -p fio.treasury@owner

echo
Loading

0 comments on commit 4635534

Please sign in to comment.