From 59fcb5925eb5c001ef530162047a098d5555ddb5 Mon Sep 17 00:00:00 2001 From: Jonathan Giszczak Date: Mon, 19 Mar 2018 17:14:38 -0500 Subject: [PATCH] Rename eosiod to nodeos and eosioc to cleos and update docs and scripts. --- CMakeLists.txt | 2 +- Docker/Dockerfile | 14 ++-- Docker/README.md | 30 ++++----- Docker/cleos.sh | 17 +++++ Docker/docker-compose.yml | 12 ++-- Docker/eosioc.sh | 17 ----- Docker/{start_eosiod.sh => start_nodeos.sh} | 2 +- README.md | 66 +++++++++---------- debian/postinst | 4 +- plugins/mongo_db_plugin/mongo_db_plugin.cpp | 2 +- programs/CMakeLists.txt | 4 +- programs/{eosioc => cleos}/CLI11.hpp | 0 programs/{eosioc => cleos}/CMakeLists.txt | 18 ++--- programs/{eosioc => cleos}/config.hpp.in | 2 +- programs/{eosioc => cleos}/eosc.pot | 0 programs/{eosioc => cleos}/help_text.cpp | 4 +- programs/{eosioc => cleos}/help_text.hpp | 0 programs/{eosioc => cleos}/httpc.cpp | 0 programs/{eosioc => cleos}/httpc.hpp | 0 programs/{eosioc => cleos}/localize.hpp | 0 programs/{eosioc => cleos}/main.cpp | 0 programs/eosio-launcher/main.cpp | 8 +-- programs/{eosiod => nodeos}/CMakeLists.txt | 20 +++--- programs/{eosiod => nodeos}/config.hpp.in | 4 +- programs/{eosiod => nodeos}/main.cpp | 4 +- scripts/eosio-tn_bounce.sh | 23 ++++++- scripts/eosio-tn_down.sh | 4 +- scripts/eosio-tn_roll.sh | 4 +- scripts/eosio-tn_up.sh | 4 +- tests/CMakeLists.txt | 10 +-- ...mote_test.py => nodeos_run_remote_test.py} | 4 +- ...{eosiod_run_test.py => nodeos_run_test.py} | 16 ++--- tests/p2p_tests/sync/test.sh | 4 +- tests/restart-scenarios-test.py | 8 +-- tests/testUtils.py | 20 +++--- tests/trans_sync_across_mixed_cluster_test.sh | 62 ++++++++--------- 36 files changed, 204 insertions(+), 185 deletions(-) create mode 100755 Docker/cleos.sh delete mode 100755 Docker/eosioc.sh rename Docker/{start_eosiod.sh => start_nodeos.sh} (93%) rename programs/{eosioc => cleos}/CLI11.hpp (100%) rename programs/{eosioc => cleos}/CMakeLists.txt (71%) rename programs/{eosioc => cleos}/config.hpp.in (84%) rename programs/{eosioc => cleos}/eosc.pot (100%) rename programs/{eosioc => cleos}/help_text.cpp (99%) rename programs/{eosioc => cleos}/help_text.hpp (100%) rename programs/{eosioc => cleos}/httpc.cpp (100%) rename programs/{eosioc => cleos}/httpc.hpp (100%) rename programs/{eosioc => cleos}/localize.hpp (100%) rename programs/{eosioc => cleos}/main.cpp (100%) rename programs/{eosiod => nodeos}/CMakeLists.txt (86%) rename programs/{eosiod => nodeos}/config.hpp.in (82%) rename programs/{eosiod => nodeos}/main.cpp (96%) rename tests/{eosiod_run_remote_test.py => nodeos_run_remote_test.py} (95%) rename tests/{eosiod_run_test.py => nodeos_run_test.py} (98%) diff --git a/CMakeLists.txt b/CMakeLists.txt index c3cfd8c86..d32b068b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ set(VERSION_MAJOR 3) set(VERSION_MINOR 0) set(VERSION_PATCH 1) -set( CLI_CLIENT_EXECUTABLE_NAME eosioc ) +set( CLI_CLIENT_EXECUTABLE_NAME cleos ) set( GUI_CLIENT_EXECUTABLE_NAME eosio ) set( CUSTOM_URL_SCHEME "gcs" ) set( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" ) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 8a603f785..b5d60e5c3 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -11,15 +11,13 @@ RUN git clone -b master --depth 1 https://github.com/EOSIO/eos.git --recursive \ FROM ubuntu:16.04 RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install openssl && rm -rf /var/lib/apt/lists/* - -COPY --from=builder /opt/eosio /opt/eosio -COPY --from=builder /contracts /contracts -COPY start_eosiod.sh /opt/eosio/bin/ -COPY config.ini / -COPY genesis.json / - +COPY --from=builder /usr/local/lib/* /usr/local/lib/ +COPY --from=builder /tmp/build/bin /opt/eosio/bin +COPY --from=builder /tmp/build/contracts /contracts +COPY --from=builder /eos/Docker/config.ini /eos/genesis.json / +COPY start_eosiod.sh /opt/eosio/bin/start_eosiod.sh ENV EOSIO_ROOT=/opt/eosio -RUN chmod +x /opt/eosio/bin/start_eosiod.sh +RUN chmod +x /opt/eosio/bin/start_nodeos.sh ENV LD_LIBRARY_PATH /usr/local/lib VOLUME /opt/eosio/bin/data-dir ENV PATH /opt/eosio/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin diff --git a/Docker/README.md b/Docker/README.md index 8ddb3c56f..02b20f4be 100644 --- a/Docker/README.md +++ b/Docker/README.md @@ -16,22 +16,22 @@ cd eos/Docker docker build . -t eosio/eos ``` -## Start eosiod docker container only +## Start nodeos docker container only ```bash -docker run --name eosiod -p 8888:8888 -p 9876:9876 -t eosio/eos start_eosiod.sh arg1 arg2 +docker run --name nodeos -p 8888:8888 -p 9876:9876 -t eosio/eos start_nodeos.sh arg1 arg2 ``` By default, all data is persisted in a docker volume. It can be deleted if the data is outdated or corrupted: ``` bash -$ docker inspect --format '{{ range .Mounts }}{{ .Name }} {{ end }}' eosiod +$ docker inspect --format '{{ range .Mounts }}{{ .Name }} {{ end }}' nodeos fdc265730a4f697346fa8b078c176e315b959e79365fc9cbd11f090ea0cb5cbc $ docker volume rm fdc265730a4f697346fa8b078c176e315b959e79365fc9cbd11f090ea0cb5cbc ``` Alternately, you can directly mount host directory into the container ```bash -docker run --name eosiod -v /path-to-data-dir:/opt/eosio/bin/data-dir -p 8888:8888 -p 9876:9876 -t eosio/eos start_eosiod.sh arg1 arg2 +docker run --name nodeos -v /path-to-data-dir:/opt/eosio/bin/data-dir -p 8888:8888 -p 9876:9876 -t eosio/eos start_nodeos.sh arg1 arg2 ``` ## Get chain info @@ -40,29 +40,29 @@ docker run --name eosiod -v /path-to-data-dir:/opt/eosio/bin/data-dir -p 8888:88 curl http://127.0.0.1:8888/v1/chain/get_info ``` -## Start both eosiod and walletd containers +## Start both nodeos and walletd containers ```bash docker-compose up ``` -After `docker-compose up`, two services named eosiod and walletd will be started. eosiod service would expose ports 8888 and 9876 to the host. walletd service does not expose any port to the host, it is only accessible to eosioc when runing eosioc is running inside the walletd container as described in "Execute eosioc commands" section. +After `docker-compose up`, two services named nodeos and walletd will be started. nodeos service would expose ports 8888 and 9876 to the host. walletd service does not expose any port to the host, it is only accessible to cleos when runing cleos is running inside the walletd container as described in "Execute cleos commands" section. -### Execute eosioc commands +### Execute cleos commands -You can run the `eosioc` commands via a bash alias. +You can run the `cleos` commands via a bash alias. ```bash -alias eosioc='docker-compose exec walletd /opt/eosio/bin/eosioc -H eosiod' -eosioc get info -eosioc get account inita +alias cleos='docker-compose exec walletd /opt/eosio/bin/cleos -H nodeos' +cleos get info +cleos get account inita ``` Upload sample exchange contract ```bash -eosioc set contract exchange contracts/exchange/exchange.wast contracts/exchange/exchange.abi +cleos set contract exchange contracts/exchange/exchange.wast contracts/exchange/exchange.abi ``` If you don't need walletd afterwards, you can stop the walletd service using @@ -78,9 +78,9 @@ You can use docker compose override file to change the default configurations. F version: "2" services: - eosiod: + nodeos: volumes: - - eosiod-data-volume:/opt/eosio/bin/data-dir + - nodeos-data-volume:/opt/eosio/bin/data-dir - ./config2.ini:/opt/eosio/bin/data-dir/config.ini ``` @@ -95,5 +95,5 @@ docker-compose up The data volume created by docker-compose can be deleted as follows: ```bash -docker volume rm docker_eosiod-data-volume +docker volume rm docker_nodeos-data-volume ``` diff --git a/Docker/cleos.sh b/Docker/cleos.sh new file mode 100755 index 000000000..26d2e38e8 --- /dev/null +++ b/Docker/cleos.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# Usage: +# Go into cmd loop: sudo ./cleos.sh +# Run single cmd: sudo ./cleos.sh + +PREFIX="docker exec docker_nodeos_1 cleos" +if [ -z $1 ] ; then + while : + do + read -e -p "cleos " cmd + history -s "$cmd" + $PREFIX $cmd + done +else + $PREFIX $@ +fi diff --git a/Docker/docker-compose.yml b/Docker/docker-compose.yml index 7a2025806..0cb006c91 100755 --- a/Docker/docker-compose.yml +++ b/Docker/docker-compose.yml @@ -1,27 +1,27 @@ -version: "2" +version: "3" services: - eosiod: + nodeos: build: context: . image: eosio/eos - command: /opt/eosio/bin/start_eosiod.sh + command: /opt/eosio/bin/start_nodeos.sh ports: - 8888:8888 - 9876:9876 expose: - "8888" volumes: - - eosiod-data-volume:/opt/eosio/bin/data-dir + - nodeos-data-volume:/opt/eosio/bin/data-dir walletd: image: eosio/eos command: /opt/eosio/bin/eosiowd links: - - eosiod + - nodeos volumes: - walletd-data-volume:/opt/eosio/bin/data-dir volumes: - eosiod-data-volume: + nodeos-data-volume: walletd-data-volume: diff --git a/Docker/eosioc.sh b/Docker/eosioc.sh deleted file mode 100755 index e47156174..000000000 --- a/Docker/eosioc.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# Usage: -# Go into cmd loop: sudo ./eosioc.sh -# Run single cmd: sudo ./eosioc.sh - -PREFIX="docker exec docker_eosiod_1 eosioc" -if [ -z $1 ] ; then - while : - do - read -e -p "eosioc " cmd - history -s "$cmd" - $PREFIX $cmd - done -else - $PREFIX $@ -fi diff --git a/Docker/start_eosiod.sh b/Docker/start_nodeos.sh similarity index 93% rename from Docker/start_eosiod.sh rename to Docker/start_nodeos.sh index 983cf7e54..1694a98a8 100755 --- a/Docker/start_eosiod.sh +++ b/Docker/start_nodeos.sh @@ -36,4 +36,4 @@ else CONFIG_DIR="" fi -exec /opt/eosio/bin/eosiod $CONFIG_DIR $@ +exec /opt/eosio/bin/nodeos $CONFIG_DIR $@ diff --git a/README.md b/README.md index b5647ebec..217159251 100644 --- a/README.md +++ b/README.md @@ -216,15 +216,15 @@ To run the test suite after building, run the `chain_test` executable in the `te EOS comes with a number of programs you can find in `~/eos/build/programs`. They are listed below: -* eosiod - server-side blockchain node component -* eosioc - command line interface to interact with the blockchain +* nodeos - server-side blockchain node component +* cleos - command line interface to interact with the blockchain * eosiowd - EOS wallet * eosio-launcher - application for nodes network composing and deployment; [more on eosio-launcher](https://github.com/EOSIO/eos/blob/master/testnet.md) ### Creating and launching a single-node testnet -After successfully building the project, the `eosiod` binary should be present in the `build/programs/eosiod` directory. Run `eosiod` -- it will probably exit with an error, but if not, close it immediately with Ctrl-C. If it exited with an error, note that `eosiod` created a directory named `data-dir` containing the default configuration (`config.ini`) and some other internals. This default data storage path can be overridden by passing `--data-dir /path/to/data` to `eosiod`. These instructions will continue to use the default directory. +After successfully building the project, the `nodeos` binary should be present in the `build/programs/nodeos` directory. Run `nodeos` -- it will probably exit with an error, but if not, close it immediately with Ctrl-C. If it exited with an error, note that `nodeos` created a directory named `data-dir` containing the default configuration (`config.ini`) and some other internals. This default data storage path can be overridden by passing `--data-dir /path/to/data` to `nodeos`. These instructions will continue to use the default directory. Edit the `config.ini` file, adding/updating the following settings to the defaults already in place: @@ -264,10 +264,10 @@ plugin = eosio::chain_api_plugin plugin = eosio::http_plugin ``` -Now it should be possible to run `eosiod` and see it begin producing blocks. -You can specify the location of a custom `config.ini` by passing the `--config-dir` argument to `eosiod`. +Now it should be possible to run `nodeos` and see it begin producing blocks. +You can specify the location of a custom `config.ini` by passing the `--config-dir` argument to `nodeos`. -When running `eosiod` you should get log messages similar to below. It means the blocks are successfully produced. +When running `nodeos` you should get log messages similar to below. It means the blocks are successfully produced. ``` 1575001ms thread-0 chain_controller.cpp:235 _push_block ] initm #1 @2017-09-04T04:26:15 | 0 trx, 0 pending, exectime_ms=0 @@ -292,24 +292,24 @@ EOS comes with example contracts that can be uploaded and run for testing purpos First, run the node ```bash -cd ~/eos/build/programs/eosiod/ -./eosiod +cd ~/eos/build/programs/nodeos/ +./nodeos ``` ### Setting up a wallet and importing account key -As you've previously added `plugin = eosio::wallet_api_plugin` into `config.ini`, EOS wallet will be running as a part of `eosiod` process. Every contract requires an associated account, so first, create a wallet. +As you've previously added `plugin = eosio::wallet_api_plugin` into `config.ini`, EOS wallet will be running as a part of `nodeos` process. Every contract requires an associated account, so first, create a wallet. ```bash -cd ~/eos/build/programs/eosioc/ -./eosioc wallet create # Outputs a password that you need to save to be able to lock/unlock the wallet +cd ~/eos/build/programs/cleos/ +./cleos wallet create # Outputs a password that you need to save to be able to lock/unlock the wallet ``` For the purpose of this walkthrough, import the private key of the `eosio` account, a system account included within genesis.json, so that you're able to issue API commands under authority of an existing account. The private key referenced below is found within your `config.ini` and is provided to you for testing purposes. ```bash -./eosioc wallet import 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 +./cleos wallet import 5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3 ``` @@ -318,9 +318,9 @@ For the purpose of this walkthrough, import the private key of the `eosio` accou First, generate some public/private key pairs that will be later assigned as `owner_key` and `active_key`. ```bash -cd ~/eos/build/programs/eosioc/ -./eosioc create key # owner_key -./eosioc create key # active_key +cd ~/eos/build/programs/cleos/ +./cleos create key # owner_key +./cleos create key # active_key ``` This will output two pairs of public and private keys @@ -336,7 +336,7 @@ Save the values for future reference. Run the `create` command where `eosio` is the account authorizing the creation of the `currency` account and `PUBLIC_KEY_1` and `PUBLIC_KEY_2` are the values generated by the `create key` command ```bash -./eosioc create account eosio currency PUBLIC_KEY_1 PUBLIC_KEY_2 +./cleos create account eosio currency PUBLIC_KEY_1 PUBLIC_KEY_2 ``` You should then get a JSON response back with a transaction ID confirming it was executed successfully. @@ -344,7 +344,7 @@ You should then get a JSON response back with a transaction ID confirming it was Go ahead and check that the account was successfully created ```bash -./eosioc get account currency +./cleos get account currency ``` If all went well, you will receive output similar to the following: @@ -362,7 +362,7 @@ If all went well, you will receive output similar to the following: Now import the active private key generated previously in the wallet: ```bash -./eosioc wallet import XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +./cleos wallet import XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ``` @@ -371,14 +371,14 @@ Now import the active private key generated previously in the wallet: Before uploading a contract, verify that there is no current contract: ```bash -./eosioc get code currency +./cleos get code currency code hash: 0000000000000000000000000000000000000000000000000000000000000000 ``` With an account for a contract created, upload a sample contract: ```bash -./eosioc set contract currency ../../contracts/currency/currency.wast ../../contracts/currency/currency.abi +./cleos set contract currency ../../contracts/currency/currency.wast ../../contracts/currency/currency.abi ``` As a response you should get a JSON with a `transaction_id` field. Your contract was successfully uploaded! @@ -386,7 +386,7 @@ As a response you should get a JSON with a `transaction_id` field. Your contract You can also verify that the code has been set with the following command: ```bash -./eosioc get code currency +./cleos get code currency ``` It will return something like: @@ -397,13 +397,13 @@ code hash: 9b9db1a7940503a88535517049e64467a6e8f4e9e03af15e9968ec89dd794975 Before using the currency contract, you must issue the currency. ```bash -./eosioc push action currency issue '{"to":"currency","quantity":"1000.0000 CUR"}' --permission currency@active +./cleos push action currency issue '{"to":"currency","quantity":"1000.0000 CUR"}' --permission currency@active ``` Next verify the currency contract has the proper initial balance: ```bash -./eosioc get table currency currency account +./cleos get table currency currency account { "rows": [{ "currency": 1381319428, @@ -422,13 +422,13 @@ Anyone can send any message to any contract at any time, but the contracts may r The content of the message is `'{"from":"currency","to":"eosio","quantity":"20.0000 CUR","memo":"any string"}'`. In this case we are asking the currency contract to transfer funds from itself to someone else. This requires the permission of the currency contract. ```bash -./eosioc push action currency transfer '{"from":"currency","to":"eosio","quantity":"20.0000 CUR","memo":"my first transfer"}' --permission currency@active +./cleos push action currency transfer '{"from":"currency","to":"eosio","quantity":"20.0000 CUR","memo":"my first transfer"}' --permission currency@active ``` Below is a generalization that shows the `currency` account is only referenced once, to specify which contract to deliver the `transfer` message to. ```bash -./eosioc push action currency transfer '{"from":"${usera}","to":"${userb}","quantity":"20.0000 CUR","memo":""}' --permission ${usera}@active +./cleos push action currency transfer '{"from":"${usera}","to":"${userb}","quantity":"20.0000 CUR","memo":""}' --permission ${usera}@active ``` As confirmation of a successfully submitted transaction, you will receive JSON output that includes a `transaction_id` field. @@ -439,7 +439,7 @@ As confirmation of a successfully submitted transaction, you will receive JSON o So now check the state of both of the accounts involved in the previous transaction. ```bash -./eosioc get table eosio currency account +./cleos get table eosio currency account { "rows": [{ "currency": 1381319428, @@ -448,7 +448,7 @@ So now check the state of both of the accounts involved in the previous transact ], "more": false } -./eosioc get table currency currency account +./cleos get table currency currency account { "rows": [{ "currency": 1381319428, @@ -479,15 +479,15 @@ This command will generate two data folders for each instance of the node: `tn_d You should see the following response: ```bash -spawning child, programs/eosiod/eosiod --skip-transaction-signatures --data-dir tn_data_0 -spawning child, programs/eosiod/eosiod --skip-transaction-signatures --data-dir tn_data_1 +spawning child, programs/nodeos/nodeos --skip-transaction-signatures --data-dir tn_data_0 +spawning child, programs/nodeos/nodeos --skip-transaction-signatures --data-dir tn_data_1 ``` -To confirm the nodes are running, run the following `eosioc` commands: +To confirm the nodes are running, run the following `cleos` commands: ```bash -~/eos/build/programs/eosioc -./eosioc -p 8888 get info -./eosioc -p 8889 get info +~/eos/build/programs/cleos +./cleos -p 8888 get info +./cleos -p 8889 get info ``` For each command, you should get a JSON response with blockchain information. diff --git a/debian/postinst b/debian/postinst index 0e66c2a01..42123695c 100755 --- a/debian/postinst +++ b/debian/postinst @@ -40,8 +40,8 @@ case "$1" in chown ${USER}:${GROUP} /var/lib/${PACKAGE} chown ${USER}:${GROUP} /etc/${PACKAGE} chown ${USER}:${GROUP} /etc/${PACKAGE}/node_00 - chown ${USER} /usr/bin/eosiod - chmod u+s /usr/bin/eosiod + chown ${USER} /usr/bin/nodeos + chmod u+s /usr/bin/nodeos ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/plugins/mongo_db_plugin/mongo_db_plugin.cpp b/plugins/mongo_db_plugin/mongo_db_plugin.cpp index 7010cab9e..3a3508c89 100644 --- a/plugins/mongo_db_plugin/mongo_db_plugin.cpp +++ b/plugins/mongo_db_plugin/mongo_db_plugin.cpp @@ -774,7 +774,7 @@ void mongo_db_plugin::set_program_options(options_description& cli, options_desc { cfg.add_options() ("mongodb-queue-size,q", bpo::value()->default_value(256), - "The queue size between eosiod and MongoDB plugin thread.") + "The queue size between nodeos and MongoDB plugin thread.") ("mongodb-uri,m", bpo::value(), "MongoDB URI connection string, see: https://docs.mongodb.com/master/reference/connection-string/." " If not specified then plugin is disabled. Default database 'EOS' is used if not specified in URI.") diff --git a/programs/CMakeLists.txt b/programs/CMakeLists.txt index 338254a37..b5f962f1e 100644 --- a/programs/CMakeLists.txt +++ b/programs/CMakeLists.txt @@ -1,5 +1,5 @@ -add_subdirectory( eosiod ) -add_subdirectory( eosioc ) +add_subdirectory( nodeos ) +add_subdirectory( cleos ) add_subdirectory( eosiowd ) add_subdirectory( eosio-launcher ) add_subdirectory( eosio-applesedemo ) diff --git a/programs/eosioc/CLI11.hpp b/programs/cleos/CLI11.hpp similarity index 100% rename from programs/eosioc/CLI11.hpp rename to programs/cleos/CLI11.hpp diff --git a/programs/eosioc/CMakeLists.txt b/programs/cleos/CMakeLists.txt similarity index 71% rename from programs/eosioc/CMakeLists.txt rename to programs/cleos/CMakeLists.txt index 19e30cd5a..938032d1f 100644 --- a/programs/eosioc/CMakeLists.txt +++ b/programs/cleos/CMakeLists.txt @@ -1,4 +1,4 @@ -add_executable( eosioc main.cpp httpc.cpp help_text.cpp localize.hpp config.hpp CLI11.hpp) +add_executable( cleos main.cpp httpc.cpp help_text.cpp localize.hpp config.hpp CLI11.hpp) if( UNIX AND NOT APPLE ) set(rt_library rt ) endif() @@ -15,28 +15,30 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../.git) execute_process( COMMAND ${GIT_EXECUTABLE} rev-parse --short=8 HEAD WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../.." - OUTPUT_VARIABLE "eosc_BUILD_VERSION" + OUTPUT_VARIABLE "cleos_BUILD_VERSION" ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) - message(STATUS "Git commit revision: ${eosc_BUILD_VERSION}") + message(STATUS "Git commit revision: ${cleos_BUILD_VERSION}") else() - set(eosc_BUILD_VERSION 0) + set(cleos_BUILD_VERSION 0) endif() +else() + set(cleos_BUILD_VERSION 0) endif() find_package(Intl REQUIRED) set(LOCALEDIR ${CMAKE_INSTALL_PREFIX}/share/locale) -set(LOCALEDOMAIN eosioc) +set(LOCALEDOMAIN cleos) configure_file(config.hpp.in config.hpp ESCAPE_QUOTES) -target_include_directories(eosioc PUBLIC ${Intl_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(cleos PUBLIC ${Intl_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR}) -target_link_libraries( eosioc +target_link_libraries( cleos PRIVATE appbase chain_api_plugin producer_plugin chain_plugin http_plugin eosio_chain fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} ${Intl_LIBRARIES} ) install( TARGETS - eosioc + cleos RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} diff --git a/programs/eosioc/config.hpp.in b/programs/cleos/config.hpp.in similarity index 84% rename from programs/eosioc/config.hpp.in rename to programs/cleos/config.hpp.in index 781720ddb..37081daf3 100644 --- a/programs/eosioc/config.hpp.in +++ b/programs/cleos/config.hpp.in @@ -5,7 +5,7 @@ */ namespace eosio { namespace client { namespace config { - constexpr char version_str[] = "${eosc_BUILD_VERSION}"; + constexpr char version_str[] = "${cleos_BUILD_VERSION}"; constexpr char locale_path[] = "${LOCALEDIR}"; constexpr char locale_domain[] = "${LOCALEDOMAIN}"; }}} diff --git a/programs/eosioc/eosc.pot b/programs/cleos/eosc.pot similarity index 100% rename from programs/eosioc/eosc.pot rename to programs/cleos/eosc.pot diff --git a/programs/eosioc/help_text.cpp b/programs/cleos/help_text.cpp similarity index 99% rename from programs/eosioc/help_text.cpp rename to programs/cleos/help_text.cpp index 62a39ba5d..e02446f7d 100644 --- a/programs/eosioc/help_text.cpp +++ b/programs/cleos/help_text.cpp @@ -63,7 +63,7 @@ const char* duplicate_key_import_help_text = _("This key is already imported int const char* unknown_abi_table_help_text = _(R"text(The ABI for the code on account "${1}" does not specify table "${2}". Please check the account and table name, and verify that the account has the expected code using: - eosioc get code ${1})text"); + cleos get code ${1})text"); const char* help_regex_error = _("Error locating help text: ${code} ${what}"); @@ -276,4 +276,4 @@ bool print_help_text(const fc::exception& e) { return result; } -}}} \ No newline at end of file +}}} diff --git a/programs/eosioc/help_text.hpp b/programs/cleos/help_text.hpp similarity index 100% rename from programs/eosioc/help_text.hpp rename to programs/cleos/help_text.hpp diff --git a/programs/eosioc/httpc.cpp b/programs/cleos/httpc.cpp similarity index 100% rename from programs/eosioc/httpc.cpp rename to programs/cleos/httpc.cpp diff --git a/programs/eosioc/httpc.hpp b/programs/cleos/httpc.hpp similarity index 100% rename from programs/eosioc/httpc.hpp rename to programs/cleos/httpc.hpp diff --git a/programs/eosioc/localize.hpp b/programs/cleos/localize.hpp similarity index 100% rename from programs/eosioc/localize.hpp rename to programs/cleos/localize.hpp diff --git a/programs/eosioc/main.cpp b/programs/cleos/main.cpp similarity index 100% rename from programs/eosioc/main.cpp rename to programs/cleos/main.cpp diff --git a/programs/eosio-launcher/main.cpp b/programs/eosio-launcher/main.cpp index a4eb85833..e46aa1ec1 100644 --- a/programs/eosio-launcher/main.cpp +++ b/programs/eosio-launcher/main.cpp @@ -399,12 +399,12 @@ launcher_def::set_options (bpo::options_description &cli) { ("genesis,g",bpo::value(&genesis)->default_value("./genesis.json"),"set the path to genesis.json") ("output,o",bpo::value(&output),"save a copy of the generated topology in this file") ("skip-signature", bpo::bool_switch(&skip_transaction_signatures)->default_value(false), "EOSD does not require transaction signatures.") - ("eosiod", bpo::value(&eosd_extra_args), "forward eosiod command line argument(s) to each instance of eosiod, enclose arg in quotes") + ("nodeos", bpo::value(&eosd_extra_args), "forward nodeos command line argument(s) to each instance of nodeos, enclose arg in quotes") ("delay,d",bpo::value(&start_delay)->default_value(0),"seconds delay before starting each node after the first") ("nogen",bpo::bool_switch(&nogen)->default_value(false),"launch nodes without writing new config files") ("host-map",bpo::value(&host_map_file)->default_value(""),"a file containing mapping specific nodes to hosts. Used to enhance the custom shape argument") ("servers",bpo::value(&server_ident_file)->default_value(""),"a file containing ip addresses and names of individual servers to deploy as producers or observers ") - ("per-host",bpo::value(&per_host)->default_value(0),"specifies how many eosiod instances will run on a single host. Use 0 to indicate all on one.") + ("per-host",bpo::value(&per_host)->default_value(0),"specifies how many nodeos instances will run on a single host. Use 0 to indicate all on one.") ("network-name",bpo::value(&network.name)->default_value("testnet_"),"network name prefix used in GELF logging source") ("enable-gelf-logging",bpo::value(&gelf_enabled)->default_value(true),"enable gelf logging appender in logging configuration file") ("gelf-endpoint",bpo::value(&gelf_endpoint)->default_value("10.160.11.21:12201"),"hostname:port or ip:port of GELF endpoint") @@ -1140,13 +1140,13 @@ launcher_def::launch (eosd_def &instance, string >s) { bf::path reerr_sl = dd / "stderr.txt"; bf::path reerr_base = bf::path("stderr." + launch_time + ".txt"); bf::path reerr = dd / reerr_base; - bf::path pidf = dd / "eosiod.pid"; + bf::path pidf = dd / "nodeos.pid"; host_def* host = deploy_config_files (*instance.node); node_rt_info info; info.remote = !host->is_local(); - string eosdcmd = "programs/eosiod/eosiod "; + string eosdcmd = "programs/nodeos/nodeos "; if (skip_transaction_signatures) { eosdcmd += "--skip-transaction-signatures "; } diff --git a/programs/eosiod/CMakeLists.txt b/programs/nodeos/CMakeLists.txt similarity index 86% rename from programs/eosiod/CMakeLists.txt rename to programs/nodeos/CMakeLists.txt index 9a7c78ff1..686df186e 100644 --- a/programs/eosiod/CMakeLists.txt +++ b/programs/nodeos/CMakeLists.txt @@ -1,11 +1,11 @@ -add_executable( eosiod main.cpp ) +add_executable( nodeos main.cpp ) if( UNIX AND NOT APPLE ) set(rt_library rt ) endif() find_package( Gperftools QUIET ) if( GPERFTOOLS_FOUND ) - message( STATUS "Found gperftools; compiling eosiod with TCMalloc") + message( STATUS "Found gperftools; compiling nodeos with TCMalloc") list( APPEND PLATFORM_SPECIFIC_LIBS tcmalloc ) endif() @@ -15,18 +15,20 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../.git) execute_process( COMMAND ${GIT_EXECUTABLE} rev-parse --short=8 HEAD WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../.." - OUTPUT_VARIABLE "eosiod_BUILD_VERSION" + OUTPUT_VARIABLE "nodeos_BUILD_VERSION" ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE) - message(STATUS "Git commit revision: ${eosiod_BUILD_VERSION}") + message(STATUS "Git commit revision: ${nodeos_BUILD_VERSION}") else() - set(eosiod_BUILD_VERSION 0) + set(nodeos_BUILD_VERSION 0) endif() +else() + set(nodeos_BUILD_VERSION 0) endif() configure_file(config.hpp.in config.hpp ESCAPE_QUOTES) -target_include_directories(eosiod PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(nodeos PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) if(UNIX) if(APPLE) @@ -41,7 +43,7 @@ else() set(no_whole_archive_flag "--no-whole-archive") endif() -target_link_libraries( eosiod +target_link_libraries( nodeos PRIVATE appbase PRIVATE -Wl,${whole_archive_flag} account_history_api_plugin -Wl,${no_whole_archive_flag} account_history_plugin PRIVATE -Wl,${whole_archive_flag} chain_api_plugin -Wl,${no_whole_archive_flag} producer_plugin chain_plugin @@ -51,12 +53,12 @@ target_link_libraries( eosiod PRIVATE eosio_chain fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} ) if(BUILD_MONGO_DB_PLUGIN) - target_link_libraries( eosiod + target_link_libraries( nodeos PRIVATE -Wl,${whole_archive_flag} mongo_db_plugin -Wl,${no_whole_archive_flag} ) endif() install( TARGETS - eosiod + nodeos RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} diff --git a/programs/eosiod/config.hpp.in b/programs/nodeos/config.hpp.in similarity index 82% rename from programs/eosiod/config.hpp.in rename to programs/nodeos/config.hpp.in index 3eba7c7a6..8afd248ea 100644 --- a/programs/eosiod/config.hpp.in +++ b/programs/nodeos/config.hpp.in @@ -9,8 +9,8 @@ #ifndef CONFIG_HPP_IN #define CONFIG_HPP_IN -namespace eosio { namespace eosiod { namespace config { - constexpr uint64_t version = 0x${eosiod_BUILD_VERSION}; +namespace eosio { namespace nodeos { namespace config { + constexpr uint64_t version = 0x${nodeos_BUILD_VERSION}; template std::string itoh(I n, size_t hlen = sizeof(I)<<1) { diff --git a/programs/eosiod/main.cpp b/programs/nodeos/main.cpp similarity index 96% rename from programs/eosiod/main.cpp rename to programs/nodeos/main.cpp index fb2666fca..116ddec8b 100644 --- a/programs/eosiod/main.cpp +++ b/programs/nodeos/main.cpp @@ -100,14 +100,14 @@ bfs::path determine_root_directory() int main(int argc, char** argv) { try { - app().set_version(eosio::eosiod::config::version); + app().set_version(eosio::nodeos::config::version); bfs::path root = determine_root_directory(); app().set_default_data_dir(root / "var/lib/eosio/node_00"); app().set_default_config_dir(root / "etc/eosio/node_00"); if(!app().initialize(argc, argv)) return -1; initialize_logging(); - ilog("eosiod version ${ver}", ("ver", eosio::eosiod::config::itoh(static_cast(app().version())))); + ilog("nodeos version ${ver}", ("ver", eosio::nodeos::config::itoh(static_cast(app().version())))); ilog("eosio root is ${root}", ("root", root.string())); app().startup(); app().exec(); diff --git a/scripts/eosio-tn_bounce.sh b/scripts/eosio-tn_bounce.sh index 7dc3647f8..b82ff465c 100755 --- a/scripts/eosio-tn_bounce.sh +++ b/scripts/eosio-tn_bounce.sh @@ -13,9 +13,26 @@ cd $EOSIO_HOME -prog=eosd -if [ ! \( -f programs/$prog/$prog \) ]; then - prog=eosiod +prog="" +RD="" +for p in eosd eosiod nodeos; do + prog=$p + RD=bin + if [ -f $RD/$prog ]; then + break; + else + RD=programs/$prog + if [ -f $RD/$prog ]; then + break; + fi + fi + prog="" + RD="" +done + +if [ \( -z "$prog" \) -o \( -z "$RD" \) ]; then + echo unable to locate binary for eosd or eosiod or nodeos + exit 1 fi if [ -z "$EOSIO_TN_NODE" ]; then diff --git a/scripts/eosio-tn_down.sh b/scripts/eosio-tn_down.sh index 0b98ab3ff..8050c0ade 100755 --- a/scripts/eosio-tn_down.sh +++ b/scripts/eosio-tn_down.sh @@ -12,7 +12,7 @@ fi prog="" RD="" -for p in eosd eosiod; do +for p in eosd eosiod nodeos; do prog=$p RD=bin if [ -f $RD/$prog ]; then @@ -28,7 +28,7 @@ for p in eosd eosiod; do done if [ \( -z "$prog" \) -o \( -z "RD" \) ]; then - echo unable to locate binary for eosd or eosiod + echo unable to locate binary for eosd or eosiod or nodeos exit 1 fi diff --git a/scripts/eosio-tn_roll.sh b/scripts/eosio-tn_roll.sh index edc0f5f24..e93ba6b7d 100755 --- a/scripts/eosio-tn_roll.sh +++ b/scripts/eosio-tn_roll.sh @@ -37,7 +37,7 @@ fi prog="" RD="" -for p in eosd eosiod; do +for p in eosd eosiod nodeos; do prog=$p RD=bin if [ -f $RD/$prog ]; then @@ -53,7 +53,7 @@ for p in eosd eosiod; do done if [ \( -z "$prog" \) -o \( -z "$RD" \) ]; then - echo unable to locate binary for eosd or eosiod + echo unable to locate binary for eosd or eosiod or nodeos exit 1 fi diff --git a/scripts/eosio-tn_up.sh b/scripts/eosio-tn_up.sh index 8a81ed121..848355f03 100755 --- a/scripts/eosio-tn_up.sh +++ b/scripts/eosio-tn_up.sh @@ -39,7 +39,7 @@ fi prog="" RD="" -for p in eosd eosiod; do +for p in eosd eosiod nodeos; do prog=$p RD=bin if [ -f $RD/$prog ]; then @@ -55,7 +55,7 @@ for p in eosd eosiod; do done if [ \( -z "$prog" \) -o \( -z "$RD" \) ]; then - echo unable to locate binary for eosd or eosiod + echo unable to locate binary for eosd or eosiod or nodeos exit 1 fi diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f849c071d..753df4163 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -52,16 +52,16 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/distributed-transactions-remote-test. configure_file(${CMAKE_CURRENT_SOURCE_DIR}/sample-cluster-map.json ${CMAKE_CURRENT_BINARY_DIR}/sample-cluster-map.json COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/restart-scenarios-test.py ${CMAKE_CURRENT_BINARY_DIR}/restart-scenarios-test.py COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/testUtils.py ${CMAKE_CURRENT_BINARY_DIR}/testUtils.py COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/eosiod_run_test.py ${CMAKE_CURRENT_BINARY_DIR}/eosiod_run_test.py COPYONLY) -configure_file(${CMAKE_CURRENT_SOURCE_DIR}/eosiod_run_remote_test.py ${CMAKE_CURRENT_BINARY_DIR}/eosiod_run_remote_test.py COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nodeos_run_test.py ${CMAKE_CURRENT_BINARY_DIR}/nodeos_run_test.py COPYONLY) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/nodeos_run_remote_test.py ${CMAKE_CURRENT_BINARY_DIR}/nodeos_run_remote_test.py COPYONLY) configure_file(${CMAKE_CURRENT_SOURCE_DIR}/consensus-validation-malicious-producers.py ${CMAKE_CURRENT_BINARY_DIR}/consensus-validation-malicious-producers.py COPYONLY) add_test(chain_test chain_test --report_level=detailed) -add_test(NAME eosiod_run_test COMMAND tests/eosiod_run_test.py -v --dump-error-detail WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) -add_test(NAME eosiod_run_remote_test COMMAND tests/eosiod_run_remote_test.py --dump-error-detail WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +add_test(NAME nodeos_run_test COMMAND tests/nodeos_run_test.py -v --dump-error-detail WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) +add_test(NAME nodeos_run_remote_test COMMAND tests/nodeos_run_remote_test.py --dump-error-detail WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) add_test(NAME p2p_dawn515_test COMMAND tests/p2p_tests/dawn_515/test.sh WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) if(BUILD_MONGO_DB_PLUGIN) - add_test(NAME eosiod_run_test-mongodb COMMAND tests/eosiod_run_test.py --mongodb --dump-error-detail WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) + add_test(NAME nodeos_run_test-mongodb COMMAND tests/nodeos_run_test.py --mongodb --dump-error-detail WORKING_DIRECTORY ${CMAKE_BINARY_DIR}) endif() # TODO: Tests removed until working again on master. diff --git a/tests/eosiod_run_remote_test.py b/tests/nodeos_run_remote_test.py similarity index 95% rename from tests/eosiod_run_remote_test.py rename to tests/nodeos_run_remote_test.py index b5825bf29..71c3c177a 100755 --- a/tests/eosiod_run_remote_test.py +++ b/tests/nodeos_run_remote_test.py @@ -30,7 +30,7 @@ topo="mesh" delay=1 pnodes=1 total_nodes=pnodes -actualTest="tests/eosiod_run_test.py" +actualTest="tests/nodeos_run_test.py" if not amINoon: actualTest="tests/eosd_run_test.py" testSuccessful=False @@ -56,7 +56,7 @@ try: errorExit("Cluster never stabilized") cmd="%s --dont-launch %s %s" % (actualTest, "-v" if debug else "", "" if amINoon else "--not-noon") - Print("Starting up %s test: %s" % ("eosiod" if amINoon else "eosd", actualTest)) + Print("Starting up %s test: %s" % ("nodeos" if amINoon else "eosd", actualTest)) Print("cmd: %s\n" % (cmd)) if 0 != subprocess.call(cmd, shell=True): errorExit("failed to run cmd.") diff --git a/tests/eosiod_run_test.py b/tests/nodeos_run_test.py similarity index 98% rename from tests/eosiod_run_test.py rename to tests/nodeos_run_test.py index 604677f3a..77e0c9f85 100755 --- a/tests/eosiod_run_test.py +++ b/tests/nodeos_run_test.py @@ -8,7 +8,7 @@ import random import re ############################################################### -# eosiod_run_test +# nodeos_run_test # --dump-error-details # --keep-logs ############################################################### @@ -81,7 +81,7 @@ ClientName="eosc" if amINoon: WalletdName="eosio-walletd" - ClientName="eosioc" + ClientName="cleos" # noon branch requires longer mongo sync time. testUtils.Utils.setMongoSyncTime(50) else: @@ -446,7 +446,7 @@ try: opts="--permission currency@active" trans=node.pushMessage(contract, action, data, opts) - # TODO need to update eosio.system contract to use new currency and update eosioc and chain_plugin for interaction + # TODO need to update eosio.system contract to use new currency and update cleos and chain_plugin for interaction # Print("Verify currency contract has proper initial balance (via get table)") # contract="currency" # table="accounts" @@ -500,7 +500,7 @@ try: cmdError("%s get transaction trans_id" % (ClientName)) errorExit("Failed to verify push message transaction id.") - # TODO need to update eosio.system contract to use new currency and update eosioc and chain_plugin for interaction + # TODO need to update eosio.system contract to use new currency and update cleos and chain_plugin for interaction # Print("read current contract balance") # contract="currency" # table="accounts" @@ -581,8 +581,8 @@ try: # TODO: Approving producers currently not supported # approve producer - # INFO="$(programs/eosioc/eosioc --host $SERVER --port $PORT --wallet-port 8899 set producer inita testera approve)" - # verifyErrorCode "eosioc approve producer" + # INFO="$(programs/cleos/cleos --host $SERVER --port $PORT --wallet-port 8899 set producer inita testera approve)" + # verifyErrorCode "cleos approve producer" Print("Get account inita") account=node.getEosAccount(initaAccount.name) @@ -592,8 +592,8 @@ try: # TODO: Unapproving producers currently not supported # unapprove producer - # INFO="$(programs/eosioc/eosioc --host $SERVER --port $PORT --wallet-port 8899 set producer inita testera unapprove)" - # verifyErrorCode "eosioc unapprove producer" + # INFO="$(programs/cleos/cleos --host $SERVER --port $PORT --wallet-port 8899 set producer inita testera unapprove)" + # verifyErrorCode "cleos unapprove producer" # # Proxy diff --git a/tests/p2p_tests/sync/test.sh b/tests/p2p_tests/sync/test.sh index 9edb99042..a88b8c4c6 100755 --- a/tests/p2p_tests/sync/test.sh +++ b/tests/p2p_tests/sync/test.sh @@ -54,12 +54,12 @@ fi total_nodes="${total_nodes:-`echo $pnodes`}" launcherPath="programs/eosio-launcher/eosio-launcher" -clientPath="programs/eosioc/eosioc" +clientPath="programs/cleos/cleos" rm -rf tn_data_* debugArg="" if [ "$debug" == true ]; then - debugArg="--eosiod \"--log-level-net-plugin debug\"" + debugArg="--nodeos \"--log-level-net-plugin debug\"" fi cmd="$launcherPath -p $pnodes -n $total_nodes -s $topo -d $delay $debugArg" diff --git a/tests/restart-scenarios-test.py b/tests/restart-scenarios-test.py index f7b04b385..be07c25cb 100755 --- a/tests/restart-scenarios-test.py +++ b/tests/restart-scenarios-test.py @@ -15,7 +15,7 @@ import signal # -d # -v # --kill-sig -# --kill-count +# --kill-count # --dont-kill # --dump-error-details # --keep-logs @@ -38,7 +38,7 @@ parser.add_argument("-c", type=str, help="chain strategy[%s|%s|%s]" % default=testUtils.Utils.SyncResyncTag) parser.add_argument("--kill-sig", type=str, help="kill signal[%s|%s]" % (testUtils.Utils.SigKillTag, testUtils.Utils.SigTermTag), default=testUtils.Utils.SigKillTag) -parser.add_argument("--kill-count", type=int, help="eosiod instances to kill", default=-1) +parser.add_argument("--kill-count", type=int, help="nodeos instances to kill", default=-1) parser.add_argument("-v", help="verbose logging", action='store_true') parser.add_argument("--dont-kill", help="Leave cluster running after test finishes", action='store_true') parser.add_argument("--not-noon", help="This is not the Noon branch.", action='store_true') @@ -120,7 +120,7 @@ try: Print("Kill %d cluster node instances." % (killCount)) if cluster.killSomeEosInstances(killCount, killSignal) is False: errorExit("Failed to kill Eos instances") - Print("Eosiod instances killed.") + Print("nodeos instances killed.") Print("Spread funds and validate") if not cluster.spreadFundsAndValidate(10): @@ -133,7 +133,7 @@ try: Print ("Relaunch dead cluster nodes instances.") if cluster.relaunchEosInstances() is False: errorExit("Failed to relaunch Eos instances") - Print("Eosiod instances relaunched.") + Print("nodeos instances relaunched.") Print ("Resyncing cluster nodes.") if not cluster.waitOnClusterSync(): diff --git a/tests/testUtils.py b/tests/testUtils.py index f2110d166..77c967126 100755 --- a/tests/testUtils.py +++ b/tests/testUtils.py @@ -23,13 +23,13 @@ class Utils: Debug=False FNull = open(os.devnull, 'w') - EosClientPath="programs/eosioc/eosioc" + EosClientPath="programs/cleos/cleos" EosWalletName="eosiowd" EosWalletPath="programs/eosiowd/"+ EosWalletName - EosServerName="eosiod" - EosServerPath="programs/eosiod/"+ EosServerName + EosServerName="nodeos" + EosServerPath="programs/nodeos/"+ EosServerName EosLauncherPath="programs/eosio-launcher/eosio-launcher" MongoPath="mongo" @@ -52,7 +52,7 @@ class Utils: systemWaitTimeout=60 - # mongoSyncTime: eosiod mongodb plugin seems to sync with a 10-15 seconds delay. This will inject + # mongoSyncTime: nodeos mongodb plugin seems to sync with a 10-15 seconds delay. This will inject # a wait period before the 2nd DB check (if first check fails) mongoSyncTime=25 amINoon=True @@ -971,15 +971,15 @@ class WalletMgr(object): __walletDataDir="test_wallet_0" # walletd [True|False] Will wallet me in a standalone process - def __init__(self, walletd, eosiodPort=8888, eosiodHost="localhost", port=8899, host="localhost"): + def __init__(self, walletd, nodeosPort=8888, nodeosHost="localhost", port=8899, host="localhost"): self.walletd=walletd - self.eosiodPort=eosiodPort - self.eosiodHost=eosiodHost + self.nodeosPort=nodeosPort + self.nodeosHost=nodeosHost self.port=port self.host=host self.wallets={} self.__walletPid=None - self.endpointArgs="--host %s --port %d" % (self.eosiodHost, self.eosiodPort) + self.endpointArgs="--host %s --port %d" % (self.nodeosHost, self.nodeosPort) if self.walletd: self.endpointArgs += " --wallet-host %s --wallet-port %d" % (self.host, self.port) @@ -1206,7 +1206,7 @@ class Cluster(object): cmdArr.append("--nogen") if not self.walletd or self.enableMongo: if Utils.amINoon: - cmdArr.append("--eosiod") + cmdArr.append("--nodeos") else: cmdArr.append("--eosd") if not self.walletd: @@ -1557,7 +1557,7 @@ class Cluster(object): return nodes - # Check state of running eosiod process and update EosInstanceInfos + # Check state of running nodeos process and update EosInstanceInfos #def updateEosInstanceInfos(eosInstanceInfos): def updateNodesStatus(self): for node in self.nodes: diff --git a/tests/trans_sync_across_mixed_cluster_test.sh b/tests/trans_sync_across_mixed_cluster_test.sh index d9158a8ef..68b6834c1 100755 --- a/tests/trans_sync_across_mixed_cluster_test.sh +++ b/tests/trans_sync_across_mixed_cluster_test.sh @@ -78,8 +78,8 @@ cleanup() # result stored in HEAD_BLOCK_NUM getHeadBlockNum() { - INFO="$(programs/eosioc/eosioc get info)" - verifyErrorCode "eosioc get info" + INFO="$(programs/cleos/cleos get info)" + verifyErrorCode "cleos get info" HEAD_BLOCK_NUM="$(echo "$INFO" | awk '/head_block_num/ {print $2}')" # remove trailing coma HEAD_BLOCK_NUM=${HEAD_BLOCK_NUM%,} @@ -110,10 +110,10 @@ INITA_PRV_KEY="5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3" # cleanup from last run cleanup -# stand up eosiod cluster +# stand up nodeos cluster launcherOpts="-p $pnodes -n $total_nodes -s $topo -d $delay" -echo Launcher options: --eosiod \"--plugin eosio::wallet_api_plugin\" $launcherOpts -programs/eosio-launcher/eosio-launcher --eosiod "--plugin eosio::wallet_api_plugin" $launcherOpts +echo Launcher options: --nodeos \"--plugin eosio::wallet_api_plugin\" $launcherOpts +programs/eosio-launcher/eosio-launcher --nodeos "--plugin eosio::wallet_api_plugin" $launcherOpts sleep 7 startPort=8888 @@ -125,22 +125,22 @@ echo endPort: $endPort port2=$startPort while [ $port2 -ne $endport ]; do echo Request block 1 from node on port $port2 - TRANS_INFO="$(programs/eosioc/eosioc --port $port2 get block 1)" - verifyErrorCode "eosioc get block" + TRANS_INFO="$(programs/cleos/cleos --port $port2 get block 1)" + verifyErrorCode "cleos get block" port2=`expr $port2 + 1` done # create 3 keys -KEYS="$(programs/eosioc/eosioc create key)" -verifyErrorCode "eosioc create key" +KEYS="$(programs/cleos/cleos create key)" +verifyErrorCode "cleos create key" PRV_KEY1="$(echo "$KEYS" | awk '/Private/ {print $3}')" PUB_KEY1="$(echo "$KEYS" | awk '/Public/ {print $3}')" -KEYS="$(programs/eosioc/eosioc create key)" -verifyErrorCode "eosioc create key" +KEYS="$(programs/cleos/cleos create key)" +verifyErrorCode "cleos create key" PRV_KEY2="$(echo "$KEYS" | awk '/Private/ {print $3}')" PUB_KEY2="$(echo "$KEYS" | awk '/Public/ {print $3}')" -KEYS="$(programs/eosioc/eosioc create key)" -verifyErrorCode "eosioc create key" +KEYS="$(programs/cleos/cleos create key)" +verifyErrorCode "cleos create key" PRV_KEY3="$(echo "$KEYS" | awk '/Private/ {print $3}')" PUB_KEY3="$(echo "$KEYS" | awk '/Public/ {print $3}')" if [ -z "$PRV_KEY1" ] || [ -z "$PRV_KEY2" ] || [ -z "$PRV_KEY3" ] || [ -z "$PUB_KEY1" ] || [ -z "$PUB_KEY2" ] || [ -z "$PUB_KEY3" ]; then @@ -149,21 +149,21 @@ fi # create wallet for inita -PASSWORD_INITA="$(programs/eosioc/eosioc wallet create --name inita)" -verifyErrorCode "eosioc wallet create" +PASSWORD_INITA="$(programs/cleos/cleos wallet create --name inita)" +verifyErrorCode "cleos wallet create" # strip out password from output PASSWORD_INITA="$(echo "$PASSWORD_INITA" | awk '/PW/ {print $1}')" # remove leading/trailing quotes PASSWORD_INITA=${PASSWORD_INITA#\"} PASSWORD_INITA=${PASSWORD_INITA%\"} -programs/eosioc/eosioc wallet import --name inita $INITA_PRV_KEY -verifyErrorCode "eosioc wallet import" -programs/eosioc/eosioc wallet import --name inita $PRV_KEY1 -verifyErrorCode "eosioc wallet import" -programs/eosioc/eosioc wallet import --name inita $PRV_KEY2 -verifyErrorCode "eosioc wallet import" -programs/eosioc/eosioc wallet import --name inita $PRV_KEY3 -verifyErrorCode "eosioc wallet import" +programs/cleos/cleos wallet import --name inita $INITA_PRV_KEY +verifyErrorCode "cleos wallet import" +programs/cleos/cleos wallet import --name inita $PRV_KEY1 +verifyErrorCode "cleos wallet import" +programs/cleos/cleos wallet import --name inita $PRV_KEY2 +verifyErrorCode "cleos wallet import" +programs/cleos/cleos wallet import --name inita $PRV_KEY3 +verifyErrorCode "cleos wallet import" # # Account and Transfer Tests @@ -171,12 +171,12 @@ verifyErrorCode "eosioc wallet import" # create new account echo Creating account testera -ACCOUNT_INFO="$(programs/eosioc/eosioc create account inita testera $PUB_KEY1 $PUB_KEY3)" -verifyErrorCode "eosioc create account" +ACCOUNT_INFO="$(programs/cleos/cleos create account inita testera $PUB_KEY1 $PUB_KEY3)" +verifyErrorCode "cleos create account" waitForNextBlock # verify account created -ACCOUNT_INFO="$(programs/eosioc/eosioc get account testera)" -verifyErrorCode "eosioc get account" +ACCOUNT_INFO="$(programs/cleos/cleos get account testera)" +verifyErrorCode "cleos get account" count=`echo $ACCOUNT_INFO | grep -c "staked_balance"` if [ $count == 0 ]; then error "FAILURE - account creation failed: $ACCOUNT_INFO" @@ -188,8 +188,8 @@ echo Producing node port: $pPort while [ $port -ne $endport ]; do echo Sending transfer request to node on port $port. - TRANSFER_INFO="$(programs/eosioc/eosioc transfer inita testera 975321 "test transfer")" - verifyErrorCode "eosioc transfer" + TRANSFER_INFO="$(programs/cleos/cleos transfer inita testera 975321 "test transfer")" + verifyErrorCode "cleos transfer" getTransactionId "$TRANSFER_INFO" echo Transaction id: $TRANS_ID @@ -199,8 +199,8 @@ while [ $port -ne $endport ]; do port2=$startPort while [ $port2 -ne $endport ]; do echo Verifying transaction exists on node on port $port2 - TRANS_INFO="$(programs/eosioc/eosioc --port $port2 get transaction $TRANS_ID)" - verifyErrorCode "eosioc get transaction trans_id of <$TRANS_INFO> from node on port $port2" + TRANS_INFO="$(programs/cleos/cleos --port $port2 get transaction $TRANS_ID)" + verifyErrorCode "cleos get transaction trans_id of <$TRANS_INFO> from node on port $port2" port2=`expr $port2 + 1` done -- GitLab