Skip to content

Commit

Permalink
Merge pull request EOSIO#105 from enumivo/staging
Browse files Browse the repository at this point in the history
rename nodeos
  • Loading branch information
Enumivo authored May 15, 2018
2 parents 6287971 + c531dcb commit d227372
Show file tree
Hide file tree
Showing 25 changed files with 87 additions and 87 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ programs/enu-applesedemo/enu-applesedemo
programs/enu-launcher/config.hpp
programs/enu-launcher/enu-launcher
programs/keosd/keosd
programs/nodeos/config.hpp
programs/nodeos/nodeos
programs/enunode/config.hpp
programs/enunode/enunode

scripts/tn_init.sh

Expand Down
26 changes: 13 additions & 13 deletions Docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ The above will build off the most recent commit to the master branch by default.
docker build -t eosio/eos:dawn-v4.0.0 --build-arg branch=dawn-v4.0.0 .
```

## Start nodeos docker container only
## Start enunode docker container only

```bash
docker run --name nodeos -p 8888:8888 -p 9876:9876 -t eosio/eos nodeosd.sh arg1 arg2
docker run --name enunode -p 8888:8888 -p 9876:9876 -t eosio/eos nodeosd.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 }}' nodeos
$ docker inspect --format '{{ range .Mounts }}{{ .Name }} {{ end }}' enunode
fdc265730a4f697346fa8b078c176e315b959e79365fc9cbd11f090ea0cb5cbc
$ docker volume rm fdc265730a4f697346fa8b078c176e315b959e79365fc9cbd11f090ea0cb5cbc
```

Alternately, you can directly mount host directory into the container

```bash
docker run --name nodeos -v /path-to-data-dir:/opt/eosio/bin/data-dir -p 8888:8888 -p 9876:9876 -t eosio/eos nodeosd.sh arg1 arg2
docker run --name enunode -v /path-to-data-dir:/opt/eosio/bin/data-dir -p 8888:8888 -p 9876:9876 -t eosio/eos nodeosd.sh arg1 arg2
```

## Get chain info
Expand All @@ -52,15 +52,15 @@ docker run --name nodeos -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 nodeos and keosd containers
## Start both enunode and keosd containers

```bash
docker volume create --name=nodeos-data-volume
docker volume create --name=enunode-data-volume
docker volume create --name=keosd-data-volume
docker-compose up -d
```

After `docker-compose up -d`, two services named `nodeosd` and `keosd` will be started. nodeos service would expose ports 8888 and 9876 to the host. keosd service does not expose any port to the host, it is only accessible to enu-cli when running enu-cli is running inside the keosd container as described in "Execute enu-cli commands" section.
After `docker-compose up -d`, two services named `nodeosd` and `keosd` will be started. enunode service would expose ports 8888 and 9876 to the host. keosd service does not expose any port to the host, it is only accessible to enu-cli when running enu-cli is running inside the keosd container as described in "Execute enu-cli commands" section.

### Execute enu-cli commands

Expand Down Expand Up @@ -117,9 +117,9 @@ You can use docker compose override file to change the default configurations. F
version: "2"

services:
nodeos:
enunode:
volumes:
- nodeos-data-volume:/opt/eosio/bin/data-dir
- enunode-data-volume:/opt/eosio/bin/data-dir
- ./config2.ini:/opt/eosio/bin/data-dir/config.ini
```
Expand All @@ -135,7 +135,7 @@ docker-compose up
The data volume created by docker-compose can be deleted as follows:

```bash
docker volume rm nodeos-data-volume
docker volume rm enunode-data-volume
docker volume rm keosd-data-volume
```

Expand All @@ -158,7 +158,7 @@ services:
expose:
- "8888"
volumes:
- nodeos-data-volume:/opt/eosio/bin/data-dir
- enunode-data-volume:/opt/eosio/bin/data-dir

keosd:
image: eosio/eos:latest
Expand All @@ -170,7 +170,7 @@ services:
- keosd-data-volume:/opt/eosio/bin/data-dir

volumes:
nodeos-data-volume:
enunode-data-volume:
keosd-data-volume:

