From e1b12d803000529614da1d28f6edae3343c5b49a Mon Sep 17 00:00:00 2001 From: Jesse Schulman Date: Mon, 29 Jul 2024 23:18:23 -0700 Subject: [PATCH] Pushing changes already in image --- Dockerfile | 1 + config.ini | 5 +- genesis.json | 2 +- logging.json | 163 +++++++++++++++++++++++++++++++++++++++++++++++ setup_network.sh | 21 ++++-- 5 files changed, 185 insertions(+), 7 deletions(-) create mode 100644 logging.json diff --git a/Dockerfile b/Dockerfile index 47467cd..5da8977 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/config.ini b/config.ini index 91d6d65..dbd3d17 100644 --- a/config.ini +++ b/config.ini @@ -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 = * diff --git a/genesis.json b/genesis.json index 15e819e..84108aa 100644 --- a/genesis.json +++ b/genesis.json @@ -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, diff --git a/logging.json b/logging.json new file mode 100644 index 0000000..803a0b5 --- /dev/null +++ b/logging.json @@ -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" + ] + } + ] +} diff --git a/setup_network.sh b/setup_network.sh index 38797d5..ffe91af 100644 --- a/setup_network.sh +++ b/setup_network.sh @@ -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 & @@ -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 \ No newline at end of file