15 Prática sobre Hyperledger: Introdução ao Besu
Introdução ao Besu
15.1 Introdução
O Hyperledger Besu é um projeto do Hyperledger que é um cliente para rede ethereum.
A Blockchain Platform for the Enterprise
Ele pode ser instalado via imagem docker (link) ou através de binários para diversos sistemas, para o GNU/Linux (link). A versão corrente no momento da preparação desse material é a \(25.10.0\) e pode ser baixada diretamente pelo link besu-25.10.0.tar.gz.
15.2 Instalando via Binários
Descompactando o arquivo besu-25.10.0.tar.gz:
$ wget https://github.com/hyperledger/besu/releases/download/25.10.0/besu-25.10.0.tar.gz
$ tar -xzvf besu-25.10.0.tar.gz
besu-25.10.0/
besu-25.10.0/lib/
besu-25.10.0/lib/besu-ethereum-evmtool-25.10.0.jar
besu-25.10.0/lib/besu-app-25.10.0.jar
besu-25.10.0/lib/besu-ethereum-ethstats-25.10.0.jar
besu-25.10.0/lib/besu-consensus-ibft-25.10.0.jar
besu-25.10.0/lib/besu-ethereum-api-25.10.0.jar
...
besu-25.10.0/bin/
besu-25.10.0/bin/besu
besu-25.10.0/LICENSE
besu-25.10.0/README.md
besu-25.10.0/bin/besu-entry.sh
...
$ Executando:
$ bin/besu --help
]$ cd besu-25.10.0/
[besu-25.10.0]$ bin/besu --help
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by com.sun.jna.Native in an unnamed module (file:/home/rag/besu-25.10.0/lib/jna-5.16.0.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
Usage:
besu [OPTIONS] [COMMAND]
Description:
This command runs the Besu Ethereum client full node.
Options:
--auto-log-bloom-caching-enabled=<autoLogBloomCachingEnabled>
Enable automatic log bloom caching (default: true)
--bonsai-historical-block-limit=<LONG>
Limit of historical layers that can be loaded with BONSAI (default: 512). When using
--bonsai-limit-trie-logs-enabled it will also be used as the number of layers of trie logs to retain.
--bonsai-limit-trie-logs-enabled
Limit the number of trie logs that are retained. (default: true)
--bonsai-parallel-tx-processing-enabled, --Xbonsai-parallel-tx-processing-enabled=<isParallelTxProcessingEnabled>
Enables parallelization of transactions to optimize processing speed by concurrently loading and executing
necessary data in advance. Will be ignored if --data-storage-format is not bonsai (default: true)
--bonsai-trie-logs-pruning-window-size=<trieLogPruningWindowSize>
The max number of blocks to load and prune trie logs for at startup. (default: 5000)
--cache-last-block-headers=<numberOfBlockHeadersToCache>
Specifies the number of last block headers to cache (default: 0)
--cache-last-block-headers-preload-enabled
Enable preloading of the block header cache (default: false)
--cache-last-blocks=<numberOfBlocksToCache>
Specifies the number of last blocks to cache (default: 0)
--cache-precompiles Specifies whether to cache precompile results (default: false)
--color-enabled Force color output to be enabled/disabled (default: colorized only if printing to console)
--config-file=<FILE> TOML config file (default: none)
--data-path=<PATH> The path to Besu data directory (default: /home/rag/besu-25.10.0)
--data-storage-format=<dataStorageFormat>
Format to store trie data in. Either FOREST or BONSAI (default: BONSAI).
--era1-data-uri=<URI> The URI to attempt to load ERA1 files from. For local files, a simple path may be used (e.g. /home/user/era1).
(default: https://mainnet.era1.nimbus.team/)
--era1-import-prepipeline-concurrency=<INTEGER>
How many parallel pipelines to use in the ERA1 import prepipeline (default: 1)
--era1-import-prepipeline-enabled[=<Boolean>]
Enable the ERA1 import prepipeline for FULL sync. ERA1 files will be imported from the URI specified by
--era1-data-uri (currently only local files and http is supported). If a sync mode other than FULL is selected,
this will have no affect. (default: false)
--ethstats=<[ws://|wss://]nodename:secret@host:[port]>
Reporting URL of a ethstats server. Scheme and port can be omitted.
--ethstats-cacert-file=<FILE>
Specifies the path to the root CA (Certificate Authority) certificate file that has signed ethstats server
certificate. This option is optional.
--ethstats-contact=<ethstatsContact>
Contact address to send to ethstats server
--ethstats-report-interval=<SECONDS>
Interval in seconds between ethstats reports.
--genesis-file=<FILE> Genesis file for your custom network. Setting this option requires --network-id to be set. (Cannot be used with
--network)
--genesis-state-hash-cache-enabled
Use genesis state hash from data on startup if specified (default: false)
-h, --help Show this help message and exit.
--history-expiry-prune, --Xhistory-expiry-prune
Convenience option to enable online history pruning and configure BlobDB garbage collection settings (default:
false). "--Xhistory-expiry-prune" is deprecated and will be removed in a future release. Use
"--history-expiry-prune" instead.
--host-allowlist=<hostname>[,<hostname>...]... or * or all
Comma separated list of hostnames to allow for RPC access, or * to accept any host (default: localhost,127.0.0.1)
--identity=<String> Identification for this node in the Client ID
--key-value-storage=<keyValueStorageName>
Identity for the key-value storage to be used.
--kzg-trusted-setup=<FILE>
Path to file containing the KZG trusted setup, mandatory for custom networks that support data blobs, optional for
overriding named networks default.
-l, --logging=<LOG VERBOSITY LEVEL>
Logging verbosity levels: OFF, ERROR, WARN, INFO, DEBUG, TRACE, ALL
--nat-method=<natMethod>
Specify the NAT circumvention method to be used, possible values are UPNP, UPNPP2PONLY, DOCKER, AUTO, NONE. NONE
disables NAT functionality. (default: AUTO)
--network=<NETWORK> Synchronize against the indicated network, possible values are MAINNET, SEPOLIA, HOLESKY, HOODI, EPHEMERY, LUKSO,
DEV, FUTURE_EIPS, EXPERIMENTAL_EIPS, CLASSIC, MORDOR. (default: MAINNET)
--network-id=<BIG INTEGER>
P2P network identifier. (default: the selected network chain ID or custom genesis chain ID)
--node-private-key-file=<PATH>
The node's private key file (default: a file named "key" in the Besu data directory)
--pid-path=<PATH> Path to PID file (optional)
--plugin-continue-on-error=<continueOnPluginError>
Allow Besu startup even if any plugins fail to initialize correctly (default: false)
--plugins=<plugins>[,<plugins>...]
Comma-separated list of plugin names to load
--print-paths-and-exit[=<username>]
Print the configured paths and exit without starting the node.
--profile=<PROFILE> Overwrite default settings. Possible values are dev, enterprise, minimalist_staker, performance, performance_rpc,
private, staker. (default: none)
--receipt-compaction-enabled
Enables compact storing of receipts (default: true)
--reorg-logging-threshold=<reorgLoggingThreshold>
How deep a chain reorganization must be in order for it to be logged (default: 6)
--required-block, --required-blocks[=BLOCK=HASH[,BLOCK=HASH...]...]
Block number and hash peers are required to have.
--revert-reason-enabled
Enable passing the revert reason back through TransactionReceipts (default: false)
--security-module=<NAME>
Identity for the Security Module to be used.
--snapsync-server-enabled, --Xsnapsync-server-enabled[=<Boolean>]
Enable snap sync server capability. Note: --Xsnapsync-server-enabled is deprecated and will be removed in a future
release. --snapsync-server-enabled is used instead. (default: false)
--snapsync-synchronizer-transaction-indexing-enabled[=<Boolean>]
Enable transaction indexing during SNAP/CHECKPOINT sync. Disabling will improve initial syncing time and disk
usage. However, to support RPCs that use transaction hash for historical queries, you'll need to enable this.
(default: false)
--static-nodes-file=<FILE>
Specifies the static node file containing the static nodes for this node to connect to
--sync-min-peers, --fast-sync-min-peers=<INTEGER>
Minimum number of peers required before starting sync. Has effect only on non-PoS networks. (default: 5)
--sync-mode=<MODE> Synchronization mode, possible values are FULL, FAST, SNAP, CHECKPOINT (default: SNAP if a --network is supplied.
FULL otherwise.)
-V, --version Print version information and exit.
--version-compatibility-protection
Perform compatibility checks between the version of Besu being started and the version of Besu that last started
with this data directory. (default: null)
--Xsnapsync-synchronizer-pre-merge-headers-only-enabled, --snapsync-synchronizer-pre-checkpoint-headers-only-enabled[=<Boolean>]
Enable snap sync downloader to save only headers (not block bodies) for blocks before the checkpoint. (default:
true) "--Xsnapsync-synchronizer-pre-merge-headers-only-enabled" is deprecated and will be removed in a future
release. Use "--snapsync-synchronizer-pre-checkpoint-headers-only-enabled" instead.
Tx Pool Layered Implementation Options
--tx-pool-enable-balance-check[=<Boolean>]
If enabled a pending transaction can stay in the prioritized layer, only if its sender has enough balance (default:
false)
--tx-pool-layer-max-capacity=<LONG>
Max amount of memory space, in bytes, that any layer within the transaction pool could occupy (default: 25000000)
--tx-pool-max-future-by-sender=<INTEGER>
Max number of future pending transactions allowed for a single sender (default: 200)
--tx-pool-max-prioritized=<INTEGER>
Max number of pending transactions that are prioritized and thus kept sorted (default: 4000)
--tx-pool-max-prioritized-by-type=MAP<TYPE,INTEGER>[,MAP<TYPE,INTEGER>...]
Max number of pending transactions, of a specific type, that are prioritized and thus kept sorted (default:
{BLOB=72})
--tx-pool-min-score=<Byte>
Remove a pending transaction from the txpool if its score is lower than this value.Accepts values between -128 and
127 (default: -128)
Tx Pool Sequenced Implementation Options
--tx-pool-limit-by-account-percentage=<DOUBLE>
Maximum portion of the transaction pool which a single account may occupy with future transactions (default: 0.001)
--tx-pool-max-size=<INTEGER>
Maximum number of pending transactions that will be kept in the transaction pool (default: 4096)
--tx-pool-retention-hours=<INTEGER>
Maximum retention period of pending transactions in hours (default: 13)
Tx Pool Common Options
--rpc-tx-feecap=<txFeeCap>
Maximum transaction fees (in Wei) accepted for transaction submitted through RPC (default:
0x0000000000000000000000000000000000000000000000000de0b6b3a7640000)
--strict-tx-replay-protection-enabled[=<Boolean>]
Require transactions submitted via JSON-RPC to use replay protection in accordance with EIP-155 (default: false)
--tx-pool[=<Enum>] The Transaction Pool implementation to use(default: LAYERED)
--tx-pool-blob-price-bump=<Percentage>
Blob price bump percentage to replace an already existing transaction blob tx (default: 100)
--tx-pool-enable-save-restore[=<Boolean>]
Set to true to enable saving the txpool content to file on shutdown and reloading it on startup (default: false)
--tx-pool-min-gas-price=<Wei>
Transactions with gas price (in Wei) lower than this minimum will not be accepted into the txpool(not to be
confused with min-gas-price, that is applied on block creation) (default:
0x00000000000000000000000000000000000000000000000000000000000003e8)
--tx-pool-no-local-priority[=<Boolean>]
Set to true if senders of transactions sent via RPC should not have priority (default: false)
--tx-pool-price-bump=<Percentage>
Price bump percentage to replace an already existing transaction (default: 10)
--tx-pool-priority-senders=Comma separated list of addresses[,Comma separated list of addresses...]...
Pending transactions sent exclusively by these addresses, from any source, are prioritized and only evicted after
all others. If not specified, then only the senders submitting transactions via RPC have priority (default: [])
--tx-pool-save-file=<STRING>
If saving the txpool content is enabled, define a custom path for the save file (default: txpool.dump in the
data-dir)
Block Builder Options
--block-txs-selection-max-time=<nonPoaBlockTxsSelectionMaxTime>
Deprecated. PoW consensus is deprecated. See CHANGELOG for alternative options. Specifies the maximum time, in
milliseconds, that could be spent selecting transactions to be included in the block. Not compatible with PoA
networks, see poa-block-txs-selection-max-time. (default: +5000)
--min-block-occupancy-ratio=<minBlockOccupancyRatio>
Minimum occupancy ratio for a mined block (default: 0.8)
--min-gas-price=<minTransactionGasPrice>
Minimum price (in Wei) offered by a transaction for it to be included in a mined block (default:
0x00000000000000000000000000000000000000000000000000000000000003e8)
--min-priority-fee=<minPriorityFeePerGas>
Minimum priority fee per gas (in Wei) offered by a transaction for it to be included in a block (default:
0x0000000000000000000000000000000000000000000000000000000000000000)
--miner-coinbase=<coinbase>
Account to which mining rewards are paid. You must specify a valid coinbase if mining is enabled using
--miner-enabled option
--miner-enabled Deprecated. PoW consensus is deprecated. See CHANGELOG for alternative options. Set if node will perform mining
(default: false)
--miner-extra-data=<extraData>
A hex string representing the (32) bytes to be included in the extra data field of a mined block (default:
0x626573752032352e31302e30)
--plugin-block-txs-selection-max-time=<pluginBlockTxsSelectionMaxTime>
Specifies the maximum time that plugins could spent selecting transactions to be included in the block, as a
percentage of the max block selection time. (default: +50)
--poa-block-txs-selection-max-time=<poaBlockTxsSelectionMaxTime>
Specifies the maximum time that could be spent selecting transactions to be included in the block, as a percentage
of the fixed block time of the PoA network. To be only used on PoA networks, for other networks see
block-txs-selection-max-time. (default: +75)
--target-gas-limit=<targetGasLimit>
Sets target gas limit per block. If set, each block's gas limit will approach this setting over time.
P2P Discovery Options
--banned-node-id, --banned-node-ids=<NODEID>[,<NODEID>...]...
A list of node IDs to ban from the P2P network.
--bootnodes[=<enode://id@host:port>[,<enode://id@host:port>...]...]
Comma separated enode URLs for P2P discovery bootstrap. Default is a predefined list.
--discovery-dns-url=<discoveryDnsUrl>
Specifies the URL to use for DNS discovery
--discovery-enabled=<peerDiscoveryEnabled>
Enable P2P discovery (default: true)
--max-peers, --p2p-peer-upper-bound=<INTEGER>
Maximum P2P connections that can be established (default: 25)
--net-restrict=<allowedSubnets>[,<allowedSubnets>...]...
Comma-separated list of allowed IP subnets (e.g., '192.168.1.0/24,10.0.0.0/8').
--p2p-enabled=<p2pEnabled>
Enable P2P functionality (default: true)
--p2p-host=<HOST> IP address this node advertises to its peers (default: 127.0.0.1)
--p2p-interface=<HOST> The network interface address on which this node listens for P2P communication (default: 0.0.0.0)
--p2p-port=<PORT> Port on which to listen for P2P communication (default: 30303)
--poa-discovery-retry-bootnodes=<poaDiscoveryRetryBootnodes>
Always use of bootnodes for discovery in PoA networks. Disabling this reverts to the same behaviour as non-PoA
networks, where neighbours are only discovered from bootnodes on first startup.(default: true)
--random-peer-priority-enabled
Allow for incoming connections to be prioritized randomly. This will prevent (typically small, stable) networks
from forming impenetrable peer cliques. (default: false)
--remote-connections-limit-enabled
Whether to limit the number of P2P connections initiated remotely. (default: true)
--remote-connections-max-percentage=<DOUBLE>
The maximum percentage of P2P connections that can be initiated remotely. Must be between 0 and 100 inclusive.
(default: 60)
GraphQL Options
--graphql-http-cors-origins=<graphQLHttpCorsAllowedOrigins>
Comma separated origin domain URLs for CORS validation (default: none)
--graphql-http-enabled Set to start the GraphQL HTTP service (default: false)
--graphql-http-host=<HOST>
Host for GraphQL HTTP to listen on (default: null)
--graphql-http-port=<PORT>
Port for GraphQL HTTP to listen on (default: 8547)
--graphql-mtls-enabled Enable mTLS for GraphQL HTTP service
--graphql-tls-enabled Enable TLS for GraphQL HTTP service
--graphql-tls-keystore-file=<graphqlTlsKeystoreFile>
Path to the TLS keystore file for GraphQL HTTP service
--graphql-tls-keystore-password-file=<graphqlTlsKeystorePasswordFile>
Path to the file containing the password for the TLS keystore
--graphql-tls-truststore-file=<graphqlTlsTruststoreFile>
Path to the TLS truststore file for GraphQL HTTP service
--graphql-tls-truststore-password-file=<graphqlTlsTruststorePasswordFile>
Path to the file containing the password for the TLS truststore
Engine JSON-RPC Options
--engine-host-allowlist=<hostname>[,<hostname>...]... or * or all
Comma separated list of hostnames to allow for ENGINE API access (applies to both HTTP and websockets), or * to
accept any host (default: localhost,127.0.0.1)
--engine-jwt-disabled Disable authentication for Engine APIs (default: false)
--engine-jwt-secret=<FILE>
Path to file containing shared secret key for JWT signature verification
--engine-rpc-enabled enable the engine api, even in the absence of merge-specific configurations.
--engine-rpc-port, --engine-rpc-http-port=<PORT>
Port to provide consensus client APIS on (default: 8551)
JSON-RPC HTTP Options
--json-pretty-print-enabled
Enable JSON pretty print format (default: false)
--rpc-http-api, --rpc-http-apis=<api name>[ {0,1}, {0,1}<api name>...]...
Comma separated list of APIs to enable on JSON-RPC HTTP service (default: [ETH, NET, WEB3])
--rpc-http-api-method-no-auth, --rpc-http-api-methods-no-auth=<api name>[ {0,1}, {0,1}<api name>...]...
Comma separated list of API methods to exclude from RPC authentication services, RPC HTTP authentication must be
enabled
--rpc-http-authentication-credentials-file=<FILE>
Storage file for JSON-RPC HTTP authentication credentials (default: null)
--rpc-http-authentication-enabled
Require authentication for the JSON-RPC HTTP service (default: false)
--rpc-http-authentication-jwt-algorithm=<rpcHttpAuthenticationAlgorithm>
Encryption algorithm used for HTTP JWT public key. Possible values are RS256, RS384, RS512, ES256, ES384, HS256,
ES512 (default: RS256)
--rpc-http-authentication-jwt-public-key-file=<FILE>
JWT public key file for JSON-RPC HTTP authentication
--rpc-http-cors-origins=<rpcHttpCorsAllowedOrigins>
Comma separated origin domain URLs for CORS validation (default: none)
--rpc-http-enabled Set to start the JSON-RPC HTTP service (default: false)
--rpc-http-host=<HOST> Host for JSON-RPC HTTP to listen on (default: 127.0.0.1)
--rpc-http-max-active-connections=<rpcHttpMaxConnections>
Maximum number of HTTP connections allowed for JSON-RPC (default: 80). Once this limit is reached, incoming
connections will be rejected.
--rpc-http-max-batch-size=<INTEGER>
Specifies the maximum number of requests in a single RPC batch request via RPC. -1 specifies no limit (default:
1024)
--rpc-http-max-request-content-length=<LONG>
Specifies the maximum request content length. (default: 134217728)
--rpc-http-port=<PORT> Port for JSON-RPC HTTP to listen on (default: 8545)
--rpc-http-tls-ca-clients-enabled
Enable to accept clients certificate signed by a valid CA for client authentication (default: false)
--rpc-http-tls-cipher-suite, --rpc-http-tls-cipher-suites=<rpcHttpTlsCipherSuites>[,<rpcHttpTlsCipherSuites>...]...
Comma separated list of TLS cipher suites to support
--rpc-http-tls-client-auth-enabled
Enable TLS client authentication for the JSON-RPC HTTP service (default: false)
--rpc-http-tls-enabled Enable TLS for the JSON-RPC HTTP service (default: false)
--rpc-http-tls-keystore-file=<FILE>
Keystore (PKCS#12) containing key/certificate for the JSON-RPC HTTP service. Required if TLS is enabled.
--rpc-http-tls-keystore-password-file=<FILE>
File containing password to unlock keystore for the JSON-RPC HTTP service. Required if TLS is enabled.
--rpc-http-tls-known-clients-file=<FILE>
Path to file containing clients certificate common name and fingerprint for client authentication
--rpc-http-tls-protocol, --rpc-http-tls-protocols=<rpcHttpTlsProtocols>[,<rpcHttpTlsProtocols>...]...
Comma separated list of TLS protocols to support (default: [TLSv1.3, TLSv1.2])
--rpc-http-tls-truststore-file=<FILE>
Path to the truststore file for the JSON-RPC HTTP service.
--rpc-http-tls-truststore-password-file=<FILE>
Path to the file containing the password for the truststore.
JSON-RPC Websocket Options
--rpc-ws-api, --rpc-ws-apis=<api name>[ {0,1}, {0,1}<api name>...]...
Comma separated list of APIs to enable on JSON-RPC WebSocket service (default: [ETH, NET, WEB3])
--rpc-ws-api-method-no-auth, --rpc-ws-api-methods-no-auth=<api name>[ {0,1}, {0,1}<api name>...]...
Comma separated list of RPC methods to exclude from RPC authentication services, RPC WebSocket authentication must
be enabled
--rpc-ws-authentication-credentials-file=<FILE>
Storage file for JSON-RPC WebSocket authentication credentials (default: null)
--rpc-ws-authentication-enabled
Require authentication for the JSON-RPC WebSocket service (default: false)
--rpc-ws-authentication-jwt-algorithm=<rpcWebsocketsAuthenticationAlgorithm>
Encryption algorithm used for Websockets JWT public key. Possible values are RS256, RS384, RS512, ES256, ES384,
HS256, ES512 (default: RS256)
--rpc-ws-authentication-jwt-public-key-file=<FILE>
JWT public key file for JSON-RPC WebSocket authentication
--rpc-ws-enabled Set to start the JSON-RPC WebSocket service (default: false)
--rpc-ws-host=<HOST> Host for JSON-RPC WebSocket service to listen on (default: null)
--rpc-ws-max-active-connections=<rpcWsMaxConnections>
Maximum number of WebSocket connections allowed for JSON-RPC (default: 80). Once this limit is reached, incoming
connections will be rejected.
--rpc-ws-max-frame-size=<rpcWsMaxFrameSize>
Maximum size in bytes for JSON-RPC WebSocket frames (default: 1048576). If this limit is exceeded, the websocket
will be disconnected.
--rpc-ws-port=<PORT> Port for JSON-RPC WebSocket service to listen on (default: 8546)
--rpc-ws-ssl-cert-file=<FILE>
Path to the PEM cert file for the WebSocket RPC service
--rpc-ws-ssl-client-auth-enabled
Enable client authentication for the WebSocket RPC service
--rpc-ws-ssl-enabled Enable SSL/TLS for the WebSocket RPC service
--rpc-ws-ssl-key-file=<FILE>
Path to the PEM key file for the WebSocket RPC service
--rpc-ws-ssl-keystore-file=<FILE>
Path to the keystore file for the WebSocket RPC service
--rpc-ws-ssl-keystore-password=<PASSWORD>
Password for the WebSocket RPC keystore file
--rpc-ws-ssl-keystore-password-file=<FILE>
File containing the password for WebSocket keystore.
--rpc-ws-ssl-keystore-type=<TYPE>
Type of the WebSocket RPC keystore (JKS, PKCS12, PEM)
--rpc-ws-ssl-trustcert-file=<FILE>
Path to the PEM trustcert file for the WebSocket RPC service
--rpc-ws-ssl-truststore-file=<FILE>
Path to the truststore file for the WebSocket RPC service
--rpc-ws-ssl-truststore-password=<PASSWORD>
Password for the WebSocket RPC truststore file
--rpc-ws-ssl-truststore-password-file=<FILE>
File containing the password for WebSocket truststore.
--rpc-ws-ssl-truststore-type=<TYPE>
Type of the truststore (JKS, PKCS12, PEM)
In-Process RPC Options
Metrics Options
--metrics-category, --metrics-categories=<category name>[,<category name>...]...
Comma separated list of categories to track metrics for (default: [rpc, peers, network, permissioning,
bonsai_cache, synchronizer, process, executors, ethereum, blockchain, jvm, pruner, block_processing,
transaction_pool])
--metrics-enabled Set to start the metrics exporter (default: false)
--metrics-host=<HOST> Host for the metrics exporter to listen on (default: 127.0.0.1)
--metrics-port=<PORT> Port for the metrics exporter to listen on (default: 9545)
--metrics-protocol=<metricsProtocol>
Metrics protocol, one of PROMETHEUS, OPENTELEMETRY or NONE. (default: PROMETHEUS)
--metrics-push-enabled Enable the metrics push gateway integration (default: false)
--metrics-push-host=<HOST>
Host of the Prometheus Push Gateway for push mode (default: 127.0.0.1)
--metrics-push-interval=<INTEGER>
Interval in seconds to push metrics when in push mode (default: 15)
--metrics-push-port=<PORT>
Port of the Prometheus Push Gateway for push mode (default: 9001)
--metrics-push-prometheus-job=<metricsPrometheusJob>
Job name to use when in push mode (default: besu-client)
Permissions Options
--permissions-accounts-config-file=<accountPermissionsConfigFile>
Account permissioning config TOML file (default: a file named "permissions_config.toml" in the Besu data folder)
--permissions-accounts-config-file-enabled
Enable account level permissions (default: false)
--permissions-nodes-config-file=<nodePermissionsConfigFile>
Node permissioning config TOML file (default: a file named "permissions_config.toml" in the Besu data folder)
--permissions-nodes-config-file-enabled
Enable node level permissions (default: false)
API Configuration Options
--api-gas-price-blocks=<apiGasPriceBlocks>
Number of blocks to consider for eth_gasPrice (default: 100)
--api-gas-price-max=<apiGasPriceMax>
Maximum gas price for eth_gasPrice (default: 500000000000)
--api-gas-price-percentile=<apiGasPricePercentile>
Percentile value to measure for eth_gasPrice (default: 50.0)
--estimate-gas-tolerance-ratio=<estimateGasToleranceRatio>
Decimal ratio for eth_estimateGas tolerance (default: 0.015)
--rpc-gas-cap=<rpcGasCap>
Specifies the gasLimit cap for transaction simulation RPC methods. Must be >=0. 0 specifies no limit (default:
100000000)
--rpc-max-logs-range=<rpcMaxLogsRange>
Specifies the maximum number of blocks to retrieve logs from via RPC. Must be >=0. 0 specifies no limit (default:
5000)
--rpc-max-trace-filter-range=<maxTraceFilterRange>
Specifies the maximum number of blocks for the trace_filter method. Must be >=0. 0 specifies no limit (default:
1000)
Commands:
blocks This command provides blocks related actions.
txparse Parse input transactions and return the sender, or an error.
public-key This command provides node public key related actions.
password This command provides password related actions.
rlp This command provides RLP data related actions.
operator Operator related actions such as generating configuration and caches.
validate-config This command provides basic Besu config validation (syntax only).
storage This command provides storage related actions.
Besu is licensed under the Apache License 2.0
To get started quickly, just choose a network to sync and a profile to run with suggested defaults:
for Mainnet --network=mainnet --profile=[minimalist_staker|staker]
More info and other profiles at https://besu.hyperledger.org
[besu-25.10.0]$ 15.3 Instalando via Docker
O Besu tem uma imagem docker que pode ser executada em um container docker. Será criado um nó único sem a necessidade de instalação como fizemos com o binário.
A execução padrão sem parâmetros irá conectar à rede Ethereum Mainnet.
$ docker run hyperledger/besu:latest
[rag@backporting ~]$ docker run hyperledger/besu:latest
Unable to find image 'hyperledger/besu:latest' locally
latest: Pulling from hyperledger/besu
e100f84c0e40: Pull complete
165b2fa225f7: Pull complete
4b3ffd8ccb52: Pull complete
4f4fb700ef54: Pull complete
4547722f10c1: Pull complete
66a06c29aa7b: Pull complete
Digest: sha256:11dd3a2f44ad1cafb39cbe27d6ee57b053733c257812cc8a0264ade9e6cc0778
Status: Downloaded newer image for hyperledger/besu:latest
2025-10-23 13:56:44.517+0000 | main | INFO | Besu | Starting Besu
2025-10-23 13:56:44.820+0000 | main | WARN | Besu | --rpc-http-host has been ignored because --rpc-http-enabled was not defined on the command line.
2025-10-23 13:56:44.822+0000 | main | WARN | Besu | --rpc-ws-host has been ignored because --rpc-ws-enabled was not defined on the command line.
2025-10-23 13:56:44.832+0000 | main | WARN | Besu | --graphql-http-host has been ignored because --graphql-http-enabled was not defined on the command line.
2025-10-23 13:56:44.939+0000 | main | INFO | Besu | RPC HTTP JSON-RPC config: JsonRpcConfiguration{enabled=false, port=8545, host=0.0.0.0, corsAllowedDomains=[], hostsAllowlist=[localhost, 127.0.0.1], rpcApis=[ETH, NET, WEB3], authenticationEnabled=false, authenticationCredentialsFile=null, authenticationPublicKeyFile=null, tlsConfiguration=Optional.empty, httpTimeoutSec=30, maxActiveConnections=80, maxBatchSize=1024}
2025-10-23 13:56:44.943+0000 | main | WARN | Besu | --rpc-http-host has been ignored because --rpc-http-enabled was not defined on the command line.
2025-10-23 13:56:44.943+0000 | main | WARN | Besu | Engine API authentication enabled without key file. Expect ephemeral jwt.hex file in datadir
2025-10-23 13:56:44.944+0000 | main | INFO | Besu | Engine JSON-RPC config: JsonRpcConfiguration{enabled=true, port=8551, host=0.0.0.0, corsAllowedDomains=[], hostsAllowlist=[localhost, 127.0.0.1], rpcApis=[ENGINE, ETH], authenticationEnabled=true, authenticationCredentialsFile=null, authenticationPublicKeyFile=null, tlsConfiguration=Optional.empty, httpTimeoutSec=30, maxActiveConnections=80, maxBatchSize=1024}
2025-10-23 13:56:44.956+0000 | main | INFO | Besu | Connecting to 0 static nodes.
2025-10-23 13:56:45.075+0000 | main | INFO | Besu |
####################################################################################################
# #
# Besu version 25.10.0 #
# #
# Configuration: #
# Network: Mainnet #
# Network Id: 1 #
# Data storage: Bonsai #
# Sync mode: Snap #
# Sync min peers: 5 #
# Engine APIs: ENGINE,ETH #
# Engine port: 8551 #
# Engine JWT: /opt/besu/jwt.hex #
# Using LAYERED transaction pool implementation #
# Using STACKED worldstate update mode #
# Opcode optimizations enabled #
# Parallel transaction processing enabled #
# Limit trie logs enabled: retention: 512; prune window: 5000 #
# Target Gas Limit: 45M #
# #
# Host: #
# Java: openjdk-java-21 #
# Maximum heap size: 1.86 GB #
# OS: linux-x86_64 #
# glibc: 2.39 #
# jemalloc: 5.3.0-0-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c #
# Total memory: 7.43 GB #
# CPU cores: 16 #
# #
# Plugin Registration Summary: #
# No plugins have been registered. #
# TOTAL = 0 of 0 plugins successfully registered. #
# #
####################################################################################################
2025-10-23 13:56:45.076+0000 | main | INFO | Besu | Security Module: localfile
2025-10-23 13:56:45.077+0000 | main | INFO | VersionMetadata | Lookup version metadata file in data directory: /opt/besu
2025-10-23 13:56:45.078+0000 | main | INFO | VersionMetadata | No version data detected. Writing Besu version 25.10.0 to metadata file
2025-10-23 13:56:45.139+0000 | main | INFO | Besu | Using the native implementation of alt bn128
2025-10-23 13:56:45.140+0000 | main | INFO | Besu | Using the Java implementation of modexp
2025-10-23 13:56:45.140+0000 | main | INFO | Besu | Using the native implementation of the signature algorithm
2025-10-23 13:56:45.143+0000 | main | INFO | Besu | Using the native implementation of the blake2bf algorithm
2025-10-23 13:56:45.205+0000 | main | INFO | Besu | Using the native BoringSSL implementation of p256verify
2025-10-23 13:56:45.212+0000 | main | INFO | KZGPointEvalPrecompiledContract | Loading network trusted setup from classpath resource /kzg-trusted-setups/mainnet.txt
2025-10-23 13:56:47.382+0000 | main | INFO | KeyPairUtil | Generated new secp256k1 public key 0xee6903bbd51c09d9ec9828e3145ab7d104c1099bc4b3f7946ccc24b8033571d68c2edec9547b6d2fcc35c1c251e89722ab5757211758b5db7f48e757ae7dc2a3 and stored it to /opt/besu/key
2025-10-23 13:56:47.566+0000 | main | INFO | ProtocolScheduleBuilder | Protocol schedule created with milestones: [Frontier:0, Homestead:1150000, DAO Recovery Init:1920000, DAO Recovery Transition:1920001, Homestead:1920010, Tangerine Whistle:2463000, Spurious Dragon:2675000, Byzantium:4370000, Petersburg:7280000, Istanbul:9069000, Muir Glacier:9200000, Berlin:12244000, London:12965000, Arrow Glacier:13773000, Gray Glacier:15050000, Shanghai:1681338455, Cancun:1710338135, Prague:1746612311]
2025-10-23 13:56:47.580+0000 | main | INFO | ProtocolScheduleBuilder | Protocol schedule created with milestones: [Paris:0, Paris:1150000, Paris:1920000, Paris:1920001, Paris:1920010, Paris:2463000, Paris:2675000, Paris:4370000, Paris:7280000, Paris:9069000, Paris:9200000, Paris:12244000, Paris:12965000, Paris:13773000, Paris:15050000, Shanghai:1681338455, Cancun:1710338135, Prague:1746612311]
2025-10-23 13:56:47.589+0000 | main | INFO | RocksDBKeyValueStorageFactory | No existing database at /opt/besu. Using default metadata for new db versionedStorageFormat=BaseVersionedStorageFormat{format=BONSAI, version=3}
2025-10-23 13:56:47.895+0000 | main | INFO | FlatDbStrategyProvider | Flat db mode found FULL
2025-10-23 13:56:47.899+0000 | main | INFO | FlatDbStrategyProvider | DB mode with code stored using code hash enabled = true
2025-10-23 13:56:47.915+0000 | main | INFO | FlatDbStrategyProvider | Flat db mode found FULL
2025-10-23 13:56:47.917+0000 | main | INFO | FlatDbStrategyProvider | DB mode with code stored using code hash enabled = true
2025-10-23 13:56:49.065+0000 | main | INFO | TransactionPoolFactory | Transaction pool disabled while initial sync in progress
2025-10-23 13:56:49.070+0000 | main | INFO | EthPeers | Updating the default best peer comparator
2025-10-23 13:56:49.083+0000 | main | INFO | BesuControllerBuilder | TTD difficulty is present, creating initial sync for PoS
2025-10-23 13:56:49.125+0000 | main | INFO | TransitionBesuControllerBuilder | TTD present, creating DefaultSynchronizer that stops propagating after finalization
2025-10-23 13:56:49.159+0000 | main | INFO | TrieLogPruner | Trie log pruner queue preload starting...
2025-10-23 13:56:49.161+0000 | main | INFO | TrieLogPruner | Attempting to load first 5000 trie logs from database...
2025-10-23 13:56:49.162+0000 | main | INFO | TrieLogPruner | Trie log pruning will timeout after 30 seconds. If this is timing out, consider using `besu storage trie-log prune` subcommand, see https://besu.hyperledger.org/public-networks/how-to/bonsai-limit-trie-logs
2025-10-23 13:56:49.164+0000 | pool-10-thread-1 | INFO | TrieLogPruner | Added 1 trie logs to prune queue. Commencing pruning of eligible trie logs...
2025-10-23 13:56:49.164+0000 | pool-10-thread-1 | INFO | TrieLogPruner | Pruned 0 trie logs
2025-10-23 13:56:49.164+0000 | main | INFO | TrieLogPruner | Trie log pruner queue preload complete.
2025-10-23 13:56:49.165+0000 | main | INFO | RunnerBuilder | Resolved 4 bootnodes.
2025-10-23 13:56:49.173+0000 | main | INFO | RunnerBuilder | Detecting NAT service.
2025-10-23 13:56:49.435+0000 | main | INFO | Runner | Starting external services ...
2025-10-23 13:56:49.437+0000 | main | INFO | EngineJsonRpcService | Starting JSON-RPC service on 0.0.0.0:8551
2025-10-23 13:56:49.577+0000 | vert.x-eventloop-thread-2 | INFO | EngineJsonRpcService | JSON-RPC service started and listening on 0.0.0.0:8551
2025-10-23 13:56:49.581+0000 | main | INFO | AutoTransactionLogBloomCachingService | Starting auto transaction log bloom caching service.
2025-10-23 13:56:49.583+0000 | main | INFO | LogBloomCacheMetadata | Lookup cache metadata file in data directory: /opt/besu/caches
2025-10-23 13:56:49.600+0000 | main | INFO | Runner | Starting Ethereum main loop ...
2025-10-23 13:56:49.601+0000 | main | INFO | DockerNatManager | Starting docker NAT manager.
2025-10-23 13:56:49.732+0000 | main | INFO | NetworkRunner | Starting Network.
2025-10-23 13:56:49.736+0000 | main | INFO | DefaultP2PNetwork | Starting DNS discovery with URL enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net
2025-10-23 13:56:49.749+0000 | vert.x-virtual-thread-0 | INFO | DNSDaemon | Starting DNSDaemon for enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net, using default DNS host.
2025-10-23 13:56:49.795+0000 | nioEventLoopGroup-2-1 | INFO | RlpxAgent | P2P RLPx agent started and listening on /[0:0:0:0:0:0:0:0]:30303.
2025-10-23 13:56:49.795+0000 | main | INFO | PeerDiscoveryAgent | Starting peer discovery agent on host=0.0.0.0, port=30303. IPv6 available.
2025-10-23 13:56:49.818+0000 | vert.x-eventloop-thread-2 | INFO | VertxPeerDiscoveryAgent | Started peer discovery agent successfully, on effective host=0:0:0:0:0:0:0:0 and port=30303
2025-10-23 13:56:49.820+0000 | vert.x-eventloop-thread-2 | INFO | PeerDiscoveryAgent | P2P peer discovery agent started and listening on /[0:0:0:0:0:0:0:0]:30303
2025-10-23 13:56:49.888+0000 | vert.x-eventloop-thread-2 | INFO | PeerDiscoveryAgent | Writing node record to disk. NodeRecord{seq=1, publicKey=0x03ee6903bbd51c09d9ec9828e3145ab7d104c1099bc4b3f7946ccc24b8033571d6, udpAddress=Optional[/127.0.0.1:30303], tcpAddress=Optional[/127.0.0.1:30303], udp6Address=Optional.empty, tcp6Address=Optional.empty, asBase64=-Jq4QMgJAr2qjtyvYDhcZ3gwnhwJ-ulEmShESV74ScZgtIylVHnHsOpaguKvRyQFovxn_95lsrhPVDtzV7_og9rKaJ0Bg2V0aMrJhPxk7ASDEYwwgmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQPuaQO71RwJ2eyYKOMUWrfRBMEJm8Sz95RszCS4AzVx1oN0Y3CCdl-DdWRwgnZf, nodeId=0xf01aed05f072437bf9b5392501933c4a8a51bb44dc9fac3ee86752167fb63951, customFields={tcp=30303, udp=30303, eth=[[0xfc64ec04, 0x118c30]], id=V4, ip=0x7f000001, secp256k1=0x03ee6903bbd51c09d9ec9828e3145ab7d104c1099bc4b3f7946ccc24b8033571d6}}
2025-10-23 13:56:49.936+0000 | main | INFO | DefaultP2PNetwork | Enode URL enode://ee6903bbd51c09d9ec9828e3145ab7d104c1099bc4b3f7946ccc24b8033571d68c2edec9547b6d2fcc35c1c251e89722ab5757211758b5db7f48e757ae7dc2a3@127.0.0.1:30303
2025-10-23 13:56:49.937+0000 | main | INFO | DefaultP2PNetwork | Node address 0x01933c4a8a51bb44dc9fac3ee86752167fb63951
2025-10-23 13:56:49.951+0000 | main | INFO | NetworkRunner | Supported capabilities: [eth/68, eth/69], [snap/1]
2025-10-23 13:56:49.951+0000 | main | INFO | DefaultSynchronizer | Starting synchronizer.
2025-10-23 13:56:49.954+0000 | main | INFO | SnapSyncDownloader | Starting pivot-based sync
2025-10-23 13:56:49.961+0000 | main | INFO | Runner | Ethereum main loop is up.
^C
Session terminated, killing shell...2025-10-23 13:57:04.156+0000 | BesuCommand-Shutdown-Hook | INFO | DefaultSynchronizer | Stopping synchronizer
2025-10-23 13:57:04.157+0000 | BesuCommand-Shutdown-Hook | INFO | SnapSyncDownloader | Stopping sync
2025-10-23 13:57:04.160+0000 | BesuCommand-Shutdown-Hook | INFO | NetworkRunner | Stopping Network.
2025-10-23 13:57:04.160+0000 | BesuCommand-Shutdown-Hook | INFO | DNSDaemon | Stopping DNSDaemon for enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net
2025-10-23 13:57:04.166+0000 | BesuCommand-Shutdown-Hook | INFO | EthProtocolManager | Stopping eth Subprotocol.
2025-10-23 13:57:04.267+0000 | BesuCommand-Shutdown-Hook | INFO | EthProtocolManager | eth Subprotocol stopped.
2025-10-23 13:57:04.267+0000 | BesuCommand-Shutdown-Hook | INFO | NetworkRunner | Network stopped.
2025-10-23 13:57:04.268+0000 | BesuCommand-Shutdown-Hook | INFO | AutoTransactionLogBloomCachingService | Shutting down Auto transaction logs caching service.
2025-10-23 13:57:04.268+0000 | BesuCommand-Shutdown-Hook | INFO | DockerNatManager | Stopping docker NAT manager.
2025-10-23 13:57:04.272+0000 | vert.x-virtual-thread-15 | INFO | DNSDaemon | Stopping DNSDaemon for enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net
...killed.
$ Se já tinha baixado a versão latest anterioremente, utilize o comando para atualizá-la:
$ docker pull hyperledger/besu:latest
latest: Pulling from hyperledger/besu
Digest: sha256:11dd3a2f44ad1cafb39cbe27d6ee57b053733c257812cc8a0264ade9e6cc0778
Status: Image is up to date for hyperledger/besu:latest
docker.io/hyperledger/besu:latest
$ docker run hyperledger/besu:latestOutras imagens docker estão disponíveis em https://hub.docker.com/r/hyperledger/besu/tags.
15.4 Instalação via Código Fonte
Se for necessário intalar a última versão de desenvolvimetno ou um commit específico, podemos compilar diretamente dos fontes, instruções podem ser vistas no wiki.
16 Executando com uma Rede de Teste
Iremos subir o nó etherum com a rede de teste sepolia e para interagirmos via API JSON-RPC é necessário habilitar o suporte com a opção --rpc-http-enabled, assim podemos usar o cURL para executar chamadas para métodos da API JSON-RPC. Indicamos na linha de comando que a rede é a Sepolia com o parâmetro --network=sepolia e onde os dados serão salvos --data-path=./sepolia, neste exemplo os dados serão salvos no diretório local em um diretório sepolia.
bin/besu –network=sepolia –data-path=~/besu-data/sepolia –rpc-http-enabled=true –rpc-http-host=0.0.0.0 –rpc-ws-enabled=true –rpc-ws-host=0.0.0.0 –host-allowlist=172.18.1.213,127.0.0.1,localhost –engine-host-allowlist=172.18.1.213,127.0.0.1,localhost –engine-rpc-enabled –engine-jwt-secret=/home/rag/besu-data/sepolia/jwtsecret.hex
$ bin/besu --rpc-http-enabled --network=sepolia --data-path=~/besu-data/sepolia
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by com.sun.jna.Native in an unnamed module (file:/home/rag/besu-25.10.0/lib/jna-5.16.0.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
2025-10-23 19:33:34.108-0300 | main | INFO | Besu | Starting Besu
2025-10-23 19:33:34.360-0300 | main | INFO | Besu | RPC HTTP JSON-RPC config: JsonRpcConfiguration{enabled=true, port=8545, host=127.0.0.1, corsAllowedDomains=[], hostsAllowlist=[localhost, 127.0.0.1], rpcApis=[ETH, NET, WEB3], authenticationEnabled=false, authenticationCredentialsFile=null, authenticationPublicKeyFile=null, tlsConfiguration=Optional.empty, httpTimeoutSec=30, maxActiveConnections=80, maxBatchSize=1024}
2025-10-23 19:33:34.361-0300 | main | WARN | Besu | Engine API authentication enabled without key file. Expect ephemeral jwt.hex file in datadir
2025-10-23 19:33:34.361-0300 | main | INFO | Besu | Engine JSON-RPC config: JsonRpcConfiguration{enabled=true, port=8551, host=127.0.0.1, corsAllowedDomains=[], hostsAllowlist=[localhost, 127.0.0.1], rpcApis=[ENGINE, ETH], authenticationEnabled=true, authenticationCredentialsFile=null, authenticationPublicKeyFile=null, tlsConfiguration=Optional.empty, httpTimeoutSec=30, maxActiveConnections=80, maxBatchSize=1024}
2025-10-23 19:33:34.371-0300 | main | INFO | Besu | Connecting to 0 static nodes.
2025-10-23 19:33:34.468-0300 | main | INFO | Besu |
####################################################################################################
# #
# Besu version 25.10.0 #
# #
# Configuration: #
# Network: Sepolia #
# Network Id: 11155111 #
# Data storage: Bonsai #
# Sync mode: Snap #
# Sync min peers: 5 #
# RPC HTTP APIs: ETH,NET,WEB3 #
# RPC HTTP port: 8545 #
# Engine APIs: ENGINE,ETH #
# Engine port: 8551 #
# Engine JWT: /home/rag/besu-25.10.0/~/besu-data/sepolia/jwt.hex #
# Using LAYERED transaction pool implementation #
# Using STACKED worldstate update mode #
# Opcode optimizations enabled #
# Parallel transaction processing enabled #
# Limit trie logs enabled: retention: 512; prune window: 5000 #
# Target Gas Limit: 60M #
# #
# Host: #
# Java: openjdk-java-25 #
# Maximum heap size: 7,68 GB #
# OS: linux-x86_64 #
# glibc: 2.42 #
# jemalloc: 5.3.0-0-g54eaed1d8b56b1aa528be3bdd1877e59c56fa90c #
# Total memory: 30,72 GB #
# CPU cores: 16 #
# #
# Plugin Registration Summary: #
# No plugins have been registered. #
# TOTAL = 0 of 0 plugins successfully registered. #
# #
####################################################################################################
2025-10-23 19:33:34.469-0300 | main | INFO | Besu | Security Module: localfile
2025-10-23 19:33:34.469-0300 | main | INFO | VersionMetadata | Lookup version metadata file in data directory: /home/rag/besu-25.10.0/~/besu-data/sepolia
2025-10-23 19:33:34.470-0300 | main | INFO | VersionMetadata | Data directory /home/rag/besu-25.10.0/~/besu-data/sepolia does not exist - creating it
2025-10-23 19:33:34.470-0300 | main | INFO | VersionMetadata | No version data detected. Writing Besu version 25.10.0 to metadata file
2025-10-23 19:33:34.513-0300 | main | INFO | Besu | Using the native implementation of alt bn128
2025-10-23 19:33:34.514-0300 | main | INFO | Besu | Using the Java implementation of modexp
2025-10-23 19:33:34.514-0300 | main | INFO | Besu | Using the native implementation of the signature algorithm
2025-10-23 19:33:34.516-0300 | main | INFO | Besu | Using the native implementation of the blake2bf algorithm
2025-10-23 19:33:34.567-0300 | main | INFO | Besu | Using the native BoringSSL implementation of p256verify
2025-10-23 19:33:34.574-0300 | main | INFO | KZGPointEvalPrecompiledContract | Loading network trusted setup from classpath resource /kzg-trusted-setups/mainnet.txt
2025-10-23 19:33:36.540-0300 | main | INFO | KeyPairUtil | Generated new secp256k1 public key 0xf6ab47283a77800bddccd2a973c251b8a1807073fa044c5d36c453c4a3dc078d3fc32dbeee105eef51a865a33dd13e506cebc859c487ae25ba84f987ded6522e and stored it to /home/rag/besu-25.10.0/~/besu-data/sepolia/key
2025-10-23 19:33:36.696-0300 | main | INFO | ProtocolScheduleBuilder | Protocol schedule created with milestones: [London:0, Paris:1735371, Shanghai:1677557088, Cancun:1706655072, Prague:1741159776, Osaka:1760427360, BPO1:1761017184, BPO2:1761607008]
2025-10-23 19:33:36.720-0300 | main | INFO | ProtocolScheduleBuilder | Protocol schedule created with milestones: [Paris:0, Paris:1735371, Shanghai:1677557088, Cancun:1706655072, Prague:1741159776, Osaka:1760427360, BPO1:1761017184, BPO2:1761607008]
2025-10-23 19:33:36.722-0300 | main | INFO | RocksDBKeyValueStorageFactory | No existing database at /home/rag/besu-25.10.0/~/besu-data/sepolia. Using default metadata for new db versionedStorageFormat=BaseVersionedStorageFormat{format=BONSAI, version=3}
2025-10-23 19:33:36.891-0300 | main | INFO | FlatDbStrategyProvider | Flat db mode found FULL
2025-10-23 19:33:36.893-0300 | main | INFO | FlatDbStrategyProvider | DB mode with code stored using code hash enabled = true
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by com.google.common.cache.Striped64 (file:/home/rag/besu-25.10.0/lib/guava-33.4.2-jre.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.common.cache.Striped64
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
2025-10-23 19:33:36.906-0300 | main | INFO | FlatDbStrategyProvider | Flat db mode found FULL
2025-10-23 19:33:36.906-0300 | main | INFO | FlatDbStrategyProvider | DB mode with code stored using code hash enabled = true
2025-10-23 19:33:37.010-0300 | main | INFO | TransactionPoolFactory | Transaction pool disabled while initial sync in progress
2025-10-23 19:33:37.013-0300 | main | INFO | EthPeers | Updating the default best peer comparator
2025-10-23 19:33:37.020-0300 | main | INFO | BesuControllerBuilder | TTD difficulty is present, creating initial sync for PoS
2025-10-23 19:33:37.043-0300 | main | INFO | TransitionBesuControllerBuilder | TTD present, creating DefaultSynchronizer that stops propagating after finalization
2025-10-23 19:33:37.065-0300 | main | INFO | TrieLogPruner | Trie log pruner queue preload starting...
2025-10-23 19:33:37.066-0300 | main | INFO | TrieLogPruner | Attempting to load first 5000 trie logs from database...
2025-10-23 19:33:37.068-0300 | main | INFO | TrieLogPruner | Trie log pruning will timeout after 30 seconds. If this is timing out, consider using `besu storage trie-log prune` subcommand, see https://besu.hyperledger.org/public-networks/how-to/bonsai-limit-trie-logs
2025-10-23 19:33:37.070-0300 | pool-10-thread-1 | INFO | TrieLogPruner | Added 1 trie logs to prune queue. Commencing pruning of eligible trie logs...
2025-10-23 19:33:37.070-0300 | pool-10-thread-1 | INFO | TrieLogPruner | Pruned 0 trie logs
2025-10-23 19:33:37.071-0300 | main | INFO | TrieLogPruner | Trie log pruner queue preload complete.
2025-10-23 19:33:37.071-0300 | main | INFO | RunnerBuilder | Resolved 5 bootnodes.
2025-10-23 19:33:37.078-0300 | main | INFO | RunnerBuilder | Detecting NAT service.
2025-10-23 19:33:37.263-0300 | main | INFO | Runner | Starting external services ...
2025-10-23 19:33:37.264-0300 | main | INFO | JsonRpcHttpService | Starting JSON-RPC service on 127.0.0.1:8545
2025-10-23 19:33:37.336-0300 | vert.x-eventloop-thread-1 | INFO | JsonRpcHttpService | JSON-RPC service started and listening on 127.0.0.1:8545
2025-10-23 19:33:37.336-0300 | main | INFO | EngineJsonRpcService | Starting JSON-RPC service on 127.0.0.1:8551
2025-10-23 19:33:37.340-0300 | vert.x-eventloop-thread-1 | INFO | EngineJsonRpcService | JSON-RPC service started and listening on 127.0.0.1:8551
2025-10-23 19:33:37.341-0300 | main | INFO | AutoTransactionLogBloomCachingService | Starting auto transaction log bloom caching service.
2025-10-23 19:33:37.342-0300 | main | INFO | LogBloomCacheMetadata | Lookup cache metadata file in data directory: /home/rag/besu-25.10.0/~/besu-data/sepolia/caches
2025-10-23 19:33:37.351-0300 | main | INFO | Runner | Starting Ethereum main loop ...
2025-10-23 19:33:37.351-0300 | main | INFO | NatService | No NAT environment detected so no service could be started
2025-10-23 19:33:37.351-0300 | main | INFO | NetworkRunner | Starting Network.
2025-10-23 19:33:37.353-0300 | main | INFO | DefaultP2PNetwork | Starting DNS discovery with URL enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.sepolia.ethdisco.net
2025-10-23 19:33:37.359-0300 | vert.x-virtual-thread-0 | INFO | DNSDaemon | Starting DNSDaemon for enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.sepolia.ethdisco.net, using default DNS host.
2025-10-23 19:33:37.376-0300 | nioEventLoopGroup-2-1 | INFO | RlpxAgent | P2P RLPx agent started and listening on /[0:0:0:0:0:0:0:0]:30303.
2025-10-23 19:33:37.377-0300 | main | INFO | PeerDiscoveryAgent | Starting peer discovery agent on host=0.0.0.0, port=30303. IPv6 available.
2025-10-23 19:33:37.384-0300 | vert.x-eventloop-thread-1 | INFO | VertxPeerDiscoveryAgent | Started peer discovery agent successfully, on effective host=0:0:0:0:0:0:0:0 and port=30303
2025-10-23 19:33:37.385-0300 | vert.x-eventloop-thread-1 | INFO | PeerDiscoveryAgent | P2P peer discovery agent started and listening on /[0:0:0:0:0:0:0:0]:30303
2025-10-23 19:33:37.427-0300 | vert.x-eventloop-thread-1 | INFO | PeerDiscoveryAgent | Writing node record to disk. NodeRecord{seq=1, publicKey=0x02f6ab47283a77800bddccd2a973c251b8a1807073fa044c5d36c453c4a3dc078d, udpAddress=Optional[/127.0.0.1:30303], tcpAddress=Optional[/127.0.0.1:30303], udp6Address=Optional.empty, tcp6Address=Optional.empty, asBase64=-Jq4QMAqqn12r5Z7v-e8c9CpnkeQPoZ2QhwzLnjf7r-EG1GQenWamAqCua02baEca07o0Byi_v5S_WxaWUtrmdnI0mwBg2V0aMrJhP4zZueDGnrLgmlkgnY0gmlwhH8AAAGJc2VjcDI1NmsxoQL2q0coOneAC93M0qlzwlG4oYBwc_oETF02xFPEo9wHjYN0Y3CCdl-DdWRwgnZf, nodeId=0x6a35837967c1028a494589f7e13a07eec9d90fa1f1a9b38b54fa2044b5d9fc88, customFields={tcp=30303, udp=30303, eth=[[0xfe3366e7, 0x1a7acb]], id=V4, ip=0x7f000001, secp256k1=0x02f6ab47283a77800bddccd2a973c251b8a1807073fa044c5d36c453c4a3dc078d}}
2025-10-23 19:33:37.448-0300 | main | INFO | DefaultP2PNetwork | Enode URL enode://f6ab47283a77800bddccd2a973c251b8a1807073fa044c5d36c453c4a3dc078d3fc32dbeee105eef51a865a33dd13e506cebc859c487ae25ba84f987ded6522e@127.0.0.1:30303
2025-10-23 19:33:37.448-0300 | main | INFO | DefaultP2PNetwork | Node address 0xe13a07eec9d90fa1f1a9b38b54fa2044b5d9fc88
2025-10-23 19:33:37.454-0300 | main | INFO | NetworkRunner | Supported capabilities: [eth/68, eth/69], [snap/1]
2025-10-23 19:33:37.454-0300 | main | INFO | DefaultSynchronizer | Starting synchronizer.
2025-10-23 19:33:37.455-0300 | main | INFO | SnapSyncDownloader | Starting pivot-based sync
2025-10-23 19:33:37.458-0300 | main | INFO | Runner | Ethereum main loop is up.
2025-10-23 19:34:37.460-0300 | EthScheduler-Timer-0 | INFO | PivotSelectorFromSafeBlock | Waiting for consensus client, this may be because your consensus client is still syncingEm outro terminal iremos interagir com o nó besu para verificar se está funcionando, iremos chamar o método que devolve o id da rede em execução, o eth_chainId.
$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}' localhost:8545/ -H "Content-Type: application/json"
{"jsonrpc":"2.0","id":1,"result":"0xaa36a7"}A resposta 0xaa36a7 como eth_chainId é equivalente ao id da rede Sepolia 11155111.
O método eth_syncing retorna os blocos iniciais, corrente e último bloco sincronizado.
$ curl -X POST --data '{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}' localhost:8545/ -H "Content-Type: application/json"
{"jsonrpc":"2.0","id":1,"result":false}O resultado false indica que o nó que recém criamos ainda não está sincronizando. Quando estiver sincronizando a resposta semelhante a esta será devolvida:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"startingBlock": "0x0",
"currentBlock": "0x2d0",
"highestBlock": "0x66c0"
}
}$ bin/besu --network=sepolia --data-path=/home/rag/besu-data/sepolia --rpc-http-enabled --rpc-http-cors-origins="*" --rpc-ws-enabled=true --p2p-host=127.0.0.1 --host-allowlist="*" --engine-host-allowlist="*" --engine-rpc-enabled --engine-jwt-secret=/home/rag/besu-data/sepolia/jwt.hex16.1 Instalando o Teku
O Teku é um cliente de consenso Ethereum open-source que contém um node beacon e uma implementação de cliente de validação completo.
$ wget https://artifacts.consensys.net/public/teku/raw/names/teku.tar.gz/versions/25.10.0/teku-25.10.0.tar.gz
$ tar xzvf teku-25.10.0.tar.gz
teku-25.10.0/
teku-25.10.0/LICENSE
teku-25.10.0/teku.autocomplete.sh
teku-25.10.0/lib/
teku-25.10.0/lib/teku-25.10.0.jar
...
teku-25.10.0/bin/
teku-25.10.0/bin/teku
teku-25.10.0/bin/teku.bat
teku-25.10.0/licenses/
...
teku-25.10.0/licenses/websocket-servlet-11.0.25.jar/META-INF/
teku-25.10.0/licenses/websocket-servlet-11.0.25.jar/META-INF/LICENSE
teku-25.10.0/licenses/websocket-servlet-11.0.25.jar/META-INF/NOTICE.txt
$O Teku também tem a opção de execução via docker:
$ docker pull consensys/teku:25.10-jdk24Executando o Teku para sincronizar o estado inicial com um checkpoint https://beaconstate.ethstaker.cc/.
$ bin/teku --network=sepolia --ee-endpoint=http://localhost:8551 --ee-jwt-secret-file=/home/rag/besu-data/sepolia/jwtsecret.hex --metrics-enabled=true --rest-api-enabled=true --p2p-advertised-ip=127.0.0.1 --checkpoint-sync-url=https://beaconstate.ethstaker.cc/
20:13:59.725 INFO - Teku version: teku/v25.10.0/linux-x86_64/-archlinux-openjdk64bitservervm-java-25
20:13:59.730 INFO - This software is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
20:13:59.859 INFO - Configuration | Network: sepolia, Storage Mode: MINIMAL
20:13:59.859 INFO - Host Configuration | Maximum Heap Size: 7,68 GB, Total Memory: 30,72 GB, CPU Cores: 16
20:13:59.860 INFO - Rest Api Configuration | Enabled: true, Listen Address: 127.0.0.1, Port: 5051, Allow: [127.0.0.1, localhost]
20:13:59.860 INFO - Validator Api Configuration | Enabled: false
20:14:00.392 INFO - Loading 0 validator keys...
20:14:00.392 INFO - Storing beacon chain data in: /home/rag/.local/share/teku/beacon
20:14:00.395 INFO - Loaded 0 Validators:
20:14:00.633 INFO - Initializing storage
20:14:00.636 INFO - Empty storage. Initialization complete.
20:14:00.637 INFO - Loading initial state from https://beaconstate.ethstaker.cc/eth/v2/debug/beacon/states/finalized
20:14:30.959 WARN - Failed to load initial state from https://beaconstate.ethstaker.cc/eth/v2/debug/beacon/states/finalized
20:14:30.959 INFO - Loading initial state from https://beaconstate.ethstaker.cc/eth/v2/debug/beacon/states/genesis
20:14:32.335 INFO - Loaded initial state at epoch 0 (state root = 0x7e76880eb67bbdc86250aa578958e9d0675e64e714337855204fb5abaaf82c2b, block root = 0x4d611d5b93fdab69013a7f0a2f961caca0c853f87cfe9595fe50038163079360, block slot = 0).
The fork from the initial-state (Fork{epoch=0, previous_version=0x00000000, current_version=0x00000000}) does not match the configured fork schedule (Fork{epoch=0, previous_version=0x90000069, current_version=0x90000069}).
Please check that network in configuration matches the loaded state.
To display full help:
teku [COMMAND] --help
$ Executando o Teku após a obtenção do estado inicial:
$ bin/teku --network=sepolia --ee-endpoint=http://localhost:8551 --ee-jwt-secret-file=/home/rag/besu-data/sepolia/jwtsecret.hex --metrics-enabled=true --rest-api-enabled=true --p2p-advertised-ip=127.0.0.1 --ignore-weak-subjectivity-period-enabled
20:18:16.827 INFO - Teku version: teku/v25.10.0/linux-x86_64/-archlinux-openjdk64bitservervm-java-25
20:18:16.832 INFO - This software is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
20:18:16.942 INFO - Configuration | Network: sepolia, Storage Mode: MINIMAL
20:18:16.943 INFO - Host Configuration | Maximum Heap Size: 7,68 GB, Total Memory: 30,72 GB, CPU Cores: 16
20:18:16.943 INFO - Rest Api Configuration | Enabled: true, Listen Address: 127.0.0.1, Port: 5051, Allow: [127.0.0.1, localhost]
20:18:16.943 INFO - Validator Api Configuration | Enabled: false
20:18:17.386 INFO - Storing beacon chain data in: /home/rag/.local/share/teku/beacon
20:18:17.387 INFO - Loading 0 validator keys...
20:18:17.392 INFO - Loaded 0 Validators:
20:18:17.611 INFO - Initializing storage
20:18:17.613 INFO - Empty storage. Initialization complete.
20:18:17.615 WARN - Ignoring weak subjectivity period check (--ignore-weak-subjectivity-period-enabled). Syncing from outside of the weak subjectivity period is considered UNSAFE.
20:18:17.616 INFO - Loading initial state from https://github.com/eth-clients/merge-testnets/raw/9c873ab67b902aa676370a549129e5e91013afa3/sepolia/genesis.ssz
20:18:18.408 INFO - Loaded initial state at epoch 0 (state root = 0xfb9afe32150fa39f4b346be2519a67e2a4f5efcd50a1dc192c3f6b3d013d2798, block root = 0xfb9b64fe445f76696407e1e3cc390371edff147bf712db86db6197d4b31ede43, block slot = 0).
20:18:18.440 INFO - Genesis Event ***
Genesis state root: 0xfb9afe32150fa39f4b346be2519a67e2a4f5efcd50a1dc192c3f6b3d013d2798
Genesis block root: 0xfb9b64fe445f76696407e1e3cc390371edff147bf712db86db6197d4b31ede43
Genesis time: 2022-06-20 14:00:00 GMT
20:18:20.530 WARN - Rest API is enabled but no default fee recipient has been configured via the validators-proposer-default-fee-recipient option! It is strongly recommended to configure it to avoid possible block production failures in case the node has not been prepared for potential proposers by the Validator Client.
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by com.google.protobuf.UnsafeUtil$MemoryAccessor (file:/home/rag/teku-25.10.0/lib/protobuf-java-3.25.5.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.protobuf.UnsafeUtil$MemoryAccessor
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release
20:18:20.845 INFO - Generated new p2p private key and storing in: generated-node-key
20:18:21.120 INFO - PreGenesis Local ENR: enr:-KG4QIMGXzMDhwcln6Rg4eWJEZsajJ38AOpnMJdCx0gkJlEySTuqtSwKE_PBNuHT6ucJ8-QtvMa8Qu4nx2J_JrCgukkChGV0aDKQ0wEHeJAAAGn__________4JpZIJ2NIJpcIR_AAABiXNlY3AyNTZrMaECnpyuFPM_FSURUzm5RT0cG64uaoRldqFgShZLe0R_fUSDdGNwgiMog3VkcIIjKA
20:18:21.410 INFO - Execution Client version: Besu 25.10.0
20:18:21.415 INFO - Using graffiti watermark: "BU7c3bTKaa26". This will be appended to any user-defined graffiti or used if none is defined. Refer to validator graffiti options to customize.
20:18:21.603 INFO - Listening for connections on: /ip4/127.0.0.1/tcp/9000/p2p/16Uiu2HAm66pxuyXo7pJySEZHGr9wtwt92LcpQxn8bo1ZfeF3VS6X
20:18:21.740 INFO - Local ENR: enr:-K-4QF2fHt3vrFL4cbepI4eMbwZxrHRW5Vg7upwf0JBSJOo0FfvNR3E0K0nZnSSj317RVdRYZGlGBO7DkgJGomTR55cFg2NnY4CEZXRoMpD9MrYikAAAdQA1BAAAAAAAgmlkgnY0gmlwhH8AAAGDbmZkhHTQFFmJc2VjcDI1NmsxoQKenK4U8z8VJRFTOblFPRwbri5qhGV2oWBKFkt7RH99RIN0Y3CCIyiDdWRwgiMo
20:18:23.412 INFO - Syncing *** Slot: 8793991, Head slot: 0, Remaining slots: 8793991, Connected peers: 0
20:18:23.638 INFO - Loading deposit tree snapshot from database
20:18:23.640 INFO - Loading deposit tree snapshot from jar:file:/home/rag/teku-25.10.0/lib/teku-services-powchain-25.10.0.jar!/tech/pegasys/teku/services/powchain/sepolia.ssz
20:18:23.642 INFO - A deposit snapshot was read with 410 deposits and 0xa94f9e3098d358a5d726ec4dea9cd4597899e118fe3cbb0bf4c4ae04f10efe81 execution block hash.
20:18:23.643 INFO - Loaded deposits tree state from snapshot with 410 deposits and 0xa94f9e3098d358a5d726ec4dea9cd4597899e118fe3cbb0bf4c4ae04f10efe81 execution block hash.
20:18:23.681 INFO - Loading deposits up to Eth1 block 0
20:18:24.003 INFO - Syncing *** Slot: 8793992, Head slot: 0, Remaining slots: 8793992, Connected peers: 0
20:18:35.196 INFO - Syncing started
20:18:36.005 INFO - Syncing *** Slot: 8793993, Head slot: 0, Remaining slots: 8793993, Target chain: e4b2e6..f026 (8793920) with 7 peers, Connected peers: 7
20:18:36.005 INFO - Sync Info *** Range: 1 - 125 (5 batches), Downloading: 125 slots (5 batches), Ready: none, Batch import: waiting
20:18:48.001 INFO - Syncing *** Slot: 8793994, Head slot: 0, Remaining slots: 8793994, Target chain: e4b2e6..f026 (8793920) with 1 peers, Connected peers: 1
20:18:48.002 INFO - Sync Info *** Range: 1 - 200 (8 batches), Downloading: 125 slots (5 batches), Ready: 75 slots (3 batches), Batch import: waiting
...
20:44:38.254 INFO - Syncing started
20:44:38.501 INFO - Syncing *** Slot: 8794123, Head slot: 4350, Remaining slots: 8789773, Target chain: 039e80..eb40 (8794048) with 1 peers, Connected peers: 1
20:44:38.501 INFO - Sync Info *** Range: none, Downloading: none, Ready: none, Batch import: waiting
20:44:39.445 INFO - Syncing completedExecutando um validator:
```bash [teku-25.10.0]$ bin/teku –ee-endpoint=“http://127.0.0.1:8551” –ee-jwt-secret-file=“/home/rag/besu-data/sepolia/jwtsecret.hex” –validators-builder-registration-default-enabled=true –builder-endpoint=“http://127.0.0.1:18550” –validators-proposer-default-fee-recipient=“0x6e35733c5af9B61374A128e6F85f553aF09ff89A”
17 Relatório
O relatório deve apresentar uma descrição sobre a atividade, desenvolvimento e ferramentas.
17.1 Considerações Finais
Nesta prática desenvolvemos o conteúdo sobre Tokenização.
17.2 Leitura Recomendada
Capítulo 18: Tokenização
Capítulo 10: Tokens
18 Word Cloud




