Skip to content

Commit

Permalink
Merge pull request #1 from ulamlabs/fix-config-ini
Browse files Browse the repository at this point in the history
Fix config.ini
  • Loading branch information
ksiazkowicz authored Apr 15, 2020
2 parents b083d0e + a427101 commit 3a53a52
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 23 deletions.
4 changes: 2 additions & 2 deletions ensure_eosio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ do
echo Retry limit exceeded, rebooting
fi
((x+=1))
docker-compose stop eos-testnet &> /dev/null
docker-compose stop eos &> /dev/null
docker-compose rm -f &> /dev/null
docker-compose up -d eos-testnet &> /dev/null
docker-compose up -d eos &> /dev/null
sleep 5
done
4 changes: 2 additions & 2 deletions eos-testnet/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM eostudio/eos:v1.8.12
FROM eostudio/eos:v1.8.13

RUN cd /tmp && \
wget https://github.com/eosio/eosio.cdt/releases/download/v1.6.3/eosio.cdt_1.6.3-1-ubuntu-18.04_amd64.deb && \
apt install ./eosio.cdt_1.6.3-1-ubuntu-18.04_amd64.deb

RUN apt -yq update && apt -yq install git cmake g++ gettext-base
RUN apt -yq update && apt -yq install git cmake g++

RUN cd /tmp && \
git clone https://github.com/EOSIO/eosio.contracts.git --branch v1.8.3 --single-branch && \
Expand Down
6 changes: 3 additions & 3 deletions eos-testnet/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ curl -X POST http://127.0.0.1:8888/v1/producer/schedule_protocol_feature_activat
cleos wallet create -f /tmp/pass
cleos wallet import --private-key $EOS_PRIVATE_KEY

for x in eosio.bpay eosio.msig eosio.names eosio.ram eosio.ramfee eosio.saving eosio.stake eosio.token eosio.vpay eosio.rex eosio.bios eosio.wrap
for x in eosio.bpay eosio.msig eosio.names eosio.ram eosio.ramfee eosio.saving eosio.stake eosio.token eosio.vpay eosio.rex eosio.wrap
do
cleos create account eosio ${x} $EOS_PUBLIC_KEY
done

retry cleos set contract eosio /tmp/eosio.contracts/build/contracts/eosio.system/

for x in eosio.msig eosio.token eosio.bios eosio.wrap
for x in eosio.msig eosio.token eosio.wrap
do
retry cleos set contract ${x} /tmp/eosio.contracts/build/contracts/${x}/
done
Expand All @@ -51,7 +51,7 @@ retry cleos push action eosio init '["0", "4,EOS"]' -p eosio@active
# - A_sau - amount staked by all accounts
# https://steemit.com/eos/@dexeosio/eosio-why-cpu-bandwidth-varies

retry cleos system newaccount eosio --transfer $EOS_TEST_ACCOUNT $EOS_PUBLIC_KEY --stake-net "9000000000.0000 EOS" --stake-cpu "9000000000.0000 EOS" --buy-ram-kbytes 8192
retry cleos system newaccount eosio --transfer $EOS_TEST_ACCOUNT $EOS_PUBLIC_KEY --stake-net "675000000.0000 EOS" --stake-cpu "6750000000.0000 EOS" --buy-ram-kbytes 8192
retry cleos transfer eosio $EOS_TEST_ACCOUNT "50000000000.0000 EOS"

# register and vote for producer to make chain activated
Expand Down
33 changes: 19 additions & 14 deletions eos-testnet/config.ini
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
chain-state-db-size-mb = 65536
reversible-blocks-db-size-mb = 65536
http-max-response-time-ms = 1000
max-transaction-time = 150000
subjective-cpu-leeway-us = 150000

producer-name = eosio
trusted-producer = eosio
http-server-address = 0.0.0.0:8888

# enabled plugins
plugin = eosio::chain_api_plugin
plugin = eosio::history_plugin
plugin = eosio::history_api_plugin
plugin = eosio::http_plugin
plugin = eosio::producer_plugin
plugin = eosio::producer_api_plugin

# chain plugin
chain-state-db-size-mb = 65536
reversible-blocks-db-size-mb = 65536
contracts-console = true

# producer_plugin
enable-stale-production = true
producer-name = eosio
trusted-producer = eosio
max-transaction-time = 150000
subjective-cpu-leeway-us = 150000
private-key = ["$EOS_PUBLIC_KEY","$EOS_PRIVATE_KEY"]

# http_plugin
http-max-response-time-ms = 1000
access-control-allow-origin = *
http-validate-host = false
enable-stale-production = true
chain-threads = 4
producer-threads = 4
http-server-address = 0.0.0.0:8888
verbose-http-errors = true

# history_plugin
filter-on = *
private-key = ["EOS8VhvYTcUMwp9jFD8UWRMPgWsGQoqBfpBvrjjfMCouqRH9JF5qW","5JeaxignXEg3mGwvgmwxG6w6wHcRp9ooPw81KjrP2ah6TWSECDN"]
7 changes: 5 additions & 2 deletions eos-testnet/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ shift
export EOS_TEST_ACCOUNT=${EOS_TEST_ACCOUNT:-"eostest12345"}
export EOS_PRIVATE_KEY=${EOS_PRIVATE_KEY:-"5JeaxignXEg3mGwvgmwxG6w6wHcRp9ooPw81KjrP2ah6TWSECDN"}
export EOS_PUBLIC_KEY=${EOS_PUBLIC_KEY:-"EOS8VhvYTcUMwp9jFD8UWRMPgWsGQoqBfpBvrjjfMCouqRH9JF5qW"}
envsubst '$$EOS_PUBLIC_KEY' < /app/genesis.json.template > /app/genesis.json

sed -i "s|\$EOS_PUBLIC_KEY|$EOS_PUBLIC_KEY|g" /app/genesis.json
sed -i "s|\$EOS_PUBLIC_KEY|$EOS_PUBLIC_KEY|g" /app/config.ini
sed -i "s|\$EOS_PRIVATE_KEY|$EOS_PRIVATE_KEY|g" /app/config.ini

case $action in
start)
( sleep 3 ; bash /app/bootstrap.sh ) &
nodeos -d /data --config-dir /app -e -p eosio --contracts-console --verbose-http-errors --genesis-json="/app/genesis.json" --filter-on "*"
nodeos -d /data --config-dir /app --genesis-json="/app/genesis.json"
;;
*)
exec $action "$@"
Expand Down
File renamed without changes.

0 comments on commit 3a53a52

Please sign in to comment.