```
Expand All @@ -192,7 +192,7 @@ Note: if you want to use the mongo db plugin, you have to enable it in your `dat
docker pull eosio/eos:latest
docker pull mongo:latest
# create volume
docker volume create --name=nodeos-data-volume
docker volume create --name=enunode-data-volume
docker volume create --name=keosd-data-volume
docker volume create --name=mongo-data-volume
# start containers
Expand Down
4 changes: 2 additions & 2 deletions Docker/docker-compose-dawn4.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ services:
expose:
- "8888"
volumes:
- nodeos-data-volume:/opt/eosio/bin/data-dir
- enunode-data-volume:/opt/eosio/bin/data-dir

keosd:
image: eosio/eos:latest
Expand All @@ -35,7 +35,7 @@ services:
volumes:
mongo-data-volume:
external: true
nodeos-data-volume:
enunode-data-volume:
external: true
keosd-data-volume:
external: true
4 changes: 2 additions & 2 deletions Docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
expose:
- "8888"
volumes:
- nodeos-data-volume:/opt/eosio/bin/data-dir
- enunode-data-volume:/opt/eosio/bin/data-dir

keosd:
image: eosio/eos
Expand All @@ -30,7 +30,7 @@ services:
- keosd-data-volume:/opt/eosio/bin/data-dir

volumes:
nodeos-data-volume:
enunode-data-volume:
external: true
keosd-data-volume:
external: true
2 changes: 1 addition & 1 deletion Docker/nodeosd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ else
CONFIG_DIR=""
fi

exec /opt/eosio/bin/nodeos $CONFIG_DIR $@
exec /opt/eosio/bin/enunode $CONFIG_DIR $@
18 changes: 9 additions & 9 deletions EXCHANGE_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ native token conforms to the standard.

Configuring Nodeos
------------------
This tutorial uses the `enu-cli` commandline tool to query a local `nodeos` server
which should be connected to an eosio blockchain. `nodeos` will need to be configured
This tutorial uses the `enu-cli` commandline tool to query a local `enunode` server
which should be connected to an eosio blockchain. `enunode` will need to be configured
with the following plugins:

1. eosio::wallet_api_plugin
Expand All @@ -23,7 +23,7 @@ plugin to only log activity relevant to your account(s). This can be achieved w
the following config param placed in your config.ini or passed on the commandline.

```
$ nodeos --filter_on_accounts youraccount
$ enunode --filter_on_accounts youraccount
```

Replaying the Blockchain
Expand All @@ -33,21 +33,21 @@ If you have already synced the blockchain without the history plugin, then you m
replay the blockchain to pickup any historical activity.

```
$ nodeos --replay --filter_on_accounts youraccount
$ enunode --replay --filter_on_accounts youraccount
```

You only need to replay once, subsequent runs of nodeos should not use the replay flag or
You only need to replay once, subsequent runs of enunode should not use the replay flag or
your startup times will be unnecessiarlly long.


Accepting Deposits
-----------
When designing this tutorial we assume that an exchange will poll `nodeos` for incoming
When designing this tutorial we assume that an exchange will poll `enunode` for incoming
transactions and will want to know when a transfer is considered irreversible or final.

With eosio based chains, finality of a transaction occurs once 2/3+1 of block produers have
either directly or indirectly confirmed the block. This could take from less than a second to
a couple of minutes, but either way nodeos will keep you posted on the status.
a couple of minutes, but either way enunode will keep you posted on the status.

## Initial Condition
```
Expand Down Expand Up @@ -255,7 +255,7 @@ Now that we have received 3 deposits we should see that the exchange has a balan

When a user requests a withdraw from your exchange they will need to provide you with their eosio account name and
the amount to be withdrawn. You can then run the enu-cli command which will interact with the "unlocked" wallet
running on `nodeos` which should only enable localhost connections. More advanced usage would have a separate
running on `enunode` which should only enable localhost connections. More advanced usage would have a separate
key-server (`keos`), but that will be covered later.

Lets assume scott wants to withdraw `1.0000 EOS`:
Expand All @@ -269,7 +269,7 @@ executed transaction: 93e785202e7502bb1383ad10e786cc20f7dd738d3fd3da38712b3fb38f
warning: transaction executed locally, but may not be confirmed by the network yet
```

At this stage your local `nodeos` client accepted the transaction and likely broadcast it to the broader network.
At this stage your local `enunode` client accepted the transaction and likely broadcast it to the broader network.

