Skip to content

Commit

Permalink
Merge branch 'main' into no-blocks-log
Browse files Browse the repository at this point in the history
  • Loading branch information
linh2931 authored Jul 22, 2022
2 parents 1fa43f2 + 7380681 commit 38856b4
Show file tree
Hide file tree
Showing 21 changed files with 163 additions and 133 deletions.
14 changes: 9 additions & 5 deletions docs/01_nodeos/02_usage/02_node-setups/00_producing-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ This section describes how to set up a producing node within the EOSIO network.
## Before you begin

* [Install the EOSIO software](../../../00_install/index.md) before starting this section.
* It is assumed that `nodeos`, `cleos`, and `keosd` are accessible through the path. If you built EOSIO using shell scripts, make sure to run the [Install Script](../../../00_install/01_build-from-source/01_shell-scripts/03_install-eosio-binaries.md).
* It is assumed that `nodeos`, `cleos`, and `keosd` are accessible through the path.

[//]: # ( THIS IS A COMMENT LINK BELOW IS BROKEN )
[//]: # ( If you built EOSIO using shell scripts, make sure to run the Install Script ../../../00_install/01_build-from-source/01_shell-scripts/03_install-eosio-binaries.md )

* Know how to pass [Nodeos options](../../02_usage/00_nodeos-options.md) to enable or disable functionality.

## Steps
Expand Down Expand Up @@ -46,11 +50,11 @@ producer-name = youraccount

### 3. Set the Producer's signature-provider

You will need to set the private key for your producer. The public key should have an authority for the producer account defined above.
You will need to set the private key for your producer. The public key should have an authority for the producer account defined above.

`signature-provider` is defined with a 3-field tuple:
* `public-key` - A valid EOSIO public key in form of a string.
* `provider-spec` - It's a string formatted like <provider-type>:<data>
* `provider-spec` - It's a string formatted like `<provider-type>:<data>`
* `provider-type` - KEY or KEOSD

#### Using a Key:
Expand All @@ -65,7 +69,7 @@ signature-provider = PUBLIC_SIGNING_KEY=KEY:PRIVATE_SIGNING_KEY
```

#### Using Keosd:
You can also use `keosd` instead of hard-defining keys.
You can also use `keosd` instead of hard-defining keys.

```console
# config.ini:
Expand All @@ -87,7 +91,7 @@ p2p-peer-address = 123.255.78.9:9876

### 5. Load the Required Plugins

In your [config.ini](../index.md), confirm the following plugins are loading or append them if necessary.
In your [config.ini](../index.md), confirm the following plugins are loading or append them if necessary.

```console
# config.ini:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,16 @@ This section describes how to set up a non-producing node within the EOSIO netwo
## Before you begin

* [Install the EOSIO software](../../../00_install/index.md) before starting this section.
* It is assumed that `nodeos`, `cleos`, and `keosd` are accessible through the path. If you built EOSIO using shell scripts, make sure to run the [Install Script](../../../00_install/01_build-from-source/01_shell-scripts/03_install-eosio-binaries.md).
* It is assumed that `nodeos`, `cleos`, and `keosd` are accessible through the path.

[//]: # ( THIS IS A COMMENT NEXT LINK CONTAINS A BROKEN LINK )
[//]: # ( If you built EOSIO using shell scripts, make sure to run the Install Script ../../../00_install/01_build-from-source/01_shell-scripts/03_install-eosio-binaries.md )

* Know how to pass [Nodeos options](../../02_usage/00_nodeos-options.md) to enable or disable functionality.

## Steps

To setup a non-producing node is simple.
To setup a non-producing node is simple.

1. [Set Peers](#1-set-peers)
2. [Enable one or more available plugins](#2-enable-one-or-more-available-plugins)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ This section describes how to set up a single-node blockchain configuration runn
## Before you begin

* [Install the EOSIO software](../../../00_install/index.md) before starting this section.
* It is assumed that `nodeos`, `cleos`, and `keosd` are accessible through the path. If you built EOSIO using shell scripts, make sure to run the [Install Script](../../../00_install/01_build-from-source/01_shell-scripts/03_install-eosio-binaries.md).
* It is assumed that `nodeos`, `cleos`, and `keosd` are accessible through the path.

[//]: # (THIS IS A COMMENT, NEXT LINK HAS BROKEN LINK)
[//]: # (If you built EOSIO using shell scripts, make sure to run the Install Script ../../../00_install/01_build-from-source/01_shell-scripts/03_install-eosio-binaries.md .)

* Know how to pass [Nodeos options](../../02_usage/00_nodeos-options.md) to enable or disable functionality.

## Steps
Expand Down Expand Up @@ -87,7 +91,7 @@ The more advanced user will likely have need to modify the configuration. `node
* Linux: `~/.local/share/eosio/nodeos/config`

The build seeds this folder with a default `genesis.json` file. A configuration folder can be specified using the `--config-dir` command line argument to `nodeos`. If you use this option, you will need to manually copy a `genesis.json` file to your config folder.

`nodeos` will need a properly configured `config.ini` file in order to do meaningful work. On startup, `nodeos` looks in the config folder for `config.ini`. If one is not found, a default `config.ini` file is created. If you do not already have a `config.ini` file ready to use, run `nodeos` and then close it immediately with <kbd>Ctrl-C</kbd>. A default configuration (`config.ini`) will have been created in the config folder. Edit the `config.ini` file, adding/updating the following settings to the defaults already in place:

```console
Expand Down Expand Up @@ -115,7 +119,7 @@ nodeos

* Mac OS: `~/Library/Application\ Support/eosio/nodeos/data`
* Linux: `~/.local/share/eosio/nodeos/data`

A data folder can be specified using the `--data-dir` command line argument to `nodeos`.

[[info | What's next?]]
Expand Down
124 changes: 62 additions & 62 deletions docs/01_nodeos/03_plugins/producer_plugin/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,100 +24,100 @@ These can be specified from both the `nodeos` command-line or the `config.ini` f
```console
Config Options for eosio::producer_plugin:

-e [ --enable-stale-production ] Enable block production, even if the
-e [ --enable-stale-production ] Enable block production, even if the
chain is stale.
-x [ --pause-on-startup ] Start this node in a state where
-x [ --pause-on-startup ] Start this node in a state where
production is paused
--max-transaction-time arg (=30) Limits the maximum time (in
milliseconds) that is allowed a pushed
transaction's code to execute before
--max-transaction-time arg (=30) Limits the maximum time (in
milliseconds) that is allowed a pushed
transaction's code to execute before
being considered invalid
--max-irreversible-block-age arg (=-1)
Limits the maximum age (in seconds) of
Limits the maximum age (in seconds) of
the DPOS Irreversible Block for a chain
this node will produce blocks on (use
this node will produce blocks on (use
negative value to indicate unlimited)
-p [ --producer-name ] arg ID of producer controlled by this node
(e.g. inita; may specify multiple
-p [ --producer-name ] arg ID of producer controlled by this node
(e.g. inita; may specify multiple
times)
--private-key arg (DEPRECATED - Use signature-provider
instead) Tuple of [public key, WIF
private key] (may specify multiple
--private-key arg (DEPRECATED - Use signature-provider
instead) Tuple of [public key, WIF
private key] (may specify multiple
times)
--signature-provider arg (=EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV=KEY:5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3)
Key=Value pairs in the form
Key=Value pairs in the form
<public-key>=<provider-spec>
Where:
<public-key> is a string form of
<public-key> is a string form of
a vaild EOSIO public
key
<provider-spec> is a string in the

<provider-spec> is a string in the
form <provider-type>
:<data>

<provider-type> is KEY, or KEOSD
KEY:<data> is a string form of
a valid EOSIO
private key which

KEY:<data> is a string form of
a valid EOSIO
private key which
maps to the provided
public key
KEOSD:<data> is the URL where
keosd is available
and the approptiate
wallet(s) are

KEOSD:<data> is the URL where
keosd is available
and the approptiate
wallet(s) are
unlocked
--keosd-provider-timeout arg (=5) Limits the maximum time (in
milliseconds) that is allowed for
sending blocks to a keosd provider for
--keosd-provider-timeout arg (=5) Limits the maximum time (in
milliseconds) that is allowed for
sending blocks to a keosd provider for
signing
--greylist-account arg account that can not access to extended
CPU/NET virtual resources
--greylist-limit arg (=1000) Limit (between 1 and 1000) on the
--greylist-limit arg (=1000) Limit (between 1 and 1000) on the
multiple that CPU/NET virtual resources
can extend during low usage (only
enforced subjectively; use 1000 to not
can extend during low usage (only
enforced subjectively; use 1000 to not
enforce any limit)
--produce-time-offset-us arg (=0) Offset of non last block producing time
in microseconds. Valid range 0 ..
in microseconds. Valid range 0 ..
-block_time_interval.
--last-block-time-offset-us arg (=-200000)
Offset of last block producing time in
microseconds. Valid range 0 ..
Offset of last block producing time in
microseconds. Valid range 0 ..
-block_time_interval.
--cpu-effort-percent arg (=80) Percentage of cpu block production time
used to produce block. Whole number
used to produce block. Whole number
percentages, e.g. 80 for 80%
--last-block-cpu-effort-percent arg (=80)
Percentage of cpu block production time
used to produce last block. Whole
used to produce last block. Whole
number percentages, e.g. 80 for 80%
--max-block-cpu-usage-threshold-us arg (=5000)
Threshold of CPU block production to
consider block full; when within
threshold of max-block-cpu-usage block
Threshold of CPU block production to
consider block full; when within
threshold of max-block-cpu-usage block
can be produced immediately
--max-block-net-usage-threshold-bytes arg (=1024)
Threshold of NET block production to
consider block full; when within
threshold of max-block-net-usage block
Threshold of NET block production to
consider block full; when within
threshold of max-block-net-usage block
can be produced immediately
--max-scheduled-transaction-time-per-block-ms arg (=100)
Maximum wall-clock time, in
milliseconds, spent retiring scheduled
transactions in any block before
returning to normal transaction
Maximum wall-clock time, in
milliseconds, spent retiring scheduled
transactions in any block before
returning to normal transaction
processing.
--subjective-cpu-leeway-us arg (=31000)
Time in microseconds allowed for a
transaction that starts with
insufficient CPU quota to complete and
Time in microseconds allowed for a
transaction that starts with
insufficient CPU quota to complete and
cover its CPU usage.
--subjective-account-max-failures arg (=3)
Sets the maximum amount of failures
that are allowed for a given account
Sets the maximum amount of failures
that are allowed for a given account
per block.
Disregarded for accounts that have been
whitelisted by disabling subjective
Expand All @@ -128,33 +128,33 @@ Config Options for eosio::producer_plugin:
Sets the time to return full subjective
cpu for accounts
--incoming-defer-ratio arg (=1) ratio between incoming transactions and
deferred transactions when both are
deferred transactions when both are
queued for execution
--incoming-transaction-queue-size-mb arg (=1024)
Maximum size (in MiB) of the incoming
Maximum size (in MiB) of the incoming
transaction queue. Exceeding this value
will subjectively drop transaction with
resource exhaustion.
--disable-api-persisted-trx Disable the re-apply of API
--disable-api-persisted-trx Disable the re-apply of API
transactions.
--disable-subjective-billing arg (=1) Disable subjective CPU billing for
--disable-subjective-billing arg (=1) Disable subjective CPU billing for
API/P2P transactions
--disable-subjective-account-billing arg
Account which is excluded from
Account which is excluded from
subjective CPU billing
Account is considered whitelisted and
will not be subject to enforcement of
subjective-account-max-failures.
--disable-subjective-p2p-billing arg (=1)
Disable subjective CPU billing for P2P
Disable subjective CPU billing for P2P
transactions
--disable-subjective-api-billing arg (=1)
Disable subjective CPU billing for API
Disable subjective CPU billing for API
transactions
--producer-threads arg (=2) Number of worker threads in producer
--producer-threads arg (=2) Number of worker threads in producer
thread pool
--snapshots-dir arg (="snapshots") the location of the snapshots directory
(absolute path or relative to
(absolute path or relative to
application data dir)
```

Expand All @@ -172,7 +172,7 @@ The option below sets the ratio between the incoming transaction and the deferre
--incoming-defer-ratio arg (=1)
```

By default value of `1`, the `producer` plugin processes one incoming transaction per deferred transaction. When `arg` sets to `10`, the `producer` plugin processes 10 incoming transactions per deferred transaction.
By default value of `1`, the `producer` plugin processes one incoming transaction per deferred transaction. When `arg` sets to `10`, the `producer` plugin processes 10 incoming transactions per deferred transaction.

If the `arg` is set to a sufficiently large number, the plugin always processes the incoming transaction first until the queue of the incoming transactions is empty. Respectively, if the `arg` is 0, the `producer` plugin processes the deferred transactions queue first.

Expand Down
Loading

0 comments on commit 38856b4

Please sign in to comment.