提交 59fcb592 编写于 作者: J Jonathan Giszczak

Rename eosiod to nodeos and eosioc to cleos and update docs and scripts.

上级 521ddf76
......@@ -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" )
......
......@@ -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
......@@ -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
```
#!/bin/bash
# Usage:
# Go into cmd loop: sudo ./eosioc.sh
# Run single cmd: sudo ./eosioc.sh <eosioc paramers>
# Go into cmd loop: sudo ./cleos.sh
# Run single cmd: sudo ./cleos.sh <cleos paramers>
PREFIX="docker exec docker_eosiod_1 eosioc"
PREFIX="docker exec docker_nodeos_1 cleos"
if [ -z $1 ] ; then
while :
do
read -e -p "eosioc " cmd
read -e -p "cleos " cmd
history -s "$cmd"
$PREFIX $cmd
done
......
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:
......@@ -36,4 +36,4 @@ else
CONFIG_DIR=""
fi
exec /opt/eosio/bin/eosiod $CONFIG_DIR $@
exec /opt/eosio/bin/nodeos $CONFIG_DIR $@
......@@ -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)
<a name="singlenode"></a>
### 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 <kbd>Ctrl-C</kbd>. 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 <kbd>Ctrl-C</kbd>. 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
```
<a name="walletimport"></a>
### 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
```
<a name="createaccounts"></a>
......@@ -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
```
<a name="uploadsmartcontract"></a>
......@@ -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.
......
......@@ -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)
......
......@@ -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<uint>()->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<std::string>(),
"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.")
......
add_subdirectory( eosiod )
add_subdirectory( eosioc )
add_subdirectory( nodeos )
add_subdirectory( cleos )
add_subdirectory( eosiowd )
add_subdirectory( eosio-launcher )
add_subdirectory( eosio-applesedemo )
......
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}
......
......@@ -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}";
}}}
......@@ -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
}}}
......@@ -399,12 +399,12 @@ launcher_def::set_options (bpo::options_description &cli) {
("genesis,g",bpo::value<bf::path>(&genesis)->default_value("./genesis.json"),"set the path to genesis.json")
("output,o",bpo::value<bf::path>(&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<string>(&eosd_extra_args), "forward eosiod command line argument(s) to each instance of eosiod, enclose arg in quotes")
("nodeos", bpo::value<string>(&eosd_extra_args), "forward nodeos command line argument(s) to each instance of nodeos, enclose arg in quotes")
("delay,d",bpo::value<int>(&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<bf::path>(&host_map_file)->default_value(""),"a file containing mapping specific nodes to hosts. Used to enhance the custom shape argument")
("servers",bpo::value<bf::path>(&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<int>(&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<int>(&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<string>(&network.name)->default_value("testnet_"),"network name prefix used in GELF logging source")
("enable-gelf-logging",bpo::value<bool>(&gelf_enabled)->default_value(true),"enable gelf logging appender in logging configuration file")
("gelf-endpoint",bpo::value<string>(&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 &gts) {
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 ";
}
......
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}
......
......@@ -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<typename I>
std::string itoh(I n, size_t hlen = sizeof(I)<<1) {
......
......@@ -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<chain_plugin, http_plugin, net_plugin>(argc, argv))
return -1;
initialize_logging();
ilog("eosiod version ${ver}", ("ver", eosio::eosiod::config::itoh(static_cast<uint32_t>(app().version()))));
ilog("nodeos version ${ver}", ("ver", eosio::nodeos::config::itoh(static_cast<uint32_t>(app().version()))));
ilog("eosio root is ${root}", ("root", root.string()));
app().startup();
app().exec();
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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
......
......@@ -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.
......
......@@ -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.")
......
......@@ -8,7 +8,7 @@ import random
import re
###############################################################
# eosiod_run_test
# nodeos_run_test
# --dump-error-details <Upon error print tn_data_*/config.ini and tn_data_*/stderr.log to stdout>
# --keep-logs <Don't delete tn_data_* folders upon test completion>
###############################################################
......@@ -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
......
......@@ -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"
......
......@@ -15,7 +15,7 @@ import signal
# -d <delay between nodes startup>
# -v <verbose logging>
# --kill-sig <kill signal [term|kill]>
# --kill-count <Eosiod instances to kill>
# --kill-count <nodeos instances to kill>
# --dont-kill <Leave cluster running after test finishes>
# --dump-error-details <Upon error print tn_data_*/config.ini and tn_data_*/stderr.log to stdout>
# --keep-logs <Don't delete tn_data_* folders upon test completion>
......@@ -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():
......
......@@ -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:
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册