Now we can get the history and see that there are "3" new actions listed all with trx id `93e78520...` which is what
our transfer command returned to us. Because `exchange` authorized the transaction it is informed of all accounts which
Expand Down
2 changes: 1 addition & 1 deletion plugins/mongo_db_plugin/mongo_db_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,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 nodeos and MongoDB plugin thread.")
"The queue size between enunode 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.")
Expand Down
4 changes: 2 additions & 2 deletions plugins/txn_test_gen_plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ EOF

### Launch producer
```bash
$ ./nodeos -d ~/eos.data/producer_node --config-dir ~/eos.data/producer_node -l ~/eos.data/logging.json --http-server-address "" -p eosio -e
$ ./enunode -d ~/eos.data/producer_node --config-dir ~/eos.data/producer_node -l ~/eos.data/logging.json --http-server-address "" -p eosio -e
```

### Launch non-producer that will generate transactions
```bash
$ ./nodeos -d ~/eos.data/generator_node --config-dir ~/eos.data/generator_node -l ~/eos.data/logging.json --plugin eosio::txn_test_gen_plugin --plugin eosio::wallet_api_plugin --plugin eosio::chain_api_plugin --p2p-peer-address localhost:9876 --p2p-listen-endpoint localhost:5555
$ ./enunode -d ~/eos.data/generator_node --config-dir ~/eos.data/generator_node -l ~/eos.data/logging.json --plugin eosio::txn_test_gen_plugin --plugin eosio::wallet_api_plugin --plugin eosio::chain_api_plugin --p2p-peer-address localhost:9876 --p2p-listen-endpoint localhost:5555
```

### Create a wallet on the non-producer and set bios contract
Expand Down
2 changes: 1 addition & 1 deletion programs/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
add_subdirectory( nodeos )
add_subdirectory( enunode )
add_subdirectory( enu-cli )
add_subdirectory( keosd )
add_subdirectory( enu-launcher )
Expand Down
18 changes: 9 additions & 9 deletions programs/enu-cli/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @file
* @copyright defined in eos/LICENSE.txt
* @defgroup eosclienttool Enumivo Command Line Client Reference
* @brief Tool for sending transactions and querying state from @ref nodeos
* @brief Tool for sending transactions and querying state from @ref enunode
* @ingroup eosclienttool
*/

