Skip to content

Commit

Permalink
Pushing changes already in image
Browse files Browse the repository at this point in the history
  • Loading branch information
poplexity committed Jul 30, 2024
1 parent f5e44e8 commit e1b12d8
Show file tree
Hide file tree
Showing 5 changed files with 185 additions and 7 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /app

COPY config.ini /node/config.ini
COPY logging.json /node/logging.json
COPY genesis.json /node/genesis.json
COPY devnet.wallet /root/eosio-wallet/devnet.wallet

Expand Down
5 changes: 3 additions & 2 deletions config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ signature-provider = EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHVws5M1qqVCkAm6=KEY:5
http-server-address = 0.0.0.0:8888
p2p-listen-endpoint = 0.0.0.0:9876

wasm-runtime = eos-vm-jit
wasm-runtime = eos-vm
eos-vm-oc-enable = all

chain-state-db-size-mb = 65536
#chain-state-db-size-mb = 65536
contracts-console = true
access-control-allow-origin = *
access-control-allow-headers = *
Expand Down
2 changes: 1 addition & 1 deletion genesis.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"context_free_discount_net_usage_den": 100,
"max_block_cpu_usage": 5000000,
"target_block_cpu_usage_pct": 1000,
"max_transaction_cpu_usage": 150000,
"max_transaction_cpu_usage": 450000,
"min_transaction_cpu_usage": 100,
"max_transaction_lifetime": 3600,
"deferred_trx_expiration_window": 600,
Expand Down
163 changes: 163 additions & 0 deletions logging.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
{
"includes": [],
"appenders": [{
"name": "stderr",
"type": "console",
"args": {
"format": "${timestamp} ${thread_name} ${context} ${file}:${line} ${method} ${level}] ${message}",
"stream": "std_error",
"level_colors": [{
"level": "debug",
"color": "green"
},{
"level": "warn",
"color": "brown"
},{
"level": "error",
"color": "red"
}
],
"flush": true
},
"enabled": true
},{
"name": "stdout",
"type": "console",
"args": {
"stream": "std_out",
"level_colors": [{
"level": "debug",
"color": "green"
},{
"level": "warn",
"color": "brown"
},{
"level": "error",
"color": "red"
}
],
"flush": true
},
"enabled": true
}
],
"loggers": [{
"name": "default",
"level": "debug",
"enabled": true,
"additivity": false,
"appenders": [
"stderr",
"net"
]
},{
"name": "net_plugin_impl",
"level": "info",
"enabled": true,
"additivity": false,
"appenders": [
"stderr",
"net"
]
},{
"name": "http_plugin",
"level": "debug",
"enabled": true,
"additivity": false,
"appenders": [
"stderr",
"net"
]
},{
"name": "producer_plugin",
"level": "debug",
"enabled": true,
"additivity": false,
"appenders": [
"stderr",
"net"
]
},{
"name": "transaction_success_tracing",
"level": "debug",
"enabled": true,
"additivity": false,
"appenders": [
"stderr",
"net"
]
},{
"name": "transaction_failure_tracing",
"level": "debug",
"enabled": true,
"additivity": false,
"appenders": [
"stderr",
"net"
]
},{
"name": "trace_api",
"level": "debug",
"enabled": true,
"additivity": false,
"appenders": [
"stderr",
"net"
]
},{
"name": "transaction_trace_success",
"level": "info",
"enabled": true,
"additivity": false,
"appenders": [
"stderr",
"net"
]
},{
"name": "transaction_trace_failure",
"level": "info",
"enabled": true,
"additivity": false,
"appenders": [
"stderr",
"net"
]
},{
"name": "transient_trx_success_tracing",
"level": "debug",
"enabled": true,
"additivity": false,
"appenders": [
"stderr",
"net"
]
},{
"name": "transient_trx_failure_tracing",
"level": "debug",
"enabled": true,
"additivity": false,
"appenders": [
"stderr",
"net"
]
},{
"name": "state_history",
"level": "info",
"enabled": true,
"additivity": false,
"appenders": [
"stderr",
"net"
]
},{
"name": "transaction",
"level": "info",
"enabled": true,
"additivity": false,
"appenders": [
"stderr",
"net"
]
}
]
}
21 changes: 17 additions & 4 deletions setup_network.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e

OG_DIR=$(pwd)

nodeos --data-dir=/node/data-dir --config-dir=/node --enable-stale-production --genesis-json=/node/genesis.json &
Expand All @@ -22,24 +24,35 @@ cleos create account eosio eosio.saving EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHV
cleos create account eosio eosio.stake EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHVws5M1qqVCkAm6 EOS5uHeBsURAT6bBXNtvwKtWaiDSDJSdSmc96rHVws5M1qqVCkAm6

curl -X POST http://127.0.0.1:8888/v1/producer/schedule_protocol_feature_activations -d '{"protocol_features_to_activate": ["0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd"]}' | jq
cd contracts/eosio.boot
cleos set contract eosio . ./eosio.boot.wasm ./eosio.boot.abi
cd $OG_DIR

curl -s http://127.0.0.1:8888/v1/producer/get_supported_protocol_features | jq -r .[].feature_digest | xargs -I {} cleos push action -p eosio@active eosio activate '{"feature_digest":{}}'
echo -e "\n\n\nBUILD: Waiting for protocol feature to activate"
sleep 5
echo -e "\n\n\nBUILD: Setting eosio to eosio.boot contract"
cleos set contract eosio contracts/eosio.boot

echo -e "\n\n\nBUILD: Getting list of supported protocol features and activating them all"
#curl -s http://127.0.0.1:8888/v1/producer/get_supported_protocol_features | jq -r .[].feature_digest | xargs -I {} cleos push action -p eosio@active eosio activate '{"feature_digest":{}}'
curl -s http://127.0.0.1:8888/v1/producer/get_supported_protocol_features | jq -r '.[].feature_digest' | grep -v '0ec7e080177b2c02b278d5088611686b49d739925a92d9bfcacd7fc6b74053bd' | xargs -I {} cleos push action -p eosio@active eosio activate '{"feature_digest":"{}"}'


echo -e "\n\n\nBUILD: Waiting for protocol features to activate"
sleep 5
cd contracts/eosio.token
echo -e "\n\n\nBUILD: Setting eosio.token contract"
cleos set contract eosio.token . ./eosio.token.wasm ./eosio.token.abi
cd $OG_DIR

echo -e "\n\n\nBUILD: Deploying TLOS token"
cleos push action eosio.token create '["eosio","100000000.0000 TLOS"]' -p eosio.token@active
cleos push action eosio.token issue '["eosio","100000000.0000 TLOS","Issue max supply to eosio"]' -p eosio@active

cd contracts/eosio.system
echo -e "\n\n\nBUILD: Setting eosio to eosio.system contract"
cleos set contract eosio . ./eosio.system.wasm ./eosio.system.abi
cd $OG_DIR

cleos push action eosio init '[0,"4,TLOS"]' -p eosio@active
sleep 6

kill $NODEOS_PID
sleep 10

0 comments on commit e1b12d8

Please sign in to comment.