diff --git a/native/07_node-operation/10_getting-started/30_plugins.md b/native/07_node-operation/10_getting-started/30_plugins.md deleted file mode 100644 index e1aaa6cf..00000000 --- a/native/07_node-operation/10_getting-started/30_plugins.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Plugins -sidebar_class_name: sidebarhidden ---- diff --git a/native/07_node-operation/10_getting-started/30_plugins/chain_api_plugin/index.md b/native/07_node-operation/10_getting-started/30_plugins/chain_api_plugin/index.md new file mode 100644 index 00000000..623f570a --- /dev/null +++ b/native/07_node-operation/10_getting-started/30_plugins/chain_api_plugin/index.md @@ -0,0 +1,44 @@ +--- +title: chain_api_plugin +--- + +See [Chain API Reference](https://docs.eosnetwork.com/apis/leap/latest/chain.api/). + +## Overview + +The `chain_api_plugin` exposes functionality from the [`chain_plugin`](../chain_plugin/index.md) to the RPC API interface managed by the [`http_plugin`](../http_plugin/index.md). + +## Usage + +```console +# config.ini +plugin = eosio::chain_api_plugin +``` +```sh +# command-line +nodeos ... --plugin eosio::chain_api_plugin +``` + +## Options + +None + +## Dependencies + +* [`chain_plugin`](../chain_plugin/index.md) +* [`http_plugin`](../http_plugin/index.md) + +### Load Dependency Examples + +```console +# config.ini +plugin = eosio::chain_plugin +[options] +plugin = eosio::http_plugin +[options] +``` +```sh +# command-line +nodeos ... --plugin eosio::chain_plugin [operations] [options] \ + --plugin eosio::http_plugin [options] +``` diff --git a/native/07_node-operation/10_getting-started/30_plugins/chain_plugin/index.md b/native/07_node-operation/10_getting-started/30_plugins/chain_plugin/index.md new file mode 100644 index 00000000..7af7eecc --- /dev/null +++ b/native/07_node-operation/10_getting-started/30_plugins/chain_plugin/index.md @@ -0,0 +1,100 @@ +--- +title: chain_plugin +--- + +## Overview + +The `chain_plugin` is an essential plugin that is necessary for the processing and consolidation of chain data on an EOS node. It implements the core functionality provided by the [Chain API plugin](../chain_api_plugin/index.md). + +## Usage + +```console +# config.ini +plugin = eosio::chain_plugin +[options] +``` +```sh +# command-line +nodeos ... --plugin eosio::chain_plugin [operations] [options] +``` + +## Operations + +These can only be specified from the `nodeos` command-line: + +### Command Line Options for `chain_plugin` + +Option (=default) | Description +-|- +`--genesis-json arg` | File to read Genesis State from +`--genesis-timestamp arg` | override the initial timestamp in the Genesis State file +`--print-genesis-json` | extract genesis_state from blocks.log as JSON, print to console, and exit +`--extract-genesis-json arg` | extract genesis_state from blocks.log as JSON, write into specified file, and exit +`--print-build-info` | print build environment information to console as JSON and exit +`--extract-build-info arg` | extract build environment information as JSON, write into specified file, and exit +`--force-all-checks` | do not skip any validation checks while replaying blocks (useful for replaying blocks from untrusted source) +`--disable-replay-opts` | disable optimizations that specifically target replay +`--replay-blockchain` | clear chain state database and replay all blocks +`--hard-replay-blockchain` | clear chain state database, recover as many blocks as possible from the block log, and then replay those blocks +`--delete-all-blocks` | clear chain state database and block log +`--truncate-at-block arg (=0)` | stop hard replay / block log recovery at this block number (if set to non-zero number) +`--terminate-at-block arg (=0)` | terminate after reaching this block number (if set to a non-zero number) +`--snapshot arg` | File to read Snapshot State from + +## Options + +These can be specified from either the `nodeos` command-line or the `config.ini` file: + +### Config Options for `chain_plugin` + +Option (=default) | Description +-|- +`--blocks-dir arg (="blocks")` | the location of the blocks directory (absolute path or relative to application data dir) +`--blocks-log-stride arg` | split the block log file when the head block number is the multiple of the stride When the stride is reached, the current block log and index will be renamed '^blocks-retained-dir^/blocks-^start num^-^end num^.log/index' and a new current block log and index will be created with the most recent block. All files following this format will be used to construct an extended block log. +`--max-retained-block-files arg` | the maximum number of blocks files to retain so that the blocks in those files can be queried. When the number is reached, the oldest block file would be moved to archive dir or deleted if the archive dir is empty. The retained block log files should not be manipulated by users. +`--blocks-retained-dir arg` | the location of the blocks retained directory (absolute path or relative to blocks dir). If the value is empty, it is set to the value of blocks dir. +`--blocks-archive-dir arg` | the location of the blocks archive directory (absolute path or relative to blocks dir). If the value is empty, blocks files beyond the retained limit will be deleted. All files in the archive directory are completely under user's control, i.e. they won't be accessed by nodeos anymore. +`--state-dir arg (="state")` | the location of the state directory (absolute path or relative to application data dir) +`--protocol-features-dir arg (="protocol_features")` | the location of the protocol_features directory (absolute path or relative to application config dir) +`--checkpoint arg` | Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints. +`--wasm-runtime runtime (=eos-vm-jit)` | Override default WASM runtime ( "eos-vm-jit", "eos-vm") "eos-vm-jit" : A WebAssembly runtime that compiles WebAssembly code to native x86 code prior to execution. "eos-vm" : A WebAssembly interpreter. +`--profile-account arg` | The name of an account whose code will be profiled +`--abi-serializer-max-time-ms arg (=15)` | Override default maximum ABI serialization time allowed in ms +`--chain-state-db-size-mb arg (=1024)` | Maximum size (in MiB) of the chain state database +`--chain-state-db-guard-size-mb arg (=128)` | Safely shut down node when free space remaining in the chain state database drops below this size (in MiB). +`--signature-cpu-billable-pct arg (=50)` | Percentage of actual signature recovery cpu to bill. Whole number percentages, e.g. 50 for 50% +`--chain-threads arg (=2)` | Number of worker threads in controller thread pool +`--contracts-console` | print contract's output to console +`--deep-mind` | print deeper information about chain operations +`--actor-whitelist arg` | Account added to actor whitelist (may specify multiple times) +`--actor-blacklist arg` | Account added to actor blacklist (may specify multiple times) +`--contract-whitelist arg` | Contract account added to contract whitelist (may specify multiple times) +`--contract-blacklist arg` | Contract account added to contract blacklist (may specify multiple times) +`--action-blacklist arg` | Action (in the form code::action) added to action blacklist (may specify multiple times) +`--key-blacklist arg` | Public key added to blacklist of keys that should not be included in authorities (may specify multiple times) +`--sender-bypass-whiteblacklist arg` | Deferred transactions sent by accounts in this list do not have any of the subjective whitelist/blacklist checks applied to them (may specify multiple times) +`--read-mode arg (=head)` | Database read mode ("head", "irreversible", "speculative"). In "head" mode: database contains state changes up to the head block; transactions received by the node are relayed if valid. In "irreversible" mode: database contains state changes up to the last irreversible block; transactions received via the P2P network are not relayed and transactions cannot be pushed via the chain API. In "speculative" mode: (DEPRECATED: head mode recommended) database contains state changes by transactions in the blockchain up to the head block as well as some transactions not yet included in the blockchain; transactions received by the node are relayed if valid. +`--api-accept-transactions arg (=1)` | Allow API transactions to be evaluated and relayed if valid. +`--validation-mode arg (=full)` | Chain validation mode ("full" or "light"). In "full" mode all incoming blocks will be fully validated. In "light" mode all incoming blocks headers will be fully validated; transactions in those validated blocks will be trusted +`--disable-ram-billing-notify-checks` | Disable the check which subjectively fails a transaction if a contract bills more RAM to another account within the context of a notification handler (i.e. when the receiver is not the code of the action). +`--maximum-variable-signature-length arg (=16384)` | Subjectively limit the maximum length of variable components in a variable legnth signature to this size in bytes +`--trusted-producer arg` | Indicate a producer whose blocks headers signed by it will be fully validated, but transactions in those validated blocks will be trusted. +`--database-map-mode arg (=mapped)` | Database map mode ("mapped", "heap", or "locked"). In "mapped" mode database is memory mapped as a file. In "heap" mode database is preloaded in to swappable memory and will use huge pages if available. In "locked" mode database is preloaded, locked in to memory, and will use huge pages if available. +`--eos-vm-oc-cache-size-mb arg (=1024)` | Maximum size (in MiB) of the EOS VM OC code cache +`--eos-vm-oc-compile-threads arg (=1)` | Number of threads to use for EOS VM OC tier-up +`--eos-vm-oc-enable` | Enable EOS VM OC tier-up runtime +`--enable-account-queries arg (=0)` | enable queries to find accounts by various metadata. +`--max-nonprivileged-inline-action-size arg (=4096)` | maximum allowed size (in bytes) of an inline action for a nonprivileged account +`--transaction-retry-max-storage-size-gb arg` | Maximum size (in GiB) allowed to be allocated for the Transaction Retry feature. Setting above 0 enables this feature. +`--transaction-retry-interval-sec arg (=20)` | How often, in seconds, to resend an incoming transaction to network if not seen in a block. +`--transaction-retry-max-expiration-sec arg (=120)` | Maximum allowed transaction expiration for retry transactions, will retry transactions up to this value. +`--transaction-finality-status-max-storage-size-gb arg` | Maximum size (in GiB) allowed to be allocated for the Transaction Finality Status feature. Setting above 0 enables this feature. +`--transaction-finality-status-success-duration-sec arg (=180)` | Duration (in seconds) a successful transaction's Finality Status will remain available from being first identified. +`--transaction-finality-status-failure-duration-sec arg (=180)` | Duration (in seconds) a failed transaction's Finality Status will remain available from being first identified. +`--integrity-hash-on-start` | Log the state integrity hash on startup +`--integrity-hash-on-stop` | Log the state integrity hash on shutdown +`--block-log-retain-blocks arg` | If set to greater than 0, periodically prune the block log to store only configured number of most recent blocks. If set to 0, no blocks are be written to the block log; block log file is removed after startup. + +## Dependencies + +None diff --git a/native/07_node-operation/10_getting-started/30_plugins/db_size_api_plugin/index.md b/native/07_node-operation/10_getting-started/30_plugins/db_size_api_plugin/index.md new file mode 100644 index 00000000..7f21254b --- /dev/null +++ b/native/07_node-operation/10_getting-started/30_plugins/db_size_api_plugin/index.md @@ -0,0 +1,48 @@ +--- +title: db_size_api_plugin +--- + +See [DB Size API Reference](https://docs.eosnetwork.com/apis/leap/latest/db_size.api/). + +## Overview + +The `db_size_api_plugin` obtains analytics related to the blockchain. It retrieves at the least the following information: +* free_bytes +* used_bytes +* size +* indices + +## Usage + +```console +# config.ini +plugin = eosio::db_size_api_plugin +``` +```sh +# command-line +nodeos ... --plugin eosio::db_size_api_plugin +``` + +## Options + +None + +## Dependencies + +* [`chain_plugin`](../chain_plugin/index.md) +* [`http_plugin`](../http_plugin/index.md) + +### Load Dependency Examples + +```console +# config.ini +plugin = eosio::chain_plugin +[options] +plugin = eosio::http_plugin +[options] +``` +```sh +# command-line +nodeos ... --plugin eosio::chain_plugin [operations] [options] \ + --plugin eosio::http_plugin [options] +``` diff --git a/native/07_node-operation/10_getting-started/30_plugins/http_plugin/index.md b/native/07_node-operation/10_getting-started/30_plugins/http_plugin/index.md new file mode 100644 index 00000000..19970e46 --- /dev/null +++ b/native/07_node-operation/10_getting-started/30_plugins/http_plugin/index.md @@ -0,0 +1,49 @@ +--- +title: http_plugin +--- + +## Overview + +The `http_plugin` is essential for enabling the RPC API functionality provided by either a `nodeos` or `keosd` instance. Both `nodeos` and `keosd` support the `http_plugin` as a core plugin. + +## Usage + +```console +# config.ini +plugin = eosio::http_plugin +[options] +``` +```sh +# command-line +nodeos ... --plugin eosio::http_plugin [options] + (or) +keosd ... --plugin eosio::http_plugin [options] +``` + +## Options + +These can be specified from either the command-line or the `config.ini` file: + +### Config Options for `http_plugin` + +Option (=default) | Description +-|- +`--unix-socket-path arg` | The filename (relative to data-dir) to create a unix socket for HTTP RPC; set blank to disable. +`--http-server-address arg (=127.0.0.1:8888)` | The local IP and port to listen for incoming http connections; set blank to disable. +`--access-control-allow-origin arg` | Specify the Access-Control-Allow-Origin to be returned on each request +`--access-control-allow-headers arg` | Specify the Access-Control-Allow-Headers to be returned on each request +`--access-control-max-age arg` | Specify the Access-Control-Max-Age to be returned on each request. +`--access-control-allow-credentials` | Specify if Access-Control-Allow-Credentials: true should be returned on each request. +`--max-body-size arg (=2097152)` | The maximum body size in bytes allowed for incoming RPC requests +`--http-max-bytes-in-flight-mb arg (=500)` | Maximum size in megabytes http_plugin should use for processing http requests. -1 for unlimited. 429 error response when exceeded. +`--http-max-in-flight-requests arg (=-1)` | Maximum number of requests http_plugin should use for processing http requests. 429 error response when exceeded. +`--http-max-response-time-ms arg (=30)` | Maximum time for processing a request, -1 for unlimited +`--verbose-http-errors` | Append the error log to HTTP responses +`--http-validate-host arg (=1)` | If set to false, then any incoming "Host" header is considered valid +`--http-alias arg` | Additionaly acceptable values for the "Host" header of incoming HTTP requests, can be specified multiple times. Includes http/s_server_address by default. +`--http-threads arg (=2)` | Number of worker threads in http thread pool +`--http-keep-alive arg (=1)` | If set to false, do not keep HTTP connections alive, even if client requests. + +## Dependencies + +None diff --git a/native/07_node-operation/10_getting-started/30_plugins/index.md b/native/07_node-operation/10_getting-started/30_plugins/index.md new file mode 100644 index 00000000..16cac8f1 --- /dev/null +++ b/native/07_node-operation/10_getting-started/30_plugins/index.md @@ -0,0 +1,9 @@ +--- +title: Plugins +--- + +`nodeos` uses plugins to add incremental functionality to a node. While certain plugins such as `chain_plugin`, `net_plugin`, and `producer_plugin` are essential to the modular operation of `nodeos`, other optional plugins offer additional features that extend the core capabilities of a node. + +To learn more about a specific plugin, select it from the left navigation menu. + +> ℹ️ `nodeos` plugins provide incremental functionality to the EOS core blockchain. In contrast to runtime plugins, `nodeos` plugins are built and baked into the `nodeos` binary during the compilation process. diff --git a/native/07_node-operation/10_getting-started/30_plugins/net_api_plugin/index.md b/native/07_node-operation/10_getting-started/30_plugins/net_api_plugin/index.md new file mode 100644 index 00000000..3c56a06c --- /dev/null +++ b/native/07_node-operation/10_getting-started/30_plugins/net_api_plugin/index.md @@ -0,0 +1,52 @@ +--- +title: net_api_plugin +--- + +See [Net API Reference](https://docs.eosnetwork.com/apis/leap/latest/net.api/). + +## Overview + +The `net_api_plugin` exposes functionality from the [`net_plugin`](../net_plugin/index.md) to the RPC API interface managed by the [`http_plugin`](../http_plugin/index.md). The `net_api_plugin` allows node operators to manage the peer-to-peer (p2p) connections of an active node. + +The `net_api_plugin` provides four RPC API endpoints: +* connect +* disconnect +* connections +* status + +> ⚠️ This plugin exposes endpoints that allow management of p2p connections. Running this plugin on a publicly accessible node is not recommended as it can be exploited. + +## Usage + +```console +# config.ini +plugin = eosio::net_api_plugin +``` +```sh +# command-line +nodeos ... --plugin eosio::net_api_plugin +``` + +## Options + +None + +## Dependencies + +* [`net_plugin`](../net_plugin/index.md) +* [`http_plugin`](../http_plugin/index.md) + +### Load Dependency Examples + +```console +# config.ini +plugin = eosio::net_plugin +[options] +plugin = eosio::http_plugin +[options] +``` +```sh +# command-line +nodeos ... --plugin eosio::net_plugin [options] \ + --plugin eosio::http_plugin [options] +``` diff --git a/native/07_node-operation/10_getting-started/30_plugins/net_plugin/index.md b/native/07_node-operation/10_getting-started/30_plugins/net_plugin/index.md new file mode 100644 index 00000000..f02959e4 --- /dev/null +++ b/native/07_node-operation/10_getting-started/30_plugins/net_plugin/index.md @@ -0,0 +1,51 @@ +--- +title: net_plugin +--- + +## Overview + +The `net_plugin` offers an authenticated peer-to-peer (p2p) protocol for continuous synchronization of nodes. It also implements the core functionality provided by the [Net API plugin](../net_api_plugin/index.md). + +## Usage + +```console +# config.ini +plugin = eosio::net_plugin +[options] +``` +```sh +# command-line +nodeos ... --plugin eosio::net_plugin [options] +``` + +## Options + +These can be specified from either the command-line or the `config.ini` file: + +### Config Options for `net_plugin` + +Option (=default) | Description +-|- +`--p2p-listen-endpoint arg (=0.0.0.0:9876)` | The actual host:port used to listen for incoming p2p connections. +`--p2p-server-address arg` | An externally accessible host:port for identifying this node. Defaults to p2p-listen-endpoint. +`--p2p-peer-address arg` | The public endpoint of a peer node to connect to. Use multiple p2p-peer-address options as needed to compose a network. Syntax: host:port[:^trx^\|^blk^] The optional 'trx' and 'blk' indicates to node that only transactions 'trx' or blocks 'blk' should be sent. Examples: p2p.eos.io:9876 p2p.trx.eos.io:9876:trx p2p.blk.eos.io:9876:blk +`--p2p-max-nodes-per-host arg (=1)` | Maximum number of client nodes from any single IP address +`--p2p-accept-transactions arg (=1)` | Allow transactions received over p2p network to be evaluated and relayed if valid. +`--p2p-auto-bp-peer arg` | The account and public p2p endpoint of a block producer node to automatically connect to when the it is in producer schedule proximity . Syntax: account,host:port Example, eosproducer1,p2p.eos.io:9876 eosproducer2,p2p.trx.eos.io:9876:t rx eosproducer3,p2p.blk.eos.io:9876:b lk +`--agent-name arg (=EOS Test Agent)` | The name supplied to identify this node amongst the peers. +`--allowed-connection arg (=any)` | Can be 'any' or 'producers' or 'specified' or 'none'. If 'specified', peer-key must be specified at least once. If only 'producers', peer-key is not required. 'producers' and 'specified' may be combined. +`--peer-key arg` | Optional public key of peer allowed to connect. May be used multiple times. +`--peer-private-key arg` | Tuple of [PublicKey, WIF private key] (may specify multiple times) +`--max-clients arg (=25)` | Maximum number of clients from which connections are accepted, use 0 for no limit +`--connection-cleanup-period arg (=30)` | number of seconds to wait before cleaning up dead connections +`--max-cleanup-time-msec arg (=10)` | max connection cleanup time per cleanup call in milliseconds +`--p2p-dedup-cache-expire-time-sec arg (=10)` | Maximum time to track transaction for duplicate optimization +`--net-threads arg (=4)` | Number of worker threads in net_plugin thread pool +`--sync-fetch-span arg (=100)` | number of blocks to retrieve in a chunk from any individual peer during synchronization +`--use-socket-read-watermark arg (=0)` | Enable experimental socket read watermark optimization +`--peer-log-format arg (=["${_name}" - ${_cid} ${_ip}:${_port}] )` | The string used to format peers when logging messages about them. Variables are escaped with ${^variable name^}. Available Variables: _name self-reported name _cid assigned connection id _id self-reported ID (64 hex characters) _sid first 8 characters of _peer.id _ip remote IP address of peer _port remote port number of peer _lip local IP address connected to peer _lport local port number connected to peer +`--p2p-keepalive-interval-ms arg (=10000)` | peer heartbeat keepalive message interval in milliseconds + +## Dependencies + +None diff --git a/native/07_node-operation/10_getting-started/30_plugins/producer_api_plugin/index.md b/native/07_node-operation/10_getting-started/30_plugins/producer_api_plugin/index.md new file mode 100644 index 00000000..aa7b0614 --- /dev/null +++ b/native/07_node-operation/10_getting-started/30_plugins/producer_api_plugin/index.md @@ -0,0 +1,48 @@ +--- +title: producer_api_plugin +--- + +See [Producer API Reference](https://docs.eosnetwork.com/apis/leap/latest/producer.api/). + +## Overview + +The `producer_api_plugin` exposes various endpoints for the [`producer_plugin`](../producer_plugin/index.md) to the RPC API interface managed by the [`http_plugin`](../http_plugin/index.md). + +## Usage + +```console +# config.ini +plugin = eosio::producer_api_plugin +``` +```sh +# nodeos startup params +nodeos ... --plugin eosio::producer_api_plugin +``` + +## Options + +None + +## Dependencies + +* [`producer_plugin`](../producer_plugin/index.md) +* [`chain_plugin`](../chain_plugin/index.md) +* [`http_plugin`](../http_plugin/index.md) + +### Load Dependency Examples + +```console +# config.ini +plugin = eosio::producer_plugin +[options] +plugin = eosio::chain_plugin +[options] +plugin = eosio::http_plugin +[options] +``` +```sh +# command-line +nodeos ... --plugin eosio::producer_plugin [options] \ + --plugin eosio::chain_plugin [operations] [options] \ + --plugin eosio::http_plugin [options] +``` diff --git a/native/07_node-operation/10_getting-started/30_plugins/producer_plugin/index.md b/native/07_node-operation/10_getting-started/30_plugins/producer_plugin/index.md new file mode 100644 index 00000000..8b039f09 --- /dev/null +++ b/native/07_node-operation/10_getting-started/30_plugins/producer_plugin/index.md @@ -0,0 +1,91 @@ +--- +title: producer_plugin +--- + +## Overview + +The `producer_plugin` contains functionality for a node to perform the task of block production. It also implements the core functionality provided by the [Producer API plugin](../producer_api_plugin/index.md). + +> ℹ️ To enable block production, a particular `nodeos` configuration is necessary. Refer to the [Configuring Block Producing Node](https://docs.eosnetwork.com/manuals/leap/latest/nodeos/usage/node-setups/producing-node) guide for detailed instructions. + +## Usage + +```console +# config.ini +plugin = eosio::producer_plugin [options] +``` +```sh +# nodeos startup params +nodeos ... -- plugin eosio::producer_plugin [options] +``` + +## Options + +These can be specified from either the `nodeos` command-line or the `config.ini` file: + +### Config Options for `producer_plugin` + +Option (=default) | Description +-|- +`-e [ --enable-stale-production ]` | Enable block production, even if the chain is stale. +`-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 being considered invalid +`--max-irreversible-block-age arg (=-1)` | Limits the maximum age (in seconds) of the DPOS Irreversible Block for a chain 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 times) +`--signature-provider arg (==KEY:)` | Key=Value pairs in the form ^public-key^=^provider-spec^ Where: ^public-key^ is a string form of a vaild EOSIO public key ^provider-spec^ is a string in the form ^provider-type^ :^data^ ^provider-type^ is KEY, KEOSD, or SE 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 unlocked +`--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 multiple that CPU/NET virtual resources 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 .. -block_time_interval. +`--last-block-time-offset-us arg (=-200000)` | 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 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 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 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 can be produced immediately +`--max-scheduled-transaction-time-per-block-ms arg (=100)` | Maximum wall-clock time, in milliseconds, spent retiring scheduled transactions (and incoming transactions according to incoming-defer-ratio) 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 cover its CPU usage. +`--subjective-account-max-failures arg (=3)` | Sets the maximum amount of failures that are allowed for a given account per window size. +`--subjective-account-max-failures-window-size arg (=1)` | Sets the window size in number of blocks for subjective-account-max-failu res. +`--subjective-account-decay-time-minutes arg (=1440)` | 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 queued for execution +`--incoming-transaction-queue-size-mb arg (=1024)` | Maximum size (in MiB) of the incoming transaction queue. Exceeding this value will subjectively drop transaction with resource exhaustion. +`--disable-subjective-billing arg (=1)` | Disable subjective CPU billing for API/P2P transactions +`--disable-subjective-account-billing arg` | Account which is excluded from subjective CPU billing +`--disable-subjective-p2p-billing arg (=1)` | Disable subjective CPU billing for P2P transactions +`--disable-subjective-api-billing arg (=1)` | Disable subjective CPU billing for API transactions +`--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 application data dir) +`--read-only-threads arg` | Number of worker threads in read-only execution thread pool. Max 8. +`--read-only-write-window-time-us arg (=200000)` | Time in microseconds the write window lasts. +`--read-only-read-window-time-us arg (=60000)` | Time in microseconds the read window lasts. + +## Dependencies + +* [`chain_plugin`](../chain_plugin/index.md) + +## The priority of transaction + +You can give one of the transaction types priority over another when the producer plugin has a queue of transactions pending. + +The option below sets the ratio between the incoming transaction and the deferred transaction: + +```console + --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. + +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. + + +### Load Dependency Examples + +```console +# config.ini +plugin = eosio::chain_plugin [operations] [options] +``` +```sh +# command-line +nodeos ... --plugin eosio::chain_plugin [operations] [options] +``` + +For details about how blocks are produced please read the following [block producing explainer](https://docs.eosnetwork.com/manuals/leap/latest/nodeos/plugins/producer_plugin/block-producing-explained). diff --git a/native/07_node-operation/10_getting-started/30_plugins/prometheus_plugin/index.md b/native/07_node-operation/10_getting-started/30_plugins/prometheus_plugin/index.md new file mode 100644 index 00000000..d0dca555 --- /dev/null +++ b/native/07_node-operation/10_getting-started/30_plugins/prometheus_plugin/index.md @@ -0,0 +1,75 @@ +--- +title: prometheus_plugin +--- + +## Overview + +The `prometheus_plugin` provides data collection of various internal `nodeos` metrics. Clients can access the `/v1/prometheus/metrics` endpoint to retrieve the following metrics: + +- number of clients +- number of peers +- number of dropped blocks +- unapplied transaction queue sizes (number of transactions) +- blacklisted transactions count (total) +- blocks produced +- transactions produced +- last irreversible +- current head block num +- subjective billing number of accounts +- subjective billing number of blocks +- scheduled transactions +- number of API calls per API endpoint + +## Format + +The `prometheus_plugin` endpoint returns a string consisting of metric names and their corresponding key/value pairs, also known as labels, collected in chronological order. + +Given a metric name and a set of labels, data is collected chronologically and formatted using this notation: + + {