Expand All @@ -11,8 +11,8 @@
@section intro Introduction to cleos
`cleos` is a command line tool that interfaces with the REST api exposed by @ref nodeos. In order to use `cleos` you will need to
have a local copy of `nodeos` running and configured to load the 'eosio::chain_api_plugin'.
`cleos` is a command line tool that interfaces with the REST api exposed by @ref enunode. In order to use `cleos` you will need to
have a local copy of `enunode` running and configured to load the 'eosio::chain_api_plugin'.
cleos contains documentation for all of its commands. For a list of all commands known to cleos, simply run it with no arguments:
```
Expand All @@ -23,7 +23,7 @@ Usage: programs/cleos/cleos [OPTIONS] SUBCOMMAND
Options:
-h,--help Print this help message and exit
-u,--url TEXT=http://localhost:8888/
the http/https URL where nodeos is running
the http/https URL where enunode is running
--wallet-url TEXT=http://localhost:8888/
the http/https URL where keosd is running
-v,--verbose output verbose actions on error
Expand Down Expand Up @@ -210,7 +210,7 @@ fc::variant call( const std::string& url,
}
catch(boost::system::system_error& e) {
if(url == ::url)
std::cerr << localized("Failed to connect to nodeos at ${u}; is nodeos running?", ("u", url)) << std::endl;
std::cerr << localized("Failed to connect to enunode at ${u}; is enunode running?", ("u", url)) << std::endl;
else if(url == ::wallet_url)
std::cerr << localized("Failed to connect to keosd at ${u}; is keosd running?", ("u", url)) << std::endl;
throw connection_exception(fc::log_messages{FC_LOG_MESSAGE(error, e.what())});
Expand Down Expand Up @@ -1319,12 +1319,12 @@ int main( int argc, char** argv ) {

CLI::App app{"Command Line Interface to Enumivo Client"};
app.require_subcommand();
app.add_option( "-H,--host", obsoleted_option_host_port, localized("the host where nodeos is running") )->group("hidden");
app.add_option( "-p,--port", obsoleted_option_host_port, localized("the port where nodeos is running") )->group("hidden");
app.add_option( "-H,--host", obsoleted_option_host_port, localized("the host where enunode is running") )->group("hidden");
app.add_option( "-p,--port", obsoleted_option_host_port, localized("the port where enunode is running") )->group("hidden");
app.add_option( "--wallet-host", obsoleted_option_host_port, localized("the host where keosd is running") )->group("hidden");
app.add_option( "--wallet-port", obsoleted_option_host_port, localized("the port where keosd is running") )->group("hidden");

app.add_option( "-u,--url", url, localized("the http/https URL where nodeos is running"), true );
app.add_option( "-u,--url", url, localized("the http/https URL where enunode is running"), true );
app.add_option( "--wallet-url", wallet_url, localized("the http/https URL where keosd is running"), true );

app.set_callback([] { ensure_keosd_running();});
Expand Down Expand Up @@ -1930,7 +1930,7 @@ int main( int argc, char** argv ) {
std::cout << fc::json::to_pretty_string(v) << std::endl;
});

auto stopKeosd = wallet->add_subcommand("stop", localized("Stop keosd (doesn't work with nodeos)."), false);
auto stopKeosd = wallet->add_subcommand("stop", localized("Stop keosd (doesn't work with enunode)."), false);
stopKeosd->set_callback([] {
// wait for keosd to come up
try_port(uint16_t(std::stoi(parse_url(wallet_url).port)), 2000);
Expand Down
10 changes: 5 additions & 5 deletions programs/enu-launcher/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -430,14 +430,14 @@ launcher_def::set_options (bpo::options_description &cfg) {
("mode,m",bpo::value<vector<string>>()->multitoken()->default_value({"any"}, "any"),"connection mode, combination of \"any\", \"producers\", \"specified\", \"none\"")
("shape,s",bpo::value<string>(&shape)->default_value("star"),"network topology, use \"star\" \"mesh\" or give a filename for custom")
("genesis,g",bpo::value<bfs::path>(&genesis)->default_value("./genesis.json"),"set the path to genesis.json")
("skip-signature", bpo::bool_switch(&skip_transaction_signatures)->default_value(false), "nodeos does not require transaction signatures.")
("nodeos", bpo::value<string>(&eosd_extra_args), "forward nodeos command line argument(s) to each instance of nodeos, enclose arg in quotes")
("skip-signature", bpo::bool_switch(&skip_transaction_signatures)->default_value(false), "enunode does not require transaction signatures.")
("enunode", bpo::value<string>(&eosd_extra_args), "forward enunode command line argument(s) to each instance of enunode, enclose arg in quotes")
("delay,d",bpo::value<int>(&start_delay)->default_value(0),"seconds delay before starting each node after the first")
("boot",bpo::bool_switch(&boot)->default_value(false),"After deploying the nodes and generating a boot script, invoke it.")
("nogen",bpo::bool_switch(&nogen)->default_value(false),"launch nodes without writing new config files")
("host-map",bpo::value<bfs::path>(&host_map_file)->default_value(""),"a file containing mapping specific nodes to hosts. Used to enhance the custom shape argument")
("servers",bpo::value<bfs::path>(&server_ident_file)->default_value(""),"a file containing ip addresses and names of individual servers to deploy as producers or non-producers ")
("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.")
("per-host",bpo::value<int>(&per_host)->default_value(0),"specifies how many enunode 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")
Expand Down Expand Up @@ -1385,7 +1385,7 @@ launcher_def::launch (eosd_def &instance, string &gts) {
bfs::path reerr_sl = dd / "stderr.txt";
bfs::path reerr_base = bfs::path("stderr." + launch_time + ".txt");
bfs::path reerr = dd / reerr_base;
bfs::path pidf = dd / "nodeos.pid";
bfs::path pidf = dd / "enunode.pid";
host_def* host;
try {
host = deploy_config_files (*instance.node);
Expand All @@ -1397,7 +1397,7 @@ launcher_def::launch (eosd_def &instance, string &gts) {
node_rt_info info;
info.remote = !host->is_local();

string eosdcmd = "programs/nodeos/nodeos ";
string eosdcmd = "programs/enunode/enunode ";
if (skip_transaction_signatures) {
eosdcmd += "--skip-transaction-signatures ";
}
Expand Down
Loading

0 comments on commit d227372

Please sign in to comment.