From 6c8e4d5ddc06749b06cf73195682c96b04f2154e Mon Sep 17 00:00:00 2001 From: alexandratran Date: Mon, 9 Dec 2024 06:09:41 +0000 Subject: [PATCH] deploy: fa4232f669492687bd65aabe20cd47fcc51d8e22 --- 404.html | 4 +- assets/js/0145acbf.ca51f66f.js | 1 + assets/js/01562474.1100efd4.js | 1 + assets/js/02fd2e39.dba8976a.js | 1 + assets/js/030f9ebf.166e6313.js | 1 + assets/js/06aa37f3.92b3b331.js | 1 + assets/js/0821166d.e0ef50df.js | 1 + assets/js/083d4b51.58058e91.js | 1 + assets/js/0c3b97c4.69c0ec1a.js | 1 + assets/js/0ea635c0.5a566d7a.js | 1 + assets/js/0f663201.d73cba55.js | 1 + assets/js/12718c4a.28e34d69.js | 1 + assets/js/13034d1e.f4f5a1b7.js | 1 + assets/js/13912882.b9eb43d6.js | 1 + assets/js/16350423.b613a489.js | 1 + assets/js/166cf840.018cd6bc.js | 1 + assets/js/1719a32c.2df0602a.js | 1 + assets/js/1a78f042.c239554b.js | 1 + assets/js/1b2e0ee9.145fc4b8.js | 1 + assets/js/1b5bfdea.b747c2a4.js | 1 + assets/js/1b73c7ba.2d6cbe43.js | 1 + assets/js/1f29a5e5.374e7339.js | 1 + assets/js/2039806a.6efb1ced.js | 1 + assets/js/22dd74f7.48905444.js | 1 + assets/js/248beabf.1ac00178.js | 1 + assets/js/25537021.d20da3f5.js | 1 + assets/js/2712d2e6.6465ff23.js | 1 + assets/js/27b89368.147d1099.js | 1 + assets/js/28249022.14c69bf3.js | 1 + assets/js/297e0bb4.72f7d166.js | 1 + assets/js/2ce131d7.64d49c50.js | 1 + assets/js/2de980e5.32cc28e2.js | 1 + assets/js/306048a3.baea7df0.js | 1 + assets/js/3234314a.5a5977fe.js | 1 + assets/js/356faa2b.3d6beb99.js | 1 + assets/js/3624528b.16b77a43.js | 1 + assets/js/37906014.a7cfc71c.js | 1 + assets/js/3868ebe2.5d5924b9.js | 1 + assets/js/3917f523.69dcf3fb.js | 1 + assets/js/3a4520c6.2638a0de.js | 1 + assets/js/3aaf4567.c9190433.js | 1 + assets/js/3b05cdc2.516f1401.js | 1 + assets/js/3e86fe35.bca88889.js | 1 + assets/js/3f04f830.7e296a78.js | 1 + assets/js/43d83ec4.c39a0343.js | 1 + assets/js/46ff6f7b.6fc98e46.js | 1 + assets/js/4a41aaaf.0089b810.js | 1 + assets/js/4ba08559.c8916a1d.js | 1 + assets/js/4d94bde1.1944a60e.js | 1 + assets/js/4f63be9c.b10c965e.js | 1 + assets/js/5576e3f0.76332a7a.js | 1 + assets/js/55b6f436.85c63947.js | 1 + assets/js/563e4b8b.f5989863.js | 1 + assets/js/5af5c663.318693a4.js | 1 + assets/js/5b178458.92e3a64b.js | 1 + assets/js/5c820069.f071fa36.js | 1 + assets/js/5ec0198e.58ab1ebf.js | 1 + assets/js/66bba352.857dee58.js | 1 + assets/js/67359d90.79f2626a.js | 1 + assets/js/680b46ee.4182c1b2.js | 1 + assets/js/6c6be066.9f4be9d0.js | 1 + assets/js/6cafcc6f.15600393.js | 1 + assets/js/6d0a1147.91a82e83.js | 1 + assets/js/6e493491.e501909e.js | 1 + assets/js/6ea682ce.937b8481.js | 1 + assets/js/6f6d3344.d4f9183d.js | 1 + assets/js/714c5be8.8bc14b40.js | 1 + assets/js/715197f0.e1537fe2.js | 1 + assets/js/71635f7b.a08e5a3f.js | 1 + assets/js/71e3c29d.9a203a9a.js | 1 + assets/js/76a5e22a.fa0582ac.js | 1 + assets/js/79bb8117.da871cdc.js | 1 + assets/js/7a44c711.55fc5953.js | 1 + assets/js/7b0f9452.faa64787.js | 1 + assets/js/7b4961ca.e5b09a35.js | 1 + assets/js/7bb2e71b.cc249e11.js | 1 + assets/js/7e9c70a7.e1727144.js | 1 + assets/js/7ea61495.60fc74c7.js | 1 + assets/js/810074cd.1fafbb8c.js | 1 + assets/js/8161613e.2a25bb28.js | 1 + assets/js/84b35613.dd245543.js | 1 + assets/js/87114070.31099ec0.js | 1 + assets/js/88771ea1.0cf7abbf.js | 1 + assets/js/887b6037.879af06d.js | 1 + assets/js/88996aea.4734e667.js | 1 + assets/js/89f1fe89.8a3d9311.js | 1 + assets/js/8a886138.e319aec1.js | 1 + assets/js/8b137bfa.0a8d6cfd.js | 1 + assets/js/8b8c93ab.4cf23d97.js | 1 + assets/js/8c0ee333.baf93dfc.js | 1 + assets/js/8d677f34.bfeae8dd.js | 1 + assets/js/8ef40281.efd977be.js | 1 + assets/js/91cde904.6fcce82e.js | 1 + assets/js/91f929bc.731f780c.js | 1 + assets/js/9213a1f9.82823be8.js | 1 + assets/js/93e76459.8440837a.js | 1 + assets/js/981fdc44.3d68d69f.js | 1 + assets/js/99a5eb2e.8239cbdc.js | 1 + assets/js/9a50decc.73be5a08.js | 1 + assets/js/9bb932b9.2395ad2a.js | 1 + assets/js/9ffeb22a.aaaf724c.js | 1 + assets/js/a0f949fc.3514adf5.js | 1 + assets/js/a2bd30e6.7e3cceb2.js | 1 + assets/js/a626427b.792d2e8a.js | 1 + assets/js/a99a03ac.ff4385fe.js | 1 + assets/js/aa0c6744.d7c231cf.js | 1 + assets/js/aa612600.f8435eb7.js | 1 + assets/js/af3555a6.f0cef4d7.js | 1 + assets/js/b0eb7c42.6e5f4dae.js | 1 + assets/js/b2d12fc2.bc73913d.js | 1 + assets/js/b4b83649.e1b7333f.js | 1 + assets/js/b5388cc7.55c8c0c9.js | 1 + assets/js/b5e9b728.47acb136.js | 1 + assets/js/b658262b.9ca3c8e9.js | 1 + assets/js/b6b2f0db.6014a9b2.js | 1 + assets/js/b7759d8d.947e5d2f.js | 1 + assets/js/bbdbb161.05b13db2.js | 1 + assets/js/bc60af12.ac8f074d.js | 1 + assets/js/bc69a950.2defb99c.js | 1 + assets/js/bd3642f6.380bcf35.js | 1 + assets/js/bd4880eb.bcab1d22.js | 1 + assets/js/bea70e21.8fbd02fc.js | 1 + assets/js/c029b5c7.9727eb79.js | 1 + assets/js/c14ba340.53ca64b6.js | 1 + assets/js/c41908c3.df287b65.js | 1 + assets/js/c48436f6.06cbe96b.js | 1 + assets/js/c69ab138.94f9f036.js | 1 + assets/js/c6a4c9bf.5522a35f.js | 1 + assets/js/c6c17076.325ef5bf.js | 1 + assets/js/c8cab34c.6ecffe1d.js | 1 + assets/js/ca90dbf4.fd9387c2.js | 1 + assets/js/cdbaa4c0.fac6c6a1.js | 1 + assets/js/ce4c8b54.7b1b2a99.js | 1 + assets/js/ce515f1b.10faa8ee.js | 1 + assets/js/cf53573e.3a88b895.js | 1 + assets/js/d13d7343.179934d0.js | 1 + assets/js/d1f22a5a.52bd66a7.js | 1 + assets/js/d4c8fb26.e0b1fd46.js | 1 + assets/js/d78c9adf.6eb2b6bb.js | 1 + assets/js/d7914a50.dcb45a45.js | 1 + assets/js/d7b72fb9.e4864d29.js | 1 + assets/js/d86228ad.2c26466a.js | 1 + assets/js/d94d9a73.9d3a7ebc.js | 1 + assets/js/dbf86eb1.d639f11a.js | 1 + assets/js/dd3e5b84.b9ec0db0.js | 1 + assets/js/dd5955a1.58dbde9c.js | 1 + assets/js/dd900a84.4da1521c.js | 1 + assets/js/dfe7f568.acb49715.js | 1 + assets/js/e0a6c7d4.6ef4ed23.js | 1 + assets/js/e12df8e0.420072b0.js | 1 + assets/js/e1c9c46b.fadb9bc2.js | 1 + assets/js/e6ca27ec.6615161a.js | 1 + assets/js/e8e619e2.f1de5c95.js | 1 + assets/js/ebb34ddb.3c997c0e.js | 1 + assets/js/ec4f4180.2a0994b4.js | 1 + assets/js/ecc00064.0f6a64b8.js | 1 + assets/js/edcc188d.fda8c4a6.js | 1 + assets/js/ee08513e.cbccea58.js | 1 + assets/js/ee5d8003.ec6e3a50.js | 1 + assets/js/eeceef6b.f0a4738b.js | 1 + assets/js/f0bf0af8.7a068dd8.js | 1 + assets/js/f2142509.e4fbfb94.js | 1 + assets/js/f3adc880.ba567182.js | 1 + assets/js/f46f4beb.2132984a.js | 1 + assets/js/f606b5b5.4724fc0f.js | 1 + assets/js/f834d930.2d6e5625.js | 1 + assets/js/fb537116.87597f37.js | 1 + assets/js/fb8ebc35.84f05a53.js | 1 + assets/js/fe1d21e1.50dc7bef.js | 1 + assets/js/main.8f31c7f6.js | 2 + assets/js/main.8f31c7f6.js.LICENSE.txt | 126 ++++++++++++++++++ assets/js/runtime~main.9d67a35c.js | 1 + global/postman.html | 6 +- global/test_accounts.html | 6 +- index.html | 4 +- private-networks.html | 6 +- private-networks/chatbot.html | 6 +- private-networks/concepts.html | 6 +- .../concepts/node-sync-private.html | 6 +- private-networks/concepts/permissioning.html | 6 +- .../concepts/permissioning/onchain.html | 6 +- .../concepts/permissioning/plugin.html | 6 +- private-networks/concepts/plugins.html | 6 +- private-networks/concepts/poa.html | 6 +- private-networks/concepts/privacy.html | 6 +- .../concepts/privacy/flexible-privacy.html | 6 +- .../concepts/privacy/multi-tenancy.html | 6 +- private-networks/concepts/privacy/plugin.html | 6 +- .../concepts/privacy/privacy-groups.html | 6 +- .../privacy/private-transactions.html | 6 +- .../private-transactions/processing.html | 6 +- private-networks/get-started.html | 4 +- private-networks/get-started/install.html | 6 +- .../install/binary-distribution.html | 6 +- .../get-started/install/run-docker-image.html | 6 +- private-networks/get-started/start-node.html | 6 +- .../get-started/system-requirements.html | 6 +- private-networks/how-to.html | 6 +- private-networks/how-to/backup.html | 6 +- .../how-to/configure/bootnodes.html | 6 +- .../how-to/configure/consensus.html | 6 +- .../add-validators-without-voting.html | 6 +- .../how-to/configure/consensus/clique.html | 6 +- .../how-to/configure/consensus/ibft.html | 6 +- .../how-to/configure/consensus/qbft.html | 6 +- .../how-to/configure/contracts.html | 6 +- private-networks/how-to/configure/curves.html | 6 +- .../how-to/configure/free-gas.html | 6 +- .../configure/tls/client-and-server.html | 6 +- .../how-to/configure/validators.html | 6 +- private-networks/how-to/deploy/ansible.html | 6 +- private-networks/how-to/deploy/cloud.html | 6 +- private-networks/how-to/deploy/ethstats.html | 6 +- .../how-to/deploy/kubernetes.html | 6 +- private-networks/how-to/monitor.html | 6 +- .../how-to/monitor/chainlens.html | 6 +- .../how-to/monitor/elastic-stack.html | 6 +- private-networks/how-to/monitor/loki.html | 6 +- .../how-to/monitor/opentelemetry.html | 6 +- .../how-to/monitor/quorum-hibernate.html | 6 +- private-networks/how-to/monitor/splunk.html | 6 +- .../how-to/send-transactions.html | 6 +- .../concurrent-private-transactions.html | 6 +- .../private-transactions.html | 6 +- .../send-transactions/revert-reason.html | 6 +- private-networks/how-to/upgrade.html | 6 +- .../how-to/use-permissioning/local.html | 6 +- .../how-to/use-permissioning/onchain.html | 6 +- .../access-private-transactions.html | 8 +- .../how-to/use-privacy/besu-extended.html | 8 +- .../how-to/use-privacy/eea-compliant.html | 8 +- .../how-to/use-privacy/flexible.html | 8 +- .../performance-best-practices.html | 10 +- .../how-to/use-privacy/privacy-groups.html | 8 +- .../how-to/use-privacy/sign-pmts.html | 8 +- .../how-to/use-privacy/tessera.html | 8 +- .../how-to/use-privacy/web3js-quorum.html | 8 +- private-networks/reference.html | 6 +- .../reference/accounts-for-testing.html | 6 +- private-networks/reference/api.html | 6 +- private-networks/reference/api/objects.html | 6 +- private-networks/reference/cli/options.html | 6 +- .../reference/cli/subcommands.html | 6 +- .../reference/plugin-api-interfaces.html | 6 +- private-networks/tutorials.html | 4 +- private-networks/tutorials/azure.html | 6 +- private-networks/tutorials/clique.html | 6 +- private-networks/tutorials/contracts.html | 6 +- .../tutorials/contracts/interact.html | 6 +- .../tutorials/contracts/transfer-funds.html | 6 +- private-networks/tutorials/ethash.html | 6 +- private-networks/tutorials/ibft.html | 6 +- .../tutorials/ibft/validators.html | 6 +- private-networks/tutorials/kubernetes.html | 6 +- .../tutorials/kubernetes/charts.html | 6 +- .../tutorials/kubernetes/cluster.html | 6 +- .../tutorials/kubernetes/maintenance.html | 6 +- .../tutorials/kubernetes/nat-manager.html | 6 +- .../tutorials/kubernetes/playground.html | 6 +- .../tutorials/kubernetes/production.html | 6 +- .../tutorials/kubernetes/quorum-explorer.html | 6 +- private-networks/tutorials/permissioning.html | 6 +- private-networks/tutorials/privacy.html | 6 +- .../tutorials/privacy/multi-tenancy.html | 6 +- .../tutorials/privacy/quickstart.html | 6 +- .../tutorials/privacy/web3js-quorum.html | 6 +- private-networks/tutorials/qbft.html | 6 +- private-networks/tutorials/quickstart.html | 6 +- public-networks.html | 6 +- public-networks/chatbot.html | 6 +- public-networks/concepts.html | 4 +- .../concepts/data-storage-formats.html | 6 +- public-networks/concepts/events-and-logs.html | 6 +- public-networks/concepts/genesis-file.html | 6 +- .../concepts/network-and-chain-id.html | 6 +- public-networks/concepts/node-clients.html | 6 +- public-networks/concepts/node-keys.html | 6 +- public-networks/concepts/node-sync.html | 6 +- .../parallel-transaction-execution.html | 6 +- public-networks/concepts/proof-of-stake.html | 6 +- .../concepts/proof-of-stake/attestations.html | 6 +- .../concepts/transactions/pool.html | 6 +- .../concepts/transactions/types.html | 6 +- .../concepts/transactions/validation.html | 6 +- public-networks/get-started.html | 4 +- public-networks/get-started/connect.html | 6 +- .../get-started/connect/mainnet.html | 6 +- .../get-started/connect/testnet.html | 6 +- public-networks/get-started/install.html | 6 +- .../install/binary-distribution.html | 6 +- .../get-started/install/run-docker-image.html | 6 +- .../get-started/migrate-to-besu.html | 6 +- public-networks/get-started/start-node.html | 6 +- .../get-started/system-requirements.html | 6 +- public-networks/how-to.html | 4 +- .../how-to/bonsai-limit-trie-logs.html | 6 +- public-networks/how-to/configure-besu.html | 6 +- .../how-to/configure-besu/profile.html | 6 +- public-networks/how-to/configure-ha.html | 6 +- .../configure-ha/sample-configuration.html | 6 +- .../configure-java/install-update-java.html | 6 +- .../configure-java/java-flight-recorder.html | 6 +- .../how-to/configure-java/manage-memory.html | 6 +- .../configure-java/pass-jvm-options.html | 6 +- .../how-to/connect/configure-ports.html | 6 +- .../how-to/connect/manage-peers.html | 6 +- .../how-to/connect/specify-nat.html | 6 +- .../how-to/connect/static-nodes.html | 6 +- .../how-to/develop/client-libraries.html | 6 +- public-networks/how-to/develop/hardhat.html | 6 +- public-networks/how-to/monitor.html | 6 +- public-networks/how-to/monitor/logging.html | 6 +- public-networks/how-to/monitor/metrics.html | 6 +- .../how-to/monitor/understand-metrics.html | 6 +- public-networks/how-to/send-transactions.html | 6 +- .../how-to/troubleshoot/evm-tool.html | 6 +- .../how-to/troubleshoot/peering.html | 6 +- .../how-to/troubleshoot/performance.html | 10 +- .../troubleshoot/trace-transactions.html | 6 +- public-networks/how-to/upgrade-node.html | 6 +- public-networks/how-to/use-besu-api.html | 6 +- .../how-to/use-besu-api/access-logs.html | 6 +- .../how-to/use-besu-api/authenticate.html | 6 +- .../how-to/use-besu-api/graphql.html | 6 +- .../how-to/use-besu-api/json-rpc.html | 6 +- .../how-to/use-besu-api/rpc-pubsub.html | 6 +- public-networks/how-to/use-engine-api.html | 6 +- public-networks/how-to/use-pow/mining.html | 6 +- public-networks/reference.html | 4 +- public-networks/reference/api.html | 6 +- public-networks/reference/api/objects.html | 6 +- public-networks/reference/cli/options.html | 6 +- .../reference/cli/subcommands.html | 6 +- public-networks/reference/disclosure.html | 6 +- public-networks/reference/engine-api.html | 6 +- .../reference/engine-api/objects.html | 6 +- public-networks/reference/evm-tool.html | 6 +- public-networks/reference/genesis-items.html | 6 +- .../reference/projects-using-besu.html | 6 +- public-networks/reference/trace-types.html | 6 +- public-networks/tutorials.html | 4 +- .../tutorials/aws-node-runners.html | 6 +- .../tutorials/besu-teku-mainnet.html | 6 +- .../tutorials/besu-teku-testnet.html | 6 +- public-networks/tutorials/kubernetes.html | 6 +- search-index.json | 2 +- search.html | 4 +- tags.html | 4 +- tags/private-networks.html | 6 +- tags/public-networks.html | 6 +- 350 files changed, 833 insertions(+), 536 deletions(-) create mode 100644 assets/js/0145acbf.ca51f66f.js create mode 100644 assets/js/01562474.1100efd4.js create mode 100644 assets/js/02fd2e39.dba8976a.js create mode 100644 assets/js/030f9ebf.166e6313.js create mode 100644 assets/js/06aa37f3.92b3b331.js create mode 100644 assets/js/0821166d.e0ef50df.js create mode 100644 assets/js/083d4b51.58058e91.js create mode 100644 assets/js/0c3b97c4.69c0ec1a.js create mode 100644 assets/js/0ea635c0.5a566d7a.js create mode 100644 assets/js/0f663201.d73cba55.js create mode 100644 assets/js/12718c4a.28e34d69.js create mode 100644 assets/js/13034d1e.f4f5a1b7.js create mode 100644 assets/js/13912882.b9eb43d6.js create mode 100644 assets/js/16350423.b613a489.js create mode 100644 assets/js/166cf840.018cd6bc.js create mode 100644 assets/js/1719a32c.2df0602a.js create mode 100644 assets/js/1a78f042.c239554b.js create mode 100644 assets/js/1b2e0ee9.145fc4b8.js create mode 100644 assets/js/1b5bfdea.b747c2a4.js create mode 100644 assets/js/1b73c7ba.2d6cbe43.js create mode 100644 assets/js/1f29a5e5.374e7339.js create mode 100644 assets/js/2039806a.6efb1ced.js create mode 100644 assets/js/22dd74f7.48905444.js create mode 100644 assets/js/248beabf.1ac00178.js create mode 100644 assets/js/25537021.d20da3f5.js create mode 100644 assets/js/2712d2e6.6465ff23.js create mode 100644 assets/js/27b89368.147d1099.js create mode 100644 assets/js/28249022.14c69bf3.js create mode 100644 assets/js/297e0bb4.72f7d166.js create mode 100644 assets/js/2ce131d7.64d49c50.js create mode 100644 assets/js/2de980e5.32cc28e2.js create mode 100644 assets/js/306048a3.baea7df0.js create mode 100644 assets/js/3234314a.5a5977fe.js create mode 100644 assets/js/356faa2b.3d6beb99.js create mode 100644 assets/js/3624528b.16b77a43.js create mode 100644 assets/js/37906014.a7cfc71c.js create mode 100644 assets/js/3868ebe2.5d5924b9.js create mode 100644 assets/js/3917f523.69dcf3fb.js create mode 100644 assets/js/3a4520c6.2638a0de.js create mode 100644 assets/js/3aaf4567.c9190433.js create mode 100644 assets/js/3b05cdc2.516f1401.js create mode 100644 assets/js/3e86fe35.bca88889.js create mode 100644 assets/js/3f04f830.7e296a78.js create mode 100644 assets/js/43d83ec4.c39a0343.js create mode 100644 assets/js/46ff6f7b.6fc98e46.js create mode 100644 assets/js/4a41aaaf.0089b810.js create mode 100644 assets/js/4ba08559.c8916a1d.js create mode 100644 assets/js/4d94bde1.1944a60e.js create mode 100644 assets/js/4f63be9c.b10c965e.js create mode 100644 assets/js/5576e3f0.76332a7a.js create mode 100644 assets/js/55b6f436.85c63947.js create mode 100644 assets/js/563e4b8b.f5989863.js create mode 100644 assets/js/5af5c663.318693a4.js create mode 100644 assets/js/5b178458.92e3a64b.js create mode 100644 assets/js/5c820069.f071fa36.js create mode 100644 assets/js/5ec0198e.58ab1ebf.js create mode 100644 assets/js/66bba352.857dee58.js create mode 100644 assets/js/67359d90.79f2626a.js create mode 100644 assets/js/680b46ee.4182c1b2.js create mode 100644 assets/js/6c6be066.9f4be9d0.js create mode 100644 assets/js/6cafcc6f.15600393.js create mode 100644 assets/js/6d0a1147.91a82e83.js create mode 100644 assets/js/6e493491.e501909e.js create mode 100644 assets/js/6ea682ce.937b8481.js create mode 100644 assets/js/6f6d3344.d4f9183d.js create mode 100644 assets/js/714c5be8.8bc14b40.js create mode 100644 assets/js/715197f0.e1537fe2.js create mode 100644 assets/js/71635f7b.a08e5a3f.js create mode 100644 assets/js/71e3c29d.9a203a9a.js create mode 100644 assets/js/76a5e22a.fa0582ac.js create mode 100644 assets/js/79bb8117.da871cdc.js create mode 100644 assets/js/7a44c711.55fc5953.js create mode 100644 assets/js/7b0f9452.faa64787.js create mode 100644 assets/js/7b4961ca.e5b09a35.js create mode 100644 assets/js/7bb2e71b.cc249e11.js create mode 100644 assets/js/7e9c70a7.e1727144.js create mode 100644 assets/js/7ea61495.60fc74c7.js create mode 100644 assets/js/810074cd.1fafbb8c.js create mode 100644 assets/js/8161613e.2a25bb28.js create mode 100644 assets/js/84b35613.dd245543.js create mode 100644 assets/js/87114070.31099ec0.js create mode 100644 assets/js/88771ea1.0cf7abbf.js create mode 100644 assets/js/887b6037.879af06d.js create mode 100644 assets/js/88996aea.4734e667.js create mode 100644 assets/js/89f1fe89.8a3d9311.js create mode 100644 assets/js/8a886138.e319aec1.js create mode 100644 assets/js/8b137bfa.0a8d6cfd.js create mode 100644 assets/js/8b8c93ab.4cf23d97.js create mode 100644 assets/js/8c0ee333.baf93dfc.js create mode 100644 assets/js/8d677f34.bfeae8dd.js create mode 100644 assets/js/8ef40281.efd977be.js create mode 100644 assets/js/91cde904.6fcce82e.js create mode 100644 assets/js/91f929bc.731f780c.js create mode 100644 assets/js/9213a1f9.82823be8.js create mode 100644 assets/js/93e76459.8440837a.js create mode 100644 assets/js/981fdc44.3d68d69f.js create mode 100644 assets/js/99a5eb2e.8239cbdc.js create mode 100644 assets/js/9a50decc.73be5a08.js create mode 100644 assets/js/9bb932b9.2395ad2a.js create mode 100644 assets/js/9ffeb22a.aaaf724c.js create mode 100644 assets/js/a0f949fc.3514adf5.js create mode 100644 assets/js/a2bd30e6.7e3cceb2.js create mode 100644 assets/js/a626427b.792d2e8a.js create mode 100644 assets/js/a99a03ac.ff4385fe.js create mode 100644 assets/js/aa0c6744.d7c231cf.js create mode 100644 assets/js/aa612600.f8435eb7.js create mode 100644 assets/js/af3555a6.f0cef4d7.js create mode 100644 assets/js/b0eb7c42.6e5f4dae.js create mode 100644 assets/js/b2d12fc2.bc73913d.js create mode 100644 assets/js/b4b83649.e1b7333f.js create mode 100644 assets/js/b5388cc7.55c8c0c9.js create mode 100644 assets/js/b5e9b728.47acb136.js create mode 100644 assets/js/b658262b.9ca3c8e9.js create mode 100644 assets/js/b6b2f0db.6014a9b2.js create mode 100644 assets/js/b7759d8d.947e5d2f.js create mode 100644 assets/js/bbdbb161.05b13db2.js create mode 100644 assets/js/bc60af12.ac8f074d.js create mode 100644 assets/js/bc69a950.2defb99c.js create mode 100644 assets/js/bd3642f6.380bcf35.js create mode 100644 assets/js/bd4880eb.bcab1d22.js create mode 100644 assets/js/bea70e21.8fbd02fc.js create mode 100644 assets/js/c029b5c7.9727eb79.js create mode 100644 assets/js/c14ba340.53ca64b6.js create mode 100644 assets/js/c41908c3.df287b65.js create mode 100644 assets/js/c48436f6.06cbe96b.js create mode 100644 assets/js/c69ab138.94f9f036.js create mode 100644 assets/js/c6a4c9bf.5522a35f.js create mode 100644 assets/js/c6c17076.325ef5bf.js create mode 100644 assets/js/c8cab34c.6ecffe1d.js create mode 100644 assets/js/ca90dbf4.fd9387c2.js create mode 100644 assets/js/cdbaa4c0.fac6c6a1.js create mode 100644 assets/js/ce4c8b54.7b1b2a99.js create mode 100644 assets/js/ce515f1b.10faa8ee.js create mode 100644 assets/js/cf53573e.3a88b895.js create mode 100644 assets/js/d13d7343.179934d0.js create mode 100644 assets/js/d1f22a5a.52bd66a7.js create mode 100644 assets/js/d4c8fb26.e0b1fd46.js create mode 100644 assets/js/d78c9adf.6eb2b6bb.js create mode 100644 assets/js/d7914a50.dcb45a45.js create mode 100644 assets/js/d7b72fb9.e4864d29.js create mode 100644 assets/js/d86228ad.2c26466a.js create mode 100644 assets/js/d94d9a73.9d3a7ebc.js create mode 100644 assets/js/dbf86eb1.d639f11a.js create mode 100644 assets/js/dd3e5b84.b9ec0db0.js create mode 100644 assets/js/dd5955a1.58dbde9c.js create mode 100644 assets/js/dd900a84.4da1521c.js create mode 100644 assets/js/dfe7f568.acb49715.js create mode 100644 assets/js/e0a6c7d4.6ef4ed23.js create mode 100644 assets/js/e12df8e0.420072b0.js create mode 100644 assets/js/e1c9c46b.fadb9bc2.js create mode 100644 assets/js/e6ca27ec.6615161a.js create mode 100644 assets/js/e8e619e2.f1de5c95.js create mode 100644 assets/js/ebb34ddb.3c997c0e.js create mode 100644 assets/js/ec4f4180.2a0994b4.js create mode 100644 assets/js/ecc00064.0f6a64b8.js create mode 100644 assets/js/edcc188d.fda8c4a6.js create mode 100644 assets/js/ee08513e.cbccea58.js create mode 100644 assets/js/ee5d8003.ec6e3a50.js create mode 100644 assets/js/eeceef6b.f0a4738b.js create mode 100644 assets/js/f0bf0af8.7a068dd8.js create mode 100644 assets/js/f2142509.e4fbfb94.js create mode 100644 assets/js/f3adc880.ba567182.js create mode 100644 assets/js/f46f4beb.2132984a.js create mode 100644 assets/js/f606b5b5.4724fc0f.js create mode 100644 assets/js/f834d930.2d6e5625.js create mode 100644 assets/js/fb537116.87597f37.js create mode 100644 assets/js/fb8ebc35.84f05a53.js create mode 100644 assets/js/fe1d21e1.50dc7bef.js create mode 100644 assets/js/main.8f31c7f6.js create mode 100644 assets/js/main.8f31c7f6.js.LICENSE.txt create mode 100644 assets/js/runtime~main.9d67a35c.js diff --git a/404.html b/404.html index e2c3dd8f96a..268e6c65cf3 100644 --- a/404.html +++ b/404.html @@ -10,8 +10,8 @@ - - + + diff --git a/assets/js/0145acbf.ca51f66f.js b/assets/js/0145acbf.ca51f66f.js new file mode 100644 index 00000000000..bcf313baa0a --- /dev/null +++ b/assets/js/0145acbf.ca51f66f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8235],{90090:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>c});var t=n(74848),o=n(28453);const r={title:"Data storage formats",sidebar_position:3,description:"Learn about storing data using Forest of Tries and Bonsai Tries.",tags:["public networks"]},i="Data storage formats",a={id:"public-networks/concepts/data-storage-formats",title:"Data storage formats",description:"Learn about storing data using Forest of Tries and Bonsai Tries.",source:"@site/docs/public-networks/concepts/data-storage-formats.md",sourceDirName:"public-networks/concepts",slug:"/public-networks/concepts/data-storage-formats",permalink:"/public-networks/concepts/data-storage-formats",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/concepts/data-storage-formats.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Data storage formats",sidebar_position:3,description:"Learn about storing data using Forest of Tries and Bonsai Tries.",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Attestations",permalink:"/public-networks/concepts/proof-of-stake/attestations"},next:{title:"Node synchronization",permalink:"/public-networks/concepts/node-sync"}},d={},c=[{value:"Bonsai Tries",id:"bonsai-tries",level:2},{value:"Forest of Tries",id:"forest-of-tries",level:2},{value:"Forest of Tries vs. Bonsai Tries",id:"forest-of-tries-vs-bonsai-tries",level:2},{value:"Storage requirements",id:"storage-requirements",level:3},{value:"Accessing data",id:"accessing-data",level:3},{value:"Syncing nodes",id:"syncing-nodes",level:3}];function l(e){const s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"data-storage-formats",children:"Data storage formats"})}),"\n",(0,t.jsxs)(s.p,{children:["Besu offers two formats for storing the world state, ",(0,t.jsx)(s.a,{href:"#bonsai-tries",children:"Bonsai Tries"})," and ",(0,t.jsx)(s.a,{href:"#forest-of-tries",children:"Forest of Tries"}),"."]}),"\n",(0,t.jsx)(s.h2,{id:"bonsai-tries",children:"Bonsai Tries"}),"\n",(0,t.jsx)(s.p,{children:"Bonsai Tries is a data storage layout policy designed to reduce storage requirements and increase read performance. This is the default for Besu."}),"\n",(0,t.jsx)(s.p,{children:"Bonsai stores leaf values in a trie log, separate from the branches of the trie. Bonsai stores nodes by the location of the node instead of the hash of the node. Bonsai can access the leaf from the underlying storage directly using the account key. This greatly reduces the disk space needed for storage and allows for less resource-demanding and faster read performance. Bonsai inherently prunes orphaned nodes and old branches."}),"\n",(0,t.jsxs)(s.p,{children:["To run a node with Bonsai Tries data storage format, use the command line option ",(0,t.jsx)(s.a,{href:"/public-networks/reference/cli/options#data-storage-format",children:(0,t.jsx)(s.code,{children:"--data-storage-format=BONSAI"})}),"."]}),"\n",(0,t.jsx)("p",{align:"center",children:(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"Bonsai_tries",src:n(93031).A+"",width:"828",height:"513"})})}),"\n",(0,t.jsx)(s.admonition,{title:"important",type:"caution",children:(0,t.jsxs)(s.p,{children:["Do not run an ",(0,t.jsx)(s.a,{href:"/public-networks/concepts/node-sync#archive-nodes",children:"archive node"})," with Bonsai Tries.\nBonsai is designed for retrieving recent data only."]})}),"\n",(0,t.jsx)(s.admonition,{type:"tip",children:(0,t.jsxs)(s.p,{children:["You can read more about Bonsai in ",(0,t.jsx)(s.a,{href:"https://consensys.io/blog/bonsai-tries-guide",children:"Consensys' Guide to Bonsai Tries"}),"."]})}),"\n",(0,t.jsx)(s.h2,{id:"forest-of-tries",children:"Forest of Tries"}),"\n",(0,t.jsxs)(s.p,{children:["Forest of Tries, also called forest mode, is another method of representing the world state, and is more suitable for ",(0,t.jsx)(s.a,{href:"/public-networks/concepts/node-sync#archive-nodes",children:"archive nodes"}),"."]}),"\n",(0,t.jsx)(s.p,{children:"In forest mode, each node in the trie is saved in a key-value store by hash. For each block, the world state is updated with new nodes, leaf nodes, and a new state root. Old leaf nodes remain in the underlying data store. Data is accessed and stored by hash, which increases the size of the database and increases the resources and time needed to access account data."}),"\n",(0,t.jsx)("p",{align:"center",children:(0,t.jsx)(s.p,{children:(0,t.jsx)(s.img,{alt:"forest_of_tries",src:n(79576).A+"",width:"828",height:"631"})})}),"\n",(0,t.jsx)(s.admonition,{type:"warning",children:(0,t.jsxs)(s.p,{children:["Forest pruning using the ",(0,t.jsx)(s.code,{children:"--pruning-enabled"})," option is no longer supported.\nWe recommend using ",(0,t.jsx)(s.a,{href:"#bonsai-tries",children:"Bonsai Tries"})," to save disk space."]})}),"\n",(0,t.jsx)(s.h2,{id:"forest-of-tries-vs-bonsai-tries",children:"Forest of Tries vs. Bonsai Tries"}),"\n",(0,t.jsx)(s.h3,{id:"storage-requirements",children:"Storage requirements"}),"\n",(0,t.jsxs)(s.p,{children:["Forest mode uses significantly more memory than Bonsai.\nWith a ",(0,t.jsx)(s.a,{href:"/public-networks/concepts/node-sync#full-nodes",children:"full node"}),", forest mode uses an\nestimated 750 GB of storage, while Bonsai uses an estimated 650 GB of storage.\n",(0,t.jsx)(s.a,{href:"/public-networks/concepts/node-sync#archive-nodes",children:"Archive nodes"})," must use forest mode, which\nuses an estimated 12 TB of storage."]}),"\n",(0,t.jsx)(s.h3,{id:"accessing-data",children:"Accessing data"}),"\n",(0,t.jsx)(s.p,{children:"Forest mode must go through all the branches by hash to read a leaf value. Bonsai can access the leaf from the underlying storage directly using the account key. Bonsai will generally read faster than forest mode, particularly if the blocks are more recent."}),"\n",(0,t.jsxs)(s.p,{children:["However, Bonsai becomes increasingly more resource-intensive the further in history you try to read data. To prevent this, you can limit how far Bonsai looks back while reconstructing data. The default limit Bonsai looks back is 512. To change the parameter, use the ",(0,t.jsx)(s.a,{href:"/public-networks/reference/cli/options#bonsai-historical-block-limit",children:(0,t.jsx)(s.code,{children:"--bonsai-historical-block-limit"})})," option. This might directly impact ",(0,t.jsx)(s.a,{href:"/public-networks/reference/api/",children:"JSON-RPC API"})," queries."]}),"\n",(0,t.jsx)(s.admonition,{type:"note",children:(0,t.jsxs)(s.p,{children:["Using ",(0,t.jsx)(s.code,{children:"--bonsai-historical-block-limit"}),' doesn\'t affect the size of the database being stored, only how far back to load. This means there is no "safe minimum" value to use with this option.']})}),"\n",(0,t.jsx)(s.h3,{id:"syncing-nodes",children:"Syncing nodes"}),"\n",(0,t.jsxs)(s.p,{children:["The following table shows the ways you can sync a ",(0,t.jsx)(s.a,{href:"/public-networks/concepts/node-sync#full-nodes",children:"full node"})," with the different data storage formats using ",(0,t.jsx)(s.a,{href:"/public-networks/concepts/node-sync#fast-synchronization-deprecated",children:"fast"})," and ",(0,t.jsx)(s.a,{href:"/public-networks/concepts/node-sync#snap-synchronization",children:"snap"})," sync."]}),"\n",(0,t.jsxs)(s.table,{children:[(0,t.jsx)(s.thead,{children:(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.th,{children:"Data storage format"}),(0,t.jsx)(s.th,{children:"Sync mode"}),(0,t.jsx)(s.th,{children:"Storage estimate"}),(0,t.jsx)(s.th,{children:"Can other nodes sync to your node?"})]})}),(0,t.jsxs)(s.tbody,{children:[(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:"Bonsai"}),(0,t.jsx)(s.td,{children:"Fast"}),(0,t.jsx)(s.td,{children:"1140 GB"}),(0,t.jsx)(s.td,{children:"No"})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:"Bonsai"}),(0,t.jsx)(s.td,{children:"Snap"}),(0,t.jsx)(s.td,{children:"1090 GB"}),(0,t.jsx)(s.td,{children:"Yes"})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:"Bonsai"}),(0,t.jsx)(s.td,{children:"Checkpoint"}),(0,t.jsx)(s.td,{children:"840 GB"}),(0,t.jsx)(s.td,{children:"No"})]}),(0,t.jsxs)(s.tr,{children:[(0,t.jsx)(s.td,{children:"Forest"}),(0,t.jsx)(s.td,{children:"Fast"}),(0,t.jsx)(s.td,{children:"1200 GB"}),(0,t.jsx)(s.td,{children:"Yes"})]})]})]}),"\n",(0,t.jsx)(s.admonition,{type:"tip",children:(0,t.jsx)(s.p,{children:"We recommend using snap sync with Bonsai for the fastest sync and lowest storage requirements."})})]})}function h(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},93031:(e,s,n)=>{n.d(s,{A:()=>t});const t=n.p+"assets/images/Bonsai_tries-5faad47fa3a0b807cd2bb30bce6b38b9.png"},79576:(e,s,n)=>{n.d(s,{A:()=>t});const t=n.p+"assets/images/forest_of_tries-b2da450e9ecbfc38e09bd13505c66aed.png"},28453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>a});var t=n(96540);const o={},r=t.createContext(o);function i(e){const s=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function a(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/01562474.1100efd4.js b/assets/js/01562474.1100efd4.js new file mode 100644 index 00000000000..f82421e34e6 --- /dev/null +++ b/assets/js/01562474.1100efd4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[9812],{49922:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var r=n(74848),o=n(28453);const i={title:"Use Hardhat",sidebar_position:1,description:"Using Besu with Hardhat",tags:["public networks","private networks"]},a="Use Hardhat",s={id:"public-networks/how-to/develop/hardhat",title:"Use Hardhat",description:"Using Besu with Hardhat",source:"@site/docs/public-networks/how-to/develop/hardhat.md",sourceDirName:"public-networks/how-to/develop",slug:"/public-networks/how-to/develop/hardhat",permalink:"/public-networks/how-to/develop/hardhat",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/develop/hardhat.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Use Hardhat",sidebar_position:1,description:"Using Besu with Hardhat",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Reduce storage for Bonsai Tries",permalink:"/public-networks/how-to/bonsai-limit-trie-logs"},next:{title:"Use client libraries",permalink:"/public-networks/how-to/develop/client-libraries"}},d={},l=[{value:"Private key management",id:"private-key-management",level:2},{value:"Use an HD wallet",id:"use-an-hd-wallet",level:3},{value:"Specify your private key in code",id:"specify-your-private-key-in-code",level:3},{value:"Start a Besu node",id:"start-a-besu-node",level:2},{value:"Deploy a contract",id:"deploy-a-contract",level:2}];function c(e){const t={admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"use-hardhat",children:"Use Hardhat"})}),"\n",(0,r.jsx)(t.p,{children:"Developing for Besu using Hardhat is the same as developing for public Ethereum networks using Hardhat. Hardhat\nsupports Besu with the only difference being Besu does not support private key management."}),"\n",(0,r.jsx)(t.p,{children:"You can therefore use a wallet provider, or specify your private key in the code."}),"\n",(0,r.jsx)(t.h2,{id:"private-key-management",children:"Private key management"}),"\n",(0,r.jsx)(t.h3,{id:"use-an-hd-wallet",children:"Use an HD wallet"}),"\n",(0,r.jsxs)(t.p,{children:["To add the wallet provider, update the ",(0,r.jsx)(t.code,{children:"hardhat.config.ts"})," file in the project directory. Replace:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:""})," with the JSON-RPC endpoint (IP address and port) of a Besu node."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:""})," with the list of words that make up your account's mnemonic."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:" with your password if used."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:""})," with your account's private key."]}),"\n"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-js",children:'module.exports = {\n // See \n // for more about customizing your Hardhat configuration!\n networks: {\n besuWallet: {\n url: "",\n accounts: {\n mnemonic: "",\n path: "m/44\'/60\'/0\'/0",\n initialIndex: 0,\n count: 1,\n passphrase: "",\n },\n },\n },\n};\n'})}),"\n",(0,r.jsx)(t.h3,{id:"specify-your-private-key-in-code",children:"Specify your private key in code"}),"\n",(0,r.jsx)(t.admonition,{type:"danger",children:(0,r.jsx)(t.p,{children:"Ensure you do not commit private keys to source control like Github, always inject your keys at runtime as environment variables, or\nuse a vault or similar."})}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-js",children:"const provider = new ethers.JsonRpcApiProvider();\nconst wallet = new ethers.Wallet();\n// connect the wallet to the provider\nconst signer = wallet.connect(provider);\n\n"})}),"\n",(0,r.jsx)(t.h2,{id:"start-a-besu-node",children:"Start a Besu node"}),"\n",(0,r.jsx)(t.p,{children:"Start a Besu node with JSON-RPC enabled on the endpoint specified in the Hardhat configuration file."}),"\n",(0,r.jsx)(t.h2,{id:"deploy-a-contract",children:"Deploy a contract"}),"\n",(0,r.jsx)(t.p,{children:"To deploy a contract onto the Besu network:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"npx hardhat scripts run ./scripts/deploy_my_contract.ts --network besuWallet\n"})})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>s});var r=n(96540);const o={},i=r.createContext(o);function a(e){const t=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),r.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/02fd2e39.dba8976a.js b/assets/js/02fd2e39.dba8976a.js new file mode 100644 index 00000000000..6477266508a --- /dev/null +++ b/assets/js/02fd2e39.dba8976a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7936],{11210:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>r,default:()=>p,frontMatter:()=>a,metadata:()=>c,toc:()=>d});var s=n(74848),i=n(28453);const a={title:"Multi-tenancy",sidebar_position:4,description:"Multi-tenancy"},r="Multi-tenancy (Deprecated)",c={id:"private-networks/concepts/privacy/multi-tenancy",title:"Multi-tenancy",description:"Multi-tenancy",source:"@site/docs/private-networks/concepts/privacy/multi-tenancy.md",sourceDirName:"private-networks/concepts/privacy",slug:"/private-networks/concepts/privacy/multi-tenancy",permalink:"/private-networks/concepts/privacy/multi-tenancy",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/concepts/privacy/multi-tenancy.md",tags:[],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Multi-tenancy",sidebar_position:4,description:"Multi-tenancy"},sidebar:"privateDocSidebar",previous:{title:"Flexible privacy groups",permalink:"/private-networks/concepts/privacy/flexible-privacy"},next:{title:"Privacy plugin",permalink:"/private-networks/concepts/privacy/plugin"}},o={},d=[];function l(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",header:"header",img:"img",p:"p",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"multi-tenancy-deprecated",children:"Multi-tenancy (Deprecated)"})}),"\n",(0,s.jsx)(t.admonition,{type:"caution",children:(0,s.jsxs)(t.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,s.jsx)(t.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,s.jsx)(t.p,{children:"By default, each participant in a privacy network uses its own Besu and Tessera node."}),"\n",(0,s.jsxs)(t.p,{children:["Multi-tenancy allows multiple participants to use the same Besu and Tessera node. Each participant is a ",(0,s.jsx)(t.em,{children:"tenant"}),", and the operator is the ",(0,s.jsx)(t.em,{children:"owner"})," of the Besu and Tessera node."]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["The operator is responsible for ",(0,s.jsx)(t.a,{href:"/private-networks/tutorials/privacy/multi-tenancy",children:"configuring multi-tenancy"}),", and has access to all tenant data."]})}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Multi-tenancy",src:n(77719).A+"",width:"1512",height:"648"})}),"\n",(0,s.jsxs)(t.admonition,{type:"tip",children:[(0,s.jsx)(t.p,{children:"Ensure the multi-tenant Tessera node client API is configured to allow access only by the multi-tenant Besu node. Access to your data is secured through Besu using multi-tenancy mode."}),(0,s.jsx)(t.p,{children:"If not configured to allow access only by the multi-tenant Besu node, other Tessera clients, including other Besu nodes, might be able to access tenant data."}),(0,s.jsxs)(t.p,{children:["To secure access, you can ",(0,s.jsx)(t.a,{href:"/private-networks/how-to/configure/tls/client-and-server",children:"configure TLS between Besu and Tessera"})," with the ",(0,s.jsx)(t.a,{href:"https://docs.tessera.consensys.net/en/stable/HowTo/Configure/TLS/#whitelist",children:(0,s.jsx)(t.code,{children:"WHITELIST"})})," trust mode."]})]}),"\n",(0,s.jsx)(t.p,{children:"Multi-tenancy validates that tenants have permission to use the specified HTTP or WebSocket JSON-RPC requests, and the tenant has access to the requested privacy data. Private data is isolated and each tenant uses a JSON Web Token (JWT) for authentication."}),"\n",(0,s.jsxs)(t.p,{children:["You can ",(0,s.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"create the JWT either externally or internally"}),"."]})]})}function p(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},77719:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/Multi-tenancy-509dd20a1055029dd83055ddfc99139a.png"},28453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>c});var s=n(96540);const i={},a=s.createContext(i);function r(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/030f9ebf.166e6313.js b/assets/js/030f9ebf.166e6313.js new file mode 100644 index 00000000000..730dbb837a6 --- /dev/null +++ b/assets/js/030f9ebf.166e6313.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4656],{71920:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>u,frontMatter:()=>o,metadata:()=>c,toc:()=>p});var t=s(74848),r=s(28453),a=s(11470),i=s(19365);const o={title:"Create a privacy enabled network using the Quickstart",sidebar_position:1,description:"Configure Besu privacy",tags:["private networks"]},l="Create a privacy-enabled network (Deprecated)",c={id:"private-networks/tutorials/privacy/index",title:"Create a privacy enabled network using the Quickstart",description:"Configure Besu privacy",source:"@site/docs/private-networks/tutorials/privacy/index.md",sourceDirName:"private-networks/tutorials/privacy",slug:"/private-networks/tutorials/privacy/",permalink:"/private-networks/tutorials/privacy/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/privacy/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Create a privacy enabled network using the Quickstart",sidebar_position:1,description:"Configure Besu privacy",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Create an Ethash network",permalink:"/private-networks/tutorials/ethash"},next:{title:"Create a multi-tenant network",permalink:"/private-networks/tutorials/privacy/multi-tenancy"}},d={},p=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Steps",id:"steps",level:2},{value:"1. Create Tessera directories",id:"1-create-tessera-directories",level:3},{value:"2. Generate Tessera keys",id:"2-generate-tessera-keys",level:3},{value:"3. Create Tessera configuration files",id:"3-create-tessera-configuration-files",level:3},{value:"4. Start the Tessera nodes",id:"4-start-the-tessera-nodes",level:3},{value:"5. Start Besu Node-1",id:"5-start-besu-node-1",level:3},{value:"6. Start Besu Node-2",id:"6-start-besu-node-2",level:3},{value:"7. Start Besu Node-3",id:"7-start-besu-node-3",level:3},{value:"8. Start Besu Node-4",id:"8-start-besu-node-4",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"create-a-privacy-enabled-network--deprecated",children:"Create a privacy-enabled network (Deprecated)"})}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsxs)(n.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,t.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,t.jsxs)(n.p,{children:["Configuring a network that supports private transactions requires starting a ",(0,t.jsx)(n.a,{href:"https://docs.tessera.consensys.net/",children:"Tessera"})," node for each Besu node. Besu command line options associate the Besu node with the Tessera node."]}),"\n",(0,t.jsxs)(n.p,{children:["This tutorial assumes you have completed setting up an IBFT 2.0 network to the point where you have ",(0,t.jsx)(n.a,{href:"/private-networks/tutorials/ibft/#5-copy-the-node-private-keys-to-the-node-directories",children:"created the genesis file and copied the private keys"}),". If not, complete steps 1 to 5 of the ",(0,t.jsx)(n.a,{href:"/private-networks/tutorials/ibft/",children:"Create an IBFT 2.0"})," tutorial before continuing."]}),"\n",(0,t.jsxs)(n.admonition,{type:"important",children:[(0,t.jsxs)(n.p,{children:["To support privacy, ensure your genesis file includes at least the ",(0,t.jsx)(n.code,{children:"byzantium"})," milestone."]}),(0,t.jsx)(n.p,{children:"This tutorial configures a private network using IBFT 2.0 for educational purposes only. IBFT 2.0 requires 4 validators to be Byzantine fault tolerant."})]}),"\n",(0,t.jsx)(n.p,{children:"In this tutorial we start Tessera nodes for the four Besu nodes and associate each Besu node with a Tessera node."}),"\n",(0,t.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://docs.tessera.consensys.net/category/install",children:"Install Tessera"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"steps",children:"Steps"}),"\n",(0,t.jsx)(n.h3,{id:"1-create-tessera-directories",children:"1. Create Tessera directories"}),"\n",(0,t.jsxs)(n.p,{children:["Inside each ",(0,t.jsx)(n.code,{children:"Node-*"})," directory, create a ",(0,t.jsx)(n.code,{children:"Tessera"})," directory:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"IBFT-Network/\n\u251c\u2500\u2500 Node-1\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2502 \u251c\u2500\u2500 Tessera\n\u251c\u2500\u2500 Node-2\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2502 \u251c\u2500\u2500 Tessera\n\u251c\u2500\u2500 Node-3\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2502 \u251c\u2500\u2500 Tessera\n\u2514\u2500\u2500 Node-4\n \u251c\u2500\u2500 data\n \u251c\u2500\u2500 Tessera\n"})}),"\n",(0,t.jsx)(n.h3,{id:"2-generate-tessera-keys",children:"2. Generate Tessera keys"}),"\n",(0,t.jsx)(n.p,{children:"This example creates an unlocked private key, meaning you do not need a password to decrypt the private key file."}),"\n",(0,t.jsxs)(n.p,{children:["In each ",(0,t.jsx)(n.code,{children:"Tessera"})," directory, generate a public/private key pair for the Tessera node:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"tessera -keygen -filename nodeKey\n"})}),"\n",(0,t.jsxs)(n.p,{children:["At the prompt, press ",(0,t.jsx)(n.strong,{children:"Enter"})," to create an unlocked key."]}),"\n",(0,t.jsxs)(n.p,{children:["Tessera generates the public/private key pair and saves the keys in the ",(0,t.jsx)(n.code,{children:"nodeKey.pub"})," and ",(0,t.jsx)(n.code,{children:"nodeKey.key"})," files."]}),"\n",(0,t.jsx)(n.h3,{id:"3-create-tessera-configuration-files",children:"3. Create Tessera configuration files"}),"\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.code,{children:"Tessera"})," directory for each node, create a file called ",(0,t.jsx)(n.code,{children:"tessera.conf"}),", with the following configuration:"]}),"\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:["In production environments, only specify ",(0,t.jsx)(n.a,{href:"https://docs.tessera.consensys.net/HowTo/Configure/TLS/",children:(0,t.jsx)(n.code,{children:"tls"})})," as ",(0,t.jsx)(n.code,{children:"OFF"})," if another transport security mechanism, such as WireGuard, is in place."]})}),"\n",(0,t.jsxs)(a.A,{children:[(0,t.jsx)(i.A,{value:"Node-1",label:"Node-1",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "mode": "orion",\n "useWhiteList": false,\n "jdbc": {\n "username": "sa",\n "password": "",\n "url": "jdbc:h2:./target/h2/tessera1",\n "autoCreateTables": true\n },\n "serverConfigs": [\n {\n "app": "ThirdParty",\n "serverAddress": "http://localhost:9101",\n "communicationType": "REST"\n },\n {\n "app": "Q2T",\n "serverAddress": "http://localhost:9102",\n "communicationType": "REST"\n },\n {\n "app": "P2P",\n "serverAddress": "http://localhost:9103",\n "sslConfig": {\n "tls": "OFF"\n },\n "communicationType": "REST"\n }\n ],\n "peer": [\n {\n "url": "http://localhost:9203"\n },\n {\n "url": "http://localhost:9303"\n },\n {\n "url": "http://localhost:9403"\n }\n ],\n "keys": {\n "passwords": [],\n "keyData": [\n {\n "privateKeyPath": "nodeKey.key",\n "publicKeyPath": "nodeKey.pub"\n }\n ]\n },\n "alwaysSendTo": []\n}\n'})})}),(0,t.jsx)(i.A,{value:"Node-2",label:"Node-2",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "mode": "orion",\n "useWhiteList": false,\n "jdbc": {\n "username": "sa",\n "password": "",\n "url": "jdbc:h2:./target/h2/tessera1",\n "autoCreateTables": true\n },\n "serverConfigs": [\n {\n "app": "ThirdParty",\n "serverAddress": "http://localhost:9201",\n "communicationType": "REST"\n },\n {\n "app": "Q2T",\n "serverAddress": "http://localhost:9202",\n "communicationType": "REST"\n },\n {\n "app": "P2P",\n "serverAddress": "http://localhost:9203",\n "sslConfig": {\n "tls": "OFF"\n },\n "communicationType": "REST"\n }\n ],\n "peer": [\n {\n "url": "http://localhost:9103"\n },\n {\n "url": "http://localhost:9303"\n },\n {\n "url": "http://localhost:9403"\n }\n ],\n "keys": {\n "passwords": [],\n "keyData": [\n {\n "privateKeyPath": "nodeKey.key",\n "publicKeyPath": "nodeKey.pub"\n }\n ]\n },\n "alwaysSendTo": []\n}\n'})})}),(0,t.jsx)(i.A,{value:"Node-3",label:"Node-3",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "mode": "orion",\n "useWhiteList": false,\n "jdbc": {\n "username": "sa",\n "password": "",\n "url": "jdbc:h2:./target/h2/tessera1",\n "autoCreateTables": true\n },\n "serverConfigs": [\n {\n "app": "ThirdParty",\n "serverAddress": "http://localhost:9301",\n "communicationType": "REST"\n },\n {\n "app": "Q2T",\n "serverAddress": "http://localhost:9302",\n "communicationType": "REST"\n },\n {\n "app": "P2P",\n "serverAddress": "http://localhost:9303",\n "sslConfig": {\n "tls": "OFF"\n },\n "communicationType": "REST"\n }\n ],\n "peer": [\n {\n "url": "http://localhost:9103"\n },\n {\n "url": "http://localhost:9203"\n },\n {\n "url": "http://localhost:9403"\n }\n ],\n "keys": {\n "passwords": [],\n "keyData": [\n {\n "privateKeyPath": "nodeKey.key",\n "publicKeyPath": "nodeKey.pub"\n }\n ]\n },\n "alwaysSendTo": []\n}\n'})})}),(0,t.jsx)(i.A,{value:"Node-4",label:"Node-4",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "mode": "orion",\n "useWhiteList": false,\n "jdbc": {\n "username": "sa",\n "password": "",\n "url": "jdbc:h2:./target/h2/tessera1",\n "autoCreateTables": true\n },\n "serverConfigs": [\n {\n "app": "ThirdParty",\n "serverAddress": "http://localhost:9401",\n "communicationType": "REST"\n },\n {\n "app": "Q2T",\n "serverAddress": "http://localhost:9402",\n "communicationType": "REST"\n },\n {\n "app": "P2P",\n "serverAddress": "http://localhost:9403",\n "sslConfig": {\n "tls": "OFF"\n },\n "communicationType": "REST"\n }\n ],\n "peer": [\n {\n "url": "http://localhost:9103"\n },\n {\n "url": "http://localhost:9203"\n },\n {\n "url": "http://localhost:9303"\n }\n ],\n "keys": {\n "passwords": [],\n "keyData": [\n {\n "privateKeyPath": "nodeKey.key",\n "publicKeyPath": "nodeKey.pub"\n }\n ]\n },\n "alwaysSendTo": []\n}\n'})})})]}),"\n",(0,t.jsx)(n.p,{children:"In the configuration file, specify:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Different port numbers for the various servers in the ",(0,t.jsx)(n.a,{href:"https://docs.tessera.consensys.net/HowTo/Configure/TesseraAPI/",children:(0,t.jsx)(n.code,{children:"serverConfigs"})})," section."]}),"\n",(0,t.jsxs)(n.li,{children:["The address of the Tessera nodes to discover, in the ",(0,t.jsx)(n.a,{href:"https://docs.tessera.consensys.net/HowTo/Configure/Peer-discovery/#specify-peers",children:(0,t.jsx)(n.code,{children:"peer"})})," section."]}),"\n",(0,t.jsx)(n.li,{children:"The location of the public/private key pair."}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"4-start-the-tessera-nodes",children:"4. Start the Tessera nodes"}),"\n",(0,t.jsxs)(n.p,{children:["In each ",(0,t.jsx)(n.code,{children:"Tessera"})," directory, start Tessera specifying the ",(0,t.jsx)(n.a,{href:"#3-create-tessera-configuration-files",children:"configuration file"})," created in the previous step:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"tessera -configfile tessera.conf\n"})}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["After starting the first Tessera node and before starting the other nodes, the log message ",(0,t.jsx)(n.code,{children:"failed to connect to node"})," displays. This is normal behavior. Until you start the other peer nodes, your node is not connected and displays this warning. You can continue to start the other nodes."]})}),"\n",(0,t.jsx)(n.h3,{id:"5-start-besu-node-1",children:"5. Start Besu Node-1"}),"\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.code,{children:"Node-1"})," directory, start Besu Node-1:"]}),"\n",(0,t.jsxs)(a.A,{children:[(0,t.jsx)(i.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-allowlist="*" --rpc-http-cors-origins="all" --privacy-enabled --privacy-url=http://127.0.0.1:9102 --privacy-public-key-file=Tessera/nodeKey.pub --profile=ENTERPRISE\n'})})}),(0,t.jsx)(i.A,{value:"Windows",label:"Windows",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\genesis.json --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-allowlist="*" --rpc-http-cors-origins="all" --privacy-enabled --privacy-url=http://127.0.0.1:9102 --privacy-public-key-file=Tessera\\nodeKey.pub --profile=ENTERPRISE\n'})})})]}),"\n",(0,t.jsx)(n.p,{children:"The command line specifies privacy options:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/private-networks/reference/cli/options#privacy-enabled-deprecated",children:(0,t.jsx)(n.code,{children:"--privacy-enabled"})})," enables privacy."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/private-networks/reference/cli/options#privacy-url-deprecated",children:(0,t.jsx)(n.code,{children:"--privacy-url"})})," specifies the Q2T server address of the Tessera node (",(0,t.jsx)(n.code,{children:"Q2T"})," in ",(0,t.jsx)(n.code,{children:"tessera.conf"}),")."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/private-networks/reference/cli/options#privacy-public-key-file-deprecated",children:(0,t.jsx)(n.code,{children:"--privacy-public-key-file"})})," specifies the file containing Tessera node public key (created in ",(0,t.jsx)(n.a,{href:"#2-generate-tessera-keys",children:"3. Generate Tessera Keys"}),")."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,t.jsx)(n.code,{children:"--rpc-http-api"})})," includes ",(0,t.jsx)(n.code,{children:"EEA"})," and ",(0,t.jsx)(n.code,{children:"PRIV"})," in the list of JSON-RPC APIs to enable privacy JSON-RPC API methods."]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["Use the ",(0,t.jsx)(n.a,{href:"/private-networks/reference/cli/options#privacy-marker-transaction-signing-key-file-deprecated",children:(0,t.jsx)(n.code,{children:"--privacy-marker-transaction-signing-key-file"})})," command line option to sign ",(0,t.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy marker transactions"})," using a supplied key. The command line option is mandatory in privacy-enabled paid gas networks."]})}),"\n",(0,t.jsxs)(n.p,{children:["When the node starts, the ",(0,t.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," displays. Copy the enode URL to specify Node-1 as the bootnode in the following steps."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Node 1 Enode URL",src:s(14739).A+"",width:"988",height:"126"})}),"\n",(0,t.jsx)(n.h3,{id:"6-start-besu-node-2",children:"6. Start Besu Node-2"}),"\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.code,{children:"Node-2"})," directory, start Besu Node-2 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:"]}),"\n",(0,t.jsxs)(a.A,{children:[(0,t.jsx)(i.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --bootnodes= --p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8546 --privacy-enabled --privacy-url=http://127.0.0.1:9202 --privacy-public-key-file=Tessera/nodeKey.pub --profile=ENTERPRISE\n'})})}),(0,t.jsx)(i.A,{value:"Windows",label:"Windows",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\genesis.json --bootnodes= --p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8546 --privacy-enabled --privacy-url=http://127.0.0.1:9202 --privacy-public-key-file=Tessera\\nodeKey.pub --profile=ENTERPRISE\n'})})})]}),"\n",(0,t.jsxs)(n.p,{children:["The command line specifies the same options as for Node-1 with different ports and Tessera node URL. The ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#bootnodes",children:(0,t.jsx)(n.code,{children:"--bootnodes"})})," option specifies the enode URL of Node-1."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["When running Besu from the ",(0,t.jsx)(n.a,{href:"/private-networks/get-started/install/run-docker-image",children:"Docker image"}),", ",(0,t.jsx)(n.a,{href:"/private-networks/get-started/install/run-docker-image#expose-ports",children:"expose ports"}),"."]})}),"\n",(0,t.jsx)(n.h3,{id:"7-start-besu-node-3",children:"7. Start Besu Node-3"}),"\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.code,{children:"Node-3"})," directory, start Besu Node-3 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:"]}),"\n",(0,t.jsxs)(a.A,{children:[(0,t.jsx)(i.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --bootnodes= --p2p-port=30305 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8547 --privacy-enabled --privacy-url=http://127.0.0.1:9302 --privacy-public-key-file=Tessera/nodeKey.pub --profile=ENTERPRISE\n'})})}),(0,t.jsx)(i.A,{value:"Windows",label:"Windows",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\genesis.json --bootnodes= --p2p-port=30305 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8547 --privacy-enabled --privacy-url=http://127.0.0.1:9302 --privacy-public-key-file=Tessera\\nodeKey.pub --profile=ENTERPRISE\n'})})})]}),"\n",(0,t.jsxs)(n.p,{children:["The command line specifies the same options as for Node-1 with different ports and Tessera node URL. The ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#bootnodes",children:(0,t.jsx)(n.code,{children:"--bootnodes"})})," option specifies the enode URL of Node-1."]}),"\n",(0,t.jsx)(n.h3,{id:"8-start-besu-node-4",children:"8. Start Besu Node-4"}),"\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.code,{children:"Node-4"})," directory, start Besu Node-4 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:"]}),"\n",(0,t.jsxs)(a.A,{children:[(0,t.jsx)(i.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --bootnodes= --p2p-port=30306 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8548 --privacy-enabled --privacy-url=http://127.0.0.1:9402 --privacy-public-key-file=Tessera/nodeKey.pub --profile=ENTERPRISE\n'})})}),(0,t.jsx)(i.A,{value:"Windows",label:"Windows",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\genesis.json --bootnodes= --p2p-port=30306 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8548 --privacy-enabled --privacy-url=http://127.0.0.1:9402 --privacy-public-key-file=Tessera\\nodeKey.pub --profile=ENTERPRISE\n'})})})]}),"\n",(0,t.jsxs)(n.p,{children:["The command line specifies the same options as for Node-1 with different ports and Tessera node URL. The ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#bootnodes",children:(0,t.jsx)(n.code,{children:"--bootnodes"})})," option specifies the enode URL of Node-1."]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},19365:(e,n,s)=>{s.d(n,{A:()=>i});s(96540);var t=s(18215);const r={tabItem:"tabItem_Ymn6"};var a=s(74848);function i(e){let{children:n,hidden:s,className:i}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,t.A)(r.tabItem,i),hidden:s,children:n})}},11470:(e,n,s)=>{s.d(n,{A:()=>T});var t=s(96540),r=s(18215),a=s(23104),i=s(56347),o=s(205),l=s(57485),c=s(31682),d=s(70679);function p(e){return t.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,t.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:s}=e;return(0,t.useMemo)((()=>{const e=n??function(e){return p(e).map((e=>{let{props:{value:n,label:s,attributes:t,default:r}}=e;return{value:n,label:s,attributes:t,default:r}}))}(s);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,s])}function u(e){let{value:n,tabValues:s}=e;return s.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:s}=e;const r=(0,i.W6)(),a=function(e){let{queryString:n=!1,groupId:s}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return s??null}({queryString:n,groupId:s});return[(0,l.aZ)(a),(0,t.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(r.location.search);n.set(a,e),r.replace({...r.location,search:n.toString()})}),[a,r])]}function y(e){const{defaultValue:n,queryString:s=!1,groupId:r}=e,a=h(e),[i,l]=(0,t.useState)((()=>function(e){let{defaultValue:n,tabValues:s}=e;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!u({value:n,tabValues:s}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${s.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const t=s.find((e=>e.default))??s[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:n,tabValues:a}))),[c,p]=f({queryString:s,groupId:r}),[y,b]=function(e){let{groupId:n}=e;const s=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,a]=(0,d.Dv)(s);return[r,(0,t.useCallback)((e=>{s&&a.set(e)}),[s,a])]}({groupId:r}),v=(()=>{const e=c??y;return u({value:e,tabValues:a})?e:null})();(0,o.A)((()=>{v&&l(v)}),[v]);return{selectedValue:i,selectValue:(0,t.useCallback)((e=>{if(!u({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);l(e),p(e),b(e)}),[p,b,a]),tabValues:a}}var b=s(92303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=s(74848);function x(e){let{className:n,block:s,selectedValue:t,selectValue:i,tabValues:o}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,a.a_)(),d=e=>{const n=e.currentTarget,s=l.indexOf(n),r=o[s].value;r!==t&&(c(n),i(r))},p=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const s=l.indexOf(e.currentTarget)+1;n=l[s]??l[0];break}case"ArrowLeft":{const s=l.indexOf(e.currentTarget)-1;n=l[s]??l[l.length-1];break}}n?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":s},n),children:o.map((e=>{let{value:n,label:s,attributes:a}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:t===n?0:-1,"aria-selected":t===n,ref:e=>l.push(e),onKeyDown:p,onClick:d,...a,className:(0,r.A)("tabs__item",v.tabItem,a?.className,{"tabs__item--active":t===n}),children:s??n},n)}))})}function g(e){let{lazy:n,children:s,selectedValue:a}=e;const i=(Array.isArray(s)?s:[s]).filter(Boolean);if(n){const e=i.find((e=>e.props.value===a));return e?(0,t.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:i.map(((e,n)=>(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function m(e){const n=y(e);return(0,j.jsxs)("div",{className:(0,r.A)("tabs-container",v.tabList),children:[(0,j.jsx)(x,{...n,...e}),(0,j.jsx)(g,{...n,...e})]})}function T(e){const n=(0,b.A)();return(0,j.jsx)(m,{...e,children:p(e.children)},String(n))}},14739:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/EnodeStartup-145939e1c789c28e464db82faa0fb3ca.png"},28453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>o});var t=s(96540);const r={},a=t.createContext(r);function i(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/06aa37f3.92b3b331.js b/assets/js/06aa37f3.92b3b331.js new file mode 100644 index 00000000000..25d6f6e8d9f --- /dev/null +++ b/assets/js/06aa37f3.92b3b331.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[3824],{35134:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>u,frontMatter:()=>c,metadata:()=>t,toc:()=>h});var a=s(74848),i=s(28453),l=s(11470),r=s(19365);const c={title:"Private network options",sidebar_position:1,description:"Besu private networks CLI reference",tags:["private networks"]},o="Private network command line options",t={id:"private-networks/reference/cli/options",title:"Private network options",description:"Besu private networks CLI reference",source:"@site/docs/private-networks/reference/cli/options.md",sourceDirName:"private-networks/reference/cli",slug:"/private-networks/reference/cli/options",permalink:"/private-networks/reference/cli/options",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/reference/cli/options.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Private network options",sidebar_position:1,description:"Besu private networks CLI reference",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Reference",permalink:"/private-networks/reference/"},next:{title:"Private network subcommands",permalink:"/private-networks/reference/cli/subcommands"}},d={},h=[{value:"Specify options",id:"specify-options",level:2},{value:"Options",id:"options",level:2},{value:"permissions-accounts-config-file",id:"permissions-accounts-config-file",level:3},{value:"permissions-accounts-config-file-enabled",id:"permissions-accounts-config-file-enabled",level:3},{value:"permissions-accounts-contract-address (Deprecated)",id:"permissions-accounts-contract-address-deprecated",level:3},{value:"permissions-accounts-contract-enabled (Deprecated)",id:"permissions-accounts-contract-enabled-deprecated",level:3},{value:"permissions-nodes-config-file",id:"permissions-nodes-config-file",level:3},{value:"permissions-nodes-config-file-enabled",id:"permissions-nodes-config-file-enabled",level:3},{value:"permissions-nodes-contract-address (Deprecated)",id:"permissions-nodes-contract-address-deprecated",level:3},{value:"permissions-nodes-contract-enabled (Deprecated)",id:"permissions-nodes-contract-enabled-deprecated",level:3},{value:"permissions-nodes-contract-version (Deprecated)",id:"permissions-nodes-contract-version-deprecated",level:3},{value:"poa-block-txs-selection-max-time",id:"poa-block-txs-selection-max-time",level:3},{value:"privacy-enabled (Deprecated)",id:"privacy-enabled-deprecated",level:3},{value:"privacy-marker-transaction-signing-key-file (Deprecated)",id:"privacy-marker-transaction-signing-key-file-deprecated",level:3},{value:"privacy-multi-tenancy-enabled (Deprecated)",id:"privacy-multi-tenancy-enabled-deprecated",level:3},{value:"privacy-flexible-groups-enabled (Deprecated)",id:"privacy-flexible-groups-enabled-deprecated",level:3},{value:"privacy-public-key-file (Deprecated)",id:"privacy-public-key-file-deprecated",level:3},{value:"privacy-tls-enabled (Deprecated)",id:"privacy-tls-enabled-deprecated",level:3},{value:"privacy-tls-keystore-file (Deprecated)",id:"privacy-tls-keystore-file-deprecated",level:3},{value:"privacy-tls-keystore-password-file (Deprecated)",id:"privacy-tls-keystore-password-file-deprecated",level:3},{value:"privacy-tls-known-enclave-file (Deprecated)",id:"privacy-tls-known-enclave-file-deprecated",level:3},{value:"privacy-url (Deprecated)",id:"privacy-url-deprecated",level:3}];function p(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"private-network-command-line-options",children:"Private network command line options"})}),"\n",(0,a.jsx)(n.p,{children:"This reference describes the syntax of the Besu private network command line interface (CLI) options."}),"\n",(0,a.jsx)(n.admonition,{title:"Important",type:"caution",children:(0,a.jsxs)(n.p,{children:["This reference contains options that apply to only private networks. For options that apply to both private and public networks, see the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/cli/options",children:"public network options reference"}),"."]})}),"\n",(0,a.jsx)(n.h2,{id:"specify-options",children:"Specify options"}),"\n",(0,a.jsx)(n.p,{children:"You can specify Besu options:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"On the command line."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"besu [OPTIONS] [SUBCOMMAND]\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"As an environment variable. For each command line option, the equivalent environment variable is:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Uppercase."}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"_"})," replaces ",(0,a.jsx)(n.code,{children:"-"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:["Has a ",(0,a.jsx)(n.code,{children:"BESU_"})," prefix."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["For example, set ",(0,a.jsx)(n.code,{children:"--miner-coinbase"})," using the ",(0,a.jsx)(n.code,{children:"BESU_MINER_COINBASE"})," environment variable."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["In a ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/",children:"configuration file"}),"."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"If you specify an option in more than one place, the order of priority is command line, environment variable, configuration file."}),"\n",(0,a.jsxs)(n.p,{children:["If using Bash or Z shell, you can view option suggestions by entering ",(0,a.jsx)(n.code,{children:"--"})," and pressing the Tab key twice."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"besu --Tab+Tab\n"})}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsx)(n.p,{children:"Characters such as smart quotes and long (em) hyphens don't work in Besu command line options. Ensure quotes aren't automatically converted to smart quotes, or double hyphens combined into em hyphens."})}),"\n",(0,a.jsx)(n.h2,{id:"options",children:"Options"}),"\n",(0,a.jsx)(n.h3,{id:"permissions-accounts-config-file",children:(0,a.jsx)(n.code,{children:"permissions-accounts-config-file"})}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-accounts-config-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-accounts-config-file=/home/me/me_configFiles/myPermissionsFile\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PERMISSIONS_ACCOUNTS_CONFIG_FILE=/home/me/me_configFiles/myPermissionsFile\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'permissions-accounts-config-file="/home/me/me_configFiles/myPermissionsFile"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"/private-networks/how-to/use-permissioning/local#permissions-configuration-file",children:"accounts permissions configuration file"}),". The default is the ",(0,a.jsx)(n.code,{children:"permissions_config.toml"})," file in the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:"data directory"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"--permissions-accounts-config-file"})," and ",(0,a.jsx)(n.a,{href:"#permissions-nodes-config-file",children:(0,a.jsx)(n.code,{children:"--permissions-nodes-config-file"})})," can use the same file."]})}),"\n",(0,a.jsx)(n.h3,{id:"permissions-accounts-config-file-enabled",children:(0,a.jsx)(n.code,{children:"permissions-accounts-config-file-enabled"})}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-accounts-config-file-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-accounts-config-file-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PERMISSIONS_ACCOUNTS_CONFIG_FILE_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"permissions-accounts-config-file-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables file-based account level permissions. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsxs)(n.h3,{id:"permissions-accounts-contract-address-deprecated",children:[(0,a.jsx)(n.code,{children:"permissions-accounts-contract-address"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-accounts-contract-address=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-accounts-contract-address=xyz\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PERMISSIONS_ACCOUNTS_CONTRACT_ADDRESS=xyz\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'permissions-accounts-contract-address="xyz"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The contract address for ",(0,a.jsx)(n.a,{href:"/private-networks/concepts/permissioning/onchain",children:"onchain account permissioning"}),"."]}),"\n",(0,a.jsxs)(n.h3,{id:"permissions-accounts-contract-enabled-deprecated",children:[(0,a.jsx)(n.code,{children:"permissions-accounts-contract-enabled"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-accounts-contract-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-accounts-contract-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PERMISSIONS_ACCOUNTS_CONTRACT_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"permissions-accounts-contract-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables contract-based ",(0,a.jsx)(n.a,{href:"/private-networks/concepts/permissioning/onchain",children:"onchain account permissioning"}),". The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsxs)(n.p,{children:["Onchain permissioning is deprecated in Besu version 24.12.0 and later. Please read this ",(0,a.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,a.jsx)(n.h3,{id:"permissions-nodes-config-file",children:(0,a.jsx)(n.code,{children:"permissions-nodes-config-file"})}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-nodes-config-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-nodes-config-file=/home/me/me_configFiles/myPermissionsFile\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PERMISSIONS_NODES_CONFIG_FILE=/home/me/me_configFiles/myPermissionsFile\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'permissions-nodes-config-file="/home/me/me_configFiles/myPermissionsFile"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"/private-networks/how-to/use-permissioning/local#permissions-configuration-file",children:"nodes permissions configuration file"}),". The default is the ",(0,a.jsx)(n.code,{children:"permissions_config.toml"})," file in the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:"data directory"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"--permissions-nodes-config-file"})," and ",(0,a.jsx)(n.a,{href:"#permissions-accounts-config-file",children:(0,a.jsx)(n.code,{children:"--permissions-accounts-config-file"})})," can use the same file."]})}),"\n",(0,a.jsx)(n.h3,{id:"permissions-nodes-config-file-enabled",children:(0,a.jsx)(n.code,{children:"permissions-nodes-config-file-enabled"})}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-nodes-config-file-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-nodes-config-file-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PERMISSIONS_NODES_CONFIG_FILE_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"permissions-nodes-config-file-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables file-based node level permissions. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsxs)(n.h3,{id:"permissions-nodes-contract-address-deprecated",children:[(0,a.jsx)(n.code,{children:"permissions-nodes-contract-address"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-nodes-contract-address=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-nodes-contract-address=xyz\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PERMISSIONS_NODES_CONTRACT_ADDRESS=xyz\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'permissions-nodes-contract-address="xyz"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The contract address for ",(0,a.jsx)(n.a,{href:"/private-networks/concepts/permissioning/onchain",children:"onchain node permissioning"}),"."]}),"\n",(0,a.jsxs)(n.h3,{id:"permissions-nodes-contract-enabled-deprecated",children:[(0,a.jsx)(n.code,{children:"permissions-nodes-contract-enabled"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-nodes-contract-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-nodes-contract-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PERMISSIONS_NODES_CONTRACT_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"permissions-nodes-contract-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables contract-based ",(0,a.jsx)(n.a,{href:"/private-networks/concepts/permissioning/onchain",children:"onchain node permissioning"}),". The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsxs)(n.p,{children:["Onchain permissioning is deprecated in Besu version 24.12.0 and later. Please read this ",(0,a.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,a.jsxs)(n.h3,{id:"permissions-nodes-contract-version-deprecated",children:[(0,a.jsx)(n.code,{children:"permissions-nodes-contract-version"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-nodes-contract-version=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--permissions-nodes-contract-version=2\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PERMISSIONS_NODES_CONTRACT_VERSION=2\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"permissions-nodes-contract-version=2\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Version of the EEA ",(0,a.jsx)(n.a,{href:"/private-networks/how-to/use-permissioning/onchain#specify-the-permissioning-contract-interface-version",children:"node permissioning interface"}),". The default is 1."]}),"\n",(0,a.jsx)(n.h3,{id:"poa-block-txs-selection-max-time",children:(0,a.jsx)(n.code,{children:"poa-block-txs-selection-max-time"})}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--poa-block-txs-selection-max-time=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--poa-block-txs-selection-max-time=80\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_POA_BLOCK_TXS_SELECTION_MAX_TIME=80\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"poa-block-txs-selection-max-time=80\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The maximum time that can be spent selecting transactions to be included in a block,\nas a percentage of the fixed block time of the network.\nThe default is ",(0,a.jsx)(n.code,{children:"75"}),", or 75%."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["This option only applies to proof-of-authority networks.\nFor proof-of-stake and proof-of-work networks, see\n",(0,a.jsx)(n.a,{href:"/public-networks/reference/cli/options#block-txs-selection-max-time",children:(0,a.jsx)(n.code,{children:"--block-txs-selection-max-time"})}),"."]})}),"\n",(0,a.jsxs)(n.h3,{id:"privacy-enabled-deprecated",children:[(0,a.jsx)(n.code,{children:"privacy-enabled"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-enabled=false\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PRIVACY_ENABLED=false\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"privacy-enabled=false\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables ",(0,a.jsx)(n.a,{href:"/private-networks/concepts/privacy/",children:"private transactions"}),". The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsxs)(n.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,a.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,a.jsx)(n.admonition,{type:"important",children:(0,a.jsxs)(n.p,{children:["Using private transactions with ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats",children:"pruning"})," or ",(0,a.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:"fast sync"})," is not supported."]})}),"\n",(0,a.jsxs)(n.h3,{id:"privacy-marker-transaction-signing-key-file-deprecated",children:[(0,a.jsx)(n.code,{children:"privacy-marker-transaction-signing-key-file"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-marker-transaction-signing-key-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-marker-transaction-signing-key-file=/home/me/me_node/myPrivateKey\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PRIVACY_MARKER_TRANSACTION_SIGNING_KEY_FILE=/home/me/me_node/myPrivateKey\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'privacy-marker-transaction-signing-key-file="/home/me/me_node/myPrivateKey"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:""})," is the name of the private key file used to ",(0,a.jsx)(n.a,{href:"/private-networks/how-to/use-privacy/sign-pmts",children:"sign privacy marker transactions"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["This can be the same file used by ",(0,a.jsx)(n.a,{href:"/public-networks/reference/cli/options#node-private-key-file",children:(0,a.jsx)(n.code,{children:"--node-private-key-file"})}),", or a different key file to identify who signed the privacy marker transaction."]})}),"\n",(0,a.jsx)(n.p,{children:"You must specify this option if you're using:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"a privacy network where you pay gas. Also, the associated account must contain adequate funds."}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"/private-networks/concepts/permissioning/#account-permissioning",children:"account permissioning"})," and privacy. You must include the corresponding public key in the accounts allowlist."]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"If you do not specify this option (for example, in a free gas network), Besu signs each transaction with a different randomly generated key."}),"\n",(0,a.jsxs)(n.h3,{id:"privacy-multi-tenancy-enabled-deprecated",children:[(0,a.jsx)(n.code,{children:"privacy-multi-tenancy-enabled"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-multi-tenancy-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-multi-tenancy-enabled=false\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PRIVACY_MULTI_TENANCY_ENABLED=false\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"privacy-multi-tenancy-enabled=false\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables ",(0,a.jsx)(n.a,{href:"/private-networks/concepts/privacy/multi-tenancy",children:"multi-tenancy"})," for private transactions. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsxs)(n.h3,{id:"privacy-flexible-groups-enabled-deprecated",children:[(0,a.jsx)(n.code,{children:"privacy-flexible-groups-enabled"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-flexible-groups-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-flexible-groups-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PRIVACY_FLEXIBLE_GROUPS_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"privacy-flexible-groups-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables ",(0,a.jsx)(n.a,{href:"/private-networks/concepts/privacy/flexible-privacy",children:"flexible privacy groups"}),". The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Deprecated syntax for this option is ",(0,a.jsx)(n.code,{children:"--privacy-onchain-groups-enabled"}),"."]}),"\n",(0,a.jsxs)(n.h3,{id:"privacy-public-key-file-deprecated",children:[(0,a.jsx)(n.code,{children:"privacy-public-key-file"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-public-key-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-public-key-file=Tessera/nodeKey.pub\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PRIVACY_PUBLIC_KEY_FILE=Tessera/nodeKey.pub\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'privacy-public-key-file="Tessera/nodeKey.pub"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"https://docs.tessera.consensys.net/",children:"public key of the Tessera node"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"important",children:(0,a.jsxs)(n.p,{children:["You cannot specify ",(0,a.jsx)(n.code,{children:"privacy-public-key-file"})," when ",(0,a.jsx)(n.a,{href:"#privacy-multi-tenancy-enabled-deprecated",children:(0,a.jsx)(n.code,{children:"--privacy-multi-tenancy-enabled"})})," is ",(0,a.jsx)(n.code,{children:"true"})]})}),"\n",(0,a.jsxs)(n.h3,{id:"privacy-tls-enabled-deprecated",children:[(0,a.jsx)(n.code,{children:"privacy-tls-enabled"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-tls-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-tls-enabled=false\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PRIVACY_TLS_ENABLED=false\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"privacy-tls-enabled=false\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables ",(0,a.jsx)(n.a,{href:"/private-networks/concepts/privacy/#private-transaction-manager",children:"TLS on communication with the private transaction manager"}),". The default is false."]}),"\n",(0,a.jsxs)(n.h3,{id:"privacy-tls-keystore-file-deprecated",children:[(0,a.jsx)(n.code,{children:"privacy-tls-keystore-file"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-tls-keystore-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy--keystore-file=/home/me/me_node/key\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PRIVACY_TLS_KEYSTORE_FILE=/home/me/me_node/key\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'privacy-tls-keystore-file="/home/me/me_node/key"\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"The keystore file (in PKCS #12 format) containing the private key and the certificate presented during authentication."}),"\n",(0,a.jsxs)(n.p,{children:["You must specify ",(0,a.jsx)(n.code,{children:"privacy-tls-keystore-file"})," if ",(0,a.jsx)(n.a,{href:"#privacy-tls-enabled-deprecated",children:(0,a.jsx)(n.code,{children:"--privacy-tls-enabled"})})," is ",(0,a.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,a.jsxs)(n.h3,{id:"privacy-tls-keystore-password-file-deprecated",children:[(0,a.jsx)(n.code,{children:"privacy-tls-keystore-password-file"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-tls-keystore-password-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-tls-keystore-password-file=/home/me/me_node/password\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PRIVACY_TLS_KEYSTORE_PASSWORD_FILE=/home/me/me_node/password\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'privacy-tls-keystore-password-file="/home/me/me_node/password"\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"The path to the file containing the password to decrypt the keystore."}),"\n",(0,a.jsxs)(n.h3,{id:"privacy-tls-known-enclave-file-deprecated",children:[(0,a.jsx)(n.code,{children:"privacy-tls-known-enclave-file"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-tls-known-enclave-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-tls-known-enclave-file=/home/me/me_node/knownEnclave\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PRIVACY_TLS_KNOWN_ENCLAVE_FILE=/home/me/me_node/knownEnclave\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'privacy-tls-known-enclave-file="/home/me/me_node/knownEnclave"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The path to the file containing the hostnames, ports, and SHA256 certificate fingerprints of the ",(0,a.jsx)(n.a,{href:"/private-networks/how-to/configure/tls/client-and-server#create-the-known-servers-file",children:"authorized privacy enclave"}),"."]}),"\n",(0,a.jsxs)(n.h3,{id:"privacy-url-deprecated",children:[(0,a.jsx)(n.code,{children:"privacy-url"})," (Deprecated)"]}),"\n",(0,a.jsxs)(l.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-url=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--privacy-url=http://127.0.0.1:8888\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PRIVACY_URL=http://127.0.0.1:8888\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'privacy-url="http://127.0.0.1:8888"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The URL on which the ",(0,a.jsx)(n.a,{href:"/private-networks/tutorials/privacy/#3-create-tessera-configuration-files",children:"Tessera node"})," is running."]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(p,{...e})}):p(e)}},19365:(e,n,s)=>{s.d(n,{A:()=>r});s(96540);var a=s(18215);const i={tabItem:"tabItem_Ymn6"};var l=s(74848);function r(e){let{children:n,hidden:s,className:r}=e;return(0,l.jsx)("div",{role:"tabpanel",className:(0,a.A)(i.tabItem,r),hidden:s,children:n})}},11470:(e,n,s)=>{s.d(n,{A:()=>E});var a=s(96540),i=s(18215),l=s(23104),r=s(56347),c=s(205),o=s(57485),t=s(31682),d=s(70679);function h(e){return a.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:n,children:s}=e;return(0,a.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:s,attributes:a,default:i}}=e;return{value:n,label:s,attributes:a,default:i}}))}(s);return function(e){const n=(0,t.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,s])}function u(e){let{value:n,tabValues:s}=e;return s.some((e=>e.value===n))}function x(e){let{queryString:n=!1,groupId:s}=e;const i=(0,r.W6)(),l=function(e){let{queryString:n=!1,groupId:s}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return s??null}({queryString:n,groupId:s});return[(0,o.aZ)(l),(0,a.useCallback)((e=>{if(!l)return;const n=new URLSearchParams(i.location.search);n.set(l,e),i.replace({...i.location,search:n.toString()})}),[l,i])]}function m(e){const{defaultValue:n,queryString:s=!1,groupId:i}=e,l=p(e),[r,o]=(0,a.useState)((()=>function(e){let{defaultValue:n,tabValues:s}=e;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!u({value:n,tabValues:s}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${s.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=s.find((e=>e.default))??s[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:l}))),[t,h]=x({queryString:s,groupId:i}),[m,f]=function(e){let{groupId:n}=e;const s=function(e){return e?`docusaurus.tab.${e}`:null}(n),[i,l]=(0,d.Dv)(s);return[i,(0,a.useCallback)((e=>{s&&l.set(e)}),[s,l])]}({groupId:i}),j=(()=>{const e=t??m;return u({value:e,tabValues:l})?e:null})();(0,c.A)((()=>{j&&o(j)}),[j]);return{selectedValue:r,selectValue:(0,a.useCallback)((e=>{if(!u({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);o(e),h(e),f(e)}),[h,f,l]),tabValues:l}}var f=s(92303);const j={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=s(74848);function b(e){let{className:n,block:s,selectedValue:a,selectValue:r,tabValues:c}=e;const o=[],{blockElementScrollPositionUntilNextRender:t}=(0,l.a_)(),d=e=>{const n=e.currentTarget,s=o.indexOf(n),i=c[s].value;i!==a&&(t(n),r(i))},h=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const s=o.indexOf(e.currentTarget)+1;n=o[s]??o[0];break}case"ArrowLeft":{const s=o.indexOf(e.currentTarget)-1;n=o[s]??o[o.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":s},n),children:c.map((e=>{let{value:n,label:s,attributes:l}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:e=>o.push(e),onKeyDown:h,onClick:d,...l,className:(0,i.A)("tabs__item",j.tabItem,l?.className,{"tabs__item--active":a===n}),children:s??n},n)}))})}function g(e){let{lazy:n,children:s,selectedValue:l}=e;const r=(Array.isArray(s)?s:[s]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===l));return e?(0,a.cloneElement)(e,{className:(0,i.A)("margin-top--md",e.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==l})))})}function y(e){const n=m(e);return(0,v.jsxs)("div",{className:(0,i.A)("tabs-container",j.tabList),children:[(0,v.jsx)(b,{...n,...e}),(0,v.jsx)(g,{...n,...e})]})}function E(e){const n=(0,f.A)();return(0,v.jsx)(y,{...e,children:h(e.children)},String(n))}},28453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>c});var a=s(96540);const i={},l=a.createContext(i);function r(e){const n=a.useContext(l);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),a.createElement(l.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0821166d.e0ef50df.js b/assets/js/0821166d.e0ef50df.js new file mode 100644 index 00000000000..10f09d91625 --- /dev/null +++ b/assets/js/0821166d.e0ef50df.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6627],{11575:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var s=t(74848),r=t(28453);const i={title:"Start Besu",sidebar_position:3,description:"Start Besu on a public Ethereum network.",tags:["public networks"]},o="Start Besu",a={id:"public-networks/get-started/start-node",title:"Start Besu",description:"Start Besu on a public Ethereum network.",source:"@site/docs/public-networks/get-started/start-node.md",sourceDirName:"public-networks/get-started",slug:"/public-networks/get-started/start-node",permalink:"/public-networks/get-started/start-node",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/get-started/start-node.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Start Besu",sidebar_position:3,description:"Start Besu on a public Ethereum network.",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Install binary distribution",permalink:"/public-networks/get-started/install/binary-distribution"},next:{title:"Connect to a network overview",permalink:"/public-networks/get-started/connect/"}},c={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Local block data",id:"local-block-data",level:2},{value:"Genesis configuration",id:"genesis-configuration",level:2},{value:"Syncing and storage",id:"syncing-and-storage",level:2},{value:"Run a node for testing",id:"run-a-node-for-testing",level:2},{value:"Run a node on Holesky testnet",id:"run-a-node-on-holesky-testnet",level:2},{value:"Run a node on Sepolia testnet",id:"run-a-node-on-sepolia-testnet",level:2},{value:"Run a node on Ephemery testnet",id:"run-a-node-on-ephemery-testnet",level:2},{value:"Run a node on Ethereum Mainnet",id:"run-a-node-on-ethereum-mainnet",level:2},{value:"Confirm node is running",id:"confirm-node-is-running",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"start-besu",children:"Start Besu"})}),"\n",(0,s.jsx)(n.p,{children:"Nodes can connect to Ethereum Mainnet and public testnets."}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options",children:(0,s.jsx)(n.code,{children:"besu"})})," command with the required command line options to start a node."]}),"\n",(0,s.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.a,{href:"/public-networks/get-started/install/binary-distribution",children:"Besu installed"})}),"\n",(0,s.jsx)(n.h2,{id:"local-block-data",children:"Local block data"}),"\n",(0,s.jsxs)(n.p,{children:["When connecting to a network other than the network previously connected to, you must either delete the local block data or use the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,s.jsx)(n.code,{children:"--data-path"})})," option to specify a different data directory."]}),"\n",(0,s.jsxs)(n.p,{children:["To delete the local block data, delete the ",(0,s.jsx)(n.code,{children:"database"})," directory in the ",(0,s.jsx)(n.code,{children:"besu/build/distribution/besu-"})," directory."]}),"\n",(0,s.jsx)(n.h2,{id:"genesis-configuration",children:"Genesis configuration"}),"\n",(0,s.jsxs)(n.p,{children:["Besu specifies the genesis configuration, and sets the network ID and bootnodes when connecting to ",(0,s.jsx)(n.a,{href:"#run-a-node-on-holesky-testnet",children:"Holesky"}),", ",(0,s.jsx)(n.a,{href:"#run-a-node-on-sepolia-testnet",children:"Sepolia"}),", ",(0,s.jsx)(n.a,{href:"#run-a-node-on-ephemery-testnet",children:"Ephemery"})," and ",(0,s.jsx)(n.a,{href:"#run-a-node-on-ethereum-mainnet",children:"Mainnet"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsx)(n.p,{children:"The Ropsten, Rinkeby, and Kiln testnets are deprecated."})}),"\n",(0,s.jsxs)(n.p,{children:["When you specify ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#network",children:(0,s.jsx)(n.code,{children:"--network=dev"})}),", Besu uses the development mode genesis configuration with a fixed low difficulty. A node started with ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#network",children:(0,s.jsx)(n.code,{children:"--network=dev"})})," has an empty bootnodes list by default."]}),"\n",(0,s.jsxs)(n.p,{children:["The genesis files defining the genesis configurations are in the ",(0,s.jsx)(n.a,{href:"https://github.com/hyperledger/besu/tree/master/config/src/main/resources",children:"Besu source files"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["To define a genesis configuration, create a genesis file (for example, ",(0,s.jsx)(n.code,{children:"genesis.json"}),") and specify the file using the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#genesis-file",children:(0,s.jsx)(n.code,{children:"--genesis-file"})})," option."]}),"\n",(0,s.jsx)(n.h2,{id:"syncing-and-storage",children:"Syncing and storage"}),"\n",(0,s.jsxs)(n.p,{children:["By default, Besu syncs to the current state of the blockchain using ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-sync#snap-synchronization",children:"snap sync"})," in:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Networks specified using ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#network",children:(0,s.jsx)(n.code,{children:"--network"})})," except for the ",(0,s.jsx)(n.code,{children:"dev"})," development network."]}),"\n",(0,s.jsx)(n.li,{children:"Ethereum Mainnet."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["We recommend using ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-sync#snap-synchronization",children:"snap sync"})," for a faster sync, by starting Besu with ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:(0,s.jsx)(n.code,{children:"--sync-mode=SNAP"})}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["By default, Besu stores data in the ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai Tries format"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"run-a-node-for-testing",children:"Run a node for testing"}),"\n",(0,s.jsx)(n.p,{children:"To run a node that mines blocks at a rate suitable for testing purposes:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'besu --network=dev --miner-enabled --miner-coinbase=0xfe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-http-cors-origins="all" --host-allowlist="*" --rpc-ws-enabled --rpc-http-enabled --data-path=/tmp/tmpDatdir\n'})}),"\n",(0,s.jsxs)(n.p,{children:["You can also use the following ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/",children:"configuration file"})," on the command line to start a node with the same options as above:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",children:'network="dev"\nminer-enabled=true\nminer-coinbase="0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"\nrpc-http-cors-origins=["all"]\nhost-allowlist=["*"]\nrpc-ws-enabled=true\nrpc-http-enabled=true\ndata-path="/tmp/tmpdata-path"\n'})}),"\n",(0,s.jsxs)(n.admonition,{title:"Warning",type:"danger",children:[(0,s.jsx)(n.p,{children:"The following settings are a security risk in production environments:"}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Enabling the HTTP JSON-RPC service (",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,s.jsx)(n.code,{children:"--rpc-http-enabled"})}),") and setting ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-host",children:(0,s.jsx)(n.code,{children:"--rpc-http-host"})})," to 0.0.0.0 exposes the RPC connection on your node to any remote connection."]}),"\n",(0,s.jsxs)(n.li,{children:["Setting ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#host-allowlist",children:(0,s.jsx)(n.code,{children:"--host-allowlist"})})," to ",(0,s.jsx)(n.code,{children:'"*"'})," allows JSON-RPC API access from any host."]}),"\n",(0,s.jsxs)(n.li,{children:["Setting ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-cors-origins",children:(0,s.jsx)(n.code,{children:"--rpc-http-cors-origins"})})," to ",(0,s.jsx)(n.code,{children:'"all"'})," or ",(0,s.jsx)(n.code,{children:'"*"'})," allows cross-origin resource sharing (CORS) access from any domain."]}),"\n"]})]}),"\n",(0,s.jsx)(n.h2,{id:"run-a-node-on-holesky-testnet",children:"Run a node on Holesky testnet"}),"\n",(0,s.jsxs)(n.p,{children:["To run a node on ",(0,s.jsx)(n.a,{href:"https://github.com/eth-clients/holesky",children:"Holesky"})," specifying a data directory:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"besu --network=holesky --data-path=/\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Where ",(0,s.jsx)(n.code,{children:""})," and ",(0,s.jsx)(n.code,{children:""})," are the path and directory to save the Holesky chain data to."]}),"\n",(0,s.jsxs)(n.p,{children:["See the ",(0,s.jsx)(n.a,{href:"/public-networks/get-started/connect/testnet",children:"guide on connecting to a testnet"})," for more information."]}),"\n",(0,s.jsx)(n.h2,{id:"run-a-node-on-sepolia-testnet",children:"Run a node on Sepolia testnet"}),"\n",(0,s.jsxs)(n.p,{children:["To run a node on ",(0,s.jsx)(n.a,{href:"https://github.com/eth-clients/sepolia",children:"Sepolia"})," specifying a data directory:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"besu --network=sepolia --data-path=/\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Where ",(0,s.jsx)(n.code,{children:""})," and ",(0,s.jsx)(n.code,{children:""})," are the path and directory to save the Sepolia chain data to."]}),"\n",(0,s.jsxs)(n.p,{children:["See the ",(0,s.jsx)(n.a,{href:"/public-networks/get-started/connect/testnet",children:"guide on connecting to a testnet"})," for more information."]}),"\n",(0,s.jsx)(n.h2,{id:"run-a-node-on-ephemery-testnet",children:"Run a node on Ephemery testnet"}),"\n",(0,s.jsxs)(n.p,{children:["To run a node on ",(0,s.jsx)(n.a,{href:"https://github.com/ephemery-testnet/ephemery-resources?tab=readme-ov-file",children:"Ephemery"})," specifying a data directory:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"besu --network=ephemery --data-path=/\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Where ",(0,s.jsx)(n.code,{children:""})," and ",(0,s.jsx)(n.code,{children:""})," are the path and directory to save the Ephemery chain data to."]}),"\n",(0,s.jsxs)(n.p,{children:["See the ",(0,s.jsx)(n.a,{href:"/public-networks/get-started/connect/testnet",children:"guide on connecting to a testnet"})," for more information."]}),"\n",(0,s.jsx)(n.h2,{id:"run-a-node-on-ethereum-mainnet",children:"Run a node on Ethereum Mainnet"}),"\n",(0,s.jsx)(n.p,{children:"To run a node on the Ethereum Mainnet:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"besu\n"})}),"\n",(0,s.jsx)(n.p,{children:"To run a node on Mainnet with the HTTP JSON-RPC service enabled and available for localhost only:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"besu --rpc-http-enabled\n"})}),"\n",(0,s.jsxs)(n.p,{children:["See the ",(0,s.jsx)(n.a,{href:"/public-networks/get-started/connect/mainnet",children:"guide on connecting to Mainnet"})," for more information."]}),"\n",(0,s.jsx)(n.h2,{id:"confirm-node-is-running",children:"Confirm node is running"}),"\n",(0,s.jsxs)(n.p,{children:["If you started Besu with the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,s.jsx)(n.code,{children:"--rpc-http-enabled"})})," option, use ",(0,s.jsx)(n.a,{href:"https://curl.haxx.se/",children:"cURL"})," to call ",(0,s.jsx)(n.a,{href:"/public-networks/reference/api/",children:"JSON-RPC API methods"})," to confirm the node is running."]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"eth_chainId"})," returns the chain ID of the network."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}\' localhost:8545\n'})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"eth_syncing"})," returns the starting, current, and highest block."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}\' localhost:8545\n'})}),"\n",(0,s.jsxs)(n.p,{children:["For example, after connecting to Mainnet, ",(0,s.jsx)(n.code,{children:"eth_syncing"})," will return something similar to:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "startingBlock": "0x0",\n "currentBlock": "0x2d0",\n "highestBlock": "0x66c0"\n }\n}\n'})}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var s=t(96540);const r={},i=s.createContext(r);function o(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/083d4b51.58058e91.js b/assets/js/083d4b51.58058e91.js new file mode 100644 index 00000000000..ff69306c4cf --- /dev/null +++ b/assets/js/083d4b51.58058e91.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2622],{77384:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>o,contentTitle:()=>r,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>d});var n=s(74848),i=s(28453);const a={title:"Transaction types",sidebar_position:1,description:"Description of the different transaction types",tags:["public networks","private networks"]},r="Transaction types",c={id:"public-networks/concepts/transactions/types",title:"Transaction types",description:"Description of the different transaction types",source:"@site/docs/public-networks/concepts/transactions/types.md",sourceDirName:"public-networks/concepts/transactions",slug:"/public-networks/concepts/transactions/types",permalink:"/public-networks/concepts/transactions/types",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/concepts/transactions/types.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Transaction types",sidebar_position:1,description:"Description of the different transaction types",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Parallel transaction execution",permalink:"/public-networks/concepts/parallel-transaction-execution"},next:{title:"Transaction pool",permalink:"/public-networks/concepts/transactions/pool"}},o={},d=[{value:"FRONTIER transactions",id:"frontier-transactions",level:2},{value:"ACCESS_LIST transactions",id:"access_list-transactions",level:2},{value:"EIP1559 transactions",id:"eip1559-transactions",level:2},{value:"BLOB transactions",id:"blob-transactions",level:2},{value:"View blob transaction costs",id:"view-blob-transaction-costs",level:3}];function l(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"transaction-types",children:"Transaction types"})}),"\n",(0,n.jsxs)(t.p,{children:["You can interact with the Besu JSON-RPC API using different transaction types (specified by the ",(0,n.jsx)(t.code,{children:"transactionType"})," parameter)."]}),"\n",(0,n.jsxs)(t.p,{children:["The following API objects use a unique format for each ",(0,n.jsx)(t.code,{children:"transactionType"}),":"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"/public-networks/reference/api/objects#pending-transaction-object",children:"Pending transaction object"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"/public-networks/reference/api/objects#transaction-object",children:"Transaction object"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"/public-networks/reference/api/objects#transaction-call-object",children:"Transaction call object"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"/public-networks/reference/api/objects#transaction-receipt-object",children:"Transaction receipt object"})}),"\n"]}),"\n",(0,n.jsxs)(t.h2,{id:"frontier-transactions",children:[(0,n.jsx)(t.code,{children:"FRONTIER"})," transactions"]}),"\n",(0,n.jsxs)(t.p,{children:["Transactions with type ",(0,n.jsx)(t.code,{children:"FRONTIER"})," are ",(0,n.jsx)(t.em,{children:"legacy transactions"})," that use the transaction format existing before typed transactions were introduced in ",(0,n.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-2718",children:"EIP-2718"}),". They contain the parameters ",(0,n.jsx)(t.code,{children:"chainId"}),", ",(0,n.jsx)(t.code,{children:"nonce"}),", ",(0,n.jsx)(t.code,{children:"gasPrice"}),", ",(0,n.jsx)(t.code,{children:"gasLimit"}),", ",(0,n.jsx)(t.code,{children:"to"}),", ",(0,n.jsx)(t.code,{children:"value"}),", ",(0,n.jsx)(t.code,{children:"data"}),", ",(0,n.jsx)(t.code,{children:"v"}),", ",(0,n.jsx)(t.code,{children:"r"}),", and ",(0,n.jsx)(t.code,{children:"s"}),". Legacy transactions don't use ",(0,n.jsx)(t.a,{href:"#access_list-transactions",children:"access lists"})," or incorporate ",(0,n.jsx)(t.a,{href:"#eip1559-transactions",children:"EIP-1559 fee market changes"}),"."]}),"\n",(0,n.jsxs)(t.h2,{id:"access_list-transactions",children:[(0,n.jsx)(t.code,{children:"ACCESS_LIST"})," transactions"]}),"\n",(0,n.jsxs)(t.p,{children:["Transactions with type ",(0,n.jsx)(t.code,{children:"ACCESS_LIST"})," are transactions introduced in ",(0,n.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-2930",children:"EIP-2930"}),". They contain, along with the ",(0,n.jsx)(t.a,{href:"#frontier-transactions",children:"legacy parameters"}),", an ",(0,n.jsx)(t.code,{children:"accessList"})," parameter, which specifies an array of addresses and storage keys that the transaction plans to access (an ",(0,n.jsx)(t.em,{children:"access list"}),"). ",(0,n.jsx)(t.code,{children:"ACCESS_LIST"})," transactions must specify an access list, and they don't incorporate ",(0,n.jsx)(t.a,{href:"#eip1559-transactions",children:"EIP-1559 fee market changes"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["Use the ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_createaccesslist",children:(0,n.jsx)(t.code,{children:"eth_createAccessList"})})," API to simulate a transaction which returns the addresses and storage keys that may be used to send the real transaction, and the approximate gas cost."]}),"\n",(0,n.jsxs)(t.h2,{id:"eip1559-transactions",children:[(0,n.jsx)(t.code,{children:"EIP1559"})," transactions"]}),"\n",(0,n.jsxs)(t.p,{children:["Transactions with type ",(0,n.jsx)(t.code,{children:"EIP1559"})," are transactions introduced in ",(0,n.jsx)(t.a,{href:"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md",children:"EIP-1559"}),". EIP-1559 addresses the network congestion and overpricing of transaction fees caused by the historical fee market, in which users send transactions specifying a gas price bid using the ",(0,n.jsx)(t.code,{children:"gasPrice"})," parameter, and miners choose transactions with the highest bids."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"EIP1559"})," transactions don't specify ",(0,n.jsx)(t.code,{children:"gasPrice"}),", and instead use an in-protocol, dynamically changing ",(0,n.jsx)(t.em,{children:"base fee"})," per gas. At each block, the base fee per gas is adjusted to address network congestion as measured by a gas target."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"EIP1559"})," transactions contain, along with the ",(0,n.jsx)(t.a,{href:"#access_list-transactions",children:(0,n.jsx)(t.code,{children:"accessList"})})," parameter and ",(0,n.jsx)(t.a,{href:"#frontier-transactions",children:"legacy parameters"})," except for ",(0,n.jsx)(t.code,{children:"gasPrice"}),", a ",(0,n.jsx)(t.code,{children:"maxPriorityFeePerGas"})," parameter, which specifies the maximum fee the sender is willing to pay per gas above the base fee (the maximum ",(0,n.jsx)(t.em,{children:"priority fee"})," per gas), and a ",(0,n.jsx)(t.code,{children:"maxFeePerGas"})," parameter, which specifies the maximum total fee (base fee + priority fee) the sender is willing to pay per gas."]}),"\n",(0,n.jsxs)(t.p,{children:["An ",(0,n.jsx)(t.code,{children:"EIP1559"})," transaction always pays the base fee of the block it's included in, and it pays a priority fee as priced by ",(0,n.jsx)(t.code,{children:"maxPriorityFeePerGas"})," or, if the base fee per gas + ",(0,n.jsx)(t.code,{children:"maxPriorityFeePerGas"})," exceeds ",(0,n.jsx)(t.code,{children:"maxFeePerGas"}),", it pays a priority fee as priced by ",(0,n.jsx)(t.code,{children:"maxFeePerGas"})," minus the base fee per gas. The base fee is burned, and the priority fee is paid to the miner that included the transaction. A transaction's priority fee per gas incentivizes miners to include the transaction over other transactions with lower priority fees per gas."]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"EIP1559"})," transactions must specify both ",(0,n.jsx)(t.code,{children:"maxPriorityFeePerGas"})," and ",(0,n.jsx)(t.code,{children:"maxFeePerGas"}),". They must not specify ",(0,n.jsx)(t.code,{children:"gasPrice"}),"."]}),"\n",(0,n.jsxs)(t.h2,{id:"blob-transactions",children:[(0,n.jsx)(t.code,{children:"BLOB"})," transactions"]}),"\n",(0,n.jsxs)(t.p,{children:["Shard blob transactions introduced in ",(0,n.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-4844",children:"EIP-4844"})," enable scaling the\nEthereum network by allowing large amounts of data (blobs) to be included that cannot be directly accessed or\nprocessed by the Ethereum Virtual Machine (EVM)."]}),"\n",(0,n.jsx)(t.p,{children:"When the network includes a blob-carrying transaction in a block, the transaction doesn't actually contain\nthe blob data itself. Instead, it contains a commitment to this data. The EVM can verify this commitment to\nensure the data's availability and integrity without directly accessing the data."}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsx)(t.p,{children:"A commitment is a type of cryptographic proof that securely and verifiably confirms the existence and integrity\nof large data blobs."})}),"\n",(0,n.jsx)(t.p,{children:"This mechanism significantly reduces the computational and storage burden on the Ethereum network while ensuring\nthat the data is available for those who need it (for example, rollups or other layer 2 solutions that rely on data\navailability for their security and operation)."}),"\n",(0,n.jsx)(t.p,{children:"Blobs are temporarily stored by consensus clients such as Teku, and blocks on the execution layer permanently store\nthe reference to the blob."}),"\n",(0,n.jsx)(t.h3,{id:"view-blob-transaction-costs",children:"View blob transaction costs"}),"\n",(0,n.jsxs)(t.p,{children:["Use the ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_blobbasefee",children:(0,n.jsx)(t.code,{children:"eth_blobBaseFee"})})," method to view the current base\nfee per blob gas in wei."]}),"\n",(0,n.jsxs)(t.p,{children:["You can also use ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_feehistory",children:(0,n.jsx)(t.code,{children:"eth_feeHistory"})})," to view the historical\nblob transaction cost details."]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>c});var n=s(96540);const i={},a=n.createContext(i);function r(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0c3b97c4.69c0ec1a.js b/assets/js/0c3b97c4.69c0ec1a.js new file mode 100644 index 00000000000..abf9c5279f1 --- /dev/null +++ b/assets/js/0c3b97c4.69c0ec1a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2682],{30604:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var s=r(74848),n=r(28453);const i={title:"System requirements",description:"Ensure you meet the system requirements to sync and run Besu.",sidebar_position:1,tags:["private networks"]},o="System requirements",a={id:"private-networks/get-started/system-requirements",title:"System requirements",description:"Ensure you meet the system requirements to sync and run Besu.",source:"@site/docs/private-networks/get-started/system-requirements.md",sourceDirName:"private-networks/get-started",slug:"/private-networks/get-started/system-requirements",permalink:"/private-networks/get-started/system-requirements",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/get-started/system-requirements.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"System requirements",description:"Ensure you meet the system requirements to sync and run Besu.",sidebar_position:1,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Get started",permalink:"/private-networks/get-started"},next:{title:"Installation options",permalink:"/private-networks/get-started/install/"}},l={},d=[{value:"Determining system requirements",id:"determining-system-requirements",level:2},{value:"Java Virtual Machine size",id:"java-virtual-machine-size",level:2},{value:"VM requirements",id:"vm-requirements",level:2},{value:"Disk type",id:"disk-type",level:2}];function c(e){const t={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"system-requirements",children:"System requirements"})}),"\n",(0,s.jsx)(t.p,{children:"Private network system requirements depend on many factors, including:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Size of the world state for the network."}),"\n",(0,s.jsx)(t.li,{children:"Number of transactions submitted to the network."}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"/public-networks/reference/genesis-items#genesis-block-parameters",children:"Block gas limit"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:["Number and complexity of ",(0,s.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/json-rpc",children:"JSON-RPC"}),", ",(0,s.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/rpc-pubsub",children:"PubSub"}),", or ",(0,s.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/graphql",children:"GraphQL"})," queries handled by the node."]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Participation in private networks is typically restricted in some way, so the volume of traffic is much lower than on Mainnet, resulting in lower system requirements."}),"\n",(0,s.jsx)(t.h2,{id:"determining-system-requirements",children:"Determining system requirements"}),"\n",(0,s.jsxs)(t.p,{children:["To determine system requirements, check CPU and disk space requirements using ",(0,s.jsx)(t.a,{href:"/public-networks/how-to/monitor/metrics",children:"Prometheus"}),". Grafana provides a ",(0,s.jsx)(t.a,{href:"https://grafana.com/grafana/dashboards/10273",children:"sample dashboard"})," for Besu."]}),"\n",(0,s.jsx)(t.h2,{id:"java-virtual-machine-size",children:"Java Virtual Machine size"}),"\n",(0,s.jsx)(t.p,{children:"Depending on your environment and network setup, the minimum Java Virtual Machine (JVM) memory requirement for private networks is 4 GB."}),"\n",(0,s.jsx)(t.p,{children:"JVM memory requirements are highest when syncing, but will reduce after the node is synchronized to the chain head. Monitor your system to determine your actual JVM memory needs."}),"\n",(0,s.jsx)(t.h2,{id:"vm-requirements",children:"VM requirements"}),"\n",(0,s.jsxs)(t.p,{children:["If you set up your own VM locally using a VM manager such as ",(0,s.jsx)(t.a,{href:"https://www.oracle.com/virtualization/virtualbox/",children:"VirtualBox"}),":"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Ensure you enable Intel Virtualization Technology (VTx) and Virtualization Technology for Directed I/O (VT-d) in the BIOS settings."}),"\n",(0,s.jsx)(t.li,{children:"On Windows, you might need to disable Hyper-V in the Windows Feature list."}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"We recommend you create a VM with the following attributes:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Memory size: Set to 6 GB (recommended)"}),"\n",(0,s.jsx)(t.li,{children:"Create a virtual hard disk with at least 10 GB (20 GB recommended)"}),"\n",(0,s.jsx)(t.li,{children:"Virtual hard disk file type: VDI (if you need to share it with other apps, use VHD)"}),"\n",(0,s.jsxs)(t.li,{children:['(Optional) You can create a shared directory to copy block files or genesis files from the host computer to the VM. For details on how to create a shared directory, see "Share Folders" in the ',(0,s.jsx)(t.a,{href:"https://docs.oracle.com/en/virtualization/virtualbox/6.1/user/",children:"Oracle VirtualBox documentation"}),"."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"disk-type",children:"Disk type"}),"\n",(0,s.jsxs)(t.p,{children:["Use ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/compute/docs/disks",children:"local SSD storage"})," for high throughput nodes (validators and RPC nodes). Read-only nodes can use a lower performance setup."]}),"\n",(0,s.jsxs)(t.p,{children:["You can use local SSDs through ",(0,s.jsx)(t.a,{href:"https://en.wikipedia.org/wiki/SCSI",children:"SCSI interfaces"}),". For higher performance in production settings, we recommend upgrading to ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/compute/docs/disks/local-ssd#performance",children:"NVMe interfaces"}),"."]})]})}function u(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,t,r)=>{r.d(t,{R:()=>o,x:()=>a});var s=r(96540);const n={},i=s.createContext(n);function o(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0ea635c0.5a566d7a.js b/assets/js/0ea635c0.5a566d7a.js new file mode 100644 index 00000000000..89ffd58d9cd --- /dev/null +++ b/assets/js/0ea635c0.5a566d7a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6126],{54036:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>f,frontMatter:()=>o,metadata:()=>c,toc:()=>l});var s=i(74848),t=i(28453);const o={title:"Genesis file",sidebar_position:9,description:"Learn about configuring a network using the genesis file.",tags:["public networks","private networks"]},r="Genesis file",c={id:"public-networks/concepts/genesis-file",title:"Genesis file",description:"Learn about configuring a network using the genesis file.",source:"@site/docs/public-networks/concepts/genesis-file.md",sourceDirName:"public-networks/concepts",slug:"/public-networks/concepts/genesis-file",permalink:"/public-networks/concepts/genesis-file",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/concepts/genesis-file.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:9,frontMatter:{title:"Genesis file",sidebar_position:9,description:"Learn about configuring a network using the genesis file.",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Events and logs",permalink:"/public-networks/concepts/events-and-logs"},next:{title:"Node keys",permalink:"/public-networks/concepts/node-keys"}},a={},l=[];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",header:"header",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"genesis-file",children:"Genesis file"})}),"\n",(0,s.jsx)(n.p,{children:"The genesis file defines the first block in the chain, and the first block defines which chain you want to join."}),"\n",(0,s.jsxs)(n.p,{children:["For Ethereum Mainnet and public testnets (for example, Holesky) the genesis configuration definition is in Besu and used when specifying a public network using the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#network",children:(0,s.jsx)(n.code,{children:"--network"})})," command line option."]}),"\n",(0,s.jsxs)(n.p,{children:["For private networks, ",(0,s.jsx)(n.a,{href:"https://consensys.net/blog/quorum/hyperledger-besu-how-to-create-an-ethereum-genesis-file/",children:"create a JSON genesis file"}),", then specify the genesis file using the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#genesis-file",children:(0,s.jsx)(n.code,{children:"--genesis-file"})})," command line option."]}),"\n",(0,s.jsxs)(n.p,{children:["The genesis file specifies the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/genesis-items",children:"network-wide settings"}),", such as those for a ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/free-gas",children:"free gas network"}),", so all nodes in a network must use the same genesis file."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["You can specify node-level settings on the command line or in the ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/",children:"node configuration file"}),"."]})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",metastring:'title="Example IBFT 2.0 genesis file"',children:'{\n "config": {\n "chainId": 2018,\n "berlinBlock": 0,\n "ibft2": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n }\n },\n "nonce": "0x0",\n "timestamp": "0x58ee40ba",\n "extraData": "0xf83ea00000000000000000000000000000000000000000000000000000000000000000d5949811ebc35d7b06b3fa8dc5809a1f9c52751e1deb808400000000c0",\n "gasLimit": "0x1fffffffffffff",\n "difficulty": "0x1",\n "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",\n "coinbase": "0x0000000000000000000000000000000000000000",\n "alloc": {\n "9811ebc35d7b06b3fa8dc5809a1f9c52751e1deb": {\n "balance": "0xad78ebc5ac6200000"\n }\n }\n}\n'})})]})}function f(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>c});var s=i(96540);const t={},o=s.createContext(t);function r(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:r(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/0f663201.d73cba55.js b/assets/js/0f663201.d73cba55.js new file mode 100644 index 00000000000..cf75acfe41d --- /dev/null +++ b/assets/js/0f663201.d73cba55.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2331],{94007:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var t=s(74848),o=s(28453);const i={title:"Node synchronization",sidebar_position:4,description:"Learn about node synchronization for public networks.",tags:["public networks"]},r="Node synchronization",a={id:"public-networks/concepts/node-sync",title:"Node synchronization",description:"Learn about node synchronization for public networks.",source:"@site/docs/public-networks/concepts/node-sync.md",sourceDirName:"public-networks/concepts",slug:"/public-networks/concepts/node-sync",permalink:"/public-networks/concepts/node-sync",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/concepts/node-sync.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Node synchronization",sidebar_position:4,description:"Learn about node synchronization for public networks.",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Data storage formats",permalink:"/public-networks/concepts/data-storage-formats"},next:{title:"Parallel transaction execution",permalink:"/public-networks/concepts/parallel-transaction-execution"}},c={},d=[{value:"Node types",id:"node-types",level:2},{value:"Full nodes",id:"full-nodes",level:3},{value:"Archive nodes",id:"archive-nodes",level:3},{value:"Sync modes",id:"sync-modes",level:2},{value:"Snap synchronization",id:"snap-synchronization",level:3},{value:"Checkpoint synchronization",id:"checkpoint-synchronization",level:3},{value:"Fast synchronization (Deprecated)",id:"fast-synchronization-deprecated",level:3},{value:"Full synchronization",id:"full-synchronization",level:3},{value:"Sync times",id:"sync-times",level:2},{value:"Storage",id:"storage",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components},{Details:i}=n;return i||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"node-synchronization",children:"Node synchronization"})}),"\n",(0,t.jsxs)(n.p,{children:["Besu supports two ",(0,t.jsx)(n.a,{href:"#node-types",children:"node types"})," and several ",(0,t.jsx)(n.a,{href:"#sync-modes",children:"synchronization modes"})," on\npublic networks."]}),"\n",(0,t.jsx)(n.h2,{id:"node-types",children:"Node types"}),"\n",(0,t.jsx)(n.h3,{id:"full-nodes",children:"Full nodes"}),"\n",(0,t.jsxs)(n.p,{children:["A full node consists of an\n",(0,t.jsx)(n.a,{href:"/public-networks/concepts/node-clients#execution-and-consensus-clients",children:"execution and consensus client"}),",\nand stores a local copy of the blockchain.\nWith a full node, you can check current balances, sign and send transactions, and look at current\ndapp data."]}),"\n",(0,t.jsx)(n.p,{children:"Full nodes can guarantee the latest state of the blockchain (and some older states). However, they\ncan't serve the network with all data requests (for example, the balance of an account at an old\nblock)."}),"\n",(0,t.jsxs)(n.p,{children:["You can run a full node using ",(0,t.jsx)(n.a,{href:"#snap-synchronization",children:"snap synchronization"}),",\n",(0,t.jsx)(n.a,{href:"#checkpoint-synchronization",children:"checkpoint synchronization"}),", or\n",(0,t.jsx)(n.a,{href:"#fast-synchronization-deprecated",children:"fast synchronization"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"archive-nodes",children:"Archive nodes"}),"\n",(0,t.jsx)(n.p,{children:"An archive node is a node that also stores the intermediary state of every account and contract\nfor every block since the genesis block.\nArchive nodes can do everything full nodes do, and they can also access historical state data.\nThis means that archive nodes require more disk space than full nodes."}),"\n",(0,t.jsxs)(n.p,{children:["You can only run an archive node using ",(0,t.jsx)(n.a,{href:"#full-synchronization",children:"full synchronization"}),"."]}),"\n",(0,t.jsx)(n.admonition,{title:"important",type:"caution",children:(0,t.jsxs)(n.p,{children:["Do not run an archive node with the ",(0,t.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai Tries"}),"\ndata storage format.\nBonsai is designed for retrieving recent data only."]})}),"\n",(0,t.jsx)(n.h2,{id:"sync-modes",children:"Sync modes"}),"\n",(0,t.jsx)(n.p,{children:"Besu supports several synchronization modes for different network types, node types, and use cases.\nThe following is an overview of the public network sync modes:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Sync mode"}),(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Requirements"}),(0,t.jsx)(n.th,{children:"Limitations"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"#snap-synchronization",children:"Snap"})}),(0,t.jsx)(n.td,{children:"Efficient sync from genesis block, downloading as many trie leaves as possible and reconstructing locally. Faster than fast sync."}),(0,t.jsx)(n.td,{children:"Besu version 22.4.0 or later"}),(0,t.jsx)(n.td,{children:"Cannot switch from fast sync to snap sync mid-process."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"#checkpoint-synchronization",children:"Checkpoint"})}),(0,t.jsx)(n.td,{children:"Syncs from a specific checkpoint block configured in the genesis file. Fastest sync mode with lowest storage requirements."}),(0,t.jsx)(n.td,{children:"Besu version 22.4.3 or later"}),(0,t.jsx)(n.td,{})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"#fast-synchronization-deprecated",children:"Fast"})}),(0,t.jsx)(n.td,{children:"Downloads block headers and transaction receipts, verifies chain from genesis block."}),(0,t.jsx)(n.td,{children:"None"}),(0,t.jsx)(n.td,{children:"Deprecated in Besu version 24.12.0 and later."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"#full-synchronization",children:"Full"})}),(0,t.jsx)(n.td,{children:"Downloads and verifies the entire blockchain and state from genesis block, building an archive node with full state history."}),(0,t.jsx)(n.td,{children:"None"}),(0,t.jsx)(n.td,{children:"Slowest sync mode, requires the most disk space."})]})]})]}),"\n",(0,t.jsx)(n.admonition,{title:"Private network syncing",type:"info",children:(0,t.jsxs)(n.p,{children:["Private networks can use the same sync methods as public networks, but might require different configurations.\nSee ",(0,t.jsx)(n.a,{href:"/private-networks/concepts/node-sync-private",children:"Node synchronization for private networks"})," for more information."]})}),"\n",(0,t.jsx)(n.admonition,{title:"Troubleshooting",type:"note",children:(0,t.jsxs)(n.p,{children:["Besu must connect with other peers to sync with the network.\nIf your node is having trouble peering, try ",(0,t.jsx)(n.a,{href:"/public-networks/how-to/troubleshoot/peering",children:"troubleshooting peering"}),"."]})}),"\n",(0,t.jsx)(n.h3,{id:"snap-synchronization",children:"Snap synchronization"}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["We recommend using snap sync over fast sync because snap sync can be faster than fast sync by\nseveral days (for Mainnet).\nUse snap sync with the ",(0,t.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai"}),"\ndata storage format for the fastest sync and lowest storage requirements."]})}),"\n",(0,t.jsxs)(n.p,{children:["Snap sync is the default sync mode for all named ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#network",children:"networks"}),"\nexcept ",(0,t.jsx)(n.code,{children:"dev"}),".\nYou can enable snap sync using ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:(0,t.jsx)(n.code,{children:"--sync-mode=SNAP"})}),".\nYou need Besu version 22.4.0 or later to use snap sync."]}),"\n",(0,t.jsxs)(n.p,{children:["Instead of downloading the ",(0,t.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats",children:"state trie"})," node by node, snap\nsync downloads as many leaves of the trie as possible, and reconstructs the trie locally."]}),"\n",(0,t.jsxs)(n.p,{children:["You can't switch from fast sync to snap sync. If your node is blocked in the middle of a fast sync,\nyou can start over using snap sync instead by stopping the node, deleting the data directory, and\nstarting over using ",(0,t.jsx)(n.code,{children:"--sync-mode=SNAP"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"You can restart Besu during a snap sync in case of hardware or software problems. The sync resumes\nfrom the last valid world state and continues to download blocks starting from the last downloaded\nblock."}),"\n",(0,t.jsxs)(n.p,{children:["See ",(0,t.jsx)(n.a,{href:"/public-networks/how-to/monitor/understand-metrics",children:"how to read the Besu metrics charts"})," when using\nsnap sync."]}),"\n",(0,t.jsx)(n.h3,{id:"checkpoint-synchronization",children:"Checkpoint synchronization"}),"\n",(0,t.jsxs)(n.p,{children:["You can enable checkpoint sync using ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:(0,t.jsx)(n.code,{children:"--sync-mode=CHECKPOINT"})}),".\nYou need Besu version 22.4.3 or later to use checkpoint sync."]}),"\n",(0,t.jsxs)(n.p,{children:["Checkpoint sync behaves like ",(0,t.jsx)(n.a,{href:"#snap-synchronization",children:"snap sync"}),", but instead of syncing from the\ngenesis block, it syncs from a specific checkpoint block configured in the ",(0,t.jsx)(n.a,{href:"/public-networks/concepts/genesis-file",children:"Besu genesis file"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Ethereum Mainnet, Holesky, and Ephemery testnet configurations already define default checkpoints, so you\ndon't have to add this yourself."}),"\n",(0,t.jsx)(n.p,{children:"For other networks, you can configure a checkpoint in the genesis file by specifying the block hash,\nnumber, and total difficulty as in the following example."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",metastring:'title="Checkpoint configuration example"',children:'"checkpoint": {\n "hash": "0x844d581cb00058d19f0584fb582fa2de208876ee56bbae27446a679baf4633f4",\n "number": 14700000,\n "totalDifficulty": "0xA2539264C62BF98CFC6"\n}\n'})}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["If using ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/clique",children:"Clique"})," consensus, the\ncheckpoint must be the beginning of an epoch."]})}),"\n",(0,t.jsx)(n.p,{children:"If you enable checkpoint sync without a checkpoint configuration in the genesis file, Besu snap\nsyncs from the genesis block."}),"\n",(0,t.jsx)(n.p,{children:"You can restart Besu during a checkpoint sync in case of hardware or software problems. The sync\nresumes from the last valid world state and continues to download blocks starting from the last\ndownloaded block."}),"\n",(0,t.jsx)(n.h3,{id:"fast-synchronization-deprecated",children:"Fast synchronization (Deprecated)"}),"\n",(0,t.jsxs)(n.admonition,{type:"caution",children:[(0,t.jsxs)(n.p,{children:["Fast sync is deprecated in Besu version 24.12.0 and later. Please read this ",(0,t.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]}),(0,t.jsx)(n.p,{children:"If you sync for the first time or need to re-sync, update Besu to a version that supports newer sync methods."})]}),"\n",(0,t.jsxs)(n.p,{children:["You can enable fast sync using ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:(0,t.jsx)(n.code,{children:"--sync-mode=FAST"})}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Fast sync downloads the block headers and transaction receipts, and verifies the chain of block\nheaders from the genesis block."}),"\n",(0,t.jsx)(n.p,{children:"When starting fast sync, Besu first downloads the world state for a recent block verified by its\npeers (referred to as a pivot block), and then begins fast sync from the genesis block."}),"\n",(0,t.jsxs)(n.p,{children:["Using fast sync with ",(0,t.jsx)(n.a,{href:"/private-networks/concepts/privacy/",children:"private transactions"}),"\nisn't supported."]}),"\n",(0,t.jsxs)(n.p,{children:["You can observe the ",(0,t.jsx)(n.code,{children:"besu_synchronizer_fast_sync_*"})," and ",(0,t.jsx)(n.code,{children:"besu_synchronizer_world_state_*"}),"\n",(0,t.jsx)(n.a,{href:"/public-networks/how-to/monitor/metrics#view-the-metrics-list",children:"metrics"})," to monitor fast sync."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"When fast syncing, block numbers increase until close to the head block, then the process pauses\nwhile the world state download completes. This may take a significant amount of time depending on\nworld state size, during which the current head block doesn't increase. For example, Mainnet may\ntake several days or more to fast sync. Fast sync time may increase because Besu picks new pivot\nblocks, or because peers prune the world state before it completes downloading."})}),"\n",(0,t.jsxs)(i,{children:[(0,t.jsx)("summary",{children:"RocksDB error on AWS"}),(0,t.jsxs)(n.p,{children:["When running Besu on some cloud providers, a known\n",(0,t.jsx)(n.a,{href:"https://github.com/facebook/rocksdb/issues/6435",children:"RocksDB"})," issue causes fast sync to fail occasionally.\nThe following error is displayed repeatedly:"]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"EthScheduler-Services-1 (importBlock) | ERROR | PipelineChainDownloader | Chain download failed. \nRestarting after short delay.\njava.util.concurrent.CompletionException: org.hyperledger.besu.plugin.services.exception.StorageException: org.rocksdb.RocksDBException: block checksum mismatch:\n"})}),(0,t.jsxs)(n.p,{children:["The failure has been seen on AWS and Digital Ocean. On AWS, A full restart of the VM is required to\nrestart the fast sync. Fast sync isn't\n",(0,t.jsx)(n.a,{href:"https://github.com/hyperledger/besu/blob/750580dcca349d22d024cc14a8171b2fa74b505a/CHANGELOG.md#143",children:"currently supported on Digital Ocean"}),"."]})]}),"\n",(0,t.jsxs)(i,{children:[(0,t.jsx)("summary",{children:"Pending state nodes stays constant"}),(0,t.jsx)(n.p,{children:"When fast syncing, the pending state nodes count is the number of nodes yet to be downloaded, and it\nshould change constantly. Pending state nodes trend to 0 during fast sync and then goes to 0."}),(0,t.jsx)(n.p,{children:"If the number stays constant, this could mean your node isn't syncing against any peers."}),(0,t.jsx)(n.p,{children:"In the following example, the pivot block is 0 and the pending state nodes value is constant. This\nmeans the node isn't syncing against any peers. The fact that state nodes have been downloaded means\nat some stage it was syncing."}),(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Fast synchronization",src:s(55428).A+"",width:"2081",height:"260"})}),(0,t.jsx)(n.p,{children:"The easiest solution in this scenario is to restart fast sync to obtain a new pivot block."})]}),"\n",(0,t.jsx)(n.h3,{id:"full-synchronization",children:"Full synchronization"}),"\n",(0,t.jsxs)(n.p,{children:["Full sync is the default sync mode for the ",(0,t.jsxs)(n.a,{href:"/public-networks/reference/cli/options#network",children:[(0,t.jsx)(n.code,{children:"dev"})," network"]}),".\nYou can enable full sync using ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:(0,t.jsx)(n.code,{children:"--sync-mode=FULL"})}),".\nUse full sync to run an ",(0,t.jsx)(n.a,{href:"#archive-nodes",children:"archive node"}),".\nFull sync starts from the genesis block and reprocesses all transactions."]}),"\n",(0,t.jsx)(n.admonition,{title:"important",type:"caution",children:(0,t.jsxs)(n.p,{children:["Do not run an archive node with the ",(0,t.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai Tries"}),"\ndata storage format.\nBonsai is designed for retrieving recent data only."]})}),"\n",(0,t.jsx)(n.h2,{id:"sync-times",children:"Sync times"}),"\n",(0,t.jsx)(n.p,{children:"To sync with a public network, Besu runs two processes in parallel: the world state sync and the\nblockchain download."}),"\n",(0,t.jsx)(n.p,{children:"While the world state syncs, Besu downloads and imports the blockchain in the background.\nThe blockchain download time depends on CPU, the network, Besu's peers, and disk speed.\nThe blockchain download generally takes longer than the world state sync. Besu must catch up to the\ncurrent chain head and sync the world state to participate on Mainnet."}),"\n",(0,t.jsx)(n.p,{children:"The following table shows the average world state sync time, and blockchain download time, for each\nsync mode on Mainnet."}),"\n",(0,t.jsx)(n.p,{children:"All times are hardware dependent; this table is based on running AWS instances m6gd.2xlarge.\nEach sync mode also has its own world state database size."}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Sync mode"}),(0,t.jsx)(n.th,{children:"Time to sync world state"}),(0,t.jsx)(n.th,{children:"Time to download blockchain"}),(0,t.jsx)(n.th,{children:"Disk usage"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Snap"}),(0,t.jsx)(n.td,{children:"~6 hours"}),(0,t.jsx)(n.td,{children:"~1.5 days"}),(0,t.jsx)(n.td,{children:"Average disk"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Checkpoint"}),(0,t.jsx)(n.td,{children:"~5 hours"}),(0,t.jsx)(n.td,{children:"~13 hours"}),(0,t.jsx)(n.td,{children:"Smallest disk"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Fast"}),(0,t.jsx)(n.td,{children:"~1.5 days"}),(0,t.jsx)(n.td,{children:"~1.5 days"}),(0,t.jsx)(n.td,{children:"Average disk"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Full"}),(0,t.jsx)(n.td,{children:"~weeks"}),(0,t.jsx)(n.td,{children:"~weeks"}),(0,t.jsx)(n.td,{children:"Largest disk"})]})]})]}),"\n",(0,t.jsx)(n.admonition,{title:"Notes",type:"note",children:(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Snap and checkpoint syncs handle blockchain data similarly to fast sync, but differ in how they\nprocess world state data."}),"\n",(0,t.jsxs)(n.li,{children:["As of late 2023, an average Mainnet snap sync consumes around 1000 GB using Bonsai Tries.\nRead more about ",(0,t.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#storage-requirements",children:"storage requirements"}),"\nacross data storage formats and sync modes."]}),"\n",(0,t.jsx)(n.li,{children:"Testnets take significantly less time and space to sync."}),"\n"]})}),"\n",(0,t.jsx)(n.h2,{id:"storage",children:"Storage"}),"\n",(0,t.jsxs)(n.p,{children:["You can store the world state using ",(0,t.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#forest-of-tries",children:"Forest of Tries"}),"\nor ",(0,t.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai Tries"}),".\nBesu uses Bonsai by default."]}),"\n",(0,t.jsxs)(n.p,{children:["If you're running a ",(0,t.jsx)(n.a,{href:"#full-nodes",children:"full node"}),", we recommend using Bonsai for the lowest storage requirements."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},55428:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/fastsync-8fadeea99996664121739a3d76a88124.png"},28453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>a});var t=s(96540);const o={},i=t.createContext(o);function r(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/12718c4a.28e34d69.js b/assets/js/12718c4a.28e34d69.js new file mode 100644 index 00000000000..b33822fcfc6 --- /dev/null +++ b/assets/js/12718c4a.28e34d69.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8472],{39418:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>l});var s=t(74848),i=t(28453);const a={title:"Parallel transaction execution",sidebar_position:5,description:"Learn about parallel transaction execution.",tags:["public networks"]},o="Parallel transaction execution",r={id:"public-networks/concepts/parallel-transaction-execution",title:"Parallel transaction execution",description:"Learn about parallel transaction execution.",source:"@site/docs/public-networks/concepts/parallel-transaction-execution.md",sourceDirName:"public-networks/concepts",slug:"/public-networks/concepts/parallel-transaction-execution",permalink:"/public-networks/concepts/parallel-transaction-execution",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/concepts/parallel-transaction-execution.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:5,frontMatter:{title:"Parallel transaction execution",sidebar_position:5,description:"Learn about parallel transaction execution.",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Node synchronization",permalink:"/public-networks/concepts/node-sync"},next:{title:"Transaction types",permalink:"/public-networks/concepts/transactions/types"}},c={},l=[{value:"Parallelization mechanism overview",id:"parallelization-mechanism-overview",level:2},{value:"Conflict detection strategy",id:"conflict-detection-strategy",level:3},{value:"Metrics",id:"metrics",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",mermaid:"mermaid",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"parallel-transaction-execution",children:"Parallel transaction execution"})}),"\n",(0,s.jsxs)(n.p,{children:["Besu supports parallel transaction execution, using an optimistic approach to parallelize\ntransactions within a block.\nYou can enable this feature when using the ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai Tries"})," data\nstorage format.\nThis page provides an ",(0,s.jsx)(n.a,{href:"#parallelization-mechanism-overview",children:"overview of the parallelization mechanism"}),",\nand ",(0,s.jsx)(n.a,{href:"#metrics",children:"metrics"})," that highlight Besu's improved performance."]}),"\n",(0,s.jsx)(n.admonition,{title:"Important",type:"warning",children:(0,s.jsxs)(n.p,{children:["Parallel transaction execution is an early access feature.\nYou can enable it using the ",(0,s.jsx)(n.code,{children:"--Xbonsai-parallel-tx-processing-enabled"})," option."]})}),"\n",(0,s.jsx)(n.h2,{id:"parallelization-mechanism-overview",children:"Parallelization mechanism overview"}),"\n",(0,s.jsx)(n.p,{children:"When parallel transaction execution is enabled, Besu initially executes all transactions within a\nblock in parallel, operating under the optimistic assumption that they can all be executed\nconcurrently without conflict.\nThis parallel execution runs in the background, and Besu proceeds to sequentially process the\ntransactions without waiting for the parallel execution to complete."}),"\n",(0,s.jsx)(n.p,{children:"The following flowchart outlines the transaction execution flow:"}),"\n",(0,s.jsx)("p",{align:"center",children:(0,s.jsx)(n.mermaid,{value:"graph TD;\n X(Start parallel execution as background process) --\x3e A(Start sequential processing);\n A --\x3e B{{Is transaction completed by background process?}};\n B --\x3e |Yes| C{{Conflict check}};\n C --\x3e |No conflict| D(Apply background state modifications);\n C --\x3e |Conflict detected| E(Replay transaction using background cache);\n B --\x3e |No| F(Execute transaction sequentially);\n D --\x3e G(End sequential processing);\n E --\x3e G;\n F --\x3e G;"})}),"\n",(0,s.jsx)(n.p,{children:"Besu first determines if a transaction has been completed by the background parallel execution:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Completed:"})," If the transaction is completed, Besu examines whether there are any conflicts with\npreviously executed transactions.","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"No conflict:"})," If no conflict is detected, Besu directly applies the state modifications\ngenerated in the background to the block, avoiding re-execution."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Conflict detected:"})," If a conflict is detected, Besu replays the transaction, using a cache of\nbackground reads to improve efficiency."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Not completed:"})," If the transaction is not completed, Besu executes it sequentially within the\nblock to ensure its completion, independent of the background execution."]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"conflict-detection-strategy",children:"Conflict detection strategy"}),"\n",(0,s.jsxs)(n.p,{children:["Besu's conflict detection strategy uses the ",(0,s.jsx)(n.em,{children:"accumulator"}),", a\n",(0,s.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai Tries"})," feature that tracks addresses and slots touched\nor modified during block or transaction execution."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["You can read more about Bonsai Tries in ",(0,s.jsx)(n.a,{href:"https://consensys.io/blog/bonsai-tries-guide",children:"Consensys' Guide to Bonsai Tries"}),"."]})}),"\n",(0,s.jsx)(n.p,{children:"If a slot, code, or anything else related to an account is modified, the Bonsai accumulator keeps\ntrack of this information.\nThis strategy leverages Bonsai's storage benefits, only keeping track of block-to-block state diffs\nin Besu storage."}),"\n",(0,s.jsx)(n.p,{children:"The following flowchart outlines how Besu detects conflicts and imports transactions into the block:"}),"\n",(0,s.jsx)("p",{align:"center",children:(0,s.jsx)(n.mermaid,{value:"graph TD;\n A(Start block import) --\x3e B(Fetch block's touched addresses);\n B --\x3e C{{For each transaction}};\n C --\x3e|Next transaction| D(Fetch transaction's touched addresses);\n D --\x3e E{{Compare addresses}};\n E --\x3e|Conflict detected| F(Replay transaction using cached data);\n E --\x3e|No conflict| G(Apply transaction result directly \u2013 no replay);\n F --\x3e H{{Attempt to read from cache}};\n H --\x3e|Data found in cache| I(Continue replay using cached data);\n H --\x3e|Data not found in cache| J(Fetch data from disk);\n I --\x3e K(Transaction replay complete);\n J --\x3e K;\n K --\x3e L(Apply transaction changes);\n G --\x3e L;\n L --\x3e M{{More transactions?}};\n M --\x3e|Yes| C;\n M --\x3e|No| N(End block import);"})}),"\n",(0,s.jsx)(n.p,{children:"Besu takes what the accumulator tracks at the block and transaction level, compares the\ntransaction's list of touched addresses to the block's list, and checks for conflicts.\nIn particular:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Besu identifies conflicts by checking whether a transaction has interacted with accounts modified\nby the block (that is, modified by previous transactions)."}),"\n",(0,s.jsx)(n.li,{children:"If a conflict is detected, Besu replays the transaction using cached data or data fetched from disk."}),"\n",(0,s.jsx)(n.li,{children:"Each time a transaction is added to the block, Besu incorporates the transaction's tracked list\ninto the block's list."}),"\n"]}),"\n",(0,s.jsxs)(n.admonition,{title:"Note",type:"info",children:[(0,s.jsx)(n.p,{children:"The following are excluded from the conflict check:"}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Unchanged accounts read by the block."}),"\n",(0,s.jsx)(n.li,{children:"Rewards given to the validator coinbase address at the end of each transaction.\nIf these were considered, every transaction would conflict with the coinbase address.\nBesu identifies this address as a conflict only if it is accessed for reasons other than receiving\nrewards at the transaction's conclusion."}),"\n"]})]}),"\n",(0,s.jsx)(n.p,{children:"The following flowchart outlines how Besu maintains the lists of tracked addresses:"}),"\n",(0,s.jsx)("p",{align:"center",children:(0,s.jsx)(n.mermaid,{value:"graph TD;\n A(Start) --\x3e B(Fetch block's touched addresses);\n B --\x3e C{{Check each address}};\n C --\x3e|Unchanged| D(Mark as read);\n C --\x3e|Modified| E(Add to block's tracked addresses);\n D --\x3e F{{Next address}};\n E --\x3e F;\n F --\x3e|More addresses?| C;\n F --\x3e|No more| G(Fetch transaction's touched addresses);\n G --\x3e H{{For each transaction address}};\n H --\x3e|From, sender, etc.| I(Add to transaction's tracked addresses);\n I --\x3e J{{Next address}};\n J --\x3e|More addresses?| H;\n J --\x3e|No more| K{{Compare block and transaction addresses}};\n K --\x3e|Conflict detected| L(Conflict is detected);\n K --\x3e|No conflict| M(Proceed with transaction);\n L --\x3e N(End);\n M --\x3e N;"})}),"\n",(0,s.jsxs)(n.p,{children:["Besu's conflict detection strategy is intentionally simple to minimize edge cases.\nWith this approach to parallel transaction execution,\n",(0,s.jsx)(n.a,{href:"#metrics",children:"approximately 40% of transactions do not require replay"}),".\nIn the future, the conflict detection strategy may be refined to reduce false positives."]}),"\n",(0,s.jsxs)(n.p,{children:["You can enable parallel transaction execution using the ",(0,s.jsx)(n.code,{children:"--Xbonsai-parallel-tx-processing-enabled"})," option."]}),"\n",(0,s.jsx)(n.h2,{id:"metrics",children:"Metrics"}),"\n",(0,s.jsx)(n.p,{children:"Parallel transaction execution uses Besu's resources more efficiently than traditional\nsequential execution, significantly improving performance."}),"\n",(0,s.jsx)(n.p,{children:"The following metrics were collected on nodes running on Azure VMs (Standard D8as v5 \u2013 8 vCPUs, 32\nGiB memory), with Teku and Nimbus as consensus layer (CL) clients:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Block processing time"})," - With Teku as CL client, block processing time improves by at least 25%.\nThe 50th percentile decreases from 282 ms to 207 ms and the 95th\npercentile decreases from 479 ms to 393 ms."]}),"\n",(0,s.jsx)(n.p,{children:"With Nimbus as CL client, block processing improves by approximately 45%, with the 50th percentile\nat 155 ms, and the 95th percentile at 299 ms.\nBesu running with Nimbus has better performance than with Teku because Nimbus has less overhead on\nBesu, meaning less context switching and fewer cache misses."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Execution throughput"})," - Execution throughput increases, with an average of 96 Mgas/s and peaks\nof up to 250 Mgas/s."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Parallel transactions"})," - Parallel transaction execution introduces two new metrics, which\nindicate that approximately 40% of transactions are parallelized using this feature:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"besu_block_processing_parallelized_transactions_counter_total"})," - The number of transactions\nexecuted in parallel."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"besu_block_processing_conflicted_transactions_counter_total"})," - The number of transactions that\nencountered conflicts and were therefore executed sequentially."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Sync time"})," - Snap synchronization time is approximately 27 hours and 5 minutes, with block import\ntime approximately 6 ms on average."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"CPU profiling"})," - The new payload call time decreases from 251.68 ms to 172.04 ms on average,\nwith notable improvements in SLOAD operation times."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"During the faster block processing time, Besu uses more CPU and more disk accesses in parallel\n(higher IOPS).\nHowever, when these metrics are averaged on different monitoring tools, the resource usage looks the same as\nwith sequential execution.\nOverall, parallel transaction execution improves Besu performance with almost no resource usage\noverhead."})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var s=t(96540);const i={},a=s.createContext(i);function o(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/13034d1e.f4f5a1b7.js b/assets/js/13034d1e.f4f5a1b7.js new file mode 100644 index 00000000000..9e719f9a2f1 --- /dev/null +++ b/assets/js/13034d1e.f4f5a1b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5946],{61801:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>i,metadata:()=>u,toc:()=>d});var a=t(74848),r=t(28453),o=t(11470),s=t(19365);const i={title:"Manage JVM memory",sidebar_position:3,description:"Besu memory management",tags:["public networks","private networks"]},l="Manage JVM memory",u={id:"public-networks/how-to/configure-java/manage-memory",title:"Manage JVM memory",description:"Besu memory management",source:"@site/docs/public-networks/how-to/configure-java/manage-memory.md",sourceDirName:"public-networks/how-to/configure-java",slug:"/public-networks/how-to/configure-java/manage-memory",permalink:"/public-networks/how-to/configure-java/manage-memory",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/configure-java/manage-memory.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Manage JVM memory",sidebar_position:3,description:"Besu memory management",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Pass JVM options",permalink:"/public-networks/how-to/configure-java/pass-jvm-options"},next:{title:"Use Java Flight Recorder",permalink:"/public-networks/how-to/configure-java/java-flight-recorder"}},c={},d=[{value:"Manage the heap dump",id:"manage-the-heap-dump",level:2},{value:"Default options",id:"default-options",level:2}];function h(e){const n={admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"manage-jvm-memory",children:"Manage JVM memory"})}),"\n",(0,a.jsx)(n.p,{children:"You can manage Java Virtual Machine (JVM) memory usage for Besu by modifying the maximum heap size."}),"\n",(0,a.jsx)(n.p,{children:"By default, the JVM uses 25% of system RAM. For example, if you have 16 GB RAM installed, the JVM uses 4 GB by default."}),"\n",(0,a.jsx)(n.p,{children:"On public networks, we recommend setting the maximum heap size to:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"3 GB on an 8 GB RAM system."}),"\n",(0,a.jsx)(n.li,{children:"5 GB on a 16 GB RAM system."}),"\n",(0,a.jsx)(n.li,{children:"8 GB on a system with at least 24 GB RAM."}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsx)(n.p,{children:"Setting a higher maximum heap size speeds up the sync period but doesn't have much impact after sync. Thus, we recommend setting it to 8 GB only when you have available RAM."})}),"\n",(0,a.jsxs)(n.p,{children:["You can set the maximum heap size using the ",(0,a.jsx)(n.code,{children:"BESU_OPTS"})," environment variable and the ",(0,a.jsx)(n.code,{children:"-Xmx"})," option. The following examples set the maximum heap size to 8 GB:"]}),"\n",(0,a.jsxs)(o.A,{children:[(0,a.jsxs)(s.A,{value:"Exported environment variable",default:!0,children:[(0,a.jsx)(n.p,{children:"Set the variable for the whole shell before running Besu."}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"export BESU_OPTS=-Xmx8g\n"})})]}),(0,a.jsxs)(s.A,{value:"Inline environment variable",children:[(0,a.jsx)(n.p,{children:"Set the variable only for the specific Besu command."}),(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_OPTS=-Xmx8g besu [Besu options]\n"})})]}),(0,a.jsx)(s.A,{value:".service file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'[Service]\n...\nEnvironment="BESU_OPTS=-Xmx8g"\nExecStart=besu [Besu options]\n...\n'})})})]}),"\n",(0,a.jsx)(n.h2,{id:"manage-the-heap-dump",children:"Manage the heap dump"}),"\n",(0,a.jsxs)(n.p,{children:["Heap dump file generation is disabled by default. To enable it, set the ",(0,a.jsx)(n.code,{children:"-XX:+HeapDumpOnOutOfMemoryError"})," Java option."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_OPTS="-XX:+HeapDumpOnOutOfMemoryError"\n'})}),"\n",(0,a.jsx)(n.p,{children:"When heap dump file generation is enabled, and an out-of-memory error occurs, the heap dump file is saved in the Besu runtime directory by default."}),"\n",(0,a.jsxs)(n.p,{children:["The heap dump file might be large and can saturate your drive. It can be up to the size of the allocated memory. For example, for 8 GB heap memory, the file can be up to 8 GB. Specify the directory where you want the dump to be saved using the ",(0,a.jsx)(n.code,{children:"-XX:HeapDumpPath"})," Java option."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_OPTS="-XX:HeapDumpPath=///"\n'})}),"\n",(0,a.jsx)(n.h2,{id:"default-options",children:"Default options"}),"\n",(0,a.jsx)(n.p,{children:"To reduce Besu memory footprint, the following G1GC Java options are enabled by default:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"-XX:G1ConcRefinementThreads=2\n-XX:G1HeapWastePercent=15\n-XX:MaxGCPauseMillis=100\n"})}),"\n",(0,a.jsxs)(n.p,{children:["To run Besu without the default G1GC options, use the ",(0,a.jsx)(n.code,{children:"besu-untuned"})," start script."]})]})}function m(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>s});t(96540);var a=t(18215);const r={tabItem:"tabItem_Ymn6"};var o=t(74848);function s(e){let{children:n,hidden:t,className:s}=e;return(0,o.jsx)("div",{role:"tabpanel",className:(0,a.A)(r.tabItem,s),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>w});var a=t(96540),r=t(18215),o=t(23104),s=t(56347),i=t(205),l=t(57485),u=t(31682),c=t(70679);function d(e){return a.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,a.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:a,default:r}}=e;return{value:n,label:t,attributes:a,default:r}}))}(t);return function(e){const n=(0,u.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function m(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function p(e){let{queryString:n=!1,groupId:t}=e;const r=(0,s.W6)(),o=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l.aZ)(o),(0,a.useCallback)((e=>{if(!o)return;const n=new URLSearchParams(r.location.search);n.set(o,e),r.replace({...r.location,search:n.toString()})}),[o,r])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,o=h(e),[s,l]=(0,a.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!m({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=t.find((e=>e.default))??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:o}))),[u,d]=p({queryString:t,groupId:r}),[b,f]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,o]=(0,c.Dv)(t);return[r,(0,a.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:r}),g=(()=>{const e=u??b;return m({value:e,tabValues:o})?e:null})();(0,i.A)((()=>{g&&l(g)}),[g]);return{selectedValue:s,selectValue:(0,a.useCallback)((e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),d(e),f(e)}),[d,f,o]),tabValues:o}}var f=t(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(74848);function x(e){let{className:n,block:t,selectedValue:a,selectValue:s,tabValues:i}=e;const l=[],{blockElementScrollPositionUntilNextRender:u}=(0,o.a_)(),c=e=>{const n=e.currentTarget,t=l.indexOf(n),r=i[t].value;r!==a&&(u(n),s(r))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},n),children:i.map((e=>{let{value:n,label:t,attributes:o}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:e=>l.push(e),onKeyDown:d,onClick:c,...o,className:(0,r.A)("tabs__item",g.tabItem,o?.className,{"tabs__item--active":a===n}),children:t??n},n)}))})}function y(e){let{lazy:n,children:t,selectedValue:o}=e;const s=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=s.find((e=>e.props.value===o));return e?(0,a.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:s.map(((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==o})))})}function j(e){const n=b(e);return(0,v.jsxs)("div",{className:(0,r.A)("tabs-container",g.tabList),children:[(0,v.jsx)(x,{...n,...e}),(0,v.jsx)(y,{...n,...e})]})}function w(e){const n=(0,f.A)();return(0,v.jsx)(j,{...e,children:d(e.children)},String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>i});var a=t(96540);const r={},o=a.createContext(r);function s(e){const n=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),a.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/13912882.b9eb43d6.js b/assets/js/13912882.b9eb43d6.js new file mode 100644 index 00000000000..323e2c3b81f --- /dev/null +++ b/assets/js/13912882.b9eb43d6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[3005],{25319:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>u,frontMatter:()=>s,metadata:()=>d,toc:()=>l});var t=o(74848),r=o(28453);const s={title:"Upgrade Besu",sidebar_position:11,description:"Upgrade your Besu node to a new version.",tags:["public networks"]},i="Upgrade your Besu node",d={id:"public-networks/how-to/upgrade-node",title:"Upgrade Besu",description:"Upgrade your Besu node to a new version.",source:"@site/docs/public-networks/how-to/upgrade-node.md",sourceDirName:"public-networks/how-to",slug:"/public-networks/how-to/upgrade-node",permalink:"/public-networks/how-to/upgrade-node",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/upgrade-node.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:11,frontMatter:{title:"Upgrade Besu",sidebar_position:11,description:"Upgrade your Besu node to a new version.",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Configure mining",permalink:"/public-networks/how-to/use-pow/mining"},next:{title:"Use EVM tool",permalink:"/public-networks/how-to/troubleshoot/evm-tool"}},a={},l=[{value:"Ansible",id:"ansible",level:2},{value:"Find peers on restarting",id:"find-peers-on-restarting",level:2}];function c(e){const n={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"upgrade-your-besu-node",children:"Upgrade your Besu node"})}),"\n",(0,t.jsx)(n.p,{children:"When upgrading your Besu node, we recommend:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Using an orchestration method (for example, Ansible or Chef) to keep all nodes in sync with your desired configuration."}),"\n",(0,t.jsx)(n.li,{children:"Storing your configuration under version control."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"ansible",children:"Ansible"}),"\n",(0,t.jsxs)(n.p,{children:["You can use the ",(0,t.jsx)(n.a,{href:"https://galaxy.ansible.com/consensys/hyperledger_besu",children:"Ansible role on Galaxy"})," directly or customize it to suit your needs."]}),"\n",(0,t.jsxs)(n.p,{children:["Upgrade the Besu version on nodes by running the play with the new version. For more information, For more information, select ",(0,t.jsx)(n.strong,{children:"Read Me"})," on the ",(0,t.jsx)(n.a,{href:"https://galaxy.ansible.com/consensys/hyperledger_besu",children:"Ansible Galaxy Besu page"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"The playbook:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Stops Besu."}),"\n",(0,t.jsx)(n.li,{children:"Downloads the updated version."}),"\n",(0,t.jsx)(n.li,{children:"Applies any new configuration."}),"\n",(0,t.jsx)(n.li,{children:"Starts Besu."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"find-peers-on-restarting",children:"Find peers on restarting"}),"\n",(0,t.jsx)(n.p,{children:"Nodes store known peers in the peer table. The peer table is not persisted to disk. When a node restarts, the node connects to the specified bootnodes and discovers other nodes through the peer discovery process. The node continues collecting data from where it left off before the restart (assuming there was no data corruption in a failure scenario)."}),"\n",(0,t.jsx)(n.p,{children:"Before the node restarted, connected peers saved the node details in their peer tables. These peers can reconnect to the restarted node. The restarted node uses these peers and the bootnodes, to discover more peers. To ensure that the restarted node successfully rejoins the network, ensure you specify at least one operational bootnode."})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>d});var t=o(96540);const r={},s=t.createContext(r);function i(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/16350423.b613a489.js b/assets/js/16350423.b613a489.js new file mode 100644 index 00000000000..991fe698d77 --- /dev/null +++ b/assets/js/16350423.b613a489.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8251],{7302:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>p,contentTitle:()=>s,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>a});var t=o(74848),r=o(28453);const i={title:"Configure ports",sidebar_position:2,description:"To enable communication you must expose Besu ports appropriately",tags:["public networks","private networks"]},s="Configure ports",c={id:"public-networks/how-to/connect/configure-ports",title:"Configure ports",description:"To enable communication you must expose Besu ports appropriately",source:"@site/docs/public-networks/how-to/connect/configure-ports.md",sourceDirName:"public-networks/how-to/connect",slug:"/public-networks/how-to/connect/configure-ports",permalink:"/public-networks/how-to/connect/configure-ports",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/connect/configure-ports.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Configure ports",sidebar_position:2,description:"To enable communication you must expose Besu ports appropriately",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Configure static nodes",permalink:"/public-networks/how-to/connect/static-nodes"},next:{title:"Manage peers",permalink:"/public-networks/how-to/connect/manage-peers"}},p={},a=[{value:"P2P networking",id:"p2p-networking",level:2},{value:"JSON-RPC API",id:"json-rpc-api",level:2},{value:"Metrics",id:"metrics",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",img:"img",p:"p",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"configure-ports",children:"Configure ports"})}),"\n",(0,t.jsx)(n.p,{children:"To enable communication you must expose Besu ports appropriately. The following shows an example port configuration for a Besu node on AWS."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Port Configuration",src:o(17538).A+"",width:"2698",height:"790"})}),"\n",(0,t.jsxs)(n.p,{children:["When running Besu from the ",(0,t.jsx)(n.a,{href:"/public-networks/get-started/install/run-docker-image",children:"Docker image"}),", ",(0,t.jsx)(n.a,{href:"/public-networks/get-started/install/run-docker-image#exposing-ports",children:"expose ports"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["If your nodes are running in AWS, ensure you have appropriate ",(0,t.jsx)(n.code,{children:"SecurityGroups"})," to allow access to the required ports."]})}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["Besu supports ",(0,t.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat",children:"UPnP"})," for home or small office environments where a wireless router or modem provides NAT isolation."]})}),"\n",(0,t.jsx)(n.h2,{id:"p2p-networking",children:"P2P networking"}),"\n",(0,t.jsxs)(n.p,{children:["To enable peer discovery, the P2P UDP port must be open for inbound connections. Specify the P2P port using the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,t.jsx)(n.code,{children:"--p2p-port"})})," option. The default is ",(0,t.jsx)(n.code,{children:"30303"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"We also recommend opening the P2P TCP port for inbound connections. This is not strictly required because Besu attempts to open outbound TCP connections. But if no nodes on the network are accepting inbound TCP connections, nodes cannot communicate."}),"\n",(0,t.jsxs)(n.p,{children:["Combine the P2P port with the values for the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-host",children:(0,t.jsx)(n.code,{children:"--p2p-host"})})," and ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-interface",children:(0,t.jsx)(n.code,{children:"--p2p-interface"})})," options when specifying the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-host",children:"P2P host"})," and ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-interface",children:"P2P network interface"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["By default, peer discovery listens on ",(0,t.jsx)(n.code,{children:"0.0.0.0:30303"})," (all interfaces). If the device Besu is running on must bind to a specific network interface, specify the interface using the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-interface",children:(0,t.jsx)(n.code,{children:"--p2p-interface"})})," option."]})}),"\n",(0,t.jsx)(n.h2,{id:"json-rpc-api",children:"JSON-RPC API"}),"\n",(0,t.jsxs)(n.p,{children:["To enable access to the ",(0,t.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc",children:"JSON-RPC API"}),", open the HTTP JSON-RPC and WebSockets JSON-RPC ports to the intended users of the JSON-RPC API on TCP."]}),"\n",(0,t.jsxs)(n.p,{children:["Specify the HTTP and WebSockets JSON-RPC ports using the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,t.jsx)(n.code,{children:"--rpc-http-port"})})," and ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-port",children:(0,t.jsx)(n.code,{children:"--rpc-ws-port"})})," options. The defaults are ",(0,t.jsx)(n.code,{children:"8545"})," and ",(0,t.jsx)(n.code,{children:"8546"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"metrics",children:"Metrics"}),"\n",(0,t.jsxs)(n.p,{children:["To enable ",(0,t.jsx)(n.a,{href:"/public-networks/how-to/monitor/metrics",children:"Prometheus to access Besu"}),", open the metrics port or metrics push port to Prometheus or the Prometheus push gateway on TCP."]}),"\n",(0,t.jsxs)(n.p,{children:["Specify the ports for Prometheus and Prometheus push gateway using the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#metrics-port",children:(0,t.jsx)(n.code,{children:"--metrics-port"})})," and ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#metrics-push-port",children:(0,t.jsx)(n.code,{children:"--metrics-push-port"})})," options. The defaults are ",(0,t.jsx)(n.code,{children:"9545"})," and ",(0,t.jsx)(n.code,{children:"9001"}),"."]})]})}function d(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},17538:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/PortConfiguration-159d80eca9db24ffaf7bf7029c812faf.png"},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>c});var t=o(96540);const r={},i=t.createContext(r);function s(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/166cf840.018cd6bc.js b/assets/js/166cf840.018cd6bc.js new file mode 100644 index 00000000000..f119229de4f --- /dev/null +++ b/assets/js/166cf840.018cd6bc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[609],{53798:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>a,metadata:()=>l,toc:()=>h});var r=i(74848),t=i(28453),s=i(11470),o=i(19365);const a={title:"IBFT 2.0",description:"Besu IBFT 2.0 proof of authority (PoA) consensus protocol implementation",sidebar_position:3,tags:["private networks"]},c="Configure IBFT 2.0 consensus",l={id:"private-networks/how-to/configure/consensus/ibft",title:"IBFT 2.0",description:"Besu IBFT 2.0 proof of authority (PoA) consensus protocol implementation",source:"@site/docs/private-networks/how-to/configure/consensus/ibft.md",sourceDirName:"private-networks/how-to/configure/consensus",slug:"/private-networks/how-to/configure/consensus/ibft",permalink:"/private-networks/how-to/configure/consensus/ibft",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/configure/consensus/ibft.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"IBFT 2.0",description:"Besu IBFT 2.0 proof of authority (PoA) consensus protocol implementation",sidebar_position:3,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"QBFT",permalink:"/private-networks/how-to/configure/consensus/qbft"},next:{title:"Clique",permalink:"/private-networks/how-to/configure/consensus/clique"}},d={},h=[{value:"Genesis file",id:"genesis-file",level:2},{value:"Extra data",id:"extra-data",level:3},{value:"Generate extra data",id:"generate-extra-data",level:4},{value:"Block time",id:"block-time",level:3},{value:"Tune block timeout",id:"tune-block-timeout",level:4},{value:"Optional configuration options",id:"optional-configuration-options",level:3},{value:"Post-Merge configuration",id:"post-merge-configuration",level:3},{value:"Add and remove validators",id:"add-and-remove-validators",level:2},{value:"Add a validator",id:"add-a-validator",level:3},{value:"Remove a validator",id:"remove-a-validator",level:3},{value:"Epoch transition",id:"epoch-transition",level:3},{value:"Minimum number of validators",id:"minimum-number-of-validators",level:3},{value:"Maximum number of validators",id:"maximum-number-of-validators",level:3},{value:"Transitions",id:"transitions",level:2},{value:"Configure block time on an existing network",id:"configure-block-time-on-an-existing-network",level:3},{value:"Configure block rewards on an existing network",id:"configure-block-rewards-on-an-existing-network",level:3},{value:"Configure the mining beneficiary on an existing network",id:"configure-the-mining-beneficiary-on-an-existing-network",level:3}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"configure-ibft-20-consensus",children:"Configure IBFT 2.0 consensus"})}),"\n",(0,r.jsxs)(n.p,{children:["Besu implements the IBFT 2.0 proof of authority (PoA) ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/",children:"consensus protocol"}),". IBFT 2.0 is supported for existing private networks, but ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft",children:"QBFT"})," is the recommended enterprise-grade consensus protocol for private networks."]}),"\n",(0,r.jsx)(n.p,{children:"In IBFT 2.0 networks, approved accounts, known as validators, validate transactions and blocks. Validators take turns to create the next block. Before inserting the block onto the chain, a super-majority (greater than or equal to 2/3) of validators must first sign the block."}),"\n",(0,r.jsxs)(n.p,{children:["Existing validators propose and vote to ",(0,r.jsx)(n.a,{href:"#add-and-remove-validators",children:"add or remove validators"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["You can ",(0,r.jsx)(n.a,{href:"/private-networks/tutorials/ibft/",children:"create a private network using IBFT"}),"."]}),"\n",(0,r.jsx)(n.admonition,{type:"caution",children:(0,r.jsx)(n.p,{children:"Configure your network to ensure you never lose more than 1/3 of your validators.\nIf more than 1/3 of validators stop participating, the network stops creating new blocks and stalls.\nIt might take significant time to recover after nodes are restarted."})}),"\n",(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsxs)(n.p,{children:["You can use a plugin to securely store a validator's key using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#security-module",children:(0,r.jsx)(n.code,{children:"--security-module"})})," option."]})}),"\n",(0,r.jsxs)(n.admonition,{title:"Early access feature",type:"info",children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"--Xsnapsync-bft-enabled"})," is an early access feature available in Besu version 24.7.1 and later.\nIt is not stable, so use this option with caution."]}),(0,r.jsxs)(n.p,{children:["Use ",(0,r.jsx)(n.code,{children:"--Xsnapsync-bft-enabled"})," with ",(0,r.jsx)(n.code,{children:"--sync-mode=SNAP"})," to enable\n",(0,r.jsx)(n.a,{href:"/private-networks/concepts/node-sync-private",children:"snap sync"})," in IBFT 2.0 networks."]})]}),"\n",(0,r.jsx)(n.h2,{id:"genesis-file",children:"Genesis file"}),"\n",(0,r.jsxs)(n.p,{children:["To use IBFT 2.0, Besu requires an IBFT 2.0 ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/genesis-file",children:"genesis file"}),". The genesis file defines properties specific to IBFT 2.0."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",metastring:'title="Example IBFT 2.0 genesis file"',children:'{\n "config": {\n "chainId": 1981,\n "berlinBlock": 0,\n "ibft2": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4,\n "blockreward": "5000000000000000",\n "miningbeneficiary": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"\n }\n },\n "nonce": "0x0",\n "timestamp": "0x58ee40ba",\n "extraData": "0xf83ea00000000000000000000000000000000000000000000000000000000000000000d594c2ab482b506de561668e07f04547232a72897daf808400000000c0",\n "gasLimit": "0x1fffffffffffff",\n "difficulty": "0x1",\n "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",\n "alloc": {}\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:"The properties specific to IBFT 2.0 are:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"blockperiodseconds"})," - The minimum block time, in seconds."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"epochlength"})," - The number of blocks after which to reset all votes."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"requesttimeoutseconds"})," - The timeout for each consensus round before a round change, in seconds."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"blockreward"})," - Optional reward amount in Wei to reward the beneficiary. Defaults to zero (0). Can be specified as a hexadecimal (with 0x prefix) or decimal string value. If set, then all nodes on the network must use the identical value."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"miningbeneficiary"})," - Optional beneficiary of the ",(0,r.jsx)(n.code,{children:"blockreward"}),". Defaults to the validator that proposes the block. If set, then all nodes on the network must use the same beneficiary."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"extraData"})," - RLP encoded ",(0,r.jsx)(n.a,{href:"#extra-data",children:"extra data"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.admonition,{type:"caution",children:(0,r.jsxs)(n.p,{children:["We don't recommend changing ",(0,r.jsx)(n.code,{children:"epochlength"})," in a running network. Changing the ",(0,r.jsx)(n.code,{children:"epochlength"})," after genesis can result in illegal blocks."]})}),"\n",(0,r.jsxs)(n.admonition,{title:"Invalid block header error",type:"caution",children:[(0,r.jsxs)(n.p,{children:["When adding a new node, if a ",(0,r.jsx)(n.code,{children:"TimeStampMoreRecentThanParent | Invalid block header"})," error occurs, the genesis file of the new node specifies a higher ",(0,r.jsx)(n.code,{children:"blockperiodseconds"})," than the imported chain. The imported chain makes new blocks faster than the genesis file allows and Besu rejects them with this error. This error most often occurs when importing chains from older versions of Besu."]}),(0,r.jsxs)(n.p,{children:["Decrease the ",(0,r.jsx)(n.code,{children:"blockperiodseconds"})," in the new IBFT 2.0 genesis file to a lower value that satisfies the block header validation."]})]}),"\n",(0,r.jsxs)(n.p,{children:["If the error reads ",(0,r.jsx)(n.code,{children:"| TimestampMoreRecentThanParent | Invalid block header: timestamp 1619660141 is only 3 seconds newer than parent timestamp 1619660138. Minimum 4 seconds"}),", decrease the ",(0,r.jsx)(n.code,{children:"blockperiodseconds"})," from 4 seconds to 3 seconds to match the imported chain."]}),"\n",(0,r.jsxs)(n.p,{children:["After you update the new genesis file, if the imported chain has a ",(0,r.jsx)(n.code,{children:"blockperiodseconds"})," value set lower than you prefer, you can adjust it by ",(0,r.jsx)(n.a,{href:"#configure-block-time-on-an-existing-network",children:"configuring the block time on an existing IBFT 2.0 network"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"The properties with specific values in the IBFT 2.0 genesis files are:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"nonce"})," - ",(0,r.jsx)(n.code,{children:"0x0"})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"difficulty"})," - ",(0,r.jsx)(n.code,{children:"0x1"})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"mixHash"})," - ",(0,r.jsx)(n.code,{children:"0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365"})," for Istanbul block identification"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["To start a node on an IBFT 2.0 private network, use the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#genesis-file",children:(0,r.jsx)(n.code,{children:"--genesis-file"})})," option to specify the custom genesis file."]}),"\n",(0,r.jsx)(n.h3,{id:"extra-data",children:"Extra data"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"extraData"})," property is an RLP encoding of:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"32 bytes of vanity data."}),"\n",(0,r.jsx)(n.li,{children:"A list of validator addresses."}),"\n",(0,r.jsx)(n.li,{children:"Any validator votes. No vote is included in the genesis block."}),"\n",(0,r.jsx)(n.li,{children:"The round the block was created on. The round in the genesis block is 0."}),"\n",(0,r.jsx)(n.li,{children:"A list of seals of the validators (signed block hashes). No seals are included in the genesis block."}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["In the genesis block, the important information in the extra data is the list of validators. All other details have empty values. Formally, ",(0,r.jsx)(n.code,{children:"extraData"})," in the genesis block contains ",(0,r.jsx)(n.code,{children:"RLP([32 bytes Vanity, List, No Vote, Round=Int(0), 0 Seals])"}),"."]}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsx)(n.p,{children:"RLP encoding is a space-efficient object serialization scheme used in Ethereum."})}),"\n",(0,r.jsx)(n.h4,{id:"generate-extra-data",children:"Generate extra data"}),"\n",(0,r.jsxs)(n.p,{children:["To generate the ",(0,r.jsx)(n.code,{children:"extraData"})," RLP string for inclusion in the genesis file, use the ",(0,r.jsx)(n.a,{href:"/private-networks/reference/cli/subcommands#encode",children:(0,r.jsx)(n.code,{children:"rlp encode"})})," Besu subcommand."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",metastring:'title="Example"',children:"besu rlp encode --from=toEncode.json\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Where the ",(0,r.jsx)(n.code,{children:"toEncode.json"})," file contains a list of the initial validators, in ascending order. To write the validator address and copy it to the ",(0,r.jsx)(n.code,{children:"toEncode.json"})," file, use the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/subcommands#export-address",children:(0,r.jsx)(n.code,{children:"public-key export-address"})})," Besu subcommand. For example:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",metastring:'title="One initial validator in toEncode.json file"',children:'["9811ebc35d7b06b3fa8dc5809a1f9c52751e1deb"]\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Copy the RLP encoded data to the ",(0,r.jsx)(n.code,{children:"extraData"})," property in the genesis file."]}),"\n",(0,r.jsx)(n.h3,{id:"block-time",children:"Block time"}),"\n",(0,r.jsxs)(n.p,{children:["When the protocol receives a new chain head, the block time (",(0,r.jsx)(n.code,{children:"blockperiodseconds"}),") and round timeout (",(0,r.jsx)(n.code,{children:"requesttimeoutseconds"}),") timers start. When ",(0,r.jsx)(n.code,{children:"blockperiodseconds"})," expires, the protocol proposes a new block."]}),"\n",(0,r.jsxs)(n.p,{children:["If ",(0,r.jsx)(n.code,{children:"requesttimeoutseconds"})," expires before adding the proposed block, a round change occurs, with the block time and timeout timers reset. The timeout period for the new round is two times ",(0,r.jsx)(n.code,{children:"requesttimeoutseconds"}),". The timeout period continues to double each time a round fails to add a block."]}),"\n",(0,r.jsxs)(n.p,{children:["Usually, the protocol adds the proposed block before reaching ",(0,r.jsx)(n.code,{children:"requesttimeoutseconds"}),". A new round then starts, resetting the block time and round timeout timers. When ",(0,r.jsx)(n.code,{children:"blockperiodseconds"})," expires, the protocol proposes the next new block."]}),"\n",(0,r.jsx)(n.admonition,{type:"danger",children:(0,r.jsxs)(n.p,{children:["If more than 1/3 of validators stop participating, new blocks can no longer be created and ",(0,r.jsx)(n.code,{children:"requesttimeoutseconds"})," doubles with each round change. The quickest method to resume block production is to restart all validators, which resets ",(0,r.jsx)(n.code,{children:"requesttimeoutseconds"})," to its genesis value."]})}),"\n",(0,r.jsxs)(n.p,{children:["Once ",(0,r.jsx)(n.code,{children:"blockperiodseconds"})," is over, the time from proposing a block to adding the block is small (usually around one second) even in networks with geographically dispersed validators."]}),"\n",(0,r.jsxs)(n.p,{children:["An internal network run by ConsenSys had four geographically dispersed validators in Sweden, Sydney, and two in North Virginia. With a ",(0,r.jsx)(n.code,{children:"blockperiodseconds"})," of 5 and a ",(0,r.jsx)(n.code,{children:"requesttimeoutseconds"})," of 10, the testnet consistently created blocks with a five second block time."]}),"\n",(0,r.jsx)(n.h4,{id:"tune-block-timeout",children:"Tune block timeout"}),"\n",(0,r.jsx)(n.p,{children:"To tune the block timeout for your network deployment:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Set ",(0,r.jsx)(n.code,{children:"blockperiodseconds"})," to your desired block time and ",(0,r.jsx)(n.code,{children:"requesttimeoutseconds"})," to two times ",(0,r.jsx)(n.code,{children:"blockperiodseconds"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Reduce ",(0,r.jsx)(n.code,{children:"requesttimeoutseconds"})," until you start to see round changes occurring."]}),"\n",(0,r.jsxs)(n.li,{children:["Increase ",(0,r.jsx)(n.code,{children:"requesttimeoutseconds"})," to the value where round changes are no longer occurring."]}),"\n"]}),"\n",(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsxs)(n.p,{children:["View ",(0,r.jsxs)(n.a,{href:"/public-networks/reference/api/#trace-methods",children:[(0,r.jsx)(n.code,{children:"TRACE"})," logs"]})," to see round change log messages."]})}),"\n",(0,r.jsxs)(n.p,{children:["Use a ",(0,r.jsx)(n.a,{href:"#transitions",children:"transition"})," to update the ",(0,r.jsx)(n.code,{children:"blockperiodseconds"})," in an existing network."]}),"\n",(0,r.jsx)(n.h3,{id:"optional-configuration-options",children:"Optional configuration options"}),"\n",(0,r.jsx)(n.p,{children:"Optional configuration options in the genesis file are:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"messageQueueLimit"})," - In large networks with limited resources, increasing the message queue limit might help with message activity surges. The default is 1000."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"duplicateMessageLimit"})," - If the same node is retransmitting messages, increasing the duplicate message limit might reduce the number of retransmissions. A value of two to three times the number of validators is usually enough. The default is 100."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"futureMessagesLimit"})," - The future messages buffer holds messages for a future chain height. For large networks, increasing the future messages limit might be useful. The default is 1000."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"futureMessagesMaxDistance"})," - The maximum height from the current chain height for buffering messages in the future messages buffer. The default is 10."]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"post-merge-configuration",children:"Post-Merge configuration"}),"\n",(0,r.jsxs)(n.p,{children:["After ",(0,r.jsx)(n.a,{href:"https://ethereum.org/en/upgrades/merge/",children:"The Merge"}),", the following block fields are modified or deprecated. Their fields ",(0,r.jsx)(n.strong,{children:"must"})," contain only the constant values from the following chart."]}),"\n",(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Field"}),(0,r.jsx)(n.th,{children:"Constant value"}),(0,r.jsx)(n.th,{children:"Comment"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.code,{children:"ommersHash"})})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"= Keccak256(RLP([]))"})})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.code,{children:"difficulty"})})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"0"})}),(0,r.jsxs)(n.td,{children:["Replaced with ",(0,r.jsx)(n.code,{children:"prevrandao"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.code,{children:"mixHash"})})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"0x0000000000000000000000000000000000000000000000000000000000000000"})}),(0,r.jsxs)(n.td,{children:["Replaced with ",(0,r.jsx)(n.code,{children:"prevrandao"})]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.code,{children:"nonce"})})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"0x0000000000000000"})}),(0,r.jsx)(n.td,{})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:(0,r.jsx)(n.strong,{children:(0,r.jsx)(n.code,{children:"ommers"})})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"[]"})}),(0,r.jsx)(n.td,{children:(0,r.jsx)(n.code,{children:"RLP([]) = 0xc0"})})]})]})]}),"\n",(0,r.jsxs)(n.p,{children:["Additionally, ",(0,r.jsx)(n.a,{href:"#extra-data",children:(0,r.jsx)(n.code,{children:"extraData"})})," is limited to 32 bytes of vanity data after The Merge."]}),"\n",(0,r.jsx)(n.h2,{id:"add-and-remove-validators",children:"Add and remove validators"}),"\n",(0,r.jsxs)(n.p,{children:["Existing validators propose and vote to add or remove validators using the IBFT 2.0 JSON-RPC API methods. Enable the HTTP interface with ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,r.jsx)(n.code,{children:"--rpc-http-enabled"})})," or the WebSocket interface with ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-enabled",children:(0,r.jsx)(n.code,{children:"--rpc-ws-enabled"})}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The IBFT 2.0 API methods are disabled by default. To enable them, specify the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,r.jsx)(n.code,{children:"--rpc-http-api"})})," or ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,r.jsx)(n.code,{children:"--rpc-ws-api"})})," option and include ",(0,r.jsx)(n.code,{children:"IBFT"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"The methods to add or remove validators are:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#ibft_getpendingvotes",children:(0,r.jsx)(n.code,{children:"ibft_getPendingVotes"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#ibft_proposevalidatorvote",children:(0,r.jsx)(n.code,{children:"ibft_proposeValidatorVote"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#ibft_discardvalidatorvote",children:(0,r.jsx)(n.code,{children:"ibft_discardValidatorVote"})}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["To view validator metrics for a specified block range, use ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#ibft_getsignermetrics",children:(0,r.jsx)(n.code,{children:"ibft_getSignerMetrics"})}),"."]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["If network conditions render it impossible to add and remove validators by voting, you can ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/add-validators-without-voting",children:"add and remove validators without voting"}),"."]})}),"\n",(0,r.jsx)(n.h3,{id:"add-a-validator",children:"Add a validator"}),"\n",(0,r.jsxs)(n.p,{children:["To propose adding a validator to an IBFT 2.0 network, call ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#ibft_proposevalidatorvote",children:(0,r.jsx)(n.code,{children:"ibft_proposeValidatorVote"})}),", specifying the address of the proposed validator and ",(0,r.jsx)(n.code,{children:"true"}),". A majority of validators must execute the call."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",metastring:'title="JSON-RPC ibft_proposeValidatorVote request example"',children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"ibft_proposeValidatorVote","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73", true], "id":1}\' \n'})}),"\n",(0,r.jsxs)(n.p,{children:["When the validator proposes the next block, the protocol inserts one proposal received from ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#ibft_proposevalidatorvote",children:(0,r.jsx)(n.code,{children:"ibft_proposeValidatorVote"})})," into the block. If blocks include all proposals, subsequent blocks proposed by the validator will not contain a vote."]}),"\n",(0,r.jsx)(n.p,{children:"When more than 50% of the existing validators have published a matching proposal, the protocol adds the proposed validator to the validator pool and the validator can begin validating blocks."}),"\n",(0,r.jsxs)(n.p,{children:["To return a list of validators and confirm the addition of a proposed validator, use ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#ibft_getvalidatorsbyblocknumber",children:(0,r.jsx)(n.code,{children:"ibft_getValidatorsByBlockNumber"})}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",metastring:'title="JSON-RPC ibft_getValidatorsByBlockNumber request example"',children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"ibft_getValidatorsByBlockNumber","params":["latest"], "id":1}\' \n'})}),"\n",(0,r.jsxs)(n.p,{children:["To discard your proposal after confirming the addition of a validator, call ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#ibft_discardvalidatorvote",children:(0,r.jsx)(n.code,{children:"ibft_discardValidatorVote"})}),", specifying the address of the proposed validator."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",metastring:'title="JSON-RPC ibft_discardValidatorVote request example"',children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"ibft_discardValidatorVote","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73"], "id":1}\' \n'})}),"\n",(0,r.jsx)(n.h3,{id:"remove-a-validator",children:"Remove a validator"}),"\n",(0,r.jsxs)(n.p,{children:["The process for removing a validator from an IBFT 2.0 network is the same as ",(0,r.jsx)(n.a,{href:"#add-a-validator",children:"adding a validator"})," except you specify ",(0,r.jsx)(n.code,{children:"false"})," as the second parameter of ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#ibft_proposevalidatorvote",children:(0,r.jsx)(n.code,{children:"ibft_proposeValidatorVote"})}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"epoch-transition",children:"Epoch transition"}),"\n",(0,r.jsx)(n.p,{children:"At each epoch transition, IBFT 2.0 discards all pending votes collected from received blocks. Existing proposals remain in effect and validators re-add their vote the next time they create a block."}),"\n",(0,r.jsxs)(n.p,{children:["An epoch transition occurs every ",(0,r.jsx)(n.code,{children:"epochLength"})," blocks. Define ",(0,r.jsx)(n.code,{children:"epochlength"})," in the ",(0,r.jsx)(n.a,{href:"#genesis-file",children:"IBFT 2.0 genesis file"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"minimum-number-of-validators",children:"Minimum number of validators"}),"\n",(0,r.jsx)(n.p,{children:"IBFT 2.0 requires four validators to be Byzantine fault tolerant. Byzantine fault tolerance is the ability for a blockchain network to function correctly and reach consensus despite nodes failing or propagating incorrect information to peers."}),"\n",(0,r.jsx)(n.h3,{id:"maximum-number-of-validators",children:"Maximum number of validators"}),"\n",(0,r.jsxs)(n.p,{children:["As the number of validators increase, the message complexity increases, which can decrease performance. In ",(0,r.jsx)(n.a,{href:"https://wiki.hyperledger.org/display/BESU/Maximum+Validator+count+for+an+IBFT2+Network",children:"network tests"}),", IBFT 2.0 handles up to 30 validators with no loss of performance."]}),"\n",(0,r.jsx)(n.p,{children:"Non-validator nodes don't affect performance and don't count towards the maximum limit."}),"\n",(0,r.jsx)(n.h2,{id:"transitions",children:"Transitions"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"transitions"})," genesis configuration item allows you to specify a future block number at which to\nchange the IBFT 2.0 network configuration in an existing network.\nFor example, you can update the ",(0,r.jsx)(n.a,{href:"#configure-block-time-on-an-existing-network",children:"block time"}),",\n",(0,r.jsx)(n.a,{href:"#configure-block-rewards-on-an-existing-network",children:"block reward"}),", or\n",(0,r.jsx)(n.a,{href:"#configure-the-mining-beneficiary-on-an-existing-network",children:"mining beneficiary"}),"."]}),"\n",(0,r.jsx)(n.admonition,{type:"caution",children:(0,r.jsx)(n.p,{children:"Do not specify a transition block in the past.\nSpecifying a transition block in the past can result in unexpected behavior, such as causing the\nnetwork to fork."})}),"\n",(0,r.jsx)(n.h3,{id:"configure-block-time-on-an-existing-network",children:"Configure block time on an existing network"}),"\n",(0,r.jsxs)(n.p,{children:["To update an existing network with a new ",(0,r.jsx)(n.code,{children:"blockperiodseconds"}),":"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Stop all nodes in the network."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.a,{href:"#genesis-file",children:"genesis file"}),", add the ",(0,r.jsx)(n.code,{children:"transitions"})," configuration item where:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:""})," is the upcoming block at which to change ",(0,r.jsx)(n.code,{children:"blockperiodseconds"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:""})," is the updated value for ",(0,r.jsx)(n.code,{children:"blockperiodseconds"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(o.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "ibft2": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n },\n "transitions": {\n "ibft2": [\n {\n "block": ,\n "blockperiodseconds": \n }\n ]\n }\n },\n ...\n}\n'})})}),(0,r.jsx)(o.A,{value:"Example",label:"Example",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "ibft2": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n },\n "transitions": {\n "ibft2": [\n {\n "block": 1240,\n "blockperiodseconds": 4\n }\n ]\n }\n },\n ...\n}\n'})})})]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Restart all nodes in the network using the updated genesis file."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"To verify the changes after the transition block, view the Besu logs and check that the time\ndifference between each block matches the updated block period."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"configure-block-rewards-on-an-existing-network",children:"Configure block rewards on an existing network"}),"\n",(0,r.jsxs)(n.p,{children:["To update an existing network with a new ",(0,r.jsx)(n.code,{children:"blockreward"}),":"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Stop all nodes in the network."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.a,{href:"#genesis-file",children:"genesis file"}),", add the ",(0,r.jsx)(n.code,{children:"transitions"})," configuration item where:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:""})," is the upcoming block at which to change ",(0,r.jsx)(n.code,{children:"blockreward"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:""})," is the updated value for ",(0,r.jsx)(n.code,{children:"blockreward"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(o.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "ibft2": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n "blockreward": "5000000000000000"\n },\n "transitions": {\n "ibft2": [\n {\n "block": ,\n "blockreward": \n },\n {\n "block": ,\n "blockreward": \n },\n {\n "block": ,\n "blockreward": \n }\n ]\n }\n },\n ...\n}\n'})})}),(0,r.jsx)(o.A,{value:"Example",label:"Example",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "ibft2": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n "blockreward": "5000000000000000"\n },\n "transitions": {\n "ibft2": [\n {\n "block": 10,\n "blockreward": "6000000000000000"\n },\n {\n "block": 15,\n "blockreward": "75000000000000000"\n },\n {\n "block": 20,\n "blockreward": "0"\n }\n ]\n }\n },\n ...\n}\n'})})})]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["You can add multiple ",(0,r.jsx)(n.code,{children:"blockreward"})," updates in one transition object by specifying multiple future blocks."]})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Restart all nodes in the network using the updated genesis file."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"configure-the-mining-beneficiary-on-an-existing-network",children:"Configure the mining beneficiary on an existing network"}),"\n",(0,r.jsx)(n.p,{children:"To update an existing network with a new mining beneficiary:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Stop all nodes in the network."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.a,{href:"#genesis-file",children:"genesis file"}),", add the ",(0,r.jsx)(n.code,{children:"transitions"})," configuration item where:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:""})," is the upcoming block at which to change ",(0,r.jsx)(n.code,{children:"miningbeneficiary"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:""})," is the updated 20-byte address for ",(0,r.jsx)(n.code,{children:"miningbeneficiary"}),". Starting at ",(0,r.jsx)(n.code,{children:""}),", block rewards go to this address."]}),"\n"]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(o.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n "chainId": 999,\n "berlinBlock": 0,\n "ibft2": {\n "blockperiodseconds": 1,\n "epochlength": 30000,\n "requesttimeoutseconds": 5,\n "blockreward": "5000000000000000000",\n "miningbeneficiary": "0x0000000000000000000000000000000000000001"\n },\n "transitions": {\n "ibft2": [\n {\n "block": ,\n "miningbeneficiary": \n },\n {\n "block": ,\n "miningbeneficiary": \n }\n ]\n }\n },\n ...\n}\n'})})}),(0,r.jsx)(o.A,{value:"Example",label:"Example",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n "chainId": 999,\n "berlinBlock": 0,\n "ibft2": {\n "blockperiodseconds": 1,\n "epochlength": 30000,\n "requesttimeoutseconds": 5,\n "blockreward": "5000000000000000000",\n "miningbeneficiary": "0x0000000000000000000000000000000000000001"\n },\n "transitions": {\n "ibft2": [\n {\n "block": 10000,\n "miningbeneficiary": "",\n },\n {\n "block": 20000,\n "miningbeneficiary": "0x0000000000000000000000000000000000000002",\n }\n ]\n }\n },\n ...\n}\n'})})})]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["Setting the ",(0,r.jsx)(n.code,{children:"miningbeneficiary"})," to an empty value clears out any override so that block rewards go to the block producer rather than a global override address."]})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Restart all nodes in the network using the updated genesis file."}),"\n"]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},19365:(e,n,i)=>{i.d(n,{A:()=>o});i(96540);var r=i(18215);const t={tabItem:"tabItem_Ymn6"};var s=i(74848);function o(e){let{children:n,hidden:i,className:o}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.A)(t.tabItem,o),hidden:i,children:n})}},11470:(e,n,i)=>{i.d(n,{A:()=>w});var r=i(96540),t=i(18215),s=i(23104),o=i(56347),a=i(205),c=i(57485),l=i(31682),d=i(70679);function h(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function u(e){const{values:n,children:i}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:i,attributes:r,default:t}}=e;return{value:n,label:i,attributes:r,default:t}}))}(i);return function(e){const n=(0,l.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,i])}function p(e){let{value:n,tabValues:i}=e;return i.some((e=>e.value===n))}function x(e){let{queryString:n=!1,groupId:i}=e;const t=(0,o.W6)(),s=function(e){let{queryString:n=!1,groupId:i}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!i)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return i??null}({queryString:n,groupId:i});return[(0,c.aZ)(s),(0,r.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(t.location.search);n.set(s,e),t.replace({...t.location,search:n.toString()})}),[s,t])]}function f(e){const{defaultValue:n,queryString:i=!1,groupId:t}=e,s=u(e),[o,c]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:i}=e;if(0===i.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:i}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${i.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=i.find((e=>e.default))??i[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:s}))),[l,h]=x({queryString:i,groupId:t}),[f,m]=function(e){let{groupId:n}=e;const i=function(e){return e?`docusaurus.tab.${e}`:null}(n),[t,s]=(0,d.Dv)(i);return[t,(0,r.useCallback)((e=>{i&&s.set(e)}),[i,s])]}({groupId:t}),b=(()=>{const e=l??f;return p({value:e,tabValues:s})?e:null})();(0,a.A)((()=>{b&&c(b)}),[b]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!p({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);c(e),h(e),m(e)}),[h,m,s]),tabValues:s}}var m=i(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=i(74848);function g(e){let{className:n,block:i,selectedValue:r,selectValue:o,tabValues:a}=e;const c=[],{blockElementScrollPositionUntilNextRender:l}=(0,s.a_)(),d=e=>{const n=e.currentTarget,i=c.indexOf(n),t=a[i].value;t!==r&&(l(n),o(t))},h=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const i=c.indexOf(e.currentTarget)+1;n=c[i]??c[0];break}case"ArrowLeft":{const i=c.indexOf(e.currentTarget)-1;n=c[i]??c[c.length-1];break}}n?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.A)("tabs",{"tabs--block":i},n),children:a.map((e=>{let{value:n,label:i,attributes:s}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>c.push(e),onKeyDown:h,onClick:d,...s,className:(0,t.A)("tabs__item",b.tabItem,s?.className,{"tabs__item--active":r===n}),children:i??n},n)}))})}function k(e){let{lazy:n,children:i,selectedValue:s}=e;const o=(Array.isArray(i)?i:[i]).filter(Boolean);if(n){const e=o.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:(0,t.A)("margin-top--md",e.props.className)}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:o.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function v(e){const n=f(e);return(0,j.jsxs)("div",{className:(0,t.A)("tabs-container",b.tabList),children:[(0,j.jsx)(g,{...n,...e}),(0,j.jsx)(k,{...n,...e})]})}function w(e){const n=(0,m.A)();return(0,j.jsx)(v,{...e,children:h(e.children)},String(n))}},28453:(e,n,i)=>{i.d(n,{R:()=>o,x:()=>a});var r=i(96540);const t={},s=r.createContext(t);function o(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1719a32c.2df0602a.js b/assets/js/1719a32c.2df0602a.js new file mode 100644 index 00000000000..68f1a9e38dd --- /dev/null +++ b/assets/js/1719a32c.2df0602a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2668],{81525:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>a,toc:()=>d});var s=n(74848),i=n(28453);const o={title:"Understand metrics",sidebar_position:2,description:"Understand Besu performance metrics",tags:["public networks"]},r="Understand metrics",a={id:"public-networks/how-to/monitor/understand-metrics",title:"Understand metrics",description:"Understand Besu performance metrics",source:"@site/docs/public-networks/how-to/monitor/understand-metrics.md",sourceDirName:"public-networks/how-to/monitor",slug:"/public-networks/how-to/monitor/understand-metrics",permalink:"/public-networks/how-to/monitor/understand-metrics",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/monitor/understand-metrics.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Understand metrics",sidebar_position:2,description:"Understand Besu performance metrics",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Use metrics",permalink:"/public-networks/how-to/monitor/metrics"},next:{title:"Configure logging",permalink:"/public-networks/how-to/monitor/logging"}},l={},d=[{value:"CPU usage",id:"cpu-usage",level:2},{value:"1. Blocks import and world state download",id:"1-blocks-import-and-world-state-download",level:3},{value:"2. World state healing",id:"2-world-state-healing",level:3},{value:"3. Blocks import",id:"3-blocks-import",level:3},{value:"4. Blocks full import",id:"4-blocks-full-import",level:3},{value:"5. Blocks production and propagation",id:"5-blocks-production-and-propagation",level:3},{value:"Block time",id:"block-time",level:2},{value:"1. Block import time",id:"1-block-import-time",level:3},{value:"2. Block full import time",id:"2-block-full-import-time",level:3},{value:"3. Block network time",id:"3-block-network-time",level:3}];function c(e){const t={a:"a",admonition:"admonition",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",section:"section",sup:"sup",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"understand-metrics",children:"Understand metrics"})}),"\n",(0,s.jsxs)(t.p,{children:["When running Besu on Ethereum Mainnet using ",(0,s.jsx)(t.a,{href:"/public-networks/concepts/node-sync#snap-synchronization",children:"snap sync"}),", you might notice graphical patterns that stand out in different metrics charts. These patterns are related to the ",(0,s.jsx)(t.a,{href:"#cpu-usage",children:"CPU usage"})," and ",(0,s.jsx)(t.a,{href:"#block-time",children:"block time"})," of the Besu sync process."]}),"\n",(0,s.jsx)(t.h2,{id:"cpu-usage",children:"CPU usage"}),"\n",(0,s.jsxs)(t.p,{children:["The following screenshot from ",(0,s.jsx)(t.a,{href:"/private-networks/tutorials/quickstart#monitor-nodes-with-prometheus-and-grafana",children:"monitoring Besu with Prometheus and Grafana"})," shows patterns related to CPU usage."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"CPU Grafana Besu dashboard patterns screenshot",src:n(93786).A+"",width:"3278",height:"1542"})}),"\n",(0,s.jsx)(t.p,{children:'The CPU pattern is a "staircase" pattern, where each step represents one of the Besu running stages.'}),"\n",(0,s.jsx)(t.h3,{id:"1-blocks-import-and-world-state-download",children:"1. Blocks import and world state download"}),"\n",(0,s.jsx)(t.p,{children:"Step 1 highlights blocks import and world state download, two tasks executed in parallel in Besu. Besu manages these two tasks with two different pipelines."}),"\n",(0,s.jsxs)(t.p,{children:["This step is CPU-bound.",(0,s.jsx)(t.sup,{children:(0,s.jsx)(t.a,{href:"#user-content-fn-1",id:"user-content-fnref-1","data-footnote-ref":!0,"aria-describedby":"footnote-label",children:"1"})})," The two pipeline stages run on multiple threads."]}),"\n",(0,s.jsx)(t.p,{children:"As displayed in the following screenshot (for a VM with 8 CPUs) the CPU load average is about 7.5 and sometimes exceeds 10 (a 100% load for the 8 CPUs is 8). This means there's more work to be done than what the CPUs can handle."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"System load metrics screenshot",src:n(19483).A+"",width:"3278",height:"1542"})}),"\n",(0,s.jsx)(t.h3,{id:"2-world-state-healing",children:"2. World state healing"}),"\n",(0,s.jsx)(t.p,{children:"Step 2, world state healing, starts just after the world state download in step 1 is complete. The peak in system CPU is related to the high rate of input and output (IO) required during this step. IO usage is around 61% during healing, and it's only 39% during the remaining sync."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"IO utilization metrics screenshot",src:n(56556).A+"",width:"3278",height:"1542"})}),"\n",(0,s.jsx)(t.h3,{id:"3-blocks-import",children:"3. Blocks import"}),"\n",(0,s.jsx)(t.p,{children:"After steps 1 and 2, world state is downloaded and healed, and block import continues."}),"\n",(0,s.jsx)(t.p,{children:"The visible drop in CPU shows that Besu finished the world state nodes download."}),"\n",(0,s.jsx)(t.p,{children:"The block import step is long because Besu can't parallelize block import -- it must validate each parent block before importing a child."}),"\n",(0,s.jsx)(t.admonition,{type:"note",children:(0,s.jsx)(t.p,{children:"The Besu team is currently working on other algorithm and implementations to make this block import faster."})}),"\n",(0,s.jsx)(t.h3,{id:"4-blocks-full-import",children:"4. Blocks full import"}),"\n",(0,s.jsx)(t.p,{children:"In step 4, Besu executes all transactions of each block. This is when Besu updates the world state after the healing step."}),"\n",(0,s.jsx)(t.p,{children:"The quantity of imported blocks in this step depends on the speed of the sync. This number indicates the cumulated blocks quantity behind head since the last healing step."}),"\n",(0,s.jsx)(t.p,{children:"This step consumes less CPU than the previous steps because the sequential part -- executing transactions on the EVM -- must be single-threaded, reducing the concurrent work at the CPU level."}),"\n",(0,s.jsx)(t.h3,{id:"5-blocks-production-and-propagation",children:"5. Blocks production and propagation"}),"\n",(0,s.jsx)(t.p,{children:"Once Besu is completely synced, it propagates blocks and executes the transactions inside each block. Step 5, block production and propagation, shows a reduction in CPU consumption due to the idle time while waiting for the new block and the sequential nature of executing transactions on the EVM."}),"\n",(0,s.jsx)(t.h2,{id:"block-time",children:"Block time"}),"\n",(0,s.jsxs)(t.p,{children:["Block time measures the duration of getting new blocks in Besu. Block time is closely related to ",(0,s.jsx)(t.a,{href:"#cpu-usage",children:"CPU usage"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["The following screenshot shows patterns related to block time as available in the ",(0,s.jsx)(t.a,{href:"https://grafana.com/grafana/dashboards/16455-besu-full/",children:"Besu Grafana full dashboard"}),"."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Block time Grafana Besu dashboard patterns screenshot",src:n(916).A+"",width:"3278",height:"1542"})}),"\n",(0,s.jsx)(t.p,{children:'The block time pattern is also a "staircase" pattern.'}),"\n",(0,s.jsx)(t.h3,{id:"1-block-import-time",children:"1. Block import time"}),"\n",(0,s.jsx)(t.p,{children:"Step 1, block import time, is the duration of importing a block."}),"\n",(0,s.jsx)(t.p,{children:"Import includes:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Data retrieval over the network."}),"\n",(0,s.jsx)(t.li,{children:"Headers, body, and receipt validation."}),"\n",(0,s.jsx)(t.li,{children:"Persisting the block in the database."}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Block import takes between a few and tens of milliseconds."}),"\n",(0,s.jsx)(t.h3,{id:"2-block-full-import-time",children:"2. Block full import time"}),"\n",(0,s.jsx)(t.p,{children:"Step 2, block full import time, is the duration of importing a block (step 1) and executing all its transactions."}),"\n",(0,s.jsx)(t.p,{children:"Block full import takes between 1 and 2 seconds per block, depending on the number and complexity of the transactions."}),"\n",(0,s.jsx)(t.h3,{id:"3-block-network-time",children:"3. Block network time"}),"\n",(0,s.jsx)(t.p,{children:"Step 3, block network time, is the duration of propagating a block over the network and executing all its transactions."}),"\n",(0,s.jsx)(t.p,{children:"Block network takes between 13 and 16 seconds."}),"\n","\n",(0,s.jsxs)(t.section,{"data-footnotes":!0,className:"footnotes",children:[(0,s.jsx)(t.h2,{className:"sr-only",id:"footnote-label",children:"Footnotes"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{id:"user-content-fn-1",children:["\n",(0,s.jsxs)(t.p,{children:["A CPU-bound task means that the time required to execute the task is determined only by the CPU speed. ",(0,s.jsx)(t.a,{href:"#user-content-fnref-1","data-footnote-backref":"","aria-label":"Back to reference 1",className:"data-footnote-backref",children:"\u21a9"})]}),"\n"]}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},93786:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/besu-cpu-pattern-during-sync-9dc0a3001d32b5c874786314294831a1.png"},916:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/block-time-36affada807e42dd327dd24806dbdc08.png"},56556:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/io-utilization-dfd3d125732a0f304100b4f3c9e4ae76.png"},19483:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/system-load-f37361d1a1cd21c6384bfde9cf10ce2f.png"},28453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var s=n(96540);const i={},o=s.createContext(i);function r(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1a78f042.c239554b.js b/assets/js/1a78f042.c239554b.js new file mode 100644 index 00000000000..86960de3f31 --- /dev/null +++ b/assets/js/1a78f042.c239554b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2460],{22556:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>t,metadata:()=>c,toc:()=>d});var o=s(74848),i=s(28453);const t={title:"Manage peers",sidebar_position:3,description:"Managing Besu peers",tags:["public networks","private networks"]},r="Manage peers",c={id:"public-networks/how-to/connect/manage-peers",title:"Manage peers",description:"Managing Besu peers",source:"@site/docs/public-networks/how-to/connect/manage-peers.md",sourceDirName:"public-networks/how-to/connect",slug:"/public-networks/how-to/connect/manage-peers",permalink:"/public-networks/how-to/connect/manage-peers",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/connect/manage-peers.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Manage peers",sidebar_position:3,description:"Managing Besu peers",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Configure ports",permalink:"/public-networks/how-to/connect/configure-ports"},next:{title:"Specify NAT method",permalink:"/public-networks/how-to/connect/specify-nat"}},l={},d=[{value:"P2P discovery process",id:"p2p-discovery-process",level:2},{value:"Limit peers",id:"limit-peers",level:2},{value:"Allowlist peers",id:"allowlist-peers",level:2},{value:"Limit remote connections",id:"limit-remote-connections",level:2},{value:"Monitor peer connections",id:"monitor-peer-connections",level:2},{value:"List node connections",id:"list-node-connections",level:2},{value:"Disable discovery",id:"disable-discovery",level:2},{value:"Troubleshoot",id:"troubleshoot",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"manage-peers",children:"Manage peers"})}),"\n",(0,o.jsxs)(n.p,{children:["Besu peer-to-peer (P2P) discovery happens periodically based on the number of peers in a\nnetwork and the node's ",(0,o.jsx)(n.a,{href:"#limit-peers",children:"peer limit"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"The frequency of discovery isn't configurable, but you can:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"#limit-remote-connections",children:"Limit remote connections"})," in public networks."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"#allowlist-peers",children:"Allowlist peers by IP subnet"})," to create a private network of peers across public\nnetworks."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#random-peer-priority-enabled",children:"Randomly prioritize connections"})," in\nsmall, stable networks."]}),"\n"]}),"\n",(0,o.jsx)(n.admonition,{type:"info",children:(0,o.jsxs)(n.p,{children:["You can use ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#admin_addpeer",children:(0,o.jsx)(n.code,{children:"admin_addPeer"})})," to attempt a specific\nconnection, but this isn't P2P discovery."]})}),"\n",(0,o.jsxs)(n.p,{children:["In private networks, we recommend\n",(0,o.jsx)(n.a,{href:"/private-networks/how-to/configure/bootnodes",children:"using bootnodes"})," to initially discover peers."]}),"\n",(0,o.jsx)(n.h2,{id:"p2p-discovery-process",children:"P2P discovery process"}),"\n",(0,o.jsxs)(n.p,{children:["The P2P discovery process requires ",(0,o.jsx)(n.a,{href:"/public-networks/how-to/connect/configure-ports#p2p-networking",children:"ports to be open to UDP and TCP traffic"}),".\nIf you have a firewall in place, keep those ports open to allow traffic in and out.\nIf you are running a node at home on your network, ensure that your router has those ports open."]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"discovery"})," stack uses UDP to keep peer discovery lightweight and quick.\nIt only allows a node to find peers and connect to them, without any additional overhead.\nOnce peers have bonded, the data exchange between them is complex and needs a fully featured\nprotocol to support error checking and retries, so the ",(0,o.jsx)(n.code,{children:"devP2P"})," stack uses TCP."]}),"\n",(0,o.jsxs)(n.p,{children:["Both stacks work in parallel: the ",(0,o.jsx)(n.code,{children:"discovery"})," stack adds new peers to the network, and the ",(0,o.jsx)(n.code,{children:"devP2P"}),"\nstack enables interactions and data flow between them.\nIn detail, the P2P discovery process is as follows:"]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["When Besu starts up it advertises its presence and details (including the enode) using UDP before\nestablishing a formal connection with any peer (log messages look like ",(0,o.jsx)(n.code,{children:"Enode URL enode://...."}),")."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Besu attempts to connect to the network's bootnodes (a set of predefined nodes used to help\nbootstrap discovery)."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Once a connection with a bootnode is established using UDP (",(0,o.jsx)(n.code,{children:"ping/pong"})," handshake messages in the\ndebug and trace logs), Besu requests a list of neighbors (potential peers) from the bootnode\n(",(0,o.jsx)(n.code,{children:"find node"})," messages in the debug and trace logs)."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Besu attempts to connect to each peer using TCP, and get status information from them \u2013 such\nas network details, what the peer believes to be the current chain head, and its list of neighbors.\nFrom this point on any traffic to that peer is only done using TCP."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Depending on the ",(0,o.jsx)(n.a,{href:"/public-networks/concepts/node-sync",children:"synchronization method"}),", a common block\n(the pivot block) is selected that all connected peers (default of 5) have, and Besu syncs from\nthat block till it gets to chain head.\nLog messages look like ",(0,o.jsx)(n.code,{children:"Downloading world state from peers for pivot block ......."}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Besu repeats the same process for each peer in step 4, and any new peers that come along\n(regardless of client)."}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"The more peers Besu is connected to, the more confident it is of having an accurate view of the network."}),"\n",(0,o.jsx)(n.h2,{id:"limit-peers",children:"Limit peers"}),"\n",(0,o.jsx)(n.p,{children:"You can limit peers to reduce the bandwidth, CPU time, and disk access Besu uses to manage and respond to peers."}),"\n",(0,o.jsxs)(n.p,{children:["To reduce the maximum number of peers, use the ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#max-peers",children:(0,o.jsx)(n.code,{children:"--max-peers"})})," option. The default is 25."]}),"\n",(0,o.jsx)(n.h2,{id:"allowlist-peers",children:"Allowlist peers"}),"\n",(0,o.jsxs)(n.p,{children:["You can can define specific IP subnets permitted to interact with the node using the ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#net-restrict",children:(0,o.jsx)(n.code,{children:"--net-restrict"})})," configuration. This restricts access to only those peers whose IP addresses fall within the allowed subnets. This is useful if you maintain a set of nodes and want to restrict which of those can connect to external nodes."]}),"\n",(0,o.jsx)(n.h2,{id:"limit-remote-connections",children:"Limit remote connections"}),"\n",(0,o.jsxs)(n.p,{children:["Prevent eclipse attacks when using ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:(0,o.jsx)(n.code,{children:"--sync-mode"})})," and ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options##sync-min-peers-fast-sync-min-peers",children:(0,o.jsx)(n.code,{children:"--fast-sync-min-peers"})})," on public networks by enabling the ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#remote-connections-limit-enabled",children:"remote connection limits"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["In private and permissioned networks with only trusted peers, enabling the remote connection limits is unnecessary and might adversely affect the speed at which nodes can join the network. Limiting remote connections can cause a closed group of peers to form when the number of nodes in the network is slightly higher than ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#max-peers",children:(0,o.jsx)(n.code,{children:"--max-peers"})}),". The nodes in this closed group are all connected to each other and can't accept more connections."]}),"\n",(0,o.jsx)(n.admonition,{type:"tip",children:(0,o.jsxs)(n.p,{children:["You can use ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#random-peer-priority-enabled",children:(0,o.jsx)(n.code,{children:"--random-peer-priority-enabled"})})," to help prevent closed groups of peers in small, stable networks."]})}),"\n",(0,o.jsx)(n.h2,{id:"monitor-peer-connections",children:"Monitor peer connections"}),"\n",(0,o.jsx)(n.p,{children:"JSON-RPC API methods to monitor peer connections include:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"/public-networks/reference/api/#net_peercount",children:(0,o.jsx)(n.code,{children:"net_peerCount"})}),"."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"/public-networks/reference/api/#admin_peers",children:(0,o.jsx)(n.code,{children:"admin_peers"})}),"."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"/public-networks/reference/api/#debug_metrics",children:(0,o.jsx)(n.code,{children:"debug_metrics"})}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Each peer entry returned by ",(0,o.jsx)(n.a,{href:"/public-networks/reference/api/#admin_peers",children:(0,o.jsx)(n.code,{children:"admin_peers"})})," includes a ",(0,o.jsx)(n.code,{children:"protocols"})," section. Use the information in the ",(0,o.jsx)(n.code,{children:"protocols"})," section to:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Determine the health of peers. For example, an external process can use ",(0,o.jsx)(n.a,{href:"/public-networks/reference/api/#admin_peers",children:(0,o.jsx)(n.code,{children:"admin_peers"})})," and ",(0,o.jsx)(n.a,{href:"/public-networks/reference/api/#admin_removepeer",children:(0,o.jsx)(n.code,{children:"admin_removePeer"})})," to disconnect from peers that are stalled at a single difficulty for an extended period of time."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Monitor node health. For example, if peers report increasing difficulties but the node is stuck at the same block number, the node may be on a different fork to most peers."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Determine which protocol level peers are communicating with. For example, you can see if ",(0,o.jsx)(n.code,{children:'"version": 65'})," is being used to reduce transaction sharing traffic."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"list-node-connections",children:"List node connections"}),"\n",(0,o.jsxs)(n.p,{children:["The default logging configuration doesn't list node connection and disconnection messages. To enable listing them, set the ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#logging",children:(0,o.jsx)(n.code,{children:"--logging"})})," option to ",(0,o.jsx)(n.code,{children:"DEBUG"}),". For more verbosity, set the option to ",(0,o.jsx)(n.code,{children:"TRACE"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["The console logs connection and disconnection events when the log level is ",(0,o.jsx)(n.code,{children:"DEBUG"})," or higher. If the message ",(0,o.jsx)(n.code,{children:"Successfully accepted connection from ..."})," displays, connections are getting through the firewalls."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",metastring:'title="Sample log output"',children:"2018-10-16 12:37:35.479-04:00 | nioEventLoopGroup-3-1 | INFO | NettyP2PNetwork | Successfully accepted connection from 0xa979fb575495b8d6db44f750317d0f4622bf4c2aa3365d6af7c284339968eef29b69ad0dce72a4d8db5ebb4968de0e3bec910127f134779fbcb0cb6d3331163c\n"})}),"\n",(0,o.jsx)(n.h2,{id:"disable-discovery",children:"Disable discovery"}),"\n",(0,o.jsxs)(n.p,{children:["To disable P2P discovery, set the ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#discovery-enabled",children:(0,o.jsx)(n.code,{children:"--discovery-enabled"})})," option to ",(0,o.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["With discovery disabled, peers can't open connections with the node unless they were previously discovered or manually peered (for example, using ",(0,o.jsx)(n.a,{href:"/public-networks/reference/api/#admin_addpeer",children:(0,o.jsx)(n.code,{children:"admin_addPeer"})}),"). ",(0,o.jsx)(n.a,{href:"/public-networks/how-to/connect/static-nodes",children:"Static nodes"})," can also open connections."]}),"\n",(0,o.jsx)(n.h2,{id:"troubleshoot",children:"Troubleshoot"}),"\n",(0,o.jsxs)(n.p,{children:["If you encounter issues with peering, see the ",(0,o.jsx)(n.a,{href:"/public-networks/how-to/troubleshoot/peering",children:"troubleshoot peering documentation"}),", which helps you identify and resolve common problems that can occur during the peering process."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>c});var o=s(96540);const i={},t=o.createContext(i);function r(e){const n=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),o.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1b2e0ee9.145fc4b8.js b/assets/js/1b2e0ee9.145fc4b8.js new file mode 100644 index 00000000000..0d3d23ce20d --- /dev/null +++ b/assets/js/1b2e0ee9.145fc4b8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5430],{58087:(e,t,i)=>{i.r(t),i.d(t,{assets:()=>a,contentTitle:()=>o,default:()=>d,frontMatter:()=>n,metadata:()=>l,toc:()=>c});var r=i(74848),s=i(28453);const n={title:"Use client libraries",sidebar_position:2,description:"Besu client libraries",tags:["public networks","private networks"]},o="Use client libraries",l={id:"public-networks/how-to/develop/client-libraries",title:"Use client libraries",description:"Besu client libraries",source:"@site/docs/public-networks/how-to/develop/client-libraries.md",sourceDirName:"public-networks/how-to/develop",slug:"/public-networks/how-to/develop/client-libraries",permalink:"/public-networks/how-to/develop/client-libraries",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/develop/client-libraries.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Use client libraries",sidebar_position:2,description:"Besu client libraries",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Use Hardhat",permalink:"/public-networks/how-to/develop/hardhat"},next:{title:"Configure mining",permalink:"/public-networks/how-to/use-pow/mining"}},a={},c=[];function p(e){const t={a:"a",admonition:"admonition",h1:"h1",header:"header",img:"img",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"use-client-libraries",children:"Use client libraries"})}),"\n",(0,r.jsxs)(t.p,{children:["Dapps use client libraries, such as ",(0,r.jsx)(t.a,{href:"https://github.com/ethereum/web3.js/",children:"web3.js"}),", ",(0,r.jsx)(t.a,{href:"https://github.com/web3j/web3j",children:"web3j"}),", or ",(0,r.jsx)(t.a,{href:"https://github.com/ethereum/ethereumj",children:"ethereumj"}),", to forward JSON-RPC requests to Besu. Any client library implementing core Ethereum RPC methods works with Besu."]}),"\n",(0,r.jsxs)(t.p,{children:["Use the ",(0,r.jsx)(t.a,{href:"/private-networks/how-to/use-privacy/web3js-quorum",children:"web3js-quorum library"})," with Besu for ",(0,r.jsx)(t.a,{href:"/private-networks/concepts/privacy/",children:"privacy features"}),"."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Client Libraries",src:i(84494).A+"",width:"1520",height:"1316"})}),"\n",(0,r.jsx)(t.p,{children:"Use client libraries to:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Create signed transactions"}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/private-networks/how-to/send-transactions/private-transactions",children:"Create and send private transactions"}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"/public-networks/how-to/send-transactions#use-wallets-for-key-management",children:"Besu does not support key management inside the client"}),"."]})})]})}function d(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},84494:(e,t,i)=>{i.d(t,{A:()=>r});const r=i.p+"assets/images/Hyperledger-Besu-Client-Libraries-cab8a506f122249c4d4d139436858697.png"},28453:(e,t,i)=>{i.d(t,{R:()=>o,x:()=>l});var r=i(96540);const s={},n=r.createContext(s);function o(e){const t=r.useContext(n);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1b5bfdea.b747c2a4.js b/assets/js/1b5bfdea.b747c2a4.js new file mode 100644 index 00000000000..541afe90ded --- /dev/null +++ b/assets/js/1b5bfdea.b747c2a4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[903],{96349:(e,s,n)=>{n.r(s),n.d(s,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>r,metadata:()=>c,toc:()=>h});var t=n(74848),o=n(28453);const r={description:"Besu API",tags:["public networks","private networks"]},i="Access the Besu API",c={id:"public-networks/how-to/use-besu-api/index",title:"Access the Besu API",description:"Besu API",source:"@site/docs/public-networks/how-to/use-besu-api/index.md",sourceDirName:"public-networks/how-to/use-besu-api",slug:"/public-networks/how-to/use-besu-api/",permalink:"/public-networks/how-to/use-besu-api/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/use-besu-api/index.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{description:"Besu API",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Use a profile",permalink:"/public-networks/how-to/configure-besu/profile"},next:{title:"Use JSON-RPC over HTTP, WS, and IPC",permalink:"/public-networks/how-to/use-besu-api/json-rpc"}},l={},h=[{value:"Enable API access",id:"enable-api-access",level:2},{value:"Service hosts",id:"service-hosts",level:2},{value:"Service ports",id:"service-ports",level:2},{value:"Socket path",id:"socket-path",level:2},{value:"Host allowlist",id:"host-allowlist",level:2},{value:"Not supported by Besu",id:"not-supported-by-besu",level:2},{value:"Account management",id:"account-management",level:3},{value:"Protocols",id:"protocols",level:3}];function a(e){const s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.header,{children:(0,t.jsx)(s.h1,{id:"access-the-besu-api",children:"Access the Besu API"})}),"\n",(0,t.jsxs)(s.p,{children:["Access the ",(0,t.jsx)(s.a,{href:"/public-networks/reference/api/",children:"Besu API"})," using:"]}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.a,{href:"/public-networks/how-to/use-besu-api/json-rpc",children:"JSON-RPC over HTTP, WebSocket, or IPC"})}),"\n",(0,t.jsx)(s.li,{children:(0,t.jsx)(s.a,{href:"/public-networks/how-to/use-besu-api/rpc-pubsub",children:"RPC Pub/Sub over WebSockets"})}),"\n",(0,t.jsxs)(s.li,{children:[(0,t.jsx)(s.a,{href:"/public-networks/how-to/use-besu-api/graphql",children:"GraphQL over HTTP"}),"."]}),"\n"]}),"\n",(0,t.jsx)(s.admonition,{type:"note",children:(0,t.jsxs)(s.p,{children:["HTTP and WebSocket responses are compact JSON by default. You can use ",(0,t.jsx)(s.a,{href:"/public-networks/reference/cli/options#json-pretty-print-enabled",children:(0,t.jsx)(s.code,{children:"--json-pretty-print-enabled"})})," to pretty-print the output."]})}),"\n",(0,t.jsx)(s.p,{children:"The following sections provide information about JSON-RPC, RPC Pub/Sub, and GraphQL."}),"\n",(0,t.jsx)(s.h2,{id:"enable-api-access",children:"Enable API access"}),"\n",(0,t.jsxs)(s.p,{children:["To enable API access, use the ",(0,t.jsx)(s.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,t.jsx)(s.code,{children:"--rpc-http-enabled"})}),", ",(0,t.jsx)(s.a,{href:"/public-networks/reference/cli/options#rpc-ws-enabled",children:(0,t.jsx)(s.code,{children:"--ws-http-enabled"})}),", ",(0,t.jsx)(s.a,{href:"/public-networks/reference/cli/options#graphql-http-enabled",children:(0,t.jsx)(s.code,{children:"--graphql-http-enabled"})}),", and ",(0,t.jsx)(s.code,{children:"--Xrpc-ipc-enabled"})," options."]}),"\n",(0,t.jsx)(s.admonition,{type:"caution",children:(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"--Xrpc-ipc-enabled"})," is an early access option."]})}),"\n",(0,t.jsx)(s.h2,{id:"service-hosts",children:"Service hosts"}),"\n",(0,t.jsxs)(s.p,{children:["To specify the host the API service listens on, use the ",(0,t.jsx)(s.a,{href:"/public-networks/reference/cli/options#rpc-http-host",children:(0,t.jsx)(s.code,{children:"--rpc-http-host"})}),", ",(0,t.jsx)(s.a,{href:"/public-networks/reference/cli/options#rpc-ws-host",children:(0,t.jsx)(s.code,{children:"--rpc-ws-host"})}),", and ",(0,t.jsx)(s.a,{href:"/public-networks/reference/cli/options#graphql-http-host",children:(0,t.jsx)(s.code,{children:"--graphql-http-host"})})," options. The default host is ",(0,t.jsx)(s.code,{children:"127.0.0.1"}),"."]}),"\n",(0,t.jsxs)(s.p,{children:["To allow remote connections, set the host to ",(0,t.jsx)(s.code,{children:"0.0.0.0"}),"."]}),"\n",(0,t.jsx)(s.admonition,{type:"caution",children:(0,t.jsxs)(s.p,{children:["Setting the host to ",(0,t.jsx)(s.code,{children:"0.0.0.0"})," exposes the API service connection on your node to any remote connection. In a production environment, ensure you use a firewall to avoid exposing your node to the internet."]})}),"\n",(0,t.jsx)(s.h2,{id:"service-ports",children:"Service ports"}),"\n",(0,t.jsxs)(s.p,{children:["To specify the port the API service listens on, use the ",(0,t.jsx)(s.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,t.jsx)(s.code,{children:"--rpc-http-port"})}),", ",(0,t.jsx)(s.a,{href:"/public-networks/reference/cli/options#rpc-ws-port",children:(0,t.jsx)(s.code,{children:"--rpc-ws-port"})}),", and ",(0,t.jsx)(s.a,{href:"/public-networks/reference/cli/options#graphql-http-port",children:(0,t.jsx)(s.code,{children:"--graphql-http-port"})})," options."]}),"\n",(0,t.jsx)(s.p,{children:"The default ports are:"}),"\n",(0,t.jsxs)(s.ul,{children:["\n",(0,t.jsx)(s.li,{children:"8545 for JSON-RPC over HTTP."}),"\n",(0,t.jsx)(s.li,{children:"8546 for JSON-RPC over WebSocket."}),"\n",(0,t.jsx)(s.li,{children:"8547 for GraphQL over HTTP."}),"\n"]}),"\n",(0,t.jsxs)(s.p,{children:["Ports must be ",(0,t.jsx)(s.a,{href:"/public-networks/how-to/connect/configure-ports",children:"exposed appropriately"}),"."]}),"\n",(0,t.jsx)(s.h2,{id:"socket-path",children:"Socket path"}),"\n",(0,t.jsxs)(s.p,{children:["To specify the socket path for the IPC socket, use the ",(0,t.jsx)(s.code,{children:"--Xrpc-ipc-path"})," option. The default path is ",(0,t.jsx)(s.code,{children:"besu.ipc"})," in the Besu data directory."]}),"\n",(0,t.jsx)(s.admonition,{type:"caution",children:(0,t.jsxs)(s.p,{children:[(0,t.jsx)(s.code,{children:"--Xrpc-ipc-path"})," is an early access option."]})}),"\n",(0,t.jsx)(s.h2,{id:"host-allowlist",children:"Host allowlist"}),"\n",(0,t.jsxs)(s.p,{children:["To prevent DNS rebinding attacks, Besu checks incoming HTTP request host headers, WebSocket connections, and GraphQL requests. Besu accepts requests only when hostnames specified using the ",(0,t.jsx)(s.a,{href:"/public-networks/reference/cli/options#host-allowlist",children:(0,t.jsx)(s.code,{children:"--host-allowlist"})})," option matches the request host headers. By default, Besu accepts requests and connections from ",(0,t.jsx)(s.code,{children:"localhost"})," and ",(0,t.jsx)(s.code,{children:"127.0.0.1"}),"."]}),"\n",(0,t.jsx)(s.admonition,{type:"info",children:(0,t.jsxs)(s.p,{children:["This isn't a permissioning feature. To restrict access to the API, we recommend using the ",(0,t.jsx)(s.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"Besu authentication mechanism"})," with username and password authentication or JWT public key authentication."]})}),"\n",(0,t.jsx)(s.p,{children:"If your application publishes RPC ports, specify the hostnames when starting Besu."}),"\n",(0,t.jsx)(s.pre,{children:(0,t.jsx)(s.code,{className:"language-bash",children:"besu --host-allowlist=example.com\n"})}),"\n",(0,t.jsxs)(s.p,{children:["Specify ",(0,t.jsx)(s.code,{children:"*"})," for ",(0,t.jsx)(s.code,{children:"--host-allowlist"})," to effectively disable host protection."]}),"\n",(0,t.jsx)(s.admonition,{type:"caution",children:(0,t.jsxs)(s.p,{children:["Specifying ",(0,t.jsx)(s.code,{children:"*"})," for ",(0,t.jsx)(s.code,{children:"--host-allowlist"})," is not recommended for production code."]})}),"\n",(0,t.jsx)(s.h2,{id:"not-supported-by-besu",children:"Not supported by Besu"}),"\n",(0,t.jsx)(s.h3,{id:"account-management",children:"Account management"}),"\n",(0,t.jsx)(s.p,{children:"Account management relies on private key management in the client, which is not supported by Besu."}),"\n",(0,t.jsxs)(s.p,{children:["To send signed transactions, use ",(0,t.jsx)(s.a,{href:"/public-networks/reference/api/#eth_sendrawtransaction",children:(0,t.jsx)(s.code,{children:"eth_sendRawTransaction"})}),". ",(0,t.jsx)(s.code,{children:"eth_sendTransaction"})," is not implemented."]}),"\n",(0,t.jsxs)(s.p,{children:["For ",(0,t.jsx)(s.a,{href:"/public-networks/how-to/send-transactions#use-wallets-for-key-management",children:"account management"}),", use third-party wallets."]}),"\n",(0,t.jsx)(s.h3,{id:"protocols",children:"Protocols"}),"\n",(0,t.jsx)(s.p,{children:"Besu does not support the Whisper and Swarm protocols."})]})}function p(e={}){const{wrapper:s}={...(0,o.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},28453:(e,s,n)=>{n.d(s,{R:()=>i,x:()=>c});var t=n(96540);const o={},r=t.createContext(o);function i(e){const s=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(r.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1b73c7ba.2d6cbe43.js b/assets/js/1b73c7ba.2d6cbe43.js new file mode 100644 index 00000000000..df9525ac0ae --- /dev/null +++ b/assets/js/1b73c7ba.2d6cbe43.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[973],{10512:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>l,toc:()=>a});var s=r(74848),t=r(28453);const o={description:"Private networks how to overview",tags:["private networks"]},i="How to",l={id:"private-networks/how-to/index",title:"How to",description:"Private networks how to overview",source:"@site/docs/private-networks/how-to/index.md",sourceDirName:"private-networks/how-to",slug:"/private-networks/how-to/",permalink:"/private-networks/how-to/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{description:"Private networks how to overview",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Start Besu",permalink:"/private-networks/get-started/start-node"},next:{title:"Consensus protocols",permalink:"/private-networks/how-to/configure/consensus/"}},c={},a=[];function h(e){const n={a:"a",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"how-to",children:"How to"})}),"\n",(0,s.jsx)(n.p,{children:"This section provides instructional content for private network features."}),"\n",(0,s.jsxs)(n.p,{children:["The following features are shared with ",(0,s.jsx)(n.a,{href:"/public-networks/",children:"public networks"})," and the content can be found in the public networks section:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Configure and manage:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/",children:"Use a configuration file"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/configure-ha/",children:"Configure high availability"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-pow/mining",children:"Configure mining"})}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/",children:"Use the Besu API"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc",children:"Use JSON-RPC over HTTP, WS, and IPC"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/rpc-pubsub",children:"Use RPC Pub/Sub over WS"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/graphql",children:"Use GraphQL over HTTP"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"Authenticate JSON-RPC requests"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/access-logs",children:"Access logs using JSON-RPC API"})}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Find and connect to peers:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/static-nodes",children:"Configure static nodes"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/configure-ports",children:"Configure ports"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/manage-peers",children:"Manage peers"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat",children:"Specify NAT method"})}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Configure Java:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/configure-java/install-update-java",children:"Install and update Java"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/configure-java/pass-jvm-options",children:"Pass JVM options"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/configure-java/manage-memory",children:"Manage JVM memory"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/configure-java/java-flight-recorder",children:"Use Java Flight Recorder"})}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Develop dapps:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/develop/hardhat",children:"Use Hardhat"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/develop/client-libraries",children:"Use client libraries"})}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["Troubleshoot:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/troubleshoot/evm-tool",children:"Use EVM tool"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/how-to/troubleshoot/trace-transactions",children:"Trace transactions"})}),"\n"]}),"\n"]}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},28453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>l});var s=r(96540);const t={},o=s.createContext(t);function i(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/1f29a5e5.374e7339.js b/assets/js/1f29a5e5.374e7339.js new file mode 100644 index 00000000000..13c057072ec --- /dev/null +++ b/assets/js/1f29a5e5.374e7339.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2093],{76658:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>d,default:()=>p,frontMatter:()=>i,metadata:()=>l,toc:()=>u});var a=r(74848),n=r(28453),o=r(11470),s=r(19365);const i={title:"Add and removing IBFT 2.0 validators",sidebar_position:1,description:"Adding and removing IBFT 2.0 validators",tags:["private networks"]},d="Add and remove IBFT 2.0 validators",l={id:"private-networks/tutorials/ibft/validators",title:"Add and removing IBFT 2.0 validators",description:"Adding and removing IBFT 2.0 validators",source:"@site/docs/private-networks/tutorials/ibft/validators.md",sourceDirName:"private-networks/tutorials/ibft",slug:"/private-networks/tutorials/ibft/validators",permalink:"/private-networks/tutorials/ibft/validators",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/ibft/validators.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Add and removing IBFT 2.0 validators",sidebar_position:1,description:"Adding and removing IBFT 2.0 validators",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Create a private network using IBFT 2.0",permalink:"/private-networks/tutorials/ibft/"},next:{title:"Create a Clique network",permalink:"/private-networks/tutorials/clique"}},c={},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Add a validator",id:"add-a-validator",level:2},{value:"1. Create directories",id:"1-create-directories",level:3},{value:"2. Start the node",id:"2-start-the-node",level:3},{value:"3. Copy the address of the node",id:"3-copy-the-address-of-the-node",level:3},{value:"4. Propose adding the new validator",id:"4-propose-adding-the-new-validator",level:3},{value:"5. Verify the addition of the new validator",id:"5-verify-the-addition-of-the-new-validator",level:3},{value:"Remove a validator",id:"remove-a-validator",level:2}];function h(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,n.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(t.header,{children:(0,a.jsx)(t.h1,{id:"add-and-remove-ibft-20-validators",children:"Add and remove IBFT 2.0 validators"})}),"\n",(0,a.jsxs)(t.p,{children:["This example walks through ",(0,a.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/ibft#add-and-remove-validators",children:"adding and removing an IBFT 2.0 validator"}),"."]}),"\n",(0,a.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsx)(t.li,{children:(0,a.jsx)(t.a,{href:"/private-networks/tutorials/ibft/",children:"IBFT 2.0 network as configured in the IBFT 2.0 tutorial"})}),"\n"]}),"\n",(0,a.jsx)(t.h2,{id:"add-a-validator",children:"Add a validator"}),"\n",(0,a.jsx)(t.h3,{id:"1-create-directories",children:"1. Create directories"}),"\n",(0,a.jsx)(t.p,{children:"Create a working directory and a data directory for the new node that needs to be added:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"mkdir -p Node-5/data\n"})}),"\n",(0,a.jsx)(t.h3,{id:"2-start-the-node",children:"2. Start the node"}),"\n",(0,a.jsxs)(t.p,{children:["Change into the working directory for the new Node-5 and start the node, specifying the ",(0,a.jsx)(t.a,{href:"/private-networks/tutorials/ibft/#6-start-the-first-node-as-the-bootnode",children:"Node-1 enode URL"})," as the bootnode:"]}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --bootnodes= --p2p-port=30307 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8549 --profile=ENTERPRISE\n'})}),"\n",(0,a.jsx)(t.p,{children:"The command line specifies:"}),"\n",(0,a.jsxs)(t.ul,{children:["\n",(0,a.jsxs)(t.li,{children:["The data directory for Node-5 using the ",(0,a.jsx)(t.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,a.jsx)(t.code,{children:"--data-path"})})," option."]}),"\n",(0,a.jsxs)(t.li,{children:["A different port to Node-1 for P2P discovery using the ",(0,a.jsx)(t.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,a.jsx)(t.code,{children:"--p2p-port"})})," option."]}),"\n",(0,a.jsxs)(t.li,{children:["A different port to Node-1 for HTTP JSON-RPC using the ",(0,a.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,a.jsx)(t.code,{children:"--rpc-http-port"})})," option."]}),"\n",(0,a.jsxs)(t.li,{children:["The enode URL of Node-1 using the ",(0,a.jsx)(t.a,{href:"/public-networks/reference/cli/options#bootnodes",children:(0,a.jsx)(t.code,{children:"--bootnodes"})})," option."]}),"\n",(0,a.jsxs)(t.li,{children:["Other options as for ",(0,a.jsx)(t.a,{href:"/private-networks/tutorials/ibft/#6-start-the-first-node-as-the-bootnode",children:"Node-1"}),"."]}),"\n"]}),"\n",(0,a.jsx)(t.h3,{id:"3-copy-the-address-of-the-node",children:"3. Copy the address of the node"}),"\n",(0,a.jsx)(t.p,{children:"Copy the address of the node. You can find the address in the logs when starting the new node:"}),"\n",(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"2021-05-28 09:49:00.881+10:00 | main | INFO | DefaultP2PNetwork | Node address 0x90626e6a67445aabf1c0615410d108d4733aa90b\n"})}),"\n",(0,a.jsxs)(t.p,{children:["Or use the ",(0,a.jsx)(t.a,{href:"/public-networks/reference/cli/subcommands#export-address",children:(0,a.jsx)(t.code,{children:"public-key export-address"})})," subcommand:"]}),"\n",(0,a.jsxs)(o.A,{children:[(0,a.jsx)(s.A,{value:"Subcommand",label:"Subcommand",default:!0,children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"besu --data-path=IBFT-Network/Node-5/data public-key export-address\n"})})}),(0,a.jsx)(s.A,{value:"Output",label:"Output",children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:"0x90626e6a67445aabf1c0615410d108d4733aa90b\n"})})})]}),"\n",(0,a.jsx)(t.h3,{id:"4-propose-adding-the-new-validator",children:"4. Propose adding the new validator"}),"\n",(0,a.jsxs)(t.p,{children:["Propose adding the new validator from more than half the number of current validators, using ",(0,a.jsx)(t.a,{href:"/public-networks/reference/api/#ibft_proposevalidatorvote",children:(0,a.jsx)(t.code,{children:"ibft_proposeValidatorVote"})}),", specifying the address of the proposed validator and ",(0,a.jsx)(t.code,{children:"true"}),":"]}),"\n",(0,a.jsxs)(o.A,{children:[(0,a.jsx)(s.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"ibft_proposeValidatorVote","params":["0x90626e6a67445aabf1c0615410d108d4733aa90b", true], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,a.jsx)(s.A,{value:"JSON result",label:"JSON result",children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,a.jsx)(t.p,{children:"Repeat the proposal process for this candidate node from at least two of the other nodes."}),"\n",(0,a.jsx)(t.h3,{id:"5-verify-the-addition-of-the-new-validator",children:"5. Verify the addition of the new validator"}),"\n",(0,a.jsxs)(t.p,{children:["Verify that the new validator is now in the list of validators using ",(0,a.jsx)(t.a,{href:"/public-networks/reference/api/#ibft_getvalidatorsbyblocknumber",children:(0,a.jsx)(t.code,{children:"ibft_getValidatorsByBlockNumber"})}),":"]}),"\n",(0,a.jsxs)(o.A,{children:[(0,a.jsx)(s.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"ibft_getValidatorsByBlockNumber","params":["latest"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,a.jsx)(s.A,{value:"JSON result",label:"JSON result",children:(0,a.jsx)(t.pre,{children:(0,a.jsx)(t.code,{className:"language-json",children:'[\n "0x189d23d201b03ae1cf9113672df29a5d672aefa3",\n "0x2aabbc1bb9bacef60a09764d1a1f4f04a47885c1",\n "0x44b07d2c28b8ed8f02b45bd84ac7d9051b3349e6",\n "0x4c1ccd426833b9782729a212c857f2f03b7b4c0d",\n "0x90626e6a67445aabf1c0615410d108d4733aa90b"\n]\n'})})})]}),"\n",(0,a.jsx)(t.p,{children:"The list of validators contains 5 addresses now."}),"\n",(0,a.jsx)(t.h2,{id:"remove-a-validator",children:"Remove a validator"}),"\n",(0,a.jsxs)(t.p,{children:["The process for removing a validator is similar to ",(0,a.jsx)(t.a,{href:"#add-a-validator",children:"adding a validator"})," starting from step 2, except you specify ",(0,a.jsx)(t.code,{children:"false"})," as the second parameter of ",(0,a.jsx)(t.a,{href:"/public-networks/reference/api/#ibft_proposevalidatorvote",children:(0,a.jsx)(t.code,{children:"ibft_proposeValidatorVote"})}),"."]})]})}function p(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,a.jsx)(t,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},19365:(e,t,r)=>{r.d(t,{A:()=>s});r(96540);var a=r(18215);const n={tabItem:"tabItem_Ymn6"};var o=r(74848);function s(e){let{children:t,hidden:r,className:s}=e;return(0,o.jsx)("div",{role:"tabpanel",className:(0,a.A)(n.tabItem,s),hidden:r,children:t})}},11470:(e,t,r)=>{r.d(t,{A:()=>k});var a=r(96540),n=r(18215),o=r(23104),s=r(56347),i=r(205),d=r(57485),l=r(31682),c=r(70679);function u(e){return a.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:t,children:r}=e;return(0,a.useMemo)((()=>{const e=t??function(e){return u(e).map((e=>{let{props:{value:t,label:r,attributes:a,default:n}}=e;return{value:t,label:r,attributes:a,default:n}}))}(r);return function(e){const t=(0,l.XI)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function p(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:r}=e;const n=(0,s.W6)(),o=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,d.aZ)(o),(0,a.useCallback)((e=>{if(!o)return;const t=new URLSearchParams(n.location.search);t.set(o,e),n.replace({...n.location,search:t.toString()})}),[o,n])]}function b(e){const{defaultValue:t,queryString:r=!1,groupId:n}=e,o=h(e),[s,d]=(0,a.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const a=r.find((e=>e.default))??r[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:o}))),[l,u]=f({queryString:r,groupId:n}),[b,v]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[n,o]=(0,c.Dv)(r);return[n,(0,a.useCallback)((e=>{r&&o.set(e)}),[r,o])]}({groupId:n}),m=(()=>{const e=l??b;return p({value:e,tabValues:o})?e:null})();(0,i.A)((()=>{m&&d(m)}),[m]);return{selectedValue:s,selectValue:(0,a.useCallback)((e=>{if(!p({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);d(e),u(e),v(e)}),[u,v,o]),tabValues:o}}var v=r(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=r(74848);function j(e){let{className:t,block:r,selectedValue:a,selectValue:s,tabValues:i}=e;const d=[],{blockElementScrollPositionUntilNextRender:l}=(0,o.a_)(),c=e=>{const t=e.currentTarget,r=d.indexOf(t),n=i[r].value;n!==a&&(l(t),s(n))},u=e=>{let t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const r=d.indexOf(e.currentTarget)+1;t=d[r]??d[0];break}case"ArrowLeft":{const r=d.indexOf(e.currentTarget)-1;t=d[r]??d[d.length-1];break}}t?.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,n.A)("tabs",{"tabs--block":r},t),children:i.map((e=>{let{value:t,label:r,attributes:o}=e;return(0,x.jsx)("li",{role:"tab",tabIndex:a===t?0:-1,"aria-selected":a===t,ref:e=>d.push(e),onKeyDown:u,onClick:c,...o,className:(0,n.A)("tabs__item",m.tabItem,o?.className,{"tabs__item--active":a===t}),children:r??t},t)}))})}function g(e){let{lazy:t,children:r,selectedValue:o}=e;const s=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=s.find((e=>e.props.value===o));return e?(0,a.cloneElement)(e,{className:(0,n.A)("margin-top--md",e.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:s.map(((e,t)=>(0,a.cloneElement)(e,{key:t,hidden:e.props.value!==o})))})}function w(e){const t=b(e);return(0,x.jsxs)("div",{className:(0,n.A)("tabs-container",m.tabList),children:[(0,x.jsx)(j,{...t,...e}),(0,x.jsx)(g,{...t,...e})]})}function k(e){const t=(0,v.A)();return(0,x.jsx)(w,{...e,children:u(e.children)},String(t))}},28453:(e,t,r)=>{r.d(t,{R:()=>s,x:()=>i});var a=r(96540);const n={},o=a.createContext(n);function s(e){const t=a.useContext(o);return a.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),a.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2039806a.6efb1ced.js b/assets/js/2039806a.6efb1ced.js new file mode 100644 index 00000000000..5a131c50796 --- /dev/null +++ b/assets/js/2039806a.6efb1ced.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7698],{23207:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>t,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var i=s(74848),r=s(28453);const o={description:"Besu high availability",tags:["public networks","private networks"]},t="High availability of JSON-RPC and RPC Pub/Sub APIs",c={id:"public-networks/how-to/configure-ha/index",title:"High availability of JSON-RPC and RPC Pub/Sub APIs",description:"Besu high availability",source:"@site/docs/public-networks/how-to/configure-ha/index.md",sourceDirName:"public-networks/how-to/configure-ha",slug:"/public-networks/how-to/configure-ha/",permalink:"/public-networks/how-to/configure-ha/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/configure-ha/index.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{description:"Besu high availability",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Configure logging",permalink:"/public-networks/how-to/monitor/logging"},next:{title:"Sample load balancer configurations",permalink:"/public-networks/how-to/configure-ha/sample-configuration"}},a={},d=[{value:"Determine when a node is ready",id:"determine-when-a-node-is-ready",level:2},{value:"Transaction nonces",id:"transaction-nonces",level:2},{value:"Subscriptions",id:"subscriptions",level:2},{value:"Recover from dropped subscriptions",id:"recover-from-dropped-subscriptions",level:2},{value:"New headers",id:"new-headers",level:3},{value:"Logs",id:"logs",level:3},{value:"New pending transactions",id:"new-pending-transactions",level:3},{value:"Dropped pending transactions",id:"dropped-pending-transactions",level:3},{value:"Syncing",id:"syncing",level:3}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"high-availability-of-json-rpc-and-rpc-pubsub-apis",children:"High availability of JSON-RPC and RPC Pub/Sub APIs"})}),"\n",(0,i.jsxs)(n.p,{children:["To enable high availability to the ",(0,i.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/rpc-pubsub",children:"RPC Pub/Sub API over WebSocket"})," or the ",(0,i.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc",children:"JSON-RPC API"}),", run and synchronize more than one Besu node to the network. Use a load balancer to distribute requests across nodes in the cluster that are ready to receive requests."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Load Balancer",src:s(99313).A+"",width:"1394",height:"1152"})}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["We don't recommend putting ",(0,i.jsx)(n.a,{href:"/private-networks/how-to/configure/bootnodes",children:"bootnodes"})," behind a load balancer."]})}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["We recommend using load balancers over WebSockets because WebSockets are persistent connections associated with specific nodes. If you use load balancers configured in sticky mode over HTTP instead, the connection sticks to the associated node even when the node is congested and there is a lower load node available. If you use load balancers not configured in sticky mode over HTTP, the connections may switch from node to node, so some JSON-RPC requests may not provide expected results (for example, ",(0,i.jsxs)(n.a,{href:"/public-networks/reference/api/#admin-methods",children:[(0,i.jsx)(n.code,{children:"admin"})," methods"]}),", ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#net_enode",children:(0,i.jsx)(n.code,{children:"net_enode"})}),", ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#net_peercount",children:(0,i.jsx)(n.code,{children:"net_peerCount"})}),", and ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#eth_syncing",children:(0,i.jsx)(n.code,{children:"eth_syncing"})}),")."]})}),"\n",(0,i.jsx)(n.h2,{id:"determine-when-a-node-is-ready",children:"Determine when a node is ready"}),"\n",(0,i.jsxs)(n.p,{children:["Use the ",(0,i.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#readiness-and-liveness-endpoints",children:"readiness endpoint"})," to determine when a node is ready."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsx)(n.p,{children:"The minimum number of peers and number of blocks from the best known block for determining if a node considered ready is deployment specific."})}),"\n",(0,i.jsx)(n.h2,{id:"transaction-nonces",children:"Transaction nonces"}),"\n",(0,i.jsxs)(n.p,{children:["Besu obtains the nonce for the next transaction using ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gettransactioncount",children:(0,i.jsx)(n.code,{children:"eth_getTransactionCount"})}),". The nonce depends on the transactions in the ",(0,i.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool",children:"transaction pool"}),". If sending ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gettransactioncount",children:(0,i.jsx)(n.code,{children:"eth_getTransactionCount"})})," and ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#eth_sendrawtransaction",children:(0,i.jsx)(n.code,{children:"eth_sendRawTransaction"})})," requests for a specific account to more than one node, the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gettransactioncount",children:(0,i.jsx)(n.code,{children:"eth_getTransactionCount"})})," results might be incorrect."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["If using ",(0,i.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/",children:"private transactions"}),", retrieve the nonce using ",(0,i.jsx)(n.a,{href:"/private-networks/reference/api/#priv_gettransactioncount",children:(0,i.jsx)(n.code,{children:"priv_getTransactionCount"})})," or ",(0,i.jsx)(n.a,{href:"/private-networks/reference/api/#priv_geteeatransactioncount",children:(0,i.jsx)(n.code,{children:"priv_getEeaTransactionCount"})})," and send the private transactions using ",(0,i.jsx)(n.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,i.jsx)(n.code,{children:"eea_sendRawTransaction"})}),"."]})}),"\n",(0,i.jsx)(n.p,{children:"To get correct nonces when distributing requests across a cluster, either:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Track the next nonce outside of the Besu node (as MetaMask does)."}),"\n",(0,i.jsx)(n.li,{children:"Configure the load balancer in sticky mode to send requests from a specific account to a single node, unless that node is unavailable."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"subscriptions",children:"Subscriptions"}),"\n",(0,i.jsx)(n.p,{children:"You can subscribe to events using:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/rpc-pubsub",children:"RPC Pub/Sub over WebSockets"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/access-logs",children:"Filters over HTTP"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["We recommend using ",(0,i.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/rpc-pubsub",children:"RPC Pub/Sub over WebSocket"})," because WebSockets connections associate with a specific node and do not require using the load balancer in sticky mode."]}),"\n",(0,i.jsxs)(n.p,{children:["If using ",(0,i.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/access-logs",children:"filters over HTTP"}),", configure the load balancer in sticky mode to associate the subscription with a specific node."]}),"\n",(0,i.jsx)(n.h2,{id:"recover-from-dropped-subscriptions",children:"Recover from dropped subscriptions"}),"\n",(0,i.jsx)(n.p,{children:"Dropped subscriptions can occur because of:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"A disconnected WebSockets connection"}),"\n",(0,i.jsx)(n.li,{children:"The removal of the node serving the subscription from the ready pool."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["If there is a dropped subscription, missed events might occur while reconnecting to a different node. To recover dropped messages, create another subscription and follow the process for that ",(0,i.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/rpc-pubsub#subscribe",children:"subscription type"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#new-headers",children:(0,i.jsx)(n.code,{children:"newHeads"})})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#logs",children:(0,i.jsx)(n.code,{children:"logs"})})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#new-pending-transactions",children:(0,i.jsx)(n.code,{children:"newPendingTransactions"})})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#dropped-pending-transactions",children:(0,i.jsx)(n.code,{children:"droppedPendingTransactions"})})}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#syncing",children:(0,i.jsx)(n.code,{children:"syncing"})}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"new-headers",children:"New headers"}),"\n",(0,i.jsxs)(n.p,{children:["To request information on blocks from the last block before the subscription dropped to the first block received from the new subscription, use ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getblockbynumber",children:(0,i.jsx)(n.code,{children:"eth_getBlockByNumber"})}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"logs",children:"Logs"}),"\n",(0,i.jsxs)(n.p,{children:["To request logs from the block number of the last log received before the subscription dropped to the current chain head, use ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getlogs",children:(0,i.jsx)(n.code,{children:"eth_getLogs"})}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"new-pending-transactions",children:"New pending transactions"}),"\n",(0,i.jsxs)(n.p,{children:["To request all pending transactions for the new node, use ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#txpool_besutransactions",children:(0,i.jsx)(n.code,{children:"txpool_besuTransactions"})}),"."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsx)(n.p,{children:"Nodes do not all store the same pending transactions."})}),"\n",(0,i.jsx)(n.h3,{id:"dropped-pending-transactions",children:"Dropped pending transactions"}),"\n",(0,i.jsxs)(n.p,{children:["To request all pending transactions for the new node, use ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#txpool_besutransactions",children:(0,i.jsx)(n.code,{children:"txpool_besuTransactions"})}),"."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsx)(n.p,{children:"Nodes do not all store the same pending transactions."})}),"\n",(0,i.jsx)(n.h3,{id:"syncing",children:"Syncing"}),"\n",(0,i.jsxs)(n.p,{children:["The syncing state of each node is specific to that node. To retrieve the syncing state of the new node, use ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#eth_syncing",children:(0,i.jsx)(n.code,{children:"eth_syncing"})}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},99313:(e,n,s)=>{s.d(n,{A:()=>i});const i=s.p+"assets/images/LoadBalancer-826ae74f729e635521c18cce763c439d.png"},28453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>c});var i=s(96540);const r={},o=i.createContext(r);function t(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/22dd74f7.48905444.js b/assets/js/22dd74f7.48905444.js new file mode 100644 index 00000000000..720dc0e4eeb --- /dev/null +++ b/assets/js/22dd74f7.48905444.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1567],{55226:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"publicDocSidebar":[{"type":"link","label":"Introduction","href":"/public-networks/","docId":"public-networks/index","unlisted":false},{"type":"category","label":"Get started","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"System requirements","href":"/public-networks/get-started/system-requirements","docId":"public-networks/get-started/system-requirements","unlisted":false},{"type":"category","label":"Install Besu","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Run Besu from Docker image","href":"/public-networks/get-started/install/run-docker-image","docId":"public-networks/get-started/install/run-docker-image","unlisted":false},{"type":"link","label":"Install binary distribution","href":"/public-networks/get-started/install/binary-distribution","docId":"public-networks/get-started/install/binary-distribution","unlisted":false}],"href":"/public-networks/get-started/install/"},{"type":"link","label":"Start Besu","href":"/public-networks/get-started/start-node","docId":"public-networks/get-started/start-node","unlisted":false},{"type":"category","label":"Connect to a network","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Connect to Mainnet","href":"/public-networks/get-started/connect/mainnet","docId":"public-networks/get-started/connect/mainnet","unlisted":false},{"type":"link","label":"Connect to a testnet","href":"/public-networks/get-started/connect/testnet","docId":"public-networks/get-started/connect/testnet","unlisted":false}],"href":"/public-networks/get-started/connect/"},{"type":"link","label":"Migrate to Besu","href":"/public-networks/get-started/migrate-to-besu","docId":"public-networks/get-started/migrate-to-besu","unlisted":false}],"href":"/public-networks/get-started"},{"type":"category","label":"How to","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Configure Besu","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Use a profile","href":"/public-networks/how-to/configure-besu/profile","docId":"public-networks/how-to/configure-besu/profile","unlisted":false}],"href":"/public-networks/how-to/configure-besu/"},{"type":"category","label":"Use the Besu API","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Use JSON-RPC over HTTP, WS, and IPC","href":"/public-networks/how-to/use-besu-api/json-rpc","docId":"public-networks/how-to/use-besu-api/json-rpc","unlisted":false},{"type":"link","label":"Use RPC Pub/Sub over WS","href":"/public-networks/how-to/use-besu-api/rpc-pubsub","docId":"public-networks/how-to/use-besu-api/rpc-pubsub","unlisted":false},{"type":"link","label":"Use GraphQL over HTTP","href":"/public-networks/how-to/use-besu-api/graphql","docId":"public-networks/how-to/use-besu-api/graphql","unlisted":false},{"type":"link","label":"Authenticate over JSON-RPC requests","href":"/public-networks/how-to/use-besu-api/authenticate","docId":"public-networks/how-to/use-besu-api/authenticate","unlisted":false},{"type":"link","label":"Access logs using JSON-RPC","href":"/public-networks/how-to/use-besu-api/access-logs","docId":"public-networks/how-to/use-besu-api/access-logs","unlisted":false}],"href":"/public-networks/how-to/use-besu-api/"},{"type":"link","label":"Use the Engine API","href":"/public-networks/how-to/use-engine-api","docId":"public-networks/how-to/use-engine-api","unlisted":false},{"type":"link","label":"Create and send transactions","href":"/public-networks/how-to/send-transactions","docId":"public-networks/how-to/send-transactions","unlisted":false},{"type":"category","label":"Find and connect to peers","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Configure static nodes","href":"/public-networks/how-to/connect/static-nodes","docId":"public-networks/how-to/connect/static-nodes","unlisted":false},{"type":"link","label":"Configure ports","href":"/public-networks/how-to/connect/configure-ports","docId":"public-networks/how-to/connect/configure-ports","unlisted":false},{"type":"link","label":"Manage peers","href":"/public-networks/how-to/connect/manage-peers","docId":"public-networks/how-to/connect/manage-peers","unlisted":false},{"type":"link","label":"Specify NAT method","href":"/public-networks/how-to/connect/specify-nat","docId":"public-networks/how-to/connect/specify-nat","unlisted":false}]},{"type":"category","label":"Monitor nodes","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Use metrics","href":"/public-networks/how-to/monitor/metrics","docId":"public-networks/how-to/monitor/metrics","unlisted":false},{"type":"link","label":"Understand metrics","href":"/public-networks/how-to/monitor/understand-metrics","docId":"public-networks/how-to/monitor/understand-metrics","unlisted":false},{"type":"link","label":"Configure logging","href":"/public-networks/how-to/monitor/logging","docId":"public-networks/how-to/monitor/logging","unlisted":false}],"href":"/public-networks/how-to/monitor/"},{"type":"category","label":"Configure high availability","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Sample load balancer configurations","href":"/public-networks/how-to/configure-ha/sample-configuration","docId":"public-networks/how-to/configure-ha/sample-configuration","unlisted":false}],"href":"/public-networks/how-to/configure-ha/"},{"type":"category","label":"Configure Java","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Install and update Java","href":"/public-networks/how-to/configure-java/install-update-java","docId":"public-networks/how-to/configure-java/install-update-java","unlisted":false},{"type":"link","label":"Pass JVM options","href":"/public-networks/how-to/configure-java/pass-jvm-options","docId":"public-networks/how-to/configure-java/pass-jvm-options","unlisted":false},{"type":"link","label":"Manage JVM memory","href":"/public-networks/how-to/configure-java/manage-memory","docId":"public-networks/how-to/configure-java/manage-memory","unlisted":false},{"type":"link","label":"Use Java Flight Recorder","href":"/public-networks/how-to/configure-java/java-flight-recorder","docId":"public-networks/how-to/configure-java/java-flight-recorder","unlisted":false}]},{"type":"link","label":"Reduce storage for Bonsai Tries","href":"/public-networks/how-to/bonsai-limit-trie-logs","docId":"public-networks/how-to/bonsai-limit-trie-logs","unlisted":false},{"type":"category","label":"Develop dapps","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Use Hardhat","href":"/public-networks/how-to/develop/hardhat","docId":"public-networks/how-to/develop/hardhat","unlisted":false},{"type":"link","label":"Use client libraries","href":"/public-networks/how-to/develop/client-libraries","docId":"public-networks/how-to/develop/client-libraries","unlisted":false}]},{"type":"category","label":"Use proof of work","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Configure mining","href":"/public-networks/how-to/use-pow/mining","docId":"public-networks/how-to/use-pow/mining","unlisted":false}]},{"type":"link","label":"Upgrade Besu","href":"/public-networks/how-to/upgrade-node","docId":"public-networks/how-to/upgrade-node","unlisted":false},{"type":"category","label":"Troubleshoot","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Use EVM tool","href":"/public-networks/how-to/troubleshoot/evm-tool","docId":"public-networks/how-to/troubleshoot/evm-tool","unlisted":false},{"type":"link","label":"Trace transactions","href":"/public-networks/how-to/troubleshoot/trace-transactions","docId":"public-networks/how-to/troubleshoot/trace-transactions","unlisted":false},{"type":"link","label":"Troubleshoot performance","href":"/public-networks/how-to/troubleshoot/performance","docId":"public-networks/how-to/troubleshoot/performance","unlisted":false},{"type":"link","label":"Troubleshoot peering","href":"/public-networks/how-to/troubleshoot/peering","docId":"public-networks/how-to/troubleshoot/peering","unlisted":false}]}],"href":"/public-networks/how-to"},{"type":"category","label":"Concepts","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Node clients","href":"/public-networks/concepts/node-clients","docId":"public-networks/concepts/node-clients","unlisted":false},{"type":"category","label":"Proof of stake consensus","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Attestations","href":"/public-networks/concepts/proof-of-stake/attestations","docId":"public-networks/concepts/proof-of-stake/attestations","unlisted":false}],"href":"/public-networks/concepts/proof-of-stake/"},{"type":"link","label":"Data storage formats","href":"/public-networks/concepts/data-storage-formats","docId":"public-networks/concepts/data-storage-formats","unlisted":false},{"type":"link","label":"Node synchronization","href":"/public-networks/concepts/node-sync","docId":"public-networks/concepts/node-sync","unlisted":false},{"type":"link","label":"Parallel transaction execution","href":"/public-networks/concepts/parallel-transaction-execution","docId":"public-networks/concepts/parallel-transaction-execution","unlisted":false},{"type":"category","label":"Transactions","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Transaction types","href":"/public-networks/concepts/transactions/types","docId":"public-networks/concepts/transactions/types","unlisted":false},{"type":"link","label":"Transaction pool","href":"/public-networks/concepts/transactions/pool","docId":"public-networks/concepts/transactions/pool","unlisted":false},{"type":"link","label":"Transaction validation","href":"/public-networks/concepts/transactions/validation","docId":"public-networks/concepts/transactions/validation","unlisted":false}]},{"type":"link","label":"Network ID and chain ID","href":"/public-networks/concepts/network-and-chain-id","docId":"public-networks/concepts/network-and-chain-id","unlisted":false},{"type":"link","label":"Events and logs","href":"/public-networks/concepts/events-and-logs","docId":"public-networks/concepts/events-and-logs","unlisted":false},{"type":"link","label":"Genesis file","href":"/public-networks/concepts/genesis-file","docId":"public-networks/concepts/genesis-file","unlisted":false},{"type":"link","label":"Node keys","href":"/public-networks/concepts/node-keys","docId":"public-networks/concepts/node-keys","unlisted":false}],"href":"/public-networks/concepts"},{"type":"category","label":"Tutorials","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Run Besu and Teku on Mainnet","href":"/public-networks/tutorials/besu-teku-mainnet","docId":"public-networks/tutorials/besu-teku-mainnet","unlisted":false},{"type":"link","label":"Run Besu and Teku on a testnet","href":"/public-networks/tutorials/besu-teku-testnet","docId":"public-networks/tutorials/besu-teku-testnet","unlisted":false},{"type":"link","label":"Deploy Besu using Kubernetes","href":"/public-networks/tutorials/kubernetes","docId":"public-networks/tutorials/kubernetes","unlisted":false},{"type":"link","label":"Deploy AWS Node Runners","href":"/public-networks/tutorials/aws-node-runners","docId":"public-networks/tutorials/aws-node-runners","unlisted":false}],"href":"/public-networks/tutorials"},{"type":"category","label":"Reference","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Besu command line","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Options","href":"/public-networks/reference/cli/options","docId":"public-networks/reference/cli/options","unlisted":false},{"type":"link","label":"Subcommands","href":"/public-networks/reference/cli/subcommands","docId":"public-networks/reference/cli/subcommands","unlisted":false}]},{"type":"category","label":"Besu API","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Objects","href":"/public-networks/reference/api/objects","docId":"public-networks/reference/api/objects","unlisted":false}],"href":"/public-networks/reference/api/"},{"type":"category","label":"Engine API","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Objects","href":"/public-networks/reference/engine-api/objects","docId":"public-networks/reference/engine-api/objects","unlisted":false}],"href":"/public-networks/reference/engine-api/"},{"type":"link","label":"Genesis file items","href":"/public-networks/reference/genesis-items","docId":"public-networks/reference/genesis-items","unlisted":false},{"type":"link","label":"EVM tool options","href":"/public-networks/reference/evm-tool","docId":"public-networks/reference/evm-tool","unlisted":false},{"type":"link","label":"Transaction trace types","href":"/public-networks/reference/trace-types","docId":"public-networks/reference/trace-types","unlisted":false},{"type":"link","label":"Projects using Besu","href":"/public-networks/reference/projects-using-besu","docId":"public-networks/reference/projects-using-besu","unlisted":false},{"type":"link","label":"Security disclosure policy","href":"/public-networks/reference/disclosure","docId":"public-networks/reference/disclosure","unlisted":false}],"href":"/public-networks/reference"},{"type":"link","label":"Chatbot","href":"/public-networks/chatbot","docId":"public-networks/chatbot","unlisted":false}],"privateDocSidebar":[{"type":"link","label":"Introduction","href":"/private-networks/","docId":"private-networks/index","unlisted":false},{"type":"category","label":"Get started","collapsible":true,"collapsed":false,"items":[{"type":"link","label":"System requirements","href":"/private-networks/get-started/system-requirements","docId":"private-networks/get-started/system-requirements","unlisted":false},{"type":"category","label":"Install Besu","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Run Besu from Docker image","href":"/private-networks/get-started/install/run-docker-image","docId":"private-networks/get-started/install/run-docker-image","unlisted":false},{"type":"link","label":"Install binary distribution","href":"/private-networks/get-started/install/binary-distribution","docId":"private-networks/get-started/install/binary-distribution","unlisted":false}],"href":"/private-networks/get-started/install/"},{"type":"link","label":"Start Besu","href":"/private-networks/get-started/start-node","docId":"private-networks/get-started/start-node","unlisted":false}],"href":"/private-networks/get-started"},{"type":"category","label":"How to","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Configure","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Consensus","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"QBFT","href":"/private-networks/how-to/configure/consensus/qbft","docId":"private-networks/how-to/configure/consensus/qbft","unlisted":false},{"type":"link","label":"IBFT 2.0","href":"/private-networks/how-to/configure/consensus/ibft","docId":"private-networks/how-to/configure/consensus/ibft","unlisted":false},{"type":"link","label":"Clique","href":"/private-networks/how-to/configure/consensus/clique","docId":"private-networks/how-to/configure/consensus/clique","unlisted":false},{"type":"link","label":"Add and remove validators without voting","href":"/private-networks/how-to/configure/consensus/add-validators-without-voting","docId":"private-networks/how-to/configure/consensus/add-validators-without-voting","unlisted":false}],"href":"/private-networks/how-to/configure/consensus/"},{"type":"link","label":"Free gas network","href":"/private-networks/how-to/configure/free-gas","docId":"private-networks/how-to/configure/free-gas","unlisted":false},{"type":"link","label":"Bootnodes","href":"/private-networks/how-to/configure/bootnodes","docId":"private-networks/how-to/configure/bootnodes","unlisted":false},{"type":"link","label":"Validators","href":"/private-networks/how-to/configure/validators","docId":"private-networks/how-to/configure/validators","unlisted":false},{"type":"link","label":"Pre-deploy a contract","href":"/private-networks/how-to/configure/contracts","docId":"private-networks/how-to/configure/contracts","unlisted":false},{"type":"category","label":"TLS","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Client and server TLS","href":"/private-networks/how-to/configure/tls/client-and-server","docId":"private-networks/how-to/configure/tls/client-and-server","unlisted":false}]},{"type":"link","label":"Alternative elliptic curves","href":"/private-networks/how-to/configure/curves","docId":"private-networks/how-to/configure/curves","unlisted":false}]},{"type":"category","label":"Create and send transactions","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Create and send private transactions","href":"/private-networks/how-to/send-transactions/private-transactions","docId":"private-networks/how-to/send-transactions/private-transactions","unlisted":false},{"type":"link","label":"Send concurrent private transactions","href":"/private-networks/how-to/send-transactions/concurrent-private-transactions","docId":"private-networks/how-to/send-transactions/concurrent-private-transactions","unlisted":false},{"type":"link","label":"Include revert reason","href":"/private-networks/how-to/send-transactions/revert-reason","docId":"private-networks/how-to/send-transactions/revert-reason","unlisted":false}],"href":"/private-networks/how-to/send-transactions/"},{"type":"category","label":"Monitor nodes","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Use Grafana Loki","href":"/private-networks/how-to/monitor/loki","docId":"private-networks/how-to/monitor/loki","unlisted":false},{"type":"link","label":"Use Elastic Stack","href":"/private-networks/how-to/monitor/elastic-stack","docId":"private-networks/how-to/monitor/elastic-stack","unlisted":false},{"type":"link","label":"Use Quorum Hibernate","href":"/private-networks/how-to/monitor/quorum-hibernate","docId":"private-networks/how-to/monitor/quorum-hibernate","unlisted":false},{"type":"link","label":"Use Splunk","href":"/private-networks/how-to/monitor/splunk","docId":"private-networks/how-to/monitor/splunk","unlisted":false},{"type":"link","label":"Use OpenTelemetry","href":"/private-networks/how-to/monitor/opentelemetry","docId":"private-networks/how-to/monitor/opentelemetry","unlisted":false},{"type":"link","label":"Use Chainlens Explorer","href":"/private-networks/how-to/monitor/chainlens","docId":"private-networks/how-to/monitor/chainlens","unlisted":false}],"href":"/private-networks/how-to/monitor/"},{"type":"category","label":"Use privacy","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Use EEA-compliant privacy","href":"/private-networks/how-to/use-privacy/eea-compliant","docId":"private-networks/how-to/use-privacy/eea-compliant","unlisted":false},{"type":"link","label":"Use Besu-extended privacy","href":"/private-networks/how-to/use-privacy/besu-extended","docId":"private-networks/how-to/use-privacy/besu-extended","unlisted":false},{"type":"link","label":"Run Tessera with Besu","href":"/private-networks/how-to/use-privacy/tessera","docId":"private-networks/how-to/use-privacy/tessera","unlisted":false},{"type":"link","label":"Create and manage privacy groups","href":"/private-networks/how-to/use-privacy/privacy-groups","docId":"private-networks/how-to/use-privacy/privacy-groups","unlisted":false},{"type":"link","label":"Use flexible privacy groups","href":"/private-networks/how-to/use-privacy/flexible","docId":"private-networks/how-to/use-privacy/flexible","unlisted":false},{"type":"link","label":"Access private and privacy marker transactions","href":"/private-networks/how-to/use-privacy/access-private-transactions","docId":"private-networks/how-to/use-privacy/access-private-transactions","unlisted":false},{"type":"link","label":"Sign privacy marker transactions","href":"/private-networks/how-to/use-privacy/sign-pmts","docId":"private-networks/how-to/use-privacy/sign-pmts","unlisted":false},{"type":"link","label":"Use the web3js-quorum library","href":"/private-networks/how-to/use-privacy/web3js-quorum","docId":"private-networks/how-to/use-privacy/web3js-quorum","unlisted":false},{"type":"link","label":"Privacy best practices","href":"/private-networks/how-to/use-privacy/performance-best-practices","docId":"private-networks/how-to/use-privacy/performance-best-practices","unlisted":false}]},{"type":"category","label":"Use permissioning","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Use local permissioning","href":"/private-networks/how-to/use-permissioning/local","docId":"private-networks/how-to/use-permissioning/local","unlisted":false},{"type":"link","label":"Use onchain permissioning","href":"/private-networks/how-to/use-permissioning/onchain","docId":"private-networks/how-to/use-permissioning/onchain","unlisted":false}]},{"type":"category","label":"Deploy for production","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Deploy to the cloud","href":"/private-networks/how-to/deploy/cloud","docId":"private-networks/how-to/deploy/cloud","unlisted":false},{"type":"link","label":"Use Ansible","href":"/private-networks/how-to/deploy/ansible","docId":"private-networks/how-to/deploy/ansible","unlisted":false},{"type":"link","label":"Use Kubernetes","href":"/private-networks/how-to/deploy/kubernetes","docId":"private-networks/how-to/deploy/kubernetes","unlisted":false},{"type":"link","label":"Use Ethstats network monitor","href":"/private-networks/how-to/deploy/ethstats","docId":"private-networks/how-to/deploy/ethstats","unlisted":false}]},{"type":"link","label":"Backup and restore","href":"/private-networks/how-to/backup","docId":"private-networks/how-to/backup","unlisted":false},{"type":"link","label":"Upgrade","href":"/private-networks/how-to/upgrade","docId":"private-networks/how-to/upgrade","unlisted":false}],"href":"/private-networks/how-to/"},{"type":"category","label":"Concepts","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Proof of authority consensus","href":"/private-networks/concepts/poa","docId":"private-networks/concepts/poa","unlisted":false},{"type":"category","label":"Privacy","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Private transactions","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Private transaction processing","href":"/private-networks/concepts/privacy/private-transactions/processing","docId":"private-networks/concepts/privacy/private-transactions/processing","unlisted":false}],"href":"/private-networks/concepts/privacy/private-transactions/"},{"type":"link","label":"Privacy groups","href":"/private-networks/concepts/privacy/privacy-groups","docId":"private-networks/concepts/privacy/privacy-groups","unlisted":false},{"type":"link","label":"Flexible privacy groups","href":"/private-networks/concepts/privacy/flexible-privacy","docId":"private-networks/concepts/privacy/flexible-privacy","unlisted":false},{"type":"link","label":"Multi-tenancy","href":"/private-networks/concepts/privacy/multi-tenancy","docId":"private-networks/concepts/privacy/multi-tenancy","unlisted":false},{"type":"link","label":"Privacy plugin","href":"/private-networks/concepts/privacy/plugin","docId":"private-networks/concepts/privacy/plugin","unlisted":false}],"href":"/private-networks/concepts/privacy/"},{"type":"category","label":"Permissioning","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Onchain permissioning","href":"/private-networks/concepts/permissioning/onchain","docId":"private-networks/concepts/permissioning/onchain","unlisted":false},{"type":"link","label":"Permissioning plugin","href":"/private-networks/concepts/permissioning/plugin","docId":"private-networks/concepts/permissioning/plugin","unlisted":false}],"href":"/private-networks/concepts/permissioning/"},{"type":"link","label":"Node synchronization","href":"/private-networks/concepts/node-sync-private","docId":"private-networks/concepts/node-sync-private","unlisted":false},{"type":"link","label":"Plugins","href":"/private-networks/concepts/plugins","docId":"private-networks/concepts/plugins","unlisted":false}],"href":"/private-networks/concepts/"},{"type":"category","label":"Tutorials","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Quorum Developer Quickstart","href":"/private-networks/tutorials/quickstart","docId":"private-networks/tutorials/quickstart","unlisted":false},{"type":"link","label":"Create a QBFT network","href":"/private-networks/tutorials/qbft","docId":"private-networks/tutorials/qbft","unlisted":false},{"type":"category","label":"Create an IBFT 2.0 network","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Add and removing IBFT 2.0 validators","href":"/private-networks/tutorials/ibft/validators","docId":"private-networks/tutorials/ibft/validators","unlisted":false}],"href":"/private-networks/tutorials/ibft/"},{"type":"link","label":"Create a Clique network","href":"/private-networks/tutorials/clique","docId":"private-networks/tutorials/clique","unlisted":false},{"type":"link","label":"Create an Ethash network","href":"/private-networks/tutorials/ethash","docId":"private-networks/tutorials/ethash","unlisted":false},{"type":"category","label":"Create a privacy enabled network","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Create a multi-tenant network","href":"/private-networks/tutorials/privacy/multi-tenancy","docId":"private-networks/tutorials/privacy/multi-tenancy","unlisted":false},{"type":"link","label":"Use the web3js-quorum multi-node example","href":"/private-networks/tutorials/privacy/web3js-quorum","docId":"private-networks/tutorials/privacy/web3js-quorum","unlisted":false},{"type":"link","label":"Create a privacy-enabled network using the Quorum Developer Quickstart (Deprecated)","href":"/private-networks/tutorials/privacy/quickstart","docId":"private-networks/tutorials/privacy/quickstart","unlisted":false}],"href":"/private-networks/tutorials/privacy/"},{"type":"link","label":"Create a permissioned network","href":"/private-networks/tutorials/permissioning/","docId":"private-networks/tutorials/permissioning/index","unlisted":false},{"type":"category","label":"Deploy a smart contract","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Transfer account funds","href":"/private-networks/tutorials/contracts/transfer-funds","docId":"private-networks/tutorials/contracts/transfer-funds","unlisted":false},{"type":"link","label":"Interact with a deployed contract","href":"/private-networks/tutorials/contracts/interact","docId":"private-networks/tutorials/contracts/interact","unlisted":false}],"href":"/private-networks/tutorials/contracts/"},{"type":"category","label":"Deploy using Kubernetes","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Local playground","href":"/private-networks/tutorials/kubernetes/playground","docId":"private-networks/tutorials/kubernetes/playground","unlisted":false},{"type":"link","label":"Create a cluster","href":"/private-networks/tutorials/kubernetes/cluster","docId":"private-networks/tutorials/kubernetes/cluster","unlisted":false},{"type":"link","label":"Deploy charts","href":"/private-networks/tutorials/kubernetes/charts","docId":"private-networks/tutorials/kubernetes/charts","unlisted":false},{"type":"link","label":"Use the Quorum Explorer","href":"/private-networks/tutorials/kubernetes/quorum-explorer","docId":"private-networks/tutorials/kubernetes/quorum-explorer","unlisted":false},{"type":"link","label":"Maintenance","href":"/private-networks/tutorials/kubernetes/maintenance","docId":"private-networks/tutorials/kubernetes/maintenance","unlisted":false},{"type":"link","label":"Production","href":"/private-networks/tutorials/kubernetes/production","docId":"private-networks/tutorials/kubernetes/production","unlisted":false},{"type":"link","label":"Configure Kubernetes mode in NAT manager","href":"/private-networks/tutorials/kubernetes/nat-manager","docId":"private-networks/tutorials/kubernetes/nat-manager","unlisted":false}],"href":"/private-networks/tutorials/kubernetes/"},{"type":"link","label":"Deploy using Microsoft Azure","href":"/private-networks/tutorials/azure","docId":"private-networks/tutorials/azure","unlisted":false}],"href":"/private-networks/tutorials"},{"type":"category","label":"Reference","collapsible":true,"collapsed":true,"items":[{"type":"category","label":"Besu CLI","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Private network options","href":"/private-networks/reference/cli/options","docId":"private-networks/reference/cli/options","unlisted":false},{"type":"link","label":"Private network subcommands","href":"/private-networks/reference/cli/subcommands","docId":"private-networks/reference/cli/subcommands","unlisted":false}]},{"type":"category","label":"Besu API","collapsible":true,"collapsed":true,"items":[{"type":"link","label":"Private network API objects","href":"/private-networks/reference/api/objects","docId":"private-networks/reference/api/objects","unlisted":false}],"href":"/private-networks/reference/api/"},{"type":"link","label":"Accounts for testing","href":"/private-networks/reference/accounts-for-testing","docId":"private-networks/reference/accounts-for-testing","unlisted":false},{"type":"link","label":"Plugin API interfaces","href":"/private-networks/reference/plugin-api-interfaces","docId":"private-networks/reference/plugin-api-interfaces","unlisted":false}],"href":"/private-networks/reference/"},{"type":"link","label":"Chatbot","href":"/private-networks/chatbot","docId":"private-networks/chatbot","unlisted":false}]},"docs":{"global/postman":{"id":"global/postman","title":"postman","description":"View the Besu JSON-RPC APIs documentation in the Postman format and obtain example requests in multiple coding languages."},"global/test_accounts":{"id":"global/test_accounts","title":"test_accounts","description":"The following accounts are test accounts and their private keys are publicly visible in this documentation and in publicly available source code."},"private-networks/chatbot":{"id":"private-networks/chatbot","title":"Chatbot","description":"Chatbot","sidebar":"privateDocSidebar"},"private-networks/concepts/index":{"id":"private-networks/concepts/index","title":"Concepts","description":"private networks concepts overview","sidebar":"privateDocSidebar"},"private-networks/concepts/node-sync-private":{"id":"private-networks/concepts/node-sync-private","title":"Node synchronization for private networks","description":"Learn about node synchronization for private networks.","sidebar":"privateDocSidebar"},"private-networks/concepts/permissioning/index":{"id":"private-networks/concepts/permissioning/index","title":"Permissioning","description":"Besu permissioning feature","sidebar":"privateDocSidebar"},"private-networks/concepts/permissioning/onchain":{"id":"private-networks/concepts/permissioning/onchain","title":"Onchain permissioning","description":"Onchain permissioning","sidebar":"privateDocSidebar"},"private-networks/concepts/permissioning/plugin":{"id":"private-networks/concepts/permissioning/plugin","title":"Permissioning plugin","description":"Plugin based permissioning","sidebar":"privateDocSidebar"},"private-networks/concepts/plugins":{"id":"private-networks/concepts/plugins","title":"Plugins","description":"Plugins overview","sidebar":"privateDocSidebar"},"private-networks/concepts/poa":{"id":"private-networks/concepts/poa","title":"Proof of authority consensus","description":"Besu proof of authority consensus protocols comparison","sidebar":"privateDocSidebar"},"private-networks/concepts/privacy/flexible-privacy":{"id":"private-networks/concepts/privacy/flexible-privacy","title":"Flexible privacy groups","description":"Flexible privacy groups","sidebar":"privateDocSidebar"},"private-networks/concepts/privacy/index":{"id":"private-networks/concepts/privacy/index","title":"Privacy","description":"Privacy","sidebar":"privateDocSidebar"},"private-networks/concepts/privacy/multi-tenancy":{"id":"private-networks/concepts/privacy/multi-tenancy","title":"Multi-tenancy","description":"Multi-tenancy","sidebar":"privateDocSidebar"},"private-networks/concepts/privacy/plugin":{"id":"private-networks/concepts/privacy/plugin","title":"Privacy plugin","description":"Privacy plugin","sidebar":"privateDocSidebar"},"private-networks/concepts/privacy/privacy-groups":{"id":"private-networks/concepts/privacy/privacy-groups","title":"Privacy groups","description":"Privacy groups","sidebar":"privateDocSidebar"},"private-networks/concepts/privacy/private-transactions/index":{"id":"private-networks/concepts/privacy/private-transactions/index","title":"Private transactions (Deprecated)","description":"Private transaction overview","sidebar":"privateDocSidebar"},"private-networks/concepts/privacy/private-transactions/processing":{"id":"private-networks/concepts/privacy/private-transactions/processing","title":"Private transaction processing","description":"Private transaction processing","sidebar":"privateDocSidebar"},"private-networks/get-started/install/binary-distribution":{"id":"private-networks/get-started/install/binary-distribution","title":"Install binary distribution","description":"Install or upgrade Besu from binary distribution","sidebar":"privateDocSidebar"},"private-networks/get-started/install/index":{"id":"private-networks/get-started/install/index","title":"Installation options","description":"Options for getting started with Besu","sidebar":"privateDocSidebar"},"private-networks/get-started/install/run-docker-image":{"id":"private-networks/get-started/install/run-docker-image","title":"Run Besu from Docker image","description":"Run Besu using the official docker image","sidebar":"privateDocSidebar"},"private-networks/get-started/start-node":{"id":"private-networks/get-started/start-node","title":"Start Besu","description":"Start Besu on a private Ethereum network.","sidebar":"privateDocSidebar"},"private-networks/get-started/system-requirements":{"id":"private-networks/get-started/system-requirements","title":"System requirements","description":"Ensure you meet the system requirements to sync and run Besu.","sidebar":"privateDocSidebar"},"private-networks/how-to/backup":{"id":"private-networks/how-to/backup","title":"Backup and restore","description":"Backing up and restoring Besu","sidebar":"privateDocSidebar"},"private-networks/how-to/configure/bootnodes":{"id":"private-networks/how-to/configure/bootnodes","title":"Bootnodes","description":"Configuring bootnodes","sidebar":"privateDocSidebar"},"private-networks/how-to/configure/consensus/add-validators-without-voting":{"id":"private-networks/how-to/configure/consensus/add-validators-without-voting","title":"Add and remove validators without voting","description":"How to add or remove validators without voting","sidebar":"privateDocSidebar"},"private-networks/how-to/configure/consensus/clique":{"id":"private-networks/how-to/configure/consensus/clique","title":"Clique","description":"Besu Clique Proof-of-Authority (PoA) consensus protocol implementation","sidebar":"privateDocSidebar"},"private-networks/how-to/configure/consensus/ibft":{"id":"private-networks/how-to/configure/consensus/ibft","title":"IBFT 2.0","description":"Besu IBFT 2.0 proof of authority (PoA) consensus protocol implementation","sidebar":"privateDocSidebar"},"private-networks/how-to/configure/consensus/index":{"id":"private-networks/how-to/configure/consensus/index","title":"Consensus protocols","description":"Besu consensus protocols","sidebar":"privateDocSidebar"},"private-networks/how-to/configure/consensus/qbft":{"id":"private-networks/how-to/configure/consensus/qbft","title":"QBFT","description":"Besu QBFT proof of authority (PoA) consensus protocol implementation","sidebar":"privateDocSidebar"},"private-networks/how-to/configure/contracts":{"id":"private-networks/how-to/configure/contracts","title":"Pre-deploy a contract","description":"Pre-deploying contracts in the genesis file","sidebar":"privateDocSidebar"},"private-networks/how-to/configure/curves":{"id":"private-networks/how-to/configure/curves","title":"Alternative elliptic curves","description":"Using alternative elliptic curves in Besu","sidebar":"privateDocSidebar"},"private-networks/how-to/configure/free-gas":{"id":"private-networks/how-to/configure/free-gas","title":"Free gas network","description":"Configuring free gas networks","sidebar":"privateDocSidebar"},"private-networks/how-to/configure/tls/client-and-server":{"id":"private-networks/how-to/configure/tls/client-and-server","title":"Client and server TLS","description":"Besu supports TLS for client and server communication. For example, you can configure TLS for communication between Web3Signer and Besu, and Besu and Tessera.","sidebar":"privateDocSidebar"},"private-networks/how-to/configure/validators":{"id":"private-networks/how-to/configure/validators","title":"Validators","description":"Configuring validators in production networks","sidebar":"privateDocSidebar"},"private-networks/how-to/deploy/ansible":{"id":"private-networks/how-to/deploy/ansible","title":"Use Ansible","description":"Deploying Besu with Ansible role on Galaxy","sidebar":"privateDocSidebar"},"private-networks/how-to/deploy/cloud":{"id":"private-networks/how-to/deploy/cloud","title":"Deploy to the cloud","description":"Deploying Besu to the cloud","sidebar":"privateDocSidebar"},"private-networks/how-to/deploy/ethstats":{"id":"private-networks/how-to/deploy/ethstats","title":"Use Ethstats network monitor","description":"Ethstats network monitor","sidebar":"privateDocSidebar"},"private-networks/how-to/deploy/kubernetes":{"id":"private-networks/how-to/deploy/kubernetes","title":"Use Kubernetes","description":"Deploying Besu with Kubernetes","sidebar":"privateDocSidebar"},"private-networks/how-to/index":{"id":"private-networks/how-to/index","title":"How to","description":"Private networks how to overview","sidebar":"privateDocSidebar"},"private-networks/how-to/monitor/chainlens":{"id":"private-networks/how-to/monitor/chainlens","title":"Use Chainlens Explorer","description":"Use Chainlens Explorer on a privacy-enabled Besu network","sidebar":"privateDocSidebar"},"private-networks/how-to/monitor/elastic-stack":{"id":"private-networks/how-to/monitor/elastic-stack","title":"Use Elastic Stack","description":"Using Elastic Stack (ELK) with Besu","sidebar":"privateDocSidebar"},"private-networks/how-to/monitor/index":{"id":"private-networks/how-to/monitor/index","title":"Monitoring","description":"Monitoring using metrics and logging","sidebar":"privateDocSidebar"},"private-networks/how-to/monitor/loki":{"id":"private-networks/how-to/monitor/loki","title":"Use Grafana Loki","description":"Using Grafana Loki log management platform with Besu","sidebar":"privateDocSidebar"},"private-networks/how-to/monitor/opentelemetry":{"id":"private-networks/how-to/monitor/opentelemetry","title":"Use OpenTelemetry","description":"Collect Besu information with the OpenTelemetry Collector","sidebar":"privateDocSidebar"},"private-networks/how-to/monitor/quorum-hibernate":{"id":"private-networks/how-to/monitor/quorum-hibernate","title":"Use Quorum Hibernate","description":"Use Quorum Hibernate with Besu","sidebar":"privateDocSidebar"},"private-networks/how-to/monitor/splunk":{"id":"private-networks/how-to/monitor/splunk","title":"Use Splunk","description":"Send Besu logs to Splunk","sidebar":"privateDocSidebar"},"private-networks/how-to/send-transactions/concurrent-private-transactions":{"id":"private-networks/how-to/send-transactions/concurrent-private-transactions","title":"Send concurrent private transactions","description":"Creating and sending concurrent private transactions with Besu","sidebar":"privateDocSidebar"},"private-networks/how-to/send-transactions/index":{"id":"private-networks/how-to/send-transactions/index","title":"Create and send transactions","description":"private networks send transactions overview","sidebar":"privateDocSidebar"},"private-networks/how-to/send-transactions/private-transactions":{"id":"private-networks/how-to/send-transactions/private-transactions","title":"Create and send private transactions","description":"Creating and sending private transactions with Besu","sidebar":"privateDocSidebar"},"private-networks/how-to/send-transactions/revert-reason":{"id":"private-networks/how-to/send-transactions/revert-reason","title":"Include revert reason","description":"Including revert reason in transactions with Besu","sidebar":"privateDocSidebar"},"private-networks/how-to/upgrade":{"id":"private-networks/how-to/upgrade","title":"Upgrade","description":"Upgrading protocol versions","sidebar":"privateDocSidebar"},"private-networks/how-to/use-permissioning/local":{"id":"private-networks/how-to/use-permissioning/local","title":"Use local permissioning","description":"Besu local permissioning","sidebar":"privateDocSidebar"},"private-networks/how-to/use-permissioning/onchain":{"id":"private-networks/how-to/use-permissioning/onchain","title":"Use onchain permissioning","description":"Use onchain permissioning allowlists","sidebar":"privateDocSidebar"},"private-networks/how-to/use-privacy/access-private-transactions":{"id":"private-networks/how-to/use-privacy/access-private-transactions","title":"Access private and privacy marker transactions","description":"Methods for accessing and managing private transactions and privacy groups in Besu","sidebar":"privateDocSidebar"},"private-networks/how-to/use-privacy/besu-extended":{"id":"private-networks/how-to/use-privacy/besu-extended","title":"Use Besu-extended privacy","description":"Besu-extended privacy","sidebar":"privateDocSidebar"},"private-networks/how-to/use-privacy/eea-compliant":{"id":"private-networks/how-to/use-privacy/eea-compliant","title":"Use EEA-compliant privacy","description":"Besu JSON-RPC methods to use for EEA-compliant privacy","sidebar":"privateDocSidebar"},"private-networks/how-to/use-privacy/flexible":{"id":"private-networks/how-to/use-privacy/flexible","title":"Use flexible privacy groups","description":"Use flexible privacy groups","sidebar":"privateDocSidebar"},"private-networks/how-to/use-privacy/performance-best-practices":{"id":"private-networks/how-to/use-privacy/performance-best-practices","title":"Privacy best practices","description":"Privacy best practices","sidebar":"privateDocSidebar"},"private-networks/how-to/use-privacy/privacy-groups":{"id":"private-networks/how-to/use-privacy/privacy-groups","title":"Create and manage privacy groups","description":"Create and manage privacy groups with Besu","sidebar":"privateDocSidebar"},"private-networks/how-to/use-privacy/sign-pmts":{"id":"private-networks/how-to/use-privacy/sign-pmts","title":"Sign privacy marker transactions","description":"How to sign a privacy marker transaction with Besu","sidebar":"privateDocSidebar"},"private-networks/how-to/use-privacy/tessera":{"id":"private-networks/how-to/use-privacy/tessera","title":"Run Tessera with Besu","description":"Running ConsenSys Quorum Tessera with Besu","sidebar":"privateDocSidebar"},"private-networks/how-to/use-privacy/web3js-quorum":{"id":"private-networks/how-to/use-privacy/web3js-quorum","title":"Use the web3js-quorum library","description":"web3js-quorum client library","sidebar":"privateDocSidebar"},"private-networks/index":{"id":"private-networks/index","title":"Private networks","description":"Private networks overview","sidebar":"privateDocSidebar"},"private-networks/reference/accounts-for-testing":{"id":"private-networks/reference/accounts-for-testing","title":"Accounts for testing","description":"Ethereum accounts used for Besu testing only on private networks","sidebar":"privateDocSidebar"},"private-networks/reference/api/index":{"id":"private-networks/reference/api/index","title":"Private network API methods","description":"Besu private network JSON-RPC API methods reference","sidebar":"privateDocSidebar"},"private-networks/reference/api/objects":{"id":"private-networks/reference/api/objects","title":"Private network API objects","description":"Besu private network API objects reference","sidebar":"privateDocSidebar"},"private-networks/reference/cli/options":{"id":"private-networks/reference/cli/options","title":"Private network options","description":"Besu private networks CLI reference","sidebar":"privateDocSidebar"},"private-networks/reference/cli/subcommands":{"id":"private-networks/reference/cli/subcommands","title":"Private network subcommands","description":"Besu command line interface subcommands","sidebar":"privateDocSidebar"},"private-networks/reference/index":{"id":"private-networks/reference/index","title":"Reference","description":"private networks reference overview","sidebar":"privateDocSidebar"},"private-networks/reference/plugin-api-interfaces":{"id":"private-networks/reference/plugin-api-interfaces","title":"Plugin API interfaces","description":"Plugin interfaces","sidebar":"privateDocSidebar"},"private-networks/tutorials/azure":{"id":"private-networks/tutorials/azure","title":"Deploy using Microsoft Azure","description":"Deploy a private IBFT 2.0 network using Microsoft Azure.","sidebar":"privateDocSidebar"},"private-networks/tutorials/clique":{"id":"private-networks/tutorials/clique","title":"Create a Clique network","description":"Create a private network using the Clique consensus protocol.","sidebar":"privateDocSidebar"},"private-networks/tutorials/contracts/index":{"id":"private-networks/tutorials/contracts/index","title":"Deploy a smart contract","description":"deploying smart contracts","sidebar":"privateDocSidebar"},"private-networks/tutorials/contracts/interact":{"id":"private-networks/tutorials/contracts/interact","title":"Interact with a deployed contract","description":"calling smart contracts functions","sidebar":"privateDocSidebar"},"private-networks/tutorials/contracts/transfer-funds":{"id":"private-networks/tutorials/contracts/transfer-funds","title":"Transfer account funds","description":"funds transfer transactions","sidebar":"privateDocSidebar"},"private-networks/tutorials/ethash":{"id":"private-networks/tutorials/ethash","title":"Create an Ethash network","description":"Create a private network using the Ethash consensus protocol.","sidebar":"privateDocSidebar"},"private-networks/tutorials/ibft/index":{"id":"private-networks/tutorials/ibft/index","title":"Create a private network using IBFT 2.0","description":"Besu private network using the IBFT 2.0 (Proof of Authority) consensus protocol","sidebar":"privateDocSidebar"},"private-networks/tutorials/ibft/validators":{"id":"private-networks/tutorials/ibft/validators","title":"Add and removing IBFT 2.0 validators","description":"Adding and removing IBFT 2.0 validators","sidebar":"privateDocSidebar"},"private-networks/tutorials/kubernetes/charts":{"id":"private-networks/tutorials/kubernetes/charts","title":"Deploy charts","description":"Deploying Besu Helm Charts for a Kubernetes cluster","sidebar":"privateDocSidebar"},"private-networks/tutorials/kubernetes/cluster":{"id":"private-networks/tutorials/kubernetes/cluster","title":"Create a cluster","description":"Create a cluster for deployment","sidebar":"privateDocSidebar"},"private-networks/tutorials/kubernetes/index":{"id":"private-networks/tutorials/kubernetes/index","title":"Deploy a Besu private network with Kubernetes","description":"Deploying Besu with Kubernetes","sidebar":"privateDocSidebar"},"private-networks/tutorials/kubernetes/maintenance":{"id":"private-networks/tutorials/kubernetes/maintenance","title":"Maintenance","description":"Maintenance for Besu on a Kubernetes cluster","sidebar":"privateDocSidebar"},"private-networks/tutorials/kubernetes/nat-manager":{"id":"private-networks/tutorials/kubernetes/nat-manager","title":"Configure Kubernetes mode in NAT manager","description":"Tutorial to configure Kubernetes mode for Besu Nat Manager","sidebar":"privateDocSidebar"},"private-networks/tutorials/kubernetes/playground":{"id":"private-networks/tutorials/kubernetes/playground","title":"Local playground","description":"Deploying a Besu private network locally with Kubernetes","sidebar":"privateDocSidebar"},"private-networks/tutorials/kubernetes/production":{"id":"private-networks/tutorials/kubernetes/production","title":"Production","description":"Deploying Besu Helm Charts for production on a Kubernetes cluster","sidebar":"privateDocSidebar"},"private-networks/tutorials/kubernetes/quorum-explorer":{"id":"private-networks/tutorials/kubernetes/quorum-explorer","title":"Use the Quorum Explorer","description":"Using the Quorum Explorer on a Kubernetes cluster","sidebar":"privateDocSidebar"},"private-networks/tutorials/permissioning/index":{"id":"private-networks/tutorials/permissioning/index","title":"Create a permissioned network","description":"Besu create a permissioned network","sidebar":"privateDocSidebar"},"private-networks/tutorials/privacy/index":{"id":"private-networks/tutorials/privacy/index","title":"Create a privacy enabled network using the Quickstart","description":"Configure Besu privacy","sidebar":"privateDocSidebar"},"private-networks/tutorials/privacy/multi-tenancy":{"id":"private-networks/tutorials/privacy/multi-tenancy","title":"Create a multi-tenant network","description":"Configure multi-tenancy","sidebar":"privateDocSidebar"},"private-networks/tutorials/privacy/quickstart":{"id":"private-networks/tutorials/privacy/quickstart","title":"Create a privacy-enabled network using the Quorum Developer Quickstart (Deprecated)","description":"Besu privacy-enabled private network tutorial","sidebar":"privateDocSidebar"},"private-networks/tutorials/privacy/web3js-quorum":{"id":"private-networks/tutorials/privacy/web3js-quorum","title":"Use the web3js-quorum multi-node example","description":"web3js-quorum client library multi-node example","sidebar":"privateDocSidebar"},"private-networks/tutorials/qbft":{"id":"private-networks/tutorials/qbft","title":"Create a QBFT network","description":"Create a private network using the QBFT consensus protocol.","sidebar":"privateDocSidebar"},"private-networks/tutorials/quickstart":{"id":"private-networks/tutorials/quickstart","title":"Quorum Developer Quickstart","description":"Rapidly generate a local blockchain network using the Quickstart.","sidebar":"privateDocSidebar"},"public-networks/chatbot":{"id":"public-networks/chatbot","title":"Chatbot","description":"Chatbot","sidebar":"publicDocSidebar"},"public-networks/concepts/data-storage-formats":{"id":"public-networks/concepts/data-storage-formats","title":"Data storage formats","description":"Learn about storing data using Forest of Tries and Bonsai Tries.","sidebar":"publicDocSidebar"},"public-networks/concepts/events-and-logs":{"id":"public-networks/concepts/events-and-logs","title":"Events and logs","description":"Learn about events and logs in Besu.","sidebar":"publicDocSidebar"},"public-networks/concepts/genesis-file":{"id":"public-networks/concepts/genesis-file","title":"Genesis file","description":"Learn about configuring a network using the genesis file.","sidebar":"publicDocSidebar"},"public-networks/concepts/network-and-chain-id":{"id":"public-networks/concepts/network-and-chain-id","title":"Network ID and chain ID","description":"Learn about network ID and chain ID in Besu.","sidebar":"publicDocSidebar"},"public-networks/concepts/node-clients":{"id":"public-networks/concepts/node-clients","title":"Node clients","description":"Learn about execution and consensus clients.","sidebar":"publicDocSidebar"},"public-networks/concepts/node-keys":{"id":"public-networks/concepts/node-keys","title":"Node keys","description":"Learn about node public and private keys, and the node address.","sidebar":"publicDocSidebar"},"public-networks/concepts/node-sync":{"id":"public-networks/concepts/node-sync","title":"Node synchronization","description":"Learn about node synchronization for public networks.","sidebar":"publicDocSidebar"},"public-networks/concepts/parallel-transaction-execution":{"id":"public-networks/concepts/parallel-transaction-execution","title":"Parallel transaction execution","description":"Learn about parallel transaction execution.","sidebar":"publicDocSidebar"},"public-networks/concepts/proof-of-stake/attestations":{"id":"public-networks/concepts/proof-of-stake/attestations","title":"Attestations","description":"Proof of stake attestations","sidebar":"publicDocSidebar"},"public-networks/concepts/proof-of-stake/index":{"id":"public-networks/concepts/proof-of-stake/index","title":"Proof of stake consensus","description":"Ethereum proof of stake consensus","sidebar":"publicDocSidebar"},"public-networks/concepts/transactions/pool":{"id":"public-networks/concepts/transactions/pool","title":"Transaction pool","description":"Transaction pool overview","sidebar":"publicDocSidebar"},"public-networks/concepts/transactions/types":{"id":"public-networks/concepts/transactions/types","title":"Transaction types","description":"Description of the different transaction types","sidebar":"publicDocSidebar"},"public-networks/concepts/transactions/validation":{"id":"public-networks/concepts/transactions/validation","title":"Transaction validation","description":"What transaction validation and when","sidebar":"publicDocSidebar"},"public-networks/get-started/connect/index":{"id":"public-networks/get-started/connect/index","title":"Connect to a network overview","description":"This section provides information on connecting Besu to a public Ethereum network.","sidebar":"publicDocSidebar"},"public-networks/get-started/connect/mainnet":{"id":"public-networks/get-started/connect/mainnet","title":"Connect to Mainnet","description":"How to connect to Mainnet","sidebar":"publicDocSidebar"},"public-networks/get-started/connect/testnet":{"id":"public-networks/get-started/connect/testnet","title":"Connect to a testnet","description":"Run Besu as an execution client with any consensus client on the Holesky, Sepolia, and Ephemery testnets.","sidebar":"publicDocSidebar"},"public-networks/get-started/install/binary-distribution":{"id":"public-networks/get-started/install/binary-distribution","title":"Install binary distribution","description":"Install or upgrade Besu from binary distribution","sidebar":"publicDocSidebar"},"public-networks/get-started/install/index":{"id":"public-networks/get-started/install/index","title":"Installation options","description":"Options for getting started with Besu","sidebar":"publicDocSidebar"},"public-networks/get-started/install/run-docker-image":{"id":"public-networks/get-started/install/run-docker-image","title":"Run Besu from Docker image","description":"Run Besu using the official docker image","sidebar":"publicDocSidebar"},"public-networks/get-started/migrate-to-besu":{"id":"public-networks/get-started/migrate-to-besu","title":"Migrate to Besu","description":"Migrate to Besu from a different Ethereum execution client.","sidebar":"publicDocSidebar"},"public-networks/get-started/start-node":{"id":"public-networks/get-started/start-node","title":"Start Besu","description":"Start Besu on a public Ethereum network.","sidebar":"publicDocSidebar"},"public-networks/get-started/system-requirements":{"id":"public-networks/get-started/system-requirements","title":"System requirements","description":"Ensure you meet the system requirements to sync and run Besu.","sidebar":"publicDocSidebar"},"public-networks/how-to/bonsai-limit-trie-logs":{"id":"public-networks/how-to/bonsai-limit-trie-logs","title":"Reduce storage for Bonsai Tries","description":"Reduce the size of your database when using Bonsai Tries","sidebar":"publicDocSidebar"},"public-networks/how-to/configure-besu/index":{"id":"public-networks/how-to/configure-besu/index","title":"Configure Besu","description":"Specify options in the Besu configuration file.","sidebar":"publicDocSidebar"},"public-networks/how-to/configure-besu/profile":{"id":"public-networks/how-to/configure-besu/profile","title":"Use a profile","description":"You can load a profile to extend Besu\'s default configuration, using the --profile option.","sidebar":"publicDocSidebar"},"public-networks/how-to/configure-ha/index":{"id":"public-networks/how-to/configure-ha/index","title":"High availability of JSON-RPC and RPC Pub/Sub APIs","description":"Besu high availability","sidebar":"publicDocSidebar"},"public-networks/how-to/configure-ha/sample-configuration":{"id":"public-networks/how-to/configure-ha/sample-configuration","title":"Sample load balancer configurations","description":"Sample load balancers","sidebar":"publicDocSidebar"},"public-networks/how-to/configure-java/install-update-java":{"id":"public-networks/how-to/configure-java/install-update-java","title":"Install and update Java","description":"Install or update Java for use with Besu","sidebar":"publicDocSidebar"},"public-networks/how-to/configure-java/java-flight-recorder":{"id":"public-networks/how-to/configure-java/java-flight-recorder","title":"Use Java Flight Recorder","description":"Using Java Flight Recorder with Besu","sidebar":"publicDocSidebar"},"public-networks/how-to/configure-java/manage-memory":{"id":"public-networks/how-to/configure-java/manage-memory","title":"Manage JVM memory","description":"Besu memory management","sidebar":"publicDocSidebar"},"public-networks/how-to/configure-java/pass-jvm-options":{"id":"public-networks/how-to/configure-java/pass-jvm-options","title":"Pass JVM options","description":"Passing Java virtual machine JVM options to Besu at runtime","sidebar":"publicDocSidebar"},"public-networks/how-to/connect/configure-ports":{"id":"public-networks/how-to/connect/configure-ports","title":"Configure ports","description":"To enable communication you must expose Besu ports appropriately","sidebar":"publicDocSidebar"},"public-networks/how-to/connect/manage-peers":{"id":"public-networks/how-to/connect/manage-peers","title":"Manage peers","description":"Managing Besu peers","sidebar":"publicDocSidebar"},"public-networks/how-to/connect/specify-nat":{"id":"public-networks/how-to/connect/specify-nat","title":"Specify NAT method","description":"Configuring NAT with Besu","sidebar":"publicDocSidebar"},"public-networks/how-to/connect/static-nodes":{"id":"public-networks/how-to/connect/static-nodes","title":"Configure static nodes","description":"Configuring static nodes","sidebar":"publicDocSidebar"},"public-networks/how-to/develop/client-libraries":{"id":"public-networks/how-to/develop/client-libraries","title":"Use client libraries","description":"Besu client libraries","sidebar":"publicDocSidebar"},"public-networks/how-to/develop/hardhat":{"id":"public-networks/how-to/develop/hardhat","title":"Use Hardhat","description":"Using Besu with Hardhat","sidebar":"publicDocSidebar"},"public-networks/how-to/monitor/index":{"id":"public-networks/how-to/monitor/index","title":"Monitor Besu","description":"Monitoring using metrics and logging","sidebar":"publicDocSidebar"},"public-networks/how-to/monitor/logging":{"id":"public-networks/how-to/monitor/logging","title":"Configure logging","description":"Besu log level setting and log formatting","sidebar":"publicDocSidebar"},"public-networks/how-to/monitor/metrics":{"id":"public-networks/how-to/monitor/metrics","title":"Use metrics","description":"Monitoring and metrics","sidebar":"publicDocSidebar"},"public-networks/how-to/monitor/understand-metrics":{"id":"public-networks/how-to/monitor/understand-metrics","title":"Understand metrics","description":"Understand Besu performance metrics","sidebar":"publicDocSidebar"},"public-networks/how-to/send-transactions":{"id":"public-networks/how-to/send-transactions","title":"Create and send transactions","description":"Send transactions using eth_call or eth_sendRawTransaction.","sidebar":"publicDocSidebar"},"public-networks/how-to/troubleshoot/evm-tool":{"id":"public-networks/how-to/troubleshoot/evm-tool","title":"Use EVM tool","description":"Besu EVM tool","sidebar":"publicDocSidebar"},"public-networks/how-to/troubleshoot/peering":{"id":"public-networks/how-to/troubleshoot/peering","title":"Troubleshoot peering","description":"How to troubleshoot peering","sidebar":"publicDocSidebar"},"public-networks/how-to/troubleshoot/performance":{"id":"public-networks/how-to/troubleshoot/performance","title":"Troubleshoot performance","description":"Troubleshoot poor performance and resource constraints.","sidebar":"publicDocSidebar"},"public-networks/how-to/troubleshoot/trace-transactions":{"id":"public-networks/how-to/troubleshoot/trace-transactions","title":"Trace transactions","description":"How to trace transactions","sidebar":"publicDocSidebar"},"public-networks/how-to/upgrade-node":{"id":"public-networks/how-to/upgrade-node","title":"Upgrade Besu","description":"Upgrade your Besu node to a new version.","sidebar":"publicDocSidebar"},"public-networks/how-to/use-besu-api/access-logs":{"id":"public-networks/how-to/use-besu-api/access-logs","title":"Access logs using JSON-RPC","description":"Accessing logs using the Besu API","sidebar":"publicDocSidebar"},"public-networks/how-to/use-besu-api/authenticate":{"id":"public-networks/how-to/use-besu-api/authenticate","title":"Authenticate over JSON-RPC requests","description":"Besu authentication and authorization for JSON-RPC","sidebar":"publicDocSidebar"},"public-networks/how-to/use-besu-api/graphql":{"id":"public-networks/how-to/use-besu-api/graphql","title":"Use GraphQL over HTTP","description":"How to access the Besu API using GraphQL","sidebar":"publicDocSidebar"},"public-networks/how-to/use-besu-api/index":{"id":"public-networks/how-to/use-besu-api/index","title":"Access the Besu API","description":"Besu API","sidebar":"publicDocSidebar"},"public-networks/how-to/use-besu-api/json-rpc":{"id":"public-networks/how-to/use-besu-api/json-rpc","title":"Use JSON-RPC over HTTP, WS, and IPC","description":"How to access the Besu API using JSON-RPC","sidebar":"publicDocSidebar"},"public-networks/how-to/use-besu-api/rpc-pubsub":{"id":"public-networks/how-to/use-besu-api/rpc-pubsub","title":"Use RPC Pub/Sub over WS","description":"Using RPC Pub/Sub with Besu WebSockets","sidebar":"publicDocSidebar"},"public-networks/how-to/use-engine-api":{"id":"public-networks/how-to/use-engine-api","title":"Use the Engine API","description":"Use the Engine API to communicate with a consensus client.","sidebar":"publicDocSidebar"},"public-networks/how-to/use-pow/mining":{"id":"public-networks/how-to/use-pow/mining","title":"Configure mining","description":"Using Besu for PoW CPU mining","sidebar":"publicDocSidebar"},"public-networks/index":{"id":"public-networks/index","title":"Public networks","description":"Public networks overview","sidebar":"publicDocSidebar"},"public-networks/reference/api/index":{"id":"public-networks/reference/api/index","title":"Besu API","description":"Besu JSON-RPC API methods reference","sidebar":"publicDocSidebar"},"public-networks/reference/api/objects":{"id":"public-networks/reference/api/objects","title":"Objects","description":"Besu API objects reference","sidebar":"publicDocSidebar"},"public-networks/reference/cli/options":{"id":"public-networks/reference/cli/options","title":"Options","description":"Besu command line interface reference","sidebar":"publicDocSidebar"},"public-networks/reference/cli/subcommands":{"id":"public-networks/reference/cli/subcommands","title":"Subcommands","description":"Besu command line interface subcommands","sidebar":"publicDocSidebar"},"public-networks/reference/disclosure":{"id":"public-networks/reference/disclosure","title":"Security disclosure policy","description":"Besu responsible disclosure statement","sidebar":"publicDocSidebar"},"public-networks/reference/engine-api/index":{"id":"public-networks/reference/engine-api/index","title":"Engine API","description":"Engine API methods reference","sidebar":"publicDocSidebar"},"public-networks/reference/engine-api/objects":{"id":"public-networks/reference/engine-api/objects","title":"Objects","description":"Engine API objects reference","sidebar":"publicDocSidebar"},"public-networks/reference/evm-tool":{"id":"public-networks/reference/evm-tool","title":"EVM tool options","description":"Besu EVM tool options reference","sidebar":"publicDocSidebar"},"public-networks/reference/genesis-items":{"id":"public-networks/reference/genesis-items","title":"Genesis file items","description":"Genesis file configuration items reference","sidebar":"publicDocSidebar"},"public-networks/reference/projects-using-besu":{"id":"public-networks/reference/projects-using-besu","title":"Projects using Besu","description":"List of projects using Besu","sidebar":"publicDocSidebar"},"public-networks/reference/trace-types":{"id":"public-networks/reference/trace-types","title":"Transaction trace types","description":"Transaction trace types reference","sidebar":"publicDocSidebar"},"public-networks/tutorials/aws-node-runners":{"id":"public-networks/tutorials/aws-node-runners","title":"Deploy AWS Node Runners","description":"Configure Ethereum nodes using AWS Blockchain Node Runners.","sidebar":"publicDocSidebar"},"public-networks/tutorials/besu-teku-mainnet":{"id":"public-networks/tutorials/besu-teku-mainnet","title":"Run Besu and Teku on Mainnet","description":"Run Besu and Teku on Ethereum Mainnet.","sidebar":"publicDocSidebar"},"public-networks/tutorials/besu-teku-testnet":{"id":"public-networks/tutorials/besu-teku-testnet","title":"Run Besu and Teku on a testnet","description":"Run Besu and Teku on Holesky, Ephemery, or Sepolia testnet.","sidebar":"publicDocSidebar"},"public-networks/tutorials/kubernetes":{"id":"public-networks/tutorials/kubernetes","title":"Deploy Besu using Kubernetes","description":"Deploy a Besu node using Kubernetes.","sidebar":"publicDocSidebar"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/248beabf.1ac00178.js b/assets/js/248beabf.1ac00178.js new file mode 100644 index 00000000000..c07ff02f46d --- /dev/null +++ b/assets/js/248beabf.1ac00178.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5305],{49444:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>h,frontMatter:()=>c,metadata:()=>o,toc:()=>r});var s=t(74848),a=t(28453);const c={title:"Events and logs",sidebar_position:8,description:"Learn about events and logs in Besu.",tags:["public networks","private networks"]},i="Events and logs",o={id:"public-networks/concepts/events-and-logs",title:"Events and logs",description:"Learn about events and logs in Besu.",source:"@site/docs/public-networks/concepts/events-and-logs.md",sourceDirName:"public-networks/concepts",slug:"/public-networks/concepts/events-and-logs",permalink:"/public-networks/concepts/events-and-logs",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/concepts/events-and-logs.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:8,frontMatter:{title:"Events and logs",sidebar_position:8,description:"Learn about events and logs in Besu.",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Network ID and chain ID",permalink:"/public-networks/concepts/network-and-chain-id"},next:{title:"Genesis file",permalink:"/public-networks/concepts/genesis-file"}},d={},r=[{value:"Topics",id:"topics",level:2},{value:"Event parameters",id:"event-parameters",level:2},{value:"Event signature hash",id:"event-signature-hash",level:2},{value:"Topic filters",id:"topic-filters",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"events-and-logs",children:"Events and logs"})}),"\n",(0,s.jsx)(n.p,{children:"Transaction mining causes smart contracts to emit events and write logs to the blockchain."}),"\n",(0,s.jsx)(n.p,{children:"The smart contract address is the link to the logs and the blockchain includes the logs, but contracts cannot access logs. Log storage is cheaper than contract storage (that is, it costs less gas) so storing and accessing the required data in logs reduces the cost. For example, use logs to display all transfers made using a specific contract, but not the current state of the contract."}),"\n",(0,s.jsxs)(n.p,{children:["A Dapp front end can either access logs using the ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/access-logs",children:"JSON-RPC API filter methods"})," or subscribe to logs using the ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/rpc-pubsub#logs",children:"RPC Pub/Sub API"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Use ",(0,s.jsx)(n.a,{href:"/public-networks/reference/api/#admin_generatelogbloomcache",children:(0,s.jsx)(n.code,{children:"admin_generateLogBloomCache"})})," to improve log retrieval performance."]}),"\n",(0,s.jsx)(n.h2,{id:"topics",children:"Topics"}),"\n",(0,s.jsxs)(n.p,{children:["Log entries contain up to four topics. The first topic is the ",(0,s.jsx)(n.a,{href:"#event-signature-hash",children:"event signature hash"})," and up to three topics are the indexed ",(0,s.jsx)(n.a,{href:"#event-parameters",children:"event parameters"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",metastring:'title="A log entry for an event with one indexed parameter"',children:'{\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x84",\n "blockHash": "0x5fc573d76ec48ec80cbc43f299ebc306a8168112e3a4485c23e84e9a40f5d336",\n "transactionHash": "0xcb52f02342c2498df82c49ac26b2e91e182155c8b2a2add5b6dc4c249511f85a",\n "transactionIndex": "0x0",\n "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",\n "data": "0x",\n "topics": [\n "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3",\n "0x0000000000000000000000000000000000000000000000000000000000000001"\n ]\n}\n'})}),"\n",(0,s.jsx)(n.h2,{id:"event-parameters",children:"Event parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Up to three event parameters can have the ",(0,s.jsx)(n.code,{children:"indexed"})," attribute. Logs store these indexed parameters as ",(0,s.jsx)(n.code,{children:"topics"}),". Indexed parameters are searchable and filterable."]}),"\n",(0,s.jsxs)(n.p,{children:["Topics are 32 bytes. If an indexed argument is an array (including ",(0,s.jsx)(n.code,{children:"string"})," and ",(0,s.jsx)(n.code,{children:"byte"})," datatypes), the log stores the keccak-256 hash of the parameter as a topic."]}),"\n",(0,s.jsxs)(n.p,{children:["Log ",(0,s.jsx)(n.code,{children:"data"})," includes non-indexed parameters but is difficult to search or filter."]}),"\n",(0,s.jsx)(n.p,{children:"A Solidity contract storing one indexed and one non-indexed parameter and has an event emitting the value of each parameter:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-solidity",children:"pragma solidity ^0.5.1;\ncontract Storage {\n uint256 public valueIndexed;\n uint256 public valueNotIndexed;\n\n event Event1(uint256 indexed valueIndexed, uint256 valueNotIndexed);\n\n function setValue(uint256 _valueIndexed, uint256 _valueNotIndexed) public {\n valueIndexed = _valueIndexed;\n valueNotIndexed = _valueNotIndexed;\n emit Event1(_valueIndexed, _valueNotIndexed);\n }\n}\n"})}),"\n",(0,s.jsxs)(n.p,{children:["A log entry created by invoking the contract in the previous example with ",(0,s.jsx)(n.code,{children:"valueIndexed"})," set to 5 and ",(0,s.jsx)(n.code,{children:"valueNotIndexed"})," set to 7:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x4d6",\n "blockHash": "0x7d0ac7c12ac9f622d346d444c7e0fa4dda8d4ed90de80d6a28814613a4884a67",\n "transactionHash": "0xe994022ada94371ace00c4e1e20663a01437846ced02f18b3f3afec827002781",\n "transactionIndex": "0x0",\n "address": "0x43d1f9096674b5722d359b6402381816d5b22f28",\n "data": "0x0000000000000000000000000000000000000000000000000000000000000007",\n "topics": [\n "0xd3610b1c54575b7f4f0dc03d210b8ac55624ae007679b7a928a4f25a709331a8",\n "0x0000000000000000000000000000000000000000000000000000000000000005"\n ]\n}\n'})}),"\n",(0,s.jsx)(n.h2,{id:"event-signature-hash",children:"Event signature hash"}),"\n",(0,s.jsxs)(n.p,{children:["The first topic in a log entry is always the event signature hash. The event signature hash is a keccak-256 hash of the event name and input argument types, with argument names ignored. For example, the event ",(0,s.jsx)(n.code,{children:"Hello(uint256 worldId)"})," has the signature hash ",(0,s.jsx)(n.code,{children:"keccak('Hello(uint256)')"}),". The signature identifies to which event log topics belong."]}),"\n",(0,s.jsx)(n.p,{children:"A Solidity contract with two different events:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-solidity",children:"pragma solidity ^0.5.1;\ncontract Storage {\n uint256 public valueA;\n uint256 public valueB;\n\n event Event1(uint256 indexed valueA);\n event Event2(uint256 indexed valueB);\n\n function setValue(uint256 _valueA) public {\n valueA = _valueA;\n emit Event1(_valueA);\n }\n\n function setValueAgain(uint256 _valueB) public {\n valueB = _valueB;\n emit Event2(_valueB);\n }\n}\n"})}),"\n",(0,s.jsxs)(n.p,{children:["The event signature hash for event 1 is ",(0,s.jsx)(n.code,{children:"keccak('Event1(uint256)')"})," and the event signature hash for event 2 is ",(0,s.jsx)(n.code,{children:"keccak('Event2(uint256)')"}),". The hashes are:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"})," for event 1"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"06df6fb2d6d0b17a870decb858cc46bf7b69142ab7b9318f7603ed3fd4ad240e"})," for event 2."]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["You can use a library keccak (sha3) hash function, such as provided in ",(0,s.jsx)(n.a,{href:"https://web3js.readthedocs.io/en/v1.2.11/web3-utils.html?highlight=sha3#sha3",children:"Web3.js"}),", or an online tool, such as ",(0,s.jsx)(n.a,{href:"https://emn178.github.io/online-tools/keccak_256.html",children:"https://emn178.github.io/online-tools/keccak_256.html"}),", to generate event signature hashes."]})}),"\n",(0,s.jsx)(n.p,{children:"Log entries from invoking the Solidity contract in the previous example:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'[\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x84",\n "blockHash": "0x5fc573d76ec48ec80cbc43f299ebc306a8168112e3a4485c23e84e9a40f5d336",\n "transactionHash": "0xcb52f02342c2498df82c49ac26b2e91e182155c8b2a2add5b6dc4c249511f85a",\n "transactionIndex": "0x0",\n "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",\n "data": "0x",\n "topics": [\n "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3",\n "0x0000000000000000000000000000000000000000000000000000000000000001"\n ]\n },\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x87",\n "blockHash": "0x6643a1e58ad857f727552e4572b837a85b3ca64c4799d085170c707e4dad5255",\n "transactionHash": "0xa95295fcea7df3b9e47ab95d2dadeb868145719ed9cc0e6c757c8a174e1fcb11",\n "transactionIndex": "0x0",\n "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",\n "data": "0x",\n "topics": [\n "0x06df6fb2d6d0b17a870decb858cc46bf7b69142ab7b9318f7603ed3fd4ad240e",\n "0x0000000000000000000000000000000000000000000000000000000000000002"\n ]\n }\n]\n'})}),"\n",(0,s.jsx)(n.h2,{id:"topic-filters",children:"Topic filters"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/public-networks/reference/api/objects#filter-options-object",children:"Filter options objects"})," have a ",(0,s.jsx)(n.code,{children:"topics"})," key to filter logs by topics."]}),"\n",(0,s.jsxs)(n.p,{children:["Topics are order-dependent. A transaction with a log containing topics ",(0,s.jsx)(n.code,{children:"[A, B]"})," matches with the following topic filters:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"[]"})," - Match any topic"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"[A]"})," - Match A in first position"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"[[null], [B]]"})," - Match any topic in first position AND B in second position"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"[[A],[B]]"})," - Match A in first position AND B in second position"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"[[A, C], [B, D]]"})," - Match (A OR C) in first position AND (B OR D) in second position."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["The following filter option object returns log entries for the ",(0,s.jsx)(n.a,{href:"#event-parameters",children:"Event Parameters example contract"})," with ",(0,s.jsx)(n.code,{children:"valueIndexed"})," set to 5 or 9:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "fromBlock": "earliest",\n "toBlock": "latest",\n "address": "0x43d1f9096674b5722d359b6402381816d5b22f28",\n "topics": [\n ["0xd3610b1c54575b7f4f0dc03d210b8ac55624ae007679b7a928a4f25a709331a8"],\n [\n "0x0000000000000000000000000000000000000000000000000000000000000005",\n "0x0000000000000000000000000000000000000000000000000000000000000009"\n ]\n ]\n}\n'})})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(96540);const a={},c=s.createContext(a);function i(e){const n=s.useContext(c);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/25537021.d20da3f5.js b/assets/js/25537021.d20da3f5.js new file mode 100644 index 00000000000..cb6dcbd873e --- /dev/null +++ b/assets/js/25537021.d20da3f5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2618],{89040:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>u,frontMatter:()=>t,metadata:()=>a,toc:()=>d});var s=i(74848),r=i(28453);const t={title:"Install binary distribution",sidebar_position:2,description:"Install or upgrade Besu from binary distribution",tags:["public networks"]},l="Install binary distribution",a={id:"public-networks/get-started/install/binary-distribution",title:"Install binary distribution",description:"Install or upgrade Besu from binary distribution",source:"@site/docs/public-networks/get-started/install/binary-distribution.md",sourceDirName:"public-networks/get-started/install",slug:"/public-networks/get-started/install/binary-distribution",permalink:"/public-networks/get-started/install/binary-distribution",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/get-started/install/binary-distribution.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Install binary distribution",sidebar_position:2,description:"Install or upgrade Besu from binary distribution",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Run Besu from Docker image",permalink:"/public-networks/get-started/install/run-docker-image"},next:{title:"Start Besu",permalink:"/public-networks/get-started/start-node"}},o={},d=[{value:"MacOS with Homebrew",id:"macos-with-homebrew",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Install (or upgrade) using Homebrew",id:"install-or-upgrade-using-homebrew",level:3},{value:"Linux / Unix",id:"linux--unix",level:2},{value:"Prerequisites",id:"prerequisites-1",level:3},{value:"Install from packaged binaries",id:"install-from-packaged-binaries",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"install-binary-distribution",children:"Install binary distribution"})}),"\n",(0,s.jsx)(n.h2,{id:"macos-with-homebrew",children:"MacOS with Homebrew"}),"\n",(0,s.jsx)(n.h3,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://brew.sh/",children:"Homebrew"})}),"\n",(0,s.jsx)(n.li,{children:"Java JDK"}),"\n"]}),"\n",(0,s.jsxs)(n.admonition,{type:"caution",children:[(0,s.jsx)(n.p,{children:"Besu supports:"}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"MacOS High Sierra 10.13 or later versions."}),"\n",(0,s.jsxs)(n.li,{children:["Java 21+. You can install Java using ",(0,s.jsx)(n.code,{children:"brew install openjdk@21"}),". Alternatively, you can manually install the ",(0,s.jsx)(n.a,{href:"https://www.oracle.com/java/technologies/downloads",children:"Java JDK"}),"."]}),"\n"]})]}),"\n",(0,s.jsx)(n.h3,{id:"install-or-upgrade-using-homebrew",children:"Install (or upgrade) using Homebrew"}),"\n",(0,s.jsx)(n.p,{children:"To install Besu using Homebrew:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"brew tap hyperledger/besu\nbrew install hyperledger/besu/besu\n"})}),"\n",(0,s.jsx)(n.p,{children:"To upgrade an existing Besu installation using Homebrew:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"brew upgrade hyperledger/besu/besu\n"})}),"\n",(0,s.jsx)(n.admonition,{title:"notes",type:"note",children:(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["If you upgraded your MacOS version between installing and upgrading Besu, when running ",(0,s.jsx)(n.code,{children:"brew upgrade hyperledger/besu/besu"})," you\nmight be prompted to reinstall command line tools with ",(0,s.jsx)(n.code,{children:"xcode-select --install"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["When upgrading Besu, you might be prompted to fix the remote branch names in Homebrew by using the command ",(0,s.jsx)(n.code,{children:"brew tap --repair"}),"."]}),"\n"]}),"\n"]})}),"\n",(0,s.jsx)(n.p,{children:"To display the Besu version and confirm installation:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"besu --version\n"})}),"\n",(0,s.jsx)(n.p,{children:"To display Besu command line help:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"besu --help\n"})}),"\n",(0,s.jsx)(n.h2,{id:"linux--unix",children:"Linux / Unix"}),"\n",(0,s.jsx)(n.h3,{id:"prerequisites-1",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://www.oracle.com/java/technologies/downloads/",children:"Java JDK 21+"})}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{title:"Linux open file limit",type:"note",children:(0,s.jsxs)(n.p,{children:["If synchronizing to Mainnet on Linux or other chains with large data requirements, increase the maximum number of open files allowed using ",(0,s.jsx)(n.code,{children:"ulimit"}),". If the open files limit is not high enough, a ",(0,s.jsx)(n.code,{children:"Too many open files"})," RocksDB exception occurs."]})}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["We recommend installing ",(0,s.jsx)(n.a,{href:"https://jemalloc.net/",children:"jemalloc"})," to reduce memory usage. If using Ubuntu, you can install it with the command: ",(0,s.jsx)(n.code,{children:"apt install libjemalloc-dev"}),"."]})}),"\n",(0,s.jsx)(n.h3,{id:"install-from-packaged-binaries",children:"Install from packaged binaries"}),"\n",(0,s.jsxs)(n.p,{children:["Download the Besu ",(0,s.jsx)(n.a,{href:"https://github.com/hyperledger/besu/releases",children:"packaged binaries"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Unpack the downloaded files and change into the ",(0,s.jsx)(n.code,{children:"besu-"})," directory."]}),"\n",(0,s.jsx)(n.p,{children:"Display Besu command line help to confirm installation:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"bin/besu --help\n"})})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>l,x:()=>a});var s=i(96540);const r={},t=s.createContext(r);function l(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2712d2e6.6465ff23.js b/assets/js/2712d2e6.6465ff23.js new file mode 100644 index 00000000000..176fe4ccb78 --- /dev/null +++ b/assets/js/2712d2e6.6465ff23.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6948],{53800:(t,e,r)=>{r.r(e),r.d(e,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>d});var n=r(74848),o=r(28453);const s={title:"Chatbot",sidebar_position:10,sidebar_label:"Chatbot",description:"Chatbot",tags:["private networks"]},a="Chatbot",i={id:"private-networks/chatbot",title:"Chatbot",description:"Chatbot",source:"@site/docs/private-networks/chatbot.mdx",sourceDirName:"private-networks",slug:"/private-networks/chatbot",permalink:"/private-networks/chatbot",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/chatbot.mdx",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:10,frontMatter:{title:"Chatbot",sidebar_position:10,sidebar_label:"Chatbot",description:"Chatbot",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Plugin API interfaces",permalink:"/private-networks/reference/plugin-api-interfaces"}},c={},d=[];function p(t){const e={h1:"h1",header:"header",...(0,o.R)(),...t.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.header,{children:(0,n.jsx)(e.h1,{id:"chatbot",children:"Chatbot"})}),"\n",(0,n.jsx)("iframe",{src:"https://docsbot-besu.prd.ai.consensys.io/?embed=true",height:"800",width:"100%"})]})}function h(t={}){const{wrapper:e}={...(0,o.R)(),...t.components};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(p,{...t})}):p(t)}},28453:(t,e,r)=>{r.d(e,{R:()=>a,x:()=>i});var n=r(96540);const o={},s=n.createContext(o);function a(t){const e=n.useContext(s);return n.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function i(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(o):t.components||o:a(t.components),n.createElement(s.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/27b89368.147d1099.js b/assets/js/27b89368.147d1099.js new file mode 100644 index 00000000000..9c98909c15b --- /dev/null +++ b/assets/js/27b89368.147d1099.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[9022],{70298:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>o,contentTitle:()=>a,default:()=>u,frontMatter:()=>t,metadata:()=>l,toc:()=>d});var s=i(74848),r=i(28453);const t={title:"Install binary distribution",description:"Install or upgrade Besu from binary distribution",sidebar_position:3,tags:["private networks"]},a="Install binary distribution",l={id:"private-networks/get-started/install/binary-distribution",title:"Install binary distribution",description:"Install or upgrade Besu from binary distribution",source:"@site/docs/private-networks/get-started/install/binary-distribution.md",sourceDirName:"private-networks/get-started/install",slug:"/private-networks/get-started/install/binary-distribution",permalink:"/private-networks/get-started/install/binary-distribution",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/get-started/install/binary-distribution.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Install binary distribution",description:"Install or upgrade Besu from binary distribution",sidebar_position:3,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Run Besu from Docker image",permalink:"/private-networks/get-started/install/run-docker-image"},next:{title:"Start Besu",permalink:"/private-networks/get-started/start-node"}},o={},d=[{value:"MacOS with Homebrew",id:"macos-with-homebrew",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Install (or upgrade) using Homebrew",id:"install-or-upgrade-using-homebrew",level:3},{value:"Linux / Unix",id:"linux--unix",level:2},{value:"Prerequisites",id:"prerequisites-1",level:3},{value:"Install from packaged binaries",id:"install-from-packaged-binaries",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"install-binary-distribution",children:"Install binary distribution"})}),"\n",(0,s.jsx)(n.h2,{id:"macos-with-homebrew",children:"MacOS with Homebrew"}),"\n",(0,s.jsx)(n.h3,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://brew.sh/",children:"Homebrew"})}),"\n",(0,s.jsx)(n.li,{children:"Java JDK"}),"\n"]}),"\n",(0,s.jsxs)(n.admonition,{type:"caution",children:[(0,s.jsx)(n.p,{children:"Besu supports:"}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"MacOS High Sierra 10.13 or later versions."}),"\n",(0,s.jsxs)(n.li,{children:["Java 21+. You can install Java using ",(0,s.jsx)(n.code,{children:"brew install openjdk@21"}),". Alternatively, you can manually install the ",(0,s.jsx)(n.a,{href:"https://www.oracle.com/java/technologies/downloads",children:"Java JDK"}),"."]}),"\n"]})]}),"\n",(0,s.jsx)(n.h3,{id:"install-or-upgrade-using-homebrew",children:"Install (or upgrade) using Homebrew"}),"\n",(0,s.jsx)(n.p,{children:"To install Besu using Homebrew:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"brew tap hyperledger/besu\nbrew install hyperledger/besu/besu\n"})}),"\n",(0,s.jsx)(n.p,{children:"To upgrade an existing Besu installation using Homebrew:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"brew upgrade hyperledger/besu/besu\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["If you've upgraded your MacOS version between installing and upgrading Besu, when running ",(0,s.jsx)(n.code,{children:"brew upgrade hyperledger/besu/besu"})," you may be prompted to reinstall command line tools with ",(0,s.jsx)(n.code,{children:"xcode-select --install"}),"."]})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["When upgrading Besu, you might be prompted to fix the remote branch names in Homebrew by using the command ",(0,s.jsx)(n.code,{children:"brew tap --repair"}),"."]})}),"\n",(0,s.jsx)(n.p,{children:"To display the Besu version and confirm installation:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"besu --version\n"})}),"\n",(0,s.jsx)(n.p,{children:"To display Besu command line help:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"besu --help\n"})}),"\n",(0,s.jsx)(n.h2,{id:"linux--unix",children:"Linux / Unix"}),"\n",(0,s.jsx)(n.h3,{id:"prerequisites-1",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://www.oracle.com/java/technologies/downloads/",children:"Java JDK 17+"})}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{title:"Linux open file limit",type:"note",children:(0,s.jsxs)(n.p,{children:["If synchronizing to Mainnet on Linux or other chains with large data requirements, increase the maximum number of open files allowed using ",(0,s.jsx)(n.code,{children:"ulimit"}),". If the open files limit is not high enough, a ",(0,s.jsx)(n.code,{children:"Too many open files"})," RocksDB exception occurs."]})}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["We recommend installing ",(0,s.jsx)(n.a,{href:"https://jemalloc.net/",children:"jemalloc"})," to reduce memory usage. If using Ubuntu, you can install it with the command: ",(0,s.jsx)(n.code,{children:"apt install libjemalloc-dev"}),"."]})}),"\n",(0,s.jsx)(n.h3,{id:"install-from-packaged-binaries",children:"Install from packaged binaries"}),"\n",(0,s.jsxs)(n.p,{children:["Download the Besu ",(0,s.jsx)(n.a,{href:"https://github.com/hyperledger/besu/releases",children:"packaged binaries"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Unpack the downloaded files and change into the ",(0,s.jsx)(n.code,{children:"besu-"})," directory."]}),"\n",(0,s.jsx)(n.p,{children:"Display Besu command line help to confirm installation:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"bin/besu --help\n"})})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>a,x:()=>l});var s=i(96540);const r={},t=s.createContext(r);function a(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/28249022.14c69bf3.js b/assets/js/28249022.14c69bf3.js new file mode 100644 index 00000000000..29bc6a6ca9d --- /dev/null +++ b/assets/js/28249022.14c69bf3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[76],{75125:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>c,toc:()=>p});var s=t(74848),r=t(28453);const o={title:"Concepts",description:"private networks concepts overview",sidebar_position:3,tags:["private networks"]},i="Concepts",c={id:"private-networks/concepts/index",title:"Concepts",description:"private networks concepts overview",source:"@site/docs/private-networks/concepts/index.md",sourceDirName:"private-networks/concepts",slug:"/private-networks/concepts/",permalink:"/private-networks/concepts/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/concepts/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Concepts",description:"private networks concepts overview",sidebar_position:3,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Upgrade",permalink:"/private-networks/how-to/upgrade"},next:{title:"Proof of authority consensus",permalink:"/private-networks/concepts/poa"}},a={},p=[];function l(e){const n={a:"a",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"concepts",children:"Concepts"})}),"\n",(0,s.jsx)(n.p,{children:"This section provides background information and context about private network features."}),"\n",(0,s.jsxs)(n.p,{children:["The following features are shared with ",(0,s.jsx)(n.a,{href:"/public-networks/",children:"public networks"})," and the content can be found in the public networks section:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Transactions:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/concepts/transactions/types",children:"Transaction types"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool",children:"Transaction pool"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/concepts/transactions/validation",children:"Transaction validation"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/concepts/network-and-chain-id",children:"Network ID and chain ID"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/concepts/events-and-logs",children:"Events and logs"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/concepts/genesis-file",children:"Genesis file"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-keys",children:"Node keys"})}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var s=t(96540);const r={},o=s.createContext(r);function i(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/297e0bb4.72f7d166.js b/assets/js/297e0bb4.72f7d166.js new file mode 100644 index 00000000000..4e560a387f5 --- /dev/null +++ b/assets/js/297e0bb4.72f7d166.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2764,5327,4852],{14311:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var s=t(74848),r=t(28453);const o={},a=void 0,i={id:"global/postman",title:"postman",description:"View the Besu JSON-RPC APIs documentation in the Postman format and obtain example requests in multiple coding languages.",source:"@site/docs/global/postman.md",sourceDirName:"global",slug:"/global/postman",permalink:"/global/postman",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/global/postman.md",tags:[],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{}},c={},d=[{value:"Run in Postman",id:"run-in-postman",level:4},{value:"Download collection",id:"download-collection",level:4}];function l(e){const n={a:"a",admonition:"admonition",h4:"h4",img:"img",p:"p",...(0,r.R)(),...e.components};return(0,s.jsxs)(n.admonition,{title:"Besu JSON-RPC APIs documentation in Postman format",type:"info",children:[(0,s.jsxs)(n.p,{children:["View the ",(0,s.jsx)(n.a,{href:"https://www.postman.com/hyperledger/workspace/hyperledger-besu/collection/11610746-f334929f-c8c3-43ed-bb73-69a6f0d728d8",children:"Besu JSON-RPC APIs documentation"})," in the Postman format and obtain example requests in multiple coding languages."]}),(0,s.jsx)(n.h4,{id:"run-in-postman",children:"Run in Postman"}),(0,s.jsx)(n.p,{children:"Click the following button to fork the collection and run requests directly on your local network."}),(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://god.gw.postman.com/run-collection/11610746-f334929f-c8c3-43ed-bb73-69a6f0d728d8?action=collection%2Ffork&collection-url=entityId%3D11610746-f334929f-c8c3-43ed-bb73-69a6f0d728d8%26entityType%3Dcollection%26workspaceId%3Dc4b60b6f-9f15-42d0-8327-7ebabca6f0fd#?env%5BBesu%20node%20on%20local%20host%5D=W3sia2V5IjoicnBjLWh0dHAtaG9zdCIsInZhbHVlIjoibG9jYWxob3N0IiwiZW5hYmxlZCI6ZmFsc2V9LHsia2V5IjoicnBjLWh0dHAtcG9ydCIsInZhbHVlIjoiODU0NSIsImVuYWJsZWQiOmZhbHNlfV0=",children:(0,s.jsx)(n.img,{src:"https://run.pstmn.io/button.svg",alt:"Run in Postman"})}),"."]}),(0,s.jsx)(n.h4,{id:"download-collection",children:"Download collection"}),(0,s.jsxs)(n.p,{children:["Alternatively you can ",(0,s.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(34705).A+"",children:"download the JSON collection file"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},93120:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>i,toc:()=>d});var s=t(74848),r=t(28453);const o={},a=void 0,i={id:"global/test_accounts",title:"test_accounts",description:"The following accounts are test accounts and their private keys are publicly visible in this documentation and in publicly available source code.",source:"@site/docs/global/test_accounts.md",sourceDirName:"global",slug:"/global/test_accounts",permalink:"/global/test_accounts",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/global/test_accounts.md",tags:[],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{}},c={},d=[];function l(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.admonition,{type:"danger",children:[(0,s.jsx)(n.mdxAdmonitionTitle,{children:(0,s.jsx)(n.strong,{children:"Do not use the test accounts on Ethereum Mainnet or any production network."})}),(0,s.jsx)(n.p,{children:"The following accounts are test accounts and their private keys are publicly visible in this documentation and in publicly available source code."}),(0,s.jsx)(n.p,{children:"They are not secure and everyone can use them."}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Using test accounts on Ethereum Mainnet and production networks can lead to loss of funds and identity fraud."})}),(0,s.jsx)(n.p,{children:"In this documentation, we only provide test accounts for ease of testing and learning purposes; never use them for other purposes."}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Always secure your Ethereum Mainnet and any production account properly."})}),(0,s.jsxs)(n.p,{children:["See for instance ",(0,s.jsx)(n.a,{href:"https://support.mycrypto.com/staying-safe/protecting-yourself-and-your-funds",children:'MyCrypto "Protecting Yourself and Your Funds" guide'}),"."]})]}),"\n",(0,s.jsxs)(n.admonition,{type:"info",children:[(0,s.jsxs)(n.mdxAdmonitionTitle,{children:['"Test Account 1 (address ',(0,s.jsx)(n.code,{children:"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"}),')"']}),(0,s.jsx)(n.p,{children:"Private key to copy :"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"0x8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63\n"})}),(0,s.jsxs)(n.p,{children:["Initial balance : 200 Eth ",(0,s.jsx)(n.em,{children:"(200000000000000000000 Wei)"})]})]}),"\n",(0,s.jsxs)(n.admonition,{type:"info",children:[(0,s.jsxs)(n.mdxAdmonitionTitle,{children:['"Test Account 2 (address ',(0,s.jsx)(n.code,{children:"0x627306090abaB3A6e1400e9345bC60c78a8BEf57"}),')"']}),(0,s.jsx)(n.p,{children:"Private key to copy :"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3\n"})}),(0,s.jsxs)(n.p,{children:["Initial balance : 90000 Eth ",(0,s.jsx)(n.em,{children:"(90000000000000000000000 Wei)"})]})]}),"\n",(0,s.jsxs)(n.admonition,{type:"info",children:[(0,s.jsxs)(n.mdxAdmonitionTitle,{children:['"Test Account 3 (address ',(0,s.jsx)(n.code,{children:"0xf17f52151EbEF6C7334FAD080c5704D77216b732"}),')"']}),(0,s.jsx)(n.p,{children:"Private key to copy :"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"0xae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f\n"})}),(0,s.jsxs)(n.p,{children:["Initial balance : 90000 Eth ",(0,s.jsx)(n.em,{children:"(90000000000000000000000 Wei)"})]})]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},13742:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>l,default:()=>x,frontMatter:()=>d,metadata:()=>h,toc:()=>p});var s=t(74848),r=t(28453),o=t(93120),a=t(14311),i=t(11470),c=t(19365);const d={title:"Quorum Developer Quickstart",sidebar_position:1,description:"Rapidly generate a local blockchain network using the Quickstart.",tags:["private networks"]},l="Developer Quickstart",h={id:"private-networks/tutorials/quickstart",title:"Quorum Developer Quickstart",description:"Rapidly generate a local blockchain network using the Quickstart.",source:"@site/docs/private-networks/tutorials/quickstart.md",sourceDirName:"private-networks/tutorials",slug:"/private-networks/tutorials/quickstart",permalink:"/private-networks/tutorials/quickstart",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/quickstart.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Quorum Developer Quickstart",sidebar_position:1,description:"Rapidly generate a local blockchain network using the Quickstart.",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Tutorials",permalink:"/private-networks/tutorials"},next:{title:"Create a QBFT network",permalink:"/private-networks/tutorials/qbft"}},u={},p=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Generate the tutorial blockchain configuration files",id:"generate-the-tutorial-blockchain-configuration-files",level:2},{value:"Start the network",id:"start-the-network",level:2},{value:"Use a block explorer",id:"use-a-block-explorer",level:2},{value:"Monitor nodes with Prometheus and Grafana",id:"monitor-nodes-with-prometheus-and-grafana",level:2},{value:"Run JSON-RPC requests",id:"run-json-rpc-requests",level:2},{value:"Run with cURL",id:"run-with-curl",level:3},{value:"Run with Postman",id:"run-with-postman",level:3},...a.toc,{value:"Request the node version",id:"request-the-node-version",level:3},{value:"Count the peers",id:"count-the-peers",level:3},{value:"Request the most recent block number",id:"request-the-most-recent-block-number",level:3},{value:"Public transactions",id:"public-transactions",level:2},{value:"Create a transaction using MetaMask",id:"create-a-transaction-using-metamask",level:2},...o.toc,{value:"Smart contract and dapp usage",id:"smart-contract-and-dapp-usage",level:2},{value:"Deploy the contract",id:"deploy-the-contract",level:3},{value:"Run the dapp",id:"run-the-dapp",level:3},{value:"Deploy your own dapp",id:"deploy-your-own-dapp",level:3},{value:"Stop and restart the private network without removing containers",id:"stop-and-restart-the-private-network-without-removing-containers",level:2},{value:"Stop the private network and remove containers",id:"stop-the-private-network-and-remove-containers",level:2},{value:"Add a new node to the network",id:"add-a-new-node-to-the-network",level:2},{value:"1. Create the node key files",id:"1-create-the-node-key-files",level:3},{value:"2. Create new node directory",id:"2-create-new-node-directory",level:3},{value:"3. Update docker-compose",id:"3-update-docker-compose",level:3},{value:"4. Update Prometheus configuration",id:"4-update-prometheus-configuration",level:3},{value:"5. Update files with the enode address",id:"5-update-files-with-the-enode-address",level:3},{value:"6. Start the network",id:"6-start-the-network",level:3}];function m(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"developer-quickstart",children:"Developer Quickstart"})}),"\n",(0,s.jsxs)(n.p,{children:["The Quorum Developer Quickstart uses the Besu Docker image to run a private ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft",children:"IBFT 2.0"})," network of Besu nodes managed by Docker Compose."]}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsx)(n.p,{children:"This tutorial runs a private network suitable for education or demonstration purposes and is not intended for running production networks."})}),"\n",(0,s.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["One of the following operating systems:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Linux on x86_64 architecture"}),"\n",(0,s.jsx)(n.li,{children:"macOS on an Intel processor (M1 processor not supported yet)"}),"\n",(0,s.jsxs)(n.li,{children:["Windows 64-bit edition, with:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Windows Subsystem for Linux 2"}),"\n",(0,s.jsx)(n.li,{children:"Docker desktop configured to use the WSL2-based engine"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://docs.docker.com/compose/install/",children:"Docker and Docker Compose"})}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://nodejs.org/en/download/",children:"Node.js"})," version 12 or higher"]}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://hardhat.org/hardhat-runner/docs/getting-started#overview",children:"Hardhat"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://curl.haxx.se/download.html",children:"cURL command line"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://metamask.io/",children:"MetaMask"})}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["Allow Docker up to 4G of memory or 6G if running the privacy examples. Refer to the ",(0,s.jsx)(n.strong,{children:"Resources"})," section in ",(0,s.jsx)(n.a,{href:"https://docs.docker.com/docker-for-mac/",children:"Docker for Mac"})," and ",(0,s.jsx)(n.a,{href:"https://docs.docker.com/docker-for-windows/",children:"Docker Desktop"})," for details."]})}),"\n",(0,s.jsx)(n.h2,{id:"generate-the-tutorial-blockchain-configuration-files",children:"Generate the tutorial blockchain configuration files"}),"\n",(0,s.jsxs)(n.p,{children:["To create the tutorial ",(0,s.jsx)(n.code,{children:"docker-compose"})," files and artifacts, run:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npx quorum-dev-quickstart\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Follow the prompts displayed to run Besu and ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/monitor/elastic-stack",children:"logging with ELK"}),". Enter ",(0,s.jsx)(n.code,{children:"n"})," for Codefi Orchestrate and ",(0,s.jsx)(n.a,{href:"/private-networks/concepts/privacy/",children:"private transactions"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["If you enter ",(0,s.jsx)(n.code,{children:"y"})," for private transactions, you get three Besu nodes with corresponding Tessera nodes for privacy. You can follow the ",(0,s.jsx)(n.a,{href:"/private-networks/tutorials/privacy/",children:"privacy walk-through"}),", which details how to send private transactions and interact with deployed private contracts."]})}),"\n",(0,s.jsx)(n.h2,{id:"start-the-network",children:"Start the network"}),"\n",(0,s.jsxs)(n.p,{children:["To start the network, go to the installation directory (",(0,s.jsx)(n.code,{children:"quorum-test-network"})," if you used the default value) and run:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"./run.sh\n"})}),"\n",(0,s.jsx)(n.p,{children:"The script builds the Docker images, and runs the Docker containers."}),"\n",(0,s.jsx)(n.p,{children:"Four Besu IBFT 2.0 validator nodes and a non-validator node are created to simulate a base network."}),"\n",(0,s.jsx)(n.p,{children:"When execution is successfully finished, the process lists the available services:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-log",metastring:'title="Services list"',children:"*************************************\nQuorum Dev Quickstart\n*************************************\n----------------------------------\nList endpoints and services\n----------------------------------\nJSON-RPC HTTP service endpoint : http://localhost:8545\nJSON-RPC WebSocket service endpoint : ws://localhost:8546\nWeb block explorer address : http://localhost:25000/\nPrometheus address : http://localhost:9090/graph\nGrafana address : http://localhost:3000/d/XE4V0WGZz/besu-overview?orgId=1&refresh=10s&from=now-30m&to=now&var-system=All\nKibana logs address : http://localhost:5601/app/kibana#/discover\nCollated logs using Grafana Loki : http://localhost:3000/d/Ak6eXLsPxFemKYKEXfcH/quorum-logs-loki?orgId=1&var-app=besu&var-search=\n\nFor more information on the endpoints and services, refer to README.md in the installation directory.\n****************************************************************\n"})}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Use the ",(0,s.jsx)(n.strong,{children:"JSON-RPC HTTP service endpoint"})," to access the RPC node service from your dapp or from cryptocurrency wallets such as MetaMask."]}),"\n",(0,s.jsxs)(n.li,{children:["Use the ",(0,s.jsx)(n.strong,{children:"JSON-RPC WebSocket service endpoint"})," to access the Web socket node service from your dapp."]}),"\n",(0,s.jsxs)(n.li,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Web block explorer address"})," to display the ",(0,s.jsx)(n.a,{href:"http://localhost:25000",children:"block explorer Web application"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Prometheus address"})," to access the ",(0,s.jsx)(n.a,{href:"http://localhost:9090/graph",children:"Prometheus dashboard"}),". ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/monitor/metrics",children:"Read more about metrics"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Grafana address"})," to access the ",(0,s.jsx)(n.a,{href:"http://localhost:3000/d/XE4V0WGZz/besu-overview?orgId=1&refresh=10s&from=now-30m&to=now&var-system=All",children:"Grafana dashboard"}),". ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/monitor/metrics",children:"Read more about metrics"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Kibana logs address"})," to access the ",(0,s.jsx)(n.a,{href:"http://localhost:5601/app/kibana#/discover",children:"logs in Kibana"}),". ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/monitor/elastic-stack",children:"Read more about log management"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Grafana Loki logs address"})," to access the ",(0,s.jsx)(n.a,{href:"http://localhost:3000/d/Ak6eXLsPxFemKYKEXfcH/quorum-logs-loki?orgId=1&var-app=besu&var-search=",children:"logs in Grafana"}),". ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/monitor/loki",children:"Read more about log management"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"To display the list of endpoints again, run:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"./list.sh\n"})}),"\n",(0,s.jsx)(n.h2,{id:"use-a-block-explorer",children:"Use a block explorer"}),"\n",(0,s.jsxs)(n.p,{children:["You can ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/monitor/chainlens",children:"use Chainlens Blockchain Explorer"})," to analyze block\ninformation, contract metadata, transaction searches, and more.\nChainlens has built-in support for privacy-enabled Besu networks."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["You must connect to one of the privacy nodes (for example, ",(0,s.jsx)(n.code,{children:"member1besu"}),"), not the dedicated RPC,\nto allow access for Besu ",(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#priv-methods",children:"privacy API methods"}),".\nIn production networks, you must ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"secure access"}),"\nto RPC nodes."]})}),"\n",(0,s.jsxs)(n.p,{children:["Clone the ",(0,s.jsx)(n.a,{href:"https://github.com/web3labs/chainlens-free",children:"Chainlens GitHub repository"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/web3labs/chainlens-free\n"})}),"\n",(0,s.jsxs)(n.p,{children:["From the ",(0,s.jsx)(n.code,{children:"docker-compose"})," directory, run the following command:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"cd docker-compose\nNODE_ENDPOINT=member1besu PORT=26000 docker-compose -f docker-compose.yml -f chainlens-extensions/docker-compose-quorum-dev-quickstart.yml up\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Open ",(0,s.jsx)(n.code,{children:"http://localhost/"})," on your browser.\nYou\u2019ll see the new initialization page while it boots up.\nThis may take 5\u201310 minutes for the all services to start and the ingestion sync to complete."]}),"\n",(0,s.jsxs)(n.p,{children:["To stop all the services from running, run the following command from the ",(0,s.jsx)(n.code,{children:"docker-compose"})," directory:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"docker-compose down -v\n"})}),"\n",(0,s.jsx)(n.h2,{id:"monitor-nodes-with-prometheus-and-grafana",children:"Monitor nodes with Prometheus and Grafana"}),"\n",(0,s.jsx)(n.p,{children:"The sample network also includes Prometheus and Grafana monitoring tools to let you visualize node health and usage. You can directly access these tools from your browser at the addresses displayed in the endpoint list."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"http://localhost:9090/graph",children:"Prometheus dashboard"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"http://localhost:3000/d/XE4V0WGZz/besu-overview?orgId=1&refresh=10s&from=now-30m&to=now&var-system=All",children:"Grafana dashboard"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"http://localhost:3000/d/Ak6eXLsPxFemKYKEXfcH/quorum-logs-loki?orgId=1&var-app=quorum&var-search=",children:"Grafana Loki logs dashboard"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["For more details on how to configure and use these tools for your own nodes, see the ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/monitor/metrics",children:"performance monitoring documentation"}),", ",(0,s.jsx)(n.a,{href:"https://prometheus.io/docs/introduction/overview/",children:"Prometheus documentation"})," and ",(0,s.jsx)(n.a,{href:"https://grafana.com/docs/",children:"Grafana documentation"}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Grafana dashboard screenshot",src:t(68683).A+"",width:"2880",height:"3958"})}),"\n",(0,s.jsx)(n.p,{children:"and collated logs via Grafana Loki"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Grafana Loki dashboard screenshot",src:t(60119).A+"",width:"1915",height:"898"})}),"\n",(0,s.jsx)(n.h2,{id:"run-json-rpc-requests",children:"Run JSON-RPC requests"}),"\n",(0,s.jsx)(n.p,{children:"You can run JSON-RPC requests on:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["HTTP with ",(0,s.jsx)(n.code,{children:"http://localhost:8545"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["WebSockets with ",(0,s.jsx)(n.code,{children:"ws://localhost:8546"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.h3,{id:"run-with-curl",children:["Run with ",(0,s.jsx)(n.code,{children:"cURL"})]}),"\n",(0,s.jsxs)(n.p,{children:["This tutorial uses ",(0,s.jsx)(n.a,{href:"https://curl.haxx.se/download.html",children:"cURL"})," to send JSON-RPC requests over HTTP."]}),"\n",(0,s.jsx)(n.h3,{id:"run-with-postman",children:"Run with Postman"}),"\n",(0,s.jsx)(n.p,{children:"You can also run all the requests with the Besu Postman collection."}),"\n",(0,s.jsx)(a.default,{}),"\n",(0,s.jsx)(n.h3,{id:"request-the-node-version",children:"Request the node version"}),"\n",(0,s.jsx)(n.p,{children:"Run the following command from the host shell:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}\' http://localhost:8545\n'})}),"\n",(0,s.jsx)(n.p,{children:"The result displays the client version of the running node:"}),"\n",(0,s.jsxs)(i.A,{children:[(0,s.jsx)(c.A,{value:"Result example",label:"Result example",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "besu/v21.1.2/linux-x86_64/oracle_openjdk-java-11"\n}\n'})})}),(0,s.jsx)(c.A,{value:"Result explanation",label:"Result explanation",children:(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:'"jsonrpc" : "2.0"'})," indicates that the JSON-RPC 2.0 spec format is used."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:'"id" : 1'})," is the request identifier used to match the request and the response. This tutorial always uses 1."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:'"result"'})," contains the running Besu information:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"v21.1.2"})," is the running Besu version number. This may be different when you run this tutorial."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"linux-x86_64"})," is the architecture used to build this version."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"oracle_openjdk-java-11"})," is the JVM type and version used to build this version. This may be different when you run this tutorial."]}),"\n"]}),"\n"]}),"\n"]})})]}),"\n",(0,s.jsx)(n.p,{children:"Successfully calling this method shows that you can connect to the nodes using JSON-RPC over HTTP."}),"\n",(0,s.jsxs)(n.p,{children:["From here, you can walk through more interesting requests demonstrated in the rest of this section, or skip ahead to ",(0,s.jsx)(n.a,{href:"#create-a-transaction-using-metamask",children:"Create a transaction using MetaMask"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"count-the-peers",children:"Count the peers"}),"\n",(0,s.jsx)(n.p,{children:"Peers are the other nodes connected to the node receiving the JSON-RPC request."}),"\n",(0,s.jsxs)(n.p,{children:["Poll the peer count using ",(0,s.jsx)(n.a,{href:"/public-networks/reference/api/#net_peercount",children:(0,s.jsx)(n.code,{children:"net_peerCount"})}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}\' http://localhost:8545\n'})}),"\n",(0,s.jsx)(n.p,{children:"The result indicates that there are four peers (the validators):"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x4"\n}\n'})}),"\n",(0,s.jsx)(n.h3,{id:"request-the-most-recent-block-number",children:"Request the most recent block number"}),"\n",(0,s.jsxs)(n.p,{children:["Call ",(0,s.jsx)(n.a,{href:"/public-networks/reference/api/#eth_blockNumber",children:(0,s.jsx)(n.code,{children:"eth_blockNumber"})})," to retrieve the number of the most recently synchronized block:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}\' http://localhost:8545\n'})}),"\n",(0,s.jsx)(n.p,{children:"The result indicates the highest block number synchronized on this node."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x2a"\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Here the hexadecimal value ",(0,s.jsx)(n.code,{children:"0x2a"})," translates to decimal as ",(0,s.jsx)(n.code,{children:"42"}),", the number of blocks received by the node so far, about two minutes after the new network started."]}),"\n",(0,s.jsx)(n.h2,{id:"public-transactions",children:"Public transactions"}),"\n",(0,s.jsxs)(n.p,{children:["This example uses the ",(0,s.jsx)(n.a,{href:"https://www.npmjs.com/package/web3",children:"web3.js"})," library to make the API calls, using the ",(0,s.jsx)(n.code,{children:"rpcnode"}),"\naccessed on ",(0,s.jsx)(n.code,{children:"http://localhost:8545"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Navigate to the ",(0,s.jsx)(n.code,{children:"smart_contracts"})," directory and deploy the public transaction:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"cd smart_contracts\nnpm install\nnode scripts/public/hre_1559_public_tx.js\n# or via ethers\nnode scripts/public/hre_public_tx.js\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This deploys the contract and sends an arbitrary value (",(0,s.jsx)(n.code,{children:"47"}),") from ",(0,s.jsx)(n.code,{children:"Member1"})," to ",(0,s.jsx)(n.code,{children:"Member3"}),". The script then performs:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["A read operation on the contract using the ",(0,s.jsx)(n.code,{children:"get"})," function and the contract's ABI, at the specified address."]}),"\n",(0,s.jsxs)(n.li,{children:["A write operation using the ",(0,s.jsx)(n.code,{children:"set"})," function and the contract's ABI, at the address and sets the value to ",(0,s.jsx)(n.code,{children:"123"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"A read operation on all events emitted."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The script output is as follows:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"{\n address: '0x2b224e70f606267586616586850aC6f4Ae971eCb',\n privateKey: '0xb3f2ab4d7bb07a4168432fb572ceb57fd9b842ed8dc41256255db6ff95784000',\n signTransaction: [Function: signTransaction],\n sign: [Function: sign],\n encrypt: [Function: encrypt]\n}\ncreate and sign the txn\nsending the txn\ntx transactionHash: 0x423d56f958a316d2691e05e158c6a3f37004c27a1ec9697cf9fed2a5c2ae2c2b\ntx contractAddress: 0xB9A44d3BeF64ABfA1485215736B61880eDe630D9\nContract deployed at address: 0xB9A44d3BeF64ABfA1485215736B61880eDe630D9\nUse the smart contracts 'get' function to read the contract's constructor initialized value .. \nObtained value at deployed contract is: 47\nUse the smart contracts 'set' function to update that value to 123 .. \nsending the txn\ntx transactionHash: 0xab460da2544687c5fae4089d01b14bbb9bea765449e1fd2c30b30e1761481344\ntx contractAddress: null\nVerify the updated value that was set .. \nObtained value at deployed contract is: 123\nObtained all value events from deployed contract : [47,123]\n"})}),"\n",(0,s.jsxs)(n.p,{children:["We also have a second example that shows how to transfer ETH between accounts. Navigate to the ",(0,s.jsx)(n.code,{children:"smart_contracts"})," directory\nand deploy the ",(0,s.jsx)(n.code,{children:"eth_tx"})," transaction:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"cd smart_contracts\nnpm install\nnode scripts/public/hre_eth_tx.js\n"})}),"\n",(0,s.jsx)(n.p,{children:"The output is as follows:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"Account A has balance of: 90000\nAccount B has balance of: 0\ncreate and sign the txn\nsending the txn\ntx transactionHash: 0x8b9d247900f2b50a8dded3c0d73ee29f04487a268714ec4ebddf268e73080f98\nAccount A has an updated balance of: 89999.999999999999999744\nAccount B has an updated balance of: 0.000000000000000256\n"})}),"\n",(0,s.jsx)(n.h2,{id:"create-a-transaction-using-metamask",children:"Create a transaction using MetaMask"}),"\n",(0,s.jsxs)(n.p,{children:["You can use ",(0,s.jsx)(n.a,{href:"https://metamask.io/",children:"MetaMask"})," to send a transaction on your private network."]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Open MetaMask and connect it to your private network RPC endpoint by selecting ",(0,s.jsx)(n.code,{children:"Localhost 8545"})," in the network list."]}),"\n",(0,s.jsxs)(n.li,{children:["Choose one of the following test accounts and ",(0,s.jsx)(n.a,{href:"https://metamask.zendesk.com/hc/en-us/articles/360015489331-How-to-import-an-Account",children:"import it into MetaMask by copying the corresponding private key"}),"."]}),"\n"]}),"\n",(0,s.jsx)(o.default,{}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["Besu doesn't incorporate ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/send-transactions",children:"account management"}),". To create your own account, you have to use a third-party tool, such as MetaMask."]})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["After importing an existing test account, ",(0,s.jsx)(n.a,{href:"https://metamask.zendesk.com/hc/en-us/articles/360015289452-Creating-Additional-MetaMask-Wallets-New-UI-",children:"create another test account from scratch"})," to use as the recipient for a test Ether transaction."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["In MetaMask, select the new test account and ",(0,s.jsx)(n.a,{href:"https://metamask.zendesk.com/hc/en-us/articles/360015289512-How-to-copy-your-MetaMask-Account-Public-Address",children:"copy its address"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["In the ",(0,s.jsx)(n.a,{href:"http://localhost:25000",children:"Block Explorer"}),", search for the new test account by selecting the ","\ud83d\udd0d"," and pasting the test account address into the search box."]}),"\n",(0,s.jsx)(n.p,{children:"The new test account displays with a zero balance."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://metamask.zendesk.com/hc/en-us/articles/360015488931-How-to-send-ETH-and-ERC-20-tokens-from-your-MetaMask-Wallet",children:"Send test Ether"})," from the first test account (containing test Ether) to the new test account (which has a zero balance)."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["You can use a zero gas price here as this private test network is a ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/free-gas",children:"free gas network"}),", but the maximum amount of gas that can be used (the gas limit) for a value transaction must be at least 21000."]})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Refresh the Block Explorer page in your browser displaying the target test account."}),"\n",(0,s.jsx)(n.p,{children:"The updated balance reflects the transaction completed using MetaMask."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"smart-contract-and-dapp-usage",children:"Smart contract and dapp usage"}),"\n",(0,s.jsx)(n.p,{children:"You can use a demo dapp called QuorumToken which uses an ERC20 token that is deployed to the network."}),"\n",(0,s.jsxs)(n.p,{children:["We'll use ",(0,s.jsx)(n.a,{href:"https://www.npmjs.com/package/hardhat",children:"Hardhat"}),", ",(0,s.jsx)(n.a,{href:"https://www.npmjs.com/package/ethers",children:"Ethers"})," and ",(0,s.jsx)(n.a,{href:"https://metamask.io/",children:"MetaMask"})," to interact with the network, which involves the following steps:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Deploy the contract and ",(0,s.jsx)(n.strong,{children:"save the contract's address"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"Start the dapp, and read and transact with the deployed token."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"dapps/quorumToken"})," directory is this structured in this manner (only relevant paths shown):"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"quorumToken\n\u251c\u2500\u2500 hardhat.config.ts // hardhat network config\n\u251c\u2500\u2500 contracts // the QuorumToken.sol\n\u251c\u2500\u2500 scripts // handy scripts eg: to deploy to a chain\n\u251c\u2500\u2500 test // contract tests\n\u2514\u2500\u2500 frontend // dapp done in next.js\n \u251c\u2500\u2500 public\n \u251c\u2500\u2500 src\n \u251c\u2500\u2500 styles\n \u251c\u2500\u2500 tsconfig.json\n"})}),"\n",(0,s.jsx)(n.h3,{id:"deploy-the-contract",children:"Deploy the contract"}),"\n",(0,s.jsxs)(n.p,{children:["Once the network is up and running, enter the ",(0,s.jsx)(n.code,{children:"quorumToken"})," directory and run the following:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# install dependencies\nnpm i\n# compile the contract\nnpm run compile\nnpm run test\n# deploy the contract to the quickstart network\nnpm run deploy-quorumtoken\n"})}),"\n",(0,s.jsx)(n.p,{children:"The output is similar to the following:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# compile\n> quorumToken@1.0.0 compile\n> npx hardhat compile\n\nGenerating typings for: 5 artifacts in dir: typechain-types for target: ethers-v6\nSuccessfully generated 24 typings!\nCompiled 5 Solidity files successfully\n\n# test\n> quorumToken@1.0.0 test\n> npx hardhat test\n\n QuorumToken\n Deployment\n \u2714 Should have the correct initial supply (1075ms)\n \u2714 Should token transfer with correct balance (78ms)\n\n\n 2 passing (1s)\n\n# deploy\nContract deploy at: 0x5FbDB2315678afecb367f032d93F642f64180aa3\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This will deploy the contract to the network and return the address. ",(0,s.jsx)(n.strong,{children:"Please save this address for the next step"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"run-the-dapp",children:"Run the dapp"}),"\n",(0,s.jsx)(n.p,{children:"The dapp runs a local website using Next.js, and uses the contract in the previous step deployed on the network."}),"\n",(0,s.jsxs)(n.p,{children:["With the blockchain running, and MetaMask connected to ",(0,s.jsx)(n.code,{children:"localhost"})," on port ",(0,s.jsx)(n.code,{children:"8545"}),", import one of ",(0,s.jsx)(n.a,{href:"/private-networks/reference/accounts-for-testing",children:"our test accounts via private key"}),", and run the following command:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"cd frontend\nnpm i\nnpm run dev\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This starts the dapp, binding it to port ",(0,s.jsx)(n.code,{children:"3001"})," on your machine."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"> webapp@0.1.0 dev\n> next dev -p 3001\n\n- ready started server on [::]:3001, url: http://localhost:3001\n- event compiled client and server successfully in 270 ms (18 modules)\n- wait compiling...\n- event compiled client and server successfully in 173 ms (18 modules)\n"})}),"\n",(0,s.jsxs)(n.p,{children:["In the browser where you have MetaMask enabled and one of the test accounts loaded, open a new tab and navigate to\n",(0,s.jsx)(n.a,{href:"http://localhost:3001",children:"the QuorumToken dapp"}),".\nConnect to MetaMask and input the address from the previous step. Fox example our contract above deployed to ",(0,s.jsx)(n.code,{children:"0x5FbDB2315678afecb367f032d93F642f64180aa3"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"The dapp will then read the balance of the account from MetaMask and get details of the contract. You can then send funds\nto another address (any of the other test accounts) on the network, and MetaMask will sign and send the transaction."}),"\n",(0,s.jsxs)(n.p,{children:["You can also search for the transaction and view its details in the ",(0,s.jsx)(n.a,{href:"http://localhost:25000/",children:"Block Explorer"}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Dapp UI",src:t(71419).A+"",width:"1309",height:"738"})}),"\n",(0,s.jsx)(n.p,{children:"The MetMask UI also keeps a record of the transaction."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Dapp UI",src:t(37061).A+"",width:"1303",height:"662"})}),"\n",(0,s.jsx)(n.h3,{id:"deploy-your-own-dapp",children:"Deploy your own dapp"}),"\n",(0,s.jsx)(n.p,{children:"You can deploy your own dapp to the Quorum Developer Quickstart by configuring your dapp to point to the Quickstart network."}),"\n",(0,s.jsxs)(n.p,{children:["We recommend using ",(0,s.jsx)(n.a,{href:"https://hardhat.org/hardhat-runner/docs/guides/project-setup",children:"Hardhat"}),", and you can use the sample\n",(0,s.jsx)(n.code,{children:"hardhat.config.js"})," to configure the ",(0,s.jsx)(n.code,{children:"networks"})," object in the ",(0,s.jsx)(n.a,{href:"https://hardhat.org/hardhat-network/docs/reference#config",children:"Hardhat configuration file"}),"\nto specify which networks to connect to for deployments and testing. The Quickstart's RPC service endpoint is ",(0,s.jsx)(n.code,{children:"http://localhost:8545"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"For example, the following is the Hardhat configuration file for the QuorumToken dapp used in the Quickstart GoQuorum network:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",children:'module.exports = {\n networks: {\n // in built test network to use when developing contracts\n hardhat: {\n chainId: 1337\n },\n quickstart: {\n url: "http://127.0.0.1:8545",\n chainId: 1337,\n // test accounts only, all good ;)\n accounts: [\n "0x8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63",\n "0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3",\n "0xae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f"\n ]\n }\n }, \n defaultNetwork: "hardhat",\n ...\n ...\n'})}),"\n",(0,s.jsx)(n.p,{children:"Deploy the contract using:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"npx hardhat run ./scripts/deploy_quorumtoken.ts --network quickstart\n"})}),"\n",(0,s.jsx)(n.h2,{id:"stop-and-restart-the-private-network-without-removing-containers",children:"Stop and restart the private network without removing containers"}),"\n",(0,s.jsx)(n.p,{children:"To shut down the private network without deleting the containers:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"./stop.sh\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This command stops the containers related to the services specified in the ",(0,s.jsx)(n.code,{children:"docker-compose.yml"})," file."]}),"\n",(0,s.jsx)(n.p,{children:"To restart the private network:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"./resume.sh\n"})}),"\n",(0,s.jsx)(n.h2,{id:"stop-the-private-network-and-remove-containers",children:"Stop the private network and remove containers"}),"\n",(0,s.jsx)(n.p,{children:"To shut down the private network and delete all containers and images created from running the sample network and the Pet Shop dapp:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"./remove.sh\n"})}),"\n",(0,s.jsx)(n.h2,{id:"add-a-new-node-to-the-network",children:"Add a new node to the network"}),"\n",(0,s.jsx)(n.p,{children:"New nodes joining an existing network require the following:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"The same genesis file used by all other nodes on the running network."}),"\n",(0,s.jsxs)(n.li,{children:["A list of nodes to connect to; this is done by specifying ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/bootnodes",children:"bootnodes"}),", or by providing a list of ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/static-nodes",children:"static nodes"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["A node key pair and optionally an account. If the running network is using permissions, then you need to add the new node's enode details to the ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/use-permissioning/local",children:"permissions file"})," used by existing nodes."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The following steps describe the process to add a new node to the Developer Quickstart."}),"\n",(0,s.jsx)(n.h3,{id:"1-create-the-node-key-files",children:"1. Create the node key files"}),"\n",(0,s.jsx)(n.p,{children:"Create a node key pair and account for a new node by running the following script:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'cd ./extra\nnpm install\nnode generate_node_keys.js --password "Password"\n'})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"--password"})," parameter is optional."]})}),"\n",(0,s.jsx)(n.h3,{id:"2-create-new-node-directory",children:"2. Create new node directory"}),"\n",(0,s.jsx)(n.p,{children:"Navigate to the directory where the configuration files for the network were created."}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["The directory was specified in an earlier step when running ",(0,s.jsx)(n.code,{children:"npx quorum-dev-quickstart"}),". The default location is ",(0,s.jsx)(n.code,{children:"./quorum-test-network"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["In the ",(0,s.jsx)(n.code,{children:"config/nodes"})," directory, create a subdirectory for the new node (for example, ",(0,s.jsx)(n.code,{children:"newnode"}),"), and move the ",(0,s.jsx)(n.code,{children:"nodekey"}),", ",(0,s.jsx)(n.code,{children:"nodekey.pub"}),", ",(0,s.jsx)(n.code,{children:"address"})," and ",(0,s.jsx)(n.code,{children:"accountkey"})," files from the previous step into this directory."]}),"\n",(0,s.jsx)(n.h3,{id:"3-update-docker-compose",children:"3. Update docker-compose"}),"\n",(0,s.jsx)(n.p,{children:"Add an entry for the new node into the docker-compose file:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"newnode:\n <<: *besu-def\n container_name: newnode\n volumes:\n - public-keys:/opt/besu/public-keys/\n - ./config/besu/:/config\n - ./config/nodes/newnode:/opt/besu/keys\n - ./logs/besu:/tmp/besu\n depends_on:\n - validator1\n networks:\n quorum-dev-quickstart:\n ipv4_address: 172.16.239.41\n"})}),"\n",(0,s.jsx)(n.admonition,{title:"important",type:"caution",children:(0,s.jsxs)(n.p,{children:["Select an IP address and port map not being used for the other containers.\nMount the newly created folder ",(0,s.jsx)(n.code,{children:"./config/nodes/newnode"})," to the ",(0,s.jsx)(n.code,{children:"/opt/besu/keys"})," directory of the new node, as seen\nin this example."]})}),"\n",(0,s.jsx)(n.h3,{id:"4-update-prometheus-configuration",children:"4. Update Prometheus configuration"}),"\n",(0,s.jsxs)(n.p,{children:["Update ",(0,s.jsx)(n.code,{children:"prometheus.yml"})," in the ",(0,s.jsx)(n.code,{children:"./config/prometheus/"})," directory to configure metrics to display in Grafana."]}),"\n",(0,s.jsxs)(n.p,{children:["Insert the following under ",(0,s.jsx)(n.code,{children:"scrape_configs"})," section in the file. Change ",(0,s.jsx)(n.code,{children:"job_name"})," and ",(0,s.jsx)(n.code,{children:"targets"})," appropriately if you've updated them."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"- job_name: newnode\n scrape_interval: 15s\n scrape_timeout: 10s\n metrics_path: /metrics\n scheme: http\n static_configs:\n - targets: [newnode:9545]\n"})}),"\n",(0,s.jsx)(n.h3,{id:"5-update-files-with-the-enode-address",children:"5. Update files with the enode address"}),"\n",(0,s.jsxs)(n.p,{children:["Add the new node's enode address to the ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/static-nodes",children:"static nodes"})," file and ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/use-permissioning/local",children:"permissions file"}),". The enode uses the format ",(0,s.jsx)(n.code,{children:"enode://pubkey@ip_address:30303"}),". If the ",(0,s.jsx)(n.code,{children:"nodekey.pub"})," is ",(0,s.jsx)(n.code,{children:"4540ea...9c1d78"})," and the IP address is ",(0,s.jsx)(n.code,{children:"172.16.239.41"}),", then the enode address is ",(0,s.jsx)(n.code,{children:'"enode://4540ea...9c1d78@172.16.239.41:30303"'}),", which must be added to both files."]}),"\n",(0,s.jsxs)(n.p,{children:["Alternatively, call the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/api/#perm_addnodestoallowlist",children:(0,s.jsx)(n.code,{children:"perm_addNodesToAllowlist"})})," API method on existing nodes to add the new node without restarting."]}),"\n",(0,s.jsxs)(n.admonition,{type:"note",children:[(0,s.jsx)(n.p,{children:"Calling the API method by itself only persists for as long as the nodes remain online and is lost on the next restart."}),(0,s.jsxs)(n.p,{children:["On a live network, the new node must be added to the ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/use-permissioning/local",children:"permissions file"})," so that subsequent restarts of the nodes are aware of the change."]})]}),"\n",(0,s.jsx)(n.h3,{id:"6-start-the-network",children:"6. Start the network"}),"\n",(0,s.jsxs)(n.p,{children:["Once complete, start the network up with ",(0,s.jsx)(n.code,{children:"./run.sh"}),". When using the smart contract you can either make changes via a ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/permissioning-smart-contracts",children:"dapp"})," or via ",(0,s.jsx)(n.a,{href:"/public-networks/reference/api/#perm_addnodestoallowlist",children:"RPC API calls"}),"."]})]})}function x(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>a});t(96540);var s=t(18215);const r={tabItem:"tabItem_Ymn6"};var o=t(74848);function a(e){let{children:n,hidden:t,className:a}=e;return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,a),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>v});var s=t(96540),r=t(18215),o=t(23104),a=t(56347),i=t(205),c=t(57485),d=t(31682),l=t(70679);function h(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function u(e){const{values:n,children:t}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:t,attributes:s,default:r}}=e;return{value:n,label:t,attributes:s,default:r}}))}(t);return function(e){const n=(0,d.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:t}=e;const r=(0,a.W6)(),o=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,c.aZ)(o),(0,s.useCallback)((e=>{if(!o)return;const n=new URLSearchParams(r.location.search);n.set(o,e),r.replace({...r.location,search:n.toString()})}),[o,r])]}function x(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,o=u(e),[a,c]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=t.find((e=>e.default))??t[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:o}))),[d,h]=m({queryString:t,groupId:r}),[x,f]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,o]=(0,l.Dv)(t);return[r,(0,s.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:r}),j=(()=>{const e=d??x;return p({value:e,tabValues:o})?e:null})();(0,i.A)((()=>{j&&c(j)}),[j]);return{selectedValue:a,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);c(e),h(e),f(e)}),[h,f,o]),tabValues:o}}var f=t(92303);const j={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function b(e){let{className:n,block:t,selectedValue:s,selectValue:a,tabValues:i}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,o.a_)(),l=e=>{const n=e.currentTarget,t=c.indexOf(n),r=i[t].value;r!==s&&(d(n),a(r))},h=e=>{let n=null;switch(e.key){case"Enter":l(e);break;case"ArrowRight":{const t=c.indexOf(e.currentTarget)+1;n=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(e.currentTarget)-1;n=c[t]??c[c.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},n),children:i.map((e=>{let{value:n,label:t,attributes:o}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>c.push(e),onKeyDown:h,onClick:l,...o,className:(0,r.A)("tabs__item",j.tabItem,o?.className,{"tabs__item--active":s===n}),children:t??n},n)}))})}function w(e){let{lazy:n,children:t,selectedValue:o}=e;const a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===o));return e?(0,s.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==o})))})}function k(e){const n=x(e);return(0,g.jsxs)("div",{className:(0,r.A)("tabs-container",j.tabList),children:[(0,g.jsx)(b,{...n,...e}),(0,g.jsx)(w,{...n,...e})]})}function v(e){const n=(0,f.A)();return(0,g.jsx)(k,{...e,children:h(e.children)},String(n))}},34705:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/files/postman_collection-53d58dda1f254764c957a43f3344607d.json"},71419:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/dapp-explorer-tx-4832cf06aacadf781a6e485a2555cf4c.png"},37061:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/dapp-metamask-tx-b4805abc15ffa4ea88dca9f72c81ecc9.png"},68683:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/grafana-609e4f8ed34ccebba624a8917e366c36.png"},60119:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/grafana_loki-b7ec065514dfe7bb716e9029bda5c056.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>i});var s=t(96540);const r={},o=s.createContext(r);function a(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2ce131d7.64d49c50.js b/assets/js/2ce131d7.64d49c50.js new file mode 100644 index 00000000000..20ccb437550 --- /dev/null +++ b/assets/js/2ce131d7.64d49c50.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1023],{45021:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>d,frontMatter:()=>i,metadata:()=>c,toc:()=>u});var r=n(74848),s=n(28453);const i={title:"Public networks",sidebar_position:1,sidebar_label:"Introduction",description:"Public networks overview",tags:["public networks"]},o="Besu for public networks",c={id:"public-networks/index",title:"Public networks",description:"Public networks overview",source:"@site/docs/public-networks/index.md",sourceDirName:"public-networks",slug:"/public-networks/",permalink:"/public-networks/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/index.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Public networks",sidebar_position:1,sidebar_label:"Introduction",description:"Public networks overview",tags:["public networks"]},sidebar:"publicDocSidebar",next:{title:"Get started",permalink:"/public-networks/get-started"}},l={},u=[{value:"Architecture",id:"architecture",level:2}];function a(e){const t={a:"a",h1:"h1",h2:"h2",header:"header",img:"img",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"besu-for-public-networks",children:"Besu for public networks"})}),"\n",(0,r.jsxs)(t.p,{children:["Besu serves as an ",(0,r.jsx)(t.a,{href:"/public-networks/concepts/node-clients#execution-clients",children:"execution client"})," on public proof-of-stake Ethereum networks such as Ethereum Mainnet, Holesky, Ephemery, and Sepolia."]}),"\n",(0,r.jsxs)(t.p,{children:["Get started by ",(0,r.jsx)(t.a,{href:"/public-networks/get-started/install/",children:"installing Besu"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"architecture",children:"Architecture"}),"\n",(0,r.jsx)(t.p,{children:"The following diagram outlines the high-level architecture of Besu for public networks."}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Public architecture",src:n(66207).A+"",width:"1656",height:"864"})}),"\n",(0,r.jsxs)(t.p,{children:["If you have any questions about Besu for public networks, ask on the ",(0,r.jsx)(t.strong,{children:"besu"})," channel on\n",(0,r.jsx)(t.a,{href:"https://discord.gg/hyperledger",children:"Discord"}),"."]})]})}function d(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},66207:(e,t,n)=>{n.d(t,{A:()=>r});const r=n.p+"assets/images/public-architecture-f5c7eccbe91313bd2b626b2ad1ced0ca.jpeg"},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>c});var r=n(96540);const s={},i=r.createContext(s);function o(e){const t=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/2de980e5.32cc28e2.js b/assets/js/2de980e5.32cc28e2.js new file mode 100644 index 00000000000..01aad2a7323 --- /dev/null +++ b/assets/js/2de980e5.32cc28e2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5953],{61878:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>d});var r=n(74848),o=n(28453),s=n(11470),l=n(19365);const a={title:"Use OpenTelemetry",sidebar_position:6,description:"Collect Besu information with the OpenTelemetry Collector",tags:["private networks"]},i="Use OpenTelemetry",c={id:"private-networks/how-to/monitor/opentelemetry",title:"Use OpenTelemetry",description:"Collect Besu information with the OpenTelemetry Collector",source:"@site/docs/private-networks/how-to/monitor/opentelemetry.md",sourceDirName:"private-networks/how-to/monitor",slug:"/private-networks/how-to/monitor/opentelemetry",permalink:"/private-networks/how-to/monitor/opentelemetry",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/monitor/opentelemetry.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:6,frontMatter:{title:"Use OpenTelemetry",sidebar_position:6,description:"Collect Besu information with the OpenTelemetry Collector",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use Splunk",permalink:"/private-networks/how-to/monitor/splunk"},next:{title:"Use Chainlens Explorer",permalink:"/private-networks/how-to/monitor/chainlens"}},u={},d=[{value:"Install OpenTelemetry Collector",id:"install-opentelemetry-collector",level:2},{value:"Setting up and running OpenTelemetry with Besu",id:"setting-up-and-running-opentelemetry-with-besu",level:2}];function p(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"use-opentelemetry",children:"Use OpenTelemetry"})}),"\n",(0,r.jsxs)(t.p,{children:["You can use the OpenTelemetry monitoring and tracing service to gather node metrics and traces. To enable OpenTelemetry to access Besu, use the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#metrics-enabled",children:(0,r.jsx)(t.code,{children:"--metrics-enabled"})})," and ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#metrics-protocol",children:(0,r.jsx)(t.code,{children:"--metrics-protocol=opentelemetry"})})," options. Use ",(0,r.jsx)(t.a,{href:"https://splunk.com",children:"Splunk"})," to visualize the collected data. A ",(0,r.jsx)(t.a,{href:"https://github.com/splunk/splunk-connect-for-ethereum/tree/master/examples/besu-sync",children:"Besu Sync example"})," is available."]}),"\n",(0,r.jsxs)(t.admonition,{type:"tip",children:[(0,r.jsx)(t.p,{children:"Use OpenTelemetry to monitor the sync time of your Besu node and show where time is spent internally and over the JSON-RPC interface."}),(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://wiki.hyperledger.org/display/BESU/2021-01-19+Office+Hours+Notes",children:"This office hours recording"})," shows examples of monitoring Besu."]})]}),"\n",(0,r.jsx)(t.h2,{id:"install-opentelemetry-collector",children:"Install OpenTelemetry Collector"}),"\n",(0,r.jsxs)(t.p,{children:["Download and install the ",(0,r.jsx)(t.a,{href:"https://github.com/open-telemetry/opentelemetry-collector-contrib/releases",children:"OpenTelemetry Collector"}),"."]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsx)(t.p,{children:"You can also install exporters that send system metrics to OpenTelemetry to monitor non-Besu-specific items such as disk and CPU usage. The OpenTelemetry Collector can connect to additional applications, and may be deployed in Kubernetes environments as a daemonset."})}),"\n",(0,r.jsx)(t.h2,{id:"setting-up-and-running-opentelemetry-with-besu",children:"Setting up and running OpenTelemetry with Besu"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Configure OpenTelemetry to accept data from Besu. For example, use the following configuration for your ",(0,r.jsx)(t.code,{children:"otel-collector-config.yml"})," file, and send data to Splunk and Splunk APM:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-yml",metastring:'title="otel-collector-config.yml"',children:'receivers:\n otlp:\n protocols:\n grpc:\n http:\n\nexporters:\n splunk_hec/traces:\n # Splunk HTTP Event Collector token.\n token: "11111111-1111-1111-1111-1111111111113"\n # URL to a Splunk instance to send data to.\n endpoint: "https://:8088/services/collector"\n # Optional Splunk source: https://docs.splunk.com/Splexicon:Source\n source: "besu:traces"\n # Optional Splunk source type: https://docs.splunk.com/Splexicon:Sourcetype\n sourcetype: "otlp"\n # Splunk index, optional name of the Splunk index targeted.\n index: "traces"\n # Maximum HTTP connections to use simultaneously when sending data. Defaults to 100.\n max_connections: 20\n # Whether to disable gzip compression over HTTP. Defaults to false.\n disable_compression: false\n # HTTP timeout when sending data. Defaults to 10s.\n timeout: 10s\n # Whether to skip checking the certificate of the HEC endpoint when sending data over HTTPS. Defaults to false.\n # For this demo, we use a self-signed certificate on the Splunk docker instance, so this flag is set to true.\n insecure_skip_verify: true\n splunk_hec/metrics:\n # Splunk HTTP Event Collector token.\n token: "11111111-1111-1111-1111-1111111111113"\n # URL to a Splunk instance to send data to.\n endpoint: "https://:8088/services/collector"\n # Optional Splunk source: https://docs.splunk.com/Splexicon:Source\n source: "besu:metrics"\n # Optional Splunk source type: https://docs.splunk.com/Splexicon:Sourcetype\n sourcetype: "prometheus"\n # Splunk index, optional name of the Splunk index targeted.\n index: "metrics"\n # Maximum HTTP connections to use simultaneously when sending data. Defaults to 100.\n max_connections: 20\n # Whether to disable gzip compression over HTTP. Defaults to false.\n disable_compression: false\n # HTTP timeout when sending data. Defaults to 10s.\n timeout: 10s\n # Whether to skip checking the certificate of the HEC endpoint when sending data over HTTPS. Defaults to false.\n # For this demo, we use a self-signed certificate on the Splunk docker instance, so this flag is set to true.\n insecure_skip_verify: true\n # Traces\n sapm:\n access_token: "${SPLUNK_ACCESS_TOKEN}"\n endpoint: "https://ingest.${SPLUNK_REALM}.signalfx.com/v2/trace"\n # Metrics + Events\n signalfx:\n access_token: "${SPLUNK_ACCESS_TOKEN}"\n realm: "${SPLUNK_REALM}"\n\nprocessors:\n batch:\n\nextensions:\n health_check:\n pprof:\n zpages:\n\nservice:\n extensions: [pprof, zpages, health_check]\n pipelines:\n traces:\n receivers: [otlp]\n exporters: [splunk_hec/traces, sapm]\n processors: [batch]\n metrics:\n receivers: [otlp]\n exporters: [splunk_hec/metrics, signalfx]\n processors: [batch]\n'})}),"\n",(0,r.jsx)(t.p,{children:"It is easiest to run the OpenTelemetry collector with Docker with the following command:"}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(l.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"docker run -d \\\n -v ./otel-collector-config.yml:/etc/otel/config.yaml \\\n -e SPLUNK_ACCESS_TOKEN= \\\n -e SPLUNK_REALM= \\\n -p 4317:4317 \\\n otel/opentelemetry-collector-contrib:latest\n"})})}),(0,r.jsx)(l.A,{value:"Example",label:"Example",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"docker run -d \\\n -v ./otel-collector-config.yml:/etc/otel/config.yaml \\\n -e SPLUNK_ACCESS_TOKEN=abcdefg654 \\\n -e SPLUNK_REALM=us1 \\\n -p 4317:4317 \\\n otel/opentelemetry-collector-contrib:latest\n"})})})]}),"\n",(0,r.jsxs)(t.p,{children:["You can also refer to this ",(0,r.jsx)(t.a,{href:"https://github.com/splunk/splunk-connect-for-ethereum/blob/989dc2ccae7d8235bf3ce2a83a18cf0cd1713294/examples/besu-sync/full-sync/docker-compose.yaml",children:"Docker-compose example"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Start Besu with the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#metrics-enabled",children:(0,r.jsx)(t.code,{children:"--metrics-enabled"})})," and ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#metrics-protocol",children:(0,r.jsx)(t.code,{children:"--metrics-protocol=opentelemetry"})})," options. For example, run the following command to start a single node:"]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(l.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'OTEL_EXPORTER_OTLP_ENDPOINT=https://: besu --network=dev --miner-enabled --miner-coinbase --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-enabled --metrics-protocol=opentelemetry\n'})})}),(0,r.jsx)(l.A,{value:"Example",label:"Example",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'OTEL_EXPORTER_OTLP_ENDPOINT=https://localhost:4317 besu --network=dev --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-enabled --metrics-protocol=opentelemetry\n'})})})]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.a,{href:"https://github.com/open-telemetry/opentelemetry-specification/blob/8f7cdb73618a0b3afa9532b8f8103d719e352781/specification/sdk-environment-variables.md",children:"OpenTelemetry SDK"})," mandates how to configure the OpenTelemetry gRPC client, so data flows to the collector from Besu."]}),"\n",(0,r.jsx)(t.p,{children:"You can use the following environment variables:"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Description"}),(0,r.jsx)(t.th,{children:"Required"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"OTEL_EXPORTER_OTLP_ENDPOINT"})}),(0,r.jsxs)(t.td,{children:["OpenTelemetry Collector endpoint, of the form ",(0,r.jsx)(t.code,{children:"https://host:port"}),". The default is ",(0,r.jsx)(t.code,{children:"https://localhost:4317"}),"."]}),(0,r.jsx)(t.td,{children:"Yes"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"OTEL_EXPORTER_OTLP_INSECURE"})}),(0,r.jsxs)(t.td,{children:["Whether to allow insecure connections for OpenTelemetry data. The default is ",(0,r.jsx)(t.code,{children:"false"}),"."]}),(0,r.jsx)(t.td,{children:"No"})]})]})]}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},19365:(e,t,n)=>{n.d(t,{A:()=>l});n(96540);var r=n(18215);const o={tabItem:"tabItem_Ymn6"};var s=n(74848);function l(e){let{children:t,hidden:n,className:l}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.A)(o.tabItem,l),hidden:n,children:t})}},11470:(e,t,n)=>{n.d(t,{A:()=>T});var r=n(96540),o=n(18215),s=n(23104),l=n(56347),a=n(205),i=n(57485),c=n(31682),u=n(70679);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??function(e){return d(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:o}}=e;return{value:t,label:n,attributes:r,default:o}}))}(n);return function(e){const t=(0,c.XI)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function h(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function m(e){let{queryString:t=!1,groupId:n}=e;const o=(0,l.W6)(),s=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,i.aZ)(s),(0,r.useCallback)((e=>{if(!s)return;const t=new URLSearchParams(o.location.search);t.set(s,e),o.replace({...o.location,search:t.toString()})}),[s,o])]}function f(e){const{defaultValue:t,queryString:n=!1,groupId:o}=e,s=p(e),[l,i]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!h({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:s}))),[c,d]=m({queryString:n,groupId:o}),[f,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[o,s]=(0,u.Dv)(n);return[o,(0,r.useCallback)((e=>{n&&s.set(e)}),[n,s])]}({groupId:o}),x=(()=>{const e=c??f;return h({value:e,tabValues:s})?e:null})();(0,a.A)((()=>{x&&i(x)}),[x]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!h({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);i(e),d(e),b(e)}),[d,b,s]),tabValues:s}}var b=n(92303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var y=n(74848);function g(e){let{className:t,block:n,selectedValue:r,selectValue:l,tabValues:a}=e;const i=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.a_)(),u=e=>{const t=e.currentTarget,n=i.indexOf(t),o=a[n].value;o!==r&&(c(t),l(o))},d=e=>{let t=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const n=i.indexOf(e.currentTarget)+1;t=i[n]??i[0];break}case"ArrowLeft":{const n=i.indexOf(e.currentTarget)-1;t=i[n]??i[i.length-1];break}}t?.focus()};return(0,y.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":n},t),children:a.map((e=>{let{value:t,label:n,attributes:s}=e;return(0,y.jsx)("li",{role:"tab",tabIndex:r===t?0:-1,"aria-selected":r===t,ref:e=>i.push(e),onKeyDown:d,onClick:u,...s,className:(0,o.A)("tabs__item",x.tabItem,s?.className,{"tabs__item--active":r===t}),children:n??t},t)}))})}function v(e){let{lazy:t,children:n,selectedValue:s}=e;const l=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=l.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:(0,o.A)("margin-top--md",e.props.className)}):null}return(0,y.jsx)("div",{className:"margin-top--md",children:l.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==s})))})}function k(e){const t=f(e);return(0,y.jsxs)("div",{className:(0,o.A)("tabs-container",x.tabList),children:[(0,y.jsx)(g,{...t,...e}),(0,y.jsx)(v,{...t,...e})]})}function T(e){const t=(0,b.A)();return(0,y.jsx)(k,{...e,children:d(e.children)},String(t))}},28453:(e,t,n)=>{n.d(t,{R:()=>l,x:()=>a});var r=n(96540);const o={},s=r.createContext(o);function l(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:l(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/306048a3.baea7df0.js b/assets/js/306048a3.baea7df0.js new file mode 100644 index 00000000000..46e1256f07b --- /dev/null +++ b/assets/js/306048a3.baea7df0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1524],{2556:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>o,metadata:()=>a,toc:()=>l});var t=s(74848),i=s(28453);const o={title:"Use Chainlens Explorer",sidebar_position:7,description:"Use Chainlens Explorer on a privacy-enabled Besu network",tags:["private networks"]},r="Use Chainlens Blockchain Explorer",a={id:"private-networks/how-to/monitor/chainlens",title:"Use Chainlens Explorer",description:"Use Chainlens Explorer on a privacy-enabled Besu network",source:"@site/docs/private-networks/how-to/monitor/chainlens.md",sourceDirName:"private-networks/how-to/monitor",slug:"/private-networks/how-to/monitor/chainlens",permalink:"/private-networks/how-to/monitor/chainlens",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/monitor/chainlens.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:7,frontMatter:{title:"Use Chainlens Explorer",sidebar_position:7,description:"Use Chainlens Explorer on a privacy-enabled Besu network",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use OpenTelemetry",permalink:"/private-networks/how-to/monitor/opentelemetry"},next:{title:"Use EEA-compliant privacy",permalink:"/private-networks/how-to/use-privacy/eea-compliant"}},c={},l=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Start Chainlens",id:"start-chainlens",level:2},{value:"View on Chainlens",id:"view-on-chainlens",level:2},{value:"Stop Chainlens",id:"stop-chainlens",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"use-chainlens-blockchain-explorer",children:"Use Chainlens Blockchain Explorer"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://chainlens.com/",children:"Chainlens Blockchain Explorer"})," supports public and private EVM networks.\nThis page describes how to use the free version of Chainlens with its built-in support for\n",(0,t.jsx)(n.a,{href:"/private-networks/concepts/privacy/",children:"privacy-enabled"})," Besu networks created using the\n",(0,t.jsx)(n.a,{href:"/private-networks/tutorials/quickstart",children:"Developer Quickstart"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Chainlens provides an overview of the entire network, including block information, contract\nmetadata, transaction searches, and ",(0,t.jsx)(n.a,{href:"https://chainlens.com/",children:"more"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["You must connect to one of the privacy nodes (for example, ",(0,t.jsx)(n.code,{children:"member1besu"}),"), not the dedicated RPC, to\nallow access for Besu ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#priv-methods",children:"privacy API methods"}),".\nIn production networks, you must ",(0,t.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"secure access"}),"\nto RPC nodes."]})}),"\n",(0,t.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://docs.docker.com/compose/install/",children:"Docker and Docker Compose"})," installed."]}),"\n",(0,t.jsx)(n.h2,{id:"start-chainlens",children:"Start Chainlens"}),"\n",(0,t.jsxs)(n.p,{children:["Clone the ",(0,t.jsx)(n.a,{href:"https://github.com/web3labs/chainlens-free",children:"Chainlens GitHub repository"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/web3labs/chainlens-free\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The repository contains a ",(0,t.jsx)(n.code,{children:"docker-compose"})," directory to allow Chainlens to start with a Developer\nQuickstart test network.\nFrom the ",(0,t.jsx)(n.code,{children:"docker-compose"})," directory, run the following command:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"NODE_ENDPOINT=http://rpcnode:8545 docker-compose -f docker-compose.yml -f chainlens-extensions/docker-compose-quorum-dev-quickstart.yml up\n"})}),"\n",(0,t.jsx)(n.p,{children:"This command does two things:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Sets up the node endpoint"}),"\n",(0,t.jsx)(n.li,{children:"Tells Docker to run by using the two Docker Compose files provided"}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["The first ",(0,t.jsx)(n.code,{children:"docker-compose.yml"})," file in the command contains all the services required for Chainlens."]}),"\n",(0,t.jsxs)(n.p,{children:["The second file named ",(0,t.jsx)(n.code,{children:"docker-compose-quorum-dev-quickstart"})," contains the network settings required to start\nChainlens on the same network as the Besu development node."]}),"\n",(0,t.jsxs)(n.p,{children:["Next, open ",(0,t.jsx)(n.code,{children:"http://localhost/"})," on your browser.\nYou\u2019ll see the new initialization page while it boots up.\nThis may take 5\u201310 minutes for the all services to start and the ingestion sync to complete."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Chainlens_loading",src:s(93107).A+"",width:"2432",height:"1308"})}),"\n",(0,t.jsx)(n.h2,{id:"view-on-chainlens",children:"View on Chainlens"}),"\n",(0,t.jsx)(n.p,{children:"After starting Chainlens, you can view information about your network."}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["Screenshots in this section are taken from the ",(0,t.jsx)(n.a,{href:"https://holesky.chainlens.com/dashboard",children:"Chainlens Holesky network"}),"."]})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Dashboard"})," page provides an aggregated view of network activities."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Chainlens_dashboard",src:s(14299).A+"",width:"2860",height:"1906"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Network"})," page provides an overview of the network status and connected peers.\nThis page is disabled by default, and is only visible if you set ",(0,t.jsx)(n.code,{children:"DISPLAY_NETWORK_TAB=enabled"})," using\nthe following command:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"NODE_ENDPOINT=http://member1besu:8545 DISPLAY_NETWORK_TAB=enabled docker-compose -f docker-compose.yml -f chainlens-extensions/docker-compose-quorum-dev-quickstart.yml up\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Blocks"})," page shows a real-time view of the finalized blocks."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Chainlens blocks",src:s(57700).A+"",width:"2692",height:"1920"})}),"\n",(0,t.jsx)(n.p,{children:"You can view a given block details by selecting a block hash or number."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Chainlens block details",src:s(34561).A+"",width:"2608",height:"1924"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Transactions"})," page shows a paginated view of new and historical transactions."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Chainlens transactions",src:s(21988).A+"",width:"2766",height:"1922"})}),"\n",(0,t.jsxs)(n.p,{children:["If you select any transaction hash, you can get the ",(0,t.jsx)(n.strong,{children:"transaction details."})]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Chainlens transaction_details",src:s(45634).A+"",width:"4166",height:"3206"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Contracts"})," page shows all the smart contracts deployed on the network."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Chainlens contracts",src:s(31422).A+"",width:"2844",height:"1924"})}),"\n",(0,t.jsx)(n.p,{children:"You can view a smart contract details by selecting the contract address."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Chainlens contract details",src:s(54192).A+"",width:"2706",height:"1918"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Events"})," page shows all the events generated on the network."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Chainlens events",src:s(67716).A+"",width:"4264",height:"3204"})}),"\n",(0,t.jsx)(n.h2,{id:"stop-chainlens",children:"Stop Chainlens"}),"\n",(0,t.jsx)(n.p,{children:"To stop all the services from running, run the following command:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker-compose down\n"})})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},34561:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/chainlens-block-details-df6e36c4bd72ce823087f9faf9470d4c.png"},57700:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/chainlens-block-42b56c10be9794c4f7fa59148d876ae1.png"},54192:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/chainlens-contract-details-aa987d5cb4567c531b027d594b7102d8.png"},31422:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/chainlens-contracts-1070acb58fc0b4c26e5244e1a0de2467.png"},14299:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/chainlens-dashboard-0a9dc4f45e20c2d0e82a40a62185776e.png"},67716:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/chainlens-events-a72036c7a41af2abc3e7158fc65e95b1.png"},93107:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/chainlens-loading-6892fc684a7239dcf9bc2d70d0ec7b40.png"},45634:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/chainlens-transaction-details-2f78a8932e911d945bd54740e2d43ec2.png"},21988:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/chainlens-transactions-23e6efc701865a9616ed778d5deb6b2f.png"},28453:(e,n,s)=>{s.d(n,{R:()=>r,x:()=>a});var t=s(96540);const i={},o=t.createContext(i);function r(e){const n=t.useContext(o);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3234314a.5a5977fe.js b/assets/js/3234314a.5a5977fe.js new file mode 100644 index 00000000000..0f4dd912aa2 --- /dev/null +++ b/assets/js/3234314a.5a5977fe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8088],{58971:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>o,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>p});var n=a(74848),r=a(28453);const s={title:"Access private and privacy marker transactions",description:"Methods for accessing and managing private transactions and privacy groups in Besu",sidebar_position:6,tags:["private networks"]},i="Access private and privacy marker transactions (Deprecated)",c={id:"private-networks/how-to/use-privacy/access-private-transactions",title:"Access private and privacy marker transactions",description:"Methods for accessing and managing private transactions and privacy groups in Besu",source:"@site/docs/private-networks/how-to/use-privacy/access-private-transactions.md",sourceDirName:"private-networks/how-to/use-privacy",slug:"/private-networks/how-to/use-privacy/access-private-transactions",permalink:"/private-networks/how-to/use-privacy/access-private-transactions",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/use-privacy/access-private-transactions.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:6,frontMatter:{title:"Access private and privacy marker transactions",description:"Methods for accessing and managing private transactions and privacy groups in Besu",sidebar_position:6,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use flexible privacy groups",permalink:"/private-networks/how-to/use-privacy/flexible"},next:{title:"Sign privacy marker transactions",permalink:"/private-networks/how-to/use-privacy/sign-pmts"}},o={},p=[{value:"Transaction receipts",id:"transaction-receipts",level:2},{value:"Transactions",id:"transactions",level:2}];function d(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"access-private-and-privacy-marker-transactions-deprecated",children:"Access private and privacy marker transactions (Deprecated)"})}),"\n",(0,n.jsx)(t.admonition,{type:"caution",children:(0,n.jsxs)(t.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,n.jsx)(t.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,n.jsxs)(t.p,{children:["A Besu private transaction creates a ",(0,n.jsx)(t.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy marker transaction"})," and the private transaction itself."]}),"\n",(0,n.jsx)(t.h2,{id:"transaction-receipts",children:"Transaction receipts"}),"\n",(0,n.jsx)(t.p,{children:"With the transaction hash returned when submitting the private transaction, to get the transaction receipt for the:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Private transaction, use ",(0,n.jsx)(t.a,{href:"/private-networks/reference/api/#priv_gettransactionreceipt",children:(0,n.jsx)(t.code,{children:"priv_getTransactionReceipt"})}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Privacy marker transaction, use ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_gettransactionreceipt",children:(0,n.jsx)(t.code,{children:"eth_getTransactionReceipt"})}),"."]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["The transaction receipt includes a ",(0,n.jsx)(t.code,{children:"status"})," indicating if the transaction failed (",(0,n.jsx)(t.code,{children:"0x0"}),"), succeeded (",(0,n.jsx)(t.code,{children:"0x1"}),"), or was invalid (",(0,n.jsx)(t.code,{children:"0x2"}),")."]}),"\n",(0,n.jsx)(t.admonition,{title:"Private transaction failure example",type:"note",children:(0,n.jsxs)(t.p,{children:["To deploy a private contract, you submit a transaction using ",(0,n.jsx)(t.a,{href:"/private-networks/how-to/send-transactions/private-transactions",children:(0,n.jsx)(t.code,{children:"eea_sendRawTransaction"})}),". If contract deployment fails because of insufficient gas, the privacy marker transaction receipt has a status of success and the private transaction receipt has a status of failure."]})}),"\n",(0,n.jsx)(t.h2,{id:"transactions",children:"Transactions"}),"\n",(0,n.jsx)(t.p,{children:"With the transaction hash returned when submitting the private transaction, to get the:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Private transaction, use ",(0,n.jsx)(t.a,{href:"/private-networks/reference/api/#priv_getprivatetransaction",children:(0,n.jsx)(t.code,{children:"priv_getPrivateTransaction"})}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Privacy marker transaction, use ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_gettransactionbyhash",children:(0,n.jsx)(t.code,{children:"eth_getTransactionByHash"})}),"."]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,t,a)=>{a.d(t,{R:()=>i,x:()=>c});var n=a(96540);const r={},s=n.createContext(r);function i(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/356faa2b.3d6beb99.js b/assets/js/356faa2b.3d6beb99.js new file mode 100644 index 00000000000..c7e88fb0ed7 --- /dev/null +++ b/assets/js/356faa2b.3d6beb99.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7773],{72027:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>c,toc:()=>d});var s=t(74848),r=t(28453);const o={sidebar_label:"Node synchronization",sidebar_position:4,description:"Learn about node synchronization for private networks.",tags:["private networks"]},i="Node synchronization for private networks",c={id:"private-networks/concepts/node-sync-private",title:"Node synchronization for private networks",description:"Learn about node synchronization for private networks.",source:"@site/docs/private-networks/concepts/node-sync-private.md",sourceDirName:"private-networks/concepts",slug:"/private-networks/concepts/node-sync-private",permalink:"/private-networks/concepts/node-sync-private",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/concepts/node-sync-private.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{sidebar_label:"Node synchronization",sidebar_position:4,description:"Learn about node synchronization for private networks.",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Permissioning plugin",permalink:"/private-networks/concepts/permissioning/plugin"},next:{title:"Plugins",permalink:"/private-networks/concepts/plugins"}},a={},d=[];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",header:"header",li:"li",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"node-synchronization-for-private-networks",children:"Node synchronization for private networks"})}),"\n",(0,s.jsxs)(n.p,{children:["For private, permissioned blockchain networks, Besu uses the same ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-sync",children:"synchronization\nmodes as public networks"}),", but with specific configurations\nfor private network needs."]}),"\n",(0,s.jsx)(n.p,{children:"To sync Besu on a private network:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Ensure all nodes use compatible sync modes and configurations."}),"\n",(0,s.jsx)(n.li,{children:"Configure the network with a custom genesis file."}),"\n",(0,s.jsx)(n.li,{children:"Set the network ID and bootnodes specific to your private network."}),"\n",(0,s.jsx)(n.li,{children:"Implement permissioning features to control network access."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The following is an overview of the private network sync modes.\nSelect the sync mode based on your network's requirements and node purposes."}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Sync mode"}),(0,s.jsx)(n.th,{children:"Description"}),(0,s.jsx)(n.th,{children:"Requirements"}),(0,s.jsx)(n.th,{children:"Limitations"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-sync#snap-synchronization",children:"Snap"})}),(0,s.jsx)(n.td,{children:"Recommended for fastest sync and lowest storage requirements on Mainnet. Downloads as many leaves of the trie as possible and reconstructs the trie locally. Faster than fast sync."}),(0,s.jsx)(n.td,{children:"Besu version 24.3.0 or later"}),(0,s.jsx)(n.td,{children:"Cannot switch from fast sync to snap sync mid-process."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-sync#checkpoint-synchronization",children:"Checkpoint"})}),(0,s.jsx)(n.td,{children:"Syncs from a specific checkpoint block configured in the genesis file. Fastest sync mode with lowest storage requirements."}),(0,s.jsx)(n.td,{children:"Besu version 22.4.3 or later"}),(0,s.jsx)(n.td,{children:"Not supported for QBFT or IBFT 2.0 networks without a checkpoint configuration."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-sync#fast-synchronization-deprecated",children:"Fast"})}),(0,s.jsx)(n.td,{children:"Downloads block headers and transaction receipts, verifies chain from genesis block."}),(0,s.jsx)(n.td,{children:"None"}),(0,s.jsx)(n.td,{children:"Deprecated. Not supported with private transactions."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-sync#full-synchronization",children:"Full"})}),(0,s.jsx)(n.td,{children:"Default for all private networks. Downloads and verifies the entire blockchain and state from genesis block, building an archive node with full state history."}),(0,s.jsx)(n.td,{children:"None"}),(0,s.jsx)(n.td,{children:"Slowest sync mode, requires the most disk space."})]})]})]}),"\n",(0,s.jsxs)(n.admonition,{title:"Early access feature",type:"warning",children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"--Xsnapsync-bft-enabled"})," is an early access feature available in Besu version 24.7.1 and later.\nIt is not stable, so use this option with caution."]}),(0,s.jsxs)(n.p,{children:["Use ",(0,s.jsx)(n.code,{children:"--Xsnapsync-bft-enabled"})," with ",(0,s.jsx)(n.code,{children:"--sync-mode=SNAP"})," to enable snap sync in QBFT and IBFT 2.0 private networks."]})]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>c});var s=t(96540);const r={},o=s.createContext(r);function i(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3624528b.16b77a43.js b/assets/js/3624528b.16b77a43.js new file mode 100644 index 00000000000..148cf441e32 --- /dev/null +++ b/assets/js/3624528b.16b77a43.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1701],{95751:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>a,metadata:()=>i,toc:()=>d});var s=t(74848),r=t(28453);const a={title:"Create and send transactions",description:"private networks send transactions overview",tags:["private networks"]},o="Create and send transactions",i={id:"private-networks/how-to/send-transactions/index",title:"Create and send transactions",description:"private networks send transactions overview",source:"@site/docs/private-networks/how-to/send-transactions/index.md",sourceDirName:"private-networks/how-to/send-transactions",slug:"/private-networks/how-to/send-transactions/",permalink:"/private-networks/how-to/send-transactions/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/send-transactions/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{title:"Create and send transactions",description:"private networks send transactions overview",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Alternative elliptic curves",permalink:"/private-networks/how-to/configure/curves"},next:{title:"Create and send private transactions",permalink:"/private-networks/how-to/send-transactions/private-transactions"}},c={},d=[];function l(e){const n={a:"a",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"create-and-send-transactions",children:"Create and send transactions"})}),"\n",(0,s.jsxs)(n.p,{children:["In private networks, you can create and ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/send-transactions",children:"send regular transactions"})," as in public networks."]}),"\n",(0,s.jsx)(n.p,{children:"You can also:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/private-transactions",children:"Send private transactions"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/concurrent-private-transactions",children:"Send concurrent private transactions"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/revert-reason",children:"Include revert reason in transactions"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool#in-networks-with-zero-base-base-or-free-gas",children:"Replace transactions in the transaction pool"}),"."]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>i});var s=t(96540);const r={},a=s.createContext(r);function o(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/37906014.a7cfc71c.js b/assets/js/37906014.a7cfc71c.js new file mode 100644 index 00000000000..1a107530f1a --- /dev/null +++ b/assets/js/37906014.a7cfc71c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5407],{92586:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>u});var r=t(74848),s=t(28453),o=t(11470),a=t(19365);const i={title:"Run Besu from Docker image",description:"Run Besu using the official docker image",sidebar_position:2,tags:["private networks"]},l="Run Besu from a Docker image",c={id:"private-networks/get-started/install/run-docker-image",title:"Run Besu from Docker image",description:"Run Besu using the official docker image",source:"@site/docs/private-networks/get-started/install/run-docker-image.md",sourceDirName:"private-networks/get-started/install",slug:"/private-networks/get-started/install/run-docker-image",permalink:"/private-networks/get-started/install/run-docker-image",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/get-started/install/run-docker-image.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Run Besu from Docker image",description:"Run Besu using the official docker image",sidebar_position:2,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Installation options",permalink:"/private-networks/get-started/install/"},next:{title:"Install binary distribution",permalink:"/private-networks/get-started/install/binary-distribution"}},d={},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Expose ports",id:"expose-ports",level:2},{value:"Start Besu",id:"start-besu",level:2},{value:"Run a node for testing",id:"run-a-node-for-testing",level:3},{value:"Stop Besu and clean up resources",id:"stop-besu-and-clean-up-resources",level:2}];function p(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"run-besu-from-a-docker-image",children:"Run Besu from a Docker image"})}),"\n",(0,r.jsx)(n.p,{children:"Besu provides a Docker image to run a Besu node in a Docker container."}),"\n",(0,r.jsx)(n.p,{children:"Use this Docker image to run a single Besu node without installing Besu."}),"\n",(0,r.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.a,{href:"https://docs.docker.com/install/",children:"Docker"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"MacOS or Linux"}),"\n",(0,r.jsx)(n.admonition,{type:"caution",children:(0,r.jsx)(n.p,{children:"The Docker image does not run on Windows."})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"expose-ports",children:"Expose ports"}),"\n",(0,r.jsxs)(n.p,{children:["Expose ports for P2P discovery, GraphQL, metrics, and HTTP and WebSocket JSON-RPC. You need to expose the ports to use the default ports or the ports specified using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,r.jsx)(n.code,{children:"--rpc-http-port"})}),", ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,r.jsx)(n.code,{children:"--p2p-port"})}),", ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-port",children:(0,r.jsx)(n.code,{children:"--rpc-ws-port"})}),", ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#metrics-port",children:(0,r.jsx)(n.code,{children:"--metrics-port"})}),", ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#graphql-http-port",children:(0,r.jsx)(n.code,{children:"--graphql-http-port"})}),", and ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#metrics-push-port",children:(0,r.jsx)(n.code,{children:"--metrics-push-port"})})," options."]}),"\n",(0,r.jsx)(n.p,{children:"To run Besu exposing local ports for access:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker run -p :8545 -p :8546 -p :30303 hyperledger/besu:latest --rpc-http-enabled --rpc-ws-enabled\n"})}),"\n",(0,r.jsxs)(n.admonition,{type:"note",children:[(0,r.jsxs)(n.p,{children:["The examples on this page expose TCP ports only. To expose UDP ports, specify ",(0,r.jsx)(n.code,{children:"/udp"})," at the end of the argument for the ",(0,r.jsx)(n.code,{children:"-p"})," Docker subcommand option:"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker run -p :/udp\n"})}),(0,r.jsxs)(n.p,{children:["See the ",(0,r.jsxs)(n.a,{href:"https://docs.docker.com/engine/reference/commandline/run/#publish-or-expose-port--p---expose",children:[(0,r.jsx)(n.code,{children:"docker run -p"})," documentation"]}),"."]})]}),"\n",(0,r.jsxs)(n.p,{children:["To enable JSON-RPC HTTP calls to ",(0,r.jsx)(n.code,{children:"127.0.0.1:8545"})," and P2P discovery on ",(0,r.jsx)(n.code,{children:"127.0.0.1:13001"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker run -p 8545:8545 -p 13001:30303 hyperledger/besu:latest --rpc-http-enabled\n"})}),"\n",(0,r.jsx)(n.h2,{id:"start-besu",children:"Start Besu"}),"\n",(0,r.jsxs)(n.admonition,{type:"danger",children:[(0,r.jsxs)(n.p,{children:["Don't mount a volume at the default data path (",(0,r.jsx)(n.code,{children:"/opt/besu"}),"). Mounting a volume at the default data path interferes with the operation of Besu and prevents Besu from safely launching."]}),(0,r.jsxs)(n.p,{children:["To run a node that maintains the node state (key and database), ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(n.code,{children:"--data-path"})})," must be set to a location other than ",(0,r.jsx)(n.code,{children:"/opt/besu"})," and a storage volume mounted at that location."]}),(0,r.jsxs)(n.p,{children:["When running in a Docker container, ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat",children:(0,r.jsx)(n.code,{children:"--nat-method"})})," must be set to ",(0,r.jsx)(n.code,{children:"DOCKER"})," or ",(0,r.jsx)(n.code,{children:"AUTO"})," (default). Don't set ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat",children:(0,r.jsx)(n.code,{children:"--nat-method"})})," to ",(0,r.jsx)(n.code,{children:"NONE"})," or ",(0,r.jsx)(n.code,{children:"UPNP"}),"."]})]}),"\n",(0,r.jsxs)(n.p,{children:["You can specify ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#specify-options",children:"Besu environment variables"})," with the Docker image instead of the command line options."]}),"\n",(0,r.jsxs)(o.A,{children:[(0,r.jsx)(a.A,{value:"Holesky",label:"Holesky",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker run -p 30303:30303 -p 8545:8545 -e BESU_RPC_HTTP_ENABLED=true -e BESU_NETWORK=holesky hyperledger/besu:latest\n"})})}),(0,r.jsx)(a.A,{value:"Ephemery",label:"Ephemery",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker run -p 30303:30303 -p 8545:8545 -e BESU_RPC_HTTP_ENABLED=true -e BESU_NETWORK=ephemery hyperledger/besu:latest\n"})})})]}),"\n",(0,r.jsxs)(n.admonition,{title:'"Unsupported address type exception"',type:"caution",children:[(0,r.jsx)(n.p,{children:"When running Besu from a Docker image, you might get the following exception:"}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"Unsupported address type exception when connecting to peer {}, this is likely due to ipv6 not being enabled at runtime.\n"})}),(0,r.jsx)(n.p,{children:"This happens when the IPv6 support in Docker is disabled while connecting to an IPv6 peer, preventing outbound communication. IPv6 is disabled by default in Docker."}),(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://docs.docker.com/config/daemon/ipv6/",children:"Enable IPv6 support in Docker"})," to allow outbound IPv6 traffic and allow connection with IPv6 peers."]})]}),"\n",(0,r.jsx)(n.h3,{id:"run-a-node-for-testing",children:"Run a node for testing"}),"\n",(0,r.jsx)(n.p,{children:"To run a node that mines blocks at a rate suitable for testing purposes with WebSocket enabled:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker run -p 8546:8546 --mount type=bind,source=/,target=/var/lib/besu hyperledger/besu:latest --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-ws-enabled --network=dev --data-path=/var/lib/besu\n"})}),"\n",(0,r.jsx)(n.h2,{id:"stop-besu-and-clean-up-resources",children:"Stop Besu and clean up resources"}),"\n",(0,r.jsxs)(n.p,{children:["When done running nodes, you can shut down the node container without deleting resources or you can delete the container after stopping it. Run ",(0,r.jsx)(n.code,{children:"docker container ls"})," and ",(0,r.jsx)(n.code,{children:"docker volume ls"})," to get the container and volume names."]}),"\n",(0,r.jsx)(n.p,{children:"To stop a container:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker stop \n"})}),"\n",(0,r.jsx)(n.p,{children:"To delete a container:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker rm \n"})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>a});t(96540);var r=t(18215);const s={tabItem:"tabItem_Ymn6"};var o=t(74848);function a(e){let{children:n,hidden:t,className:a}=e;return(0,o.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,a),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>w});var r=t(96540),s=t(18215),o=t(23104),a=t(56347),i=t(205),l=t(57485),c=t(31682),d=t(70679);function u(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:s}}=e;return{value:n,label:t,attributes:r,default:s}}))}(t);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function h(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:t}=e;const s=(0,a.W6)(),o=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l.aZ)(o),(0,r.useCallback)((e=>{if(!o)return;const n=new URLSearchParams(s.location.search);n.set(o,e),s.replace({...s.location,search:n.toString()})}),[o,s])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,o=p(e),[a,l]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!h({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:o}))),[c,u]=m({queryString:t,groupId:s}),[b,f]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,o]=(0,d.Dv)(t);return[s,(0,r.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:s}),x=(()=>{const e=c??b;return h({value:e,tabValues:o})?e:null})();(0,i.A)((()=>{x&&l(x)}),[x]);return{selectedValue:a,selectValue:(0,r.useCallback)((e=>{if(!h({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);l(e),u(e),f(e)}),[u,f,o]),tabValues:o}}var f=t(92303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function j(e){let{className:n,block:t,selectedValue:r,selectValue:a,tabValues:i}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,o.a_)(),d=e=>{const n=e.currentTarget,t=l.indexOf(n),s=i[t].value;s!==r&&(c(n),a(s))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:i.map((e=>{let{value:n,label:t,attributes:o}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>l.push(e),onKeyDown:u,onClick:d,...o,className:(0,s.A)("tabs__item",x.tabItem,o?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function v(e){let{lazy:n,children:t,selectedValue:o}=e;const a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===o));return e?(0,r.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==o})))})}function k(e){const n=b(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",x.tabList),children:[(0,g.jsx)(j,{...n,...e}),(0,g.jsx)(v,{...n,...e})]})}function w(e){const n=(0,f.A)();return(0,g.jsx)(k,{...e,children:u(e.children)},String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>i});var r=t(96540);const s={},o=r.createContext(s);function a(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3868ebe2.5d5924b9.js b/assets/js/3868ebe2.5d5924b9.js new file mode 100644 index 00000000000..f570b9f1244 --- /dev/null +++ b/assets/js/3868ebe2.5d5924b9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6116],{10739:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>r,metadata:()=>c,toc:()=>l});var t=s(74848),o=s(28453);const r={description:"Ethereum proof of stake consensus",tags:["public networks"]},i="Proof of stake consensus",c={id:"public-networks/concepts/proof-of-stake/index",title:"Proof of stake consensus",description:"Ethereum proof of stake consensus",source:"@site/docs/public-networks/concepts/proof-of-stake/index.md",sourceDirName:"public-networks/concepts/proof-of-stake",slug:"/public-networks/concepts/proof-of-stake/",permalink:"/public-networks/concepts/proof-of-stake/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/concepts/proof-of-stake/index.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{description:"Ethereum proof of stake consensus",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Node clients",permalink:"/public-networks/concepts/node-clients"},next:{title:"Attestations",permalink:"/public-networks/concepts/proof-of-stake/attestations"}},a={},l=[];function d(e){const n={a:"a",admonition:"admonition",h1:"h1",header:"header",li:"li",ol:"ol",p:"p",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"proof-of-stake-consensus",children:"Proof of stake consensus"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://ethereum.org/en/upgrades/merge/",children:"The Merge"})," transitioned Ethereum Mainnet to ",(0,t.jsx)(n.a,{href:"https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/",children:"Proof of Stake\n(PoS)"})," consensus."]}),"\n",(0,t.jsxs)(n.p,{children:["Under Ethereum's PoS, you must run a ",(0,t.jsx)(n.a,{href:"/public-networks/concepts/node-clients#execution-and-consensus-clients",children:"full node"})," and\n",(0,t.jsx)(n.a,{href:"https://ethereum.org/en/staking/",children:"stake 32 ETH"})," to become a validator."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["To operate a full node on Mainnet, you must run a beacon node, i.e. a consensus client and an execution client.\nTo become a validator, you must also run a validator client (either ",(0,t.jsx)(n.a,{href:"https://docs.teku.consensys.net/get-started/start-teku#start-the-clients-in-a-single-process",children:"in the same process as the\nbeacon node"}),"\nor ",(0,t.jsx)(n.a,{href:"https://docs.teku.consensys.net/get-started/start-teku#run-the-clients-separately",children:"separately"}),")."]})}),"\n",(0,t.jsx)(n.p,{children:"PoS is preferred over Proof of Work and Proof of Authority as a consensus mechanism because it is\nmore secure, requires less energy, and lowers the barrier to entry."}),"\n",(0,t.jsxs)(n.p,{children:["The PoS mechanism randomly chooses validators to propose or validate blocks on the ",(0,t.jsx)(n.a,{href:"https://ethereum.org/en/upgrades/beacon-chain/",children:"Beacon\nChain"})," in defined time frames."]}),"\n",(0,t.jsxs)(n.p,{children:["Proposers are responsible for proposing new consensus blocks, and non-proposing validators are\nresponsible for validating (attesting to) proposed blocks.\nValidators earn ",(0,t.jsx)(n.a,{href:"https://www.blocknative.com/ethereum-staking-calculator",children:"rewards"})," for proposing and\nattesting to consensus blocks eventually included in the Beacon Chain, and penalized for malicious behavior.\n",(0,t.jsx)(n.a,{href:"/public-networks/concepts/proof-of-stake/attestations",children:"Attestations"})," make up the bulk of validator rewards (~85%).\nValidators also receive transaction fees for included blocks."]}),"\n",(0,t.jsx)(n.p,{children:"Each consensus block contains an execution payload, which contains a list of transactions and other data required to execute and validate the payload."}),"\n",(0,t.jsxs)(n.p,{children:["When a node validates a consensus block, its ",(0,t.jsx)(n.a,{href:"/public-networks/concepts/node-clients#consensus-clients",children:"consensus client"})," processes the block and sends the execution payload to the ",(0,t.jsx)(n.a,{href:"/public-networks/concepts/node-clients#execution-clients",children:"execution client"}),", which:"]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Assembles a block on the execution layer."}),"\n",(0,t.jsx)(n.li,{children:"Verifies pre-conditions."}),"\n",(0,t.jsx)(n.li,{children:"Executes transactions."}),"\n",(0,t.jsx)(n.li,{children:"Verifies post-conditions."}),"\n",(0,t.jsx)(n.li,{children:"Sends the validity result back to the consensus client."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"If the block is valid, the execution client includes it in the execution chain and stores the new state in execution state storage."}),"\n",(0,t.jsx)(n.p,{children:"If a consensus block receives attestations backed by enough staked ETH, the block is included in the Beacon Chain. In the case of competing chains, the chain with the highest number of validator votes is selected."})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>i,x:()=>c});var t=s(96540);const o={},r=t.createContext(o);function i(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3917f523.69dcf3fb.js b/assets/js/3917f523.69dcf3fb.js new file mode 100644 index 00000000000..9275ee32198 --- /dev/null +++ b/assets/js/3917f523.69dcf3fb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5769],{45988:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>d});var s=i(74848),t=i(28453);const r={title:"Genesis file items",sidebar_position:4,description:"Genesis file configuration items reference",tags:["public networks","private networks"]},c="Genesis file items",o={id:"public-networks/reference/genesis-items",title:"Genesis file items",description:"Genesis file configuration items reference",source:"@site/docs/public-networks/reference/genesis-items.md",sourceDirName:"public-networks/reference",slug:"/public-networks/reference/genesis-items",permalink:"/public-networks/reference/genesis-items",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/reference/genesis-items.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Genesis file items",sidebar_position:4,description:"Genesis file configuration items reference",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Objects",permalink:"/public-networks/reference/engine-api/objects"},next:{title:"EVM tool options",permalink:"/public-networks/reference/evm-tool"}},l={},d=[{value:"Configuration items",id:"configuration-items",level:2},{value:"Genesis block parameters",id:"genesis-block-parameters",level:2},{value:"Milestone blocks",id:"milestone-blocks",level:2},{value:"Fixed difficulty",id:"fixed-difficulty",level:2},{value:"Discovery configuration items",id:"discovery-configuration-items",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"genesis-file-items",children:"Genesis file items"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/genesis-file",children:"Besu genesis file"})," contains ",(0,s.jsx)(n.a,{href:"#configuration-items",children:"network configuration items"})," and ",(0,s.jsx)(n.a,{href:"#genesis-block-parameters",children:"genesis block parameters"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"configuration-items",children:"Configuration items"}),"\n",(0,s.jsxs)(n.p,{children:["Network configuration items are specified in the genesis file in the ",(0,s.jsx)(n.code,{children:"config"})," object."]}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Item"}),(0,s.jsx)(n.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Milestone blocks"}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:[(0,s.jsx)(n.a,{href:"#milestone-blocks",children:"Milestone blocks for the network"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"chainID"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:[(0,s.jsx)(n.a,{href:"/public-networks/concepts/network-and-chain-id",children:"Chain ID for the network"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"ethash"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Specifies network uses ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/",children:"Ethash"})," and contains ",(0,s.jsx)(n.a,{href:"#fixed-difficulty",children:(0,s.jsx)(n.code,{children:"fixeddifficulty"})}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"clique"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Specifies network uses ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/clique",children:"Clique"})," and contains ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/clique#genesis-file",children:"Clique configuration items"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"ibft2"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Specifies network uses ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft",children:"IBFT 2.0"})," and contains ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft#genesis-file",children:"IBFT 2.0 configuration items"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"qbft"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Specifies network uses ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft",children:"QBFT"})," and contains ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft#genesis-file",children:"QBFT configuration items"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"transitions"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Specifies block at which to ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/add-validators-without-voting",children:"change IBFT 2.0 or QBFT validators"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"contractSizeLimit"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Maximum contract size in bytes. Specify in ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/free-gas",children:"free gas networks"}),". The default is ",(0,s.jsx)(n.code,{children:"24576"})," and the maximum size is ",(0,s.jsx)(n.code,{children:"2147483647"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"evmStackSize"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Maximum stack size. Specify to increase the maximum stack size in private networks with complex smart contracts. The default is ",(0,s.jsx)(n.code,{children:"1024"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"ecCurve"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Specifies ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/curves",children:"the elliptic curve to use"}),". Default is ",(0,s.jsx)(n.code,{children:"secp256k1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"discovery"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Specifies ",(0,s.jsx)(n.a,{href:"#discovery-configuration-items",children:"discovery configuration items"}),". The ",(0,s.jsx)(n.code,{children:"discovery"})," object can be left empty."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"zeroBaseFee"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Specifies a base fee of ",(0,s.jsx)(n.code,{children:"0"})," for ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/free-gas#4-enable-zero-base-fee-if-using-london-fork-or-later",children:"free gas networks"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"fixedBaseFee"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Specifies a constant base fee for blocks, overriding the dynamic base fee calculation of ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:"EIP-1559"}),"."]})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"genesis-block-parameters",children:"Genesis block parameters"}),"\n",(0,s.jsxs)(n.p,{children:["The purpose of some genesis block parameters varies depending on the consensus protocol (Ethash, ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/clique",children:"Clique"}),", ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft",children:"IBFT 2.0"}),", or ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft",children:"QBFT"}),"). These parameters include:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"difficulty"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"extraData"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"mixHash"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The following table describes the genesis block parameters with the same purpose across all consensus protocols."}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Item"}),(0,s.jsx)(n.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"coinbase"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Address to pay mining rewards to. Can be any value in the genesis block (commonly set to ",(0,s.jsx)(n.code,{children:"0x0000000000000000000000000000000000000000"}),")."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"gasLimit"})}),(0,s.jsx)(n.td,{style:{textAlign:"left"},children:"Block gas limit. Total gas limit for all transactions in a block."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"nonce"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Used in block computation. Can be any value in the genesis block (commonly set to ",(0,s.jsx)(n.code,{children:"0x0"}),")."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"timestamp"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Creation date and time of the block. Must be before the next block so we recommend specifying ",(0,s.jsx)(n.code,{children:"0x0"})," in the genesis file."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"alloc"})}),(0,s.jsxs)(n.td,{style:{textAlign:"left"},children:["Defines ",(0,s.jsx)(n.a,{href:"/private-networks/reference/accounts-for-testing",children:"accounts with balances"})," or ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/contracts",children:"contracts"}),"."]})]})]})]}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsxs)(n.p,{children:["If a ",(0,s.jsx)(n.code,{children:"Supplied genesis block does not match stored chain data"})," error occurs, use the genesis file matching the genesis block of the data directory, or use the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,s.jsx)(n.code,{children:"--data-path"})})," option to specify a different data directory."]})}),"\n",(0,s.jsx)(n.h2,{id:"milestone-blocks",children:"Milestone blocks"}),"\n",(0,s.jsxs)(n.p,{children:["In public networks, the milestone blocks specify the blocks at which the network changed protocol. See a ",(0,s.jsx)(n.a,{href:"https://github.com/ethereum/execution-specs#ethereum-protocol-releases",children:"full list of Ethereum protocol releases"})," and their corresponding milestone blocks."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",metastring:'title="Ethereum Mainnet milestone blocks"',children:'{\n "config": {\n ...\n "homesteadBlock": 1150000,\n "daoForkBlock": 1920000,\n "daoForkSupport": true,\n "eip150Block": 2463000,\n "eip150Hash": "0x2086799aeebeae135c246c65021c82b4e15a2c451340993aacfd2751886514f0",\n "eip155Block": 2675000,\n "eip158Block": 2675000,\n "byzantiumBlock": 4370000,\n "constantinopleBlock": 7280000,\n "constantinopleFixBlock": 7280000,\n "muirGlacierBlock": 9200000,\n "berlinBlock": 12244000,\n "londonBlock": 12965000,\n "arrowGlacierBlock": 13773000,\n "grayGlacierBlock": 15050000,\n ...\n },\n}\n'})}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsx)(n.p,{children:"Ensure you include a milestone far enough in advance in the genesis file. Not doing so can lead to unexpected and inconsistent behavior without specific errors."})}),"\n",(0,s.jsx)(n.p,{children:"In private networks, the milestone block defines the protocol version for the network."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",metastring:'title="Private network milestone block"',children:'{\n "config": {\n ...\n "berlinBlock": 0,\n ...\n },\n}\n'})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:"In private networks, we recommend specifying the latest milestone block. It's implied this includes the preceding milestones. This ensures you use the most up-to-date protocol and have access to the most recent opcodes."})}),"\n",(0,s.jsx)(n.h2,{id:"fixed-difficulty",children:"Fixed difficulty"}),"\n",(0,s.jsxs)(n.p,{children:["Use ",(0,s.jsx)(n.code,{children:"fixeddifficulty"})," to specify a fixed difficulty in private networks using Ethash. This will keep the network's difficulty constant and override the ",(0,s.jsx)(n.code,{children:"difficulty"})," parameter from the genesis file."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "ethash": {\n "fixeddifficulty": 1000\n },\n\n },\n ...\n}\n'})}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["Using ",(0,s.jsx)(n.code,{children:"fixeddifficulty"})," is not recommended for use with Ethash outside of test environments. For production networks using Ethash, we recommend setting a low ",(0,s.jsx)(n.code,{children:"difficulty"})," value in the genesis file instead. Ethash will adjust the difficulty of the network based on hashrate to produce blocks at the targeted frequency."]})}),"\n",(0,s.jsx)(n.h2,{id:"discovery-configuration-items",children:"Discovery configuration items"}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.code,{children:"discovery"})," configuration items to specify the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#bootnodes",children:(0,s.jsx)(n.code,{children:"bootnodes"})})," and ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#discovery-dns-url",children:(0,s.jsx)(n.code,{children:"discovery-dns-url"})})," in the genesis file, in place of using CLI options or listing them in the configuration file. If either CLI option is used, it takes precedence over the genesis file. Anything listed in the configuration file also takes precedence."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n "discovery": {\n "bootnodes": [\n "enode://c35c3...d615f@1.2.3.4:30303",\n "enode://f42c13...fc456@1.2.3.5:30303"\n ],\n "dns": "enrtree://AM5FCQLWIZX2QFPNJAP7VUERCCRNGRHWZG3YYHIUV7BVDQ5FDPRT2@nodes.example.org"\n }\n }\n}\n'})})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>c,x:()=>o});var s=i(96540);const t={},r=s.createContext(t);function c(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3a4520c6.2638a0de.js b/assets/js/3a4520c6.2638a0de.js new file mode 100644 index 00000000000..0986555b62b --- /dev/null +++ b/assets/js/3a4520c6.2638a0de.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1275],{12317:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>s,default:()=>p,frontMatter:()=>r,metadata:()=>a,toc:()=>d});var t=o(74848),i=o(28453);const r={title:"Proof of authority consensus",sidebar_position:1,description:"Besu proof of authority consensus protocols comparison",tags:["private networks"]},s="Proof of authority consensus",a={id:"private-networks/concepts/poa",title:"Proof of authority consensus",description:"Besu proof of authority consensus protocols comparison",source:"@site/docs/private-networks/concepts/poa.md",sourceDirName:"private-networks/concepts",slug:"/private-networks/concepts/poa",permalink:"/private-networks/concepts/poa",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/concepts/poa.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Proof of authority consensus",sidebar_position:1,description:"Besu proof of authority consensus protocols comparison",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Concepts",permalink:"/private-networks/concepts/"},next:{title:"Privacy",permalink:"/private-networks/concepts/privacy/"}},l={},d=[{value:"Properties",id:"properties",level:2},{value:"Immediate finality",id:"immediate-finality",level:3},{value:"Minimum number of validators",id:"minimum-number-of-validators",level:3},{value:"Liveness",id:"liveness",level:3},{value:"Speed",id:"speed",level:3}];function c(e){const n={a:"a",admonition:"admonition",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"proof-of-authority-consensus",children:"Proof of authority consensus"})}),"\n",(0,t.jsxs)(n.p,{children:["Besu implements the QBFT, IBFT 2.0, and Clique proof of authority (PoA) ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/",children:"consensus protocols"}),". PoA consensus protocols work when participants know each other and there is a level of trust between them. For example, in a permissioned consortium network."]}),"\n",(0,t.jsx)(n.p,{children:"PoA consensus protocols have faster block times and a much greater transaction throughput than the Ethash proof of work consensus protocol used on the Ethereum Mainnet."}),"\n",(0,t.jsx)(n.p,{children:"In QBFT, IBFT 2.0, or Clique, a group of nodes in the network act as validators (QBFT and IBFT 2.0) or signers (Clique). The existing nodes in the signer/validator pool vote to add nodes to or remove nodes from the pool."}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"For the rest of this page, the term validator is used to refer to signers and validators."})}),"\n",(0,t.jsx)(n.h2,{id:"properties",children:"Properties"}),"\n",(0,t.jsx)(n.p,{children:"Properties to consider when comparing QBFT, IBFT 2.0, and Clique are:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Immediate finality."}),"\n",(0,t.jsx)(n.li,{children:"Minimum number of validators."}),"\n",(0,t.jsx)(n.li,{children:"Liveness."}),"\n",(0,t.jsx)(n.li,{children:"Speed."}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"immediate-finality",children:"Immediate finality"}),"\n",(0,t.jsx)(n.p,{children:"QBFT and IBFT 2.0 have immediate finality; there are no forks and all valid blocks get included in the main chain."}),"\n",(0,t.jsx)(n.p,{children:"Clique does not have immediate finality. Implementations using Clique must be aware of forks and chain reorganizations occurring."}),"\n",(0,t.jsx)(n.h3,{id:"minimum-number-of-validators",children:"Minimum number of validators"}),"\n",(0,t.jsx)(n.p,{children:"To be Byzantine fault tolerant, QBFT and IBFT 2.0 require a minimum of four validators."}),"\n",(0,t.jsx)(n.p,{children:"Clique can operate with a single validator but operating with a single validator offers no redundancy if the validator fails."}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsx)(n.p,{children:"Byzantine fault tolerant is the ability to function correctly and reach consensus despite nodes failing or propagating incorrect information to peers."})}),"\n",(0,t.jsx)(n.h3,{id:"liveness",children:"Liveness"}),"\n",(0,t.jsx)(n.p,{children:"Clique is more fault tolerant than QBFT and IBFT 2.0. Clique tolerates up to half of the validators failing. QBFT and IBFT 2.0 networks require greater than or equal to two-thirds of validators to be operating to create blocks. For example, an QBFT and IBFT 2.0 network of:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Four to five validators tolerates one unresponsive validator."}),"\n",(0,t.jsx)(n.li,{children:"Six to eight validators tolerates two unresponsive validators."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"Networks with three or less validators can produce blocks but do not guarantee finality when operating in adversarial environments."}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsx)(n.p,{children:"We recommend using QBFT or IBFT 2.0 networks with at least four nodes in production environments."})}),"\n",(0,t.jsx)(n.h3,{id:"speed",children:"Speed"}),"\n",(0,t.jsx)(n.p,{children:"Reaching consensus and adding blocks is faster in Clique networks. For Clique, the probability of a fork increases as the number of validators increases."}),"\n",(0,t.jsx)(n.p,{children:"For QBFT and IBFT 2.0, the time to add new blocks increases as the number of validators increases."})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>a});var t=o(96540);const i={},r=t.createContext(i);function s(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3aaf4567.c9190433.js b/assets/js/3aaf4567.c9190433.js new file mode 100644 index 00000000000..e718f3e63a0 --- /dev/null +++ b/assets/js/3aaf4567.c9190433.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5398],{62629:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>c,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>h,toc:()=>l});var t=n(74848),r=n(28453);const s={title:"Troubleshoot peering",sidebar_position:4,description:"How to troubleshoot peering",tags:["public networks"]},i="Troubleshoot peering",h={id:"public-networks/how-to/troubleshoot/peering",title:"Troubleshoot peering",description:"How to troubleshoot peering",source:"@site/docs/public-networks/how-to/troubleshoot/peering.md",sourceDirName:"public-networks/how-to/troubleshoot",slug:"/public-networks/how-to/troubleshoot/peering",permalink:"/public-networks/how-to/troubleshoot/peering",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/troubleshoot/peering.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Troubleshoot peering",sidebar_position:4,description:"How to troubleshoot peering",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Troubleshoot performance",permalink:"/public-networks/how-to/troubleshoot/performance"},next:{title:"Concepts",permalink:"/public-networks/concepts"}},c={},l=[{value:"Peering FAQ",id:"peering-faq",level:2},{value:""Why can\u2019t I find enough peers to sync?"",id:"why-cant-i-find-enough-peers-to-sync",level:3},{value:""What network or router/modem settings should I check?"",id:"what-network-or-routermodem-settings-should-i-check",level:3},{value:""Which URLs should I check?"",id:"which-urls-should-i-check",level:3},{value:""How do I open/forward my ports?"",id:"how-do-i-openforward-my-ports",level:3},{value:""How do I test that my ports are open?"",id:"how-do-i-test-that-my-ports-are-open",level:3},{value:""What's the ideal number of peers for Besu?"",id:"whats-the-ideal-number-of-peers-for-besu",level:3},{value:""What's the benefit of increasing the number of peers?"",id:"whats-the-benefit-of-increasing-the-number-of-peers",level:3},{value:"Metrics",id:"metrics",level:2}];function a(e){const o={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.header,{children:(0,t.jsx)(o.h1,{id:"troubleshoot-peering",children:"Troubleshoot peering"})}),"\n",(0,t.jsxs)(o.p,{children:["Many factors can affect the ability of your node to find and maintain peers. Your network router, machine environment, and node configuration are all important. If you have peering issues, start by ",(0,t.jsx)(o.a,{href:"/public-networks/how-to/connect/configure-ports",children:"configuring your ports"})," and ",(0,t.jsx)(o.a,{href:"/public-networks/how-to/connect/manage-peers",children:"managing peers"}),"."]}),"\n",(0,t.jsx)(o.h2,{id:"peering-faq",children:"Peering FAQ"}),"\n",(0,t.jsx)(o.h3,{id:"why-cant-i-find-enough-peers-to-sync",children:'"Why can\u2019t I find enough peers to sync?"'}),"\n",(0,t.jsx)(o.p,{children:"One or more of the following may be the cause:"}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsx)(o.li,{children:"Your hardware doesn't have enough CPU, disk IOPS, or bandwidth to handle all the peers."}),"\n",(0,t.jsx)(o.li,{children:"Your ports aren't open in your firewall and/or router."}),"\n",(0,t.jsxs)(o.li,{children:["Your node is sending large numbers of DNS requests. See ",(0,t.jsx)(o.a,{href:"https://github.com/hyperledger/besu/issues/4375",children:"issue #4375"}),"."]}),"\n",(0,t.jsxs)(o.li,{children:["You're using ",(0,t.jsx)(o.a,{href:"/public-networks/concepts/node-sync#checkpoint-synchronization",children:"checkpoint sync"}),", which doesn't download all historical block data, so your peers may disconnect you when fetching those blocks."]}),"\n",(0,t.jsx)(o.li,{children:"Your node is experiencing the normal behavior of peers connecting and disconnecting. This is especially normal soon after you start your node."}),"\n"]}),"\n",(0,t.jsx)(o.p,{children:"You can try the following to find more peers:"}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsxs)(o.li,{children:["Set ",(0,t.jsx)(o.a,{href:"/public-networks/reference/cli/options#p2p-host",children:(0,t.jsx)(o.code,{children:"p2p-host"})})," to your external IP address to allow inbound connections."]}),"\n",(0,t.jsx)(o.li,{children:"Restart Besu. This can take a while to build up again."}),"\n",(0,t.jsxs)(o.li,{children:["Set ",(0,t.jsx)(o.code,{children:"-Xdns-enabled"})," to ",(0,t.jsx)(o.code,{children:"true"})," (only for private networks)."]}),"\n",(0,t.jsxs)(o.li,{children:["Delete the node key (which is autogenerated in your data directory). There are two reasons that this might help find more peers:","\n",(0,t.jsxs)(o.ol,{children:["\n",(0,t.jsx)(o.li,{children:"Your node (identified by the address associated with this key) has been put onto other peers' bad peer lists for some reason."}),"\n",(0,t.jsxs)(o.li,{children:['Peer discovery is influenced by the value of the node key. This is related to the node "distance" in the ',(0,t.jsx)(o.a,{href:"https://github.com/ethereum/devp2p/wiki/Discovery-Overview#kademlia",children:"discovery algorithm"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(o.p,{children:["You can read the ",(0,t.jsx)(o.a,{href:"https://docs.prylabs.network/docs/prysm-usage/p2p-host-ip",children:"Prysm EL and CL peering documentation"})," for more information."]}),"\n",(0,t.jsx)(o.h3,{id:"what-network-or-routermodem-settings-should-i-check",children:'"What network or router/modem settings should I check?"'}),"\n",(0,t.jsx)(o.p,{children:"Check the following settings:"}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsx)(o.li,{children:"Your machine and router's specified DNS should support TCP. You can check your DNS online for TCP support. Google and Cloudflare, 8.8.8.8 and 1.1.1.1, support TCP over port 853. Other DNS might as well."}),"\n",(0,t.jsx)(o.li,{children:"The appropriate ports should be open on your router, or your router should have UPNP enabled. See the next FAQ for more information on router settings."}),"\n",(0,t.jsxs)(o.li,{children:["If you use ",(0,t.jsx)(o.a,{href:"https://docs.docker.com/network/network-tutorial-host/",children:"Docker"})," or virtualization, the container should be able to create outbound connections on the host machine."]}),"\n"]}),"\n",(0,t.jsx)(o.h3,{id:"which-urls-should-i-check",children:'"Which URLs should I check?"'}),"\n",(0,t.jsxs)(o.p,{children:["Check that the ",(0,t.jsx)(o.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URLs"})," specified for ",(0,t.jsx)(o.a,{href:"/private-networks/how-to/configure/bootnodes",children:"bootnodes"})," or ",(0,t.jsx)(o.a,{href:"/public-networks/how-to/connect/static-nodes",children:"static nodes"})," match the enode URLs displayed when starting the remote nodes."]}),"\n",(0,t.jsx)(o.h3,{id:"how-do-i-openforward-my-ports",children:'"How do I open/forward my ports?"'}),"\n",(0,t.jsxs)(o.p,{children:["If you\u2019re behind NAT, you probably need to set up port forwarding in your router. You might also need to configure your firewall. Forward and open ",(0,t.jsx)(o.code,{children:"30303"})," (if using the default p2p port) for both UDP and TCP. If your router supports UPNP, you can set ",(0,t.jsx)(o.a,{href:"/public-networks/reference/cli/options#nat-method",children:(0,t.jsx)(o.code,{children:"--nat-method"})})," to ",(0,t.jsx)(o.a,{href:"/public-networks/how-to/connect/specify-nat#upnp",children:(0,t.jsx)(o.code,{children:"UPNPP2PONLY"})}),"."]}),"\n",(0,t.jsx)(o.h3,{id:"how-do-i-test-that-my-ports-are-open",children:'"How do I test that my ports are open?"'}),"\n",(0,t.jsxs)(o.p,{children:["You can use this ",(0,t.jsx)(o.a,{href:"https://www.yougetsignal.com/tools/open-ports/",children:"open port checker"}),"."]}),"\n",(0,t.jsx)(o.h3,{id:"whats-the-ideal-number-of-peers-for-besu",children:'"What\'s the ideal number of peers for Besu?"'}),"\n",(0,t.jsx)(o.p,{children:"The default maximum is 25. Increasing the number of peers increases the bandwidth, CPU, and disk access Besu uses to respond to peers. Hardware with low specifications might result in low peer numbers. You'll experience diminishing returns with a larger number of peers (>100)."}),"\n",(0,t.jsx)(o.h3,{id:"whats-the-benefit-of-increasing-the-number-of-peers",children:'"What\'s the benefit of increasing the number of peers?"'}),"\n",(0,t.jsx)(o.p,{children:"Increasing the number of max peers won't speed up Besu syncing, because the bottleneck during sync is disk IO and CPU."}),"\n",(0,t.jsx)(o.p,{children:"Note that Besu's peers are only used for the initial sync and transaction gossip, neither of which affects attestation performance. The beacon node connectivity controls how quickly you receive blocks and how attestations are published. Increasing Besu's peer count increases the load on your node, which may hurt attestations."}),"\n",(0,t.jsx)(o.h2,{id:"metrics",children:"Metrics"}),"\n",(0,t.jsxs)(o.p,{children:["Capture ",(0,t.jsx)(o.a,{href:"/public-networks/how-to/monitor/",children:"metrics"})," to gain insights into peering behavior over time."]}),"\n",(0,t.jsxs)(o.p,{children:["To ",(0,t.jsx)(o.a,{href:"/public-networks/how-to/monitor/metrics",children:"enable Prometheus to access Besu"}),", open the metrics port or metrics push port to Prometheus or the Prometheus push gateway on TCP."]}),"\n",(0,t.jsxs)(o.p,{children:["Specify the ports for Prometheus and Prometheus push gateway using the ",(0,t.jsx)(o.a,{href:"/public-networks/reference/cli/options#metrics-port",children:(0,t.jsx)(o.code,{children:"--metrics-port"})})," and ",(0,t.jsx)(o.a,{href:"/public-networks/reference/cli/options#metrics-push-port",children:(0,t.jsx)(o.code,{children:"--metrics-push-port"})})," options. The defaults are ",(0,t.jsx)(o.code,{children:"9545"})," and ",(0,t.jsx)(o.code,{children:"9001"}),"."]})]})}function d(e={}){const{wrapper:o}={...(0,r.R)(),...e.components};return o?(0,t.jsx)(o,{...e,children:(0,t.jsx)(a,{...e})}):a(e)}},28453:(e,o,n)=>{n.d(o,{R:()=>i,x:()=>h});var t=n(96540);const r={},s=t.createContext(r);function i(e){const o=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function h(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(s.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3b05cdc2.516f1401.js b/assets/js/3b05cdc2.516f1401.js new file mode 100644 index 00000000000..8afc0ac68d4 --- /dev/null +++ b/assets/js/3b05cdc2.516f1401.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6563],{42260:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>d,contentTitle:()=>s,default:()=>h,frontMatter:()=>i,metadata:()=>c,toc:()=>o});var t=a(74848),r=a(28453);const i={title:"Create and send private transactions",description:"Creating and sending private transactions with Besu",sidebar_position:1,tags:["private networks"]},s="Create and send private transactions (Deprecated)",c={id:"private-networks/how-to/send-transactions/private-transactions",title:"Create and send private transactions",description:"Creating and sending private transactions with Besu",source:"@site/docs/private-networks/how-to/send-transactions/private-transactions.md",sourceDirName:"private-networks/how-to/send-transactions",slug:"/private-networks/how-to/send-transactions/private-transactions",permalink:"/private-networks/how-to/send-transactions/private-transactions",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/send-transactions/private-transactions.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Create and send private transactions",description:"Creating and sending private transactions with Besu",sidebar_position:1,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Create and send transactions",permalink:"/private-networks/how-to/send-transactions/"},next:{title:"Send concurrent private transactions",permalink:"/private-networks/how-to/send-transactions/concurrent-private-transactions"}},d={},o=[{value:"eea_sendRawTransaction",id:"eea_sendrawtransaction",level:2},{value:"priv_distributeRawTransaction",id:"priv_distributerawtransaction",level:2},{value:"EEA-compliant or Besu-extended privacy",id:"eea-compliant-or-besu-extended-privacy",level:2},{value:"Unsigned and unencoded private transactions",id:"unsigned-and-unencoded-private-transactions",level:2}];function p(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"create-and-send-private-transactions-deprecated",children:"Create and send private transactions (Deprecated)"})}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsxs)(n.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,t.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,t.jsxs)(n.p,{children:["Create and send ",(0,t.jsx)(n.a,{href:"/private-networks/concepts/privacy/",children:"private transactions"})," using:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/private-networks/how-to/use-privacy/web3js-quorum",children:"web3js-quorum client library"})," or ",(0,t.jsx)(n.a,{href:"https://github.com/web3j/web3j",children:"web3j client library"})]}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#eea_sendrawtransaction",children:(0,t.jsx)(n.code,{children:"eea_sendRawTransaction"})})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"#priv_distributerawtransaction",children:(0,t.jsx)(n.code,{children:"priv_distributeRawTransaction"})}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"All private transaction participants must be online for a private transaction to be successfully distributed. If any participants are offline when submitting the private transaction, the transaction is not attempted and you must resubmit the transaction."}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"gas"})," and ",(0,t.jsx)(n.code,{children:"gasPrice"})," specified when sending a private transaction are used by the ",(0,t.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy marker transaction (PMT)"}),", not the private transaction itself."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"Private transactions either deploy contracts or call contract functions. Ether transfer transactions cannot be private."})}),"\n",(0,t.jsx)(n.h2,{id:"eea_sendrawtransaction",children:(0,t.jsx)(n.code,{children:"eea_sendRawTransaction"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,t.jsx)(n.code,{children:"eea_sendRawTransaction"})})," distributes the private transaction to the participating nodes, and signs and submits the PMT, as described in ",(0,t.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"Private transaction processing"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["If ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/concurrent-private-transactions",children:"sending concurrent transactions"}),", you must use ",(0,t.jsx)(n.a,{href:"#priv_distributerawtransaction",children:(0,t.jsx)(n.code,{children:"priv_distributeRawTransaction"})})," instead of ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,t.jsx)(n.code,{children:"eea_sendRawTransaction"})}),"."]})}),"\n",(0,t.jsx)(n.h2,{id:"priv_distributerawtransaction",children:(0,t.jsx)(n.code,{children:"priv_distributeRawTransaction"})}),"\n",(0,t.jsxs)(n.p,{children:["Use ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#priv_distributerawtransaction",children:(0,t.jsx)(n.code,{children:"priv_distributeRawTransaction"})})," instead of ",(0,t.jsx)(n.a,{href:"#eea_sendrawtransaction",children:(0,t.jsx)(n.code,{children:"eea_sendRawTransaction"})})," when sending ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/concurrent-private-transactions",children:"concurrent private transactions"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#priv_distributerawtransaction",children:(0,t.jsx)(n.code,{children:"priv_distributeRawTransaction"})})," distributes the private transaction to the participating nodes but does not sign and submit the PMT. That is, it performs steps 1 to 5 of ",(0,t.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"private transaction processing"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["If using ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#priv_distributerawtransaction",children:(0,t.jsx)(n.code,{children:"priv_distributeRawTransaction"})})," instead of ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,t.jsx)(n.code,{children:"eea_sendRawTransaction"})}),", use the value returned by ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#priv_distributerawtransaction",children:(0,t.jsx)(n.code,{children:"priv_distributeRawTransaction"})}),", which is the enclave key to the private transaction in ",(0,t.jsx)(n.a,{href:"https://docs.tessera.consensys.net/",children:"Tessera"}),", in the ",(0,t.jsx)(n.code,{children:"data"})," field of a call to ",(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#eth_sendrawtransaction",children:(0,t.jsx)(n.code,{children:"eth_sendRawTransaction"})}),". Use the value returned by ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#priv_getprivacyprecompileaddress",children:(0,t.jsx)(n.code,{children:"priv_getPrivacyPrecompileAddress"})}),", which is the address of the ",(0,t.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy precompiled contract"}),", in the ",(0,t.jsx)(n.code,{children:"to"})," field of the call."]}),"\n",(0,t.jsxs)(n.p,{children:["By using the ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/",children:"public Ethereum transaction"}),", ",(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#eth_sendrawtransaction",children:(0,t.jsx)(n.code,{children:"eth_sendRawTransaction"})}),", you are signing and submitting the PMT yourself instead of having it signed by the Besu node, giving you greater control over the PMT."]}),"\n",(0,t.jsx)(n.admonition,{type:"warning",children:(0,t.jsx)(n.p,{children:"If the PMT is not sent after distributing the private transaction, the distributed private transaction is not executed and the private states are not updated."})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",metastring:'title="Distribute private transaction using priv_distributeRawTransaction"',children:'{\n "jsonrpc": "2.0",\n "method": "priv_distributeRawTransaction",\n "params": [\n "0xf90198808203e8832dc6c08080b8fb608060405234801561001057600080fd5b5060dc8061001f6000396000f3006080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633fa4f24514604e57806355241077146076575b600080fd5b348015605957600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50609e6004803603810190808035906020019092919050505060a6565b005b60005481565b80600081905550505600a165627a7a723058202bdbba2e694dba8fff33d9d0976df580f57bff0a40e25a46c398f8063b4c003600291ba05393543d483654fd01d9ee818cddfc7527dd6e13e6ef7b45a61e2ca13ffb6b70a0452338873862803ffe04056aea98cd0e3417ff971dcb384e54fce8ca1756a665a09de8260dc3763f8383a6a9ffe96909d36cd3ff4c346e3846a6467c50feaf0119e1a0839f41993789227ec721c9eaf1541683287fa436ef6edd9ec8fd088bad1a0c3c8a72657374726963746564"\n ],\n "id": 1\n}\n'})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",metastring:'title="Enclave key to the private transaction in Tessera returned by priv_distributeRawTransaction"',children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0xfd0d90ab824574abc19c0776ca0210e764561d0ef6d621f2bbbea316eccfe56b"\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Send the enclave key in the ",(0,t.jsx)(n.code,{children:"data"})," field, and the ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#priv_getprivacyprecompileaddress",children:"privacy precompile address"})," in the ",(0,t.jsx)(n.code,{children:"to"})," field of ",(0,t.jsx)(n.code,{children:"eth_sendRawTransaction"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_sendRawTransaction",\n "params": [\n {\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "to": "0x000000000000000000000000000000000000007e",\n "data": "0xfd0d90ab824574abc19c0776ca0210e764561d0ef6d621f2bbbea316eccfe56b",\n "gas": "0x2E1800",\n "gasPrice": "0x9184e72a000"\n }\n ],\n "id": 1\n}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"eea-compliant-or-besu-extended-privacy",children:"EEA-compliant or Besu-extended privacy"}),"\n",(0,t.jsxs)(n.p,{children:["To create an ",(0,t.jsx)(n.a,{href:"/private-networks/concepts/privacy/privacy-groups#enterprise-ethereum-alliance-privacy",children:"EEA-compliant private transaction"}),", specify ",(0,t.jsx)(n.code,{children:"privateFor"})," when creating the signed transaction passed as an input parameter to ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,t.jsx)(n.code,{children:"eea_sendRawTransaction"})}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["To create a ",(0,t.jsx)(n.a,{href:"/private-networks/concepts/privacy/privacy-groups#besu-extended-privacy",children:"Besu-extended private transaction"}),", specify a ",(0,t.jsx)(n.code,{children:"privacyGroupId"})," when creating the signed transaction passed as an input parameter to ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,t.jsx)(n.code,{children:"eea_sendRawTransaction"})}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"unsigned-and-unencoded-private-transactions",children:"Unsigned and unencoded private transactions"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,t.jsx)(n.code,{children:"eea_sendRawTransaction"})})," parameter is a signed RLP-encoded private transaction. Shown below are examples of unsigned and unencoded private transactions to create a contract."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",metastring:'title="Unencoded and unsigned EEA-compliant private transaction"',children:'{\n "to": null,\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas": "0x7600",\n "gasPrice": "0x0",\n "data": "0x608060405234801561001057600080fd5b5060dc8061001f6000396000f3006080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633fa4f24514604e57806355241077146076575b600080fd5b348015605957600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50609e6004803603810190808035906020019092919050505060a6565b005b60005481565b80600081905550505600a165627a7a723058202bdbba2e694dba8fff33d9d0976df580f57bff0a40e25a46c398f8063b4c00360029",\n "nonce": "0x0",\n "privateFrom": "negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=",\n "privateFor": [\n "g59BmTeJIn7HIcnq8VQWgyh/pDbvbt2eyP0Ii60aDDw=",\n "6fg8q5rWMBoAT2oIiU3tYJbk4b7oAr7dxaaVY7TeM3U="\n ],\n "restriction": "restricted"\n}\n'})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",metastring:'title="Unencoded and unsigned Besu-extended private transaction"',children:'{\n "to": null,\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas": "0x7600",\n "gasPrice": "0x0",\n "data": "0x608060405234801561001057600080fd5b5060dc8061001f6000396000f3006080604052600436106049576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633fa4f24514604e57806355241077146076575b600080fd5b348015605957600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b50609e6004803603810190808035906020019092919050505060a6565b005b60005481565b80600081905550505600a165627a7a723058202bdbba2e694dba8fff33d9d0976df580f57bff0a40e25a46c398f8063b4c00360029",\n "nonce": "0x0",\n "privateFrom": "negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=",\n "privacyGroupId": "kAbelwaVW7okoEn1+okO+AbA4Hhz/7DaCOWVQz9nx5M=",\n "restriction": "restricted"\n}\n'})}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"example"})," directory in the ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/use-privacy/web3js-quorum",children:"web3js-quorum client library"})," contains examples of signing and encoding private transactions."]})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>s,x:()=>c});var t=a(96540);const r={},i=t.createContext(r);function s(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3e86fe35.bca88889.js b/assets/js/3e86fe35.bca88889.js new file mode 100644 index 00000000000..dc6db860cbe --- /dev/null +++ b/assets/js/3e86fe35.bca88889.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1874],{81090:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>s,default:()=>d,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var t=o(74848),i=o(28453);const r={title:"Configure logging",sidebar_position:3,description:"Besu log level setting and log formatting",path:"blob/master/besu/src/main/resources/",source:"log4j2.xml",tags:["public networks","private networks"]},s="Use logging",l={id:"public-networks/how-to/monitor/logging",title:"Configure logging",description:"Besu log level setting and log formatting",source:"@site/docs/public-networks/how-to/monitor/logging.md",sourceDirName:"public-networks/how-to/monitor",slug:"/public-networks/how-to/monitor/logging",permalink:"/public-networks/how-to/monitor/logging",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/monitor/logging.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Configure logging",sidebar_position:3,description:"Besu log level setting and log formatting",path:"blob/master/besu/src/main/resources/",source:"log4j2.xml",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Understand metrics",permalink:"/public-networks/how-to/monitor/understand-metrics"},next:{title:"High availability of JSON-RPC and RPC Pub/Sub APIs",permalink:"/public-networks/how-to/configure-ha/"}},a={},c=[{value:"Basic logging",id:"basic-logging",level:2},{value:"Advanced logging",id:"advanced-logging",level:2},{value:"Log invalid transactions",id:"log-invalid-transactions",level:3},{value:"Log rotation",id:"log-rotation",level:3}];function g(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"use-logging",children:"Use logging"})}),"\n",(0,t.jsxs)(n.p,{children:["Besu uses ",(0,t.jsx)(n.a,{href:"https://logging.apache.org/log4j/2.x/",children:"Log4j 2"})," for logging and provides two methods to configure logging behavior:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"#basic-logging",children:"Basic"})," - Changes the log level."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"#advanced-logging",children:"Advanced"})," - Configures the output and format of the logs."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart",children:"Quorum Developer Quickstart"})," provides an ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/monitor/elastic-stack",children:"example implementation using Elastic Stack"})," for log management."]}),"\n",(0,t.jsx)(n.h2,{id:"basic-logging",children:"Basic logging"}),"\n",(0,t.jsxs)(n.p,{children:["Use the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#logging",children:(0,t.jsx)(n.code,{children:"--logging"})})," command line option to specify logging verbosity. The ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#logging",children:(0,t.jsx)(n.code,{children:"--logging"})})," option changes the volume of events displayed in the log. Valid log levels are ",(0,t.jsx)(n.code,{children:"OFF"}),", ",(0,t.jsx)(n.code,{children:"ERROR"}),", ",(0,t.jsx)(n.code,{children:"WARN"}),", ",(0,t.jsx)(n.code,{children:"INFO"}),", ",(0,t.jsx)(n.code,{children:"DEBUG"}),", ",(0,t.jsx)(n.code,{children:"TRACE"}),", ",(0,t.jsx)(n.code,{children:"ALL"}),". The default level is ",(0,t.jsx)(n.code,{children:"INFO"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"For most use cases, the basic method provides enough configurability."}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["Use the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#admin_changeloglevel",children:(0,t.jsx)(n.code,{children:"admin_changeLogLevel"})})," API method to change the log level while Besu is running."]})}),"\n",(0,t.jsx)(n.h2,{id:"advanced-logging",children:"Advanced logging"}),"\n",(0,t.jsxs)(n.p,{children:["You can provide your own logging configuration using the standard Log4j 2 configuration mechanisms. For example, the following Log4j 2 configuration is the same as the ",(0,t.jsx)(n.a,{href:"https://github.com/hyperledger/besu/blob/750580dcca349d22d024cc14a8171b2fa74b505a/besu/src/main/resources/log4j2.xml",children:"default configuration"})," except for the exclusion of logging of stack traces for exceptions:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-xml",metastring:'title="debug.xml"',children:'\n\n \n INFO\n \n\n \n \n \n \n \n \n \n \n \n \n\n'})}),"\n",(0,t.jsxs)(n.p,{children:["To use your custom configuration, set the environment variable ",(0,t.jsx)(n.code,{children:"LOG4J_CONFIGURATION_FILE"})," to the location of your configuration file."]}),"\n",(0,t.jsxs)(n.p,{children:["If you have more specific requirements, you can create your own ",(0,t.jsx)(n.a,{href:"https://logging.apache.org/log4j/2.x/manual/configuration.html",children:"Log4j 2 configuration"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"For Bash-based executions, you can set the variable for only the scope of the program execution by setting it before starting Besu."}),"\n",(0,t.jsx)(n.p,{children:"To set the debug logging and start Besu connected to the Holesky testnet:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"LOG4J_CONFIGURATION_FILE=./debug.xml besu --network=holesky\n"})}),"\n",(0,t.jsx)(n.h3,{id:"log-invalid-transactions",children:"Log invalid transactions"}),"\n",(0,t.jsx)(n.p,{children:"You can log information about invalid transactions that have been removed from the transaction pool."}),"\n",(0,t.jsxs)(n.p,{children:["Use the log marker ",(0,t.jsx)(n.code,{children:"INVALID_TX_REMOVED"})," and the following fields to format the log line as required:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"txhash"})," - The hash of the transaction."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"txlog"})," - The human-readable log of the transaction."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"reason"})," - The reason the transaction is invalid."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"txrlp"})," - The RLP encoding of the transaction."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"For example, the following Log4j 2 configuration enables logging of invalid transactions:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-xml",metastring:'title="debug.xml"',children:'\n\n \n INFO\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n'})}),"\n",(0,t.jsx)(n.h3,{id:"log-rotation",children:"Log rotation"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart",children:"Quorum Developer Quickstart"})," logging configuration defines a ",(0,t.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart/blob/b72a0f64d685c851bf8be399a8e33bbdf0e09982/files/besu/config/besu/log-config.xml",children:"log rotation to restrict the size of the log files"}),"."]})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(g,{...e})}):g(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>s,x:()=>l});var t=o(96540);const i={},r=t.createContext(i);function s(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/3f04f830.7e296a78.js b/assets/js/3f04f830.7e296a78.js new file mode 100644 index 00000000000..ed73de8503e --- /dev/null +++ b/assets/js/3f04f830.7e296a78.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1903],{49857:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>d,default:()=>u,frontMatter:()=>a,metadata:()=>c,toc:()=>h});var r=t(74848),o=t(28453),s=t(11470),i=t(19365);const a={description:"Besu private network using the IBFT 2.0 (Proof of Authority) consensus protocol",tags:["private networks"]},d="Create a private network using IBFT 2.0",c={id:"private-networks/tutorials/ibft/index",title:"Create a private network using IBFT 2.0",description:"Besu private network using the IBFT 2.0 (Proof of Authority) consensus protocol",source:"@site/docs/private-networks/tutorials/ibft/index.md",sourceDirName:"private-networks/tutorials/ibft",slug:"/private-networks/tutorials/ibft/",permalink:"/private-networks/tutorials/ibft/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/ibft/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{description:"Besu private network using the IBFT 2.0 (Proof of Authority) consensus protocol",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Create a QBFT network",permalink:"/private-networks/tutorials/qbft"},next:{title:"Add and removing IBFT 2.0 validators",permalink:"/private-networks/tutorials/ibft/validators"}},l={},h=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Steps",id:"steps",level:2},{value:"1. Create directories",id:"1-create-directories",level:3},{value:"2. Create a configuration file",id:"2-create-a-configuration-file",level:3},{value:"3. Generate node keys and a genesis file",id:"3-generate-node-keys-and-a-genesis-file",level:3},{value:"4. Copy the genesis file to the IBFT-Network directory",id:"4-copy-the-genesis-file-to-the-ibft-network-directory",level:3},{value:"5. Copy the node private keys to the node directories",id:"5-copy-the-node-private-keys-to-the-node-directories",level:3},{value:"6. Start the first node as the bootnode",id:"6-start-the-first-node-as-the-bootnode",level:3},{value:"7. Start Node-2",id:"7-start-node-2",level:3},{value:"8. Start Node-3",id:"8-start-node-3",level:3},{value:"9. Start Node-4",id:"9-start-node-4",level:3},{value:"10. Confirm the private network is working",id:"10-confirm-the-private-network-is-working",level:3},{value:"Next steps",id:"next-steps",level:2},{value:"Stop the nodes",id:"stop-the-nodes",level:2}];function p(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"create-a-private-network-using-ibft-20",children:"Create a private network using IBFT 2.0"})}),"\n",(0,r.jsxs)(n.p,{children:["A private network provides a configurable network for testing. This private network uses the ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft",children:"IBFT 2.0 (proof of authority) consensus protocol"}),"."]}),"\n",(0,r.jsxs)(n.admonition,{type:"danger",children:[(0,r.jsx)(n.p,{children:"The steps in this tutorial create an isolated, but not protected or secure, Ethereum private network. We recommend running the private network behind a properly configured firewall."}),(0,r.jsx)(n.p,{children:"This tutorial configures a private network using IBFT 2.0 for educational purposes only. IBFT 2.0 requires 4 validators to be Byzantine fault tolerant."})]}),"\n",(0,r.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/private-networks/get-started/install/binary-distribution",children:"Besu"})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://curl.haxx.se/download.html",children:"Curl (or similar webservice client)"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"steps",children:"Steps"}),"\n",(0,r.jsx)(n.p,{children:"Listed on the right-hand side of the page are the steps to create a private network using IBFT 2.0 with four nodes. The four nodes are all validators."}),"\n",(0,r.jsx)(n.h3,{id:"1-create-directories",children:"1. Create directories"}),"\n",(0,r.jsx)(n.p,{children:"Each node requires a data directory for the blockchain data."}),"\n",(0,r.jsx)(n.p,{children:"Create directories for your private network, each of the four nodes, and a data directory for each node:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"IBFT-Network/\n\u251c\u2500\u2500 Node-1\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u251c\u2500\u2500 Node-2\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u251c\u2500\u2500 Node-3\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2514\u2500\u2500 Node-4\n \u251c\u2500\u2500 data\n"})}),"\n",(0,r.jsx)(n.h3,{id:"2-create-a-configuration-file",children:"2. Create a configuration file"}),"\n",(0,r.jsxs)(n.p,{children:["The configuration file defines the ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft#genesis-file",children:"IBFT 2.0 genesis file"})," and the number of node key pairs to generate."]}),"\n",(0,r.jsxs)(n.p,{children:["The configuration file has two nested JSON nodes. The first is the ",(0,r.jsx)(n.code,{children:"genesis"})," property defining the IBFT 2.0 genesis file, except for the ",(0,r.jsx)(n.code,{children:"extraData"})," string, which Besu generates automatically in the resulting genesis file. The second is the ",(0,r.jsx)(n.code,{children:"blockchain"})," property defining the number of key pairs to generate."]}),"\n",(0,r.jsxs)(n.p,{children:["Copy the following configuration file definition to a file called ",(0,r.jsx)(n.code,{children:"ibftConfigFile.json"})," and save it in the ",(0,r.jsx)(n.code,{children:"IBFT-Network"})," directory:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "genesis": {\n "config": {\n "chainId": 1337,\n "berlinBlock": 0,\n "ibft2": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n }\n },\n "nonce": "0x0",\n "timestamp": "0x58ee40ba",\n "gasLimit": "0x47b760",\n "difficulty": "0x1",\n "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",\n "coinbase": "0x0000000000000000000000000000000000000000",\n "alloc": {\n "fe3b557e8fb62b89f4916b721be55ceb828dbd73": {\n "privateKey": "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63",\n "comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",\n "balance": "0xad78ebc5ac6200000"\n },\n "627306090abaB3A6e1400e9345bC60c78a8BEf57": {\n "privateKey": "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3",\n "comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",\n "balance": "90000000000000000000000"\n },\n "f17f52151EbEF6C7334FAD080c5704D77216b732": {\n "privateKey": "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f",\n "comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",\n "balance": "90000000000000000000000"\n }\n }\n },\n "blockchain": {\n "nodes": {\n "generate": true,\n "count": 4\n }\n }\n}\n'})}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["We recommend specifying the latest ",(0,r.jsx)(n.a,{href:"/public-networks/reference/genesis-items#milestone-blocks",children:"milestone"})," when creating the configuration file for a private network. This ensures you are using the most up-to-date protocol and have access to the most recent opcodes."]})}),"\n",(0,r.jsx)(n.admonition,{type:"warning",children:(0,r.jsxs)(n.p,{children:["Do not use the accounts in ",(0,r.jsx)(n.code,{children:"alloc"})," in the genesis file on Mainnet or any public network except for testing. The private keys display, which means the accounts are not secure."]})}),"\n",(0,r.jsx)(n.h3,{id:"3-generate-node-keys-and-a-genesis-file",children:"3. Generate node keys and a genesis file"}),"\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.code,{children:"IBFT-Network"})," directory, generate the node key and genesis file:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"besu operator generate-blockchain-config --config-file=ibftConfigFile.json --to=networkFiles --private-key-file-name=key\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Besu creates the following in the ",(0,r.jsx)(n.code,{children:"networkFiles"})," directory:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"genesis.json"})," - The genesis file including the ",(0,r.jsx)(n.code,{children:"extraData"})," property specifying the four nodes are validators."]}),"\n",(0,r.jsx)(n.li,{children:"A directory for each node named using the node address and containing the public and private key for each node."}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"networkFiles/\n\u251c\u2500\u2500 genesis.json\n\u2514\u2500\u2500 keys\n \u251c\u2500\u2500 0x438821c42b812fecdcea7fe8235806a412712fc0\n \u2502\xa0\xa0 \u251c\u2500\u2500 key\n \u2502\xa0\xa0 \u2514\u2500\u2500 key.pub\n \u251c\u2500\u2500 0xca9c2dfa62f4589827c0dd7dcf48259aa29f22f5\n \u2502\xa0\xa0 \u251c\u2500\u2500 key\n \u2502\xa0\xa0 \u2514\u2500\u2500 key.pub\n \u251c\u2500\u2500 0xcd5629bd37155608a0c9b28c4fd19310d53b3184\n \u2502\xa0\xa0 \u251c\u2500\u2500 key\n \u2502\xa0\xa0 \u2514\u2500\u2500 key.pub\n \u2514\u2500\u2500 0xe96825c5ab8d145b9eeca1aba7ea3695e034911a\n \u251c\u2500\u2500 key\n \u2514\u2500\u2500 key.pub\n"})}),"\n",(0,r.jsx)(n.h3,{id:"4-copy-the-genesis-file-to-the-ibft-network-directory",children:"4. Copy the genesis file to the IBFT-Network directory"}),"\n",(0,r.jsxs)(n.p,{children:["Copy the ",(0,r.jsx)(n.code,{children:"genesis.json"})," file to the ",(0,r.jsx)(n.code,{children:"IBFT-Network"})," directory."]}),"\n",(0,r.jsx)(n.h3,{id:"5-copy-the-node-private-keys-to-the-node-directories",children:"5. Copy the node private keys to the node directories"}),"\n",(0,r.jsxs)(n.p,{children:["For each node, copy the key files to the ",(0,r.jsx)(n.code,{children:"data"})," directory for that node"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"IBFT-Network/\n\u251c\u2500\u2500 genesis.json\n\u251c\u2500\u2500 Node-1\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key.pub\n\u251c\u2500\u2500 Node-2\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key.pub\n\u251c\u2500\u2500 Node-3\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key.pub\n\u251c\u2500\u2500 Node-4\n\u2502 \u251c\u2500\u2500 data\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key.pub\n"})}),"\n",(0,r.jsx)(n.h3,{id:"6-start-the-first-node-as-the-bootnode",children:"6. Start the first node as the bootnode"}),"\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.code,{children:"Node-1"})," directory, start Node-1:"]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(i.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT --host-allowlist="*" --rpc-http-cors-origins="all" --profile=ENTERPRISE\n'})})}),(0,r.jsx)(i.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT --host-allowlist="*" --rpc-http-cors-origins="all" --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:"The command line:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Specifies the data directory for Node-1 using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(n.code,{children:"--data-path"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["Enables the JSON-RPC API using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,r.jsx)(n.code,{children:"--rpc-http-enabled"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["Enables the ETH, NET, and IBFT APIs using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,r.jsx)(n.code,{children:"--rpc-http-api"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["Enables all-host access to the HTTP JSON-RPC API using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#host-allowlist",children:(0,r.jsx)(n.code,{children:"--host-allowlist"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["Enables all-domain access to the node through the HTTP JSON-RPC API using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-cors-origins",children:(0,r.jsx)(n.code,{children:"--rpc-http-cors-origins"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["Loads the ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/profile#enterpriseprivate-profile",children:"enterprise/private profile"}),"\nusing the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#profile",children:(0,r.jsx)(n.code,{children:"--profile"})})," option."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["When the node starts, the ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," displays. Copy the enode URL to specify Node-1 as the bootnode in the following steps."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Node 1 Enode URL",src:t(14739).A+"",width:"988",height:"126"})}),"\n",(0,r.jsx)(n.h3,{id:"7-start-node-2",children:"7. Start Node-2"}),"\n",(0,r.jsxs)(n.p,{children:["Start another terminal, change to the ",(0,r.jsx)(n.code,{children:"Node-2"})," directory and start Node-2 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:"]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(i.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --bootnodes= --p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8546 --profile=ENTERPRISE\n'})})}),(0,r.jsx)(i.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --bootnodes= --p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8546 --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:"The command line specifies:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["The data directory for Node-2 using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(n.code,{children:"--data-path"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["A different port to Node-1 for P2P discovery using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,r.jsx)(n.code,{children:"--p2p-port"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["A different port to Node-1 for HTTP JSON-RPC using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,r.jsx)(n.code,{children:"--rpc-http-port"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["The enode URL of Node-1 using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#bootnodes",children:(0,r.jsx)(n.code,{children:"--bootnodes"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["Other options as for ",(0,r.jsx)(n.a,{href:"#6-start-the-first-node-as-the-bootnode",children:"Node-1"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"8-start-node-3",children:"8. Start Node-3"}),"\n",(0,r.jsxs)(n.p,{children:["Start another terminal, change to the ",(0,r.jsx)(n.code,{children:"Node-3"})," directory and start Node-3 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:"]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(i.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --bootnodes= --p2p-port=30305 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8547 --profile=ENTERPRISE\n'})})}),(0,r.jsx)(i.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --bootnodes= --p2p-port=30305 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8547 --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:"The command line specifies:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["The data directory for Node-3 using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(n.code,{children:"--data-path"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["A different port to Node-1 and Node-2 for P2P discovery using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,r.jsx)(n.code,{children:"--p2p-port"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["A different port to Node-1 and Node-2 for HTTP JSON-RPC using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,r.jsx)(n.code,{children:"--rpc-http-port"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["The bootnode as for ",(0,r.jsx)(n.a,{href:"#7-start-node-2",children:"Node-2"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Other options as for ",(0,r.jsx)(n.a,{href:"#6-start-the-first-node-as-the-bootnode",children:"Node-1"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"9-start-node-4",children:"9. Start Node-4"}),"\n",(0,r.jsxs)(n.p,{children:["Start another terminal, change to the ",(0,r.jsx)(n.code,{children:"Node-4"})," directory and start Node-4 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:"]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(i.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --bootnodes= --p2p-port=30306 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8548 --profile=ENTERPRISE\n'})})}),(0,r.jsx)(i.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\genesis.json --bootnodes= --p2p-port=30306 --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8548 --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:"The command line specifies:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["The data directory for Node-4 using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(n.code,{children:"--data-path"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["A different port to Node-1, Node-2, and Node-3 for P2P discovery using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,r.jsx)(n.code,{children:"--p2p-port"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["A different port to Node-1, Node-2, and Node-3 for HTTP JSON-RPC using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,r.jsx)(n.code,{children:"--rpc-http-port"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["The bootnode as for ",(0,r.jsx)(n.a,{href:"#7-start-node-2",children:"Node-2"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Other options as for ",(0,r.jsx)(n.a,{href:"#6-start-the-first-node-as-the-bootnode",children:"Node-1"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"10-confirm-the-private-network-is-working",children:"10. Confirm the private network is working"}),"\n",(0,r.jsxs)(n.p,{children:["Start another terminal, use curl to call the JSON-RPC API ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#ibft_getvalidatorsbyblocknumber",children:(0,r.jsx)(n.code,{children:"ibft_getvalidatorsbyblocknumber"})})," method and confirm the network has four validators:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"ibft_getValidatorsByBlockNumber","params":["latest"], "id":1}\' localhost:8545\n'})}),"\n",(0,r.jsx)(n.p,{children:"The result displays the four validators:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "0x1e326b6da177ede2d3eb6d7247bd9f6901d40234",\n "0x4aaac297fefe4466ebcb0b23ab90c5f466b11556",\n "0xa267ead2e91e1673e0943b925176b51d9cd4f6d2",\n "0xe3e680bc0ff485d1d415a384721f19e0db65fea7"\n ]\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:"Look at the logs to confirm Besu is producing blocks:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"2020-12-21 07:22:17.883+10:00 | EthScheduler-Workers-0 | INFO | PersistBlockTask | Imported #1 / 0 tx / 0 om / 0 (0.0%) gas / (0xde088192f27ca376eea969cb7a4a1de445bd923fde0444194c88e630f7705584) in 0.010s. Peers: 4\n2020-12-21 07:22:19.057+10:00 | pool-8-thread-1 | INFO | IbftRound | Importing block to chain. round=ConsensusRoundIdentifier{Sequence=2, Round=0}, hash=0x2ca2652fa79ae2b3b6aadcfb13d5d362ffd6207c3b5ae47971e04eb9d05deaa9\n2020-12-21 07:22:21.044+10:00 | pool-8-thread-1 | INFO | IbftRound | Importing block to chain. round=ConsensusRoundIdentifier{Sequence=3, Round=0}, hash=0x5d9a06cd17127712cfae7d1c25f705f302e146f4b64a73de3c814e1b5a3f9a16\n2020-12-21 07:22:23.049+10:00 | pool-8-thread-1 | INFO | IbftRound | Importing block to chain. round=ConsensusRoundIdentifier{Sequence=4, Round=0}, hash=0x843981375f4cb2bb0f33a09b647ac27da5df2c539d940d8344c907eede57829c\n2020-12-21 07:22:25.060+10:00 | pool-8-thread-1 | INFO | IbftRound | Importing block to chain. round=ConsensusRoundIdentifier{Sequence=5, Round=0}, hash=0x82b2069961d9185f7857cad1123de72d715729e122441335db486ea436834d6e\n"})}),"\n",(0,r.jsxs)(n.admonition,{type:"info",children:[(0,r.jsxs)(n.p,{children:["If the key files were not copied to the correct directory in ",(0,r.jsx)(n.a,{href:"#5-copy-the-node-private-keys-to-the-node-directories",children:"step 5"}),", the network will not start producing blocks."]}),(0,r.jsxs)(n.p,{children:["The logs for each node should indicate the public key was loaded from the ",(0,r.jsx)(n.code,{children:"data/key"})," directory:"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"2020-12-21 07:16:18.360+10:00 | main | INFO | KeyPairUtil | Loaded public key 0xe143eadaf670d49afa3327cae2e655b083f5a89dac037c9af065914a9f8e6bceebcfe7ae2258bd22a9cd18b6a6de07b9790e71de49b78afa456e401bd2fb22fc from /IBFT-Network/Node-1/data/key\n"})}),(0,r.jsx)(n.p,{children:"If the keys were not copied to the correct directory, Besu creates a key when starting up:"}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"2020-12-21 07:33:11.458+10:00 | main | INFO | KeyPairUtil | Generated new public key 0x1a4a2ade5ebc0a85572e2492e0cdf3e96b8928c75fa55b4425de8849850cf9b3a8cad1e27d98a3d3afac326a5e8788dbe6cc40249715c92825aebb28abe3e346 and stored it to /IBFT-Network/Node-1/data/key\n"})}),(0,r.jsx)(n.p,{children:"If a new key was created, the validator key specified in the configuration does not match the created key and the node cannot participate in creating blocks."})]}),"\n",(0,r.jsx)(n.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#ibft-20-methods",children:"IBFT API"})," to remove or add validators."]}),"\n",(0,r.jsxs)(n.admonition,{type:"note",children:[(0,r.jsxs)(n.p,{children:["To add or remove nodes as validators you need the node address. The directory ",(0,r.jsx)(n.a,{href:"#3-generate-node-keys-and-a-genesis-file",children:"created for each node"})," has the node address as the name."]}),(0,r.jsx)(n.p,{children:"This tutorial configures a private network using IBFT 2.0 for educational purposes only. IBFT 2.0 requires four validators to be Byzantine fault tolerant."})]}),"\n",(0,r.jsxs)(n.p,{children:["Import accounts to MetaMask and send transactions as described in the ",(0,r.jsx)(n.a,{href:"/private-networks/tutorials/quickstart#create-a-transaction-using-metamask",children:"Quickstart tutorial"}),"."]}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:["Besu doesn't support ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/send-transactions",children:"private key management"}),"."]})}),"\n",(0,r.jsx)(n.h2,{id:"stop-the-nodes",children:"Stop the nodes"}),"\n",(0,r.jsx)(n.p,{children:"When finished using the private network, stop all nodes using ++ctrl+c++ in each terminal window."}),"\n",(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsxs)(n.p,{children:["To restart the IBFT 2.0 network in the future, start from ",(0,r.jsx)(n.a,{href:"#6-start-the-first-node-as-the-bootnode",children:"6. Start First Node as Bootnode"}),"."]})}),"\n",(0,r.jsx)(n.p,{children:"*[Byzantine fault tolerant]: Ability to function correctly and reach consensus despite nodes failing or propagating incorrect information to peers."})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var r=t(18215);const o={tabItem:"tabItem_Ymn6"};var s=t(74848);function i(e){let{children:n,hidden:t,className:i}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.A)(o.tabItem,i),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>v});var r=t(96540),o=t(18215),s=t(23104),i=t(56347),a=t(205),d=t(57485),c=t(31682),l=t(70679);function h(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:o}}=e;return{value:n,label:t,attributes:r,default:o}}))}(t);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function u(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:t}=e;const o=(0,i.W6)(),s=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,d.aZ)(s),(0,r.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(o.location.search);n.set(s,e),o.replace({...o.location,search:n.toString()})}),[s,o])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:o}=e,s=p(e),[i,d]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!u({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:s}))),[c,h]=f({queryString:t,groupId:o}),[b,x]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[o,s]=(0,l.Dv)(t);return[o,(0,r.useCallback)((e=>{t&&s.set(e)}),[t,s])]}({groupId:o}),g=(()=>{const e=c??b;return u({value:e,tabValues:s})?e:null})();(0,a.A)((()=>{g&&d(g)}),[g]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!u({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);d(e),h(e),x(e)}),[h,x,s]),tabValues:s}}var x=t(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=t(74848);function k(e){let{className:n,block:t,selectedValue:r,selectValue:i,tabValues:a}=e;const d=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.a_)(),l=e=>{const n=e.currentTarget,t=d.indexOf(n),o=a[t].value;o!==r&&(c(n),i(o))},h=e=>{let n=null;switch(e.key){case"Enter":l(e);break;case"ArrowRight":{const t=d.indexOf(e.currentTarget)+1;n=d[t]??d[0];break}case"ArrowLeft":{const t=d.indexOf(e.currentTarget)-1;n=d[t]??d[d.length-1];break}}n?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":t},n),children:a.map((e=>{let{value:n,label:t,attributes:s}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>d.push(e),onKeyDown:h,onClick:l,...s,className:(0,o.A)("tabs__item",g.tabItem,s?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function m(e){let{lazy:n,children:t,selectedValue:s}=e;const i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=i.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:(0,o.A)("margin-top--md",e.props.className)}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:i.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function y(e){const n=b(e);return(0,j.jsxs)("div",{className:(0,o.A)("tabs-container",g.tabList),children:[(0,j.jsx)(k,{...n,...e}),(0,j.jsx)(m,{...n,...e})]})}function v(e){const n=(0,x.A)();return(0,j.jsx)(y,{...e,children:h(e.children)},String(n))}},14739:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/EnodeStartup-145939e1c789c28e464db82faa0fb3ca.png"},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var r=t(96540);const o={},s=r.createContext(o);function i(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/43d83ec4.c39a0343.js b/assets/js/43d83ec4.c39a0343.js new file mode 100644 index 00000000000..0c08e68982e --- /dev/null +++ b/assets/js/43d83ec4.c39a0343.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4029],{95402:(t,e,n)=>{n.r(e),n.d(e,{assets:()=>c,contentTitle:()=>r,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>h});var s=n(74848),o=n(28453);const i={sidebar_position:4,title:"Use Ethstats network monitor",description:"Ethstats network monitor",tags:["private networks"]},r="Connect to Ethstats network monitor",a={id:"private-networks/how-to/deploy/ethstats",title:"Use Ethstats network monitor",description:"Ethstats network monitor",source:"@site/docs/private-networks/how-to/deploy/ethstats.md",sourceDirName:"private-networks/how-to/deploy",slug:"/private-networks/how-to/deploy/ethstats",permalink:"/private-networks/how-to/deploy/ethstats",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/deploy/ethstats.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{sidebar_position:4,title:"Use Ethstats network monitor",description:"Ethstats network monitor",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use Kubernetes",permalink:"/private-networks/how-to/deploy/kubernetes"},next:{title:"Backup and restore",permalink:"/private-networks/how-to/backup"}},c={},h=[{value:"Components",id:"components",level:2},{value:"Statistics",id:"statistics",level:2},{value:"Connect through a client and server",id:"connect-through-a-client-and-server",level:2},{value:"Connect through the command line",id:"connect-through-the-command-line",level:2}];function d(t){const e={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...t.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.header,{children:(0,s.jsx)(e.h1,{id:"connect-to-ethstats-network-monitor",children:"Connect to Ethstats network monitor"})}),"\n",(0,s.jsxs)(e.p,{children:["Connect to ",(0,s.jsx)(e.a,{href:"https://ethstats.dev",children:"Ethstats"})," to display real time and historical ",(0,s.jsx)(e.a,{href:"#statistics",children:"statistics"})," about the network and nodes. You can connect to the Ethstats dashboard by ",(0,s.jsx)(e.a,{href:"#connect-through-a-client-and-server",children:"connecting to a client and server"})," or by ",(0,s.jsx)(e.a,{href:"#connect-through-the-command-line",children:"connecting through the command line"}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"components",children:"Components"}),"\n",(0,s.jsx)(e.p,{children:"Ethstats consists of:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["A ",(0,s.jsx)(e.a,{href:"https://github.com/goerli/ethstats-server",children:"server"}),", which consumes node data received from the client."]}),"\n",(0,s.jsxs)(e.li,{children:["A ",(0,s.jsx)(e.a,{href:"https://github.com/goerli/ethstats-client",children:"client"}),", which extracts data from the node and sends it to the server."]}),"\n",(0,s.jsxs)(e.li,{children:["A ",(0,s.jsx)(e.a,{href:"https://github.com/goerli/ethstats-client#available-dashboards",children:"dashboard"}),", which displays statistics."]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"statistics",children:"Statistics"}),"\n",(0,s.jsx)(e.p,{children:"Statistics displayed by Ethstats include:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["Nodes in the network. Metrics for nodes include:","\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"Information about the last received block such as block number, block hash, transaction count, uncle count, block time, and propagation time."}),"\n",(0,s.jsx)(e.li,{children:"Connected peers, whether the node is mining, hash rate, latency, and uptime."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.li,{children:"Charts for block time, block difficulty, block gas limit, block uncles, block transactions, block gas used, block propagation histogram, and top miners."}),"\n",(0,s.jsx)(e.li,{children:"IP-based geolocation overview."}),"\n",(0,s.jsx)(e.li,{children:"Node logs, which display the data sent by a node."}),"\n",(0,s.jsx)(e.li,{children:"Block history, which provides the ability to go back in time and playback the block propagation through the nodes."}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"connect-through-a-client-and-server",children:"Connect through a client and server"}),"\n",(0,s.jsxs)(e.p,{children:["Refer to the external ",(0,s.jsx)(e.a,{href:"https://github.com/goerli/ethstats-client",children:"Ethstats client"})," and ",(0,s.jsx)(e.a,{href:"https://github.com/goerli/ethstats-server",children:"Ethstats server"})," documentation for installing those components and connecting to a dashboard."]}),"\n",(0,s.jsx)(e.h2,{id:"connect-through-the-command-line",children:"Connect through the command line"}),"\n",(0,s.jsxs)(e.p,{children:["You can use command line options to connect a node directly to a ",(0,s.jsx)(e.a,{href:"https://github.com/goerli/ethstats-client#available-dashboards",children:"dashboard"}),", without using a client."]}),"\n",(0,s.jsxs)(e.p,{children:["Start a node using the ",(0,s.jsx)(e.a,{href:"/public-networks/reference/cli/options#ethstats",children:(0,s.jsx)(e.code,{children:"--ethstats"})})," option to specify the Ethstats server URL. You can specify a contact email to send to the server using ",(0,s.jsx)(e.a,{href:"/public-networks/reference/cli/options#ethstats-contact",children:(0,s.jsx)(e.code,{children:"--ethstats-contact"})}),"."]}),"\n",(0,s.jsx)(e.pre,{children:(0,s.jsx)(e.code,{className:"language-bash",children:"besu --ethstats=Dev-Node-1:secret@127.0.0.1:3001 --ethstats-contact=contact@mail.com\n"})}),"\n",(0,s.jsx)(e.admonition,{type:"note",children:(0,s.jsxs)(e.p,{children:["A server must be specified by ",(0,s.jsx)(e.code,{children:"--ethstats"})," in order to use ",(0,s.jsx)(e.code,{children:"--ethstats-contact"}),"."]})}),"\n",(0,s.jsx)(e.p,{children:"Open the selected dashboard website. Find your node under the list of nodes to see the statistics for the node and the network."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"dashboard",src:n(14407).A+"",width:"2636",height:"1874"})})]})}function l(t={}){const{wrapper:e}={...(0,o.R)(),...t.components};return e?(0,s.jsx)(e,{...t,children:(0,s.jsx)(d,{...t})}):d(t)}},14407:(t,e,n)=>{n.d(e,{A:()=>s});const s=n.p+"assets/images/dashboard-62de99e929247a02f835d87c68166f76.png"},28453:(t,e,n)=>{n.d(e,{R:()=>r,x:()=>a});var s=n(96540);const o={},i=s.createContext(o);function r(t){const e=s.useContext(i);return s.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function a(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(o):t.components||o:r(t.components),s.createElement(i.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/46ff6f7b.6fc98e46.js b/assets/js/46ff6f7b.6fc98e46.js new file mode 100644 index 00000000000..e45f8359d58 --- /dev/null +++ b/assets/js/46ff6f7b.6fc98e46.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7738],{82557:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>l,frontMatter:()=>s,metadata:()=>c,toc:()=>a});var r=i(74848),t=i(28453);const s={title:"Configure mining",sidebar_position:1,description:"Using Besu for PoW CPU mining",tags:["public networks","private networks"]},o="Configure mining (Deprecated)",c={id:"public-networks/how-to/use-pow/mining",title:"Configure mining",description:"Using Besu for PoW CPU mining",source:"@site/docs/public-networks/how-to/use-pow/mining.md",sourceDirName:"public-networks/how-to/use-pow",slug:"/public-networks/how-to/use-pow/mining",permalink:"/public-networks/how-to/use-pow/mining",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/use-pow/mining.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Configure mining",sidebar_position:1,description:"Using Besu for PoW CPU mining",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Use client libraries",permalink:"/public-networks/how-to/develop/client-libraries"},next:{title:"Upgrade Besu",permalink:"/public-networks/how-to/upgrade-node"}},d={},a=[{value:"Configure CPU mining",id:"configure-cpu-mining",level:2},{value:"Configure GPU mining",id:"configure-gpu-mining",level:2},{value:"Mining APIs",id:"mining-apis",level:2},{value:"Troubleshoot",id:"troubleshoot",level:2},{value:"Check block creation",id:"check-block-creation",level:3},{value:"No mined transactions",id:"no-mined-transactions",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"configure-mining-deprecated",children:"Configure mining (Deprecated)"})}),"\n",(0,r.jsx)(n.admonition,{type:"caution",children:(0,r.jsxs)(n.p,{children:["PoW consensus is deprecated in Besu version 24.11.0 and later. Please read this ",(0,r.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,r.jsx)(n.p,{children:"Besu supports CPU and GPU mining, which are configured using command line options."}),"\n",(0,r.jsxs)(n.p,{children:["GPU mining tests used ",(0,r.jsx)(n.a,{href:"https://github.com/ethereum-mining/ethminer",children:"Ethminer"})," with the ",(0,r.jsx)(n.code,{children:"stratum+tcp"})," and ",(0,r.jsx)(n.code,{children:"getwork"})," schemes."]}),"\n",(0,r.jsx)(n.p,{children:"Ethminer has been used with Besu to mine blocks on the Ropsten testnet, ETC Mainnet (uncle block only) and Mordor ETC testnet."}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Some mining software supports the ",(0,r.jsx)(n.code,{children:"getwork"})," scheme as the ",(0,r.jsx)(n.code,{children:"http"})," scheme."]}),"\n",(0,r.jsx)(n.li,{children:"The Ropsten testnet is now deprecated. It transitioned to proof of stake consensus before deprecation."}),"\n"]})}),"\n",(0,r.jsx)(n.h2,{id:"configure-cpu-mining",children:"Configure CPU mining"}),"\n",(0,r.jsx)(n.p,{children:"To enable CPU mining, start Besu with the following options:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"besu --rpc-http-api=ETH,MINER --miner-enabled --miner-coinbase=\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Where ",(0,r.jsx)(n.code,{children:""})," is the account you pay mining rewards to. For example, ",(0,r.jsx)(n.code,{children:"fe3b557e8fb62b89f4916b721be55ceb828dbd73"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Start and stop mining using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#miner_start-deprecated",children:(0,r.jsx)(n.code,{children:"miner_start"})})," and ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#miner_stop-deprecated",children:(0,r.jsx)(n.code,{children:"miner_stop"})})," APIs."]}),"\n",(0,r.jsx)(n.h2,{id:"configure-gpu-mining",children:"Configure GPU mining"}),"\n",(0,r.jsxs)(n.p,{children:["Besu supports GPU mining, tested using ",(0,r.jsx)(n.a,{href:"https://github.com/ethereum-mining/ethminer",children:"Ethminer"})," with the ",(0,r.jsx)(n.code,{children:"stratum+tcp"})," scheme."]}),"\n",(0,r.jsx)(n.p,{children:"To enable GPU mining, start Besu with the following options:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"besu --rpc-http-api=ETH,MINER --miner-enabled --miner-stratum-enabled --miner-coinbase=\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Where ",(0,r.jsx)(n.code,{children:""})," is the account you pay mining rewards to. For example, ",(0,r.jsx)(n.code,{children:"fe3b557e8fb62b89f4916b721be55ceb828dbd73"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"Optional command line options are:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#miner-stratum-host-deprecated",children:(0,r.jsx)(n.code,{children:"--miner-stratum-host"})})," to specify the host of the mining service."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#miner-stratum-port-deprecated",children:(0,r.jsx)(n.code,{children:"--miner-stratum-port"})})," to specify the port of the mining service."]}),"\n"]}),"\n",(0,r.jsxs)(n.admonition,{type:"note",children:[(0,r.jsxs)(n.p,{children:["Besu also supports the ",(0,r.jsx)(n.code,{children:"getwork"})," scheme. Use the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#miner-stratum-enabled-deprecated",children:(0,r.jsx)(n.code,{children:"--miner-stratum-enabled"})})," option and ",(0,r.jsxs)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:["enable the ",(0,r.jsx)(n.code,{children:"ETH"})," RPCs"]}),"."]}),(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"getwork"})," scheme is supported as the ",(0,r.jsx)(n.code,{children:"http"})," scheme in certain mining software."]})]}),"\n",(0,r.jsxs)(n.p,{children:["Start and stop mining using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#miner_start-deprecated",children:(0,r.jsx)(n.code,{children:"miner_start"})})," and ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#miner_stop-deprecated",children:(0,r.jsx)(n.code,{children:"miner_stop"})})," APIs."]}),"\n",(0,r.jsx)(n.h2,{id:"mining-apis",children:"Mining APIs"}),"\n",(0,r.jsx)(n.p,{children:"The JSON-RPC API methods for mining are:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#miner_start-deprecated",children:(0,r.jsx)(n.code,{children:"miner_start"})})," to start mining."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#miner_stop-deprecated",children:(0,r.jsx)(n.code,{children:"miner_stop"})})," to stop mining."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_mining-deprecated",children:(0,r.jsx)(n.code,{children:"eth_mining"})})," to determine whether the client is actively mining new blocks."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getminerdatabyblockhash-deprecated",children:(0,r.jsx)(n.code,{children:"eth_getMinerDataByBlockHash"})})," and ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getminerdatabyblocknumber",children:(0,r.jsx)(n.code,{children:"eth_getMinerDataByBlockNumber"})})," to get the miner data for a specified block."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_hashrate-deprecated",children:(0,r.jsx)(n.code,{children:"eth_hashrate"})})," to get the number of hashes per second with which the node is mining. Not supported for GPU mining."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getwork-deprecated",children:(0,r.jsx)(n.code,{children:"eth_getWork"})})," to get the hash of the current block, the seed hash, and the target boundary condition. Only used when using the ",(0,r.jsx)(n.code,{children:"getwork"})," scheme."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_submitwork-deprecated",children:(0,r.jsx)(n.code,{children:"eth_submitWork"})})," to submit the PoW solution. Only used when using the ",(0,r.jsx)(n.code,{children:"getwork"})," scheme."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"troubleshoot",children:"Troubleshoot"}),"\n",(0,r.jsx)(n.h3,{id:"check-block-creation",children:"Check block creation"}),"\n",(0,r.jsx)(n.p,{children:"On mining nodes, log messages indicate block creation."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"2019-05-08 20:28:27.026+10:00 | pool-10-thread-1 | INFO | IbftRound | Importing block to chain. round=ConsensusRoundIdentifier{Sequence=660, Round=0}, hash=0x759afaba4e923d89175d850ceca4b8ef81f7d9c727b0b0b8e714b624a4b8e8cc\n2019-05-08 20:28:29.020+10:00 | pool-10-thread-1 | INFO | IbftRound | Importing block to chain. round=ConsensusRoundIdentifier{Sequence=661, Round=0}, hash=0x5443e504256765f06b3cebfbee82276a034ebcc8d685b7c3d1a6010fd4acfa14\n"})}),"\n",(0,r.jsx)(n.p,{children:"On non-mining nodes, log messages indicate importing blocks."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"2019-05-08 20:28:29.026+10:00 | EthScheduler-Workers-1 | INFO | BlockPropagationManager | Imported #661 / 0 tx / 0 om / 0 (0.0%) gas / (0x5443e504256765f06b3cebfbee82276a034ebcc8d685b7c3d1a6010fd4acfa14) in 0.000s.\n2019-05-08 20:28:31.031+10:00 | EthScheduler-Workers-0 | INFO | BlockPropagationManager | Imported #662 / 0 tx / 0 om / 0 (0.0%) gas / (0x0ead4e20123d3f1433d8dec894fcce386da4049819b24b309963ce7a8a0fcf03) in 0.000s.\n"})}),"\n",(0,r.jsxs)(n.p,{children:["To confirm the block number is increasing, use the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_blocknumber",children:(0,r.jsx)(n.code,{children:"eth_blockNumber"})})," JSON-RPC API method."]}),"\n",(0,r.jsxs)(n.p,{children:["If there's no block creation in ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/clique#extra-data",children:"Clique"})," or ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft#extra-data",children:"IBFT 2.0"})," networks, ensure the validator addresses in the genesis file match running nodes."]}),"\n",(0,r.jsx)(n.h3,{id:"no-mined-transactions",children:"No mined transactions"}),"\n",(0,r.jsxs)(n.p,{children:["If you add a transaction to the ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool",children:"transaction pool"})," and the transaction hash returns, but the transaction is never mined, check the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#min-gas-price",children:(0,r.jsx)(n.code,{children:"--min-gas-price"})})," option on mining nodes. If the ",(0,r.jsx)(n.code,{children:"gasPrice"})," on a ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/send-transactions",children:"transaction"})," is lower than the ",(0,r.jsx)(n.code,{children:"min-gas-price"})," for the mining node, the transaction will never mine."]}),"\n",(0,r.jsxs)(n.p,{children:["In ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/free-gas",children:"free gas networks"}),", you must set ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#min-gas-price",children:(0,r.jsx)(n.code,{children:"--min-gas-price"})})," to zero."]})]})}function l(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>o,x:()=>c});var r=i(96540);const t={},s=r.createContext(t);function o(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4a41aaaf.0089b810.js b/assets/js/4a41aaaf.0089b810.js new file mode 100644 index 00000000000..53fbf9d12b5 --- /dev/null +++ b/assets/js/4a41aaaf.0089b810.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6436],{59043:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>c,default:()=>h,frontMatter:()=>r,metadata:()=>o,toc:()=>d});var s=t(74848),a=t(28453);const r={title:"Deploy a smart contract",sidebar_position:1,description:"deploying smart contracts",tags:["private networks"]},c="Deploy smart contracts to an Ethereum chain",o={id:"private-networks/tutorials/contracts/index",title:"Deploy a smart contract",description:"deploying smart contracts",source:"@site/docs/private-networks/tutorials/contracts/index.md",sourceDirName:"private-networks/tutorials/contracts",slug:"/private-networks/tutorials/contracts/",permalink:"/private-networks/tutorials/contracts/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/contracts/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Deploy a smart contract",sidebar_position:1,description:"deploying smart contracts",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Create a permissioned network",permalink:"/private-networks/tutorials/permissioning/"},next:{title:"Transfer account funds",permalink:"/private-networks/tutorials/contracts/transfer-funds"}},i={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Use eth_sendSignedTransaction",id:"use-eth_sendsignedtransaction",level:2},{value:"Use eth_sendTransaction",id:"use-eth_sendtransaction",level:2},{value:"Use eea_sendRawTransaction for private contracts with web3js-quorum",id:"use-eea_sendrawtransaction-for-private-contracts-with-web3js-quorum",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"deploy-smart-contracts-to-an-ethereum-chain",children:"Deploy smart contracts to an Ethereum chain"})}),"\n",(0,s.jsx)(n.p,{children:"This tutorial shows you how to deploy smart contracts as transactions to a network."}),"\n",(0,s.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.p,{children:["This tutorial requires a local blockchain network. You can use the ",(0,s.jsx)(n.a,{href:"/private-networks/tutorials/quickstart",children:"Developer Quickstart"})," to rapidly generate one. If deploying a private contract, enable privacy on the network (public contracts can also be deployed on privacy-enabled networks)."]}),"\n",(0,s.jsxs)(n.h2,{id:"use-eth_sendsignedtransaction",children:["Use ",(0,s.jsx)(n.code,{children:"eth_sendSignedTransaction"})]}),"\n",(0,s.jsxs)(n.p,{children:["To deploy a smart contract using ",(0,s.jsx)(n.a,{href:"https://web3js.readthedocs.io/en/v1.2.0/web3-eth.html#sendsignedtransaction",children:(0,s.jsx)(n.code,{children:"eth_sendSignedTransaction"})}),", use an account's private key to sign and serialize the transaction, and send the API request."]}),"\n",(0,s.jsxs)(n.p,{children:["This example uses the ",(0,s.jsx)(n.a,{href:"https://www.npmjs.com/package/web3",children:"web3js"})," library to make the API calls."]}),"\n",(0,s.jsxs)(n.p,{children:["Using the ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart/blob/1e8cc281098923802845cd829ec20c88513c2e1c/files/common/smart_contracts/privacy/contracts/SimpleStorage.sol",children:(0,s.jsx)(n.code,{children:"SimpleStorage.sol"})})," smart contract as an example, create a new file called ",(0,s.jsx)(n.code,{children:"compile.js"})," with the following content:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'title="compile.js"',children:'const fs = require("fs").promises;\nconst solc = require("solc");\n\nasync function main() {\n // Load the contract source code\n const sourceCode = await fs.readFile("SimpleStorage.sol", "utf8");\n // Compile the source code and retrieve the ABI and bytecode\n const { abi, bytecode } = compile(sourceCode, "SimpleStorage");\n // Store the ABI and bytecode into a JSON file\n const artifact = JSON.stringify({ abi, bytecode }, null, 2);\n await fs.writeFile("SimpleStorage.json", artifact);\n}\n\nfunction compile(sourceCode, contractName) {\n // Create the Solidity Compiler Standard Input and Output JSON\n const input = {\n language: "Solidity",\n sources: { main: { content: sourceCode } },\n settings: { outputSelection: { "*": { "*": ["abi", "evm.bytecode"] } } },\n };\n // Parse the compiler output to retrieve the ABI and bytecode\n const output = solc.compile(JSON.stringify(input));\n const artifact = JSON.parse(output).contracts.main[contractName];\n return {\n abi: artifact.abi,\n bytecode: artifact.evm.bytecode.object,\n };\n}\n\nmain().then(() => process.exit(0));\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Run ",(0,s.jsx)(n.code,{children:"compile.js"})," to get the smart contract's output JSON:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"node compile.js\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Run ",(0,s.jsx)(n.code,{children:"solc"})," to get the contract's bytecode and ABI:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"solc SimpleStorage.sol --bin --abi\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Once you have the bytecode and ABI, you can rename the output files to make them easier to use; this tutorial refers to them as ",(0,s.jsx)(n.code,{children:"SimpleStorage.bin"})," and ",(0,s.jsx)(n.code,{children:"SimpleStorage.abi"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Create a new file named ",(0,s.jsx)(n.code,{children:"public_tx.js"})," to send the transaction (or run the following commands in a JavaScript console). The Developer Quickstart provides an ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart/blob/1e8cc281098923802845cd829ec20c88513c2e1c/files/besu/smart_contracts/privacy/scripts/public_tx.js",children:"example of a public transaction script"}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:'titl="public_tx.js"',children:'const web3 = new Web3(host);\n// use an existing account, or make an account\nconst privateKey =\n "0x8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63";\nconst account = web3.eth.accounts.privateKeyToAccount(privateKey);\n\n// read in the contracts\nconst contractJsonPath = path.resolve(__dirname, "SimpleStorage.json");\nconst contractJson = JSON.parse(fs.readFileSync(contractJsonPath));\nconst contractAbi = contractJson.abi;\nconst contractBinPath = path.resolve(__dirname, "SimpleStorage.bin");\nconst contractBin = fs.readFileSync(contractBinPath);\n// initialize the default constructor with a value `47 = 0x2F`; this value is appended to the bytecode\nconst contractConstructorInit =\n "000000000000000000000000000000000000000000000000000000000000002F";\n\n// get txnCount for the nonce value\nconst txnCount = await web3.eth.getTransactionCount(account.address);\n\nconst rawTxOptions = {\n nonce: web3.utils.numberToHex(txnCount),\n from: account.address,\n to: null, //public tx\n value: "0x00",\n data: "0x" + contractBin + contractConstructorInit, // contract binary appended with initialization value\n gasPrice: "0x0", //ETH per unit of gas\n gasLimit: "0x24A22", //max number of gas units the tx is allowed to use\n};\nconsole.log("Creating transaction...");\nconst tx = new Tx(rawTxOptions);\nconsole.log("Signing transaction...");\ntx.sign(privateKey);\nconsole.log("Sending transaction...");\nvar serializedTx = tx.serialize();\nconst pTx = await web3.eth.sendSignedTransaction(\n "0x" + serializedTx.toString("hex").toString("hex"),\n);\nconsole.log("tx transactionHash: " + pTx.transactionHash);\nconsole.log("tx contractAddress: " + pTx.contractAddress);\n'})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"rawTxOptions"})," contains the following fields:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"nonce"})," - the number of transactions sent from an address."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"from"})," - address of the sending account. For example ",(0,s.jsx)(n.code,{children:"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"to"})," - address of the receiver. To deploy a contract, set to ",(0,s.jsx)(n.code,{children:"null"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"gas"})," - amount of gas provided by the sender for the transaction."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"gasPrice"})," - price for each unit of gas the sender is willing to pay."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"data"})," - binary of the contract (in this example there's also a constructor initialization value, so we append that to the binary value)."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"value"})," - amount of Ether/Wei transferred from the sender to the recipient."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Run the ",(0,s.jsx)(n.code,{children:"public_tx.js"})," to send the transaction:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"node public_tx.js\n"})}),"\n",(0,s.jsxs)(n.p,{children:["This example code creates the transaction ",(0,s.jsx)(n.code,{children:"tx"}),", signs it with the private key of the account, serializes it, then calls ",(0,s.jsx)(n.code,{children:"eth_sendSignedTransaction"})," to deploy the contract."]}),"\n",(0,s.jsxs)(n.h2,{id:"use-eth_sendtransaction",children:["Use ",(0,s.jsx)(n.code,{children:"eth_sendTransaction"})]}),"\n",(0,s.jsxs)(n.p,{children:["You can use ",(0,s.jsx)(n.a,{href:"https://ethereum.github.io/execution-apis/api-documentation",children:(0,s.jsx)(n.code,{children:"eth_sendTransaction"})})," as an alternative to ",(0,s.jsx)(n.code,{children:"eth_sendSignedTransaction"}),". However, Besu does not support the ",(0,s.jsx)(n.code,{children:"eth_sendTransaction"})," API call and keeps account management separate for stronger security. Configure ",(0,s.jsx)(n.a,{href:"https://docs.web3signer.consensys.net/",children:"Web3Signer"})," with your Besu node to make the ",(0,s.jsx)(n.code,{children:"eth_sendTransaction"})," API call."]}),"\n",(0,s.jsxs)(n.p,{children:["Pass the following parameters to the ",(0,s.jsx)(n.a,{href:"https://docs.web3signer.consensys.net/reference/api/json-rpc#eth_sendtransaction",children:(0,s.jsx)(n.code,{children:"eth_sendTransaction"})})," call to Web3Signer. Web3Signer converts the request to an ",(0,s.jsx)(n.a,{href:"/public-networks/reference/api/#eth_sendrawtransaction",children:(0,s.jsx)(n.code,{children:"eth_sendRawTransaction"})})," call that Besu uses:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"to"})," - address of the receiver. To deploy a contract, set to ",(0,s.jsx)(n.code,{children:"null"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"from"})," - address of the sender account. For example ",(0,s.jsx)(n.code,{children:"0x9b790656b9ec0db1936ed84b3bea605873558198"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"gas"})," - amount of gas provided by the sender for the transaction"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"gasPrice"})," - price for each unit of gas the sender is willing to pay"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"data"})," - one of the following:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"For contract deployments (this use case) - compiled code of the contract"}),"\n",(0,s.jsxs)(n.li,{children:["For contract interactions - hash of the invoked method signature and encoded parameters (see ",(0,s.jsx)(n.a,{href:"https://solidity.readthedocs.io/en/develop/abi-spec.html",children:"Ethereum Contract ABI"}),")"]}),"\n",(0,s.jsx)(n.li,{children:"For simple ether transfers - empty"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",metastring:"title=\"'eth_sendTransaction' parameters\"",children:'params: {\n "to": null,\n "from": "0x9b790656b9ec0db1936ed84b3bea605873558198",\n "gas": "0x76c0",\n "gasPrice": "0x9184e72a000",\n "data": "0x608060405234801561001057600080fd5b5060405161014d38038061014d8339818101604052602081101561003357600080fd5b8101908080519060200190929190505050806000819055505060f38061005a6000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80632a1afcd914604157806360fe47b114605d5780636d4ce63c146088575b600080fd5b604760a4565b6040518082815260200191505060405180910390f35b608660048036036020811015607157600080fd5b810190808035906020019092919050505060aa565b005b608e60b4565b6040518082815260200191505060405180910390f35b60005481565b8060008190555050565b6000805490509056fea2646970667358221220e6966e446bd0af8e6af40eb0d8f323dd02f771ba1f11ae05c65d1624ffb3c58264736f6c63430007060033"\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Make the request using ",(0,s.jsx)(n.code,{children:"eth_sendTransaction"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:"title=\"'eth_sendTransaction' curl HTTP request\"",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from":"0x9b790656b9ec0db1936ed84b3bea605873558198", "to":null, "gas":"0x7600","gasPrice":"0x9184e72a000", "data":"0x608060405234801561001057600080fd5b5060405161014d38038061014d8339818101604052602081101561003357600080fd5b8101908080519060200190929190505050806000819055505060f38061005a6000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80632a1afcd914604157806360fe47b114605d5780636d4ce63c146088575b600080fd5b604760a4565b6040518082815260200191505060405180910390f35b608660048036036020811015607157600080fd5b810190808035906020019092919050505060aa565b005b608e60b4565b6040518082815260200191505060405180910390f35b60005481565b8060008190555050565b6000805490509056fea2646970667358221220e6966e446bd0af8e6af40eb0d8f323dd02f771ba1f11ae05c65d1624ffb3c58264736f6c63430007060033"}], "id":1}\' \n'})}),"\n",(0,s.jsxs)(n.h2,{id:"use-eea_sendrawtransaction-for-private-contracts-with-web3js-quorum",children:["Use ",(0,s.jsx)(n.code,{children:"eea_sendRawTransaction"})," for private contracts with web3js-quorum"]}),"\n",(0,s.jsxs)(n.p,{children:["To deploy a private contract to another node or ",(0,s.jsx)(n.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"privacy group"})," member, use the ",(0,s.jsx)(n.a,{href:"https://www.npmjs.com/package/web3js-quorum",children:"web3js-quorum"})," library and the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/api/#eea_sendrawtransaction",children:(0,s.jsx)(n.code,{children:"eea_sendRawTransaction"})})," API call. You must use this API call instead of ",(0,s.jsx)(n.a,{href:"https://ethereum.github.io/execution-apis/api-documentation",children:(0,s.jsx)(n.code,{children:"eth_sendTransaction"})})," because Besu keeps account management separate for stronger security."]}),"\n",(0,s.jsxs)(n.p,{children:["The Developer Quickstart provides an ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart/blob/1e8cc281098923802845cd829ec20c88513c2e1c/files/besu/smart_contracts/privacy/scripts/private_tx.js",children:"example of a private transaction script"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["This example uses the ",(0,s.jsx)(n.a,{href:"https://www.npmjs.com/package/web3",children:"web3js"})," library to make the API calls."]}),"\n",(0,s.jsxs)(n.p,{children:["Use ",(0,s.jsx)(n.a,{href:"https://consensys.github.io/web3js-quorum/latest/module-priv.html#~generateAndSendRawTransaction",children:(0,s.jsx)(n.code,{children:"web3.priv.generateAndSendRawTransaction"})})," by running the following commands in a JavaScript console, or by including them in a ",(0,s.jsx)(n.code,{children:"private_tx.js"})," file and running ",(0,s.jsx)(n.code,{children:"node private_tx.js"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-js",metastring:"title=\"'private_tx.js' using 'web3.priv.generateAndSendRawTransaction'\"",children:'const Web3 = require("web3");\nconst Web3Quorum = require("web3js-quorum");\n\nconst bytecode =\n "608060405234801561001057600080fd5b5060405161014d38038061014d8339818101604052602081101561003357600080fd5b8101908080519060200190929190505050806000819055505060f38061005a6000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c80632a1afcd914604157806360fe47b114605d5780636d4ce63c146088575b600080fd5b604760a4565b6040518082815260200191505060405180910390f35b608660048036036020811015607157600080fd5b810190808035906020019092919050505060aa565b005b608e60b4565b6040518082815260200191505060405180910390f35b60005481565b8060008190555050565b6000805490509056fea2646970667358221220e6966e446bd0af8e6af40eb0d8f323dd02f771ba1f11ae05c65d1624ffb3c58264736f6c63430007060033";\n// initialize the default constructor with a value `47 = 0x2F`; this value is appended to the bytecode\nconst contractConstructorInit =\n "000000000000000000000000000000000000000000000000000000000000002F";\n\nconst chainId = 1337;\nconst web3 = new Web3(clientUrl);\nconst web3quorum = new Web3Quorum(web3, chainId);\n\nconst txOptions = {\n data: "0x" + bytecode + contractConstructorInit,\n privateKey: fromPrivateKey,\n privateFrom: fromPublicKey,\n privateFor: [toPublicKey],\n};\nconsole.log("Creating contract...");\nconst txHash = await web3quorum.priv.generateAndSendRawTransaction(txOptions);\nconsole.log("Getting contractAddress from txHash: ", txHash);\n\nconst privateTxReceipt = await web3quorum.priv.waitForTransactionReceipt(\n txHash,\n);\nconsole.log("Private Transaction Receipt: ", privateTxReceipt);\nreturn privateTxReceipt;\n'})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"txOptions"})," contains the following field:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"data"})," - compiled code of the contract (in this example there's also a constructor initialization value, so we append that to the bytecode)."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["The deployment process includes creating the client as in the previous examples, but rather than deploying the contract with ",(0,s.jsx)(n.code,{children:"to: null"}),", it instead sends the transaction with ",(0,s.jsx)(n.code,{children:"privateFor: [memberPublicKey/s]"}),". Once you make the API call, you receive a ",(0,s.jsx)(n.code,{children:"transactionHash"}),", which you can use to get a ",(0,s.jsx)(n.code,{children:"transactionReceipt"})," containing the contract's address."]}),"\n",(0,s.jsxs)(n.admonition,{type:"note",children:[(0,s.jsx)(n.p,{children:"This example doesn't use a privacy group and makes a simple node-to-node transaction. To use a privacy group:"}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Create the privacy group using the public keys of the nodes in the group."}),"\n",(0,s.jsxs)(n.li,{children:["Specify the ",(0,s.jsx)(n.code,{children:"privacyGroupId"})," instead of the ",(0,s.jsx)(n.code,{children:"privateFor"})," option in the txOptions above and then send the transaction."]}),"\n"]}),(0,s.jsxs)(n.p,{children:["The Developer Quickstart provides an ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart/blob/b72a0f64d685c851bf8be399a8e33bbdf0e09982/files/besu/smart_contracts/privacy/scripts/private_tx_privacy_group.js",children:"example of a private transaction with a privacy group"}),"."]})]})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>o});var s=t(96540);const a={},r=s.createContext(a);function c(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:c(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4ba08559.c8916a1d.js b/assets/js/4ba08559.c8916a1d.js new file mode 100644 index 00000000000..5f3ffe7ba15 --- /dev/null +++ b/assets/js/4ba08559.c8916a1d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6410],{74060:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>b,frontMatter:()=>t,metadata:()=>l,toc:()=>u});var r=s(74848),i=s(28453),c=s(11470),a=s(19365);const t={title:"Use RPC Pub/Sub over WS",sidebar_position:2,description:"Using RPC Pub/Sub with Besu WebSockets",tags:["public networks","private networks"]},o="Use RPC Pub/Sub over WebSockets",l={id:"public-networks/how-to/use-besu-api/rpc-pubsub",title:"Use RPC Pub/Sub over WS",description:"Using RPC Pub/Sub with Besu WebSockets",source:"@site/docs/public-networks/how-to/use-besu-api/rpc-pubsub.md",sourceDirName:"public-networks/how-to/use-besu-api",slug:"/public-networks/how-to/use-besu-api/rpc-pubsub",permalink:"/public-networks/how-to/use-besu-api/rpc-pubsub",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/use-besu-api/rpc-pubsub.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Use RPC Pub/Sub over WS",sidebar_position:2,description:"Using RPC Pub/Sub with Besu WebSockets",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Use JSON-RPC over HTTP, WS, and IPC",permalink:"/public-networks/how-to/use-besu-api/json-rpc"},next:{title:"Use GraphQL over HTTP",permalink:"/public-networks/how-to/use-besu-api/graphql"}},d={},u=[{value:"Introduction",id:"introduction",level:2},{value:"Use RPC Pub/Sub",id:"use-rpc-pubsub",level:3},{value:"Subscription ID",id:"subscription-id",level:3},{value:"Notifications when synchronizing",id:"notifications-when-synchronizing",level:3},{value:"Subscribe",id:"subscribe",level:2},{value:"New headers",id:"new-headers",level:3},{value:"Logs",id:"logs",level:3},{value:"Pending transactions",id:"pending-transactions",level:3},{value:"Dropped transactions",id:"dropped-transactions",level:3},{value:"Synchronizing",id:"synchronizing",level:3},{value:"Unsubscribe",id:"unsubscribe",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"use-rpc-pubsub-over-websockets",children:"Use RPC Pub/Sub over WebSockets"})}),"\n",(0,r.jsx)(n.h2,{id:"introduction",children:"Introduction"}),"\n",(0,r.jsxs)(n.p,{children:["Subscribe to events by using either RPC Pub/Sub over WebSockets or ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/access-logs",children:"filters over HTTP"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"Use RPC Pub/Sub over WebSockets to wait for events instead of polling for them. For example, dapps subscribe to logs and receive notifications when a specific event occurs."}),"\n",(0,r.jsx)(n.p,{children:"Methods specific to RPC Pub/Sub are:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"eth_subscribe"})," and ",(0,r.jsx)(n.code,{children:"eth_unsubscribe"})," - create or cancel a subscription for specific events."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"priv_subscribe"})," and ",(0,r.jsx)(n.code,{children:"priv_unsubscribe"})," - create or cancel a subscription for ",(0,r.jsx)(n.a,{href:"/private-networks/concepts/privacy/",children:"private logs"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:["Unlike other ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/",children:"Besu API methods"}),", you cannot call the RPC Pub/Sub methods over HTTP. Use the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-enabled",children:(0,r.jsx)(n.code,{children:"--rpc-ws-enabled"})})," option to enable the WebSockets JSON-RPC service."]})}),"\n",(0,r.jsx)(n.h3,{id:"use-rpc-pubsub",children:"Use RPC Pub/Sub"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#http-and-websocket-requests",children:"WebSockets"})," supports the RPC Pub/Sub API."]}),"\n",(0,r.jsxs)(n.p,{children:["To create subscriptions, use ",(0,r.jsx)(n.code,{children:"eth_subscribe"})," or ",(0,r.jsx)(n.code,{children:"priv_subscribe"}),". Once subscribed, the API publishes notifications using ",(0,r.jsx)(n.code,{children:"eth_subscription"})," or ",(0,r.jsx)(n.code,{children:"priv_subscription"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"Subscriptions couple with connections. If a connection is closed, all subscriptions created over the connection are removed."}),"\n",(0,r.jsx)(n.h3,{id:"subscription-id",children:"Subscription ID"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"eth_subscribe"})," and ",(0,r.jsx)(n.code,{children:"priv_subscribe"})," return a subscription ID for each subscription created. Notifications include the subscription ID."]}),"\n",(0,r.jsx)(n.p,{children:"For example, to create a synchronizing subscription:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ "id": 1, "method": "eth_subscribe", "params": ["syncing"] }\n'})}),"\n",(0,r.jsxs)(n.p,{children:["The result includes the subscription ID of ",(0,r.jsx)(n.code,{children:'"0x1"'}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "id": 1, "result": "0x1" }\n'})}),"\n",(0,r.jsxs)(n.p,{children:["The notifications also include the subscription ID of ",(0,r.jsx)(n.code,{children:'"0x1"'}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_subscription",\n "params": {\n "subscription": "0x1",\n "result": {\n "startingBlock": "0x0",\n "currentBlock": "0x50",\n "highestBlock": "0x343c19"\n }\n }\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"notifications-when-synchronizing",children:"Notifications when synchronizing"}),"\n",(0,r.jsx)(n.p,{children:"Subscribing to some events (for example, logs) can cause a flood of notifications while the node is synchronizing."}),"\n",(0,r.jsx)(n.h2,{id:"subscribe",children:"Subscribe"}),"\n",(0,r.jsxs)(n.p,{children:["Use ",(0,r.jsx)(n.code,{children:"eth_subscribe"})," to create subscriptions for the following event types:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#new-headers",children:"New headers"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#logs",children:"Logs"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#pending-transactions",children:"Pending transactions"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#dropped-transactions",children:"Dropped transactions"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"#synchronizing",children:"Synchronizing"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Use ",(0,r.jsx)(n.code,{children:"priv_subscribe"})," to ",(0,r.jsx)(n.a,{href:"#logs",children:"create subscriptions for logs on private contracts"}),"."]}),"\n",(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsx)(n.p,{children:"Only logs subscriptions are relevant for private transactions because private transactions are anchored to the public chain rather than having their own private blockchain."})}),"\n",(0,r.jsx)(n.h3,{id:"new-headers",children:"New headers"}),"\n",(0,r.jsxs)(n.p,{children:["To notify you about each block added to the blockchain, use the ",(0,r.jsx)(n.code,{children:"newHeads"})," parameter with ",(0,r.jsx)(n.code,{children:"eth_subscribe"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"If a chain reorganization occurs, the subscription publishes notifications for blocks in the new chain. This means the subscription can publish notifications for multiple blocks at the same height on the blockchain."}),"\n",(0,r.jsxs)(n.p,{children:["The new headers notification returns ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/objects#block-object",children:"block objects"}),". The second parameter is optional. If specified, the notifications include whole ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-object",children:"transaction objects"}),", Otherwise, the notifications include transaction hashes."]}),"\n",(0,r.jsx)(n.p,{children:"To subscribe to new header notifications:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "id": 1,\n "method": "eth_subscribe",\n "params": ["newHeads", { "includeTransactions": true }]\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:"Example result:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "id": 2, "result": "0x1" }\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Example notification without the ",(0,r.jsx)(n.code,{children:'{"includeTransactions": true}'})," parameter included:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_subscription",\n "params": {\n "subscription": "0x1",\n "result": {\n "number": "0x40c22",\n "hash": "0x16af2ee1672203c7ac13ff280822008be0f38e1e5bdc675760015ae3192c0e3a",\n "parentHash": "0x1fcf5dadfaf2ab4d985eb05d40eaa23605b0db25d736610c4b87173bfe438f91",\n "nonce": "0x0000000000000000",\n "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",\n "logsBloom": "0x00008000000000080000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000040000000000000000000000000000000000000000001000000000000000000000040000000000000000000000000000000000000400000000010000000000000000100000000000020000000000000000000000000000000000010000000000000000000000000000000000000000000",\n "transactionsRoot": "0x5b2e3c1a49352f1ca9fb5dfe74b7ffbbb6d70e23a12693444e26058d8a8e6296",\n "stateRoot": "0xbe8d3bc58bd982421a3ea8b66753404502df0f464ae78a17661d157c406dd38b",\n "receiptsRoot": "0x81b175ec1f4d44fbbd6ba08f1bd3950663b307b7cb35751c067b535cc0b58f12",\n "miner": "0x0000000000000000000000000000000000000000",\n "difficulty": "0x1",\n "totalDifficulty": "0x7c16e",\n "extraData": "0xd783010600846765746887676f312e372e33856c696e757800000000000000002160f780bb1f61eda045c67cdb1297ba37d8349df8035533cb0cf82a7e45f23f3d72bbec125a9f499b3eb110b7d1918d466cb2ede90b38296cfe2aaf452c513f00",\n "size": "0x3a1",\n "gasLimit": "0x47e7c4",\n "gasUsed": "0x11ac3a",\n "timestamp": "0x592afc24",\n "uncles": [],\n "transactions": [\n "0x419c69d21b14e2e8f911def22bb6d0156c876c0e1c61067de836713043364d6c",\n "0x70a5b2cb2cee6e0b199232a1757fc2a9d6053a4691a7afef8508fd88aeeec703",\n "0x4b3035f1d32339fe1a4f88147dc197a0fe5bbd63d3b9dec2dad96a3b46e4fddd"\n ]\n }\n }\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Example notification with the ",(0,r.jsx)(n.code,{children:'{"includeTransactions": true}'})," parameter included:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n"jsonrpc": "2.0",\n"method": "eth_subscription",\n"params":{\n "subscription":"0x1",\n "result": {\n ....\n "transactions":[\n {\n "blockHash":"0xa30ee4d7c271ae5150aec494131c5f1f34089c7aa8fb58bd8bb916a55275bb90",\n "blockNumber":"0x63",\n "from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas":"0x5208",\n "gasPrice":"0x3b9aca00",\n "hash":"0x11f66c3e96a92e3c14c1c33ad77381221bf8b58a887b4fed6aee456fc6f39b24",\n "input":"0x",\n "nonce":"0x1",\n "to":"0x627306090abab3a6e1400e9345bc60c78a8bef57",\n "transactionIndex":"0x0",\n "value":"0x56bc75e2d63100000",\n "v":"0xfe8",\n "r":"0x4b57d179c74885ef5f9326fd000665ea7fae44095c1e2016a2817fc671beb8cc",\n "s":"0x7ec060b115746dda392777df07ae1feacc0b83b3646f0a3de9a5fc3615af9bb8",\n }\n ],\n },\n }\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"logs",children:"Logs"}),"\n",(0,r.jsxs)(n.p,{children:["To notify you about ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/events-and-logs",children:"logs"})," included in new blocks, use the ",(0,r.jsx)(n.code,{children:"logs"})," parameter with ",(0,r.jsx)(n.code,{children:"eth_subscribe"})," or ",(0,r.jsx)(n.code,{children:"priv_subscribe"}),". Specify a filter object to receive notifications only for logs matching your filter."]}),"\n",(0,r.jsx)(n.p,{children:"Logs subscriptions have a filter object parameter with the following fields:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"address"})," - (optional) Either an address or an array of addresses. Returns only logs created from these addresses."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"topics"})," - (optional) Returns only logs that match the ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/events-and-logs#topic-filters",children:"specified topics"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"fromBlock"})," - (optional) The earliest block from which to return logs."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"toBlock"})," - (optional) The last block from which to return logs."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"For private contracts, the privacy group ID must be specified. Only members of a privacy group receive logs for a private contract subscription. If you create a subscription for a privacy group you are not a member of, you will not receive any notifications."}),"\n",(0,r.jsxs)(n.p,{children:["If a chain reorganization occurs, the subscription publishes notifications for logs from the old chain with the ",(0,r.jsx)(n.code,{children:"removed"})," property in the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/objects#log-object",children:"log object"})," set to ",(0,r.jsx)(n.code,{children:"true"}),". This means the subscription can publish notifications for multiple logs for the same transaction."]}),"\n",(0,r.jsxs)(n.p,{children:["The logs subscription returns ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/objects#log-object",children:"log objects"}),"."]}),"\n",(0,r.jsxs)(c.A,{children:[(0,r.jsx)(a.A,{value:"All logs",label:"All logs",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ \n "id": 1, \n "method": "eth_subscribe", \n "params": ["logs", {}]\n}\n'})})}),(0,r.jsx)(a.A,{value:"Specific parameters",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "id": 1,\n "method": "eth_subscribe",\n "params": [\n "logs",\n {\n "address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd",\n "topics": [\n "0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"\n ],\n "fromBlock": "0x0",\n "toBlock": "latest"\n }\n ]\n}\n'})})}),(0,r.jsx)(a.A,{value:"Result",label:"Result",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "id": 1, "result": "0x2" }\n'})})}),(0,r.jsx)(a.A,{value:"Notification",label:"Notification",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_subscription",\n "params": {\n "subscription": "0x2",\n "result": {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x2174",\n "blockHash": "0x7bc83837534aa13df55ff7db77784b1d1ba666d4c4bdd223cae9fe09c7c37eba",\n "transactionHash": "0x942179373e413824c6bc7045e92295aff91b679215446549b4aeb084da46495b",\n "transactionIndex": "0x0",\n "address": "0x9b8397f1b0fecd3a1a40cdd5e8221fa461898517",\n "data": "0x",\n "topics": [\n "0x199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca072787",\n "0x0000000000000000000000000000000000000000000000000000000000000005"\n ]\n }\n }\n}\n'})})})]}),"\n",(0,r.jsxs)(c.A,{children:[(0,r.jsx)(a.A,{value:"All logs for privacy group",label:"All logs for privacy group",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "id": 1,\n "method": "priv_subscribe",\n "params": ["4sSv8eqB6/0lV9I0tBGUhPjjHtLEf3z0eeMc8Lokkyo=", "logs", {}]\n}\n'})})}),(0,r.jsx)(a.A,{value:"Specific parameters",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "id": 1,\n "method": "priv_subscribe",\n "params": [\n "4sSv8eqB6/0lV9I0tBGUhPjjHtLEf3z0eeMc8Lokkyo=",\n "logs",\n {\n "address": "0x8320fe7702b96808f7bbc0d4a888ed1468216cfd",\n "topics": [\n "0xd78a0cb8bb633d06981248b816e7bd33c2a35a6089241d099fa519e361cab902"\n ]\n }\n ]\n}\n'})})}),(0,r.jsx)(a.A,{value:"Result",label:"Result",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "id": 1, "result": "0x1" }\n'})})}),(0,r.jsx)(a.A,{value:"Notification",label:"Notification",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "priv_subscription",\n "params": {\n "subscription": "0x1",\n "privacyGroupId": "4sSv8eqB6/0lV9I0tBGUhPjjHtLEf3z0eeMc8Lokkyo=",\n "result": {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x285",\n "blockHash": "0x98490766b16de2a4d044c04d92599d71e626bc96e42f0c74274ef4e03fafd579",\n "transactionHash": "0x40034ef14e3a22946693dd2a11efddf3a8850ddcad46b408198df6c176c53ffb",\n "transactionIndex": "0x0",\n "address": "0x61f96a7ed09877197d4fff0c29b8e523913651a9",\n "data": "0x",\n "topics": [\n "0x85bea11d86cefb165374e0f727bacf21dc2f4ea816493981ecf72dcfb212a410",\n "0x0000000000000000000000000000000000000000000000000000000000000002"\n ]\n }\n }\n}\n'})})})]}),"\n",(0,r.jsx)(n.h3,{id:"pending-transactions",children:"Pending transactions"}),"\n",(0,r.jsxs)(n.p,{children:["To notify you about pending transactions added to the transaction pool for the node, use the ",(0,r.jsx)(n.code,{children:"newPendingTransactions"})," parameter with ",(0,r.jsx)(n.code,{children:"eth_subscribe"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The pending transactions subscription returns the transaction hashes or transaction details of the pending transactions. If the ",(0,r.jsx)(n.code,{children:"includeTransactions"})," parameter is not included, the default is transaction hashes only."]}),"\n",(0,r.jsx)(n.p,{children:"If a chain reorganization occurs, Besu resubmits transactions for inclusion in the new canonical chain. This means the subscription can publish notifications for the same pending transaction more than once."}),"\n",(0,r.jsx)(n.p,{children:"To subscribe to pending transaction notifications and receive transaction hashes only:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "id": 1,\n "method": "eth_subscribe",\n "params": ["newPendingTransactions", { "includeTransactions": false }]\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:"Example result:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "id": 1, "result": "0x1" }\n'})}),"\n",(0,r.jsx)(n.p,{children:"Example notification:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_subscription",\n "params": {\n "subscription": "0x1",\n "result": "0x5705bc8bf875ff03e98adb98489428835892dc6ba6a6b139fee1becbc26db0b8"\n }\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:"To subscribe to pending transaction notifications and receive transaction details:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "id": 1,\n "method": "eth_subscribe",\n "params": ["newPendingTransactions", { "includeTransactions": true }]\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:"Example result:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "id": 1, "result": "0x2" }\n'})}),"\n",(0,r.jsx)(n.p,{children:"Example notification:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_subscription",\n "params": {\n "subscription": "0x2",\n "result": {\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas": "0x5208",\n "gasPrice": "0x2540be400",\n "hash": "0x7a4185f40ee93cb27eb132f301d0a5414c1f871051f166fc8804c376aab3ffec",\n "input": "0x",\n "nonce": "0x13",\n "to": "0x9d8f8572f345e1ae53db1dfa4a7fce49b467bd7f",\n "value": "0x8ac7230489e80000",\n "v": "0xfe7",\n "r": "0xdd9013c67469d2fe79afdc61777c55bdced33c90fa6f9b83d8f9b7e445085123",\n "s": "0x45823a1ab22ae9c83876ea435dc5ecc4fe3a83c1bfbc340a5f57df2f5a474fa5"\n }\n }\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"dropped-transactions",children:"Dropped transactions"}),"\n",(0,r.jsxs)(n.p,{children:["To notify you about transactions dropped from the transaction pool for the node, use the ",(0,r.jsx)(n.code,{children:"droppedPendingTransactions"})," parameter with ",(0,r.jsx)(n.code,{children:"eth_subscribe"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"The dropped transactions subscription returns the transaction hashes of the dropped transactions."}),"\n",(0,r.jsx)(n.p,{children:"Dropped transactions can be re-added to the transaction pool from a variety of sources. For example, receiving a previously dropped transaction from a peer. As a result, it's possible to receive multiple dropped transaction notifications for the same transaction."}),"\n",(0,r.jsx)(n.p,{children:"To subscribe to dropped transaction notifications:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ "id": 1, "method": "eth_subscribe", "params": ["droppedPendingTransactions"] }\n'})}),"\n",(0,r.jsx)(n.p,{children:"Example result:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "id": 1, "result": "0x1" }\n'})}),"\n",(0,r.jsx)(n.p,{children:"Example notification:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_subscription",\n "params": {\n "subscription": "0x1",\n "result": "0xf57d6a90a7fb30880cfbdf6b432b487d0e94a3b55b34dc4b45e3b0b237ecab4c"\n }\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"synchronizing",children:"Synchronizing"}),"\n",(0,r.jsxs)(n.p,{children:["To notify you about synchronization progress, use the ",(0,r.jsx)(n.code,{children:"syncing"})," parameter with ",(0,r.jsx)(n.code,{children:"eth_subscribe"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["When behind the chain head, the synchronizing subscription returns an object indicating the synchronization progress. When fully synchronized, returns ",(0,r.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"To subscribe to synchronizing notifications:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ "id": 1, "method": "eth_subscribe", "params": ["syncing"] }\n'})}),"\n",(0,r.jsx)(n.p,{children:"Example result:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "id": 1, "result": "0x4" }\n'})}),"\n",(0,r.jsx)(n.p,{children:"Example notification while synchronizing:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_subscription",\n "params": {\n "subscription": "0x4",\n "result": {\n "startingBlock": "0x0",\n "currentBlock": "0x3e80",\n "highestBlock": "0x67b93c"\n }\n }\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:"Example notification when synchronized with chain head:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_subscription",\n "params": {\n "subscription": "0x4",\n "result": false\n }\n}\n'})}),"\n",(0,r.jsx)(n.h2,{id:"unsubscribe",children:"Unsubscribe"}),"\n",(0,r.jsxs)(n.p,{children:["To cancel a subscription, use the ",(0,r.jsx)(n.a,{href:"#subscription-id",children:"subscription ID"})," with ",(0,r.jsx)(n.code,{children:"eth_unsubscribe"})," or ",(0,r.jsx)(n.code,{children:"priv_unsubscribe"}),". Only the connection that created a subscription can unsubscribe from it."]}),"\n",(0,r.jsx)(n.p,{children:"When cancelling a subscription for private logs, the privacy group ID must be specified."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"eth_unsubscribe"})," and ",(0,r.jsx)(n.code,{children:"priv_unsubscribe"})," return ",(0,r.jsx)(n.code,{children:"true"})," if subscription successfully unsubscribed; otherwise, returns an error."]}),"\n",(0,r.jsxs)(n.p,{children:["To unsubscribe from a subscription with subscription ID of ",(0,r.jsx)(n.code,{children:"0x1"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ "id": 1, "method": "eth_unsubscribe", "params": ["0x1"] }\n'})}),"\n",(0,r.jsx)(n.p,{children:"To unsubscribe from private logs subscription:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "id": 1,\n "method": "priv_unsubscribe",\n "params": ["4sSv8eqB6/0lV9I0tBGUhPjjHtLEf3z0eeMc8Lokkyo=", "0x2"]\n}\n'})}),"\n",(0,r.jsx)(n.p,{children:"Example result:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "id": 1, "result": true }\n'})})]})}function b(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},19365:(e,n,s)=>{s.d(n,{A:()=>a});s(96540);var r=s(18215);const i={tabItem:"tabItem_Ymn6"};var c=s(74848);function a(e){let{children:n,hidden:s,className:a}=e;return(0,c.jsx)("div",{role:"tabpanel",className:(0,r.A)(i.tabItem,a),hidden:s,children:n})}},11470:(e,n,s)=>{s.d(n,{A:()=>y});var r=s(96540),i=s(18215),c=s(23104),a=s(56347),t=s(205),o=s(57485),l=s(31682),d=s(70679);function u(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:s}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:s,attributes:r,default:i}}=e;return{value:n,label:s,attributes:r,default:i}}))}(s);return function(e){const n=(0,l.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,s])}function b(e){let{value:n,tabValues:s}=e;return s.some((e=>e.value===n))}function p(e){let{queryString:n=!1,groupId:s}=e;const i=(0,a.W6)(),c=function(e){let{queryString:n=!1,groupId:s}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return s??null}({queryString:n,groupId:s});return[(0,o.aZ)(c),(0,r.useCallback)((e=>{if(!c)return;const n=new URLSearchParams(i.location.search);n.set(c,e),i.replace({...i.location,search:n.toString()})}),[c,i])]}function f(e){const{defaultValue:n,queryString:s=!1,groupId:i}=e,c=h(e),[a,o]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:s}=e;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!b({value:n,tabValues:s}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${s.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=s.find((e=>e.default))??s[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:c}))),[l,u]=p({queryString:s,groupId:i}),[f,x]=function(e){let{groupId:n}=e;const s=function(e){return e?`docusaurus.tab.${e}`:null}(n),[i,c]=(0,d.Dv)(s);return[i,(0,r.useCallback)((e=>{s&&c.set(e)}),[s,c])]}({groupId:i}),j=(()=>{const e=l??f;return b({value:e,tabValues:c})?e:null})();(0,t.A)((()=>{j&&o(j)}),[j]);return{selectedValue:a,selectValue:(0,r.useCallback)((e=>{if(!b({value:e,tabValues:c}))throw new Error(`Can't select invalid tab value=${e}`);o(e),u(e),x(e)}),[u,x,c]),tabValues:c}}var x=s(92303);const j={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=s(74848);function g(e){let{className:n,block:s,selectedValue:r,selectValue:a,tabValues:t}=e;const o=[],{blockElementScrollPositionUntilNextRender:l}=(0,c.a_)(),d=e=>{const n=e.currentTarget,s=o.indexOf(n),i=t[s].value;i!==r&&(l(n),a(i))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const s=o.indexOf(e.currentTarget)+1;n=o[s]??o[0];break}case"ArrowLeft":{const s=o.indexOf(e.currentTarget)-1;n=o[s]??o[o.length-1];break}}n?.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":s},n),children:t.map((e=>{let{value:n,label:s,attributes:c}=e;return(0,m.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>o.push(e),onKeyDown:u,onClick:d,...c,className:(0,i.A)("tabs__item",j.tabItem,c?.className,{"tabs__item--active":r===n}),children:s??n},n)}))})}function v(e){let{lazy:n,children:s,selectedValue:c}=e;const a=(Array.isArray(s)?s:[s]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===c));return e?(0,r.cloneElement)(e,{className:(0,i.A)("margin-top--md",e.props.className)}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==c})))})}function w(e){const n=f(e);return(0,m.jsxs)("div",{className:(0,i.A)("tabs-container",j.tabList),children:[(0,m.jsx)(g,{...n,...e}),(0,m.jsx)(v,{...n,...e})]})}function y(e){const n=(0,x.A)();return(0,m.jsx)(w,{...e,children:u(e.children)},String(n))}},28453:(e,n,s)=>{s.d(n,{R:()=>a,x:()=>t});var r=s(96540);const i={},c=r.createContext(i);function a(e){const n=r.useContext(c);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function t(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),r.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4d94bde1.1944a60e.js b/assets/js/4d94bde1.1944a60e.js new file mode 100644 index 00000000000..18c4b18420f --- /dev/null +++ b/assets/js/4d94bde1.1944a60e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7208],{72935:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>u,default:()=>p,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var n=r(74848),a=r(28453),s=r(11470),i=r(19365);const o={title:"Use the web3js-quorum library",description:"web3js-quorum client library",sidebar_position:8,tags:["private networks"]},u="Use the web3js-quorum client library (Deprecated)",l={id:"private-networks/how-to/use-privacy/web3js-quorum",title:"Use the web3js-quorum library",description:"web3js-quorum client library",source:"@site/docs/private-networks/how-to/use-privacy/web3js-quorum.md",sourceDirName:"private-networks/how-to/use-privacy",slug:"/private-networks/how-to/use-privacy/web3js-quorum",permalink:"/private-networks/how-to/use-privacy/web3js-quorum",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/use-privacy/web3js-quorum.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:8,frontMatter:{title:"Use the web3js-quorum library",description:"web3js-quorum client library",sidebar_position:8,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Sign privacy marker transactions",permalink:"/private-networks/how-to/use-privacy/sign-pmts"},next:{title:"Privacy best practices",permalink:"/private-networks/how-to/use-privacy/performance-best-practices"}},c={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Add web3js-quorum to project",id:"add-web3js-quorum-to-project",level:2},{value:"Initialize the web3js-quorum client",id:"initialize-the-web3js-quorum-client",level:2},{value:"Deploy a contract with generateAndSendRawTransaction",id:"deploy-a-contract-with-generateandsendrawtransaction",level:2},{value:"web3js-quorum methods",id:"web3js-quorum-methods",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"use-the-web3js-quorum-client-library-deprecated",children:"Use the web3js-quorum client library (Deprecated)"})}),"\n",(0,n.jsx)(t.admonition,{type:"caution",children:(0,n.jsxs)(t.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,n.jsx)(t.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"https://github.com/ConsenSys/web3js-quorum",children:"web3js-quorum"})," is an Ethereum JavaScript library extending ",(0,n.jsx)(t.a,{href:"https://github.com/ethereum/web3.js/",children:"web3.js"})," that adds support for Besu-specific JSON-RPC APIs and features. Use the library to create and send RLP-encoded transactions using JSON-RPC."]}),"\n",(0,n.jsx)(t.admonition,{title:"important",type:"caution",children:(0,n.jsx)(t.p,{children:"web3js-quorum supports JSON-RPC over HTTP only."})}),"\n",(0,n.jsxs)(t.admonition,{type:"note",children:[(0,n.jsxs)(t.p,{children:["web3js-quorum includes all ",(0,n.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum.js",children:"quorum.js"})," and ",(0,n.jsx)(t.a,{href:"https://github.com/ConsenSys/web3js-eea",children:"web3js-eea"})," features."]}),(0,n.jsx)(t.p,{children:"If migrating to web3js-quorum, update your JavaScript code as indicated in the following examples."}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.a,{href:"https://consensys.github.io/web3js-quorum/latest/tutorial-Migrate%20from%20web3js-eea.html",children:"Read the migration guide for more information about updating your code."})})]}),"\n",(0,n.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://nodejs.org/en/download/",children:"Node.js (version > 10)"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/ChainSafe/web3.js#installation",children:"The web3 library must be installed in your project"})}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"add-web3js-quorum-to-project",children:"Add web3js-quorum to project"}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"npm install web3js-quorum\n"})}),"\n",(0,n.jsx)(t.h2,{id:"initialize-the-web3js-quorum-client",children:"Initialize the web3js-quorum client"}),"\n",(0,n.jsxs)(t.p,{children:["Initialize your client where ",(0,n.jsx)(t.code,{children:""})," is the JSON-RPC HTTP endpoint of your\nBesu node.\nSpecified by the ",(0,n.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-host",children:(0,n.jsx)(t.code,{children:"--rpc-http-host"})}),"\nand ",(0,n.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,n.jsx)(t.code,{children:"--rpc-http-port"})})," command\nline options."]}),"\n",(0,n.jsxs)(s.A,{children:[(0,n.jsx)(i.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-js",children:'const { Web3 } = require("web3");\nconst Web3Quorum = require("web3js-quorum");\nconst web3 = new Web3Quorum(new Web3(""));\n'})})}),(0,n.jsx)(i.A,{value:"Example",label:"Example",children:(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-js",children:'const { Web3 } = require("web3");\nconst Web3Quorum = require("web3js-quorum");\nconst web3 = new Web3Quorum(new Web3("http://localhost:8545"));\n'})})})]}),"\n",(0,n.jsx)(t.admonition,{type:"note",children:(0,n.jsxs)(t.p,{children:["When migrating from web3js-eea to web3js-quorum, use ",(0,n.jsx)(t.code,{children:"Web3Quorum"}),". The constructor doesn't require the chain ID anymore. Chain ID is automatically retrieved from the chain using the specified JSON-RPC HTTP endpoint."]})}),"\n",(0,n.jsxs)(t.h2,{id:"deploy-a-contract-with-generateandsendrawtransaction",children:["Deploy a contract with ",(0,n.jsx)(t.code,{children:"generateAndSendRawTransaction"})]}),"\n",(0,n.jsxs)(t.p,{children:["To deploy a private contract, you need the contract binary. You can use ",(0,n.jsx)(t.a,{href:"https://solidity.readthedocs.io/en/develop/using-the-compiler.html",children:"Solidity"})," to get the contract binary."]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-js",metastring:"title=\"Deploying a contract with 'web3.priv.generateAndSendRawTransaction'\"",children:'const contractOptions = {\n data: `0x123`, // contract binary\n privateFrom: "tesseraNode1PublicKey",\n privateFor: ["tesseraNode3PublicKey"],\n privateKey: "besuNode1PrivateKey",\n};\nreturn web3.priv.generateAndSendRawTransaction(contractOptions);\n'})}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.code,{children:"web3.priv.generateAndSendRawTransaction(contractOptions)"})," returns the transaction hash. To get the private transaction receipt, use ",(0,n.jsx)(t.code,{children:"web3.priv.waitForTransactionReceipt(txHash)"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"web3js-quorum-methods",children:"web3js-quorum methods"}),"\n",(0,n.jsxs)(t.p,{children:["For more information about the web3js-quorum methods, see the ",(0,n.jsx)(t.a,{href:"https://consensys.github.io/web3js-quorum/latest/index.html",children:"web3js-quorum reference documentation"}),"."]})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},19365:(e,t,r)=>{r.d(t,{A:()=>i});r(96540);var n=r(18215);const a={tabItem:"tabItem_Ymn6"};var s=r(74848);function i(e){let{children:t,hidden:r,className:i}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,n.A)(a.tabItem,i),hidden:r,children:t})}},11470:(e,t,r)=>{r.d(t,{A:()=>g});var n=r(96540),a=r(18215),s=r(23104),i=r(56347),o=r(205),u=r(57485),l=r(31682),c=r(70679);function d(e){return n.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:t,children:r}=e;return(0,n.useMemo)((()=>{const e=t??function(e){return d(e).map((e=>{let{props:{value:t,label:r,attributes:n,default:a}}=e;return{value:t,label:r,attributes:n,default:a}}))}(r);return function(e){const t=(0,l.XI)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,r])}function p(e){let{value:t,tabValues:r}=e;return r.some((e=>e.value===t))}function b(e){let{queryString:t=!1,groupId:r}=e;const a=(0,i.W6)(),s=function(e){let{queryString:t=!1,groupId:r}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:t,groupId:r});return[(0,u.aZ)(s),(0,n.useCallback)((e=>{if(!s)return;const t=new URLSearchParams(a.location.search);t.set(s,e),a.replace({...a.location,search:t.toString()})}),[s,a])]}function m(e){const{defaultValue:t,queryString:r=!1,groupId:a}=e,s=h(e),[i,u]=(0,n.useState)((()=>function(e){let{defaultValue:t,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const n=r.find((e=>e.default))??r[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:s}))),[l,d]=b({queryString:r,groupId:a}),[m,j]=function(e){let{groupId:t}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(t),[a,s]=(0,c.Dv)(r);return[a,(0,n.useCallback)((e=>{r&&s.set(e)}),[r,s])]}({groupId:a}),w=(()=>{const e=l??m;return p({value:e,tabValues:s})?e:null})();(0,o.A)((()=>{w&&u(w)}),[w]);return{selectedValue:i,selectValue:(0,n.useCallback)((e=>{if(!p({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);u(e),d(e),j(e)}),[d,j,s]),tabValues:s}}var j=r(92303);const w={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=r(74848);function v(e){let{className:t,block:r,selectedValue:n,selectValue:i,tabValues:o}=e;const u=[],{blockElementScrollPositionUntilNextRender:l}=(0,s.a_)(),c=e=>{const t=e.currentTarget,r=u.indexOf(t),a=o[r].value;a!==n&&(l(t),i(a))},d=e=>{let t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const r=u.indexOf(e.currentTarget)+1;t=u[r]??u[0];break}case"ArrowLeft":{const r=u.indexOf(e.currentTarget)-1;t=u[r]??u[u.length-1];break}}t?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":r},t),children:o.map((e=>{let{value:t,label:r,attributes:s}=e;return(0,f.jsx)("li",{role:"tab",tabIndex:n===t?0:-1,"aria-selected":n===t,ref:e=>u.push(e),onKeyDown:d,onClick:c,...s,className:(0,a.A)("tabs__item",w.tabItem,s?.className,{"tabs__item--active":n===t}),children:r??t},t)}))})}function x(e){let{lazy:t,children:r,selectedValue:s}=e;const i=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=i.find((e=>e.props.value===s));return e?(0,n.cloneElement)(e,{className:(0,a.A)("margin-top--md",e.props.className)}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:i.map(((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==s})))})}function y(e){const t=m(e);return(0,f.jsxs)("div",{className:(0,a.A)("tabs-container",w.tabList),children:[(0,f.jsx)(v,{...t,...e}),(0,f.jsx)(x,{...t,...e})]})}function g(e){const t=(0,j.A)();return(0,f.jsx)(y,{...e,children:d(e.children)},String(t))}},28453:(e,t,r)=>{r.d(t,{R:()=>i,x:()=>o});var n=r(96540);const a={},s=n.createContext(a);function i(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/4f63be9c.b10c965e.js b/assets/js/4f63be9c.b10c965e.js new file mode 100644 index 00000000000..98891bf0d64 --- /dev/null +++ b/assets/js/4f63be9c.b10c965e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[9779],{74318:(e,r,i)=>{i.r(r),i.d(r,{assets:()=>c,contentTitle:()=>o,default:()=>d,frontMatter:()=>a,metadata:()=>t,toc:()=>p});var s=i(74848),n=i(28453);const a={title:"Use flexible privacy groups",description:"Use flexible privacy groups",sidebar_position:5,tags:["private networks"]},o="Use flexible privacy groups (Deprecated)",t={id:"private-networks/how-to/use-privacy/flexible",title:"Use flexible privacy groups",description:"Use flexible privacy groups",source:"@site/docs/private-networks/how-to/use-privacy/flexible.md",sourceDirName:"private-networks/how-to/use-privacy",slug:"/private-networks/how-to/use-privacy/flexible",permalink:"/private-networks/how-to/use-privacy/flexible",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/use-privacy/flexible.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:5,frontMatter:{title:"Use flexible privacy groups",description:"Use flexible privacy groups",sidebar_position:5,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Create and manage privacy groups",permalink:"/private-networks/how-to/use-privacy/privacy-groups"},next:{title:"Access private and privacy marker transactions",permalink:"/private-networks/how-to/use-privacy/access-private-transactions"}},c={},p=[{value:"Enable flexible privacy groups",id:"enable-flexible-privacy-groups",level:2},{value:"Simple flexible privacy group example",id:"simple-flexible-privacy-group-example",level:2},{value:"Add and remove members",id:"add-and-remove-members",level:2}];function l(e){const r={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"use-flexible-privacy-groups-deprecated",children:"Use flexible privacy groups (Deprecated)"})}),"\n",(0,s.jsx)(r.admonition,{type:"caution",children:(0,s.jsxs)(r.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,s.jsx)(r.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,s.jsxs)(r.p,{children:["Use the ",(0,s.jsxs)(r.a,{href:"https://github.com/ConsenSys/web3js-quorum",children:[(0,s.jsx)(r.code,{children:"web3js-quorum"})," library"]})," to create and update membership of ",(0,s.jsx)(r.a,{href:"/private-networks/concepts/privacy/flexible-privacy",children:"flexible privacy groups"}),"."]}),"\n",(0,s.jsx)(r.admonition,{type:"tip",children:(0,s.jsx)(r.p,{children:"Because group membership for flexible privacy groups is stored in a smart contract, flexible privacy groups are also known as onchain privacy groups."})}),"\n",(0,s.jsxs)(r.admonition,{type:"info",children:[(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.a,{href:"/private-networks/concepts/privacy/flexible-privacy",children:"Flexible privacy groups"})," are an early access feature. Don't use in production networks."]}),(0,s.jsx)(r.p,{children:"The flexible privacy group interfaces may change between releases. There might not be an upgrade path from flexible privacy groups created using v1.5 or earlier to enable use of flexible privacy group functionality in future versions."}),(0,s.jsxs)(r.p,{children:["We don't recommend creating flexible privacy groups in a chain with existing ",(0,s.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"offchain privacy groups"}),"."]})]}),"\n",(0,s.jsx)(r.h2,{id:"enable-flexible-privacy-groups",children:"Enable flexible privacy groups"}),"\n",(0,s.jsxs)(r.p,{children:["Use the ",(0,s.jsx)(r.a,{href:"/private-networks/reference/cli/options#privacy-flexible-groups-enabled-deprecated",children:(0,s.jsx)(r.code,{children:"--privacy-flexible-groups-enabled"})})," command line option to enable ",(0,s.jsx)(r.a,{href:"/private-networks/concepts/privacy/flexible-privacy",children:"flexible privacy groups"}),". When flexible privacy groups are enabled, the ",(0,s.jsx)(r.a,{href:"/private-networks/reference/api/#priv_createprivacygroup",children:(0,s.jsx)(r.code,{children:"priv_createPrivacyGroup"})}),", ",(0,s.jsx)(r.a,{href:"/private-networks/reference/api/#priv_deleteprivacygroup",children:(0,s.jsx)(r.code,{children:"priv_deletePrivacyGroup"})}),", and ",(0,s.jsx)(r.a,{href:"/private-networks/reference/api/#priv_findprivacygroup",children:(0,s.jsx)(r.code,{children:"priv_findPrivacyGroup"})})," methods for ",(0,s.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"offchain privacy groups"})," are disabled."]}),"\n",(0,s.jsx)(r.h2,{id:"simple-flexible-privacy-group-example",children:"Simple flexible privacy group example"}),"\n",(0,s.jsxs)(r.p,{children:["To create and find a ",(0,s.jsx)(r.a,{href:"/private-networks/concepts/privacy/flexible-privacy",children:"flexible privacy group"})," using the ",(0,s.jsxs)(r.a,{href:"https://github.com/ConsenSys/web3js-quorum",children:[(0,s.jsx)(r.code,{children:"web3js-quorum"})," library"]}),":"]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Update the ",(0,s.jsx)(r.code,{children:"example/keys.js"})," file to match your network configuration."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsx)(r.p,{children:"Run:"}),"\n",(0,s.jsx)(r.pre,{children:(0,s.jsx)(r.code,{className:"language-bash",children:"cd example/onchainPrivacy\nnode simpleExample.js\n"})}),"\n",(0,s.jsxs)(r.p,{children:["This script creates the flexible privacy group with two members. ",(0,s.jsx)(r.code,{children:"findPrivacyGroup"})," finds and displays the created privacy group."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(r.admonition,{type:"tip",children:(0,s.jsxs)(r.p,{children:["The Tessera logs for Tessera 1 and Tessera 2 display ",(0,s.jsx)(r.code,{children:"PrivacyGroupNotFound"})," errors. This is expected behavior because private transactions check offchain and onchain to find the privacy group for a private transaction."]})}),"\n",(0,s.jsx)(r.h2,{id:"add-and-remove-members",children:"Add and remove members"}),"\n",(0,s.jsxs)(r.p,{children:["To add and remove members from a ",(0,s.jsx)(r.a,{href:"/private-networks/concepts/privacy/flexible-privacy",children:"flexible privacy group"}),", use the ",(0,s.jsx)(r.code,{children:"addTo"})," and ",(0,s.jsx)(r.code,{children:"removeFrom"})," methods in the ",(0,s.jsxs)(r.a,{href:"https://github.com/ConsenSys/web3js-quorum",children:[(0,s.jsx)(r.code,{children:"web3js-quorum"})," library"]})," client library."]}),"\n",(0,s.jsx)(r.admonition,{type:"note",children:(0,s.jsx)(r.p,{children:"When adding a member, Besu pushes all existing group transactions to the new member and processes them. If there are a large number of existing transactions, adding the member may take some time."})})]})}function d(e={}){const{wrapper:r}={...(0,n.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,r,i)=>{i.d(r,{R:()=>o,x:()=>t});var s=i(96540);const n={},a=s.createContext(n);function o(e){const r=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function t(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),s.createElement(a.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5576e3f0.76332a7a.js b/assets/js/5576e3f0.76332a7a.js new file mode 100644 index 00000000000..feeb188655e --- /dev/null +++ b/assets/js/5576e3f0.76332a7a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[68],{88240:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>o,default:()=>u,frontMatter:()=>n,metadata:()=>a,toc:()=>d});var i=r(74848),s=r(28453);const n={title:"Installation options",description:"Options for getting started with Besu",sidebar_position:1,tags:["private networks"]},o="Installation options",a={id:"private-networks/get-started/install/index",title:"Installation options",description:"Options for getting started with Besu",source:"@site/docs/private-networks/get-started/install/index.md",sourceDirName:"private-networks/get-started/install",slug:"/private-networks/get-started/install/",permalink:"/private-networks/get-started/install/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/get-started/install/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Installation options",description:"Options for getting started with Besu",sidebar_position:1,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"System requirements",permalink:"/private-networks/get-started/system-requirements"},next:{title:"Run Besu from Docker image",permalink:"/private-networks/get-started/install/run-docker-image"}},l={},d=[{value:"Build from source",id:"build-from-source",level:2}];function c(e){const t={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"installation-options",children:"Installation options"})}),"\n",(0,i.jsxs)(t.p,{children:["Get started with the ",(0,i.jsx)(t.a,{href:"/private-networks/tutorials/quickstart",children:"Developer Quickstart"}),". Use the quickstart to rapidly generate local blockchain networks."]}),"\n",(0,i.jsx)(t.p,{children:"You can also install the following:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"/private-networks/get-started/install/run-docker-image",children:"Docker image"})}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.a,{href:"/private-networks/get-started/install/binary-distribution",children:"Binaries"})}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"build-from-source",children:"Build from source"}),"\n",(0,i.jsxs)(t.p,{children:["If you want to use the latest development version of Besu or a specific commit, build from source. Otherwise, use the ",(0,i.jsx)(t.a,{href:"/private-networks/get-started/install/binary-distribution",children:"binary"})," or ",(0,i.jsx)(t.a,{href:"/private-networks/get-started/install/run-docker-image",children:"Docker image"})," for more stable versions."]}),"\n",(0,i.jsxs)(t.p,{children:["View the ",(0,i.jsx)(t.a,{href:"https://wiki.hyperledger.org/display/BESU/Building+from+source",children:"Wiki"})," for instructions to install Besu from source."]})]})}function u(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(c,{...e})}):c(e)}},28453:(e,t,r)=>{r.d(t,{R:()=>o,x:()=>a});var i=r(96540);const s={},n=i.createContext(s);function o(e){const t=i.useContext(n);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),i.createElement(n.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/55b6f436.85c63947.js b/assets/js/55b6f436.85c63947.js new file mode 100644 index 00000000000..b628ea0dda6 --- /dev/null +++ b/assets/js/55b6f436.85c63947.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6944],{32912:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>d,frontMatter:()=>i,metadata:()=>l,toc:()=>a});var t=s(74848),r=s(28453);const i={title:"Client and server TLS",sidebar_position:1,tags:["private networks"]},c="Configure client and server TLS",l={id:"private-networks/how-to/configure/tls/client-and-server",title:"Client and server TLS",description:"Besu supports TLS for client and server communication. For example, you can configure TLS for communication between Web3Signer and Besu, and Besu and Tessera.",source:"@site/docs/private-networks/how-to/configure/tls/client-and-server.md",sourceDirName:"private-networks/how-to/configure/tls",slug:"/private-networks/how-to/configure/tls/client-and-server",permalink:"/private-networks/how-to/configure/tls/client-and-server",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/configure/tls/client-and-server.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Client and server TLS",sidebar_position:1,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Pre-deploy a contract",permalink:"/private-networks/how-to/configure/contracts"},next:{title:"Alternative elliptic curves",permalink:"/private-networks/how-to/configure/curves"}},o={},a=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Configure client TLS",id:"configure-client-tls",level:2},{value:"Create the known clients file",id:"create-the-known-clients-file",level:3},{value:"Start Besu",id:"start-besu",level:3},{value:"Configure server TLS",id:"configure-server-tls",level:2},{value:"Create the known servers file",id:"create-the-known-servers-file",level:3},{value:"Start Besu",id:"start-besu-1",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"configure-client-and-server-tls",children:"Configure client and server TLS"})}),"\n",(0,t.jsxs)(n.p,{children:["Besu supports TLS for client and server communication. For example, you can configure TLS for communication between ",(0,t.jsx)(n.a,{href:"https://docs.web3signer.consensys.net/concepts/tls",children:"Web3Signer"})," and Besu, and Besu and ",(0,t.jsx)(n.a,{href:"https://docs.tessera.consensys.net/HowTo/Configure/TLS/",children:"Tessera"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"The following instructions allow you to configure client and server authentication to secure HTTP JSON-RPC\ncalls."}),"\n",(0,t.jsx)(n.admonition,{title:"Secure Websocket JSON-RPC calls",type:"info",children:(0,t.jsxs)(n.p,{children:["You can configure SSL/TLS authentication for WebSocket calls by enabling\n",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-ssl-enabled",children:(0,t.jsx)(n.code,{children:"--rpc-ws-ssl-enabled"})})," for\nserver authentication, and\n",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-ssl-client-auth-enabled",children:(0,t.jsx)(n.code,{children:"--rpc-ws-ssl-client-auth-enabled"})})," for client authentication."]})}),"\n",(0,t.jsx)(n.p,{children:"The following diagram displays an example client and server TLS configuration."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Besu client and server TLS",src:s(26018).A+"",width:"1512",height:"1184"})}),"\n",(0,t.jsx)(n.p,{children:"Configure TLS communication from the command line."}),"\n",(0,t.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Besu's password-protected PKCS12 keystore"}),"\n",(0,t.jsx)(n.li,{children:"File containing the keystore password"}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"configure-client-tls",children:"Configure client TLS"}),"\n",(0,t.jsx)(n.p,{children:"Allow clients (for example a dapp, curl, or Web3Signer) to send and receive secure HTTP JSON-RPCs."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Client prerequisites"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://docs.web3signer.consensys.net/how-to/configure-tls",children:"Configure the client for TLS"})}),"\n",(0,t.jsx)(n.li,{children:"Client's PKCS12 keystore information"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"create-the-known-clients-file",children:"Create the known clients file"}),"\n",(0,t.jsx)(n.p,{children:"The known clients file allows clients with self-signed certificates or non-public certificates to connect to Besu."}),"\n",(0,t.jsxs)(n.p,{children:["Create a file (in this example, ",(0,t.jsx)(n.code,{children:"knownClients"}),") that lists one or more trusted clients. Use the format",(0,t.jsx)(n.code,{children:" "})," where:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:""})," is the Common Name specified in the client certificate."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:""})," is the SHA-256 fingerprint of the client certificate."]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",metastring:'title="Example"',children:"web3signer 8E:E0:85:9F:FC:2E:2F:21:31:46:0B:82:4C:A6:88:AB:30:34:9A:C6:EA:4F:04:31:ED:0F:69:A7:B5:C2:2F:A7\ncurl FC:18:BF:39:45:45:9A:15:46:76:A6:E7:C3:94:64:B8:34:84:A3:8E:B8:EA:67:DC:61:C0:29:E6:38:B8:B7:99\n"})}),"\n",(0,t.jsxs)(n.p,{children:["You can use ",(0,t.jsx)(n.a,{href:"https://www.openssl.org/",children:(0,t.jsx)(n.code,{children:"openssl"})})," or ",(0,t.jsx)(n.a,{href:"https://docs.oracle.com/javase/6/docs/technotes/tools/solaris/keytool.html",children:(0,t.jsx)(n.code,{children:"keytool"})})," to display the SHA256 fingerprint."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"keytool -list -v -keystore -storetype PKCS12 -storepass `.\n"})}),"\n",(0,t.jsx)(n.h3,{id:"start-besu",children:"Start Besu"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"besu --rpc-http-enabled --rpc-http-tls-enabled --rpc-http-tls-client-auth-enabled --rpc-http-tls-keystore-file=/Users/me/my_node/keystore.pfx --rpc-http-tls-keystore-password-file=/Users/me/my_node/keystorePassword --rpc-http-tls-known-clients-file=/Users/me/my_node/knownClients --rpc-http-tls-cipher-suite=TLS_AES_256_GCM_SHA384 --rpc-http-tls-protocol=TLSv1.3,TLSv1.2\n"})}),"\n",(0,t.jsx)(n.p,{children:"The command line:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Enables the HTTP JSON-RPC service using the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,t.jsx)(n.code,{children:"--rpc-http-enabled"})})," option."]}),"\n",(0,t.jsxs)(n.li,{children:["Enables TLS for the HTTP JSON-RPC service using the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-tls-enabled",children:(0,t.jsx)(n.code,{children:"--rpc-http-tls-enabled"})})," option."]}),"\n",(0,t.jsxs)(n.li,{children:["Enables TLS client authentication using the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-tls-client-auth-enabled",children:(0,t.jsx)(n.code,{children:"--rpc-http-tls-client-auth-enabled"})})," option."]}),"\n",(0,t.jsxs)(n.li,{children:["Specifies the keystore using the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-tls-keystore-file",children:(0,t.jsx)(n.code,{children:"--rpc-http-tls-keystore-file"})})," option."]}),"\n",(0,t.jsxs)(n.li,{children:["Specifies the file that contains the password to decrypt the keystore using the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-tls-keystore-password-file",children:(0,t.jsx)(n.code,{children:"--rpc-http-tls-keystore-password-file"})})," option."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"#create-the-known-clients-file",children:"Specifies the clients"})," allowed to connect to Besu using the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-tls-known-clients-file",children:(0,t.jsx)(n.code,{children:"--rpc-http-tls-known-clients-file"})})," option."]}),"\n",(0,t.jsxs)(n.li,{children:["specifies the Java cipher suites using the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-tls-cipher-suite",children:(0,t.jsx)(n.code,{children:"--rpc-http-tls-cipher-suite"})})," option."]}),"\n",(0,t.jsxs)(n.li,{children:["specifies the TLS protocol version using the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-tls-protocol",children:(0,t.jsx)(n.code,{children:"--rpc-http-tls-protocol"})})," option."]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["Set ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-tls-ca-clients-enabled",children:(0,t.jsx)(n.code,{children:"--rpc-http-tls-ca-clients-enabled"})})," to ",(0,t.jsx)(n.code,{children:"true"})," to allow access to clients with signed and trusted root CAs."]})}),"\n",(0,t.jsx)(n.h2,{id:"configure-server-tls",children:"Configure server TLS"}),"\n",(0,t.jsx)(n.p,{children:"Allow Besu to securely communicate with the server (Tessera)."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Server prerequisites"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://docs.tessera.consensys.net/HowTo/Configure/TLS/",children:"Configure the server to allow TLS communication"})}),"\n",(0,t.jsx)(n.li,{children:"Server's certificate information"}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"create-the-known-servers-file",children:"Create the known servers file"}),"\n",(0,t.jsxs)(n.p,{children:["Create a file (in this example, ",(0,t.jsx)(n.code,{children:"knownServers"}),") that lists one or more trusted servers. The file contents use the format ",(0,t.jsx)(n.code,{children:": "})," where:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:""})," is the server hostname"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:""})," is the port used for communication"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:""})," is the SHA-256 fingerprint of the server's certificate."]}),"\n"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",metastring:'title="Example"',children:"localhost:8888 3C:B4:5A:F9:88:43:5E:62:69:9F:A9:9D:41:14:03:BA:83:24:AC:04:CE:BD:92:49:1B:8D:B2:A4:86:39:4C:AC\n127.0.0.1:8888 3C:B4:5A:F9:88:43:5E:62:69:9F:A9:9D:41:14:03:BA:83:24:AC:04:CE:BD:92:49:1B:8D:B2:A4:86:39:4C:AC\n"})}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"If you are unsure whether requests use the hostname or an IP address, configure both in the file."})}),"\n",(0,t.jsx)(n.h3,{id:"start-besu-1",children:"Start Besu"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"besu --privacy-tls-enabled --privacy-tls-keystore-file=/Users/me/my_node/keystore.pfx --privacy-tls-keystore-password-file=/Users/me/my_node/keystorePassword --privacy-tls-known-enclave-file=/Users/me/my_node/knownServers\n"})}),"\n",(0,t.jsx)(n.p,{children:"The command line:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Enables TLS with the server using the ",(0,t.jsx)(n.a,{href:"/private-networks/reference/cli/options#privacy-tls-enabled-deprecated",children:(0,t.jsx)(n.code,{children:"--privacy-tls-enabled"})})," option."]}),"\n",(0,t.jsxs)(n.li,{children:["Specifies the keystore using the ",(0,t.jsx)(n.a,{href:"/private-networks/reference/cli/options#privacy-tls-keystore-file-deprecated",children:(0,t.jsx)(n.code,{children:"--privacy-tls-keystore-file"})})," option."]}),"\n",(0,t.jsxs)(n.li,{children:["Specifies the file that contains the password to decrypt the keystore using the ",(0,t.jsx)(n.a,{href:"/private-networks/reference/cli/options#privacy-tls-keystore-password-file-deprecated",children:(0,t.jsx)(n.code,{children:"--privacy-tls-keystore-password-file"})})," option."]}),"\n",(0,t.jsxs)(n.li,{children:["Specifies the trusted servers using the ",(0,t.jsx)(n.a,{href:"/private-networks/reference/cli/options#privacy-tls-known-enclave-file-deprecated",children:(0,t.jsx)(n.code,{children:"--privacy-tls-known-enclave-file"})})," option."]}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},26018:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/Besu_TLS-ed8bb10233da06f7c5f3d62628dfcb80.png"},28453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>l});var t=s(96540);const r={},i=t.createContext(r);function c(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:c(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/563e4b8b.f5989863.js b/assets/js/563e4b8b.f5989863.js new file mode 100644 index 00000000000..823c6020b9e --- /dev/null +++ b/assets/js/563e4b8b.f5989863.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2554],{64745:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>c,metadata:()=>o,toc:()=>u});var a=t(74848),s=t(28453),i=t(11470),r=t(19365);const c={title:"Use the Engine API",sidebar_position:2,description:"Use the Engine API to communicate with a consensus client.",tags:["public networks"]},l="Use the Engine API",o={id:"public-networks/how-to/use-engine-api",title:"Use the Engine API",description:"Use the Engine API to communicate with a consensus client.",source:"@site/docs/public-networks/how-to/use-engine-api.md",sourceDirName:"public-networks/how-to",slug:"/public-networks/how-to/use-engine-api",permalink:"/public-networks/how-to/use-engine-api",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/use-engine-api.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Use the Engine API",sidebar_position:2,description:"Use the Engine API to communicate with a consensus client.",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Access logs using JSON-RPC",permalink:"/public-networks/how-to/use-besu-api/access-logs"},next:{title:"Create and send transactions",permalink:"/public-networks/how-to/send-transactions"}},d={},u=[{value:"Configure the Engine API",id:"configure-the-engine-api",level:2},{value:"Service ports",id:"service-ports",level:3},{value:"Host allowlist",id:"host-allowlist",level:3},{value:"Authentication",id:"authentication",level:2},{value:"Send a payload using the Engine API",id:"send-a-payload-using-the-engine-api",level:2},{value:"1. Prepare a payload",id:"1-prepare-a-payload",level:3},{value:"2. Get the payload",id:"2-get-the-payload",level:3},{value:"3. Execute the payload",id:"3-execute-the-payload",level:3},{value:"4. Update the fork choice",id:"4-update-the-fork-choice",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"use-the-engine-api",children:"Use the Engine API"})}),"\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"/public-networks/concepts/node-clients#execution-and-consensus-clients",children:"Consensus and execution clients"})," communicate with each other using the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/engine-api/",children:"Engine API"}),". These API methods are a separate subsection of the ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/",children:"JSON-RPC API"}),"."]}),"\n",(0,a.jsx)(n.h2,{id:"configure-the-engine-api",children:"Configure the Engine API"}),"\n",(0,a.jsx)(n.p,{children:"The Engine API is enabled by default even if no consensus client configuration exists. You can configure the Engine API to:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Specify the ",(0,a.jsx)(n.a,{href:"#service-ports",children:"service ports"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:["Specify the ",(0,a.jsx)(n.a,{href:"#host-allowlist",children:"host allowlist"}),"."]}),"\n"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",metastring:'title="Example Engine API configuration"',children:"besu --engine-rpc-port=8551 --engine-host-allowlist=localhost,127.0.0.1 --engine-jwt-secret=jwt.hex\n"})}),"\n",(0,a.jsx)(n.h3,{id:"service-ports",children:"Service ports"}),"\n",(0,a.jsxs)(n.p,{children:["To specify the port the Engine API service listens on for HTTP and WebSocket, use the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/cli/options#engine-rpc-port",children:(0,a.jsx)(n.code,{children:"--engine-rpc-port"})})," option. The default is ",(0,a.jsx)(n.code,{children:"8551"}),". This option is useful when you have another execution engine running on port 8551, in which case you can specify Besu to use another port, for example, ",(0,a.jsx)(n.code,{children:"--engine-rpc-port 8552"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"host-allowlist",children:"Host allowlist"}),"\n",(0,a.jsxs)(n.p,{children:["To prevent DNS rebinding attacks, Besu checks incoming HTTP request host headers, WebSocket connections, and GraphQL requests. Besu accepts requests only when hostnames specified using the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/cli/options#engine-host-allowlist",children:(0,a.jsx)(n.code,{children:"--engine-host-allowlist"})})," option matches the request host headers. By default, Besu accepts requests and connections from ",(0,a.jsx)(n.code,{children:"localhost"})," and ",(0,a.jsx)(n.code,{children:"127.0.0.1"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["This isn't a permissioning feature. To restrict access to the Engine API, we recommend using ",(0,a.jsx)(n.a,{href:"#authentication",children:"authentication"}),"."]})}),"\n",(0,a.jsx)(n.p,{children:"If your application publishes RPC ports, specify the hostnames when starting Besu."}),"\n",(0,a.jsxs)(n.p,{children:["Specify ",(0,a.jsx)(n.code,{children:"*"})," for ",(0,a.jsx)(n.code,{children:"--engine-host-allowlist"})," to effectively disable host protection."]}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsxs)(n.p,{children:["We don't recommend specifying ",(0,a.jsx)(n.code,{children:"*"})," for ",(0,a.jsx)(n.code,{children:"--engine-host-allowlist"})," in production."]})}),"\n",(0,a.jsx)(n.h2,{id:"authentication",children:"Authentication"}),"\n",(0,a.jsxs)(n.p,{children:["By default, ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"authentication"})," for the Engine API is enabled. To disable, set the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/cli/options#engine-jwt-disabled",children:(0,a.jsx)(n.code,{children:"--engine-jwt-disabled"})})," option to ",(0,a.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,a.jsxs)(n.admonition,{type:"caution",children:[(0,a.jsx)(n.p,{children:"Don't disable JWT authentication in production environments."}),(0,a.jsx)(n.p,{children:"Disable only for testing purposes."})]}),"\n",(0,a.jsxs)(n.p,{children:["Set the ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate#jwt-public-key-authentication",children:"JWT secret"})," by using the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/cli/options#engine-jwt-secret",children:(0,a.jsx)(n.code,{children:"--engine-jwt-secret"})})," option."]}),"\n",(0,a.jsx)(n.h2,{id:"send-a-payload-using-the-engine-api",children:"Send a payload using the Engine API"}),"\n",(0,a.jsx)(n.h3,{id:"1-prepare-a-payload",children:"1. Prepare a payload"}),"\n",(0,a.jsxs)(n.p,{children:["Prepare to send a payload using ",(0,a.jsx)(n.a,{href:"/public-networks/reference/engine-api/#engine_forkchoiceupdatedv1",children:(0,a.jsx)(n.code,{children:"engine_forkchoiceUpdatedV1"})}),"."]}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"engine_forkchoiceUpdatedV1","params":[{"headBlockHash": "0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a", "safeBlockHash": "0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a", "finalizedBlockHash": "0x0000000000000000000000000000000000000000000000000000000000000000"},{"timestamp": "0x5","prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000","suggestedFeeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b"}],"id":67}\' http://127.0.0.1:8550\n'})})}),(0,a.jsx)(r.A,{value:"JSON result",label:"JSON result",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 67,\n "result": {\n "payloadStatus": {\n "status": "VALID",\n "latestValidHash": "0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a",\n "validationError": null\n },\n "payloadId": "0x0000000021f32cc1"\n }\n}\n'})})})]}),"\n",(0,a.jsx)(n.h3,{id:"2-get-the-payload",children:"2. Get the payload"}),"\n",(0,a.jsxs)(n.p,{children:["Get the payload using ",(0,a.jsx)(n.a,{href:"/public-networks/reference/engine-api/#engine_getpayloadv1",children:(0,a.jsx)(n.code,{children:"engine_getPayloadV1"})})]}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"engine_getPayloadV1","params":["0x1"],"id":1}\' http://127.0.0.1:8550\n'})})}),(0,a.jsx)(r.A,{value:"JSON result",label:"JSON result",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "parentHash": "0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a",\n "feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",\n "stateRoot": "0xca3149fa9e37db08d1cd49c9061db1002ef1cd58db2210f2115c8c989b2bdf45",\n "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "blockNumber": "0x1",\n "gasLimit": "0x1c9c380",\n "gasUsed": "0x0",\n "timestamp": "0x5",\n "extraData": "0x",\n "baseFeePerGas": "0x7",\n "blockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",\n "transactions": []\n }\n}\n'})})})]}),"\n",(0,a.jsx)(n.h3,{id:"3-execute-the-payload",children:"3. Execute the payload"}),"\n",(0,a.jsxs)(n.p,{children:["Execute the payload using ",(0,a.jsx)(n.a,{href:"/public-networks/reference/engine-api/#engine_newpayloadv1",children:(0,a.jsx)(n.code,{children:"engine_newPayloadV1"})})]}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"engine_newPayloadV1","params":[\n {\n "parentHash": "0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a",\n "feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",\n "stateRoot": "0xca3149fa9e37db08d1cd49c9061db1002ef1cd58db2210f2115c8c989b2bdf45",\n "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "blockNumber": "0x1",\n "gasLimit": "0x1c9c380",\n "gasUsed": "0x0",\n "timestamp": "0x5",\n "extraData": "0x",\n "baseFeePerGas": "0x7",\n "blockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",\n "transactions": []\n }\n],"id":67}\' http://127.0.0.1:8550\n'})})}),(0,a.jsx)(r.A,{value:"JSON result",label:"JSON result",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "status": "VALID",\n "latestValidHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",\n "validationError": null\n }\n}\n'})})})]}),"\n",(0,a.jsx)(n.h3,{id:"4-update-the-fork-choice",children:"4. Update the fork choice"}),"\n",(0,a.jsxs)(n.p,{children:["Update the fork choice using ",(0,a.jsx)(n.a,{href:"/public-networks/reference/engine-api/#engine_forkchoiceupdatedv1",children:(0,a.jsx)(n.code,{children:"engine_forkchoiceUpdatedV1"})})," again."]}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"engine_forkchoiceUpdatedV1","params":[{"headBlockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858", "safeBlockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858", "finalizedBlockHash": "0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a"},null],"id":67}\' http://127.0.0.1:8550\n'})})}),(0,a.jsx)(r.A,{value:"JSON result",label:"JSON result",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 67,\n "result": {\n "payloadStatus": {\n "status": "VALID",\n "latestValidHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",\n "validationError": null\n },\n "payloadId": null\n }\n}\n'})})})]})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var a=t(18215);const s={tabItem:"tabItem_Ymn6"};var i=t(74848);function r(e){let{children:n,hidden:t,className:r}=e;return(0,i.jsx)("div",{role:"tabpanel",className:(0,a.A)(s.tabItem,r),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>y});var a=t(96540),s=t(18215),i=t(23104),r=t(56347),c=t(205),l=t(57485),o=t(31682),d=t(70679);function u(e){return a.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,a.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:a,default:s}}=e;return{value:n,label:t,attributes:a,default:s}}))}(t);return function(e){const n=(0,o.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function b(e){let{queryString:n=!1,groupId:t}=e;const s=(0,r.W6)(),i=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l.aZ)(i),(0,a.useCallback)((e=>{if(!i)return;const n=new URLSearchParams(s.location.search);n.set(i,e),s.replace({...s.location,search:n.toString()})}),[i,s])]}function f(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,i=h(e),[r,l]=(0,a.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=t.find((e=>e.default))??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:i}))),[o,u]=b({queryString:t,groupId:s}),[f,x]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,i]=(0,d.Dv)(t);return[s,(0,a.useCallback)((e=>{t&&i.set(e)}),[t,i])]}({groupId:s}),g=(()=>{const e=o??f;return p({value:e,tabValues:i})?e:null})();(0,c.A)((()=>{g&&l(g)}),[g]);return{selectedValue:r,selectValue:(0,a.useCallback)((e=>{if(!p({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);l(e),u(e),x(e)}),[u,x,i]),tabValues:i}}var x=t(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=t(74848);function m(e){let{className:n,block:t,selectedValue:a,selectValue:r,tabValues:c}=e;const l=[],{blockElementScrollPositionUntilNextRender:o}=(0,i.a_)(),d=e=>{const n=e.currentTarget,t=l.indexOf(n),s=c[t].value;s!==a&&(o(n),r(s))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:c.map((e=>{let{value:n,label:t,attributes:i}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:e=>l.push(e),onKeyDown:u,onClick:d,...i,className:(0,s.A)("tabs__item",g.tabItem,i?.className,{"tabs__item--active":a===n}),children:t??n},n)}))})}function v(e){let{lazy:n,children:t,selectedValue:i}=e;const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===i));return e?(0,a.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==i})))})}function w(e){const n=f(e);return(0,j.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,j.jsx)(m,{...n,...e}),(0,j.jsx)(v,{...n,...e})]})}function y(e){const n=(0,x.A)();return(0,j.jsx)(w,{...e,children:u(e.children)},String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>c});var a=t(96540);const s={},i=a.createContext(s);function r(e){const n=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5af5c663.318693a4.js b/assets/js/5af5c663.318693a4.js new file mode 100644 index 00000000000..3eab4cb0fd3 --- /dev/null +++ b/assets/js/5af5c663.318693a4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8620],{1888:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>o,frontMatter:()=>c,metadata:()=>d,toc:()=>h});var n=s(74848),r=s(28453);const c={title:"Objects",description:"Besu API objects reference",tags:["public networks","private networks"]},i="Besu API objects",d={id:"public-networks/reference/api/objects",title:"Objects",description:"Besu API objects reference",source:"@site/docs/public-networks/reference/api/objects.md",sourceDirName:"public-networks/reference/api",slug:"/public-networks/reference/api/objects",permalink:"/public-networks/reference/api/objects",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/reference/api/objects.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{title:"Objects",description:"Besu API objects reference",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Besu API",permalink:"/public-networks/reference/api/"},next:{title:"Engine API",permalink:"/public-networks/reference/engine-api/"}},l={},h=[{value:"Block object",id:"block-object",level:2},{value:"Fee history results object",id:"fee-history-results-object",level:2},{value:"Filter options object",id:"filter-options-object",level:2},{value:"Log object",id:"log-object",level:2},{value:"Miner data object",id:"miner-data-object",level:2},{value:"Pending transaction object",id:"pending-transaction-object",level:2},{value:"Range object",id:"range-object",level:2},{value:"Structured log object",id:"structured-log-object",level:3},{value:"Trace object",id:"trace-object",level:2},{value:"Trace filter options object",id:"trace-filter-options-object",level:2},{value:"Transaction object",id:"transaction-object",level:2},{value:"Transaction call object",id:"transaction-call-object",level:2},{value:"Transaction receipt object",id:"transaction-receipt-object",level:2},{value:"Transaction trace object",id:"transaction-trace-object",level:2}];function a(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"besu-api-objects",children:"Besu API objects"})}),"\n",(0,n.jsx)(t.p,{children:"The following objects are parameters for or returned by Besu API methods."}),"\n",(0,n.jsx)(t.admonition,{type:"info",children:(0,n.jsxs)(t.p,{children:["This reference contains API objects that apply to both public and private networks. For private-network-specific API objects, see the ",(0,n.jsx)(t.a,{href:"/private-networks/reference/api/objects",children:"private network API object reference"}),"."]})}),"\n",(0,n.jsx)(t.h2,{id:"block-object",children:"Block object"}),"\n",(0,n.jsxs)(t.p,{children:["Returned by ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_getblockbyhash",children:(0,n.jsx)(t.code,{children:"eth_getBlockByHash"})})," and ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_getblockbynumber",children:(0,n.jsx)(t.code,{children:"eth_getBlockByNumber"})}),"."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"number"})}),(0,n.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,n.jsx)(t.em,{children:"Quantity"}),", Integer"]}),(0,n.jsxs)(t.td,{children:["Block number. ",(0,n.jsx)(t.code,{children:"null"})," when block is pending."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"hash"})}),(0,n.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,n.jsx)(t.em,{children:"Data"}),", 32\xa0bytes"]}),(0,n.jsxs)(t.td,{children:["Hash of the block. ",(0,n.jsx)(t.code,{children:"null"})," when block is pending."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"parentHash"})}),(0,n.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,n.jsx)(t.em,{children:"Data"}),", 32\xa0bytes"]}),(0,n.jsx)(t.td,{children:"Hash of the parent block."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"nonce"})}),(0,n.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,n.jsx)(t.em,{children:"Data"}),", 8\xa0bytes"]}),(0,n.jsxs)(t.td,{children:["Hash of the generated proof of work. ",(0,n.jsx)(t.code,{children:"null"})," when block is pending."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"sha3Uncles"})}),(0,n.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,n.jsx)(t.em,{children:"Data"}),", 32\xa0bytes"]}),(0,n.jsx)(t.td,{children:"SHA3 of the uncle's data in the block."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"logsBloom"})}),(0,n.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,n.jsx)(t.em,{children:"Data"}),", 256 bytes"]}),(0,n.jsxs)(t.td,{children:["Bloom filter for the block logs. ",(0,n.jsx)(t.code,{children:"null"})," when block is pending."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"transactionsRoot"})}),(0,n.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,n.jsx)(t.em,{children:"Data"}),", 32\xa0bytes"]}),(0,n.jsx)(t.td,{children:"Root of the transaction trie for the block."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"stateRoot"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsx)(t.td,{children:"Root of the final state trie for the block."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"receiptsRoot"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsx)(t.td,{children:"Root of the receipts trie for the block."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"miner"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,n.jsx)(t.td,{children:"Address to pay mining rewards to."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"difficulty"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsx)(t.td,{children:"Difficulty for this block."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"totalDifficulty"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["Total difficulty of the chain until this block. This value will always be ",(0,n.jsx)(t.code,{children:"0"})," for an uncle block."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"extraData"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data"}),(0,n.jsxs)(t.td,{children:["Extra data field for this block. The first 32 bytes is vanity data you can set using the ",(0,n.jsx)(t.a,{href:"/public-networks/reference/cli/options#miner-extra-data",children:(0,n.jsx)(t.code,{children:"--miner-extra-data"})})," command line option. Stores extra data when used with ",(0,n.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/clique#genesis-file",children:"Clique"})," and ",(0,n.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/ibft#genesis-file",children:"IBFT"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"size"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsx)(t.td,{children:"Size of block in bytes."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"gasLimit"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"Maximum gas allowed in this block."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"gasUsed"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"Total gas used by all transactions in this block."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"timestamp"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"Unix timestamp (milliseconds) for block assembly."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"transactions"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsxs)(t.td,{children:["Array of ",(0,n.jsx)(t.a,{href:"#transaction-object",children:"transaction objects"}),", or 32 byte transaction hashes depending on the specified boolean parameter."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"uncles"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsx)(t.td,{children:"Array of uncle hashes."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"baseFeePerGas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsxs)(t.td,{children:["The block's ",(0,n.jsx)(t.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:"base fee per gas"}),". This field is empty for blocks created before ",(0,n.jsx)(t.a,{href:"https://github.com/ethereum/EIPs/blob/2d8a95e14e56de27c5465d93747b0006bd8ac47f/EIPS/eip-1559.md",children:"EIP-1559"}),"."]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"fee-history-results-object",children:"Fee history results object"}),"\n",(0,n.jsxs)(t.p,{children:["Returned by ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_feehistory",children:(0,n.jsx)(t.code,{children:"eth_feeHistory"})})," for the requested block range. If blocks in the specified block range are not available, then only the fee history for available blocks is returned."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"oldestBlock"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsx)(t.td,{children:"Lowest number block of the returned range."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"baseFeePerGas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsxs)(t.td,{children:["Array of block base fees per gas, including an extra block value. The extra value is the next block after the newest block in the returned range. Returns zeroes for blocks created before ",(0,n.jsx)(t.a,{href:"https://github.com/ethereum/EIPs/blob/2d8a95e14e56de27c5465d93747b0006bd8ac47f/EIPS/eip-1559.md",children:"EIP-1559"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"baseFeePerBlobGas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsxs)(t.td,{children:["Array of base fees per blob gas. Returns zeroes for blocks created before ",(0,n.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-4844",children:"EIP-4844"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"gasUsedRatio"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsxs)(t.td,{children:["Array of block gas used ratios. These are calculated as the ratio of ",(0,n.jsx)(t.code,{children:"gasUsed"})," and ",(0,n.jsx)(t.code,{children:"gasLimit"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"blobGasUsedRatio"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsxs)(t.td,{children:["Array of blob gas used ratios. These are calculated as the ratio of ",(0,n.jsx)(t.code,{children:"blobGasUsed"})," and the max blob gas per block."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"reward"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsx)(t.td,{children:"Array of effective priority fee per gas data points from a single block. All zeroes are returned if the block is empty."})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"filter-options-object",children:"Filter options object"}),"\n",(0,n.jsxs)(t.p,{children:["Parameter for ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_newfilter",children:(0,n.jsx)(t.code,{children:"eth_newFilter"})}),", ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_getlogs",children:(0,n.jsx)(t.code,{children:"eth_getLogs"})}),", and ",(0,n.jsx)(t.a,{href:"/private-networks/reference/api/#priv_getlogs",children:(0,n.jsx)(t.code,{children:"priv_getLogs"})}),". Used to ",(0,n.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/access-logs",children:(0,n.jsx)(t.code,{children:"filter logs"})}),"."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Required/Optional"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"fromBlock"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity | Tag"}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Optional"}),(0,n.jsxs)(t.td,{children:["Integer block number or ",(0,n.jsx)(t.code,{children:"latest"}),", ",(0,n.jsx)(t.code,{children:"pending"}),", ",(0,n.jsx)(t.code,{children:"earliest"}),". See ",(0,n.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"}),". Default is ",(0,n.jsx)(t.code,{children:"latest"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"toBlock"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity | Tag"}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Optional"}),(0,n.jsxs)(t.td,{children:["Integer block number or ",(0,n.jsx)(t.code,{children:"latest"}),", ",(0,n.jsx)(t.code,{children:"pending"}),", ",(0,n.jsx)(t.code,{children:"earliest"}),". See ",(0,n.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"}),". Default is ",(0,n.jsx)(t.code,{children:"latest"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"address"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data | Array"}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Optional"}),(0,n.jsxs)(t.td,{children:["Contract address or array of addresses from which ",(0,n.jsx)(t.a,{href:"/public-networks/concepts/events-and-logs",children:"logs"})," originate."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"topics"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array of Data, 32\xa0bytes each"}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Optional"}),(0,n.jsxs)(t.td,{children:["Array of topics by which to ",(0,n.jsx)(t.a,{href:"/public-networks/concepts/events-and-logs#topic-filters",children:"filter logs"}),"."]})]})]})]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_getlogs",children:(0,n.jsx)(t.code,{children:"eth_getLogs"})})," and ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#priv_getlogs",children:(0,n.jsx)(t.code,{children:"priv_getLogs"})})," have an extra key."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Required/Optional"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"blockHash"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Optional."}),(0,n.jsxs)(t.td,{children:["Hash of block for which to return logs. If you specify ",(0,n.jsx)(t.code,{children:"blockHash"}),", you cannot specify ",(0,n.jsx)(t.code,{children:"fromBlock"})," and ",(0,n.jsx)(t.code,{children:"toBlock"}),"."]})]})})]}),"\n",(0,n.jsx)(t.h2,{id:"log-object",children:"Log object"}),"\n",(0,n.jsxs)(t.p,{children:["Returned by ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_getfilterchanges",children:(0,n.jsx)(t.code,{children:"eth_getFilterChanges"})})," and ",(0,n.jsx)(t.a,{href:"/private-networks/reference/api/#priv_getlogs",children:(0,n.jsx)(t.code,{children:"priv_getLogs"})}),". ",(0,n.jsx)(t.a,{href:"#transaction-receipt-object",children:(0,n.jsx)(t.code,{children:"Transaction receipt objects"})})," can contain an array of log objects."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"removed"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Tag"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.code,{children:"true"})," if log removed because of a chain reorganization. ",(0,n.jsx)(t.code,{children:"false"})," if a valid log."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"logIndex"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["Log index position in the block. ",(0,n.jsx)(t.code,{children:"null"})," when log is pending."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"transactionIndex"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["Index position of the starting transaction for the log. ",(0,n.jsx)(t.code,{children:"null"})," when log is pending."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"transactionHash"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsxs)(t.td,{children:["Hash of the starting transaction for the log. ",(0,n.jsx)(t.code,{children:"null"})," when log is pending."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"blockHash"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsxs)(t.td,{children:["Hash of the block that includes the log. ",(0,n.jsx)(t.code,{children:"null"})," when log is pending."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"blockNumber"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsxs)(t.td,{children:["Number of block that includes the log. ",(0,n.jsx)(t.code,{children:"null"})," when log is pending."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"address"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,n.jsx)(t.td,{children:"Address the log originated from."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"data"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data"}),(0,n.jsx)(t.td,{children:"Non-indexed arguments of the log."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"topics"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array of Data, 32\xa0bytes each"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"/public-networks/concepts/events-and-logs#event-signature-hash",children:"Event signature hash"})," and 0 to 3 ",(0,n.jsx)(t.a,{href:"/public-networks/concepts/events-and-logs#event-parameters",children:"indexed log arguments"}),"."]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"miner-data-object",children:"Miner data object"}),"\n",(0,n.jsxs)(t.p,{children:["Returned by ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_getminerdatabyblockhash-deprecated",children:(0,n.jsx)(t.code,{children:"eth_getMinerDataByBlockHash"})})," and ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_getminerdatabyblocknumber",children:(0,n.jsx)(t.code,{children:"eth_getMinerDataByBlockNumber"})}),"."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"netBlockReward"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["The net block reward, in Wei, is ",(0,n.jsx)(t.code,{children:"staticBlockReward + transactionFee + uncleInclusionReward"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"staticBlockReward"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsx)(t.td,{children:"The static block reward, in Wei, is preset on a hard fork."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"transactionFee"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["The transaction fee, in Wei, is ",(0,n.jsx)(t.code,{children:"sum of upfront cost - refund amount for all transactions"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"uncleInclusionReward"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["The uncle inclusion reward, in Wei, is ",(0,n.jsx)(t.code,{children:"static block reward * number of ommers/32"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"uncleRewards"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Map"}),(0,n.jsx)(t.td,{children:"Map of uncle block hashes and uncle miner coinbase addresses."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"coinbase"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,n.jsx)(t.td,{children:"Coinbase address."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"extraData"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data"}),(0,n.jsxs)(t.td,{children:["Extra data field for this block. The first 32 bytes is vanity data you can set using the ",(0,n.jsx)(t.a,{href:"/public-networks/reference/cli/options#miner-extra-data",children:(0,n.jsx)(t.code,{children:"--miner-extra-data"})})," command line option."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"difficulty"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsx)(t.td,{children:"Difficulty of this block."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"totalDifficulty"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsx)(t.td,{children:"Total difficulty of the chain until this block."})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"pending-transaction-object",children:"Pending transaction object"}),"\n",(0,n.jsxs)(t.p,{children:["Returned by ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#txpool_besupendingtransactions",children:(0,n.jsx)(t.code,{children:"txpool_besuPendingTransactions"})}),"."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"accessList"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsxs)(t.td,{children:["(Optional) List of addresses and storage keys the transaction plans to access. Used in ",(0,n.jsxs)(t.a,{href:"/public-networks/concepts/transactions/types#access_list-transactions",children:[(0,n.jsx)(t.code,{children:"ACCESS_LIST"})," transactions"]})," and may be used in ",(0,n.jsxs)(t.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:[(0,n.jsx)(t.code,{children:"EIP1559"})," transactions"]}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"from"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,n.jsx)(t.td,{children:"Address of the sender."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"gas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"Gas provided by the sender."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"gasPrice"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsxs)(t.td,{children:["(Optional) Gas price, in Wei, provided by the sender. Not used only in ",(0,n.jsxs)(t.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:[(0,n.jsx)(t.code,{children:"EIP1559"})," transactions"]}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"maxPriorityFeePerGas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["(Optional) Maximum fee, in Wei, the sender is willing to pay per gas above the base fee. Used only in ",(0,n.jsxs)(t.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:[(0,n.jsx)(t.code,{children:"EIP1559"})," transactions"]}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"maxFeePerGas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["(Optional) Maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. Used only in ",(0,n.jsxs)(t.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:[(0,n.jsx)(t.code,{children:"EIP1559"})," transactions"]}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"hash"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsx)(t.td,{children:"Hash of the transaction."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"input"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data"}),(0,n.jsx)(t.td,{children:"Data sent with the transaction to create or invoke a contract."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"nonce"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"Number of transactions made by the sender before this one."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"to"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,n.jsxs)(t.td,{children:["Address of the receiver. ",(0,n.jsx)(t.code,{children:"null"})," if a contract creation transaction."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"transactionType"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"String"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"/public-networks/concepts/transactions/types",children:"Transaction type"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"value"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"Value transferred, in Wei."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"v"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"ECDSA Recovery ID."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"r"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsx)(t.td,{children:"ECDSA signature r."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"s"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsx)(t.td,{children:"ECDSA signature s."})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"range-object",children:"Range object"}),"\n",(0,n.jsxs)(t.p,{children:["Returned by ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#debug_storagerangeat",children:(0,n.jsx)(t.code,{children:"debug_storageRangeAt"})}),"."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"storage"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Object"}),(0,n.jsxs)(t.td,{children:["Key hash and value. Pre-image key is ",(0,n.jsx)(t.code,{children:"null"})," if it falls outside the cache."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"nextKey"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Hash"}),(0,n.jsx)(t.td,{children:"Hash of next key if further storage in range. Otherwise, not included."})]})]})]}),"\n",(0,n.jsx)(t.h3,{id:"structured-log-object",children:"Structured log object"}),"\n",(0,n.jsxs)(t.p,{children:["Log information returned as part of the ",(0,n.jsx)(t.a,{href:"#trace-object",children:"Trace object"}),"."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"pc"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Integer"}),(0,n.jsx)(t.td,{children:"Current program counter."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"op"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"String"}),(0,n.jsx)(t.td,{children:"Current OpCode."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"gas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Integer"}),(0,n.jsx)(t.td,{children:"Gas remaining."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"gasCost"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Integer"}),(0,n.jsx)(t.td,{children:"Cost in wei of each gas unit."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"depth"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Integer"}),(0,n.jsx)(t.td,{children:"Execution depth."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"exceptionalHaltReasons"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsx)(t.td,{children:"One or more strings representing an error condition causing the EVM execution to terminate. These strings suggest that EVM execution terminated for reasons such as running out of gas or attempting to execute an unknown instruction. Generally a single exceptional halt reason returns but it's possible for more than one to occur at once."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"stack"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array of 32\xa0byte arrays"}),(0,n.jsx)(t.td,{children:"EVM execution stack before executing current operation."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"memory"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array of 32\xa0byte arrays"}),(0,n.jsx)(t.td,{children:"Memory space of the contract before executing current operation."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"storage"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Object"}),(0,n.jsx)(t.td,{children:"Storage entries changed by the current transaction."})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"trace-object",children:"Trace object"}),"\n",(0,n.jsxs)(t.p,{children:["Returned by ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#debug_traceblock",children:(0,n.jsx)(t.code,{children:"debug_traceBlock"})}),", ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#debug_traceblockbyhash",children:(0,n.jsx)(t.code,{children:"debug_traceBlockByHash"})}),", ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#debug_traceblockbynumber",children:(0,n.jsx)(t.code,{children:"debug_traceBlockByNumber"})}),", ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#debug_tracetransaction",children:(0,n.jsx)(t.code,{children:"debug_traceTransaction"})}),", and ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#debug_tracecall",children:(0,n.jsx)(t.code,{children:"debug_traceCall"})}),"."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"gas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Integer"}),(0,n.jsx)(t.td,{children:"Gas used by the transaction."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"failed"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Boolean"}),(0,n.jsx)(t.td,{children:"True if transaction failed, otherwise, false."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"returnValue"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"String"}),(0,n.jsxs)(t.td,{children:["Bytes returned from transaction execution (without a ",(0,n.jsx)(t.code,{children:"0x"})," prefix)."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"structLogs"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsx)(t.td,{children:"Array of structured log objects."})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"trace-filter-options-object",children:"Trace filter options object"}),"\n",(0,n.jsxs)(t.p,{children:["Parameter for ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#trace_filter",children:(0,n.jsx)(t.code,{children:"trace_filter"})}),". All parameters are optional."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"fromBLock"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"String | Tag"}),(0,n.jsx)(t.td,{children:"Trace starts at this block."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"toBlock"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"String | Tag"}),(0,n.jsx)(t.td,{children:"Trace stops at this block."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"fromAddress"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"String"}),(0,n.jsx)(t.td,{children:"Include only traces sent from this address."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"toAddress"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"String"}),(0,n.jsx)(t.td,{children:"Include only traces with this destination address."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"after"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"The offset trace number."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"count"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Integer"}),(0,n.jsx)(t.td,{children:"Number of traces to display in a batch."})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"transaction-object",children:"Transaction object"}),"\n",(0,n.jsxs)(t.p,{children:["Returned by ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_gettransactionbyhash",children:(0,n.jsx)(t.code,{children:"eth_getTransactionByHash"})}),", ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_gettransactionbyblockhashandindex",children:(0,n.jsx)(t.code,{children:"eth_getTransactionByBlockHashAndIndex"})}),", and ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_gettransactionbyblocknumberandindex",children:(0,n.jsx)(t.code,{children:"eth_getTransactionByBlockNumberAndIndex"})}),"."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"accessList"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsxs)(t.td,{children:["(Optional) List of addresses and storage keys the transaction plans to access. Used in ",(0,n.jsxs)(t.a,{href:"/public-networks/concepts/transactions/types#access_list-transactions",children:[(0,n.jsx)(t.code,{children:"ACCESS_LIST"})," transactions"]})," and may be used in ",(0,n.jsxs)(t.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:[(0,n.jsx)(t.code,{children:"EIP1559"})," transactions"]}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"blockHash"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsxs)(t.td,{children:["Hash of the block containing this transaction. ",(0,n.jsx)(t.code,{children:"null"})," when transaction is pending."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"blockNumber"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsxs)(t.td,{children:["Block number of the block containing this transaction. ",(0,n.jsx)(t.code,{children:"null"})," when transaction is pending."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"chainId"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"/public-networks/concepts/network-and-chain-id",children:"Chain ID"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"from"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,n.jsx)(t.td,{children:"Address of the sender."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"gas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"Gas provided by the sender."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"gasPrice"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsxs)(t.td,{children:["(Optional) Gas price, in Wei, provided by the sender. Used only in non-",(0,n.jsx)(t.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:(0,n.jsx)(t.code,{children:"EIP1559"})})," transactions."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"maxPriorityFeePerGas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["(Optional) Maximum fee, in Wei, the sender is willing to pay per gas above the base fee. Used only in ",(0,n.jsxs)(t.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:[(0,n.jsx)(t.code,{children:"EIP1559"})," transactions"]}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"maxFeePerGas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["(Optional) Maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. Used only in ",(0,n.jsxs)(t.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:[(0,n.jsx)(t.code,{children:"EIP1559"})," transactions"]}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"hash"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsx)(t.td,{children:"Hash of the transaction."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"input"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data"}),(0,n.jsxs)(t.td,{children:["Data sent with the transaction to create or invoke a contract. For ",(0,n.jsx)(t.a,{href:"/private-networks/concepts/privacy/",children:"private transactions"}),", it's a pointer to the transaction location in ",(0,n.jsx)(t.a,{href:"https://docs.tessera.consensys.net/",children:"Tessera"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"nonce"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"Number of transactions made by the sender before this one."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"to"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,n.jsxs)(t.td,{children:["Address of the receiver. ",(0,n.jsx)(t.code,{children:"null"})," if a contract creation transaction."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"transactionIndex"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["Index position of the transaction in the block. ",(0,n.jsx)(t.code,{children:"null"})," when transaction is pending."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"transactionType"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"String"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"/public-networks/concepts/transactions/types",children:"Transaction type"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"value"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"Value transferred, in Wei."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"v"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"ECDSA Recovery ID."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"r"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsx)(t.td,{children:"ECDSA signature r."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"s"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsx)(t.td,{children:"ECDSA signature s."})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"transaction-call-object",children:"Transaction call object"}),"\n",(0,n.jsxs)(t.p,{children:["Parameter for ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_call",children:(0,n.jsx)(t.code,{children:"eth_call"})}),", ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_createaccesslist",children:(0,n.jsx)(t.code,{children:"eth_createAccessList"})}),", and ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_estimategas",children:(0,n.jsx)(t.code,{children:"eth_estimateGas"})}),"."]}),"\n",(0,n.jsx)(t.p,{children:"All transaction call object parameters are optional."}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"from"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,n.jsx)(t.td,{children:"Address of the sender."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"to"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,n.jsx)(t.td,{children:"Address of the action receiver."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"gas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["Gas provided by the sender. ",(0,n.jsx)(t.code,{children:"eth_call"})," consumes zero gas, but other executions might need this parameter. ",(0,n.jsx)(t.code,{children:"eth_estimateGas"})," ignores this value."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"gasPrice"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["Gas price, in Wei, provided by the sender. The default is ",(0,n.jsx)(t.code,{children:"0"}),". Used only in non-",(0,n.jsx)(t.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:(0,n.jsx)(t.code,{children:"EIP1559"})})," transactions."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"maxPriorityFeePerGas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["Maximum fee, in Wei, the sender is willing to pay per gas above the base fee. Can be used only in ",(0,n.jsxs)(t.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:[(0,n.jsx)(t.code,{children:"EIP1559"})," transactions"]}),". If used, must specify ",(0,n.jsx)(t.code,{children:"maxFeePerGas"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"maxFeePerGas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["Maximum total fee (base fee + priority fee), in Wei, the sender is willing to pay per gas. Can be used only in ",(0,n.jsxs)(t.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:[(0,n.jsx)(t.code,{children:"EIP1559"})," transactions"]}),". If used, must specify ",(0,n.jsx)(t.code,{children:"maxPriorityFeePerGas"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"maxFeePerBlobGas"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsxs)(t.td,{children:["Maximum fee the sender is willing to pay per blob gas. Only used for blob transactions introduced in ",(0,n.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-4844",children:"EIP-4844"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"value"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsx)(t.td,{children:"Value transferred, in Wei."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"data"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data"}),(0,n.jsxs)(t.td,{children:["Hash of the method signature and encoded parameters. For details, see ",(0,n.jsx)(t.a,{href:"https://solidity.readthedocs.io/en/develop/abi-spec.html",children:"Ethereum Contract ABI"}),". Must be equal to ",(0,n.jsx)(t.code,{children:"input"})," if both parameters are provided."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"input"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data"}),(0,n.jsxs)(t.td,{children:["Hash of the method signature and encoded parameters. For details, see ",(0,n.jsx)(t.a,{href:"https://solidity.readthedocs.io/en/develop/abi-spec.html",children:"Ethereum Contract ABI"}),". Must be equal to ",(0,n.jsx)(t.code,{children:"data"})," if both parameters are provided."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"accessList"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsxs)(t.td,{children:["List of addresses and storage keys that the transaction plans to access. Used only in non-",(0,n.jsx)(t.a,{href:"/public-networks/concepts/transactions/types#frontier-transactions",children:(0,n.jsx)(t.code,{children:"FRONTIER"})})," transactions."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"strict"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Tag"}),(0,n.jsxs)(t.td,{children:["Determines if the sender account balance is checked. If ",(0,n.jsx)(t.code,{children:"true"}),", the balance is checked. If ",(0,n.jsx)(t.code,{children:"false"}),", the balance is not checked. If not specified, the balance is checked against the gas parameters if supplied."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"blobVersionedHashes"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsxs)(t.td,{children:["List of references to blobs introduced in ",(0,n.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-4844",children:"EIP-4844"}),"."]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"transaction-receipt-object",children:"Transaction receipt object"}),"\n",(0,n.jsxs)(t.p,{children:["Returned by ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#eth_gettransactionreceipt",children:(0,n.jsx)(t.code,{children:"eth_getTransactionReceipt"})}),"."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"blockHash"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsx)(t.td,{children:"Hash of block containing this transaction."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"blockNumber"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"Block number of block containing this transaction."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"contractAddress"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,n.jsxs)(t.td,{children:["Contract address created, if contract creation transaction, otherwise, ",(0,n.jsx)(t.code,{children:"null"}),". A failed contract creation transaction still produces a contract address value."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"cumulativeGasUsed"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"Total amount of gas used by previous transactions in the block and this transaction."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"effectiveGasPrice"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsxs)(t.td,{children:["The ",(0,n.jsx)(t.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:"actual value per gas deducted"})," from the sender's account."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"from"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,n.jsx)(t.td,{children:"Address of the sender."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"gasUsed"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsx)(t.td,{children:"Amount of gas used by this specific transaction."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"logs"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsxs)(t.td,{children:["Array of ",(0,n.jsx)(t.a,{href:"#log-object",children:"log objects"})," generated by this transaction."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"logsBloom"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 256\xa0bytes"}),(0,n.jsx)(t.td,{children:"Bloom filter for light clients to quickly retrieve related logs."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"status"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsxs)(t.td,{children:["Either ",(0,n.jsx)(t.code,{children:"0x0"})," (failure), ",(0,n.jsx)(t.code,{children:"0x1"})," (success), or ",(0,n.jsx)(t.code,{children:"0x2"})," (invalid)."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"to"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,n.jsx)(t.td,{children:"Address of the receiver, if sending ether, otherwise, null."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"transactionHash"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsx)(t.td,{children:"Hash of the transaction."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"transactionIndex"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,n.jsx)(t.td,{children:"Index position of transaction in the block."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"transactionType"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"String"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"/public-networks/concepts/transactions/types",children:"Transaction type"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"revertReason"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"String"}),(0,n.jsxs)(t.td,{children:["ABI-encoded string that displays the ",(0,n.jsx)(t.a,{href:"/private-networks/how-to/send-transactions/revert-reason",children:"reason for reverting the transaction"}),". Only available if revert reason is ",(0,n.jsx)(t.a,{href:"/public-networks/reference/cli/options#revert-reason-enabled",children:"enabled"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"type"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,n.jsxs)(t.td,{children:["Transaction type, ",(0,n.jsx)(t.code,{children:"0x00"})," for legacy transactions, ",(0,n.jsx)(t.code,{children:"0x01"})," for access list types, ",(0,n.jsx)(t.code,{children:"0x02"})," for dynamic fees, and ",(0,n.jsx)(t.code,{children:"0x03"})," for blob transactions."]})]})]})]}),"\n",(0,n.jsxs)(t.admonition,{type:"note",children:[(0,n.jsxs)(t.p,{children:["For pre-Byzantium transactions, the transaction receipt object includes the following instead of ",(0,n.jsx)(t.code,{children:"status"}),":"]}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"root"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsx)(t.td,{children:"Post-transaction state root"})]})})]})]}),"\n",(0,n.jsx)(t.h2,{id:"transaction-trace-object",children:"Transaction trace object"}),"\n",(0,n.jsxs)(t.p,{children:["Returned by ",(0,n.jsx)(t.a,{href:"/public-networks/reference/api/#trace_replayblocktransactions",children:(0,n.jsx)(t.code,{children:"trace_replayBlockTransactions"})}),"."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Key"}),(0,n.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"output"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Boolean"}),(0,n.jsx)(t.td,{children:"Transaction result. 1 for success and 0 for failure."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"stateDiff"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Object"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"/public-networks/reference/trace-types#statediff",children:"State changes in the requested block"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"trace"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"/public-networks/reference/trace-types#trace",children:"Ordered list of calls to other contracts"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"vmTrace"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Object"}),(0,n.jsxs)(t.td,{children:[(0,n.jsx)(t.a,{href:"/public-networks/reference/trace-types#vmtrace",children:"Ordered list of EVM actions"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"transactionHash"})}),(0,n.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,n.jsx)(t.td,{children:"Hash of the replayed transaction."})]})]})]})]})}function o(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(a,{...e})}):a(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>i,x:()=>d});var n=s(96540);const r={},c=n.createContext(r);function i(e){const t=n.useContext(c);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(c.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5b178458.92e3a64b.js b/assets/js/5b178458.92e3a64b.js new file mode 100644 index 00000000000..c4007bec880 --- /dev/null +++ b/assets/js/5b178458.92e3a64b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4717],{47122:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>a});var t=n(74848),s=n(28453);const i={title:"Bootnodes",description:"Configuring bootnodes",sidebar_position:3,tags:["private networks"]},r="Configure bootnodes",d={id:"private-networks/how-to/configure/bootnodes",title:"Bootnodes",description:"Configuring bootnodes",source:"@site/docs/private-networks/how-to/configure/bootnodes.md",sourceDirName:"private-networks/how-to/configure",slug:"/private-networks/how-to/configure/bootnodes",permalink:"/private-networks/how-to/configure/bootnodes",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/configure/bootnodes.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Bootnodes",description:"Configuring bootnodes",sidebar_position:3,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Free gas network",permalink:"/private-networks/how-to/configure/free-gas"},next:{title:"Validators",permalink:"/private-networks/how-to/configure/validators"}},c={},a=[{value:"Specify a bootnode",id:"specify-a-bootnode",level:2},{value:"Configure bootnodes in a production network",id:"configure-bootnodes-in-a-production-network",level:2},{value:"Add and remove bootnodes",id:"add-and-remove-bootnodes",level:2}];function l(e){const o={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.header,{children:(0,t.jsx)(o.h1,{id:"configure-bootnodes",children:"Configure bootnodes"})}),"\n",(0,t.jsx)(o.p,{children:"You can use bootnodes to initially discover peers. Bootnodes are regular nodes used to discover other nodes."}),"\n",(0,t.jsx)(o.p,{children:"In private networks for development or testing purposes, specify at least one bootnode."}),"\n",(0,t.jsxs)(o.p,{children:["In production networks, ",(0,t.jsx)(o.a,{href:"#configure-bootnodes-in-a-production-network",children:"configure two or more nodes as bootnodes"}),"."]}),"\n",(0,t.jsxs)(o.admonition,{type:"tip",children:[(0,t.jsx)(o.p,{children:"Bootnodes and static nodes are parallel methods for finding peers. Depending on your use case, you can use only bootnodes, only static nodes, or both bootnodes and static nodes."}),(0,t.jsx)(o.p,{children:"When connecting to bootnodes, Besu attempts to connect to all bootnodes at once, at startup.\nWhen connecting to static nodes, Besu attempts to reconnect periodically, if the connection fails or is lost."}),(0,t.jsxs)(o.p,{children:["To find peers, configure one or more bootnodes. To configure a specific set of peer connections, use ",(0,t.jsx)(o.a,{href:"/public-networks/how-to/connect/static-nodes",children:"static nodes"}),"."]})]}),"\n",(0,t.jsx)(o.admonition,{title:"Mainnet and public testnets",type:"note",children:(0,t.jsxs)(o.p,{children:["For Mainnet and the Sepolia, Ephemery and Holesky testnets, Besu has an internal list of enode URLs and uses this list automatically when you specify the ",(0,t.jsx)(o.a,{href:"/public-networks/reference/cli/options#network",children:(0,t.jsx)(o.code,{children:"--network"})})," option."]})}),"\n",(0,t.jsx)(o.h2,{id:"specify-a-bootnode",children:"Specify a bootnode"}),"\n",(0,t.jsxs)(o.p,{children:["To start a node, specify a bootnode ",(0,t.jsx)(o.a,{href:"/public-networks/concepts/node-keys",children:"enode"})," for P2P discovery, using the ",(0,t.jsx)(o.a,{href:"/public-networks/reference/cli/options#bootnodes",children:(0,t.jsx)(o.code,{children:"--bootnodes"})})," option."]}),"\n",(0,t.jsx)(o.pre,{children:(0,t.jsx)(o.code,{className:"language-bash",children:"besu --genesis-file=privateNetworkGenesis.json --data-path=nodeDataPath --bootnodes=enode://c35c3ec90a8a51fd5703594c6303382f3ae6b2ecb99bab2c04b3794f2bc3fc2631dabb0c08af795787a6c004d8f532230ae6e9925cbbefb0b28b79295d615f@127.0.0.1:30303\n"})}),"\n",(0,t.jsxs)(o.p,{children:["The default host and port advertised to other peers for P2P discovery is ",(0,t.jsx)(o.code,{children:"127.0.0.1:30303"}),". To specify a different host or port, use the ",(0,t.jsx)(o.a,{href:"/public-networks/reference/cli/options#p2p-host",children:(0,t.jsx)(o.code,{children:"--p2p-host"})})," and ",(0,t.jsx)(o.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,t.jsx)(o.code,{children:"--p2p-port"})})," options."]}),"\n",(0,t.jsxs)(o.p,{children:["By default, peer discovery listens on all available network interfaces. If the device Besu is running on must bind to a specific network interface, specify the interface using the ",(0,t.jsx)(o.a,{href:"/public-networks/reference/cli/options#p2p-interface",children:(0,t.jsx)(o.code,{children:"--p2p-interface"})})," option."]}),"\n",(0,t.jsx)(o.h2,{id:"configure-bootnodes-in-a-production-network",children:"Configure bootnodes in a production network"}),"\n",(0,t.jsx)(o.p,{children:"A network must have at least one operating bootnode. To allow for continuity in the event of failure, configure two or more bootnodes in a production network. If you don't configure any bootnodes, Besu uses Mainnet's default bootnodes."}),"\n",(0,t.jsxs)(o.p,{children:["We don't recommend putting bootnodes behind a load balancer because the ",(0,t.jsx)(o.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode"})," relates to the node public key, IP address, and discovery ports. Any changes to a bootnode enode prevents other nodes from being able to establish a connection with the bootnode. This is why we recommend putting more bootnodes on the network itself."]}),"\n",(0,t.jsx)(o.p,{children:"To ensure a bootnode enode doesn't change when recovering from a complete bootnode failure:"}),"\n",(0,t.jsxs)(o.ol,{children:["\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsxs)(o.p,{children:["Create the ",(0,t.jsx)(o.a,{href:"/public-networks/concepts/node-keys",children:"node key pair"})," (that is, the private and public key) before starting the bootnode."]}),"\n"]}),"\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsx)(o.p,{children:"When creating bootnodes in the cloud (for example, AWS and Azure), attempt to assign a static IP address to them. If your network is:"}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsx)(o.li,{children:"Publicly accessible, assign an elastic IP."}),"\n",(0,t.jsx)(o.li,{children:"Internal only, specify a private IP address when you create the instance and record this IP address."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(o.p,{children:"We recommend storing the bootnode configuration under source control."}),"\n",(0,t.jsx)(o.p,{children:"To allow for failure, specify all bootnodes on the command line (even to the bootnodes themselves)."}),"\n",(0,t.jsx)(o.admonition,{type:"tip",children:(0,t.jsx)(o.p,{children:"Having each bootnode list the other bootnodes increases the speed of discovery. Nodes ignore their own enode in the bootnodes list so it isn't required to specify different bootnode lists to the bootnodes themselves."})}),"\n",(0,t.jsx)(o.h2,{id:"add-and-remove-bootnodes",children:"Add and remove bootnodes"}),"\n",(0,t.jsxs)(o.p,{children:["Adding new bootnodes is a similar process to creating bootnodes. After creating the bootnodes and adding them to the network, update the ",(0,t.jsx)(o.a,{href:"/public-networks/reference/cli/options#bootnodes",children:(0,t.jsx)(o.code,{children:"--bootnodes"})})," command line option for each node to include the new bootnodes."]}),"\n",(0,t.jsxs)(o.p,{children:["When adding bootnodes, you don't need to restart running nodes. By updating the ",(0,t.jsx)(o.a,{href:"/public-networks/reference/cli/options#bootnodes",children:(0,t.jsx)(o.code,{children:"--bootnodes"})})," option, the next time you restart the nodes (for example, when ",(0,t.jsx)(o.a,{href:"/public-networks/how-to/upgrade-node",children:"upgrading"}),"), the nodes connect to the new bootnodes."]})]})}function h(e={}){const{wrapper:o}={...(0,s.R)(),...e.components};return o?(0,t.jsx)(o,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},28453:(e,o,n)=>{n.d(o,{R:()=>r,x:()=>d});var t=n(96540);const s={},i=t.createContext(s);function r(e){const o=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function d(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),t.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5c820069.f071fa36.js b/assets/js/5c820069.f071fa36.js new file mode 100644 index 00000000000..1c47738eb8b --- /dev/null +++ b/assets/js/5c820069.f071fa36.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[510],{41266:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>f,frontMatter:()=>s,metadata:()=>o,toc:()=>d});var a=t(74848),r=t(28453);const s={title:"Use the web3js-quorum multi-node example",sidebar_position:3,description:"web3js-quorum client library multi-node example",tags:["private networks"]},i="Use the multi-node example in the web3js-quorum client library (Deprecated)",o={id:"private-networks/tutorials/privacy/web3js-quorum",title:"Use the web3js-quorum multi-node example",description:"web3js-quorum client library multi-node example",source:"@site/docs/private-networks/tutorials/privacy/web3js-quorum.md",sourceDirName:"private-networks/tutorials/privacy",slug:"/private-networks/tutorials/privacy/web3js-quorum",permalink:"/private-networks/tutorials/privacy/web3js-quorum",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/privacy/web3js-quorum.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Use the web3js-quorum multi-node example",sidebar_position:3,description:"web3js-quorum client library multi-node example",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Create a multi-tenant network",permalink:"/private-networks/tutorials/privacy/multi-tenancy"},next:{title:"Create a privacy-enabled network using the Quorum Developer Quickstart (Deprecated)",permalink:"/private-networks/tutorials/privacy/quickstart"}},c={},d=[];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"use-the-multi-node-example-in-the-web3js-quorum-client-library-deprecated",children:"Use the multi-node example in the web3js-quorum client library (Deprecated)"})}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsxs)(n.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,a.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,a.jsxs)(n.p,{children:["To use the examples provided in the web3js-quorum library with ",(0,a.jsx)(n.a,{href:"/private-networks/tutorials/privacy/",children:"your privacy network"}),":"]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["This example uses 3 of the 4 nodes configured in the ",(0,a.jsx)(n.a,{href:"/private-networks/tutorials/privacy/",children:"privacy tutorial"}),"."]})}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Clone the ",(0,a.jsx)(n.strong,{children:"ConsenSys/web3js-quorum"})," repository:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/ConsenSys/web3js-quorum\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["In the ",(0,a.jsx)(n.code,{children:"web3js-quorum"})," directory:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"npm install\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["In the ",(0,a.jsx)(n.code,{children:"example"})," directory, update the ",(0,a.jsx)(n.code,{children:"keys.js"})," file to include:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"chain ID"}),"\n",(0,a.jsx)(n.li,{children:"Tessera node public keys"}),"\n",(0,a.jsx)(n.li,{children:"Besu node RPC URLs"}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"/public-networks/concepts/node-keys#node-private-key",children:"Besu node private keys"}),"."]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["In the ",(0,a.jsx)(n.code,{children:"example/multiNodeExample"})," directory, deploy the contract:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"node deployContract.js\n"})}),"\n",(0,a.jsx)(n.p,{children:"A private transaction receipt returns."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-text",children:"Transaction Hash 0x23b57ddc3ecf9c9a548e4401a411420ffc0002fd259a86d5656add7c6108beeb\nWaiting for transaction to be mined ...\nPrivate Transaction Receipt\n{ contractAddress: '0xfee84481da8f4b9a998dfacb38091b3145bb01ab',\n from: '0x9811ebc35d7b06b3fa8dc5809a1f9c52751e1deb',\n to: null,\n output:\n '0x6080604052600436106100565763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f245811461005b5780636057361d1461008257806367e404ce146100ae575b600080fd5b34801561006757600080fd5b506100706100ec565b60408051918252519081900360200190f35b34801561008e57600080fd5b506100ac600480360360208110156100a557600080fd5b50356100f2565b005b3480156100ba57600080fd5b506100c3610151565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60025490565b604080513381526020810183905281517fc9db20adedc6cf2b5d25252b101ab03e124902a73fcb12b753f3d1aaa2d8f9f5929181900390910190a16002556001805473ffffffffffffffffffffffffffffffffffffffff191633179055565b60015473ffffffffffffffffffffffffffffffffffffffff169056fea165627a7a72305820c7f729cb24e05c221f5aa913700793994656f233fe2ce3b9fd9a505ea17e8d8a0029',\n logs: [] }\n"})}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["If you receive a ",(0,a.jsx)(n.code,{children:"Method not enabled"})," error, ensure you enabled the appropriate APIs using the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,a.jsx)(n.code,{children:"--rpc-http-api"})})]})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Copy the contract address from the private transaction receipt and set the ",(0,a.jsx)(n.code,{children:"CONTRACT_ADDRESS"})," environment variable:"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"export CONTRACT_ADDRESS=\n"})}),"\n",(0,a.jsx)(n.admonition,{title:"example",type:"tip",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"export CONTRACT_ADDRESS=0xfee84481da8f4b9a998dfacb38091b3145bb01ab\n"})})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Store a value in the contract from Node 1:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"node storeValueFromNode1.js\n"})}),"\n",(0,a.jsx)(n.p,{children:"Node 1 stores the value of 1000 (3e8 in hex) and is visible to Node 1 and Node 2."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"Transaction Hash: 0xd9d71cc6f64675e1a48183ded8f08930af317eb883ebae4c4eec66ae68618d85\nWaiting for transaction to be mined ...\nEvent Emited: 0x0000000000000000000000009811ebc35d7b06b3fa8dc5809a1f9c52751e1deb00000000000000000000000000000000000000000000000000000000000003e8\nWaiting for transaction to be mined ...\nGet Value from http://localhost:8545: 0x00000000000000000000000000000000000000000000000000000000000003e8\nWaiting for transaction to be mined ...\nGet Value from http://localhost:8546: 0x00000000000000000000000000000000000000000000000000000000000003e8\nWaiting for transaction to be mined ...\nGet Value from http://localhost:8547: 0x\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Store a value in the contract from Node 2:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"node storeValueFromNode2.js\n"})}),"\n",(0,a.jsx)(n.p,{children:"Node 2 stores the value of 42 (2a in hex) and is visible to Node 1 and Node 2."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-text",children:"Transaction Hash: 0xa025433aec47a71b0230f12f43708812fd38ff7b7c1dc89a715f71dcbd5fbdbf\nWaiting for transaction to be mined ...\nEvent Emited: 0x000000000000000000000000372a70ace72b02cc7f1757183f98c620254f9c8d000000000000000000000000000000000000000000000000000000000000002a\nWaiting for transaction to be mined ...\nGet Value from http://localhost:8545: 0x000000000000000000000000000000000000000000000000000000000000002a\nWaiting for transaction to be mined ...\nGet Value from http://localhost:8546: 0x000000000000000000000000000000000000000000000000000000000000002a\nWaiting for transaction to be mined ...\nGet Value from http://localhost:8547: 0x\n"})}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsx)(n.p,{children:"As expected, log messages indicate that Node 3 Tessera cannot find payloads because Node 3 does not have access to the private transactions between Node 1 and Node 2."})}),"\n"]}),"\n"]})]})}function f(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var a=t(96540);const r={},s=a.createContext(r);function i(e){const n=a.useContext(s);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),a.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5ec0198e.58ab1ebf.js b/assets/js/5ec0198e.58ab1ebf.js new file mode 100644 index 00000000000..ca7af73c13f --- /dev/null +++ b/assets/js/5ec0198e.58ab1ebf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8715],{24211:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>l,frontMatter:()=>r,metadata:()=>a,toc:()=>d});var s=i(74848),o=i(28453);const r={title:"Permissioning",sidebar_position:1,description:"Besu permissioning feature",tags:["private networks"]},t="Permissioning",a={id:"private-networks/concepts/permissioning/index",title:"Permissioning",description:"Besu permissioning feature",source:"@site/docs/private-networks/concepts/permissioning/index.md",sourceDirName:"private-networks/concepts/permissioning",slug:"/private-networks/concepts/permissioning/",permalink:"/private-networks/concepts/permissioning/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/concepts/permissioning/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Permissioning",sidebar_position:1,description:"Besu permissioning feature",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Privacy plugin",permalink:"/private-networks/concepts/privacy/plugin"},next:{title:"Onchain permissioning",permalink:"/private-networks/concepts/permissioning/onchain"}},c={},d=[{value:"Node permissioning",id:"node-permissioning",level:2},{value:"Account permissioning",id:"account-permissioning",level:2},{value:"Specify permissioning",id:"specify-permissioning",level:2},{value:"Local",id:"local",level:3},{value:"Onchain (Deprecated)",id:"onchain-deprecated",level:3}];function p(e){const n={a:"a",admonition:"admonition",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"permissioning",children:"Permissioning"})}),"\n",(0,s.jsx)(n.p,{children:"A permissioned network enables node permissioning and account permissioning, allowing only specified nodes and accounts to access the network."}),"\n",(0,s.jsxs)(n.admonition,{title:"Permissioning is not privacy",type:"caution",children:[(0,s.jsx)(n.p,{children:"In peer-to-peer networks, node permissioning enforces rules on nodes you control."}),(0,s.jsx)(n.p,{children:"Permissioning requires a distributed network of trust across the network where participants agree to follow the rules. One bad actor can decide not to follow the rules. Nodes can take action to prevent the bad actor from adding to the chain but they cannot prevent the bad actor from allowing access to the chain."}),(0,s.jsxs)(n.p,{children:["Besu also implements ",(0,s.jsx)(n.a,{href:"/private-networks/concepts/privacy/",children:"privacy"}),"."]})]}),"\n",(0,s.jsx)(n.h2,{id:"node-permissioning",children:"Node permissioning"}),"\n",(0,s.jsx)(n.p,{children:"Use node permissioning to restrict access to known participants only."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Node Permissioning",src:i(20705).A+"",width:"1700",height:"1058"})}),"\n",(0,s.jsx)(n.h2,{id:"account-permissioning",children:"Account permissioning"}),"\n",(0,s.jsx)(n.p,{children:"Use account permissioning to:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Enforce onboarding or identity requirements."}),"\n",(0,s.jsx)(n.li,{children:"Suspend accounts."}),"\n",(0,s.jsx)(n.li,{children:"Restrict the actions an account can perform."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Account Permissioning",src:i(17608).A+"",width:"1700",height:"1170"})}),"\n",(0,s.jsx)(n.h2,{id:"specify-permissioning",children:"Specify permissioning"}),"\n",(0,s.jsxs)(n.p,{children:["You can specify permissioning ",(0,s.jsx)(n.a,{href:"#local",children:"locally"})," or ",(0,s.jsx)(n.a,{href:"#onchain",children:"onchain"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"local",children:"Local"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/private-networks/how-to/use-permissioning/local",children:"Local permissioning"})," works at the node level. Each node in the network has a ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/use-permissioning/local#permissions-configuration-file",children:"permissions configuration file"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"Local permissioning affects your node but not the rest of the network. Use local permissioning to restrict use of your node (that is, the resources under your control). For example, customers are able to access your node."}),"\n",(0,s.jsx)(n.p,{children:"Local permissioning does not require coordination with the rest of the network and you can act immediately to protect your node. Your rules are not enforced in blocks produced by other nodes."}),"\n",(0,s.jsx)(n.h3,{id:"onchain-deprecated",children:"Onchain (Deprecated)"}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsxs)(n.p,{children:["Onchain permissioning is deprecated in Besu version 24.12.0 and later. Please read this ",(0,s.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/private-networks/concepts/permissioning/onchain",children:"Onchain permissioning"})," works through a smart contract on the network. Specifying permissioning onchain enables all nodes to read and update permissioning configuration from one location."]}),"\n",(0,s.jsx)(n.p,{children:"Onchain permissioning requires coordination to update the rules. The network might not be able to act immediately (for example, the smart contract might enforce a minimum number of votes before changing permissioning rules)."}),"\n",(0,s.jsx)(n.p,{children:"When you update onchain permissioning, the update applies across the network and new blocks abide by the updated rules. For example, blocked accounts can no longer add transactions to the chain."}),"\n",(0,s.jsx)(n.p,{children:"The following diagram illustrates applying local and onchain permissioning rules."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Permissioning Flow",src:i(36920).A+"",width:"1656",height:"1134"})})]})}function l(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},36920:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/PermissioningFlow-083dd4871a10fb66a7bf7a0e7de03a1d.png"},17608:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/enterprise-ethereum-account-permissioning-5c19ac3228fd7a89cda25b53f80b890b.png"},20705:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/node-permissioning-bad-actor-a0e342071abf311e9f1f52e96581e6f6.png"},28453:(e,n,i)=>{i.d(n,{R:()=>t,x:()=>a});var s=i(96540);const o={},r=s.createContext(o);function t(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:t(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/66bba352.857dee58.js b/assets/js/66bba352.857dee58.js new file mode 100644 index 00000000000..8c1e2e2b8ff --- /dev/null +++ b/assets/js/66bba352.857dee58.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4546],{41830:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>l,frontMatter:()=>a,metadata:()=>r,toc:()=>p});var n=s(74848),o=s(28453);const a={title:"Pass JVM options",sidebar_position:2,description:"Passing Java virtual machine JVM options to Besu at runtime",tags:["public networks","private networks"]},i="Pass JVM options",r={id:"public-networks/how-to/configure-java/pass-jvm-options",title:"Pass JVM options",description:"Passing Java virtual machine JVM options to Besu at runtime",source:"@site/docs/public-networks/how-to/configure-java/pass-jvm-options.md",sourceDirName:"public-networks/how-to/configure-java",slug:"/public-networks/how-to/configure-java/pass-jvm-options",permalink:"/public-networks/how-to/configure-java/pass-jvm-options",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/configure-java/pass-jvm-options.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Pass JVM options",sidebar_position:2,description:"Passing Java virtual machine JVM options to Besu at runtime",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Install and update Java",permalink:"/public-networks/how-to/configure-java/install-update-java"},next:{title:"Manage JVM memory",permalink:"/public-networks/how-to/configure-java/manage-memory"}},c={},p=[];function u(e){const t={code:"code",h1:"h1",header:"header",p:"p",pre:"pre",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"pass-jvm-options",children:"Pass JVM options"})}),"\n",(0,n.jsx)(t.p,{children:"To perform tasks such as attaching a debugger or configuring the garbage collector, pass Java Virtual Machine (JVM) options to Besu."}),"\n",(0,n.jsxs)(t.p,{children:["Besu passes the contents of the ",(0,n.jsx)(t.code,{children:"BESU_OPTS"})," environment variable to the JVM. Set standard JVM options in the ",(0,n.jsx)(t.code,{children:"BESU_OPTS"})," variable."]}),"\n",(0,n.jsx)(t.p,{children:"For Bash-based executions, you can set the variable for only the scope of the program execution by setting it before starting Besu."}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"BESU_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 \\\nbesu --network=holesky\n"})})]})}function l(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(u,{...e})}):u(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>i,x:()=>r});var n=s(96540);const o={},a=n.createContext(o);function i(e){const t=n.useContext(a);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:i(e.components),n.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/67359d90.79f2626a.js b/assets/js/67359d90.79f2626a.js new file mode 100644 index 00000000000..54cbbef42e5 --- /dev/null +++ b/assets/js/67359d90.79f2626a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5434],{53147:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>l,toc:()=>o});var r=s(74848),t=s(28453);const i={title:"Access logs using JSON-RPC",sidebar_position:5,description:"Accessing logs using the Besu API",tags:["public networks","private networks"]},c="Access logs using the Besu API",l={id:"public-networks/how-to/use-besu-api/access-logs",title:"Access logs using JSON-RPC",description:"Accessing logs using the Besu API",source:"@site/docs/public-networks/how-to/use-besu-api/access-logs.md",sourceDirName:"public-networks/how-to/use-besu-api",slug:"/public-networks/how-to/use-besu-api/access-logs",permalink:"/public-networks/how-to/use-besu-api/access-logs",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/use-besu-api/access-logs.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:5,frontMatter:{title:"Access logs using JSON-RPC",sidebar_position:5,description:"Accessing logs using the Besu API",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Authenticate over JSON-RPC requests",permalink:"/public-networks/how-to/use-besu-api/authenticate"},next:{title:"Use the Engine API",permalink:"/public-networks/how-to/use-engine-api"}},a={},o=[{value:"Create a filter",id:"create-a-filter",level:2},{value:"Poll a filter for changes",id:"poll-a-filter-for-changes",level:3},{value:"Get all logs for a filter",id:"get-all-logs-for-a-filter",level:3},{value:"Uninstall a filter",id:"uninstall-a-filter",level:2},{value:"Filters for private contracts",id:"filters-for-private-contracts",level:2},{value:"Get logs using a filter options object",id:"get-logs-using-a-filter-options-object",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"access-logs-using-the-besu-api",children:"Access logs using the Besu API"})}),"\n",(0,r.jsxs)(n.p,{children:["Subscribe to events, such as logs, using either ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/rpc-pubsub",children:"RPC Pub/Sub over WebSockets"})," or filters over HTTP."]}),"\n",(0,r.jsx)(n.p,{children:"Access logs using the following Besu API methods:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getfilterchanges",children:(0,r.jsx)(n.code,{children:"eth_getFilterChanges"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getfilterlogs",children:(0,r.jsx)(n.code,{children:"eth_getFilterLogs"})})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getlogs",children:(0,r.jsx)(n.code,{children:"eth_getLogs"})}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Use ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_newfilter",children:(0,r.jsx)(n.code,{children:"eth_newFilter"})})," to create the filter before using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getfilterchanges",children:(0,r.jsx)(n.code,{children:"eth_getFilterChanges"})})," and ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getfilterlogs",children:(0,r.jsx)(n.code,{children:"eth_getFilterLogs"})}),")."]}),"\n",(0,r.jsxs)(n.p,{children:["Access logs for ",(0,r.jsx)(n.a,{href:"/private-networks/concepts/privacy/",children:"private contracts"})," using the equivalent ",(0,r.jsxs)(n.a,{href:"#filters-for-private-contracts",children:[(0,r.jsx)(n.code,{children:"priv_*"})," methods and specifying the privacy group ID"]}),". For example, ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#priv_getlogs",children:(0,r.jsx)(n.code,{children:"priv_getLogs"})}),"."]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["The following examples use the sample contract included in ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/events-and-logs",children:"events and logs"}),"."]})}),"\n",(0,r.jsx)(n.h2,{id:"create-a-filter",children:"Create a filter"}),"\n",(0,r.jsxs)(n.p,{children:["Create a filter using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_newfilter",children:(0,r.jsx)(n.code,{children:"eth_newFilter"})}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["If the ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/events-and-logs",children:"example contract"})," was deployed to 0x42699a7612a82f1d9c36148af9c77354759b210b, the following request for ",(0,r.jsx)(n.code,{children:"eth_newFilter"})," creates a filter to log when ",(0,r.jsx)(n.code,{children:"valueIndexed"})," is set to 5:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_newFilter",\n "params": [\n {\n "fromBlock": "earliest",\n "toBlock": "latest",\n "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",\n "topics": [\n ["0xd3610b1c54575b7f4f0dc03d210b8ac55624ae007679b7a928a4f25a709331a8"],\n ["0x0000000000000000000000000000000000000000000000000000000000000005"]\n ]\n }\n ],\n "id": 1\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_newfilter",children:(0,r.jsx)(n.code,{children:"eth_newFilter"})})," returns a filter ID hash (for example, ",(0,r.jsx)(n.code,{children:"0x1ddf0c00989044e9b41cc0ae40272df3"}),")."]}),"\n",(0,r.jsx)(n.h3,{id:"poll-a-filter-for-changes",children:"Poll a filter for changes"}),"\n",(0,r.jsxs)(n.p,{children:["To poll the filter for changes since the last poll, use ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getfilterchanges",children:(0,r.jsx)(n.code,{children:"eth_getFilterChanges"})})," with the filter ID hash returned by ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_newfilter",children:(0,r.jsx)(n.code,{children:"eth_newFilter"})}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["If the contract had been executed twice since the last poll, with ",(0,r.jsx)(n.code,{children:"valueIndexed"})," set to 1 and 5, ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getfilterchanges",children:(0,r.jsx)(n.code,{children:"eth_getFilterChanges"})})," returns only the log where the ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/events-and-logs#event-parameters",children:"topic"})," for ",(0,r.jsx)(n.code,{children:"valueIndexed"})," is 5:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x21c",\n "blockHash": "0xc7e6c9d5b9f522b2c9d2991546be0a8737e587beb6628c056f3c327a44b45132",\n "transactionHash": "0xfd1a40f9fbf89c97b4545ec9db774c85e51dd8a3545f969418a22f9cb79417c5",\n "transactionIndex": "0x0",\n "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",\n "data": "0x0000000000000000000000000000000000000000000000000000000000000005",\n "topics": [\n "0xd3610b1c54575b7f4f0dc03d210b8ac55624ae007679b7a928a4f25a709331a8",\n "0x0000000000000000000000000000000000000000000000000000000000000005"\n ]\n }\n ]\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"get-all-logs-for-a-filter",children:"Get all logs for a filter"}),"\n",(0,r.jsxs)(n.p,{children:["To get all logs for a filter, use ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getfilterlogs",children:(0,r.jsx)(n.code,{children:"eth_getFilterLogs"})}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["If the contract had been executed twice with ",(0,r.jsx)(n.code,{children:"valueIndexed"})," set to 5 since the filter was created using ",(0,r.jsx)(n.code,{children:"eth_newFilter"}),", ",(0,r.jsx)(n.code,{children:"eth_getFilterLogs"})," returns:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x1a7",\n "blockHash": "0x4edda22a242ddc7bc51e2b6b11e63cd67be1af7389470cdea9c869768ff75d42",\n "transactionHash": "0x9535bf8830a72ca7d0020df0b547adc4d0ecc4321b7d5b5d6beb1eccee5c0afa",\n "transactionIndex": "0x0",\n "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",\n "data": "0x0000000000000000000000000000000000000000000000000000000000000005",\n "topics": [\n "0xd3610b1c54575b7f4f0dc03d210b8ac55624ae007679b7a928a4f25a709331a8",\n "0x0000000000000000000000000000000000000000000000000000000000000005"\n ]\n },\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x21c",\n "blockHash": "0xc7e6c9d5b9f522b2c9d2991546be0a8737e587beb6628c056f3c327a44b45132",\n "transactionHash": "0xfd1a40f9fbf89c97b4545ec9db774c85e51dd8a3545f969418a22f9cb79417c5",\n "transactionIndex": "0x0",\n "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",\n "data": "0x0000000000000000000000000000000000000000000000000000000000000005",\n "topics": [\n "0xd3610b1c54575b7f4f0dc03d210b8ac55624ae007679b7a928a4f25a709331a8",\n "0x0000000000000000000000000000000000000000000000000000000000000005"\n ]\n }\n ]\n}\n'})}),"\n",(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsxs)(n.p,{children:["You can use ",(0,r.jsx)(n.a,{href:"#get-logs-using-a-filter-options-object",children:(0,r.jsx)(n.code,{children:"eth_getLogs"})})," with a filter options object to get all logs matching the filter options instead of using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_newfilter",children:(0,r.jsx)(n.code,{children:"eth_newFilter"})})," followed by ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getfilterlogs",children:(0,r.jsx)(n.code,{children:"eth_getFilterLogs"})}),"."]})}),"\n",(0,r.jsx)(n.h2,{id:"uninstall-a-filter",children:"Uninstall a filter"}),"\n",(0,r.jsxs)(n.p,{children:["When a filter is no longer required, use ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_uninstallfilter",children:(0,r.jsx)(n.code,{children:"eth_uninstallFilter"})})," to remove the filter."]}),"\n",(0,r.jsx)(n.h2,{id:"filters-for-private-contracts",children:"Filters for private contracts"}),"\n",(0,r.jsx)(n.p,{children:"Filters for private contracts are created, accessed, and uninstalled using:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#priv_getfilterchanges",children:(0,r.jsx)(n.code,{children:"priv_getFilterChanges"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#priv_getfilterlogs",children:(0,r.jsx)(n.code,{children:"priv_getFilterLogs"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#priv_getlogs",children:(0,r.jsx)(n.code,{children:"priv_getLogs"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#priv_newfilter",children:(0,r.jsx)(n.code,{children:"priv_newFilter"})})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#priv_uninstallfilter",children:(0,r.jsx)(n.code,{children:"priv_uninstallFilter"})}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.a,{href:"/private-networks/concepts/privacy/",children:"privacy group ID"})," must be specified as parameter 0 for the ",(0,r.jsx)(n.code,{children:"priv"})," methods."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "priv_newFilter",\n "params": [\n "4rFldHM792LeP/e2WPkTXZedjwKuTr/KwCFTt6mBbkI=",\n {\n "fromBlock": "earliest",\n "toBlock": "latest",\n "addresses": ["0x991cc548c154b2953cc48c02f782e1314097dfbb"],\n "topics": [\n "0x85bea11d86cefb165374e0f727bacf21dc2f4ea816493981ecf72dcfb212a410"\n ]\n }\n ],\n "id": 1\n}\n'})}),"\n",(0,r.jsx)(n.h2,{id:"get-logs-using-a-filter-options-object",children:"Get logs using a filter options object"}),"\n",(0,r.jsxs)(n.p,{children:["To get all logs for a filter options object, use ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getlogs",children:(0,r.jsx)(n.code,{children:"eth_getLogs"})})," or ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#priv_getlogs",children:(0,r.jsx)(n.code,{children:"priv_getLogs"})})," for a private contract."]}),"\n",(0,r.jsxs)(n.p,{children:["The following request for ",(0,r.jsx)(n.code,{children:"eth_getLogs"})," returns all the logs where the example contract has been deployed to ",(0,r.jsx)(n.code,{children:"0x42699a7612a82f1d9c36148af9c77354759b210b"})," and executed with ",(0,r.jsx)(n.code,{children:"valueIndexed"})," set to 5."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getLogs",\n "params": [\n {\n "fromBlock": "earliest",\n "toBlock": "latest",\n "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",\n "topics": [\n ["0xd3610b1c54575b7f4f0dc03d210b8ac55624ae007679b7a928a4f25a709331a8"],\n ["0x0000000000000000000000000000000000000000000000000000000000000005"]\n ]\n }\n ],\n "id": 1\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["The above example returns the same result as calling ",(0,r.jsx)(n.a,{href:"#creating-a-filter",children:"eth_newFilter"})," followed by ",(0,r.jsx)(n.a,{href:"#getting-all-logs-for-a-filter",children:"eth_getFilterLogs"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>c,x:()=>l});var r=s(96540);const t={},i=r.createContext(t);function c(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/680b46ee.4182c1b2.js b/assets/js/680b46ee.4182c1b2.js new file mode 100644 index 00000000000..d983bb1fe89 --- /dev/null +++ b/assets/js/680b46ee.4182c1b2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[9399],{5387:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>s,default:()=>d,frontMatter:()=>r,metadata:()=>c,toc:()=>a});var o=t(74848),i=t(28453);const r={description:"Monitoring using metrics and logging",tags:["public networks","private networks"]},s="Monitor Besu",c={id:"public-networks/how-to/monitor/index",title:"Monitor Besu",description:"Monitoring using metrics and logging",source:"@site/docs/public-networks/how-to/monitor/index.md",sourceDirName:"public-networks/how-to/monitor",slug:"/public-networks/how-to/monitor/",permalink:"/public-networks/how-to/monitor/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/monitor/index.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{description:"Monitoring using metrics and logging",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Specify NAT method",permalink:"/public-networks/how-to/connect/specify-nat"},next:{title:"Use metrics",permalink:"/public-networks/how-to/monitor/metrics"}},l={},a=[];function u(e){const n={a:"a",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"monitor-besu",children:"Monitor Besu"})}),"\n",(0,o.jsx)(n.p,{children:"Monitoring enables identification of node and network issues. Specifically, configuring metrics and logging enables:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/public-networks/how-to/monitor/metrics",children:"Visual representation of declining node or network performance"})}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"/public-networks/how-to/monitor/logging",children:"Collection of log files to enable issue diagnosis"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["For an overview of monitoring Besu, view ",(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=7BuutRe0I28&feature=youtu.be",children:"this recording"}),"."]})]})}function d(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>c});var o=t(96540);const i={},r=o.createContext(i);function s(e){const n=o.useContext(r);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),o.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6c6be066.9f4be9d0.js b/assets/js/6c6be066.9f4be9d0.js new file mode 100644 index 00000000000..a09a1d22ec0 --- /dev/null +++ b/assets/js/6c6be066.9f4be9d0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4417],{98938:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>d});var t=r(74848),a=r(28453);const s={title:"Include revert reason",description:"Including revert reason in transactions with Besu",sidebar_position:3,tags:["private networks"]},o="Revert reason",i={id:"private-networks/how-to/send-transactions/revert-reason",title:"Include revert reason",description:"Including revert reason in transactions with Besu",source:"@site/docs/private-networks/how-to/send-transactions/revert-reason.md",sourceDirName:"private-networks/how-to/send-transactions",slug:"/private-networks/how-to/send-transactions/revert-reason",permalink:"/private-networks/how-to/send-transactions/revert-reason",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/send-transactions/revert-reason.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Include revert reason",description:"Including revert reason in transactions with Besu",sidebar_position:3,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Send concurrent private transactions",permalink:"/private-networks/how-to/send-transactions/concurrent-private-transactions"},next:{title:"Monitoring",permalink:"/private-networks/how-to/monitor/"}},c={},d=[{value:"Enable revert reason",id:"enable-revert-reason",level:2},{value:"Where the revert reason is included",id:"where-the-revert-reason-is-included",level:2},{value:"Revert reason format",id:"revert-reason-format",level:2},{value:"Dapp support",id:"dapp-support",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"revert-reason",children:"Revert reason"})}),"\n",(0,t.jsxs)(n.p,{children:["In smart contracts, the ",(0,t.jsx)(n.a,{href:"https://docs.soliditylang.org/en/v0.8.12/control-structures.html#revert",children:(0,t.jsx)(n.code,{children:"revert"})})," operation triggers an exception to flag an error and revert the current call. The EVM passes back to the client an optional string message containing information about the error."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-sol",children:'pragma solidity ^0.8.4;\n\ncontract VendingMachine {\n address owner;\n constructor() {\n owner = msg.sender;\n }\n error Unauthorized();\n function buy(uint amount) public payable {\n if (amount > msg.value / 2 ether)\n revert("Not enough Ether provided.");\n // Alternative way to do it:\n require(\n amount <= msg.value / 2 ether,\n "Not enough Ether provided."\n );\n // Perform the purchase.\n }\n function withdraw() public {\n if (msg.sender != owner)\n revert Unauthorized();\n\n payable(msg.sender).transfer(address(this).balance);\n }\n}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"enable-revert-reason",children:"Enable revert reason"}),"\n",(0,t.jsxs)(n.p,{children:["Use the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#revert-reason-enabled",children:(0,t.jsx)(n.code,{children:"--revert-reason-enabled"})})," command line option to include the revert reason in the transaction receipt and the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/trace-types#trace",children:(0,t.jsx)(n.code,{children:"trace"})})," response in Besu."]}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsx)(n.p,{children:"Enabling revert reason may use a significant amount of memory. We do not recommend enabling revert reason when connected to public Ethereum networks."})}),"\n",(0,t.jsx)(n.h2,{id:"where-the-revert-reason-is-included",children:"Where the revert reason is included"}),"\n",(0,t.jsxs)(n.p,{children:["With revert reason enabled, the transaction receipt returned by ",(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gettransactionreceipt",children:(0,t.jsx)(n.code,{children:"eth_getTransactionReceipt"})})," includes the revert reason as an ABI-encoded string."]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["The revert reason is not included in the transaction receipt's root hash. Not including the revert reason in the transactions receipt's root hash means the revert reason is only available to nodes that execute the transaction when importing the block. That is, the revert reason is not available if using fast synchronization (",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:(0,t.jsx)(n.code,{children:"--sync-mode=FAST"})}),")."]})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",metastring:'title="Example of transaction receipt"',children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",\n "blockNumber": "0x50",\n "contractAddress": null,\n "cumulativeGasUsed": "0x5208",\n "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",\n "gasUsed": "0x5208",\n "logs": [],\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "status": "0x1",\n "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",\n "transactionHash": "0xc00e97af59c6f88de163306935f7682af1a34c67245e414537d02e422815efc3",\n "transactionIndex": "0x0",\n "revertReason": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a4e6f7420656e6f7567682045746865722070726f76696465642e000000000000"\n }\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["With revert reason enabled, the list items in the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/trace-types#trace",children:(0,t.jsx)(n.code,{children:"trace"})})," response returned by ",(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#trace_replayblocktransactions",children:(0,t.jsx)(n.code,{children:"trace_replayBlockTransactions"})}),", ",(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#trace_block",children:(0,t.jsx)(n.code,{children:"trace_block"})}),", and ",(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#trace_transaction",children:(0,t.jsx)(n.code,{children:"trace_transaction"})})," include the revert reason as an ABI-encoded string."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",metastring:'title="Example of trace response list item"',children:'{\n "jsonrpc": "2.0",\n "id": 415,\n "result": [\n {\n "action": {\n "callType": "call",\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas": "0xffadea",\n "input": "0x",\n "to": "0x0110000000000000000000000000000000000000",\n "value": "0x0"\n },\n "blockHash": "0x220bc13dc4f1ed38dcca927a5be15eca16497d279f4c40d7b8fe9704eadf1464",\n "blockNumber": 18,\n "error": "Reverted",\n "revertReason": "0x7d88c1856cc95352",\n "subtraces": 0,\n "traceAddress": [],\n "transactionHash": "0xc388baa0e55e6b73e850b22dc7e9853700f6b995fd55d95dd6ccd5a13d63c566",\n "transactionPosition": 1,\n "type": "call"\n }\n ]\n}\n'})}),"\n",(0,t.jsxs)(n.p,{children:["By default, the error returned by ",(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#eth_estimategas",children:(0,t.jsx)(n.code,{children:"eth_estimateGas"})})," and ",(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#eth_call",children:(0,t.jsx)(n.code,{children:"eth_call"})})," includes the revert reason as an ABI-encoded string in the ",(0,t.jsx)(n.code,{children:"data"})," field."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",metastring:'title="Example of eth_estimateGas and eth_call error"',children:'{\n "jsonrpc": "2.0",\n "id": 3,\n "error": {\n "code": -32000,\n "message": "Execution reverted: ERC20: transfer amount exceeds balance",\n "data": "0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a4e6f7420656e6f7567682045746865722070726f76696465642e000000000000"\n }\n}\n'})}),"\n",(0,t.jsx)(n.h2,{id:"revert-reason-format",children:"Revert reason format"}),"\n",(0,t.jsxs)(n.p,{children:["As described in the ",(0,t.jsx)(n.a,{href:"https://docs.soliditylang.org/en/v0.8.12/control-structures.html#revert",children:"Solidity documentation"}),", the revert reason is an ABI-encoded string consisting of:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"0x08c379a0 // Function selector for Error(string)\n0x0000000000000000000000000000000000000000000000000000000000000020 // Data offset\n0x000000000000000000000000000000000000000000000000000000000000001a // String length\n0x4e6f7420656e6f7567682045746865722070726f76696465642e000000000000 // String data\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",metastring:"title=\"Example of revert reason string for 'Not enough Ether provided' \"",children:'"0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001a4e6f7420656e6f7567682045746865722070726f76696465642e000000000000"\n'})}),"\n",(0,t.jsx)(n.h2,{id:"dapp-support",children:"Dapp support"}),"\n",(0,t.jsx)(n.p,{children:"Client libraries, such as web3j, do not support extracting the revert reason from the transaction receipt. To extract the revert reason your dapp must interact directly with Besu using a custom JSON -> Object converter."})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},28453:(e,n,r)=>{r.d(n,{R:()=>o,x:()=>i});var t=r(96540);const a={},s=t.createContext(a);function o(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6cafcc6f.15600393.js b/assets/js/6cafcc6f.15600393.js new file mode 100644 index 00000000000..a240224eb26 --- /dev/null +++ b/assets/js/6cafcc6f.15600393.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1941],{6417:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>c,frontMatter:()=>i,metadata:()=>a,toc:()=>u});var s=t(74848),r=t(28453);const i={title:"Deploy Besu using Kubernetes",description:"Deploy a Besu node using Kubernetes.",sidebar_position:3,toc_max_heading_level:3,tags:["public networks"]},o="Deploy a Besu public node using Kubernetes",a={id:"public-networks/tutorials/kubernetes",title:"Deploy Besu using Kubernetes",description:"Deploy a Besu node using Kubernetes.",source:"@site/docs/public-networks/tutorials/kubernetes.md",sourceDirName:"public-networks/tutorials",slug:"/public-networks/tutorials/kubernetes",permalink:"/public-networks/tutorials/kubernetes",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/tutorials/kubernetes.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Deploy Besu using Kubernetes",description:"Deploy a Besu node using Kubernetes.",sidebar_position:3,toc_max_heading_level:3,tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Run Besu and Teku on a testnet",permalink:"/public-networks/tutorials/besu-teku-testnet"},next:{title:"Deploy AWS Node Runners",permalink:"/public-networks/tutorials/aws-node-runners"}},l={},u=[{value:"AWS EKS",id:"aws-eks",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Steps",id:"steps",level:3},{value:"1. Create a security group for discovery",id:"1-create-a-security-group-for-discovery",level:4},{value:"Outbound rules",id:"outbound-rules",level:5},{value:"Inbound rules",id:"inbound-rules",level:4},{value:"2. Add a node group to your cluster",id:"2-add-a-node-group-to-your-cluster",level:4},{value:"3. Install the EBS or EFS drivers",id:"3-install-the-ebs-or-efs-drivers",level:4},{value:"4. Set up the pod",id:"4-set-up-the-pod",level:4},{value:"Azure AKS",id:"azure-aks",level:2},{value:"1. Create a Network Security Group (NSG)",id:"1-create-a-network-security-group-nsg",level:4},{value:"2. Add a node pool to your cluster",id:"2-add-a-node-pool-to-your-cluster",level:4},{value:"3. Use Azure StorageClasses to suit your needs",id:"3-use-azure-storageclasses-to-suit-your-needs",level:4}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",header:"header",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"deploy-a-besu-public-node-using-kubernetes",children:"Deploy a Besu public node using Kubernetes"})}),"\n",(0,s.jsxs)(n.p,{children:["You can use a cloud provider such as ",(0,s.jsx)(n.a,{href:"https://aws.amazon.com/eks/",children:"Amazon Elastic Kubernetes Service (EKS)"}),"\nor ",(0,s.jsx)(n.a,{href:"https://azure.microsoft.com/en-au/products/kubernetes-service",children:"Azure Kubernetes Service (AKS)"})," to deploy\na Besu public node"]}),"\n",(0,s.jsx)(n.p,{children:"This tutorial walks you through adding an extra node group to your Besu pod."}),"\n",(0,s.jsx)(n.h2,{id:"aws-eks",children:"AWS EKS"}),"\n",(0,s.jsx)(n.h3,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.p,{children:["Set up a Kubernetes cluster using a managed Kubernetes service such as\n",(0,s.jsx)(n.a,{href:"https://aws.amazon.com/eks/",children:"Amazon EKS"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"steps",children:"Steps"}),"\n",(0,s.jsx)(n.h4,{id:"1-create-a-security-group-for-discovery",children:"1. Create a security group for discovery"}),"\n",(0,s.jsxs)(n.p,{children:["Create a security group in your VPC that allows traffic from anywhere on ports ",(0,s.jsx)(n.code,{children:"30303"})," and ",(0,s.jsx)(n.code,{children:"9000"}),"\n(or equivalent ports that you are using for discovery)."]}),"\n",(0,s.jsx)(n.h5,{id:"outbound-rules",children:"Outbound rules"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Protocol"}),(0,s.jsx)(n.th,{children:"Port range"}),(0,s.jsx)(n.th,{children:"Destination"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"All traffic"}),(0,s.jsx)(n.td,{children:"All"}),(0,s.jsx)(n.td,{children:"All"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"0.0.0.0/0"})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"All traffic"}),(0,s.jsx)(n.td,{children:"All"}),(0,s.jsx)(n.td,{children:"All"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"::/0"})})]})]})]}),"\n",(0,s.jsx)(n.h4,{id:"inbound-rules",children:"Inbound rules"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Protocol"}),(0,s.jsx)(n.th,{children:"Port range"}),(0,s.jsx)(n.th,{children:"Destination"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Custom UDP"}),(0,s.jsx)(n.td,{children:"UDP"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"9000"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"0.0.0.0/0"})}),(0,s.jsx)(n.td,{children:"CL client"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Custom TCP"}),(0,s.jsx)(n.td,{children:"TCP"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"9000"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"0.0.0.0/0"})}),(0,s.jsx)(n.td,{children:"CL client"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Custom UDP"}),(0,s.jsx)(n.td,{children:"UDP"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"30303"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"0.0.0.0/0"})}),(0,s.jsx)(n.td,{children:"EL client"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Custom TCP"}),(0,s.jsx)(n.td,{children:"TCP"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"30303"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"0.0.0.0/0"})}),(0,s.jsx)(n.td,{children:"EL client"})]})]})]}),"\n",(0,s.jsx)(n.admonition,{title:"important",type:"warning",children:(0,s.jsx)(n.p,{children:"The key here is to allow traffic on both TCP and UDP for the consensus layer client and the\nexecution layer client."})}),"\n",(0,s.jsx)(n.h4,{id:"2-add-a-node-group-to-your-cluster",children:"2. Add a node group to your cluster"}),"\n",(0,s.jsxs)(n.p,{children:["In your VPC settings, enable ",(0,s.jsx)(n.strong,{children:"Auto-assign public IPv4 address"})," on the public subnets on which you\nspin up your nodes."]}),"\n",(0,s.jsxs)(n.p,{children:["This allows you to isolate your Besu node on a public subnet and separate it from the other apps and\nnode groups you might have running.\nIf you are using ",(0,s.jsx)(n.a,{href:"https://eksctl.io/",children:"EKSCTL"}),", add the following snippet to your setup:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'managedNodeGroups:\n - name: ng-ethereum\n instanceType: m6a.xlarge\n desiredCapacity: 1 # Increase this capacity if you need more nodes.\n \n subnets:\n - public-subnet-id1\n - public-subnet-id2\n - public-subnet-id3\n labels: { "ng": "ethereum" }\n securityGroups:\n attachIDs: ["sg-1234..."] # The ID of the security group from the previous step.\n iam:\n withAddonPolicies:\n ebs: true\n # efs: true\n taints:\n - key: ethereum\n value: "true"\n effect: NoSchedule\n - key: ethereum\n value: "true"\n effect: NoExecute\n'})}),"\n",(0,s.jsxs)(n.p,{children:["If you are using ",(0,s.jsx)(n.a,{href:"https://www.terraform.io/",children:"Terraform"}),", use something like the following for your\nnew node pool:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:' ng-ethereum = {\n desired_size = 1\n subnet_ids = module.vpc.public_subnets # Only public subnets here.\n vpc_security_group_ids = [ sg-1234 ] # The ID of the security group from the previous step.\n instance_types = ["m6a.xlarge"]\n iam_role_name = "${local.name}-eks-ng-ethereum-role"\n taints = [\n {\n key = "ethereum"\n value = "true"\n effect = "NO_SCHEDULE"\n },\n {\n key = "ethereum"\n value = "true"\n effect = "NO_EXECUTE"\n }\n ]\n labels = {\n workloadType = "ethereum"\n }\n ...\n'})}),"\n",(0,s.jsx)(n.h4,{id:"3-install-the-ebs-or-efs-drivers",children:"3. Install the EBS or EFS drivers"}),"\n",(0,s.jsxs)(n.p,{children:["We recommend using EBS or NvME storage for your chain data.\nFor most cases, the ",(0,s.jsx)(n.a,{href:"https://docs.aws.amazon.com/eks/latest/userguide/ebs-csi.html",children:"EBS drivers"})," or\n",(0,s.jsx)(n.a,{href:"https://docs.aws.amazon.com/eks/latest/userguide/efs-csi.html",children:"EFS drivers"})," are sufficient.\nHowever, if you are using instance stores, use the\n",(0,s.jsx)(n.a,{href:"https://aws.amazon.com/blogs/containers/eks-persistent-volumes-for-instance-store/",children:"Local Storage Static Provisioner"}),"\ninstead."]}),"\n",(0,s.jsx)(n.h4,{id:"4-set-up-the-pod",children:"4. Set up the pod"}),"\n",(0,s.jsxs)(n.p,{children:["Now that the infrastructure is set up, use ",(0,s.jsx)(n.code,{children:"hostNetworking"})," to bind your pod to the host and use the\nhost node's public IP for your Besu node."]}),"\n",(0,s.jsx)(n.p,{children:"First, add the following snippet to your StatefulSet:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:"template:\n metadata:\n labels:\n ...\n spec:\n hostNetwork: true\n dnsPolicy: ClusterFirstWithHostNet\n affinity: ...\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Next, add an init container and a shared volume to store the public IP.\nThe init container ",(0,s.jsx)(n.code,{children:"init"})," runs and gets the public IP of the host using the AWS metadata service and\nsaves it to a local shared volume ",(0,s.jsx)(n.code,{children:"besu-pip"})," (between the init container and the Besu pod)."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'template:\n metadata:\n labels:\n ...\n spec:\n hostNetwork: true\n dnsPolicy: ClusterFirstWithHostNet\n affinity: ...\n initContainers:\n - name: init\n image: alpine/curl:8.5.0\n volumeMounts:\n - name: pip\n mountPath: /pip\n - name: shared-jwt\n mountPath: /jwt \n - name: besu-data\n mountPath: /data\n securityContext:\n runAsUser: 0 \n command:\n - /bin/bash\n - -xec\n - |\n # Get the existing public IP to associate with.\n PUBLIC_IP_TO_ASSOCIATE=$(curl http://ifconfig.me/ip)\n # Store the public IP in a local file to be used by the container.\n echo -ne "$PUBLIC_IP_TO_ASSOCIATE" > /pip/ip\n \n # Create the JWT key.\n openssl rand -hex 32 | tr -d "\\n" > /jwt/jwtSecret.hex\n\n # Update permissions on the data volume (if needed).\n chown -R 1000:1000 /data\n\n containers:\n ...\n\n volumes:\n - name: pip\n emptyDir: {}\n - name: jwt\n emptyDir: {}\n - name: besu-data\n persistentVolumeClaim:\n claimName: besu-pvc\n - name: teku-data\n persistentVolumeClaim:\n claimName: teku-pvc\n'})}),"\n",(0,s.jsxs)(n.p,{children:["When you start Besu up in the pod, use the text file in ",(0,s.jsx)(n.code,{children:"pip"})," as your ",(0,s.jsx)(n.code,{children:"p2p-host"}),", which allows\ntraffic in and out as normal."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'template:\n metadata:\n labels:\n ...\n spec:\n hostNetwork: true\n dnsPolicy: ClusterFirstWithHostNet\n affinity: ...\n initContainers:\n - name: init\n image: alpine/curl:8.5.0\n volumeMounts:\n - name: pip\n mountPath: /pip\n - name: shared-jwt\n mountPath: /jwt \n - name: besu-data\n mountPath: /data\n securityContext:\n runAsUser: 0 \n command:\n - /bin/bash\n - -xec\n - |\n # Get the existing public IP to associate with.\n PUBLIC_IP_TO_ASSOCIATE=$(curl http://ifconfig.me/ip)\n # Store the public IP in a local file to be used by the container.\n echo -ne "$PUBLIC_IP_TO_ASSOCIATE" > /pip/ip\n \n # Create the JWT key.\n openssl rand -hex 32 | tr -d "\\n" > /jwt/jwtSecret.hex\n\n # Update permissions on the data volume (if needed).\n chown -R 1000:1000 /data\n\n containers:\n - name: besu\n image: hyperledger/besu:latest\n volumeMounts:\n - name: pip\n mountPath: /pip\n readOnly: true\n - name: shared-jwt\n mountPath: /jwt \n - name: besu-data\n mountPath: {{ .Values.settings.dataPath }}\n ports:\n - name: elc-rpc\n containerPort: 8545\n protocol: TCP\n - name: elc-ws\n containerPort: 8546\n protocol: TCP\n - name: elc-rlpx\n containerPort: 30303\n protocol: TCP\n - name: elc-discovery\n containerPort: 30303\n protocol: UDP\n - name: elc-metrics\n containerPort: 8545\n protocol: TCP\n - name: elc-engine\n containerPort: 8551\n protocol: TCP \n command:\n - /bin/sh\n - -c\n args:\n - |\n pip=$(cat /pip/ip)\n /opt/besu/bin/besu \\\n --p2p-host=${pip} \\\n ...\n \n - name: teku\n image: consensys/teku:develop\n ...\n\n volumes:\n - name: pip\n emptyDir: {}\n - name: jwt\n emptyDir: {}\n - name: besu-data\n persistentVolumeClaim:\n claimName: besu-pvc\n - name: teku-data\n persistentVolumeClaim:\n claimName: teku-pvc \n'})}),"\n",(0,s.jsx)(n.h2,{id:"azure-aks",children:"Azure AKS"}),"\n",(0,s.jsx)(n.p,{children:"The process for Azure is much the same as that of AWS with a couple of differences."}),"\n",(0,s.jsx)(n.h4,{id:"1-create-a-network-security-group-nsg",children:"1. Create a Network Security Group (NSG)"}),"\n",(0,s.jsxs)(n.p,{children:["Create a NSG with ports ",(0,s.jsx)(n.code,{children:"30303"})," and ",(0,s.jsx)(n.code,{children:"9000"})," (or equivalent) open for TCP and UDP.\nBind this NSG with the subnet you've designated for your Ethereum nodes to ensure that nodes initiated within this subnet will automatically inherit these security rules."]}),"\n",(0,s.jsx)(n.h4,{id:"2-add-a-node-pool-to-your-cluster",children:"2. Add a node pool to your cluster"}),"\n",(0,s.jsx)(n.p,{children:"In Azure all machines get allocated a public IP by default but you need to turn this on for your\nnew node pool."}),"\n",(0,s.jsxs)(n.p,{children:["If you are using ",(0,s.jsx)(n.a,{href:"https://www.terraform.io/",children:"Terraform"}),", use something like the following for your\nnew node pool:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:' node_pools = {\n ...\n ethereum = {\n name = "ethereum"\n vm_size = "Standard_D8as_v5"\n vnet_subnet_id = lookup(module.vnet.vnet_subnets_name_id, "subnet-....") # The ID of the security group from the previous step.\n os_disk_size_gb = 100\n min_count = 1\n max_count = 10\n enable_auto_scaling = true\n enable_node_public_ip = true # This flag lets every node keep its public ip\n enable_host_encryption = true\n node_taints = ["ethereum=true:NoSchedule", "ethereum=true:NoExecute"]\n node_labels = {\n "workloadType" = "ethereum"\n }\n }\n\n ...\n }\n'})}),"\n",(0,s.jsx)(n.h4,{id:"3-use-azure-storageclasses-to-suit-your-needs",children:"3. Use Azure StorageClasses to suit your needs"}),"\n",(0,s.jsxs)(n.p,{children:["We recommend using either Azure Disk or Azure Files to store your chain data\nusing the ",(0,s.jsx)(n.a,{href:"https://learn.microsoft.com/en-us/azure/aks/csi-storage-drivers",children:"CSI storage drivers"}),".\nIf you are using a Terraform to provision your cluster e.g.\n",(0,s.jsx)(n.a,{href:"https://registry.terraform.io/modules/Azure/aks/azurerm/latest",children:"terraform-azurerm-aks"}),"\nthe CSI drivers are provisioned automatically for you."]})]})}function c(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var s=t(96540);const r={},i=s.createContext(r);function o(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6d0a1147.91a82e83.js b/assets/js/6d0a1147.91a82e83.js new file mode 100644 index 00000000000..a99fd793654 --- /dev/null +++ b/assets/js/6d0a1147.91a82e83.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8573],{78368:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>p,frontMatter:()=>l,metadata:()=>c,toc:()=>h});var s=n(74848),r=n(28453),a=n(11470),o=n(19365);const l={title:"Connect to a testnet",sidebar_position:3,Description:"How to connect to a testnet",tags:["public networks"]},i="Connect to a testnet",c={id:"public-networks/get-started/connect/testnet",title:"Connect to a testnet",description:"Run Besu as an execution client with any consensus client on the Holesky, Sepolia, and Ephemery testnets.",source:"@site/docs/public-networks/get-started/connect/testnet.md",sourceDirName:"public-networks/get-started/connect",slug:"/public-networks/get-started/connect/testnet",permalink:"/public-networks/get-started/connect/testnet",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/get-started/connect/testnet.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Connect to a testnet",sidebar_position:3,Description:"How to connect to a testnet",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Connect to Mainnet",permalink:"/public-networks/get-started/connect/mainnet"},next:{title:"Migrate to Besu",permalink:"/public-networks/get-started/migrate-to-besu"}},u={},h=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Steps",id:"steps",level:2},{value:"1. Generate the shared secret",id:"1-generate-the-shared-secret",level:3},{value:"2. Generate validator keys",id:"2-generate-validator-keys",level:3},{value:"3. Start Besu",id:"3-start-besu",level:3},{value:"4. Start the consensus client",id:"4-start-the-consensus-client",level:3},{value:"5. Wait for the clients to sync",id:"5-wait-for-the-clients-to-sync",level:3},{value:"6. Stake ETH",id:"6-stake-eth",level:3}];function d(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"connect-to-a-testnet",children:"Connect to a testnet"})}),"\n",(0,s.jsxs)(t.p,{children:["Run Besu as an ",(0,s.jsx)(t.a,{href:"/public-networks/concepts/node-clients#execution-clients",children:"execution client"})," with any consensus client on the ",(0,s.jsx)(t.a,{href:"https://github.com/eth-clients/holesky",children:"Holesky"}),", ",(0,s.jsx)(t.a,{href:"https://github.com/eth-clients/sepolia",children:"Sepolia"}),", and ",(0,s.jsx)(t.a,{href:"https://github.com/ephemery-testnet/ephemery-resources",children:"Ephemery"})," testnets."]}),"\n",(0,s.jsxs)(t.p,{children:["If you're using ",(0,s.jsx)(t.a,{href:"https://docs.teku.consensys.net/en/latest/",children:"Teku"})," as a consensus client, you can follow the ",(0,s.jsx)(t.a,{href:"/public-networks/tutorials/besu-teku-testnet",children:"Besu and Teku testnet tutorial"}),"."]}),"\n",(0,s.jsx)(t.admonition,{type:"note",children:(0,s.jsxs)(t.p,{children:["Sepolia is a permissioned network and you can't run a validator client on it without ",(0,s.jsx)(t.a,{href:"https://notes.ethereum.org/zvkfSmYnT0-uxwwEegbCqg",children:"requesting to become a validator"})," first. You can connect your consensus client using the beacon node only, without any validator duties."]})}),"\n",(0,s.jsx)(t.admonition,{type:"note",children:(0,s.jsx)(t.p,{children:"Ephemery is a single network that resets to the genesis block after a set period. The network focuses on\nshort-term, intensive testing use cases. This approach avoids issues like insufficient testnet funds, inactive\nvalidators, and state bloat that long-running testnets face."})}),"\n",(0,s.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"/public-networks/get-started/install/binary-distribution",children:"Besu installed"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:["A consensus client installed. For example, ",(0,s.jsx)(t.a,{href:"https://docs.teku.consensys.net/en/latest/",children:"Teku"}),"."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"steps",children:"Steps"}),"\n",(0,s.jsx)(t.h3,{id:"1-generate-the-shared-secret",children:"1. Generate the shared secret"}),"\n",(0,s.jsx)(t.p,{children:"Run the following command:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:'openssl rand -hex 32 | tr -d "\\n" > jwtsecret.hex\n'})}),"\n",(0,s.jsxs)(t.p,{children:["You will specify ",(0,s.jsx)(t.code,{children:"jwtsecret.hex"})," when starting Besu and the consensus client. This is a shared JWT secret the clients use to authenticate each other when using the ",(0,s.jsx)(t.a,{href:"/public-networks/how-to/use-engine-api",children:"Engine API"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"2-generate-validator-keys",children:"2. Generate validator keys"}),"\n",(0,s.jsxs)(t.p,{children:["If you're running the consensus client as a beacon node only, skip to the ",(0,s.jsx)(t.a,{href:"#3-start-besu",children:"next step"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["If you're also running the consensus client as a validator client, create a test Ethereum address (you can do this in ",(0,s.jsx)(t.a,{href:"https://metamask.zendesk.com/hc/en-us/articles/360015289452-How-to-create-an-additional-account-in-your-wallet",children:"MetaMask"}),"). Fund this address with testnet ETH (32 ETH and gas fees for each validator) using a faucet. See the list of ",(0,s.jsx)(t.a,{href:"https://github.com/eth-clients/holesky",children:"Holesky faucets"}),", ",(0,s.jsx)(t.a,{href:"https://github.com/eth-clients/sepolia#meta-data-sepolia",children:"Sepolia faucets"}),", and ",(0,s.jsx)(t.a,{href:"https://ephemery-faucet.pk910.de/",children:"Ephemery faucets"}),"."]}),"\n",(0,s.jsx)(t.admonition,{type:"note",children:(0,s.jsxs)(t.p,{children:["If you can't get testnet ETH using the faucet, you can ask for help on the ",(0,s.jsx)(t.a,{href:"https://discord.gg/ethstaker",children:"EthStaker Discord"}),"."]})}),"\n",(0,s.jsxs)(t.p,{children:["Generate validator keys for one or more validators using the ",(0,s.jsx)(t.a,{href:"https://holesky.launchpad.ethereum.org/",children:"Holesky Staking Launchpad"}),", ",(0,s.jsx)(t.a,{href:"https://launchpad.ephemery.dev/",children:"Ephemery Staking Launchpad"}),", or ",(0,s.jsx)(t.a,{href:"https://notes.ethereum.org/zvkfSmYnT0-uxwwEegbCqg",children:"request to become validator on Sepolia"}),"."]}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsxs)(t.p,{children:["Save the password you use to generate each key pair in a ",(0,s.jsx)(t.code,{children:".txt"})," file. You should also have a ",(0,s.jsx)(t.code,{children:".json"})," file for each validator key pair."]})}),"\n",(0,s.jsx)(t.h3,{id:"3-start-besu",children:"3. Start Besu"}),"\n",(0,s.jsxs)(t.p,{children:["Run the following command or specify the options in a ",(0,s.jsx)(t.a,{href:"/public-networks/how-to/configure-besu/",children:"configuration file"}),":"]}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(o.A,{value:"Holesky",label:"Holesky",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:'besu \\\n --network=holesky \\\n --rpc-http-enabled=true \\\n --rpc-http-host=0.0.0.0 \\\n --rpc-http-cors-origins="*" \\\n --rpc-ws-enabled=true \\\n --rpc-ws-host=0.0.0.0 \\\n --host-allowlist="*" \\\n --engine-host-allowlist="*" \\\n --engine-rpc-enabled \\\n --engine-jwt-secret=\n'})})}),(0,s.jsx)(o.A,{value:"Sepolia",label:"Sepolia",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:'besu \\\n --network=sepolia \\\n --rpc-http-enabled=true \\\n --rpc-http-host=0.0.0.0 \\\n --rpc-http-cors-origins="*" \\\n --rpc-ws-enabled=true \\\n --rpc-ws-host=0.0.0.0 \\\n --host-allowlist="*" \\\n --engine-host-allowlist="*" \\\n --engine-rpc-enabled \\\n --engine-jwt-secret=\n'})})}),(0,s.jsx)(o.A,{value:"Ephemery",label:"Ephemery",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:'besu \\\n --network=ephemery \\\n --rpc-http-enabled=true \\\n --rpc-http-host=0.0.0.0 \\\n --rpc-http-cors-origins="*" \\\n --rpc-ws-enabled=true \\\n --rpc-ws-host=0.0.0.0 \\\n --host-allowlist="*" \\\n --engine-host-allowlist="*" \\\n --engine-rpc-enabled \\\n --engine-jwt-secret=\n'})})})]}),"\n",(0,s.jsxs)(t.p,{children:["Specify the path to the ",(0,s.jsx)(t.code,{children:"jwtsecret.hex"})," file generated in ",(0,s.jsx)(t.a,{href:"#1-generate-the-shared-secret",children:"step 1"})," using the ",(0,s.jsx)(t.a,{href:"/public-networks/reference/cli/options#engine-jwt-secret",children:(0,s.jsx)(t.code,{children:"--engine-jwt-secret"})})," option."]}),"\n",(0,s.jsxs)(t.p,{children:["You can modify the option values and add other ",(0,s.jsx)(t.a,{href:"/public-networks/reference/cli/options",children:"command line options"})," as needed."]}),"\n",(0,s.jsx)(t.h3,{id:"4-start-the-consensus-client",children:"4. Start the consensus client"}),"\n",(0,s.jsx)(t.p,{children:"Refer to your consensus client documentation to configure and start the consensus client."}),"\n",(0,s.jsx)(t.admonition,{type:"info",children:(0,s.jsx)(t.p,{children:"If you're running a validator client, make sure you set a fee recipient address."})}),"\n",(0,s.jsxs)(t.p,{children:["If you're using Teku, follow the ",(0,s.jsx)(t.a,{href:"/public-networks/tutorials/besu-teku-testnet#5-start-teku",children:"Besu and Teku testnet tutorial"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"5-wait-for-the-clients-to-sync",children:"5. Wait for the clients to sync"}),"\n",(0,s.jsx)(t.p,{children:"After starting Besu and the consensus client, your node starts syncing and connecting to peers."}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(o.A,{value:"Besu logs",label:"Besu logs",default:!0,children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:'{"@timestamp":"2023-02-03T04:43:49,555","level":"INFO","thread":"main","class":"DefaultSynchronizer","message":"Starting synchronizer.","throwable":""}\n{"@timestamp":"2023-02-03T04:43:49,556","level":"INFO","thread":"main","class":"FastSyncDownloader","message":"Starting sync","throwable":""}\n{"@timestamp":"2023-02-03T04:43:49,559","level":"INFO","thread":"main","class":"Runner","message":"Ethereum main loop is up.","throwable":""}\n{"@timestamp":"2023-02-03T04:43:53,106","level":"INFO","thread":"Timer-0","class":"DNSResolver","message":"Resolved 2409 nodes","throwable":""}\n{"@timestamp":"2023-02-03T04:45:04,803","level":"INFO","thread":"nioEventLoopGroup-3-10","class":"SnapWorldStateDownloader","message":"Downloading world state from peers for pivot block 16545859 (0x616ae3c4cf85f95a9bce2814a7282d75dc2eac36\ncb9f0fcc6f16386df70da3c5). State root 0xa7114541f42c62a72c8b6bb9901c2ccf4b424cd7f76570a67b82a183b02f25dc pending requests 0","throwable":""}\n{"@timestamp":"2023-02-03T04:46:04,834","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.08%, Peer count: 8","throwable":""}\n{"@timestamp":"2023-02-03T04:48:01,840","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.23%, Peer count: 8","throwable":""}\n{"@timestamp":"2023-02-03T04:49:09,931","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.41%, Peer count: 11","throwable":""}\n{"@timestamp":"2023-02-03T04:50:12,466","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.61%, Peer count: 10","throwable":""}\n{"@timestamp":"2023-02-03T04:51:20,977","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.75%, Peer count: 10","throwable":""}\n{"@timestamp":"2023-02-03T04:51:28,985","level":"INFO","thread":"EthScheduler-Services-29 (importBlock)","class":"FastImportBlocksStep","message":"Block import progress: 180400 of 16545859 (1%)","throwable":""}\n'})})}),(0,s.jsx)(o.A,{value:"Teku logs",label:"Teku logs",children:(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"2022-03-21 20:43:24.355 INFO - Syncing *** Target slot: 76092, Head slot: 2680, Remaining slots: 73412, Connected peers: 8\n2022-03-21 20:43:36.363 INFO - Syncing *** Target slot: 76093, Head slot: 2879, Remaining slots: 73214, Connected peers: 10\n2022-03-21 20:43:48.327 INFO - Syncing *** Target slot: 76094, Head slot: 3080, Remaining slots: 73014, Connected peers: 8\n2022-03-21 20:44:00.339 INFO - Syncing *** Target slot: 76095, Head slot: 3317, Remaining slots: 72778, Connected peers: 6\n2022-03-21 20:44:12.353 INFO - Syncing *** Target slot: 76096, Head slot: 3519, Remaining slots: 72577, Connected peers: 9\n"})})})]}),"\n",(0,s.jsx)(t.p,{children:"If you're running the consensus client as a beacon node only, you're all set. If you're also running the consensus client as a validator client, ensure your clients are fully synced before submitting your staking deposit in the next step. This can take several days."}),"\n",(0,s.jsx)(t.h3,{id:"6-stake-eth",children:"6. Stake ETH"}),"\n",(0,s.jsxs)(t.p,{children:["Stake your testnet ETH for one or more validators using the ",(0,s.jsx)(t.a,{href:"https://holesky.launchpad.ethereum.org/",children:"Holesky Staking Launchpad"})," or ",(0,s.jsx)(t.a,{href:"https://launchpad.ephemery.dev/",children:"Ephemery Staking Launchpad"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["You can check your validator status by searching your Ethereum address on the ",(0,s.jsx)(t.a,{href:"https://holesky.beaconcha.in/",children:"Holesky Beacon Chain explorer"})," or ",(0,s.jsx)(t.a,{href:"https://beaconchain.ephemery.dev/",children:"Ephemery Beacon Chain explorer"}),". It may take up to multiple days for your validator to be activated and start proposing blocks."]})]})}function p(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},19365:(e,t,n)=>{n.d(t,{A:()=>o});n(96540);var s=n(18215);const r={tabItem:"tabItem_Ymn6"};var a=n(74848);function o(e){let{children:t,hidden:n,className:o}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,o),hidden:n,children:t})}},11470:(e,t,n)=>{n.d(t,{A:()=>w});var s=n(96540),r=n(18215),a=n(23104),o=n(56347),l=n(205),i=n(57485),c=n(31682),u=n(70679);function h(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function d(e){const{values:t,children:n}=e;return(0,s.useMemo)((()=>{const e=t??function(e){return h(e).map((e=>{let{props:{value:t,label:n,attributes:s,default:r}}=e;return{value:t,label:n,attributes:s,default:r}}))}(n);return function(e){const t=(0,c.XI)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function p(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function g(e){let{queryString:t=!1,groupId:n}=e;const r=(0,o.W6)(),a=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,i.aZ)(a),(0,s.useCallback)((e=>{if(!a)return;const t=new URLSearchParams(r.location.search);t.set(a,e),r.replace({...r.location,search:t.toString()})}),[a,r])]}function m(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,a=d(e),[o,i]=(0,s.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!p({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const s=n.find((e=>e.default))??n[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:t,tabValues:a}))),[c,h]=g({queryString:n,groupId:r}),[m,f]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[r,a]=(0,u.Dv)(n);return[r,(0,s.useCallback)((e=>{n&&a.set(e)}),[n,a])]}({groupId:r}),b=(()=>{const e=c??m;return p({value:e,tabValues:a})?e:null})();(0,l.A)((()=>{b&&i(b)}),[b]);return{selectedValue:o,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);i(e),h(e),f(e)}),[h,f,a]),tabValues:a}}var f=n(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=n(74848);function y(e){let{className:t,block:n,selectedValue:s,selectValue:o,tabValues:l}=e;const i=[],{blockElementScrollPositionUntilNextRender:c}=(0,a.a_)(),u=e=>{const t=e.currentTarget,n=i.indexOf(t),r=l[n].value;r!==s&&(c(t),o(r))},h=e=>{let t=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const n=i.indexOf(e.currentTarget)+1;t=i[n]??i[0];break}case"ArrowLeft":{const n=i.indexOf(e.currentTarget)-1;t=i[n]??i[i.length-1];break}}t?.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":n},t),children:l.map((e=>{let{value:t,label:n,attributes:a}=e;return(0,x.jsx)("li",{role:"tab",tabIndex:s===t?0:-1,"aria-selected":s===t,ref:e=>i.push(e),onKeyDown:h,onClick:u,...a,className:(0,r.A)("tabs__item",b.tabItem,a?.className,{"tabs__item--active":s===t}),children:n??t},t)}))})}function v(e){let{lazy:t,children:n,selectedValue:a}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===a));return e?(0,s.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:o.map(((e,t)=>(0,s.cloneElement)(e,{key:t,hidden:e.props.value!==a})))})}function j(e){const t=m(e);return(0,x.jsxs)("div",{className:(0,r.A)("tabs-container",b.tabList),children:[(0,x.jsx)(y,{...t,...e}),(0,x.jsx)(v,{...t,...e})]})}function w(e){const t=(0,f.A)();return(0,x.jsx)(j,{...e,children:h(e.children)},String(t))}},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>l});var s=n(96540);const r={},a=s.createContext(r);function o(e){const t=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6e493491.e501909e.js b/assets/js/6e493491.e501909e.js new file mode 100644 index 00000000000..53f166d3f73 --- /dev/null +++ b/assets/js/6e493491.e501909e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[9670],{22876:(e,r,i)=>{i.r(r),i.d(r,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>n,metadata:()=>c,toc:()=>d});var s=i(74848),t=i(28453);const n={title:"Plugin API interfaces",sidebar_position:4,description:"Plugin interfaces",tags:["private networks"]},l="Plugin API interfaces",c={id:"private-networks/reference/plugin-api-interfaces",title:"Plugin API interfaces",description:"Plugin interfaces",source:"@site/docs/private-networks/reference/plugin-api-interfaces.md",sourceDirName:"private-networks/reference",slug:"/private-networks/reference/plugin-api-interfaces",permalink:"/private-networks/reference/plugin-api-interfaces",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/reference/plugin-api-interfaces.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Plugin API interfaces",sidebar_position:4,description:"Plugin interfaces",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Accounts for testing",permalink:"/private-networks/reference/accounts-for-testing"},next:{title:"Chatbot",permalink:"/private-networks/chatbot"}},o={},d=[{value:"Core plugin classes",id:"core-plugin-classes",level:2},{value:"Plugin services",id:"plugin-services",level:2}];function a(e){const r={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(r.header,{children:(0,s.jsx)(r.h1,{id:"plugin-api-interfaces",children:"Plugin API interfaces"})}),"\n",(0,s.jsxs)(r.p,{children:["API interfaces in Besu allow users to ",(0,s.jsx)(r.a,{href:"/private-networks/concepts/plugins",children:"build plugins"})," to extend Besu functionality."]}),"\n",(0,s.jsxs)(r.p,{children:["For more information about the available interfaces, see the ",(0,s.jsx)(r.a,{href:"https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/index.html",children:"Plugin API Javadoc"}),"."]}),"\n",(0,s.jsx)(r.admonition,{title:"Javadoc issue",type:"note",children:(0,s.jsx)(r.p,{children:"The plugin API documentation is currently not being updated. We're working on a fix, but in the meantime, some links are temporarily pointing to wiki.hyperledger.org."})}),"\n",(0,s.jsx)(r.h2,{id:"core-plugin-classes",children:"Core plugin classes"}),"\n",(0,s.jsx)(r.p,{children:"The following table lists the interfaces providing core plugin classes."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Interface"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"https://wiki.hyperledger.org/display/BESU/BesuContext",children:(0,s.jsx)(r.strong,{children:"ServiceManager"})})}),(0,s.jsx)(r.td,{children:"Allows plugins to access Besu services."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/BesuPlugin.html",children:(0,s.jsx)(r.strong,{children:"BesuPlugin"})})}),(0,s.jsx)(r.td,{children:"Used to manage the plugin lifecycle."})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"plugin-services",children:"Plugin services"}),"\n",(0,s.jsx)(r.p,{children:"The following table lists interfaces providing services you can retrieve."}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Interface"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/services/BesuEvents.html",children:(0,s.jsx)(r.strong,{children:"BesuEvents"})})}),(0,s.jsx)(r.td,{children:"Allows plugins to attach to events during Besu operation."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/services/BesuConfiguration.html",children:(0,s.jsx)(r.strong,{children:"BesuConfiguration"})})}),(0,s.jsx)(r.td,{children:"Provides file system locations of Besu's storage."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/services/query/IbftQueryService.html",children:(0,s.jsx)(r.strong,{children:"IbftQueryService"})})}),(0,s.jsx)(r.td,{children:"Allows query of the IBFT 2.0 aspects of the blockchain."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/services/metrics/MetricCategoryRegistry.html",children:(0,s.jsx)(r.strong,{children:"MetricCategoryRegistry"})})}),(0,s.jsx)(r.td,{children:"Adds a new metrics category to the CLI."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/services/MetricsSystem.html",children:(0,s.jsx)(r.strong,{children:"MetricsSystem"})})}),(0,s.jsx)(r.td,{children:"Register metrics with the Prometheus endpoint."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/services/query/PoaQueryService.html",children:(0,s.jsx)(r.strong,{children:"PoaQueryService"})})}),(0,s.jsx)(r.td,{children:"Query the current state of Clique and IBFT 2.0 consensus protocols."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/services/PicoCLIOptions.html",children:(0,s.jsx)(r.strong,{children:"PicoCLIOptions"})})}),(0,s.jsx)(r.td,{children:"Adds CLI commands to the Besu command line."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/services/SecurityModuleService.html",children:(0,s.jsx)(r.strong,{children:"SecurityModuleService"})})}),(0,s.jsx)(r.td,{children:"Allows plugins to register a security module."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/org/hyperledger/besu/plugin/services/StorageService.html",children:(0,s.jsx)(r.strong,{children:"StorageService"})})}),(0,s.jsx)(r.td,{children:"Allows plugins to register as a storage engine. For example, to connect to a hardware security module (HSM)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"https://wiki.hyperledger.org/display/BESU/PermissioningService",children:(0,s.jsx)(r.strong,{children:"PermissioningService"})})}),(0,s.jsx)(r.td,{children:"Allows for fine grain control of node connection and node messaging permissioning."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"https://wiki.hyperledger.org/display/BESU/PrivacyPluginService",children:(0,s.jsx)(r.strong,{children:"PrivacyPluginService"})})}),(0,s.jsxs)(r.td,{children:["Provides a way to define how ",(0,s.jsx)(r.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy marker transactions"})," are created, and what private genesis to use."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:(0,s.jsx)(r.a,{href:"https://wiki.hyperledger.org/display/BESU/RpcEndpointService",children:(0,s.jsx)(r.strong,{children:"RpcEndpointService"})})}),(0,s.jsx)(r.td,{children:"Register custom RPC endpoints."})]})]})]}),"\n",(0,s.jsxs)(r.p,{children:["To use the interfaces in your plugin, ensure the ",(0,s.jsx)(r.a,{href:"https://github.com/ConsenSys/PluginsAPIDemo/blob/957628b3c6f533f3c3f405e2a17e369cd1f02c31/build.gradle",children:"Gradle build file"})," contains the ",(0,s.jsx)(r.code,{children:"https://hyperledger.jfrog.io/hyperledger/besu-maven"})," repository and the ",(0,s.jsx)(r.code,{children:"plugin-api"})," dependency."]}),"\n",(0,s.jsxs)(r.admonition,{title:"Known issue",type:"warning",children:[(0,s.jsxs)(r.p,{children:["As indicated in ",(0,s.jsx)(r.a,{href:"https://github.com/hyperledger/besu-docs/issues/406",children:"issue #406"}),", plugins may need to access the parsed command line during registration, but the command line is not yet initialized at this stage."]}),(0,s.jsxs)(r.p,{children:["It's in our roadmap to improve lifecycle steps and provide additional visibility for some data. A workaround is to create a supplier during the ",(0,s.jsx)(r.code,{children:"register"})," step and store it in memory."]}),(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.code,{children:"start"})," step can be ignored and your plugin module will be instantiated when the command line interface is parsed and available."]})]})]})}function h(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},28453:(e,r,i)=>{i.d(r,{R:()=>l,x:()=>c});var s=i(96540);const t={},n=s.createContext(t);function l(e){const r=s.useContext(n);return s.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function c(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),s.createElement(n.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6ea682ce.937b8481.js b/assets/js/6ea682ce.937b8481.js new file mode 100644 index 00000000000..7072d5150e0 --- /dev/null +++ b/assets/js/6ea682ce.937b8481.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7019],{48296:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>l,metadata:()=>a,toc:()=>h});var s=i(74848),r=i(28453),t=i(11470),o=i(19365);const l={title:"Clique",description:"Besu Clique Proof-of-Authority (PoA) consensus protocol implementation",sidebar_position:4,path:"blob/master/config/src/main/resources/",source:"rinkeby.json",tags:["private networks"]},c="Configure Clique consensus",a={id:"private-networks/how-to/configure/consensus/clique",title:"Clique",description:"Besu Clique Proof-of-Authority (PoA) consensus protocol implementation",source:"@site/docs/private-networks/how-to/configure/consensus/clique.md",sourceDirName:"private-networks/how-to/configure/consensus",slug:"/private-networks/how-to/configure/consensus/clique",permalink:"/private-networks/how-to/configure/consensus/clique",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/configure/consensus/clique.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Clique",description:"Besu Clique Proof-of-Authority (PoA) consensus protocol implementation",sidebar_position:4,path:"blob/master/config/src/main/resources/",source:"rinkeby.json",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"IBFT 2.0",permalink:"/private-networks/how-to/configure/consensus/ibft"},next:{title:"Add and remove validators without voting",permalink:"/private-networks/how-to/configure/consensus/add-validators-without-voting"}},d={},h=[{value:"Genesis file",id:"genesis-file",level:2},{value:"Skip empty blocks",id:"skip-empty-blocks",level:3},{value:"Extra data",id:"extra-data",level:3},{value:"One initial signer",id:"one-initial-signer",level:3},{value:"Two initial signers",id:"two-initial-signers",level:3},{value:"Post-Merge configuration",id:"post-merge-configuration",level:3},{value:"Connect to a Clique network",id:"connect-to-a-clique-network",level:2},{value:"Add and remove signers",id:"add-and-remove-signers",level:2},{value:"Add a signer",id:"add-a-signer",level:3},{value:"Remove a signer",id:"remove-a-signer",level:3},{value:"Epoch transition",id:"epoch-transition",level:3},{value:"Transitions",id:"transitions",level:2},{value:"Configure block time on an existing network",id:"configure-block-time-on-an-existing-network",level:3},{value:"Configure empty blocks on an existing network",id:"configure-empty-blocks-on-an-existing-network",level:3},{value:"Limitations",id:"limitations",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"configure-clique-consensus",children:"Configure Clique consensus"})}),"\n",(0,s.jsxs)(n.p,{children:["Besu implements the ",(0,s.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-225",children:"Clique"})," proof of authority (PoA) ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/",children:"consensus protocol"}),". Private networks can use Clique."]}),"\n",(0,s.jsx)(n.admonition,{type:"danger",children:(0,s.jsx)(n.p,{children:"Clique is not suitable for production environments. Use only in development environments."})}),"\n",(0,s.jsxs)(n.p,{children:["In Clique networks, approved accounts, known as signers, validate transactions and blocks. Signers take turns to create the next block. Existing signers propose and vote to ",(0,s.jsx)(n.a,{href:"#add-and-remove-signers",children:"add or remove signers"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["You can ",(0,s.jsx)(n.a,{href:"/private-networks/tutorials/clique",children:"create a private network using Clique"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"genesis-file",children:"Genesis file"}),"\n",(0,s.jsxs)(n.p,{children:["To use Clique in a private network, Besu requires a Clique ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/genesis-file",children:"genesis file"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"A Clique genesis file defines properties specific to Clique."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",metastring:'title="Example Clique genesis file"',children:'{\n "config": {\n "chainId": 1981,\n "berlinBlock": 0,\n "clique": {\n "blockperiodseconds": 15,\n "epochlength": 30000,\n "createemptyblocks": true\n }\n },\n "coinbase": "0x0000000000000000000000000000000000000000",\n "difficulty": "0x1",\n "extraData": "0x000000000000000000000000000000000000000000000000000000000000000001a54556254bfa3db2daa7673435ec63649925c50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "gasLimit": "0x1fffffffffffff",\n "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "nonce": "0x0",\n "timestamp": "0x5c51a607",\n "alloc": {},\n "number": "0x0",\n "gasUsed": "0x0",\n "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"\n}\n'})}),"\n",(0,s.jsx)(n.p,{children:"The properties specific to Clique are:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"blockperiodseconds"})," - The block time, in seconds."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"epochlength"})," - The number of blocks after which to reset all votes."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"createemptyblocks"})," - Set to false to ",(0,s.jsx)(n.a,{href:"#skip-empty-blocks",children:"skip creating empty blocks"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"extraData"})," - ",(0,s.jsx)(n.a,{href:"#extra-data",children:"Extra data"})," including the initial signers."]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"skip-empty-blocks",children:"Skip empty blocks"}),"\n",(0,s.jsx)(n.p,{children:"By default, Clique creates empty blocks. For large private networks using Clique, skipping empty blocks can reduce the storage needed."}),"\n",(0,s.jsxs)(n.p,{children:["To skip creating empty blocks, set ",(0,s.jsx)(n.code,{children:"createemptyblocks"})," to ",(0,s.jsx)(n.code,{children:"false"})," in the genesis file:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n "londonBlock": 0,\n "clique": {\n "blockperiodseconds": 10,\n "epochlength": 30000,\n "createemptyblocks": false\n }\n },\n...\n}\n'})}),"\n",(0,s.jsxs)(n.p,{children:["All validators must have the same value for ",(0,s.jsx)(n.code,{children:"createemptyblocks"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"extra-data",children:"Extra data"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"extraData"})," property consists of:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"0x prefix."}),"\n",(0,s.jsx)(n.li,{children:"32 bytes of vanity data."}),"\n",(0,s.jsx)(n.li,{children:"A list of initial signer addresses (at least one initial signer is required). 20 bytes for each signer."}),"\n",(0,s.jsx)(n.li,{children:"65 bytes for the proposer signature. In the genesis block there is no initial proposer, so the proposer signature is all zeros."}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"one-initial-signer",children:"One initial signer"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"One Initial Signer",src:i(41081).A+"",width:"1376",height:"586"})}),"\n",(0,s.jsx)(n.h3,{id:"two-initial-signers",children:"Two initial signers"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Two Initial Signers",src:i(55500).A+"",width:"1376",height:"678"})}),"\n",(0,s.jsx)(n.h3,{id:"post-merge-configuration",children:"Post-Merge configuration"}),"\n",(0,s.jsxs)(n.p,{children:["After ",(0,s.jsx)(n.a,{href:"https://ethereum.org/en/upgrades/merge/",children:"The Merge"}),", the following block fields are modified or deprecated. Their fields ",(0,s.jsx)(n.strong,{children:"must"})," contain only the constant values from the following chart."]}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Field"}),(0,s.jsx)(n.th,{children:"Constant value"}),(0,s.jsx)(n.th,{children:"Comment"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"ommersHash"})})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"= Keccak256(RLP([]))"})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"difficulty"})})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"0"})}),(0,s.jsxs)(n.td,{children:["Replaced with ",(0,s.jsx)(n.code,{children:"prevrandao"})]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"mixHash"})})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"0x0000000000000000000000000000000000000000000000000000000000000000"})}),(0,s.jsxs)(n.td,{children:["Replaced with ",(0,s.jsx)(n.code,{children:"prevrandao"})]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"nonce"})})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"0x0000000000000000"})}),(0,s.jsx)(n.td,{})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.strong,{children:(0,s.jsx)(n.code,{children:"ommers"})})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"[]"})}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"RLP([]) = 0xc0"})})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:["Additionally, ",(0,s.jsx)(n.a,{href:"#extra-data",children:(0,s.jsx)(n.code,{children:"extraData"})})," is limited to 32 bytes of vanity data after The Merge."]}),"\n",(0,s.jsx)(n.h2,{id:"connect-to-a-clique-network",children:"Connect to a Clique network"}),"\n",(0,s.jsxs)(n.p,{children:["To start a node on a Clique private network, use the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#genesis-file",children:(0,s.jsx)(n.code,{children:"--genesis-file"})})," option to specify the custom genesis file."]}),"\n",(0,s.jsx)(n.h2,{id:"add-and-remove-signers",children:"Add and remove signers"}),"\n",(0,s.jsxs)(n.p,{children:["Existing signers propose and vote to add or remove validators using the Clique JSON-RPC API methods. Enable the HTTP interface with ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,s.jsx)(n.code,{children:"--rpc-http-enabled"})})," or the WebSocket interface with ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-enabled",children:(0,s.jsx)(n.code,{children:"--rpc-ws-enabled"})}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["The Clique API methods are disabled by default. To enable them, specify the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,s.jsx)(n.code,{children:"--rpc-http-api"})})," or ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,s.jsx)(n.code,{children:"--rpc-ws-api"})})," option and include ",(0,s.jsx)(n.code,{children:"CLIQUE"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"The methods to add or remove signers are:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#clique_propose",children:(0,s.jsx)(n.code,{children:"clique_propose"})}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#clique_getsigners",children:(0,s.jsx)(n.code,{children:"clique_getSigners"})}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#clique_discard",children:(0,s.jsx)(n.code,{children:"clique_discard"})}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["To view signer metrics for a specified block range, call ",(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#clique_getsignermetrics",children:(0,s.jsx)(n.code,{children:"clique_getSignerMetrics"})}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"add-a-signer",children:"Add a signer"}),"\n",(0,s.jsxs)(n.p,{children:["To propose adding a signer to a Clique network, call ",(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#clique_propose",children:(0,s.jsx)(n.code,{children:"clique_propose"})}),", specifying the address of the proposed signer and ",(0,s.jsx)(n.code,{children:"true"}),". A majority of signers must execute the call."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:'title="JSON-RPC clique_propose request example"',children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"clique_propose","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73", true], "id":1}\' \n'})}),"\n",(0,s.jsx)(n.p,{children:"When the signer creates the next block, the signer adds a vote to the block for the proposed signer."}),"\n",(0,s.jsx)(n.p,{children:"When more than 50% of the existing signers propose adding the signer, with their votes distributed in blocks, the signer can begin signing blocks."}),"\n",(0,s.jsxs)(n.p,{children:["To return a list of signers and confirm the addition of a proposed signer, call ",(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#clique_getsigners",children:(0,s.jsx)(n.code,{children:"clique_getSigners"})}),"."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:'title="JSON-RPC clique_getSigners request example"',children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"clique_getSigners","params":["latest"], "id":1}\' \n'})}),"\n",(0,s.jsxs)(n.p,{children:["To discard your proposal after confirming the addition of a signer, call ",(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#clique_discard",children:(0,s.jsx)(n.code,{children:"clique_discard"})})," specifying the address of the proposed signer."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",metastring:'title="JSON-RPC clique_discard request example"',children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"clique_discard","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73"], "id":1}\' \n'})}),"\n",(0,s.jsx)(n.h3,{id:"remove-a-signer",children:"Remove a signer"}),"\n",(0,s.jsxs)(n.p,{children:["The process for removing a signer from a Clique network is the same as ",(0,s.jsx)(n.a,{href:"#add-a-signer",children:"adding a signer"}),", except you specify ",(0,s.jsx)(n.code,{children:"false"})," as the second parameter of ",(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#clique_propose",children:(0,s.jsx)(n.code,{children:"clique_propose"})}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"epoch-transition",children:"Epoch transition"}),"\n",(0,s.jsx)(n.p,{children:"At each epoch transition, Clique discards all pending votes collected from received blocks. Existing proposals remain in effect and signers re-add their vote the next time they create a block."}),"\n",(0,s.jsxs)(n.p,{children:["Define the number of blocks between epoch transitions in the ",(0,s.jsx)(n.a,{href:"#genesis-file",children:"Clique genesis file"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"transitions",children:"Transitions"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"transitions"})," genesis configuration item allows you to specify a future block number at which to\nchange the Clique network configuration in an existing network.\nFor example, you can update the ",(0,s.jsx)(n.a,{href:"#configure-block-time-on-an-existing-network",children:"block time"})," and\nwhether to ",(0,s.jsx)(n.a,{href:"#configure-empty-blocks-on-an-existing-network",children:"create empty blocks"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsx)(n.p,{children:"Do not specify a transition block in the past.\nSpecifying a transition block in the past can result in unexpected behavior, such as causing the\nnetwork to fork."})}),"\n",(0,s.jsx)(n.h3,{id:"configure-block-time-on-an-existing-network",children:"Configure block time on an existing network"}),"\n",(0,s.jsxs)(n.p,{children:["To update an existing network with a new ",(0,s.jsx)(n.code,{children:"blockperiodseconds"}),":"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Stop all nodes in the network."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["In the ",(0,s.jsx)(n.a,{href:"#genesis-file",children:"genesis file"}),", add the ",(0,s.jsx)(n.code,{children:"transitions"})," configuration item where:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:""})," is the upcoming block at which to change ",(0,s.jsx)(n.code,{children:"blockperiodseconds"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:""})," is the updated value for ",(0,s.jsx)(n.code,{children:"blockperiodseconds"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.A,{children:[(0,s.jsx)(o.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "clique": {\n "blockperiodseconds": 3,\n "epochlength": 30,\n "requesttimeoutseconds": 6,\n "createemptyblocks": true\n },\n "transitions": {\n "clique": [\n {\n "block": ,\n "blockperiodseconds": \n }\n ]\n }\n },\n ...\n}\n'})})}),(0,s.jsx)(o.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "clique": {\n "blockperiodseconds": 3,\n "epochlength": 30,\n "requesttimeoutseconds": 6,\n "createemptyblocks": true\n },\n "transitions": {\n "clique": [\n {\n "block": 3,\n "blockperiodseconds": 1\n },\n {\n "block": 6,\n "blockperiodseconds": 2\n },\n ]\n }\n },\n ...\n}\n'})})})]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Restart all nodes in the network using the updated genesis file."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"To verify the changes after the transition block, view the Besu logs and check that the time\ndifference between each block matches the updated block period."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"configure-empty-blocks-on-an-existing-network",children:"Configure empty blocks on an existing network"}),"\n",(0,s.jsxs)(n.p,{children:["To update an existing network with a new ",(0,s.jsx)(n.a,{href:"#skip-empty-blocks",children:(0,s.jsx)(n.code,{children:"createemptyblocks"})}),":"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Stop all nodes in the network."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["In the ",(0,s.jsx)(n.a,{href:"#genesis-file",children:"genesis file"}),", add the ",(0,s.jsx)(n.code,{children:"transitions"})," configuration item where:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:""})," is the upcoming block at which to change ",(0,s.jsx)(n.code,{children:"createemptyblocks"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:""})," is the updated value for ",(0,s.jsx)(n.code,{children:"createemptyblocks"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.A,{children:[(0,s.jsx)(o.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "clique": {\n "blockperiodseconds": 3,\n "epochlength": 30,\n "requesttimeoutseconds": 6,\n "createemptyblocks": true\n },\n "transitions": {\n "clique": [\n {\n "block": ,\n "createemptyblocks": \n }\n ]\n }\n },\n ...\n}\n'})})}),(0,s.jsx)(o.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "clique": {\n "blockperiodseconds": 3,\n "epochlength": 30,\n "requesttimeoutseconds": 6,\n "createemptyblocks": true\n },\n "transitions": {\n "clique": [\n {\n "block": 10,\n "createemptyblocks": false\n }\n ]\n }\n },\n ...\n}\n'})})})]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Restart all nodes in the network using the updated genesis file."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"limitations",children:"Limitations"}),"\n",(0,s.jsx)(n.p,{children:"In Clique, blocks created by in-turn validators are published immediately. Out-of-turn validators create blocks that are published after a short delay. In-turn blocks have a higher difficulty than out-of-turn blocks, which allows small forks to resolve to the chain with more in-turn blocks."}),"\n",(0,s.jsx)(n.p,{children:"However, when the out-of-turn delay is shorter than the block propagation delay, out-of-turn blocks may be published before in-turn blocks. This may cause large, irresolvable forks in a network."}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["We recommend using a more updated consensus protocol such as ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft",children:"IBFT 2.0"})," or ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft",children:"QBFT"}),"."]})})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},19365:(e,n,i)=>{i.d(n,{A:()=>o});i(96540);var s=i(18215);const r={tabItem:"tabItem_Ymn6"};var t=i(74848);function o(e){let{children:n,hidden:i,className:o}=e;return(0,t.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,o),hidden:i,children:n})}},11470:(e,n,i)=>{i.d(n,{A:()=>w});var s=i(96540),r=i(18215),t=i(23104),o=i(56347),l=i(205),c=i(57485),a=i(31682),d=i(70679);function h(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function u(e){const{values:n,children:i}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:i,attributes:s,default:r}}=e;return{value:n,label:i,attributes:s,default:r}}))}(i);return function(e){const n=(0,a.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,i])}function p(e){let{value:n,tabValues:i}=e;return i.some((e=>e.value===n))}function x(e){let{queryString:n=!1,groupId:i}=e;const r=(0,o.W6)(),t=function(e){let{queryString:n=!1,groupId:i}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!i)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return i??null}({queryString:n,groupId:i});return[(0,c.aZ)(t),(0,s.useCallback)((e=>{if(!t)return;const n=new URLSearchParams(r.location.search);n.set(t,e),r.replace({...r.location,search:n.toString()})}),[t,r])]}function f(e){const{defaultValue:n,queryString:i=!1,groupId:r}=e,t=u(e),[o,c]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:i}=e;if(0===i.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:i}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${i.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=i.find((e=>e.default))??i[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:t}))),[a,h]=x({queryString:i,groupId:r}),[f,g]=function(e){let{groupId:n}=e;const i=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,t]=(0,d.Dv)(i);return[r,(0,s.useCallback)((e=>{i&&t.set(e)}),[i,t])]}({groupId:r}),j=(()=>{const e=a??f;return p({value:e,tabValues:t})?e:null})();(0,l.A)((()=>{j&&c(j)}),[j]);return{selectedValue:o,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:t}))throw new Error(`Can't select invalid tab value=${e}`);c(e),h(e),g(e)}),[h,g,t]),tabValues:t}}var g=i(92303);const j={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=i(74848);function b(e){let{className:n,block:i,selectedValue:s,selectValue:o,tabValues:l}=e;const c=[],{blockElementScrollPositionUntilNextRender:a}=(0,t.a_)(),d=e=>{const n=e.currentTarget,i=c.indexOf(n),r=l[i].value;r!==s&&(a(n),o(r))},h=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const i=c.indexOf(e.currentTarget)+1;n=c[i]??c[0];break}case"ArrowLeft":{const i=c.indexOf(e.currentTarget)-1;n=c[i]??c[c.length-1];break}}n?.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":i},n),children:l.map((e=>{let{value:n,label:i,attributes:t}=e;return(0,m.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>c.push(e),onKeyDown:h,onClick:d,...t,className:(0,r.A)("tabs__item",j.tabItem,t?.className,{"tabs__item--active":s===n}),children:i??n},n)}))})}function k(e){let{lazy:n,children:i,selectedValue:t}=e;const o=(Array.isArray(i)?i:[i]).filter(Boolean);if(n){const e=o.find((e=>e.props.value===t));return e?(0,s.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:o.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==t})))})}function v(e){const n=f(e);return(0,m.jsxs)("div",{className:(0,r.A)("tabs-container",j.tabList),children:[(0,m.jsx)(b,{...n,...e}),(0,m.jsx)(k,{...n,...e})]})}function w(e){const n=(0,g.A)();return(0,m.jsx)(v,{...e,children:h(e.children)},String(n))}},41081:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/CliqueOneIntialSigner-3b59001d390fc935c2852c8506507a5a.png"},55500:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/CliqueTwoIntialSigners-a347015db38fec2d68ff5e188b66deaa.png"},28453:(e,n,i)=>{i.d(n,{R:()=>o,x:()=>l});var s=i(96540);const r={},t=s.createContext(r);function o(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/6f6d3344.d4f9183d.js b/assets/js/6f6d3344.d4f9183d.js new file mode 100644 index 00000000000..173fd6a14b0 --- /dev/null +++ b/assets/js/6f6d3344.d4f9183d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1055],{44303:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>c});var s=t(74848),o=t(28453);t(11470),t(19365);const i={sidebar_position:4,description:"Configure Ethereum nodes using AWS Blockchain Node Runners.",toc_max_heading_level:3,tags:["Public networks"]},r="Deploy AWS Node Runners",a={id:"public-networks/tutorials/aws-node-runners",title:"Deploy AWS Node Runners",description:"Configure Ethereum nodes using AWS Blockchain Node Runners.",source:"@site/docs/public-networks/tutorials/aws-node-runners.md",sourceDirName:"public-networks/tutorials",slug:"/public-networks/tutorials/aws-node-runners",permalink:"/public-networks/tutorials/aws-node-runners",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/tutorials/aws-node-runners.md",tags:[{inline:!0,label:"Public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{sidebar_position:4,description:"Configure Ethereum nodes using AWS Blockchain Node Runners.",toc_max_heading_level:3,tags:["Public networks"]},sidebar:"publicDocSidebar",previous:{title:"Deploy Besu using Kubernetes",permalink:"/public-networks/tutorials/kubernetes"},next:{title:"Reference",permalink:"/public-networks/reference"}},l={},c=[{value:"Architecture",id:"architecture",level:2},{value:"Single RPC node setup",id:"single-rpc-node-setup",level:3},{value:"Highly available setup",id:"highly-available-setup",level:3},{value:"Architecture checklist",id:"architecture-checklist",level:3},{value:"Deploy Besu and Teku on AWS",id:"deploy-besu-and-teku-on-aws",level:2},{value:"1. Configure the AWS CloudShell",id:"1-configure-the-aws-cloudshell",level:3},{value:"1.1. Log into AWS",id:"11-log-into-aws",level:4},{value:"1.2. Install dependencies",id:"12-install-dependencies",level:4},{value:"2. Prepare to deploy nodes",id:"2-prepare-to-deploy-nodes",level:3},{value:"3. Deploy nodes",id:"3-deploy--nodes",level:3},{value:"3.1. (Option 1) Single RPC node",id:"31-option-1-single-rpc-node",level:4},{value:"3.2. (Option 2) Highly available RPC nodes",id:"32-option-2-highly-available-rpc-nodes",level:4},{value:"4. Clear and undeploy nodes",id:"4-clear-and-undeploy-nodes",level:3}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"deploy-aws-node-runners",children:"Deploy AWS Node Runners"})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://aws-samples.github.io/aws-blockchain-node-runners/docs/intro",children:"AWS Blockchain Node Runners"}),"\nis an open-source initiative aimed at simplifying the deployment of self-managed blockchain nodes\non AWS using vetted deployment blueprints and infrastructure configurations.\nAWS Node Runners solves common challenges in architecting and deploying blockchain nodes on AWS,\nhelping users identify optimal configurations for specific protocol clients."]}),"\n",(0,s.jsxs)(n.p,{children:["This page walks you through the AWS Node Runners ",(0,s.jsx)(n.a,{href:"#architecture",children:"architecture"}),", and how to\n",(0,s.jsx)(n.a,{href:"#deploy-aws-node-runners",children:"deploy Besu and Teku on AWS"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"architecture",children:"Architecture"}),"\n",(0,s.jsx)(n.p,{children:"AWS Blockchain Node Runners supports several Ethereum client combinations and offers two\nconfiguration options: a single node setup for development environments, and a highly available\nmulti-node setup for production environments.\nThe following diagrams illustrate the high level architecture of these setups."}),"\n",(0,s.jsx)(n.h3,{id:"single-rpc-node-setup",children:"Single RPC node setup"}),"\n",(0,s.jsx)("br",{}),"\n",(0,s.jsx)("p",{align:"center",children:(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Architecture-PoC",src:t(76107).A+"",width:"1131",height:"631"})})}),"\n",(0,s.jsx)("br",{}),"\n",(0,s.jsx)(n.p,{children:"This single node setup is for small-scale development environments.\nIt deploys a single EC2 instance with both consensus and execution clients.\nThe RPC port is exposed only to the internal IP range of the VPC, while P2P ports allow external access to keep the clients synced."}),"\n",(0,s.jsx)(n.h3,{id:"highly-available-setup",children:"Highly available setup"}),"\n",(0,s.jsx)("br",{}),"\n",(0,s.jsx)("p",{align:"center",children:(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Architecture",src:t(94352).A+"",width:"591",height:"411"})})}),"\n",(0,s.jsx)("br",{}),"\n",(0,s.jsx)(n.p,{children:"In this highly available, multiple node setup:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"The sync node synchronizes data continuously with the Ethereum network."}),"\n",(0,s.jsx)(n.li,{children:"The sync node copies node state data to an Amazon S3 bucket."}),"\n",(0,s.jsx)(n.li,{children:"New RPC nodes copy state data from the Amazon S3 bucket to accelerate their initial sync."}),"\n",(0,s.jsx)(n.li,{children:"The Application Load Balancer routes application and smart contract development tool requests to available RPC nodes."}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"architecture-checklist",children:"Architecture checklist"}),"\n",(0,s.jsxs)(n.p,{children:["The following is a checklist for an implementation of the AWS Blockchain Node Runners.\nThis checklist takes into account questions from the ",(0,s.jsx)(n.a,{href:"https://aws.amazon.com/architecture/well-architected/",children:"AWS Well-Architected framework"}),"\nthat are relevant to this workload.\nYou can add more checks from the framework if required for your workload."]}),"\n",(0,s.jsxs)("table",{children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"Pillar"}),(0,s.jsx)("th",{children:"Control"}),(0,s.jsx)("th",{children:"Question/Check"}),(0,s.jsx)("th",{children:"Notes"})]})}),(0,s.jsxs)("tbody",{children:[(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{rowspan:"10",align:"center",children:(0,s.jsx)("b",{children:"Security"})}),(0,s.jsx)("td",{rowspan:"2",align:"center",children:"Network protection"}),(0,s.jsx)("td",{children:"Are there unnecessary open ports in security groups?"}),(0,s.jsxs)("td",{children:["The Erigon snap sync port (",(0,s.jsx)(n.code,{children:"42069"}),") remains open for non-Erigon clients."]})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Traffic inspection"}),(0,s.jsx)("td",{children:"AWS WAF can be implemented for traffic inspection. Additional charges will apply."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{rowspan:"2",align:"center",children:"Compute protection"}),(0,s.jsx)("td",{children:"Reduce attack surface"}),(0,s.jsx)("td",{children:"This solution uses Amazon Linux 2 AMI. You can run hardening scripts on it."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Enable users to perform actions at a distance"}),(0,s.jsx)("td",{children:"This solution uses AWS Systems Manager for terminal sessions, not SSH ports."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{rowspan:"2",align:"center",children:"Data protection at rest"}),(0,s.jsx)("td",{children:"Use encrypted Amazon Elastic Block Store (Amazon EBS) volumes"}),(0,s.jsx)("td",{children:"This solution uses encrypted Amazon EBS volumes."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Use encrypted Amazon Simple Storage Service (Amazon S3) buckets"}),(0,s.jsx)("td",{children:"This solution uses Amazon S3 managed keys (SSE-S3) encryption."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{align:"center",children:"Data protection in transit"}),(0,s.jsx)("td",{children:"Use TLS"}),(0,s.jsx)("td",{children:"The AWS Application Load Balancer currently uses an HTTP listener. To use TLS, create an HTTPS listener with a self-signed certificate."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{rowspan:"2",align:"center",children:"Authorization and access control"}),(0,s.jsx)("td",{children:"Use instance profile with Amazon Elastic Compute Cloud (Amazon EC2) instances"}),(0,s.jsx)("td",{children:"This solution uses AWS Identity and Access Management (AWS IAM) role instead of IAM user."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{children:"Follow the principle of least privilege access"}),(0,s.jsxs)("td",{children:["In the sync node, the root user is not used (it uses the special user ",(0,s.jsx)(n.code,{children:"ethereum"})," instead)."]})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{align:"center",children:"Application security"}),(0,s.jsx)("td",{children:"Security-focused development practices"}),(0,s.jsx)("td",{children:"cdk-nag is used with appropriate suppressions."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{rowspan:"2",align:"center",children:(0,s.jsx)("b",{children:"Cost optimization"})}),(0,s.jsx)("td",{colspan:"2",align:"center",children:"Use cost-effective resources"}),(0,s.jsx)("td",{children:"AWS Graviton-based Amazon EC2 instances are used, which are cost-effective compared to Intel/AMD instances."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{colspan:"2",align:"center",children:"Estimate costs"}),(0,s.jsx)("td",{children:"One sync node with m7g.2xlarge for geth-Lighthouse configuration (2048 GB SSD) will cost around $430 per month in the US East region. Additional charges apply if you deploy RPC nodes with a load balancer."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{rowspan:"3",align:"center",children:(0,s.jsx)("b",{children:"Reliability"})}),(0,s.jsx)("td",{colspan:"2",align:"center",children:"Withstand component failures"}),(0,s.jsx)("td",{children:"This solution uses AWS Application Load Balancer with RPC nodes for high availability. If the sync node fails, Amazon S3 backup can be used to reinstate the nodes."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{colspan:"2",align:"center",children:"How is data backed up?"}),(0,s.jsxs)("td",{children:["Data is backed up to Amazon S3 using the ",(0,s.jsx)("a",{href:"https://github.com/peak/s5cmd",children:"s5cmd"})," tool."]})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{colspan:"2",align:"center",children:"How are workload resources monitored?"}),(0,s.jsx)("td",{children:"Resources are monitored using Amazon CloudWatch dashboards. Amazon CloudWatch custom metrics are pushed through CloudWatch Agent."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{rowspan:"3",align:"center",children:(0,s.jsx)("b",{children:"Performance efficiency"})}),(0,s.jsx)("td",{colspan:"2",align:"center",children:"How is the compute solution selected?"}),(0,s.jsx)("td",{children:"The solution is selected based on best price-performance, that is, AWS Graviton-based Amazon EC2 instances."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{colspan:"2",align:"center",children:"How is the storage solution selected?"}),(0,s.jsx)("td",{children:"The solution is selected based on best price-performance, that is, gp3 Amazon EBS volumes with optimal IOPS and throughput."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{colspan:"2",align:"center",children:"How is the architecture selected?"}),(0,s.jsx)("td",{children:"The s5cmd tool is used for Amazon S3 uploads/downloads because it gives better price-performance compared to Amazon EBS snapshots."})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{align:"center",children:(0,s.jsx)("b",{children:"Operational excellence"})}),(0,s.jsx)("td",{colspan:"2",align:"center",children:"How is health of the workload determined?"}),(0,s.jsxs)("td",{children:["Workload health is determined via AWS Application Load Balancer Target Group Health Checks, on port ",(0,s.jsx)(n.code,{children:"8545"}),"."]})]}),(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{align:"center",children:(0,s.jsx)("b",{children:"Sustainability"})}),(0,s.jsx)("td",{colspan:"2",align:"center",children:"Select the most efficient hardware for your workload"}),(0,s.jsx)("td",{children:"This solution uses AWS Graviton-based Amazon EC2 instances, which offer the best performance per watt of energy use in Amazon EC2."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"deploy-besu-and-teku-on-aws",children:"Deploy Besu and Teku on AWS"}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["In this guide, you'll set all major configuration through environment variables, but you can also\nmodify parameters in the ",(0,s.jsx)(n.code,{children:"config/config.ts"})," file."]})}),"\n",(0,s.jsx)(n.h3,{id:"1-configure-the-aws-cloudshell",children:"1. Configure the AWS CloudShell"}),"\n",(0,s.jsx)(n.h4,{id:"11-log-into-aws",children:"1.1. Log into AWS"}),"\n",(0,s.jsxs)(n.p,{children:["Log in to your ",(0,s.jsx)(n.a,{href:"https://aws.amazon.com/",children:"AWS account"})," with permissions to create and modify\nresources in IAM, EC2, EBS, VPC, S3, KMS, and Secrets Manager.\nFrom the AWS Management Console, open the ",(0,s.jsx)(n.a,{href:"https://docs.aws.amazon.com/cloudshell/latest/userguide/welcome.html",children:"AWS CloudShell"}),",\na web-based shell environment.\nFor more information, see ",(0,s.jsx)(n.a,{href:"https://youtu.be/fz4rbjRaiQM",children:"this demo"})," on\n",(0,s.jsx)(n.a,{href:"https://docs.aws.amazon.com/cloudshell/latest/userguide/creating-vpc-environment.html",children:"CloudShell with VPC environment"}),",\nwhich you'll use to test APIs from an internal IP address space."]}),"\n",(0,s.jsx)(n.h4,{id:"12-install-dependencies",children:"1.2. Install dependencies"}),"\n",(0,s.jsx)(n.p,{children:"To deploy and test blueprints in the CloudShell, clone the following repository and install dependencies:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/aws-samples/aws-blockchain-node-runners.git\ncd aws-blockchain-node-runners\nnpm install\n"})}),"\n",(0,s.jsx)(n.h3,{id:"2-prepare-to-deploy-nodes",children:"2. Prepare to deploy nodes"}),"\n",(0,s.jsx)(n.p,{children:"In the root directory of your project:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"If you have deleted or don't have the default VPC, create a default VPC:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"aws ec2 create-default-vpc\n"})}),"\n",(0,s.jsxs)(n.admonition,{type:"note",children:[(0,s.jsx)(n.p,{children:"You might see the following error if the default VPC already exists:"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"An error occurred (DefaultVpcAlreadyExists) when calling the CreateDefaultVpc operation: A Default VPC already exists for this account in this region.\n"})}),(0,s.jsxs)(n.p,{children:["This means that the default VPC must have at least two public subnets in different availability\nzones, and public subnet must set ",(0,s.jsx)(n.code,{children:"Auto-assign public IPv4 address"})," to ",(0,s.jsx)(n.code,{children:"YES"}),"."]})]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Configure your Node Runners Ethereum blueprint deployment.\nTo specify the Ethereum client combination you want to deploy, create your own copy of the ",(0,s.jsx)(n.code,{children:".env"}),"\nfile and edit it using your preferred text editor.\nThe following example uses a sample configuration from the repository for a Besu and Teku node deployment:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# Ensure you're in aws-blockchain-node-runners/lib/ethereum\ncd lib/ethereum\npwd\ncp ./sample-configs/.env-besu-teku .env\nnano .env\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["You can find more examples for other Ethereum client combinations in the ",(0,s.jsx)(n.code,{children:"sample-configs"})," directory."]})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Deploy common components, such as IAM role and Amazon S3 bucket to store data snapshots:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"pwd\n# Ensure you're in aws-blockchain-node-runners/lib/ethereum\nnpx cdk deploy eth-common\n"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"3-deploy--nodes",children:"3. Deploy nodes"}),"\n",(0,s.jsx)(n.p,{children:"Deploy your node or nodes, depending on your setup:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"#31-option-1-single-rpc-node",children:"Single RPC node"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"#32-option-2-highly-available-rpc-nodes",children:"Highly available RPC nodes"})}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"31-option-1-single-rpc-node",children:"3.1. (Option 1) Single RPC node"}),"\n",(0,s.jsx)(n.p,{children:"In a single RPC node setup:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Deploy the node:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"pwd\n# Ensure you're in aws-blockchain-node-runners/lib/ethereum\nnpx cdk deploy eth-single-node --json --outputs-file single-node-deploy.json\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["The default VPC must have at least two public subnets in different Availability Zones, and the\npublic subnets must set ",(0,s.jsx)(n.code,{children:"Auto-assign public IPv4 address"})," to ",(0,s.jsx)(n.code,{children:"YES"}),"."]})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["After starting the node, wait for the initial synchronization process to finish.\nIt can take half a day to approximately 6-10 days, depending on the client combination and\nthe network state.\nYou can use Amazon CloudWatch to track the progress, which publishes metrics every five minutes.\nWatch ",(0,s.jsx)(n.code,{children:"sync distance"})," for the consensus client, and ",(0,s.jsx)(n.code,{children:"blocks behind"})," for the execution client.\nWhen the node is fully synced, those two metrics should be ",(0,s.jsx)(n.code,{children:"0"}),".\nTo see them:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Navigate to ",(0,s.jsx)(n.a,{href:"https://console.aws.amazon.com/cloudwatch/",children:"CloudWatch service"})," (ensure you're\nin the region you specified for ",(0,s.jsx)(n.code,{children:"AWS_REGION"}),")."]}),"\n",(0,s.jsxs)(n.li,{children:["Open ",(0,s.jsx)(n.code,{children:"Dashboards"})," and select ",(0,s.jsx)(n.code,{children:"eth-sync-node-"})," from the list of dashboards."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Once the initial synchronization is done, you can access the RPC API of that node from within the\nsame VPC.\nThe RPC port is not exposed to the Internet.\nRun the following query against the private IP of the single RPC node you deployed:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"INSTANCE_ID=$(cat single-node-deploy.json | jq -r '..|.node-instance-id? | select(. != null)')\nNODE_INTERNAL_IP=$(aws ec2 describe-instances --instance-ids $INSTANCE_ID --query 'Reservations[*].Instances[*].PrivateIpAddress' --output text)\necho \"NODE_INTERNAL_IP=$NODE_INTERNAL_IP\"\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Copy the output from the last ",(0,s.jsx)(n.code,{children:"echo"})," command with ",(0,s.jsx)(n.code,{children:"NODE_INTERNAL_IP="})," and open\n",(0,s.jsx)(n.a,{href:"https://docs.aws.amazon.com/cloudshell/latest/userguide/creating-vpc-environment.html",children:"CloudShell tab with VPC environment"}),"\nto access the internal IP address space.\nPaste ",(0,s.jsx)(n.code,{children:"NODE_INTERNAL_IP="})," into the new CloudShell tab.\nThen, query the API:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'# IMPORTANT: Run from CloudShell VPC environment tab\n# This queries the token balance of a Beacon deposit contract: https://etherscan.io/address/0x00000000219ab540356cbb839cbe05303d7705fa\ncurl http://$NODE_INTERNAL_IP:8545 -X POST -H "Content-Type: application/json" \\\n--data \'{"method":"eth_getBalance","params":["0x00000000219ab540356cBB839Cbe05303d7705Fa", "latest"],"id":1,"jsonrpc":"2.0"}\'\n'})}),"\n",(0,s.jsx)(n.p,{children:"The result should look like the following (the actual balance might change):"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-javascript",children:'{"jsonrpc":"2.0","id":1,"result":"0xe791d050f91d9949d344d"}\n'})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"32-option-2-highly-available-rpc-nodes",children:"3.2. (Option 2) Highly available RPC nodes"}),"\n",(0,s.jsx)(n.p,{children:"In a highly available multi-node setup:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Deploy the sync node:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"pwd\n# Ensure you're in aws-blockchain-node-runners/lib/ethereum\nnpx cdk deploy eth-sync-node --json --outputs-file sync-node-deploy.json\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["The default VPC must have at least two public subnets in different Availability Zones, and the\npublic subnets must set ",(0,s.jsx)(n.code,{children:"Auto-assign public IPv4 address"})," to ",(0,s.jsx)(n.code,{children:"YES"}),"."]})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["After starting the node, wait for the initial synchronization process to finish.\nIt can take from half a day to approximately 6-10 days, depending on the client combination and\nthe network state.\nYou can use Amazon CloudWatch to track the progress, which publishes metrics every five minutes.\nWatch ",(0,s.jsx)(n.code,{children:"sync distance"})," for the consensus client, and ",(0,s.jsx)(n.code,{children:"blocks behind"})," for the execution client.\nWhen the node is fully synced, those two metrics should be ",(0,s.jsx)(n.code,{children:"0"}),".\nTo see them:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Navigate to ",(0,s.jsx)(n.a,{href:"https://console.aws.amazon.com/cloudwatch/",children:"CloudWatch service"})," (make sure you are\nin the region you have specified for ",(0,s.jsx)(n.code,{children:"AWS_REGION"}),")."]}),"\n",(0,s.jsxs)(n.li,{children:["Open ",(0,s.jsx)(n.code,{children:"Dashboards"})," and select ",(0,s.jsx)(n.code,{children:"eth-sync-node-"})," from the list of dashboards."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Once the synchronization process is over, the script automatically stops both clients and copies\nall the contents of the ",(0,s.jsx)(n.code,{children:"/data"})," directory to your snapshot S3 bucket.\nThat can take from 30 minutes to approximately 2 hours.\nDuring the process, you will see lower CPU and RAM usage, but high data disc throughput and\noutbound network traffic.\nThe script automatically starts the clients after the process is done."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["The snapshot backup process automatically runs every day at midnight of the time zone were the\nsync node runs.\nTo change the schedule, modify ",(0,s.jsx)(n.code,{children:"crontab"})," of the root user on the node's EC2 instance."]})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Configure and deploy two RPC nodes:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"pwd\n# Ensure you're in aws-blockchain-node-runners/lib/ethereum\nnpx cdk deploy eth-rpc-nodes --json --outputs-file rpc-node-deploy.json\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Give the new RPC nodes approximately 30 minutes to initialize, then run the following query\nagainst the load balancer behind the RPC node created:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"export ETH_RPC_ABL_URL=$(cat rpc-node-deploy.json | jq -r '..|.alburl? | select(. != null)')\necho ETH_RPC_ABL_URL=$ETH_RPC_ABL_URL\n"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'# IMPORTANT: Run from CloudShell VPC environment tab\n# We query token balance of Beacon deposit contract: https://etherscan.io/address/0x00000000219ab540356cbb839cbe05303d7705fa\ncurl http://$ETH_RPC_ABL_URL:8545 -X POST -H "Content-Type: application/json" \\\n --data \'{"method":"eth_getBalance","params":["0x00000000219ab540356cBB839Cbe05303d7705Fa", "latest"],"id":1,"jsonrpc":"2.0"}\'\n'})}),"\n",(0,s.jsx)(n.p,{children:"The result should look like the following (the actual balance might change):"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-javascript",children:'{"jsonrpc":"2.0","id":1,"result":"0xe791d050f91d9949d344d"}\n'})}),"\n",(0,s.jsx)(n.p,{children:"If the nodes are still starting and catching up with the chain, you will see the following response:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-HTML",children:"\n503 Service Temporarily Unavailable\n\n

503 Service Temporarily Unavailable

\n\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:"By default and for security reasons, the load balancer is available only from within the default\nVPC in the region where it is deployed.\nIt is not available from the Internet and is not open for external connections.\nBefore opening it up, protect your RPC APIs."})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"4-clear-and-undeploy-nodes",children:"4. Clear and undeploy nodes"}),"\n",(0,s.jsx)(n.p,{children:"To clear and undeploy the RPC nodes, sync nodes, and common components, use the following commands:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"# Set the AWS account ID and region in case the local .env file is lost.\nexport AWS_ACCOUNT_ID=\nexport AWS_REGION=\n\npwd\n# Ensure you're in aws-blockchain-node-runners/lib/ethereum.\n\n# Destroy the single RPC node.\ncdk destroy eth-single-node\n\n# Destroy multiple RPC nodes.\ncdk destroy eth-rpc-nodes\n\n# Destroy the sync node.\ncdk destroy eth-sync-node\n\n# You need to manually delete an s3 bucket with a name similar to 'eth-snapshots-$accountid-eth-nodes-common'\n# on the console:\n# 1. Empty the bucket\n# 2. Delete the bucket\n# 3. Execute and delete all common components like IAM role and Security Group\ncdk destroy eth-common\n"})})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var s=t(18215);const o={tabItem:"tabItem_Ymn6"};var i=t(74848);function r(e){let{children:n,hidden:t,className:r}=e;return(0,i.jsx)("div",{role:"tabpanel",className:(0,s.A)(o.tabItem,r),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>v});var s=t(96540),o=t(18215),i=t(23104),r=t(56347),a=t(205),l=t(57485),c=t(31682),d=t(70679);function h(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function u(e){const{values:n,children:t}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:t,attributes:s,default:o}}=e;return{value:n,label:t,attributes:s,default:o}}))}(t);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:t}=e;const o=(0,r.W6)(),i=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l.aZ)(i),(0,s.useCallback)((e=>{if(!i)return;const n=new URLSearchParams(o.location.search);n.set(i,e),o.replace({...o.location,search:n.toString()})}),[i,o])]}function x(e){const{defaultValue:n,queryString:t=!1,groupId:o}=e,i=u(e),[r,l]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=t.find((e=>e.default))??t[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:i}))),[c,h]=m({queryString:t,groupId:o}),[x,j]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[o,i]=(0,d.Dv)(t);return[o,(0,s.useCallback)((e=>{t&&i.set(e)}),[t,i])]}({groupId:o}),f=(()=>{const e=c??x;return p({value:e,tabValues:i})?e:null})();(0,a.A)((()=>{f&&l(f)}),[f]);return{selectedValue:r,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);l(e),h(e),j(e)}),[h,j,i]),tabValues:i}}var j=t(92303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function b(e){let{className:n,block:t,selectedValue:s,selectValue:r,tabValues:a}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.a_)(),d=e=>{const n=e.currentTarget,t=l.indexOf(n),o=a[t].value;o!==s&&(c(n),r(o))},h=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":t},n),children:a.map((e=>{let{value:n,label:t,attributes:i}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>l.push(e),onKeyDown:h,onClick:d,...i,className:(0,o.A)("tabs__item",f.tabItem,i?.className,{"tabs__item--active":s===n}),children:t??n},n)}))})}function y(e){let{lazy:n,children:t,selectedValue:i}=e;const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===i));return e?(0,s.cloneElement)(e,{className:(0,o.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==i})))})}function w(e){const n=x(e);return(0,g.jsxs)("div",{className:(0,o.A)("tabs-container",f.tabList),children:[(0,g.jsx)(b,{...n,...e}),(0,g.jsx)(y,{...n,...e})]})}function v(e){const n=(0,j.A)();return(0,g.jsx)(w,{...e,children:h(e.children)},String(n))}},76107:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/aws-node-runners-1-cf2061ac2c66dd1dcfe70d817a2aa2d3.png"},94352:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/aws-node-runners-2-6512ceeed8e55d6ca4ba59db41443b5a.png"},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var s=t(96540);const o={},i=s.createContext(o);function r(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/714c5be8.8bc14b40.js b/assets/js/714c5be8.8bc14b40.js new file mode 100644 index 00000000000..7b2cfaf21ba --- /dev/null +++ b/assets/js/714c5be8.8bc14b40.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8814],{86670:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>r,default:()=>c,frontMatter:()=>i,metadata:()=>a,toc:()=>p});var o=n(74848),s=n(28453);const i={sidebar_position:2,title:"Use Ansible",description:"Deploying Besu with Ansible role on Galaxy",tags:["private networks"]},r="Deploy Besu with Ansible",a={id:"private-networks/how-to/deploy/ansible",title:"Use Ansible",description:"Deploying Besu with Ansible role on Galaxy",source:"@site/docs/private-networks/how-to/deploy/ansible.md",sourceDirName:"private-networks/how-to/deploy",slug:"/private-networks/how-to/deploy/ansible",permalink:"/private-networks/how-to/deploy/ansible",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/deploy/ansible.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{sidebar_position:2,title:"Use Ansible",description:"Deploying Besu with Ansible role on Galaxy",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Deploy to the cloud",permalink:"/private-networks/how-to/deploy/cloud"},next:{title:"Use Kubernetes",permalink:"/private-networks/how-to/deploy/kubernetes"}},l={},p=[];function d(e){const t={a:"a",admonition:"admonition",h1:"h1",header:"header",p:"p",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"deploy-besu-with-ansible",children:"Deploy Besu with Ansible"})}),"\n",(0,o.jsxs)(t.p,{children:["To deploy Besu using Ansible, use the ",(0,o.jsx)(t.a,{href:"https://galaxy.ansible.com/consensys/hyperledger_besu",children:"Besu role"})," published on Galaxy."]}),"\n",(0,o.jsxs)(t.p,{children:['For more information, see the "Read Me" button on the ',(0,o.jsx)(t.a,{href:"https://galaxy.ansible.com/consensys/hyperledger_besu",children:"Ansible Galaxy Besu page"}),"."]}),"\n",(0,o.jsx)(t.admonition,{type:"tip",children:(0,o.jsx)(t.p,{children:"We strongly recommend automating network creation. Automating makes updates easier and ensures your configuration is synchronized across the network."})})]})}function c(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>a});var o=n(96540);const s={},i=o.createContext(s);function r(e){const t=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/715197f0.e1537fe2.js b/assets/js/715197f0.e1537fe2.js new file mode 100644 index 00000000000..1999d1abb6e --- /dev/null +++ b/assets/js/715197f0.e1537fe2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5487],{16677:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>p});var r=t(74848),i=t(28453);const s={title:"Private transaction processing",sidebar_position:1,description:"Private transaction processing"},a="Private transaction processing (Deprecated)",c={id:"private-networks/concepts/privacy/private-transactions/processing",title:"Private transaction processing",description:"Private transaction processing",source:"@site/docs/private-networks/concepts/privacy/private-transactions/processing.md",sourceDirName:"private-networks/concepts/privacy/private-transactions",slug:"/private-networks/concepts/privacy/private-transactions/processing",permalink:"/private-networks/concepts/privacy/private-transactions/processing",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/concepts/privacy/private-transactions/processing.md",tags:[],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Private transaction processing",sidebar_position:1,description:"Private transaction processing"},sidebar:"privateDocSidebar",previous:{title:"Private transactions (Deprecated)",permalink:"/private-networks/concepts/privacy/private-transactions/"},next:{title:"Privacy groups",permalink:"/private-networks/concepts/privacy/privacy-groups"}},o={},p=[];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",header:"header",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"private-transaction-processing-deprecated",children:"Private transaction processing (Deprecated)"})}),"\n",(0,r.jsx)(n.admonition,{type:"caution",children:(0,r.jsxs)(n.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,r.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,r.jsxs)(n.p,{children:["Processing ",(0,r.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/",children:"private transactions"})," involves the following:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Precompiled contract"}),": A smart contract compiled from the source language to EVM bytecode and stored by an Ethereum node for later execution."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Privacy marker transaction (PMT)"}),": A public Ethereum transaction with a payload of the enclave key. The enclave key is a pointer to the private transaction in Tessera. The ",(0,r.jsx)(n.code,{children:"to"})," attribute of the PMT is the ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#priv_getprivacyprecompileaddress",children:"address of the privacy precompiled contract"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The PMT is ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/use-privacy/sign-pmts",children:"signed with a random key or the key specified on the command line"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Private transaction processing is illustrated and described in the following diagram."}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Processing Private Transactions",src:t(10457).A+"",width:"2244",height:"2062"})}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Submit a private transaction using ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,r.jsx)(n.code,{children:"eea_sendRawTransaction"})}),". The signed transaction includes transaction parameters specific to private transactions, including:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"privateFor"})," or ",(0,r.jsx)(n.code,{children:"privacyGroupId"}),", which specifies the list of recipients."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"privateFrom"}),", which specifies the sender."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"restriction"}),", which specifies the transaction is restricted to the transaction participants."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"The JSON-RPC endpoint passes the private transaction to the Private Transaction Handler."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"The Private Transaction Handler sends the private transaction to Tessera."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Tessera distributes the private transaction directly (that is, point-to-point) to the Tessera nodes specified in ",(0,r.jsx)(n.code,{children:"privateFor"})," or belonging to the privacy group identified by ",(0,r.jsx)(n.code,{children:"privacyGroupId"}),". All recipient Tessera nodes store the transaction. Tessera associates the stored transaction with the transaction hash and privacy group ID."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Tessera returns the transaction hash to the Private Transaction Handler."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"The Private Transaction Handler creates a PMT for the private transaction. The Private Transaction Handler propagates the PMT using devP2P in the same way as any other public Ethereum transaction."}),"\n",(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsxs)(n.p,{children:["If you want to sign the PMT outside of Besu, use ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/private-transactions#priv_distributerawtransaction",children:(0,r.jsx)(n.code,{children:"priv_distributeRawTransaction"})})," instead of ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,r.jsx)(n.code,{children:"eea_sendRawTransaction"})}),"."]})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Besu mines the PMT into a block and the PMT is distributed to all Ethereum nodes in the network."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["The Mainnet Transaction Processor processes the PMT in the same way as any other public transaction. On nodes containing the ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#priv_getprivacyprecompileaddress",children:"privacy precompile contract"})," specified in the ",(0,r.jsx)(n.code,{children:"to"})," attribute of the PMT, the Mainnet Transaction Processor passes the PMT to the privacy precompile contract."]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsx)(n.p,{children:"Nodes receiving the PMT that don't contain the privacy precompile contract ignore the PMT."})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"The privacy precompile contract queries Tessera for the private transaction and privacy group ID using the transaction hash."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"The privacy precompile contract passes the private transaction to the Private Transaction Processor. The privacy group ID specifies the private world state to use."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"The Private Transaction Processor executes the transaction. The Private Transaction Processor can read and write to the private world state, and read from the public world state."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.admonition,{title:"Recommendations",type:"danger",children:[(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["We recommend using a network with a consensus mechanism supporting transaction finality. For example, ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft",children:"IBFT 2.0"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Tessera must be ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/use-privacy/tessera",children:"highly available and run in a separate instance to Besu"}),"."]}),"\n"]}),(0,r.jsxs)(n.p,{children:["Using private transactions with ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#pruning",children:"pruning"})," or ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:"fast sync"})," is not supported."]})]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},10457:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/PrivateTransactionProcessing-777f8e3007f496f2e621e965fb54dcd0.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>c});var r=t(96540);const i={},s=r.createContext(i);function a(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/71635f7b.a08e5a3f.js b/assets/js/71635f7b.a08e5a3f.js new file mode 100644 index 00000000000..0e5e03a31e1 --- /dev/null +++ b/assets/js/71635f7b.a08e5a3f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[3108],{74449:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>a,toc:()=>c});var r=n(74848),s=n(28453);const o={title:"Production",sidebar_position:6,description:"Deploying Besu Helm Charts for production on a Kubernetes cluster",tags:["private networks"]},i="Deploy for production",a={id:"private-networks/tutorials/kubernetes/production",title:"Production",description:"Deploying Besu Helm Charts for production on a Kubernetes cluster",source:"@site/docs/private-networks/tutorials/kubernetes/production.md",sourceDirName:"private-networks/tutorials/kubernetes",slug:"/private-networks/tutorials/kubernetes/production",permalink:"/private-networks/tutorials/kubernetes/production",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/kubernetes/production.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:6,frontMatter:{title:"Production",sidebar_position:6,description:"Deploying Besu Helm Charts for production on a Kubernetes cluster",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Maintenance",permalink:"/private-networks/tutorials/kubernetes/maintenance"},next:{title:"Configure Kubernetes mode in NAT manager",permalink:"/private-networks/tutorials/kubernetes/nat-manager"}},l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Overview",id:"overview",level:2},{value:"Deploy",id:"deploy",level:2},{value:"Check that you can connect to the cluster with kubectl",id:"check-that-you-can-connect-to-the-cluster-with-kubectl",level:3},{value:"Deploy the network",id:"deploy-the-network",level:3},{value:"Best practices",id:"best-practices",level:2},{value:"Multi-cluster support",id:"multi-cluster-support",level:2}];function u(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"deploy-for-production",children:"Deploy for production"})}),"\n",(0,r.jsx)(t.p,{children:"You can deploy Besu for production on a Kubernetes cluster."}),"\n",(0,r.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["Clone the ",(0,r.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-kubernetes",children:"Quorum-Kubernetes"})," repository"]}),"\n",(0,r.jsxs)(t.li,{children:["A ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/kubernetes/cluster",children:"running Kubernetes cluster"})]}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://kubernetes.io/docs/tasks/tools/",children:"Kubectl"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"https://helm.sh/docs/intro/install/",children:"Helm3"})}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsxs)(t.p,{children:["To get things production-ready, we'll use the same charts, and set a few of the values in the ",(0,r.jsx)(t.code,{children:"cluster"})," map as in the ",(0,r.jsx)(t.a,{href:"#deploy-the-network",children:"Deploy"})," section."]}),"\n",(0,r.jsx)(t.admonition,{type:"warning",children:(0,r.jsx)(t.p,{children:"The following tutorial ONLY supports AWS and Azure currently. Other cloud providers will be added in time."})}),"\n",(0,r.jsx)(t.admonition,{type:"warning",children:(0,r.jsxs)(t.p,{children:["We recommend using AWS RDS or Azure PostgreSQL in High Availability mode for any Tessera nodes that you use. The templates don't include that functionality. They can be provisioned with CloudFormation or Azure Resource Manager, respectively. Once created, please specify the connection details to the ",(0,r.jsx)(t.code,{children:"values.yml"}),"."]})}),"\n",(0,r.jsx)(t.h2,{id:"deploy",children:"Deploy"}),"\n",(0,r.jsxs)(t.h3,{id:"check-that-you-can-connect-to-the-cluster-with-kubectl",children:["Check that you can connect to the cluster with ",(0,r.jsx)(t.code,{children:"kubectl"})]}),"\n",(0,r.jsxs)(t.p,{children:["Once you have a ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/kubernetes/cluster",children:"cluster running"}),", verify ",(0,r.jsx)(t.code,{children:"kubectl"})," is connected to cluster with:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'kubectl version\nClient Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.1", GitCommit:"86ec240af8cbd1b60bcc4c03c20da9b98005b92e", GitTreeState:"clean", BuildDate:"2021-12-16T11:41:01Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/amd64"}\nServer Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.3", GitCommit:"c92036820499fedefec0f847e2054d824aea6cd1", GitTreeState:"clean", BuildDate:"2021-10-27T18:35:25Z", GoVersion:"go1.16.9", Compiler:"gc", Platform:"linux/amd64"}\n'})}),"\n",(0,r.jsx)(t.h3,{id:"deploy-the-network",children:"Deploy the network"}),"\n",(0,r.jsxs)(t.p,{children:["For the rest of this tutorial we use Helm charts. After you have cloned the ",(0,r.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-kubernetes",children:"Quorum-Kubernetes"})," repository, change the directory to ",(0,r.jsx)(t.code,{children:"helm"})," for the rest of this tutorial."]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"cd helm\n"})}),"\n",(0,r.jsx)(t.p,{children:"Each helm chart has the following keys that must be set."}),"\n",(0,r.jsxs)(t.p,{children:["Specify either ",(0,r.jsx)(t.code,{children:"aws"})," or ",(0,r.jsx)(t.code,{children:"azure"})," for the ",(0,r.jsx)(t.code,{children:"cluster.provider"}),". Additionally, set ",(0,r.jsx)(t.code,{children:"cloudNativeServices: true"})," and ",(0,r.jsx)(t.code,{children:"reclaimPolicy: Retain"})," so that it looks like the following for AWS:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"cluster:\n provider: aws # choose from: aws | azure\n cloudNativeServices: true # set to true to use Cloud Native Services (SecretsManager and IAM for AWS; KeyVault & Managed Identities for Azure)\n reclaimPolicy: Retain # set to either Retain or Delete; note that PVCs and PVs will still exist after a 'helm delete'. Setting to Retain will keep volumes even if PVCs/PVs are deleted in kubernetes. Setting to Delete will remove volumes from EC2 EBS when PVC is deleted\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Follow the steps outlined in the ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/kubernetes/charts",children:"deploy charts"})," tutorial to deploy the network."]}),"\n",(0,r.jsx)(t.h2,{id:"best-practices",children:"Best practices"}),"\n",(0,r.jsx)(t.p,{children:"The most important thing is to plan your network out on paper first and then test it in a Dev cluster to make sure connectivity works with your applications and you get the required throughput in transactions per second (TPS). We also recommend you test the entire process, from provisioning infrastructure to updating nodes on a Dev cluster, prior to launching your production network."}),"\n",(0,r.jsx)(t.p,{children:"By default, the cloud Kubernetes clusters take care of availability and do multi-zones within a region. The scheduler also ensures that deployments are spread out across zones. Where possible, we recommend you use multiple bootnodes and static nodes to speed up peering."}),"\n",(0,r.jsxs)(t.p,{children:["You can connect to APIs and services outside the cluster normally, but connecting into your network (such as adding an on-premise node to the network) might require more configuration. Please check the ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/kubernetes/#limitations",children:"limitations"})," and use CNI where possible. To connect an external node to your cluster, the easiest way is to use a VPN as seen in the following ",(0,r.jsx)(t.a,{href:"#multi-cluster-support",children:"multi-cluster"})," setup."]}),"\n",(0,r.jsx)(t.p,{children:"Finally, we recommend setting up monitoring and alerting from the beginning, so you can get early warnings of issues rather than after failure. We have a monitoring chart which uses Grafana and you can use it with Alertmanager to create alerts or alternatively alert via Cloudwatch or Azure Monitoring."}),"\n",(0,r.jsx)(t.h2,{id:"multi-cluster-support",children:"Multi-cluster support"}),"\n",(0,r.jsx)(t.p,{children:"When CNI is used, multi-cluster support is simple, but you have to cater for cross-cluster DNS names. Ideally, you want to create two separate VPCs (or VNets) and make sure they have different base CIDR blocks so that IP addresses don't conflict. Once done, peer the VPCs together and update the subnet route table, so they are effectively a giant single network."}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"multi-cluster",src:n(19395).A+"",width:"1151",height:"591"})}),"\n",(0,r.jsxs)(t.p,{children:["When you ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/kubernetes/cluster",children:"spin up clusters"}),", use ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/kubernetes/#limitations",children:"CNI"})," and CIDR blocks to match the subnet's CIDR settings. Then deploy the genesis chart on one cluster and copy across the genesis file and static nodes config maps. Depending on your DNS settings, they might be fine as is, or they might need to be actual IP addresses. That is, you can provision cluster B only after cluster A has Besu nodes up and running."]}),"\n",(0,r.jsx)(t.p,{children:"Deploy the network on cluster A, and then on cluster B. Besu nodes on cluster A should work as expected, and Besu nodes on cluster B should use the list of peers provided to communicate with the nodes on cluster A."}),"\n",(0,r.jsx)(t.p,{children:"Keeping the list of peers on the clusters live and up to date can be challenging, so we recommend using the cloud service provider's DNS service such as Route 53 or Azure DNS and adapting the charts to create entries for each node when it comes up."})]})}function d(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},19395:(e,t,n)=>{n.d(t,{A:()=>r});const r=n.p+"assets/images/kubernetes-3-eb071f2ad027b1e11e96e3c4f68a745a.png"},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>a});var r=n(96540);const s={},o=r.createContext(s);function i(e){const t=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/71e3c29d.9a203a9a.js b/assets/js/71e3c29d.9a203a9a.js new file mode 100644 index 00000000000..28e3e5fe4b8 --- /dev/null +++ b/assets/js/71e3c29d.9a203a9a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4107],{95672:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>d,contentTitle:()=>t,default:()=>p,frontMatter:()=>c,metadata:()=>o,toc:()=>h});var a=l(74848),s=l(28453),i=l(11470),r=l(19365);const c={title:"Options",description:"Besu command line interface reference",sidebar_position:1,tags:["public networks","private networks"]},t=void 0,o={id:"public-networks/reference/cli/options",title:"Options",description:"Besu command line interface reference",source:"@site/docs/public-networks/reference/cli/options.md",sourceDirName:"public-networks/reference/cli",slug:"/public-networks/reference/cli/options",permalink:"/public-networks/reference/cli/options",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/reference/cli/options.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Options",description:"Besu command line interface reference",sidebar_position:1,tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Reference",permalink:"/public-networks/reference"},next:{title:"Subcommands",permalink:"/public-networks/reference/cli/subcommands"}},d={},h=[{value:"Specify options",id:"specify-options",level:2},{value:"Options",id:"options",level:2},{value:"api-gas-price-blocks",id:"api-gas-price-blocks",level:3},{value:"api-gas-price-max",id:"api-gas-price-max",level:3},{value:"api-gas-price-percentile",id:"api-gas-price-percentile",level:3},{value:"auto-log-bloom-caching-enabled",id:"auto-log-bloom-caching-enabled",level:3},{value:"banned-node-ids",id:"banned-node-ids",level:3},{value:"block-txs-selection-max-time",id:"block-txs-selection-max-time",level:3},{value:"bonsai-historical-block-limit",id:"bonsai-historical-block-limit",level:3},{value:"bonsai-limit-trie-logs-enabled",id:"bonsai-limit-trie-logs-enabled",level:3},{value:"bonsai-trie-logs-pruning-window-size",id:"bonsai-trie-logs-pruning-window-size",level:3},{value:"bootnodes",id:"bootnodes",level:3},{value:"cache-last-blocks",id:"cache-last-blocks",level:3},{value:"color-enabled",id:"color-enabled",level:3},{value:"compatibility-eth64-forkid-enabled",id:"compatibility-eth64-forkid-enabled",level:3},{value:"config-file",id:"config-file",level:3},{value:"data-path",id:"data-path",level:3},{value:"data-storage-format",id:"data-storage-format",level:3},{value:"discovery-dns-url",id:"discovery-dns-url",level:3},{value:"discovery-enabled",id:"discovery-enabled",level:3},{value:"engine-host-allowlist",id:"engine-host-allowlist",level:3},{value:"engine-jwt-disabled",id:"engine-jwt-disabled",level:3},{value:"engine-jwt-secret",id:"engine-jwt-secret",level:3},{value:"engine-rpc-enabled",id:"engine-rpc-enabled",level:3},{value:"engine-rpc-port",id:"engine-rpc-port",level:3},{value:"ethstats",id:"ethstats",level:3},{value:"ethstats-cacert-file",id:"ethstats-cacert-file",level:3},{value:"ethstats-contact",id:"ethstats-contact",level:3},{value:"genesis-file",id:"genesis-file",level:3},{value:"genesis-state-hash-cache-enabled",id:"genesis-state-hash-cache-enabled",level:3},{value:"graphql-http-cors-origins",id:"graphql-http-cors-origins",level:3},{value:"graphql-http-enabled",id:"graphql-http-enabled",level:3},{value:"graphql-http-host",id:"graphql-http-host",level:3},{value:"graphql-http-port",id:"graphql-http-port",level:3},{value:"help",id:"help",level:3},{value:"host-allowlist",id:"host-allowlist",level:3},{value:"identity",id:"identity",level:3},{value:"json-pretty-print-enabled",id:"json-pretty-print-enabled",level:3},{value:"key-value-storage",id:"key-value-storage",level:3},{value:"kzg-trusted-setup",id:"kzg-trusted-setup",level:3},{value:"logging",id:"logging",level:3},{value:"max-peers",id:"max-peers",level:3},{value:"metrics-category",id:"metrics-category",level:3},{value:"metrics-enabled",id:"metrics-enabled",level:3},{value:"metrics-host",id:"metrics-host",level:3},{value:"metrics-port",id:"metrics-port",level:3},{value:"metrics-protocol",id:"metrics-protocol",level:3},{value:"metrics-push-enabled",id:"metrics-push-enabled",level:3},{value:"metrics-push-host",id:"metrics-push-host",level:3},{value:"metrics-push-interval",id:"metrics-push-interval",level:3},{value:"metrics-push-port",id:"metrics-push-port",level:3},{value:"metrics-push-prometheus-job",id:"metrics-push-prometheus-job",level:3},{value:"min-block-occupancy-ratio",id:"min-block-occupancy-ratio",level:3},{value:"min-gas-price",id:"min-gas-price",level:3},{value:"min-priority-fee",id:"min-priority-fee",level:3},{value:"miner-coinbase",id:"miner-coinbase",level:3},{value:"miner-enabled",id:"miner-enabled",level:3},{value:"miner-extra-data",id:"miner-extra-data",level:3},{value:"miner-stratum-enabled (Deprecated)",id:"miner-stratum-enabled-deprecated",level:3},{value:"miner-stratum-host (Deprecated)",id:"miner-stratum-host-deprecated",level:3},{value:"miner-stratum-port (Deprecated)",id:"miner-stratum-port-deprecated",level:3},{value:"nat-method",id:"nat-method",level:3},{value:"net-restrict",id:"net-restrict",level:3},{value:"network",id:"network",level:3},{value:"network-id",id:"network-id",level:3},{value:"node-private-key-file",id:"node-private-key-file",level:3},{value:"p2p-enabled",id:"p2p-enabled",level:3},{value:"p2p-host",id:"p2p-host",level:3},{value:"p2p-interface",id:"p2p-interface",level:3},{value:"p2p-port",id:"p2p-port",level:3},{value:"print-paths-and-exit",id:"print-paths-and-exit",level:3},{value:"profile",id:"profile",level:3},{value:"random-peer-priority-enabled",id:"random-peer-priority-enabled",level:3},{value:"receipt-compaction-enabled",id:"receipt-compaction-enabled",level:3},{value:"remote-connections-limit-enabled",id:"remote-connections-limit-enabled",level:3},{value:"remote-connections-max-percentage",id:"remote-connections-max-percentage",level:3},{value:"reorg-logging-threshold",id:"reorg-logging-threshold",level:3},{value:"required-block",id:"required-block",level:3},{value:"revert-reason-enabled",id:"revert-reason-enabled",level:3},{value:"rpc-gas-cap",id:"rpc-gas-cap",level:3},{value:"rpc-http-api",id:"rpc-http-api",level:3},{value:"rpc-http-api-methods-no-auth",id:"rpc-http-api-methods-no-auth",level:3},{value:"rpc-http-authentication-credentials-file",id:"rpc-http-authentication-credentials-file",level:3},{value:"rpc-http-authentication-enabled",id:"rpc-http-authentication-enabled",level:3},{value:"rpc-http-authentication-jwt-algorithm",id:"rpc-http-authentication-jwt-algorithm",level:3},{value:"rpc-http-authentication-jwt-public-key-file",id:"rpc-http-authentication-jwt-public-key-file",level:3},{value:"rpc-http-cors-origins",id:"rpc-http-cors-origins",level:3},{value:"rpc-http-enabled",id:"rpc-http-enabled",level:3},{value:"rpc-http-host",id:"rpc-http-host",level:3},{value:"rpc-http-max-active-connections",id:"rpc-http-max-active-connections",level:3},{value:"rpc-http-max-request-content-length",id:"rpc-http-max-request-content-length",level:3},{value:"rpc-http-max-batch-size",id:"rpc-http-max-batch-size",level:3},{value:"rpc-http-port",id:"rpc-http-port",level:3},{value:"rpc-http-tls-ca-clients-enabled",id:"rpc-http-tls-ca-clients-enabled",level:3},{value:"rpc-http-tls-client-auth-enabled",id:"rpc-http-tls-client-auth-enabled",level:3},{value:"rpc-http-tls-cipher-suite",id:"rpc-http-tls-cipher-suite",level:3},{value:"rpc-http-tls-enabled",id:"rpc-http-tls-enabled",level:3},{value:"rpc-http-tls-keystore-file",id:"rpc-http-tls-keystore-file",level:3},{value:"rpc-http-tls-keystore-password-file",id:"rpc-http-tls-keystore-password-file",level:3},{value:"rpc-http-tls-known-clients-file",id:"rpc-http-tls-known-clients-file",level:3},{value:"rpc-http-tls-protocol",id:"rpc-http-tls-protocol",level:3},{value:"rpc-max-logs-range",id:"rpc-max-logs-range",level:3},{value:"rpc-max-trace-filter-range",id:"rpc-max-trace-filter-range",level:3},{value:"rpc-tx-feecap",id:"rpc-tx-feecap",level:3},{value:"rpc-ws-api",id:"rpc-ws-api",level:3},{value:"rpc-ws-api-methods-no-auth",id:"rpc-ws-api-methods-no-auth",level:3},{value:"rpc-ws-authentication-credentials-file",id:"rpc-ws-authentication-credentials-file",level:3},{value:"rpc-ws-authentication-enabled",id:"rpc-ws-authentication-enabled",level:3},{value:"rpc-ws-authentication-jwt-algorithm",id:"rpc-ws-authentication-jwt-algorithm",level:3},{value:"rpc-ws-authentication-jwt-public-key-file",id:"rpc-ws-authentication-jwt-public-key-file",level:3},{value:"rpc-ws-enabled",id:"rpc-ws-enabled",level:3},{value:"rpc-ws-host",id:"rpc-ws-host",level:3},{value:"rpc-ws-max-active-connections",id:"rpc-ws-max-active-connections",level:3},{value:"rpc-ws-max-frame-size",id:"rpc-ws-max-frame-size",level:3},{value:"rpc-ws-port",id:"rpc-ws-port",level:3},{value:"rpc-ws-ssl-cert-file",id:"rpc-ws-ssl-cert-file",level:3},{value:"rpc-ws-ssl-client-auth-enabled",id:"rpc-ws-ssl-client-auth-enabled",level:3},{value:"rpc-ws-ssl-enabled",id:"rpc-ws-ssl-enabled",level:3},{value:"rpc-ws-ssl-key-file",id:"rpc-ws-ssl-key-file",level:3},{value:"rpc-ws-ssl-keystore-file",id:"rpc-ws-ssl-keystore-file",level:3},{value:"rpc-ws-ssl-keystore-password",id:"rpc-ws-ssl-keystore-password",level:3},{value:"rpc-ws-ssl-keystore-type",id:"rpc-ws-ssl-keystore-type",level:3},{value:"rpc-ws-ssl-trustcert-file",id:"rpc-ws-ssl-trustcert-file",level:3},{value:"rpc-ws-ssl-truststore-file",id:"rpc-ws-ssl-truststore-file",level:3},{value:"rpc-ws-ssl-truststore-password",id:"rpc-ws-ssl-truststore-password",level:3},{value:"rpc-ws-ssl-truststore-type",id:"rpc-ws-ssl-truststore-type",level:3},{value:"security-module",id:"security-module",level:3},{value:"static-nodes-file",id:"static-nodes-file",level:3},{value:"strict-tx-replay-protection-enabled",id:"strict-tx-replay-protection-enabled",level:3},{value:"sync-min-peers, fast-sync-min-peers",id:"sync-min-peers-fast-sync-min-peers",level:3},{value:"sync-mode",id:"sync-mode",level:3},{value:"target-gas-limit",id:"target-gas-limit",level:3},{value:"tx-pool",id:"tx-pool",level:3},{value:"tx-pool-blob-price-bump",id:"tx-pool-blob-price-bump",level:3},{value:"tx-pool-enable-save-restore",id:"tx-pool-enable-save-restore",level:3},{value:"tx-pool-layer-max-capacity",id:"tx-pool-layer-max-capacity",level:3},{value:"tx-pool-limit-by-account-percentage",id:"tx-pool-limit-by-account-percentage",level:3},{value:"tx-pool-max-future-by-sender",id:"tx-pool-max-future-by-sender",level:3},{value:"tx-pool-max-prioritized",id:"tx-pool-max-prioritized",level:3},{value:"tx-pool-max-prioritized-by-type",id:"tx-pool-max-prioritized-by-type",level:3},{value:"tx-pool-max-size",id:"tx-pool-max-size",level:3},{value:"tx-pool-min-gas-price",id:"tx-pool-min-gas-price",level:3},{value:"tx-pool-min-score",id:"tx-pool-min-score",level:3},{value:"tx-pool-no-local-priority",id:"tx-pool-no-local-priority",level:3},{value:"tx-pool-price-bump",id:"tx-pool-price-bump",level:3},{value:"tx-pool-priority-senders",id:"tx-pool-priority-senders",level:3},{value:"tx-pool-retention-hours",id:"tx-pool-retention-hours",level:3},{value:"tx-pool-save-file",id:"tx-pool-save-file",level:3},{value:"version",id:"version",level:3},{value:"version-compatibility-protection",id:"version-compatibility-protection",level:3},{value:"Xhelp",id:"xhelp",level:3}];function x(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.p,{children:"This reference describes the syntax of the Besu configuration options."}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["This reference contains options that apply to both public and private networks. For private-network-specific options, see the ",(0,a.jsx)(n.a,{href:"/private-networks/reference/cli/options",children:"private network options reference"}),"."]})}),"\n",(0,a.jsx)(n.h2,{id:"specify-options",children:"Specify options"}),"\n",(0,a.jsx)(n.p,{children:"You can specify Besu options:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"On the command line."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"besu [OPTIONS] [SUBCOMMAND]\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"As an environment variable. For each command line option, the equivalent environment variable is:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Uppercase."}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.code,{children:"_"})," replaces ",(0,a.jsx)(n.code,{children:"-"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:["Has a ",(0,a.jsx)(n.code,{children:"BESU_"})," prefix."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["For example, set ",(0,a.jsx)(n.code,{children:"--miner-coinbase"})," using the ",(0,a.jsx)(n.code,{children:"BESU_MINER_COINBASE"})," environment variable."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["In a ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/",children:"configuration file"}),"."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.p,{children:"If you specify an option in more than one place, the order of priority is command line, environment variable, configuration file."}),"\n",(0,a.jsxs)(n.p,{children:["If using Bash or Z shell, you can view option suggestions by entering ",(0,a.jsx)(n.code,{children:"--"})," and pressing the Tab key twice."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"besu --Tab+Tab\n"})}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsx)(n.p,{children:"Characters such as smart quotes and long (em) hyphens don't work in Besu command line options. Ensure quotes aren't automatically converted to smart quotes, or double hyphens combined into em hyphens."})}),"\n",(0,a.jsx)(n.h2,{id:"options",children:"Options"}),"\n",(0,a.jsx)(n.h3,{id:"api-gas-price-blocks",children:(0,a.jsx)(n.code,{children:"api-gas-price-blocks"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--api-gas-price-blocks=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--api-gas-price-blocks=50\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_API_GAS_PRICE_BLOCKS=50\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"api-gas-price-blocks=50\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Number of blocks back from the head block to examine for ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gasprice",children:(0,a.jsx)(n.code,{children:"eth_gasPrice"})}),". The default is ",(0,a.jsx)(n.code,{children:"100"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"api-gas-price-max",children:(0,a.jsx)(n.code,{children:"api-gas-price-max"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--api-gas-price-max=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--api-gas-price-max=20000\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_API_GAS_PRICE_MAX=20000\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"api-gas-price-max=20000\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Maximum gas price to return for ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gasprice",children:(0,a.jsx)(n.code,{children:"eth_gasPrice"})}),", regardless of the percentile value measured. The default is ",(0,a.jsx)(n.code,{children:"500000000000"})," (500 GWei)."]}),"\n",(0,a.jsx)(n.h3,{id:"api-gas-price-percentile",children:(0,a.jsx)(n.code,{children:"api-gas-price-percentile"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--api-gas-price-percentile=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--api-gas-price-percentile=75\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_API_GAS_PRICE_PERCENTILE=75\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"api-gas-price-percentile=75\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Percentile value to measure for ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gasprice",children:(0,a.jsx)(n.code,{children:"eth_gasPrice"})}),". The default is ",(0,a.jsx)(n.code,{children:"50.0"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["For ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gasprice",children:(0,a.jsx)(n.code,{children:"eth_gasPrice"})}),", to return the:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Highest gas price in ",(0,a.jsx)(n.a,{href:"#api-gas-price-blocks",children:(0,a.jsx)(n.code,{children:"--api-gas-price-blocks"})}),", set to ",(0,a.jsx)(n.code,{children:"100"}),"."]}),"\n",(0,a.jsxs)(n.li,{children:["Lowest gas price in ",(0,a.jsx)(n.a,{href:"#api-gas-price-blocks",children:(0,a.jsx)(n.code,{children:"--api-gas-price-blocks"})}),", set to ",(0,a.jsx)(n.code,{children:"0"}),"."]}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"auto-log-bloom-caching-enabled",children:(0,a.jsx)(n.code,{children:"auto-log-bloom-caching-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--auto-log-bloom-caching-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--auto-log-bloom-caching-enabled=false\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_AUTO_LOG_BLOOM_CACHING_ENABLED=false\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"auto-log-bloom-caching-enabled=false\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables automatic log bloom caching. APIs such as ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getlogs",children:(0,a.jsx)(n.code,{children:"eth_getLogs"})})," and ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getfilterlogs",children:(0,a.jsx)(n.code,{children:"eth_getFilterLogs"})})," use the cache for improved performance. The default is ",(0,a.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"If automatic log bloom caching is enabled and a log bloom query reaches the end of the cache, Besu\nperforms an uncached query for logs not yet written to the cache."}),"\n",(0,a.jsx)(n.p,{children:"Automatic log bloom caching has a small impact on performance. If you are not querying logs blooms for a large number of blocks, you might want to disable automatic log bloom caching."}),"\n",(0,a.jsx)(n.h3,{id:"banned-node-ids",children:(0,a.jsx)(n.code,{children:"banned-node-ids"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--banned-node-ids=[,...]...\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--banned-node-ids=0xc35c3...d615f,0xf42c13...fc456\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_BANNED_NODE_IDS=0xc35c3...d615f,0xf42c13...fc456\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'banned-node-ids=["0xc35c3...d615f","0xf42c13...fc456"]\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["A list of node IDs with which this node will not peer. The node ID is the public key of the node. You can specify the banned node IDs with or without the ",(0,a.jsx)(n.code,{children:"0x"})," prefix."]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["The singular ",(0,a.jsx)(n.code,{children:"--banned-node-id"})," and plural ",(0,a.jsx)(n.code,{children:"--banned-node-ids"})," are available and are two names for the same option."]})}),"\n",(0,a.jsx)(n.h3,{id:"block-txs-selection-max-time",children:(0,a.jsx)(n.code,{children:"block-txs-selection-max-time"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--block-txs-selection-max-time=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--block-txs-selection-max-time=1700\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_BLOCK_TXS_SELECTION_MAX_TIME=1700\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"block-txs-selection-max-time=1700\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The maximum time, in milliseconds, that can be spent selecting transactions to be included in a block.\nThis value must be less than or equal to the default, ",(0,a.jsx)(n.code,{children:"5000"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["This option only applies to proof-of-stake and proof-of-work networks.\nFor proof-of-authority networks, see\n",(0,a.jsx)(n.a,{href:"/private-networks/reference/cli/options#poa-block-txs-selection-max-time",children:(0,a.jsx)(n.code,{children:"--poa-block-txs-selection-max-time"})}),"."]})}),"\n",(0,a.jsx)(n.h3,{id:"bonsai-historical-block-limit",children:(0,a.jsx)(n.code,{children:"bonsai-historical-block-limit"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--bonsai-historical-block-limit=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--bonsai-historical-block-limit=256\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_BONSAI_HISTORICAL_BLOCK_LIMIT=256\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"bonsai-historical-block-limit=256\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["When using ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai Tries"}),", the\n",(0,a.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#accessing-data",children:"maximum number of previous blocks"})," for which\nBonsai can reconstruct a historical state.\nThe default is ",(0,a.jsx)(n.code,{children:"512"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["If you plan on querying historical blocks or state using the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/",children:"JSON-RPC API"}),", you might need to adjust the default value or your configured value to avoid errors."]})}),"\n",(0,a.jsx)(n.h3,{id:"bonsai-limit-trie-logs-enabled",children:(0,a.jsx)(n.code,{children:"bonsai-limit-trie-logs-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--bonsai-limit-trie-logs-enabled=[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--bonsai-limit-trie-logs-enabled=false\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_BONSAI_LIMIT_TRIE_LOGS_ENABLED=false\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"bonsai-limit-trie-logs-enabled=false\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables limiting the number of\n",(0,a.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai Trie"})," logs that are retained.\nWhen enabled, this limit is set to the value of\n",(0,a.jsx)(n.a,{href:"#bonsai-historical-block-limit",children:(0,a.jsx)(n.code,{children:"--bonsai-historical-block-limit"})}),".\nThe default is ",(0,a.jsx)(n.code,{children:"true"}),", unless ",(0,a.jsx)(n.a,{href:"#sync-mode",children:(0,a.jsx)(n.code,{children:"--sync-mode=FULL"})})," is set, in which case this option is\ndisallowed and must be set to ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"bonsai-trie-logs-pruning-window-size",children:(0,a.jsx)(n.code,{children:"bonsai-trie-logs-pruning-window-size"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--bonsai-trie-logs-pruning-window-size=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--bonsai-trie-logs-pruning-window-size=100000\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_BONSAI_TRIE_LOGS_PRUNING_WINDOW_SIZE=100000\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"bonsai-trie-logs-pruning-window-size=100000\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["When using ",(0,a.jsx)(n.a,{href:"#bonsai-limit-trie-logs-enabled",children:(0,a.jsx)(n.code,{children:"--bonsai-limit-trie-logs-enabled"})}),", the number of trie\nlogs to prune during one pruning operation.\nA larger value might impact node performance.\nThe default is ",(0,a.jsx)(n.code,{children:"30000"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"bootnodes",children:(0,a.jsx)(n.code,{children:"bootnodes"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--bootnodes[=[,...]...]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--bootnodes=enode://c35c3...d615f@1.2.3.4:30303,enode://f42c13...fc456@1.2.3.5:30303\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_BOOTNODES=enode://c35c3...d615f@1.2.3.4:30303,enode://f42c13...fc456@1.2.3.5:30303\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'bootnodes=["enode://c35c3...d615f@1.2.3.4:30303","enode://f42c13...fc456@1.2.3.5:30303"]\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["A list of comma-separated ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URLs"})," for ",(0,a.jsx)(n.a,{href:"/private-networks/how-to/configure/bootnodes",children:"P2P discovery bootstrap"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"When connecting to Mainnet or public testnets, the default is a predefined list of enode URLs."}),"\n",(0,a.jsxs)(n.p,{children:["In private networks defined using ",(0,a.jsx)(n.a,{href:"#genesis-file",children:(0,a.jsx)(n.code,{children:"--genesis-file"})})," or when using ",(0,a.jsx)(n.a,{href:"#network",children:(0,a.jsx)(n.code,{children:"--network=dev"})}),", the default is an empty list of bootnodes."]}),"\n",(0,a.jsx)(n.h3,{id:"cache-last-blocks",children:(0,a.jsx)(n.code,{children:"cache-last-blocks"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--cache-last-blocks=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--cache-last-blocks=2048\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_CACHE_LAST_BLOCKS=2048\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cache-last-blocks=2048\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The number of recent blocks to cache.\nUsing this option can improve the performance of several RPC calls including: ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getBlockByNumber",children:(0,a.jsx)(n.code,{children:"eth_getBlockByNumber"})}),", ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getBlockByHash",children:(0,a.jsx)(n.code,{children:"eth_getBlockByHash"})}),", ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#getTransactionReceipt",children:(0,a.jsx)(n.code,{children:"eth_getTransactionReceipt"})}),", and especially ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_feeHistory",children:(0,a.jsx)(n.code,{children:"eth_feeHistory"})}),".\nThe default is ",(0,a.jsx)(n.code,{children:"0"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"color-enabled",children:(0,a.jsx)(n.code,{children:"color-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--color-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--color-enabled=false\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_COLOR_ENABLED=false\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"color-enabled=false\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables color output to console. The default is ",(0,a.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"compatibility-eth64-forkid-enabled",children:(0,a.jsx)(n.code,{children:"compatibility-eth64-forkid-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--compatibility-eth64-forkid-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--compatibility-eth64-forkid-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_COMPATIBILITY_ETH64_FORKID_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"compatibility-eth64-forkid-enabled=true\n"})})})]}),"\n",(0,a.jsx)(n.p,{children:"Enables or disables the legacy Eth/64 fork ID. For any networks with nodes using Besu v1.4 or earlier and nodes using Besu v20.10.1 or later, either:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"All nodes must be upgraded to v20.10.1 or later."}),"\n",(0,a.jsxs)(n.li,{children:["All nodes using v20.10.1 or later must have ",(0,a.jsx)(n.code,{children:"--compatibility-eth64-forkid-enabled"})," set to ",(0,a.jsx)(n.code,{children:"true"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsxs)(n.p,{children:["If networks have Besu nodes using v1.4 or earlier and other Besu nodes using v20.10.1 or later, the nodes on different versions cannot communicate unless ",(0,a.jsx)(n.code,{children:"--compatibility-eth64-forkid-enabled"})," is set to ",(0,a.jsx)(n.code,{children:"true"}),"."]})}),"\n",(0,a.jsx)(n.h3,{id:"config-file",children:(0,a.jsx)(n.code,{children:"config-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--config-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--config-file=/home/me/me_node/config.toml\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_CONFIG_FILE=/home/me/me_node/config.toml\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The path to the ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/",children:"TOML configuration file"}),". The default is ",(0,a.jsx)(n.code,{children:"none"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"data-path",children:(0,a.jsx)(n.code,{children:"data-path"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--data-path=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--data-path=/home/me/me_node\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_DATA_PATH=/home/me/me_node\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'data-path="/home/me/me_node"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The path to the Besu data directory. The default is the directory you installed Besu in, or ",(0,a.jsx)(n.code,{children:"/opt/besu/database"})," if using the ",(0,a.jsx)(n.a,{href:"/public-networks/get-started/install/run-docker-image",children:"Besu Docker image"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"data-storage-format",children:(0,a.jsx)(n.code,{children:"data-storage-format"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--data-storage-format=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--data-storage-format=FOREST\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_DATA_STORAGE_FORMAT=FOREST\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'data-storage-format="BONSAI"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats",children:"data storage format"})," to use. Set to ",(0,a.jsx)(n.code,{children:"BONSAI"})," for Bonsai Tries or ",(0,a.jsx)(n.code,{children:"FOREST"})," for Forest of Tries. The default is ",(0,a.jsx)(n.code,{children:"BONSAI"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"discovery-dns-url",children:(0,a.jsx)(n.code,{children:"discovery-dns-url"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--discovery-dns-url=\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_DISCOVERY_DNS_URL=enrtree://AM5FCQLWIZX2QFPNJAP7VUERCCRNGRHWZG3YYHIUV7BVDQ5FDPRT2@nodes.example.org\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'discovery-dns-url="enrtree://AM5FCQLWIZX2QFPNJAP7VUERCCRNGRHWZG3YYHIUV7BVDQ5FDPRT2@nodes.example.org"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.code,{children:"enrtree"})," URL of the DNS node list for ",(0,a.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-1459",children:"node discovery via DNS"}),". The default is ",(0,a.jsx)(n.code,{children:"null"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"discovery-enabled",children:(0,a.jsx)(n.code,{children:"discovery-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--discovery-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--discovery-enabled=false\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_DISCOVERY_ENABLED=false\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"discovery-enabled=false\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables P2P discovery. The default is ",(0,a.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["You can override the default DNS server if it's unreliable or doesn't serve TCP DNS requests, using the ",(0,a.jsx)(n.a,{href:"#xhelp",children:"early access option"})," ",(0,a.jsx)(n.code,{children:"--Xp2p-dns-discovery-server="}),"."]})}),"\n",(0,a.jsx)(n.h3,{id:"engine-host-allowlist",children:(0,a.jsx)(n.code,{children:"engine-host-allowlist"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'--engine-host-allowlist=[,...]... or "*"\n'})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--engine-host-allowlist=localhost,127.0.0.1\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_ENGINE_HOST_ALLOWLIST=localhost,127.0.0.1\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'engine-host-allowlist=["localhost","127.0.0.1"]\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"A comma-separated list of hostnames to allow for Engine API access (applies to both HTTP and WebSocket)."}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["To allow all hostnames, use ",(0,a.jsx)(n.code,{children:'"*"'}),". We don't recommend allowing all hostnames in production environments."]})}),"\n",(0,a.jsx)(n.h3,{id:"engine-jwt-disabled",children:(0,a.jsx)(n.code,{children:"engine-jwt-disabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--engine-jwt-disabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--engine-jwt-disabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_ENGINE_JWT_DISABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"engine-jwt-disabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Disables or enables ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-engine-api#authentication",children:"authentication"})," for Engine APIs. The default is ",(0,a.jsx)(n.code,{children:"false"})," (authentication is enabled by default)."]}),"\n",(0,a.jsx)(n.h3,{id:"engine-jwt-secret",children:(0,a.jsx)(n.code,{children:"engine-jwt-secret"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--engine-jwt-secret=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--engine-jwt-secret=jwt.hex\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_ENGINE_JWT_SECRET="jwt.hex"\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'engine-jwt-secret="jwt.hex"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Shared secret used to authenticate ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/node-clients#consensus-clients",children:"consensus clients"})," when using the Engine JSON-RPC API (both HTTP and WebSocket). Contents of file must be at least 32 hex-encoded bytes and not begin with ",(0,a.jsx)(n.code,{children:"0x"}),". May be a relative or absolute path. See an ",(0,a.jsx)(n.a,{href:"/public-networks/get-started/connect/mainnet#1-generate-the-shared-secret",children:"example of how to generate this"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"engine-rpc-enabled",children:(0,a.jsx)(n.code,{children:"engine-rpc-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--engine-rpc-enabled[=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--engine-rpc-enabled\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_ENGINE_RPC_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"engine-rpc-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/engine-api/",children:"Engine API"}),". The default is ",(0,a.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"engine-rpc-port",children:(0,a.jsx)(n.code,{children:"engine-rpc-port"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--engine-rpc-port=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--engine-rpc-port=8551\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_ENGINE_RPC_PORT=8551\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'engine-rpc-port="8551"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The listening port for the Engine API calls (",(0,a.jsx)(n.code,{children:"ENGINE"}),", ",(0,a.jsx)(n.code,{children:"ETH"}),") for JSON-RPC over HTTP and WebSocket. The default is ",(0,a.jsx)(n.code,{children:"8551"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"ethstats",children:(0,a.jsx)(n.code,{children:"ethstats"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--ethstats=<[ws://|wss://]nodename:secret@host:[port]>\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--ethstats=Dev-Node-1:secret@127.0.0.1:3001\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_ETHSTATS=Dev-Node-1:secret@127.0.0.1:3001\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'ethstats="Dev-Node-1:secret@127.0.0.1:3001"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Reporting URL of an ",(0,a.jsx)(n.a,{href:"/private-networks/how-to/deploy/ethstats",children:"Ethstats"})," server.\nIf specified without a port, the default port is 443 for SSL connections and 80 for non-SSL connections."]}),"\n",(0,a.jsxs)(n.p,{children:["You can optionally specify ",(0,a.jsx)(n.code,{children:"ws://"})," or ",(0,a.jsx)(n.code,{children:"wss://"})," in the Ethstats URL.\nIf you specify this scheme, the connection doesn't need to switch from SSL to non-SSL on each retry logic."]}),"\n",(0,a.jsx)(n.h3,{id:"ethstats-cacert-file",children:(0,a.jsx)(n.code,{children:"ethstats-cacert-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--ethstats-cacert-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--ethstats-cacert-file=./root.cert\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_ETHSTATS_CACERT_FILE=./root.cert\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'ethstats-cacert-file="./root.cert"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Path to the root certificate authority (CA) certificate file of the Ethstats server specified by ",(0,a.jsx)(n.a,{href:"#ethstats",children:(0,a.jsx)(n.code,{children:"--ethstats"})}),". This option is useful in non-production environments."]}),"\n",(0,a.jsx)(n.h3,{id:"ethstats-contact",children:(0,a.jsx)(n.code,{children:"ethstats-contact"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--ethstats-contact=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--ethstats-contact=contact@mail.com\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_ETHSTATS_CONTACT=contact@mail.com\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'ethstats-contact="contact@mail.com"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Contact email address to send to the Ethstats server specified by ",(0,a.jsx)(n.a,{href:"#ethstats",children:(0,a.jsx)(n.code,{children:"--ethstats"})}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"genesis-file",children:(0,a.jsx)(n.code,{children:"genesis-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--genesis-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--genesis-file=/home/me/me_node/customGenesisFile.json\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_GENESIS_FILE=/home/me/me_node/customGenesisFile.json\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'genesis-file="/home/me/me_node/customGenesisFile.json"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The path to the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/genesis-file",children:"genesis file"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsxs)(n.p,{children:["You can't use the ",(0,a.jsx)(n.a,{href:"#genesis-file",children:(0,a.jsx)(n.code,{children:"--genesis-file"})})," and ",(0,a.jsx)(n.a,{href:"#network",children:(0,a.jsx)(n.code,{children:"--network"})})," options at the same time."]})}),"\n",(0,a.jsx)(n.h3,{id:"genesis-state-hash-cache-enabled",children:(0,a.jsx)(n.code,{children:"genesis-state-hash-cache-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--genesis-state-hash-cache-enabled=[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--genesis-state-hash-cache-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_GENESIS_STATE_HASH_CACHE_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"genesis-state-hash-cache-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables fast startup from an existing genesis state hash. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"warning",children:(0,a.jsx)(n.p,{children:"Enabling this option avoids validating the genesis state hash, trading off security for faster node startup times. We only recommend using this option if you are certain that you have not modified your genesis file or database and understand the security implications."})}),"\n",(0,a.jsx)(n.h3,{id:"graphql-http-cors-origins",children:(0,a.jsx)(n.code,{children:"graphql-http-cors-origins"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--graphql-http-cors-origins=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'--graphql-http-cors-origins="http://medomain.com","https://meotherdomain.com"\n'})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_GRAPHQL_HTTP_CORS_ORIGINS="http://medomain.com","https://meotherdomain.com"\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'graphql-http-cors-origins=["http://medomain.com","https://meotherdomain.com"]\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"A list of comma-separated origin domain URLs for CORS validation. The default is none."}),"\n",(0,a.jsx)(n.h3,{id:"graphql-http-enabled",children:(0,a.jsx)(n.code,{children:"graphql-http-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--graphql-http-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--graphql-http-enabled\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_GRAPHQL_HTTP_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"graphql-http-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables the GraphQL HTTP service. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["The default GraphQL HTTP service endpoint is ",(0,a.jsx)(n.code,{children:"http://127.0.0.1:8547/graphql"})," if set to ",(0,a.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"graphql-http-host",children:(0,a.jsx)(n.code,{children:"graphql-http-host"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--graphql-http-host=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# to listen on all interfaces\n--graphql-http-host=0.0.0.0\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# to listen on all interfaces\nBESU_GRAPHQL_HTTP_HOST=0.0.0.0\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'graphql-http-host="0.0.0.0"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The host on which GraphQL HTTP listens. The default is ",(0,a.jsx)(n.code,{children:"127.0.0.1"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["To allow remote connections, set to ",(0,a.jsx)(n.code,{children:"0.0.0.0"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"graphql-http-port",children:(0,a.jsx)(n.code,{children:"graphql-http-port"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--graphql-http-port=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# to listen on port 6175\n--graphql-http-port=6175\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# to listen on port 6175\nBESU_GRAPHQL_HTTP_PORT=6175\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'graphql-http-port="6175"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The port (TCP) on which GraphQL HTTP listens. The default is ",(0,a.jsx)(n.code,{children:"8547"}),". Ports must be ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/configure-ports",children:"exposed appropriately"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"help",children:(0,a.jsx)(n.code,{children:"help"})}),"\n",(0,a.jsx)(i.A,{children:(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"-h, --help\n"})})})}),"\n",(0,a.jsx)(n.p,{children:"Show the help message and exit."}),"\n",(0,a.jsx)(n.h3,{id:"host-allowlist",children:(0,a.jsx)(n.code,{children:"host-allowlist"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'--host-allowlist=[,...]... or "*"\n'})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--host-allowlist=medomain.com,meotherdomain.com\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_HOST_ALLOWLIST=medomain.com,meotherdomain.com\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'host-allowlist=["medomain.com", "meotherdomain.com"]\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["A comma-separated list of hostnames to ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/#host-allowlist",children:"access the JSON-RPC API"})," and ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/monitor/metrics",children:"pull Besu metrics"}),". By default, Besu accepts requests from ",(0,a.jsx)(n.code,{children:"localhost"})," and ",(0,a.jsx)(n.code,{children:"127.0.0.1"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["This isn't a permissioning feature. To restrict access to the API, we recommend using the ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"Besu authentication mechanism"})," with username and password authentication or JWT public key authentication."]})}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["If using ",(0,a.jsx)(n.a,{href:"https://prometheus.io/",children:"Prometheus"})," to pull metrics from a node, you must specify all the other nodes you want to pull metrics from in the list of allowed hostnames."]})}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["To allow all hostnames, use ",(0,a.jsx)(n.code,{children:'"*"'}),". We don't recommend allowing all hostnames for production environments."]})}),"\n",(0,a.jsx)(n.h3,{id:"identity",children:(0,a.jsx)(n.code,{children:"identity"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--identity=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--identity=MyNode\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_IDENTITY=MyNode\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'identity="MyNode"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The name for the node. If specified, it's the second section of the client ID provided by some Ethereum network explorers. For example, in the client ID ",(0,a.jsx)(n.code,{children:"besu/MyNode/v1.3.4/linux-x86_64/oracle_openjdk-java-11"}),", the node name is ",(0,a.jsx)(n.code,{children:"MyNode"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["If a name is not specified, the name section is not included in the client ID. For example, ",(0,a.jsx)(n.code,{children:"besu/v1.3.4/linux-x86_64/oracle_openjdk-java-11"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"json-pretty-print-enabled",children:(0,a.jsx)(n.code,{children:"json-pretty-print-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--json-pretty-print-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--json-pretty-print-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_JSON_PRETTY_PRINT_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"json-pretty-print-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables the pretty-print output for HTTP and WebSocket responses. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"key-value-storage",children:(0,a.jsx)(n.code,{children:"key-value-storage"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--key-value-storage=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--key-value-storage=rocksdb\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_KEY_VALUE_STORAGE=rocksdb\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'key-value-storage="rocksdb"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The key-value storage to use. Use this option only if using a storage system provided with a plugin. The default is ",(0,a.jsx)(n.code,{children:"rocksdb"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["For development use only, the ",(0,a.jsx)(n.code,{children:"memory"})," option provides ephemeral storage for sync testing and debugging."]}),"\n",(0,a.jsx)(n.h3,{id:"kzg-trusted-setup",children:(0,a.jsx)(n.code,{children:"kzg-trusted-setup"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--kzg-trusted-setup=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--kzg-trusted-setup=/etc/besu/kzg-trusted-setup.txt\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_KZG_TRUSTED_SETUP=/etc/besu/kzg-trusted-setup.txt\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"kzg-trusted-setup=/etc/besu/kzg-trusted-setup.txt\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The path to the ",(0,a.jsx)(n.a,{href:"https://github.com/ethereum/c-kzg-4844",children:"C-KZG-4844"})," trusted setup file. Use this option to pass a custom setup file for custom networks or to override the default setup file for named networks."]}),"\n",(0,a.jsx)(n.h3,{id:"logging",children:(0,a.jsx)(n.code,{children:"logging"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"-l, --logging=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--logging=DEBUG\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_LOGGING=DEBUG\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'logging="DEBUG"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Sets logging verbosity. Log levels are ",(0,a.jsx)(n.code,{children:"OFF"}),", ",(0,a.jsx)(n.code,{children:"FATAL"}),", ",(0,a.jsx)(n.code,{children:"ERROR"}),", ",(0,a.jsx)(n.code,{children:"WARN"}),", ",(0,a.jsx)(n.code,{children:"INFO"}),", ",(0,a.jsx)(n.code,{children:"DEBUG"}),", ",(0,a.jsx)(n.code,{children:"TRACE"}),", ",(0,a.jsx)(n.code,{children:"ALL"}),". The default is ",(0,a.jsx)(n.code,{children:"INFO"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"max-peers",children:(0,a.jsx)(n.code,{children:"max-peers"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--max-peers=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--max-peers=42\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_MAX_PEERS=42\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"max-peers=42\n"})})})]}),"\n",(0,a.jsx)(n.p,{children:"The maximum number of P2P connections you can establish. The default is 25."}),"\n",(0,a.jsx)(n.h3,{id:"metrics-category",children:(0,a.jsx)(n.code,{children:"metrics-category"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-category=[,metrics-category...]...\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-category=BLOCKCHAIN,PEERS,PROCESS\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_METRICS_CATEGORY=BLOCKCHAIN,PEERS,PROCESS\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'metrics-category=["BLOCKCHAIN","PEERS","PROCESS"]\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["A comma-separated list of categories for which to track metrics. The defaults are ",(0,a.jsx)(n.code,{children:"BLOCKCHAIN"}),", ",(0,a.jsx)(n.code,{children:"ETHEREUM"}),", ",(0,a.jsx)(n.code,{children:"EXECUTORS"}),", ",(0,a.jsx)(n.code,{children:"JVM"}),", ",(0,a.jsx)(n.code,{children:"NETWORK"}),", ",(0,a.jsx)(n.code,{children:"PEERS"}),", ",(0,a.jsx)(n.code,{children:"PERMISSIONING"}),", ",(0,a.jsx)(n.code,{children:"PROCESS"}),", ",(0,a.jsx)(n.code,{children:"PRUNER"}),", ",(0,a.jsx)(n.code,{children:"RPC"}),", ",(0,a.jsx)(n.code,{children:"STRATUM"}),", ",(0,a.jsx)(n.code,{children:"SYNCHRONIZER"}),", and ",(0,a.jsx)(n.code,{children:"TRANSACTION_POOL"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Other categories are ",(0,a.jsx)(n.code,{children:"KVSTORE_ROCKSDB"}),", ",(0,a.jsx)(n.code,{children:"KVSTORE_PRIVATE_ROCKSDB"}),", ",(0,a.jsx)(n.code,{children:"KVSTORE_ROCKSDB_STATS"}),", and ",(0,a.jsx)(n.code,{children:"KVSTORE_PRIVATE_ROCKSDB_STATS"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Categories containing ",(0,a.jsx)(n.code,{children:"PRIVATE"})," track metrics when you enable ",(0,a.jsx)(n.a,{href:"/private-networks/concepts/privacy/",children:"private transactions"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"metrics-enabled",children:(0,a.jsx)(n.code,{children:"metrics-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-enabled\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_METRICS_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"metrics-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables the ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/monitor/metrics#monitor-node-performance-using-prometheus",children:"metrics exporter"}),". The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["You can't specify ",(0,a.jsx)(n.code,{children:"--metrics-enabled"})," with ",(0,a.jsx)(n.a,{href:"#metrics-push-enabled",children:(0,a.jsx)(n.code,{children:"--metrics-push-enabled"})}),". That is, you can enable either Prometheus polling or Prometheus push gateway support, but not both at once."]}),"\n",(0,a.jsx)(n.h3,{id:"metrics-host",children:(0,a.jsx)(n.code,{children:"metrics-host"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-host=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-host=127.0.0.1\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_METRICS_HOST=127.0.0.1\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'metrics-host="127.0.0.1"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The host on which ",(0,a.jsx)(n.a,{href:"https://prometheus.io/",children:"Prometheus"})," accesses ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/monitor/metrics#monitor-node-performance-using-prometheus",children:"Besu metrics"}),". The metrics server respects the ",(0,a.jsxs)(n.a,{href:"#host-allowlist",children:[(0,a.jsx)(n.code,{children:"--host-allowlist"})," option"]}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["The default is ",(0,a.jsx)(n.code,{children:"127.0.0.1"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"metrics-port",children:(0,a.jsx)(n.code,{children:"metrics-port"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-port=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-port=6174\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_METRICS_PORT=6174\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'metrics-port="6174"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The port (TCP) on which ",(0,a.jsx)(n.a,{href:"https://prometheus.io/",children:"Prometheus"})," accesses ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/monitor/metrics#monitor-node-performance-using-prometheus",children:"Besu metrics"}),". The default is ",(0,a.jsx)(n.code,{children:"9545"}),". Ports must be ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/configure-ports",children:"exposed appropriately"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"metrics-protocol",children:(0,a.jsx)(n.code,{children:"metrics-protocol"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-protocol=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-protocol=OPENTELEMETRY\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_METRICS_PROTOCOL=OPENTELEMETRY\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'metrics-protocol="OPENTELEMETRY"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Metrics protocol to use: ",(0,a.jsx)(n.code,{children:"PROMETHEUS"}),", ",(0,a.jsx)(n.code,{children:"OPENTELEMETRY"}),", or ",(0,a.jsx)(n.code,{children:"NONE"}),". The default is ",(0,a.jsx)(n.code,{children:"PROMETHEUS"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"metrics-push-enabled",children:(0,a.jsx)(n.code,{children:"metrics-push-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-push-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-push-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_METRICS_PUSH_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"metrics-push-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/monitor/metrics#run-prometheus-with-besu-in-push-mode",children:"push gateway integration"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["You can't specify ",(0,a.jsx)(n.code,{children:"--metrics-push-enabled"})," with ",(0,a.jsx)(n.a,{href:"#metrics-enabled",children:(0,a.jsx)(n.code,{children:"--metrics-enabled"})}),". That is, you can enable either Prometheus polling or Prometheus push gateway support, but not both at once."]}),"\n",(0,a.jsx)(n.h3,{id:"metrics-push-host",children:(0,a.jsx)(n.code,{children:"metrics-push-host"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-push-host=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-push-host=127.0.0.1\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_METRICS_PUSH_HOST=127.0.0.1\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'metrics-push-host="127.0.0.1"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The host of the ",(0,a.jsx)(n.a,{href:"https://github.com/prometheus/pushgateway",children:"Prometheus Push Gateway"}),". The default is ",(0,a.jsx)(n.code,{children:"127.0.0.1"}),". The metrics server respects the ",(0,a.jsxs)(n.a,{href:"#host-allowlist",children:[(0,a.jsx)(n.code,{children:"--host-allowlist"})," option"]}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["When pushing metrics, ensure you set ",(0,a.jsx)(n.code,{children:"--metrics-push-host"})," to the machine on which the push gateway is. Generally, this is a different machine to the machine on which Besu is running."]})}),"\n",(0,a.jsx)(n.h3,{id:"metrics-push-interval",children:(0,a.jsx)(n.code,{children:"metrics-push-interval"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-push-interval=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-push-interval=30\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_METRICS_PUSH_INTERVAL=30\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"metrics-push-interval=30\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The interval, in seconds, to push metrics when in ",(0,a.jsx)(n.code,{children:"push"})," mode. The default is 15."]}),"\n",(0,a.jsx)(n.h3,{id:"metrics-push-port",children:(0,a.jsx)(n.code,{children:"metrics-push-port"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-push-port=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-push-port=6174\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_METRICS_PUSH_PORT=6174\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'metrics-push-port="6174"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The port (TCP) of the ",(0,a.jsx)(n.a,{href:"https://github.com/prometheus/pushgateway",children:"Prometheus Push Gateway"}),". The default is ",(0,a.jsx)(n.code,{children:"9001"}),". Ports must be ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/configure-ports",children:"exposed appropriately"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"metrics-push-prometheus-job",children:(0,a.jsx)(n.code,{children:"metrics-push-prometheus-job"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--metrics-push-prometheus-job=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'--metrics-push-prometheus-job="my-custom-job"\n'})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_METRICS_PUSH_PROMETHEUS_JOB="my-custom-job"\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'metrics-push-prometheus-job="my-custom-job"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The job name when in ",(0,a.jsx)(n.code,{children:"push"})," mode. The default is ",(0,a.jsx)(n.code,{children:"besu-client"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"min-block-occupancy-ratio",children:(0,a.jsx)(n.code,{children:"min-block-occupancy-ratio"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--min-block-occupancy-ratio=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--min-block-occupancy-ratio=0.5\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_MIN_BLOCK_OCCUPANCY_RATIO=0.5\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'min-block-occupancy-ratio="0.5"\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"Minimum occupancy ratio for a mined block if the transaction pool is not empty. When filling a block during mining, the occupancy ratio indicates the threshold at which the node stops waiting for smaller transactions to fill the remaining space. The default is 0.8."}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["Besu ignores the ",(0,a.jsx)(n.code,{children:"--min-block-occupancy-ratio"})," option for proof-of-stake networks, such as Ethereum Mainnet."]})}),"\n",(0,a.jsx)(n.h3,{id:"min-gas-price",children:(0,a.jsx)(n.code,{children:"min-gas-price"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--min-gas-price=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--min-gas-price=1337\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_MIN_GAS_PRICE=1337\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"min-gas-price=1337\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The minimum price (in wei) a transaction offers to include it in a mined block.\nThe minimum gas price is the lowest value ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gasprice",children:(0,a.jsx)(n.code,{children:"eth_gasPrice"})})," can return.\nThe default is ",(0,a.jsx)(n.code,{children:"1000"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"For a running node, use:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#miner_getmingasprice",children:(0,a.jsx)(n.code,{children:"miner_getMinGasPrice"})})," to get the value."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#miner_setmingasprice",children:(0,a.jsx)(n.code,{children:"miner_setMinGasPrice"})})," to change the value."]}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["In a ",(0,a.jsx)(n.a,{href:"/private-networks/how-to/configure/free-gas",children:"free gas network"}),", ensure the minimum\ngas price is set to zero for every node.\nAny node with a minimum gas price set higher than zero will silently drop transactions with a zero\ngas price.\nYou can query a node's gas configuration using ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gasprice",children:(0,a.jsx)(n.code,{children:"eth_gasPrice"})}),"."]})}),"\n",(0,a.jsx)(n.h3,{id:"min-priority-fee",children:(0,a.jsx)(n.code,{children:"min-priority-fee"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--min-priority-fee=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--min-priority-fee=7\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_MIN_PRIORITY_FEE=7\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"min-priority-fee=7\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The minimum priority fee per gas (in wei) offered by a transaction to be included in a block.\nThe default is ",(0,a.jsx)(n.code,{children:"0"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"For a running node, use:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#miner_getminpriorityfee",children:(0,a.jsx)(n.code,{children:"miner_getMinPriorityFee"})})," to get the value."]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#miner_setminpriorityfee",children:(0,a.jsx)(n.code,{children:"miner_setMinPriorityFee"})})," to change the value."]}),"\n"]}),"\n",(0,a.jsx)(n.h3,{id:"miner-coinbase",children:(0,a.jsx)(n.code,{children:"miner-coinbase"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--miner-coinbase=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--miner-coinbase=fe3b557e8fb62b89f4916b721be55ceb828dbd73\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_MINER_COINBASE=fe3b557e8fb62b89f4916b721be55ceb828dbd73\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'miner-coinbase="0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The account you pay mining rewards to.\nYou must specify a valid coinbase when you enable mining using the\n",(0,a.jsx)(n.a,{href:"#miner-enabled",children:(0,a.jsx)(n.code,{children:"--miner-enabled"})})," option or the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#miner_start-deprecated",children:(0,a.jsx)(n.code,{children:"miner_start"})}),"\nJSON-RPC API method."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["Besu ignores this option in ",(0,a.jsx)(n.a,{href:"/private-networks/concepts/poa",children:"proof-of-authority"})," networks.\nIn proof-of-stake networks, such as Ethereum Mainnet, this option is used as a last resort for the\nfee recipient, if the consensus layer client doesn't provide any."]})}),"\n",(0,a.jsx)(n.h3,{id:"miner-enabled",children:(0,a.jsx)(n.code,{children:"miner-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--miner-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--miner-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_MINER_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"miner-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables mining when you start the node. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"miner-extra-data",children:(0,a.jsx)(n.code,{children:"miner-extra-data"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--miner-extra-data=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--miner-extra-data=0x444F4E27542050414E4943202120484F444C2C20484F444C2C20484F444C2021\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_MINER_EXTRA_DATA=0x444F4E27542050414E4943202120484F444C2C20484F444C2C20484F444C2021\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'miner-extra-data="0x444F4E27542050414E4943202120484F444C2C20484F444C2C20484F444C2021"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["A hex string representing the 32 bytes included in the extra data field of a created block.\nThe default is ",(0,a.jsx)(n.code,{children:"0x"}),"."]}),"\n",(0,a.jsxs)(n.h3,{id:"miner-stratum-enabled-deprecated",children:[(0,a.jsx)(n.code,{children:"miner-stratum-enabled"})," (Deprecated)"]}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--miner-stratum-enabled\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_MINER_STRATUM_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"miner-stratum-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables a node to perform stratum mining.\nThe default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsxs)(n.h3,{id:"miner-stratum-host-deprecated",children:[(0,a.jsx)(n.code,{children:"miner-stratum-host"})," (Deprecated)"]}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--miner-stratum-host=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--miner-stratum-host=192.168.1.132\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_MINER_STRATUM_HOST=192.168.1.132\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'miner-stratum-host="192.168.1.132"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The host of the stratum mining service.\nThe default is ",(0,a.jsx)(n.code,{children:"0.0.0.0"}),"."]}),"\n",(0,a.jsxs)(n.h3,{id:"miner-stratum-port-deprecated",children:[(0,a.jsx)(n.code,{children:"miner-stratum-port"})," (Deprecated)"]}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--miner-stratum-port=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--miner-stratum-port=8010\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_MINER_STRATUM_PORT=8010\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'miner-stratum-port="8010"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The port of the stratum mining service.\nThe default is ",(0,a.jsx)(n.code,{children:"8008"}),".\nYou must ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/configure-ports",children:"expose ports appropriately"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"nat-method",children:(0,a.jsx)(n.code,{children:"nat-method"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--nat-method=UPNP\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'nat-method="UPNP"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Specify the method for handling ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat",children:"NAT environments"}),". The options are:"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat#upnp",children:(0,a.jsx)(n.code,{children:"UPNP"})})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat#upnp",children:(0,a.jsx)(n.code,{children:"UPNPP2PONLY"})})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsxs)(n.a,{href:"/public-networks/how-to/connect/specify-nat#kubernetes",children:[(0,a.jsx)(n.code,{children:"KUBERNETES"})," (Deprecated)"]})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat#docker",children:(0,a.jsx)(n.code,{children:"DOCKER"})})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat#auto",children:(0,a.jsx)(n.code,{children:"AUTO"})})}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat#none",children:(0,a.jsx)(n.code,{children:"NONE"})}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["The default is ",(0,a.jsx)(n.code,{children:"AUTO"}),". ",(0,a.jsx)(n.code,{children:"NONE"})," disables NAT functionality."]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsx)(n.p,{children:"UPnP support is often disabled by default in networking firmware. If disabled by default, explicitly enable UPnP support."})}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["Use ",(0,a.jsx)(n.code,{children:"UPNPP2PONLY"})," if you wish to enable UPnP for P2P traffic but not JSON-RPC."]})}),"\n",(0,a.jsxs)(n.admonition,{type:"note",children:[(0,a.jsxs)(n.p,{children:["Specifying ",(0,a.jsx)(n.code,{children:"UPNP"})," might introduce delays during node startup, especially on networks without a UPnP gateway device."]}),(0,a.jsxs)(n.p,{children:["You must specify ",(0,a.jsx)(n.code,{children:"DOCKER"})," when using the ",(0,a.jsx)(n.a,{href:"/public-networks/get-started/install/run-docker-image",children:"Besu Docker image"}),"."]})]}),"\n",(0,a.jsx)(n.h3,{id:"net-restrict",children:(0,a.jsx)(n.code,{children:"net-restrict"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--net-restrict=[,,...]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--net-restrict=192.168.1.0/24,10.0.0.0/8\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_NET_RESTRICT=192.168.1.0/24,10.0.0.0/8\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'net-restrict=["192.168.1.0/24","10.0.0.0/8"]\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"A comma-separated list of allowed IP subnets.\nPeers whose IP addresses fall within the specified subnets are granted permission to interact with the node.\nIf not specified, no subnet-based peer permission restrictions are applied."}),"\n",(0,a.jsx)(n.h3,{id:"network",children:(0,a.jsx)(n.code,{children:"network"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--network=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--network=holesky\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_NETWORK=holesky\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'network="holesky"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The predefined network configuration. The default is ",(0,a.jsx)(n.code,{children:"mainnet"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"Possible values include the following:"}),"\n",(0,a.jsxs)(n.table,{children:[(0,a.jsx)(n.thead,{children:(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.th,{style:{textAlign:"left"},children:"Network"}),(0,a.jsx)(n.th,{style:{textAlign:"left"},children:"Chain"}),(0,a.jsx)(n.th,{style:{textAlign:"left"},children:"Type"}),(0,a.jsx)(n.th,{style:{textAlign:"left"},children:"Default sync mode"}),(0,a.jsx)(n.th,{style:{textAlign:"left"},children:"Consensus mechanism"}),(0,a.jsx)(n.th,{style:{textAlign:"left"},children:"Description"})]})}),(0,a.jsxs)(n.tbody,{children:[(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.code,{children:"mainnet"})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"ETH"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"Production"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.a,{href:"#sync-mode",children:(0,a.jsx)(n.code,{children:"SNAP"})})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"A PoS network"}),(0,a.jsxs)(n.td,{style:{textAlign:"left"},children:["The main ",(0,a.jsx)(n.a,{href:"https://ethereum.org/en/developers/docs/networks/",children:"Ethereum network"})]})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.code,{children:"holesky"})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"ETH"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"Test"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.a,{href:"#sync-mode",children:(0,a.jsx)(n.code,{children:"SNAP"})})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"A PoS network"}),(0,a.jsxs)(n.td,{style:{textAlign:"left"},children:["Multi-client testnet ",(0,a.jsx)(n.a,{href:"https://holesky.dev",children:"Holesky"})]})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.code,{children:"sepolia"})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"ETH"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"Test"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.a,{href:"#sync-mode",children:(0,a.jsx)(n.code,{children:"SNAP"})})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"A PoS network"}),(0,a.jsxs)(n.td,{style:{textAlign:"left"},children:["Multi-client testnet ",(0,a.jsx)(n.a,{href:"https://sepolia.dev",children:"Sepolia"})]})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.code,{children:"lukso"})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"ETH"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"Production"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.a,{href:"#sync-mode",children:(0,a.jsx)(n.code,{children:"SNAP"})})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"A PoS network"}),(0,a.jsxs)(n.td,{style:{textAlign:"left"},children:["Network for the ",(0,a.jsx)(n.a,{href:"https://lukso.network/",children:"Lukso chain"})]})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.code,{children:"dev"})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"ETH"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"Development"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.a,{href:"#sync-mode",children:(0,a.jsx)(n.code,{children:"FULL"})})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"A PoW network"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"Development network with low difficulty to enable local CPU mining"})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.code,{children:"classic"})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"ETC"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"Production"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.a,{href:"#sync-mode",children:(0,a.jsx)(n.code,{children:"SNAP"})})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"A PoW network"}),(0,a.jsxs)(n.td,{style:{textAlign:"left"},children:["The main ",(0,a.jsx)(n.a,{href:"https://ethereumclassic.org",children:"Ethereum Classic network"})]})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.code,{children:"mordor "})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"ETC"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"Test"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.a,{href:"#sync-mode",children:(0,a.jsx)(n.code,{children:"SNAP"})})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"A PoW network"}),(0,a.jsxs)(n.td,{style:{textAlign:"left"},children:["Testnet for ",(0,a.jsx)(n.a,{href:"https://github.com/eth-classic/mordor",children:"Ethereum Classic"})]})]}),(0,a.jsxs)(n.tr,{children:[(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.code,{children:"ephemery"})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"ETH"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"Test"}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:(0,a.jsx)(n.a,{href:"#sync-mode",children:(0,a.jsx)(n.code,{children:"SNAP"})})}),(0,a.jsx)(n.td,{style:{textAlign:"left"},children:"A PoS network"}),(0,a.jsxs)(n.td,{style:{textAlign:"left"},children:["Multi-client testnet ",(0,a.jsx)(n.a,{href:"https://ephemery.dev",children:"Ephemery"})]})]})]})]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["Values are case-insensitive, so either ",(0,a.jsx)(n.code,{children:"mainnet"})," or ",(0,a.jsx)(n.code,{children:"MAINNET"})," works."]})}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["You can't use the ",(0,a.jsx)(n.code,{children:"--network"})," and ",(0,a.jsx)(n.a,{href:"#genesis-file",children:(0,a.jsx)(n.code,{children:"--genesis-file"})})," options at the same time."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"The Ropsten, Rinkeby, and Kiln testnets are deprecated."}),"\n"]}),"\n"]})}),"\n",(0,a.jsx)(n.h3,{id:"network-id",children:(0,a.jsx)(n.code,{children:"network-id"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--network-id=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--network-id=8675309\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_NETWORK_ID=8675309\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'network-id="8675309"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/network-and-chain-id",children:"P2P network identifier"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"Use this option to override the default network ID. The default value is the same as the chain ID defined in the genesis file."}),"\n",(0,a.jsx)(n.h3,{id:"node-private-key-file",children:(0,a.jsx)(n.code,{children:"node-private-key-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--node-private-key-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--node-private-key-file=/home/me/me_node/myPrivateKey\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_NODE_PRIVATE_KEY_FILE=/home/me/me_node/myPrivateKey\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'node-private-key-file="/home/me/me_node/myPrivateKey"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The private key file for the node. The default is the key file in the ",(0,a.jsx)(n.a,{href:"#data-path",children:"data directory"}),". If no key file exists, Besu creates a key file containing the generated private key, otherwise, the existing key file specifies the node private key."]}),"\n",(0,a.jsx)(n.admonition,{type:"danger",children:(0,a.jsx)(n.p,{children:"The private key is not encrypted."})}),"\n",(0,a.jsxs)(n.p,{children:["This option is ignored if ",(0,a.jsx)(n.a,{href:"#security-module",children:(0,a.jsx)(n.code,{children:"--security-module"})})," is set to a non-default value."]}),"\n",(0,a.jsx)(n.h3,{id:"p2p-enabled",children:(0,a.jsx)(n.code,{children:"p2p-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--p2p-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--p2p-enabled=false\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_P2P_ENABLED=false\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"p2p-enabled=false\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables all P2P communication. The default is ",(0,a.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"p2p-host",children:(0,a.jsx)(n.code,{children:"p2p-host"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--p2p-host=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# to listen on all interfaces\n--p2p-host=0.0.0.0\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# to listen on all interfaces\nBESU_P2P_HOST=0.0.0.0\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'p2p-host="0.0.0.0"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The advertised host that can be used to access the node from outside the network in ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/configure-ports#p2p-networking",children:"P2P communication"}),". The default is ",(0,a.jsx)(n.code,{children:"127.0.0.1"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsxs)(n.p,{children:["If ",(0,a.jsx)(n.a,{href:"#nat-method",children:(0,a.jsx)(n.code,{children:"--nat-method"})})," is set to ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat",children:(0,a.jsx)(n.code,{children:"NONE"})}),", ",(0,a.jsx)(n.code,{children:"--p2p-host"})," is not overridden and must be specified for the node to be accessed from outside the network."]})}),"\n",(0,a.jsx)(n.h3,{id:"p2p-interface",children:(0,a.jsx)(n.code,{children:"p2p-interface"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--p2p-interface=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--p2p-interface=192.168.1.132\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_P2P_INTERFACE=192.168.1.132\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'p2p-interface="192.168.1.132"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The network interface on which the node listens for ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/configure-ports#p2p-networking",children:"P2P communication"}),". Use the option to specify the required network interface when the device that Besu is running on has multiple network interfaces. The default is 0.0.0.0 (all interfaces)."]}),"\n",(0,a.jsx)(n.h3,{id:"p2p-port",children:(0,a.jsx)(n.code,{children:"p2p-port"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--p2p-port=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# to listen on port 1789\n--p2p-port=1789\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# to listen on port 1789\nBESU_P2P_PORT=1789\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'p2p-port="1789"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The P2P listening ports (UDP and TCP). The default is ",(0,a.jsx)(n.code,{children:"30303"}),". You must ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/configure-ports",children:"expose ports appropriately"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"print-paths-and-exit",children:(0,a.jsx)(n.code,{children:"print-paths-and-exit"})}),"\n",(0,a.jsx)(i.A,{children:(0,a.jsx)(r.A,{value:"Syntax",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--print-paths-and-exit\n"})})})}),"\n",(0,a.jsx)(n.p,{children:"Prints the Besu data directory paths and exits without starting the node."}),"\n",(0,a.jsx)(n.h3,{id:"profile",children:(0,a.jsx)(n.code,{children:"profile"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--profile=\n"})})}),(0,a.jsx)(r.A,{value:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--profile=STAKER\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_PROFILE=STAKER\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'profile="STAKER"\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"Loads a pre-configured TOML file containing custom settings for a specific user profile.\nPossible values are:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/profile#minimalist-staker-profile",children:(0,a.jsx)(n.code,{children:"MINIMALIST_STAKER"})})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/profile#staker-profile",children:(0,a.jsx)(n.code,{children:"STAKER"})})}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsxs)(n.a,{href:"/public-networks/how-to/configure-besu/profile#enterpriseprivate-profile",children:[(0,a.jsx)(n.code,{children:"ENTERPRISE"})," or ",(0,a.jsx)(n.code,{children:"PRIVATE"})]})," (aliases for the same profile)"]}),"\n",(0,a.jsxs)(n.li,{children:["File name of an ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/profile#load-external-profiles",children:"external profile"}),",\nwithout the ",(0,a.jsx)(n.code,{children:".toml"})," extension."]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["The default is ",(0,a.jsx)(n.code,{children:"null"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"random-peer-priority-enabled",children:(0,a.jsx)(n.code,{children:"random-peer-priority-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--random-peer-priority-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--random-peer-priority-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RANDOM_PEER_PRIORITY_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"random-peer-priority-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables random prioritization of incoming connections. Enable in small, stable networks to prevent closed groups of peers forming. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"receipt-compaction-enabled",children:(0,a.jsx)(n.code,{children:"receipt-compaction-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--receipt-compaction-enabled=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--receipt-compaction-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RECEIPT_COMPACTION_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"receipt-compaction-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables receipt compaction.\nCompacting receipts reduces storage by trimming unnecessary data from transaction receipts.\nThe default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"remote-connections-limit-enabled",children:(0,a.jsx)(n.code,{children:"remote-connections-limit-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--remote-connections-limit-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--remote-connections-limit-enabled=false\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_REMOTE_CONNECTIONS_LIMIT_ENABLED=false\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"remote-connections-limit-enabled=false\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables using the ",(0,a.jsx)(n.a,{href:"#remote-connections-max-percentage",children:(0,a.jsx)(n.code,{children:"--remote-connections-max-percentage"})})," option to limit the percentage of remote P2P connections initiated by peers. The default is ",(0,a.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsx)(n.p,{children:"In private and permissioned networks with a level of trust between peers, disabling the remote connection limits may increase the speed at which nodes can join the network."})}),"\n",(0,a.jsx)(n.admonition,{type:"danger",children:(0,a.jsxs)(n.p,{children:["To prevent eclipse attacks, ensure you enable the remote connections limit when connecting to any public network, and especially when using ",(0,a.jsx)(n.a,{href:"#sync-mode",children:(0,a.jsx)(n.code,{children:"--sync-mode"})})," and ",(0,a.jsx)(n.a,{href:"#sync-min-peers-fast-sync-min-peers",children:(0,a.jsx)(n.code,{children:"--fast-sync-min-peers"})}),"."]})}),"\n",(0,a.jsx)(n.h3,{id:"remote-connections-max-percentage",children:(0,a.jsx)(n.code,{children:"remote-connections-max-percentage"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--remote-connections-max-percentage=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--remote-connections-max-percentage=25\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_REMOTE_CONNECTIONS_MAX_PERCENTAGE=25\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"remote-connections-max-percentage=25\n"})})})]}),"\n",(0,a.jsx)(n.p,{children:"The percentage of remote P2P connections you can establish with the node. Must be between 0 and 100, inclusive. The default is 60."}),"\n",(0,a.jsx)(n.h3,{id:"reorg-logging-threshold",children:(0,a.jsx)(n.code,{children:"reorg-logging-threshold"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--reorg-logging-threshold=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--reorg-logging-threshold=3\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_REORG_LOGGING_THRESHOLD=3\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"reorg-logging-threshold=3\n"})})})]}),"\n",(0,a.jsx)(n.p,{children:"Minimum depth of chain reorganizations to log. The default is 6."}),"\n",(0,a.jsx)(n.h3,{id:"required-block",children:(0,a.jsx)(n.code,{children:"required-block"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--required-block, --required-blocks[=BLOCK=HASH[,BLOCK=HASH...]...]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--required-block=6485846=0x43f0cd1e5b1f9c4d5cda26c240b59ee4f1b510d0a185aa8fd476d091b0097a80\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_REQUIRED_BLOCK=6485846=0x43f0cd1e5b1f9c4d5cda26c240b59ee4f1b510d0a185aa8fd476d091b0097a80\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'required-block=["6485846=0x43f0cd1e5b1f9c4d5cda26c240b59ee4f1b510d0a185aa8fd476d091b0097a80"]\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"Requires a peer with the specified block number to have the specified hash when connecting, or Besu rejects that peer."}),"\n",(0,a.jsx)(n.h3,{id:"revert-reason-enabled",children:(0,a.jsx)(n.code,{children:"revert-reason-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--revert-reason-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--revert-reason-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_REVERT_REASON_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"revert-reason-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables including the ",(0,a.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/revert-reason",children:"revert reason"})," in the transaction receipt, ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_estimategas",children:(0,a.jsx)(n.code,{children:"eth_estimateGas"})})," error response, ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_call",children:(0,a.jsx)(n.code,{children:"eth_call"})})," error response, and ",(0,a.jsx)(n.a,{href:"/public-networks/reference/trace-types#trace",children:(0,a.jsx)(n.code,{children:"trace"})})," response. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsx)(n.p,{children:"Enabling revert reason may use a significant amount of memory. We don't recommend enabling revert reason when connected to public Ethereum networks."})}),"\n",(0,a.jsx)(n.h3,{id:"rpc-gas-cap",children:(0,a.jsx)(n.code,{children:"rpc-gas-cap"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-gas-cap=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-gas-cap=50000000\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_GAS_CAP=50000000\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rpc-gas-cap=50000000\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Sets a limit on the amount of gas for transaction simulation RPC methods.\nThis option allows users to override the transaction's gas limit.\nThis can prevent the simulation of transactions with high gas usage by setting a predefined cap, preventing DoS attacks.\nIts value must be greater than or equal to ",(0,a.jsx)(n.code,{children:"0"}),".\nThe default is ",(0,a.jsx)(n.code,{children:"0"}),", which indicates there is no limit.\nThis cap prevents ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_call",children:(0,a.jsx)(n.code,{children:"eth_call"})})," requests from using excessive resources."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-api",children:(0,a.jsx)(n.code,{children:"rpc-http-api"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-api=[,,...]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-api=ETH,NET,WEB3\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_API=ETH,NET,WEB3\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-http-api=["ETH","NET","WEB3"]\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["A comma-separated list of APIs to enable on the JSON-RPC HTTP channel. When you use this option you must also specify the ",(0,a.jsx)(n.code,{children:"--rpc-http-enabled"})," option. The available API options are: ",(0,a.jsx)(n.code,{children:"ADMIN"}),", ",(0,a.jsx)(n.code,{children:"CLIQUE"}),", ",(0,a.jsx)(n.code,{children:"DEBUG"}),", ",(0,a.jsx)(n.code,{children:"EEA"}),", ",(0,a.jsx)(n.code,{children:"ETH"}),", ",(0,a.jsx)(n.code,{children:"IBFT"}),", ",(0,a.jsx)(n.code,{children:"MINER"}),", ",(0,a.jsx)(n.code,{children:"NET"}),", ",(0,a.jsx)(n.code,{children:"PERM"}),", ",(0,a.jsx)(n.code,{children:"PLUGINS"}),", ",(0,a.jsx)(n.code,{children:"PRIV"}),", ",(0,a.jsx)(n.code,{children:"QBFT"}),", ",(0,a.jsx)(n.code,{children:"TRACE"}),", ",(0,a.jsx)(n.code,{children:"TXPOOL"}),", and ",(0,a.jsx)(n.code,{children:"WEB3"}),". The default is: ",(0,a.jsx)(n.code,{children:"ETH"}),", ",(0,a.jsx)(n.code,{children:"NET"}),", ",(0,a.jsx)(n.code,{children:"WEB3"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["The singular ",(0,a.jsx)(n.code,{children:"--rpc-http-api"})," and plural ",(0,a.jsx)(n.code,{children:"--rpc-http-apis"})," are available and are two names for the same option."]})}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-api-methods-no-auth",children:(0,a.jsx)(n.code,{children:"rpc-http-api-methods-no-auth"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-api-methods-no-auth=[,,...]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-api-methods-no-auth=admin_peers,eth_getWork\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_API_METHODS_NO_AUTH=admin_peers,eth_getWork\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-http-api-methods-no-auth=["admin_peers","eth_getWork"]\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["A comma-separated list of JSON-RPC API methods to exclude from ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"authentication services"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["You must enable JSON-RPC HTTP authentication using ",(0,a.jsx)(n.a,{href:"#rpc-http-authentication-enabled",children:(0,a.jsx)(n.code,{children:"--rpc-http-authentication-enabled"})}),"."]})}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-authentication-credentials-file",children:(0,a.jsx)(n.code,{children:"rpc-http-authentication-credentials-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-authentication-credentials-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-authentication-credentials-file=/home/me/me_node/auth.toml\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_AUTHENTICATION_CREDENTIALS_FILE=/home/me/me_node/auth.toml\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-http-authentication-credentials-file="/home/me/me_node/auth.toml"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate#1-create-the-credentials-file",children:"credentials file"})," for JSON-RPC API ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"authentication"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-authentication-enabled",children:(0,a.jsx)(n.code,{children:"rpc-http-authentication-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-authentication-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-authentication-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_AUTHENTICATION_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rpc-http-authentication-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"authentication"})," for the JSON-RPC HTTP service."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-authentication-jwt-algorithm",children:(0,a.jsx)(n.code,{children:"rpc-http-authentication-jwt-algorithm"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"---rpc-http-authentication-jwt-algorithm=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-authentication-jwt-algorithm=ES256\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_AUTHENTICATION_JWT_ALGORITHM=ES256\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-http-authentication-jwt-algorithm="ES256"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate#1-generate-a-private-and-public-key-pair",children:"JWT key algorithm"}),"\nused to generate the keypair for JSON-RPC HTTP authentication.\nPossible values are ",(0,a.jsx)(n.code,{children:"RS256"}),", ",(0,a.jsx)(n.code,{children:"RS384"}),", ",(0,a.jsx)(n.code,{children:"RS512"}),", ",(0,a.jsx)(n.code,{children:"ES256"}),", ",(0,a.jsx)(n.code,{children:"ES384"}),", and ",(0,a.jsx)(n.code,{children:"ES512"}),".\nThe default is ",(0,a.jsx)(n.code,{children:"RS256"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-authentication-jwt-public-key-file",children:(0,a.jsx)(n.code,{children:"rpc-http-authentication-jwt-public-key-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-authentication-jwt-public-key-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-authentication-jwt-public-key-file=publicKey.pem\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_RPC_HTTP_AUTHENTICATION_JWT_PUBLIC_KEY_FILE="publicKey.pem"\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-http-authentication-jwt-public-key-file="publicKey.pem"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate#jwt-public-key-authentication",children:"JWT provider's public key file"})," used for JSON-RPC HTTP authentication with an external JWT."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-cors-origins",children:(0,a.jsx)(n.code,{children:"rpc-http-cors-origins"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'--rpc-http-cors-origins=[,...]... or all or "*"\n'})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-cors-origins=http://medomain.com,http://remix.ethereum.org\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_CORS_ORIGINS=http://medomain.com,https://meotherdomain.com\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-http-cors-origins=["http://medomain.com","https://meotherdomain.com"]\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"A comma-separated list of domain URLs for CORS validation."}),"\n",(0,a.jsx)(n.p,{children:"Listed domains can access the node using JSON-RPC. If your client interacts with Besu using a browser app (such as Remix or a block explorer), add the client domain to the list."}),"\n",(0,a.jsxs)(n.p,{children:["The default value is ",(0,a.jsx)(n.code,{children:'"none"'}),". If you do not list any domains, browser apps cannot interact with your Besu node."]}),"\n",(0,a.jsxs)(n.admonition,{type:"note",children:[(0,a.jsxs)(n.p,{children:["To run a local Besu node with MetaMask, set ",(0,a.jsx)(n.code,{children:"--rpc-http-cors-origins"})," to ",(0,a.jsx)(n.code,{children:"chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn"}),"."]}),(0,a.jsxs)(n.p,{children:["Remember to also include the dapp domain MetaMask interacts with, for example if your app is deployed on Remix and you're using MetaMask to interact with the contract, use ",(0,a.jsx)(n.code,{children:"--rpc-http-cors-origins=chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn,http://remix.ethereum.org"})]})]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["For testing and development purposes, use ",(0,a.jsx)(n.code,{children:'"all"'})," or ",(0,a.jsx)(n.code,{children:'"*"'})," to accept requests from any domain. We don't recommend accepting requests from any domain for production environments."]})}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-enabled",children:(0,a.jsx)(n.code,{children:"rpc-http-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rpc-http-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables the JSON-RPC HTTP service. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-host",children:(0,a.jsx)(n.code,{children:"rpc-http-host"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-host=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# to listen on all interfaces\n--rpc-http-host=0.0.0.0\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_HOST=0.0.0.0\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-http-host="0.0.0.0"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The host on which JSON-RPC HTTP listens. The default is ",(0,a.jsx)(n.code,{children:"127.0.0.1"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["To allow remote connections, set to ",(0,a.jsx)(n.code,{children:"0.0.0.0"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsxs)(n.p,{children:["Setting the host to ",(0,a.jsx)(n.code,{children:"0.0.0.0"})," exposes the RPC connection on your node to any remote connection. In a production environment, ensure you are using a firewall to avoid exposing your node to the internet."]})}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-max-active-connections",children:(0,a.jsx)(n.code,{children:"rpc-http-max-active-connections"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-max-active-connections=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-max-active-connections=100\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_MAX_ACTIVE_CONNECTIONS=100\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-toml",children:"rpc-http-max-active-connections=100\n"})})})]}),"\n",(0,a.jsx)(n.p,{children:"The maximum number of allowed JSON-RPC HTTP connections. Once this limit is reached, incoming connections are rejected. The default is 80."}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-max-request-content-length",children:(0,a.jsx)(n.code,{children:"rpc-http-max-request-content-length"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-max-request-content-length=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-max-request-content-length=2097152\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_MAX_REQUEST_CONTENT_LENGTH=2097152\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-toml",children:"rpc-http-max-request-content-length=2097152\n"})})})]}),"\n",(0,a.jsx)(n.p,{children:"The maximum request content length.\nBesu only accepts JSON-RPC API requests with a body size less than or equal to this value.\nThe default is 5242880 (5 MB)."}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-max-batch-size",children:(0,a.jsx)(n.code,{children:"rpc-http-max-batch-size"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-max-batch-size=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-max-batch-size=1200\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_MAX_BATCH_SIZE=1200\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-toml",children:"rpc-http-max-batch-size=1200\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The maximum number of allowed requests in a ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#http",children:"RPC batch request"}),". The default limit is ",(0,a.jsx)(n.code,{children:"1024"}),", and ",(0,a.jsx)(n.code,{children:"-1"})," specifies no limit."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-port",children:(0,a.jsx)(n.code,{children:"rpc-http-port"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-port=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# to listen on port 3435\n--rpc-http-port=3435\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_PORT=3435\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-http-port="3435"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The port (TCP) on which JSON-RPC HTTP listens. The default is ",(0,a.jsx)(n.code,{children:"8545"}),". You must ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/configure-ports",children:"expose ports appropriately"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-tls-ca-clients-enabled",children:(0,a.jsx)(n.code,{children:"rpc-http-tls-ca-clients-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-ca-clients-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-ca-clients-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_TLS_CA_CLIENTS_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rpc-http-tls-ca-clients-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables clients with trusted CA certificates to connect. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["You must enable client authentication using the ",(0,a.jsx)(n.a,{href:"#rpc-http-tls-client-auth-enabled",children:(0,a.jsx)(n.code,{children:"--rpc-http-tls-client-auth-enabled"})})," option."]})}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-tls-client-auth-enabled",children:(0,a.jsx)(n.code,{children:"rpc-http-tls-client-auth-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-client-auth-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-client-auth-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_TLS_CLIENT_AUTH_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rpc-http-tls-client-auth-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables TLS client authentication for the JSON-RPC HTTP service. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["You must specify ",(0,a.jsx)(n.a,{href:"#rpc-http-tls-ca-clients-enabled",children:(0,a.jsx)(n.code,{children:"--rpc-http-tls-ca-clients-enabled"})})," and/or ",(0,a.jsx)(n.a,{href:"#rpc-http-tls-known-clients-file",children:(0,a.jsx)(n.code,{children:"rpc-http-tls-known-clients-file"})}),"."]})}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-tls-cipher-suite",children:(0,a.jsx)(n.code,{children:"rpc-http-tls-cipher-suite"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-cipher-suite=[, ...]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-cipher-suite=TLS_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_TLS_CIPHER_SUITE=TLS_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-http-tls-cipher-suite=["TLS_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384","TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"]\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"A list of comma-separated TLS cipher suites to support."}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["The singular ",(0,a.jsx)(n.code,{children:"--rpc-http-tls-cipher-suite"})," and plural ",(0,a.jsx)(n.code,{children:"--rpc-http-tls-cipher-suites"})," are available and are two names for the same option."]})}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-tls-enabled",children:(0,a.jsx)(n.code,{children:"rpc-http-tls-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_TLS_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rpc-http-tls-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables TLS for the JSON-RPC HTTP service. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.a,{href:"#rpc-http-enabled",children:(0,a.jsx)(n.code,{children:"--rpc-http-enabled"})})," must be enabled."]})}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-tls-keystore-file",children:(0,a.jsx)(n.code,{children:"rpc-http-tls-keystore-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-keystore-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-keystore-file=/home/me/me_node/keystore.pfx\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_TLS_KEYSTORE_FILE=/home/me/me_node/keystore.pfx\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-http-tls-keystore-file="/home/me/me_node/keystore.pfx"\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"The Keystore file (in PKCS #12 format) that contains private key and the certificate presented to the client during authentication."}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-tls-keystore-password-file",children:(0,a.jsx)(n.code,{children:"rpc-http-tls-keystore-password-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-keystore-password-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-keystore-password-file=/home/me/me_node/password\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_TLS_KEYSTORE_PASSWORD_FILE=/home/me/me_node/password\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-http-tls-keystore-password-file="/home/me/me_node/password"\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"The path to the file containing the password to decrypt the keystore."}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-tls-known-clients-file",children:(0,a.jsx)(n.code,{children:"rpc-http-tls-known-clients-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-known-clients-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-known-clients-file=/home/me/me_node/knownClients\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_TLS_KNOWN_CLIENTS_FILE=/home/me/me_node/knownClients\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-http-tls-known-clients-file="/home/me/me_node/knownClients"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The path to the file used to ",(0,a.jsx)(n.a,{href:"/private-networks/how-to/configure/tls/client-and-server#create-the-known-clients-file",children:"authenticate clients"})," using self-signed certificates or non-public certificates."]}),"\n",(0,a.jsxs)(n.p,{children:["Must contain the certificate's Common Name, and SHA-256 fingerprint in the format ",(0,a.jsx)(n.code,{children:" "}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["You must enable client authentication using the ",(0,a.jsx)(n.a,{href:"#rpc-http-tls-client-auth-enabled",children:(0,a.jsx)(n.code,{children:"--rpc-http-tls-client-auth-enabled"})})," option."]})}),"\n",(0,a.jsx)(n.h3,{id:"rpc-http-tls-protocol",children:(0,a.jsx)(n.code,{children:"rpc-http-tls-protocol"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-protocol=[, ...]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-http-tls-protocol=TLSv1.3,TLSv1.2\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_HTTP_TLS_PROTOCOL=TLSv1.3,TLSv1.2\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-http-tls-protocol=["TLSv1.3","TLSv1.2"]\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["A list of comma-separated TLS protocols to support. The default is ",(0,a.jsx)(n.code,{children:"DEFAULT_TLS_PROTOCOLS"}),", a list which includes ",(0,a.jsx)(n.code,{children:"TLSv1.3"})," and ",(0,a.jsx)(n.code,{children:"TLSv1.2"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["The singular ",(0,a.jsx)(n.code,{children:"--rpc-http-tls-protocol"})," and plural ",(0,a.jsx)(n.code,{children:"--rpc-http-tls-protocols"})," are available and are two names for the same option."]})}),"\n",(0,a.jsx)(n.h3,{id:"rpc-max-logs-range",children:(0,a.jsx)(n.code,{children:"rpc-max-logs-range"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-max-logs-range=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-max-logs-range=500\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_MAX_LOGS_RANGE=500\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rpc-max-logs-range=500\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["When using ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getlogs",children:(0,a.jsx)(n.code,{children:"eth_getLogs"})}),", the maximum number of blocks to retrieve logs from. Set to 0 to specify no limit. The default is 5000."]}),"\n",(0,a.jsxs)(n.admonition,{type:"caution",children:[(0,a.jsxs)(n.p,{children:["Using ",(0,a.jsx)(n.code,{children:"eth_getLogs"})," to get logs from a large range of blocks, especially an entire chain from its\ngenesis block, might cause Besu to stop responding for an indeterminable amount of time while\ngenerating the response."]}),(0,a.jsx)(n.p,{children:"We recommend setting a range limit or leaving this option at its default value."})]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-max-trace-filter-range",children:(0,a.jsx)(n.code,{children:"rpc-max-trace-filter-range"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-max-trace-filter-range=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-max-trace-filter-range=100\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--BESU_RPC_MAX_TRACE_FILTER_RANGE=100\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rpc-max-trace-filter-range=100\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The maximum number of blocks you can supply to the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#trace_filter",children:(0,a.jsx)(n.code,{children:"trace_filter"})})," method. The value must be equal to or greater than ",(0,a.jsx)(n.code,{children:"0"}),". Setting this option to ",(0,a.jsx)(n.code,{children:"0"})," indicates there is no limit. The default is ",(0,a.jsx)(n.code,{children:"1000"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-tx-feecap",children:(0,a.jsx)(n.code,{children:"rpc-tx-feecap"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-tx-feecap=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-tx-feecap=1200000000000000000\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_TX_FEECAP=1200000000000000000\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rpc-tx-feecap=1200000000000000000\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The maximum transaction fee (in wei) accepted for transactions submitted through the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#eth_sendrawtransaction",children:(0,a.jsx)(n.code,{children:"eth_sendRawTransaction"})})," RPC. The default is 1000000000000000000 (1 ether)."]}),"\n",(0,a.jsx)(n.p,{children:"If set to 0, then this option is ignored and no cap is applied."}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-api",children:(0,a.jsx)(n.code,{children:"rpc-ws-api"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-api=[,...]...\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-api=ETH,NET,WEB3\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_WS_API=ETH,NET,WEB3\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-api=["ETH","NET","WEB3"]\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["A comma-separated list of APIs to enable on the WebSockets channel. When you use this option you must also specify the ",(0,a.jsx)(n.code,{children:"--rpc-ws-enabled"})," option. The available API options are: ",(0,a.jsx)(n.code,{children:"ADMIN"}),", ",(0,a.jsx)(n.code,{children:"CLIQUE"}),", ",(0,a.jsx)(n.code,{children:"DEBUG"}),", ",(0,a.jsx)(n.code,{children:"EEA"}),", ",(0,a.jsx)(n.code,{children:"ETH"}),", ",(0,a.jsx)(n.code,{children:"IBFT"}),", ",(0,a.jsx)(n.code,{children:"MINER"}),", ",(0,a.jsx)(n.code,{children:"NET"}),", ",(0,a.jsx)(n.code,{children:"PERM"}),", ",(0,a.jsx)(n.code,{children:"PLUGINS"}),", ",(0,a.jsx)(n.code,{children:"PRIV"}),", ",(0,a.jsx)(n.code,{children:"QBFT"}),", ",(0,a.jsx)(n.code,{children:"TRACE"}),", ",(0,a.jsx)(n.code,{children:"TXPOOL"}),", and ",(0,a.jsx)(n.code,{children:"WEB3"}),". The default is: ",(0,a.jsx)(n.code,{children:"ETH"}),", ",(0,a.jsx)(n.code,{children:"NET"}),", ",(0,a.jsx)(n.code,{children:"WEB3"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"tip",children:(0,a.jsxs)(n.p,{children:["The singular ",(0,a.jsx)(n.code,{children:"--rpc-ws-api"})," and plural ",(0,a.jsx)(n.code,{children:"--rpc-ws-apis"})," options are available and are two names for the same option."]})}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-api-methods-no-auth",children:(0,a.jsx)(n.code,{children:"rpc-ws-api-methods-no-auth"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-api-methods-no-auth=[,,...]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-api-methods-no-auth=admin_peers,eth_getWork\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_WS_API_METHODS_NO_AUTH=admin_peers,eth_getWork\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-api-methods-no-auth=["admin_peers","eth_getWork"]\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["A comma-separated list of JSON-RPC API methods to exclude from ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"authentication services"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:["You must enable JSON-RPC WebSocket authentication using ",(0,a.jsx)(n.a,{href:"#rpc-ws-authentication-enabled",children:(0,a.jsx)(n.code,{children:"--rpc-ws-authentication-enabled"})}),"."]})}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-authentication-credentials-file",children:(0,a.jsx)(n.code,{children:"rpc-ws-authentication-credentials-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-authentication-credentials-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-authentication-credentials-file=/home/me/me_node/auth.toml\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_WS_AUTHENTICATION_CREDENTIALS_FILE=/home/me/me_node/auth.toml\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-authentication-credentials-file="/home/me/me_node/auth.toml"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The path to the ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate#1-create-the-credentials-file",children:"credentials file"})," for JSON-RPC API ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"authentication"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-authentication-enabled",children:(0,a.jsx)(n.code,{children:"rpc-ws-authentication-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-authentication-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-authentication-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_WS_AUTHENTICATION_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rpc-ws-authentication-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"authentication"})," for the JSON-RPC WebSocket service."]}),"\n",(0,a.jsx)(n.admonition,{type:"note",children:(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"wscat"})," doesn't support headers. ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"Authentication"})," requires you to pass an authentication token in the request header. To use authentication with WebSockets, you need an app that supports headers."]})}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-authentication-jwt-algorithm",children:(0,a.jsx)(n.code,{children:"rpc-ws-authentication-jwt-algorithm"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"---rpc-ws-authentication-jwt-algorithm=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-authentication-jwt-algorithm=ES256\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_WS_AUTHENTICATION_JWT_ALGORITHM=ES256\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-authentication-jwt-algorithm="ES256"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate#1-generate-a-private-and-public-key-pair",children:"JWT key algorithm"}),"\nused to generate the keypair for JSON-RPC WebSocket authentication.\nPossible values are ",(0,a.jsx)(n.code,{children:"RS256"}),", ",(0,a.jsx)(n.code,{children:"RS384"}),", ",(0,a.jsx)(n.code,{children:"RS512"}),", ",(0,a.jsx)(n.code,{children:"ES256"}),", ",(0,a.jsx)(n.code,{children:"ES384"}),", and ",(0,a.jsx)(n.code,{children:"ES512"}),".\nThe default is ",(0,a.jsx)(n.code,{children:"RS256"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-authentication-jwt-public-key-file",children:(0,a.jsx)(n.code,{children:"rpc-ws-authentication-jwt-public-key-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-authentication-jwt-public-key-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-authentication-jwt-public-key-file=publicKey.pem\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_RPC_WS_AUTHENTICATION_JWT_PUBLIC_KEY_FILE="publicKey.pem"\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-authentication-jwt-public-key-file="publicKey.pem"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate#jwt-public-key-authentication",children:"JWT provider's public key file"})," used for JSON-RPC WebSocket authentication with an external JWT."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-enabled",children:(0,a.jsx)(n.code,{children:"rpc-ws-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_WS_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rpc-ws-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables the WebSocket JSON-RPC service. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-host",children:(0,a.jsx)(n.code,{children:"rpc-ws-host"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-host=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# to listen on all interfaces\n--rpc-ws-host=0.0.0.0\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_WS_HOST=0.0.0.0\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-host="0.0.0.0"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The host on which WebSocket JSON-RPC listens.\nThe default is ",(0,a.jsx)(n.code,{children:"127.0.0.1"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["To allow remote connections, set to ",(0,a.jsx)(n.code,{children:"0.0.0.0"})]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-max-active-connections",children:(0,a.jsx)(n.code,{children:"rpc-ws-max-active-connections"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-max-active-connections=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-max-active-connections=100\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_WS_MAX_ACTIVE_CONNECTIONS=100\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-toml",children:"rpc-ws-max-active-connections=100\n"})})})]}),"\n",(0,a.jsx)(n.p,{children:"The maximum number of WebSocket connections allowed for JSON-RPC. Once this limit is reached, incoming connections are rejected. The default is 80."}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-max-frame-size",children:(0,a.jsx)(n.code,{children:"rpc-ws-max-frame-size"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-max-frame-size=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-max-frame-size=65536\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_WS_MAX_FRAME_SIZE=65536\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-toml",children:"rpc-ws-max-frame-size=65536\n"})})})]}),"\n",(0,a.jsx)(n.p,{children:"The maximum size in bytes for JSON-RPC WebSocket frames. If this limit is exceeded, the WebSocket disconnects. The default is 1048576 (or 1 MB)."}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-port",children:(0,a.jsx)(n.code,{children:"rpc-ws-port"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-port=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"# to listen on port 6174\n--rpc-ws-port=6174\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_WS_PORT=6174\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-port="6174"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The port (TCP) on which WebSocket JSON-RPC listens. The default is ",(0,a.jsx)(n.code,{children:"8546"}),". You must ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/configure-ports",children:"expose ports appropriately"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-ssl-cert-file",children:(0,a.jsx)(n.code,{children:"rpc-ws-ssl-cert-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-cert-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-cert-file=/home/me/me_node/websocket-cert.pem\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_RPC_WS_SSL_CERT_FILE="/home/me/me_node/websocket-cert.pem"\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-ssl-cert-file="/home/me/me_node/websocket-cert.pem"\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"Path to the PEM certificate file enabling SSL/TLS for the WebSocket JSON-RPC service.\nThis file contains the public certificate that is used to establish the identity of the server to clients."}),"\n",(0,a.jsxs)(n.p,{children:["Specify the private key file using ",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-key-file",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-key-file"})}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Required if ",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-keystore-type",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-keystore-type"})})," is ",(0,a.jsx)(n.code,{children:"PEM"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-ssl-client-auth-enabled",children:(0,a.jsx)(n.code,{children:"rpc-ws-ssl-client-auth-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-client-auth-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-client-auth-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_WS_SSL_CLIENT_AUTH_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rpc-ws-ssl-client-auth-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables client authentication for the WebSocket JSON-RPC service. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsxs)(n.admonition,{type:"note",children:[(0,a.jsxs)(n.p,{children:["When enabling client authentication, specify the truststore type using ",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-truststore-type",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-truststore-type"})}),"\nand provide the appropriate file path for the truststore or trust certificate using either\n",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-truststore-file",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-truststore-file"})})," (for JKS or PKCS12) or\n",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-trustcert-file",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-trustcert-file"})})," (for PEM)."]}),(0,a.jsxs)(n.p,{children:["If using JKS or PKCS12, specify the truststore password using ",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-truststore-password",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-truststore-password"})}),"."]})]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-ssl-enabled",children:(0,a.jsx)(n.code,{children:"rpc-ws-ssl-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-enabled=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_RPC_WS_SSL_ENABLED=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"rpc-ws-ssl-enabled=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables server SSL/TLS authentication for the WebSocket JSON-RPC service. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Set the appropriate keystore type using ",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-keystore-type",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-keystore-type"})}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-ssl-key-file",children:(0,a.jsx)(n.code,{children:"rpc-ws-ssl-key-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-key-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-key-file=/home/me/me_node/websocket-cert.pem\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_RPC_WS_SSL_KEY_FILE="/home/me/me_node/websocket-cert.pem"\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-ssl-key-file="/home/me/me_node/websocket-cert.pem"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Path to the PEM certificate file when enabling SSL/TLS for the WebSocket JSON-RPC service.\nThis file contains the private key that corresponds to the public certificate specified using\n",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-cert-file",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-cert-file"})}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Required if ",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-keystore-type",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-keystore-type"})})," is ",(0,a.jsx)(n.code,{children:"PEM"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-ssl-keystore-file",children:(0,a.jsx)(n.code,{children:"rpc-ws-ssl-keystore-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-keystore-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-keystore-file=/home/me/me_node/keystore.jks\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_RPC_WS_SSL_KEYSTORE_FILE="/home/me/me_node/keystore.jks"\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-ssl-keystore-file="/home/me/me_node/keystore.jks"\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"Path to the keystore file when enabling SSL/TLS for the WebSocket JSON-RPC service.\nThe keystore file is used to store the server's private key and public certificate in a single\nfile, typically in JKS or PKCS12 format. Use this option if you prefer to\nmanage your SSL/TLS certificates and keys in a keystore rather than separate PEM files."}),"\n",(0,a.jsxs)(n.p,{children:["Required if ",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-keystore-type",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-keystore-type"})})," is set to ",(0,a.jsx)(n.code,{children:"JKS"})," or ",(0,a.jsx)(n.code,{children:"PKCS12"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-ssl-keystore-password",children:(0,a.jsx)(n.code,{children:"rpc-ws-ssl-keystore-password"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-keystore-password=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-keystore-password=keystore_password\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_RPC_WS_SSL_KEYSTORE_PASSWORD="keystore_password"\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-ssl-keystore-password="keystore_password"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Password for the keystore file specified in ",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-keystore-file",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-keystore-file"})}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-ssl-keystore-type",children:(0,a.jsx)(n.code,{children:"rpc-ws-ssl-keystore-type"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-keystore-type=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-keystore-type=JKS\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_RPC_WS_SSL_KEYSTORE_TYPE="JKS"\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-ssl-keystore-type="JKS"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Type of the keystore when enabling SSL/TLS for the WebSocket JSON-RPC service. Valid options are\n",(0,a.jsx)(n.code,{children:"JKS"}),", ",(0,a.jsx)(n.code,{children:"PKCS12"}),", and ",(0,a.jsx)(n.code,{children:"PEM"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Provide the appropriate file path for the keystore using either\n",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-keystore-file",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-keystore-file"})})," (for ",(0,a.jsx)(n.code,{children:"JKS"})," or ",(0,a.jsx)(n.code,{children:"PKCS12"}),"), or\n",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-key-file",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-key-file"})})," and ",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-cert-file",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-cert-file"})})," (for ",(0,a.jsx)(n.code,{children:"PEM"}),")."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-ssl-trustcert-file",children:(0,a.jsx)(n.code,{children:"rpc-ws-ssl-trustcert-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-trustcert-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-trustcert-file=/home/me/me_node/trust-cert.pem\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_RPC_WS_SSL_TRUSTCERT_FILE="/home/me/me_node/trust-cert.pem"\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-ssl-trustcert-file="/home/me/me_node/trust-cert.pem"\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"Path to the PEM trust certificate file for enabling client SSL/TLS authentication for the WebSocket JSON-RPC\nservice."}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-ssl-truststore-file",children:(0,a.jsx)(n.code,{children:"rpc-ws-ssl-truststore-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-truststore-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-truststore-file=/home/me/me_node/websocket-truststore.jks\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_RPC_WS_SSL_TRUSTSTORE_FILE="/home/me/me_node/websocket-truststore.jks"\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-ssl-truststore-file="/home/me/me_node/websocket-truststore.jks"\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"Path to the truststore file for enabling SSL/TLS client authentication for the WebSocket JSON-RPC\nservice."}),"\n",(0,a.jsxs)(n.p,{children:["Specify the truststore file password using ",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-truststore-password",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-truststore-password"})}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-ssl-truststore-password",children:(0,a.jsx)(n.code,{children:"rpc-ws-ssl-truststore-password"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-truststore-password=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-truststore-password=/home/me/me_node/websocket-truststore.jks\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_RPC_WS_SSL_TRUSTSTORE_PASSWORD="/home/me/me_node/websocket-truststore.jks"\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-ssl-truststore-password="/home/me/me_node/websocket-truststore.jks"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Password for the truststore file specified using ",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-truststore-file",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-truststore-file"})}),"\nwhen enabling WebSocket SSL/TLS client authentication."]}),"\n",(0,a.jsx)(n.h3,{id:"rpc-ws-ssl-truststore-type",children:(0,a.jsx)(n.code,{children:"rpc-ws-ssl-truststore-type"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-truststore-type=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--rpc-ws-ssl-truststore-type=JKS\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_RPC_WS_SSL_TRUSTSTORE_TYPE="JKS"\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'rpc-ws-ssl-truststore-type="JKS"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Type of the truststore when enabling client SSL/TLS authentication for the WebSocket JSON-RPC service. Valid options are\n",(0,a.jsx)(n.code,{children:"JKS"}),", ",(0,a.jsx)(n.code,{children:"PKCS12"}),", and ",(0,a.jsx)(n.code,{children:"PEM"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Specify the required ",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-truststore-file",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-truststore-file"})})," for ",(0,a.jsx)(n.code,{children:"JKS"})," and ",(0,a.jsx)(n.code,{children:"PKCS12"}),", or\n",(0,a.jsx)(n.a,{href:"#rpc-ws-ssl-trustcert-file",children:(0,a.jsx)(n.code,{children:"--rpc-ws-ssl-trustcert-file"})})," for ",(0,a.jsx)(n.code,{children:"PEM"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"security-module",children:(0,a.jsx)(n.code,{children:"security-module"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--security-module=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--security-module=security_module\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_SECURITY_MODULE=security_module\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'security-module="security_module"\n'})})})]}),"\n",(0,a.jsx)(n.p,{children:"Name of the security module plugin to use. For example, a Hardware Security Module (HSM) or V3 filestore plugin."}),"\n",(0,a.jsxs)(n.p,{children:["The default is the node's local private key file specified using ",(0,a.jsx)(n.a,{href:"#node-private-key-file",children:(0,a.jsx)(n.code,{children:"--node-private-key-file"})}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"static-nodes-file",children:(0,a.jsx)(n.code,{children:"static-nodes-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--static-nodes-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--static-nodes-file=~/besudata/static-nodes.json\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_STATIC_NODES_FILE=~/besudata/static-nodes.json\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'static-nodes-file="~/besudata/static-nodes.json"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Static nodes JSON file containing the ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/connect/static-nodes",children:"static nodes"})," for this node to connect to. The default is ",(0,a.jsx)(n.code,{children:"datapath/static-nodes.json"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"strict-tx-replay-protection-enabled",children:(0,a.jsx)(n.code,{children:"strict-tx-replay-protection-enabled"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--strict-tx-replay-protection-enabled[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--strict-tx-replay-protection-enabled=false\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_STRICT_TX_REPLAY_PROTECTION_ENABLED=false\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"strict-tx-replay-protection-enabled=false\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables replay protection, in accordance with ",(0,a.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-155",children:"EIP-155"}),", on transactions submitted using JSON-RPC. The default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsxs)(n.h3,{id:"sync-min-peers-fast-sync-min-peers",children:[(0,a.jsx)(n.code,{children:"sync-min-peers"}),", ",(0,a.jsx)(n.code,{children:"fast-sync-min-peers"})]}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--sync-min-peers=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--sync-min-peers=8\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_SYNC_MIN_PEERS=8\n"})})}),(0,a.jsx)(r.A,{value:"Example configuration file",label:"Example configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"sync-min-peers=8\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The minimum number of peers required before starting ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/node-sync",children:"sync"}),". The default is ",(0,a.jsx)(n.code,{children:"5"}),". Set to ",(0,a.jsx)(n.code,{children:"1"})," to enable static peers to contribute to the initial sync."]}),"\n",(0,a.jsx)(n.admonition,{type:"info",children:(0,a.jsx)(n.p,{children:"This option does not apply to Proof of Stake networks."})}),"\n",(0,a.jsx)(n.h3,{id:"sync-mode",children:(0,a.jsx)(n.code,{children:"sync-mode"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--sync-mode=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--sync-mode=SNAP\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_SYNC_MODE=SNAP\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'sync-mode="SNAP"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The synchronization mode. Use ",(0,a.jsx)(n.code,{children:"SNAP"})," for ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/node-sync#snap-synchronization",children:"snap sync"}),", ",(0,a.jsx)(n.code,{children:"CHECKPOINT"})," for ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/node-sync#checkpoint-synchronization",children:"checkpoint sync"}),", ",(0,a.jsx)(n.code,{children:"FAST"})," for ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/node-sync#fast-synchronization-deprecated",children:"fast sync"}),", and ",(0,a.jsx)(n.code,{children:"FULL"})," for ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/node-sync#full-synchronization",children:"full sync"}),"."]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["The default is ",(0,a.jsx)(n.code,{children:"FULL"})," when connecting to a private network by not using the ",(0,a.jsx)(n.a,{href:"#network",children:(0,a.jsx)(n.code,{children:"--network"})})," option and specifying the ",(0,a.jsx)(n.a,{href:"#genesis-file",children:(0,a.jsx)(n.code,{children:"--genesis-file"})})," option."]}),"\n",(0,a.jsxs)(n.li,{children:["The default is ",(0,a.jsx)(n.code,{children:"SNAP"})," when using the ",(0,a.jsx)(n.a,{href:"#network",children:(0,a.jsx)(n.code,{children:"--network"})})," option with named networks, except for the ",(0,a.jsx)(n.code,{children:"dev"})," development network. ",(0,a.jsx)(n.code,{children:"SNAP"})," is also the default if running Besu on the default network (Ethereum Mainnet) by specifying neither ",(0,a.jsx)(n.a,{href:"#network",children:"network"})," nor ",(0,a.jsx)(n.a,{href:"#genesis-file",children:"genesis file"}),"."]}),"\n"]}),"\n",(0,a.jsx)(n.admonition,{title:"Notes",type:"note",children:(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"We recommend using snap sync over fast sync because snap sync can be faster by several days."}),"\n",(0,a.jsx)(n.li,{children:"Fast sync is deprecated in Besu version 24.12.0 and later.\nWe recommend updating Besu to a version that supports other sync methods."}),"\n",(0,a.jsxs)(n.li,{children:["When using a mode other than ",(0,a.jsx)(n.code,{children:"FULL"}),", most historical world state data is unavailable.\nAny methods attempting to access unavailable world state data return ",(0,a.jsx)(n.code,{children:"null"}),"."]}),"\n"]})}),"\n",(0,a.jsxs)(n.admonition,{title:"Early access feature",type:"warning",children:[(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.code,{children:"--Xsnapsync-bft-enabled"})," is an early access feature available in Besu version 24.7.1 and later.\nIt is not stable, so use this option with caution."]}),(0,a.jsxs)(n.p,{children:["Use ",(0,a.jsx)(n.code,{children:"--Xsnapsync-bft-enabled"})," with ",(0,a.jsx)(n.code,{children:"--sync-mode=SNAP"})," to enable snap sync in QBFT and IBFT 2.0 private networks."]})]}),"\n",(0,a.jsx)(n.h3,{id:"target-gas-limit",children:(0,a.jsx)(n.code,{children:"target-gas-limit"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--target-gas-limit=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--target-gas-limit=8000000\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TARGET_GAS_LIMIT=8000000\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'target-gas-limit="8000000"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The gas limit toward which Besu will gradually move on an existing network, if enough miners are in agreement. To change the block gas limit set in the genesis file without creating a new network, use ",(0,a.jsx)(n.code,{children:"target-gas-limit"}),". The gas limit between blocks can change only 1/1024th, so the target tells the block creator how to set the gas limit in its block. If the values are the same or within 1/1024th, Besu sets the limit to the specified value. Otherwise, the limit moves as far as it can within that constraint."]}),"\n",(0,a.jsxs)(n.p,{children:["If a value for ",(0,a.jsx)(n.code,{children:"target-gas-limit"})," is not specified, the block gas limit remains at the value specified in the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/genesis-items#genesis-block-parameters",children:"genesis file"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Use the ",(0,a.jsx)(n.a,{href:"/public-networks/reference/api/#miner_changetargetgaslimit",children:(0,a.jsx)(n.code,{children:"miner_changeTargetGasLimit"})})," API to update the ",(0,a.jsx)(n.code,{children:"target-gas-limit"})," while Besu is running. Alternatively restart Besu with an updated ",(0,a.jsx)(n.code,{children:"target-gas-limit"})," value."]}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool",children:(0,a.jsx)(n.code,{children:"tx-pool"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool=sequenced\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL=sequenced\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'tx-pool="sequenced"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Type of ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool",children:"transaction pool"})," to use.\nSet to ",(0,a.jsx)(n.code,{children:"layered"})," to use the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool#layered-transaction-pool",children:"layered transaction pool"})," implementation.\nThe default is ",(0,a.jsx)(n.code,{children:"layered"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["Set to ",(0,a.jsx)(n.code,{children:"sequenced"})," to use the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool#sequenced-transaction-pool",children:"sequenced transaction pool"}),".\nThe default is ",(0,a.jsx)(n.code,{children:"sequenced"})," for the ",(0,a.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/profile#enterpriseprivate-profile",children:"enterprise/private profile"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-blob-price-bump",children:(0,a.jsx)(n.code,{children:"tx-pool-blob-price-bump"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-blob-price-bump=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-blob-price-bump=25\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL_BLOB_PRICE_BUMP=25\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'tx-pool-blob-price-bump="25"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Sets the price bump policy for re-issued blob transactions as a percentage increase in price.\nA blob transaction can only replace, or be replaced by, another blob transaction.\nThe default is ",(0,a.jsx)(n.code,{children:"100"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-enable-save-restore",children:(0,a.jsx)(n.code,{children:"tx-pool-enable-save-restore"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-enable-save-restore[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-enable-save-restore=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL_ENABLE_SAVE_RESTORE=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"tx-pool-enable-save-restore=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables saving the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool",children:"transaction pool"})," contents to a\nfile on shutdown and reloading it at startup.\nThe default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["You can define a custom path to the transaction pool file using the ",(0,a.jsx)(n.a,{href:"#tx-pool-save-file",children:(0,a.jsx)(n.code,{children:"--tx-pool-save-file"})})," option."]}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-layer-max-capacity",children:(0,a.jsx)(n.code,{children:"tx-pool-layer-max-capacity"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-layer-max-capacity=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-layer-max-capacity=20000000\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL_LAYER_MAX_CAPACITY=20000000\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'tx-pool-layer-max-capacity="20000000"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Maximum amount of memory (in bytes) that any layer within the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool#layered-transaction-pool",children:"layered transaction pool"})," can occupy.\nThe default is ",(0,a.jsx)(n.code,{children:"12500000"}),", or 12.5 MB."]}),"\n",(0,a.jsx)(n.p,{children:"The transaction pool includes two memory-limited layers, resulting in an expected memory consumption\nthat is twice the value specified by this option, or 25 MB by default.\nIncrease this value if you have spare RAM and the eviction rate is high for your network."}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-limit-by-account-percentage",children:(0,a.jsx)(n.code,{children:"tx-pool-limit-by-account-percentage"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-limit-by-account-percentage=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-limit-by-account-percentage=0.1\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL_LIMIT_BY_ACCOUNT_PERCENTAGE=0.1\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"tx-pool-limit-by-account-percentage=0.4\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The maximum percentage of transactions from a single sender kept in the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool",children:"transaction pool"}),".\nAccepted values are in the range ",(0,a.jsx)(n.code,{children:"(0\u20131]"}),".\nThe default is ",(0,a.jsx)(n.code,{children:".001"}),", or 0.1% of transactions from a single sender to be kept in the pool."]}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["With the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool#layered-transaction-pool",children:"layered transaction pool"}),"\nimplementation, this option is not applicable.\nReplace this option with ",(0,a.jsx)(n.a,{href:"#tx-pool-max-future-by-sender",children:(0,a.jsx)(n.code,{children:"--tx-pool-max-future-by-sender"})})," to\nspecify the maximum number of sequential transactions from a single sender kept in the pool."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["The default value is often unsuitable for ",(0,a.jsx)(n.a,{href:"/private-networks/",children:"private networks"}),".\nThis feature mitigates future-nonce transactions from filling the pool without ever being\nexecutable by Besu.\nThis is important for Mainnet, but may cause issues on private networks.\nPlease update this value or set to ",(0,a.jsx)(n.code,{children:"1"})," if you know the nodes gossiping transactions in your network."]}),"\n"]}),"\n"]})}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-max-future-by-sender",children:(0,a.jsx)(n.code,{children:"tx-pool-max-future-by-sender"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-max-future-by-sender=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-max-future-by-sender=250\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL_MAX_FUTURE_BY_SENDER=250\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'tx-pool-max-future-by-sender="250"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The maximum number of sequential transactions from a single sender kept in the\n",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool#layered-transaction-pool",children:"layered transaction pool"}),".\nThe default is ",(0,a.jsx)(n.code,{children:"200"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"Increase this value to allow a single sender to fit more transactions in a single block.\nFor private networks, you can set this in the hundreds or thousands if you want to ensure\ntransactions with large nonce gaps remain in the transaction pool."}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-max-prioritized",children:(0,a.jsx)(n.code,{children:"tx-pool-max-prioritized"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-max-prioritized=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-max-prioritized=1500\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL_MAX_PRIORITIZED=1500\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'tx-pool-max-prioritized="1500"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The maximum number of transactions that are prioritized in the\n",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool#layered-transaction-pool",children:"layered transaction pool"}),".\nThe default is ",(0,a.jsx)(n.code,{children:"2000"}),"."]}),"\n",(0,a.jsx)(n.p,{children:"For private networks, we recommend setting this value to the maximum number of transactions that fit\nin a block in your network."}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-max-prioritized-by-type",children:(0,a.jsx)(n.code,{children:"tx-pool-max-prioritized-by-type"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'--tx-pool-max-prioritized-by-type=["",...]\n'})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'--tx-pool-max-prioritized-by-type=["BLOB=6","FRONTIER=200"]\n'})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'BESU_TX_POOL_MAX_PRIORITIZED_BY_TYPE=["BLOB=6","FRONTIER=200"]\n'})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'tx-pool-max-prioritized-by-type=["BLOB=6","FRONTIER=200"]\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The maximum number of transactions of a specific ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/types",children:"transaction type"})," that are prioritized in the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool#layered-transaction-pool",children:"layered transaction pool"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["This option is mostly useful for tuning the amount of prioritized ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/types#blob-transactions",children:"blob transactions"})," in the transaction pool.\nKeeping the prioritized layer sorted is costly, and only a few blob transactions can fit in a block (currently a maximum of six).\nTuning the maximum number of prioritized transactions by type can help maintain the efficiency and performance of the transaction pool.\nThe default is ",(0,a.jsx)(n.code,{children:"BLOB=6"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-max-size",children:(0,a.jsx)(n.code,{children:"tx-pool-max-size"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-max-size=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-max-size=2000\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL_MAX_SIZE=2000\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'tx-pool-max-size="2000"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The maximum number of transactions kept in the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool",children:"transaction pool"}),".\nThe default is ",(0,a.jsx)(n.code,{children:"4096"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsxs)(n.p,{children:["With the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool#layered-transaction-pool",children:"layered transaction pool"}),"\nimplementation, this option is not applicable because the layered pool is limited by memory size\ninstead of the number of transactions.\nTo configure the maximum memory capacity, use ",(0,a.jsx)(n.a,{href:"#tx-pool-layer-max-capacity",children:(0,a.jsx)(n.code,{children:"--tx-pool-layer-max-capacity"})}),"."]})}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-min-gas-price",children:(0,a.jsx)(n.code,{children:"tx-pool-min-gas-price"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-min-gas-price=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-min-gas-price=2000\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL_MIN_GAS_PRICE=2000\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'tx-pool-min-gas-price="2000"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The minimum gas price, in wei, required for a transaction to be accepted into the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool",children:"transaction pool"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-min-score",children:(0,a.jsx)(n.code,{children:"tx-pool-min-score"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-min-score=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-min-score=-100\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL_MIN_SCORE=-100\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'tx-pool-min-score="-100"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Remove a pending transaction from the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool#penalize-invalid-pending-transactions",children:"layered transaction pool"}),"\nif its score is lower than this value. Accepts a value between ",(0,a.jsx)(n.code,{children:"-128"})," and ",(0,a.jsx)(n.code,{children:"127"}),".\nThe default is ",(0,a.jsx)(n.code,{children:"-128"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["The lowest score a pending transaction can have is ",(0,a.jsx)(n.code,{children:"-128"}),". The default value of ",(0,a.jsx)(n.code,{children:"-128"})," means that pending\ntransactions will not be removed and will remain in the pool with the lowest score, being selected after\nall other pending transactions."]}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-no-local-priority",children:(0,a.jsx)(n.code,{children:"tx-pool-no-local-priority"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-no-local-priority[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-no-local-priority=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL_NO_LOCAL_PRIORITY=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"tx-pool-no-local-priority=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["If this option is set to ",(0,a.jsx)(n.code,{children:"true"}),", senders of transactions submitted via RPC are ",(0,a.jsx)(n.em,{children:"not"})," prioritized over\nremote transactions in the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool",children:"transaction pool"}),".\nThe default is ",(0,a.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-price-bump",children:(0,a.jsx)(n.code,{children:"tx-pool-price-bump"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-price-bump=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-price-bump=25\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL_PRICE_BUMP=25\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"tx-pool-price-bump=25\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The price bump percentage to\n",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool#replacing-transactions-with-the-same-sender-and-nonce",children:"replace an existing transaction in the transaction pool"}),".\nFor networks with a ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool#in-networks-with-a-base-fee-and-priced-gas",children:"base fee and priced gas"}),", the default is ",(0,a.jsx)(n.code,{children:"10"}),", or 10%.\nFor networks with ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool#in-networks-with-zero-base-base-or-free-gas",children:"zero base fee, or free gas"}),", the default is ",(0,a.jsx)(n.code,{children:"0"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-priority-senders",children:(0,a.jsx)(n.code,{children:"tx-pool-priority-senders"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-priority-senders=
[,
,...]\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-priority-senders=0x13003d886a7be927d9451c27eb3bc8d3616e26e9\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL_PRIORITY_SENDERS=0x13003d886a7be927d9451c27eb3bc8d3616e26e9\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'tx-pool-priority-senders="0x13003d886a7be927d9451c27eb3bc8d3616e26e9"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["A comma-separated list of sender addresses to prioritize in the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool",children:"transaction pool"}),".\nTransactions sent from these addresses, from any source, are prioritized and only evicted after all others.\nIf not specified, only senders submitting transactions via RPC have priority (unless\n",(0,a.jsx)(n.a,{href:"#tx-pool-no-local-priority",children:(0,a.jsx)(n.code,{children:"--tx-pool-no-local-priority"})})," is set to ",(0,a.jsx)(n.code,{children:"true"}),")."]}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-retention-hours",children:(0,a.jsx)(n.code,{children:"tx-pool-retention-hours"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-retention-hours=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-retention-hours=5\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL_RETENTION_HOURS=5\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"tx-pool-retention-hours=5\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The maximum period (in hours) to hold pending transactions in the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool",children:"transaction pool"}),".\nThe default is ",(0,a.jsx)(n.code,{children:"13"}),"."]}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsxs)(n.p,{children:["With the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool#layered-transaction-pool",children:"layered transaction pool"}),"\nimplementation, this option is not applicable because old transactions will expire when the memory\ncache is full."]})}),"\n",(0,a.jsx)(n.h3,{id:"tx-pool-save-file",children:(0,a.jsx)(n.code,{children:"tx-pool-save-file"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-save-file=\n"})})}),(0,a.jsx)(r.A,{value:"Example",label:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--tx-pool-save-file=/home/me/me_node/node_txpool.dump\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",label:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_TX_POOL_SAVE_FILE=/home/me/me_node/node_txpool.dump\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",label:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'tx-pool-save-file="/home/me/me_node/node_txpool.dump"\n'})})})]}),"\n",(0,a.jsxs)(n.p,{children:["The path to the file that stores the ",(0,a.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool",children:"transaction pool's"}),"\ncontent if the save and restore functionality is enabled using\n",(0,a.jsx)(n.a,{href:"#tx-pool-enable-save-restore",children:(0,a.jsx)(n.code,{children:"--tx-pool-enable-save-restore"})}),".\nThe file is created on shutdown and reloaded during startup.\nThe default file name is ",(0,a.jsx)(n.code,{children:"txpool.dump"})," in the ",(0,a.jsx)(n.a,{href:"#data-path",children:"data directory"}),"."]}),"\n",(0,a.jsx)(n.h3,{id:"version",children:(0,a.jsx)(n.code,{children:"version"})}),"\n",(0,a.jsx)(i.A,{children:(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"-V, --version\n"})})})}),"\n",(0,a.jsx)(n.p,{children:"Prints version information and exits."}),"\n",(0,a.jsx)(n.h3,{id:"version-compatibility-protection",children:(0,a.jsx)(n.code,{children:"version-compatibility-protection"})}),"\n",(0,a.jsxs)(i.A,{children:[(0,a.jsx)(r.A,{value:"Syntax",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--version-compatibility-protection[=]\n"})})}),(0,a.jsx)(r.A,{value:"Example",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"--version-compatibility-protection=true\n"})})}),(0,a.jsx)(r.A,{value:"Environment variable",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"BESU_VERSION_COMPATIBILITY_PROTECTION=true\n"})})}),(0,a.jsx)(r.A,{value:"Configuration file",children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"version-compatibility-protection=true\n"})})})]}),"\n",(0,a.jsxs)(n.p,{children:["Enables or disables performing version compatibility checks when starting Besu.\nIf set to ",(0,a.jsx)(n.code,{children:"true"}),", it checks that the version of Besu being started is the same\nor later than the version of Besu that previously started with the same data directory."]}),"\n",(0,a.jsxs)(n.p,{children:["The default is ",(0,a.jsx)(n.code,{children:"false"})," for named networks, such as Mainnet or Holesky, and ",(0,a.jsx)(n.code,{children:"true"}),"\nfor non-named networks."]}),"\n",(0,a.jsx)(n.h3,{id:"xhelp",children:(0,a.jsx)(n.code,{children:"Xhelp"})}),"\n",(0,a.jsx)(i.A,{children:(0,a.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"-X, --Xhelp\n"})})})}),"\n",(0,a.jsx)(n.p,{children:"Displays the early access options and their descriptions, and exits."}),"\n",(0,a.jsx)(n.admonition,{type:"caution",children:(0,a.jsx)(n.p,{children:"The displayed options are unstable and may change between releases."})})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(x,{...e})}):x(e)}},19365:(e,n,l)=>{l.d(n,{A:()=>r});l(96540);var a=l(18215);const s={tabItem:"tabItem_Ymn6"};var i=l(74848);function r(e){let{children:n,hidden:l,className:r}=e;return(0,i.jsx)("div",{role:"tabpanel",className:(0,a.A)(s.tabItem,r),hidden:l,children:n})}},11470:(e,n,l)=>{l.d(n,{A:()=>y});var a=l(96540),s=l(18215),i=l(23104),r=l(56347),c=l(205),t=l(57485),o=l(31682),d=l(70679);function h(e){return a.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,a.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function x(e){const{values:n,children:l}=e;return(0,a.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:l,attributes:a,default:s}}=e;return{value:n,label:l,attributes:a,default:s}}))}(l);return function(e){const n=(0,o.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,l])}function p(e){let{value:n,tabValues:l}=e;return l.some((e=>e.value===n))}function u(e){let{queryString:n=!1,groupId:l}=e;const s=(0,r.W6)(),i=function(e){let{queryString:n=!1,groupId:l}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!l)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return l??null}({queryString:n,groupId:l});return[(0,t.aZ)(i),(0,a.useCallback)((e=>{if(!i)return;const n=new URLSearchParams(s.location.search);n.set(i,e),s.replace({...s.location,search:n.toString()})}),[i,s])]}function j(e){const{defaultValue:n,queryString:l=!1,groupId:s}=e,i=x(e),[r,t]=(0,a.useState)((()=>function(e){let{defaultValue:n,tabValues:l}=e;if(0===l.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:l}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${l.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const a=l.find((e=>e.default))??l[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:n,tabValues:i}))),[o,h]=u({queryString:l,groupId:s}),[j,m]=function(e){let{groupId:n}=e;const l=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,i]=(0,d.Dv)(l);return[s,(0,a.useCallback)((e=>{l&&i.set(e)}),[l,i])]}({groupId:s}),b=(()=>{const e=o??j;return p({value:e,tabValues:i})?e:null})();(0,c.A)((()=>{b&&t(b)}),[b]);return{selectedValue:r,selectValue:(0,a.useCallback)((e=>{if(!p({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);t(e),h(e),m(e)}),[h,m,i]),tabValues:i}}var m=l(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=l(74848);function f(e){let{className:n,block:l,selectedValue:a,selectValue:r,tabValues:c}=e;const t=[],{blockElementScrollPositionUntilNextRender:o}=(0,i.a_)(),d=e=>{const n=e.currentTarget,l=t.indexOf(n),s=c[l].value;s!==a&&(o(n),r(s))},h=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const l=t.indexOf(e.currentTarget)+1;n=t[l]??t[0];break}case"ArrowLeft":{const l=t.indexOf(e.currentTarget)-1;n=t[l]??t[t.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":l},n),children:c.map((e=>{let{value:n,label:l,attributes:i}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:a===n?0:-1,"aria-selected":a===n,ref:e=>t.push(e),onKeyDown:h,onClick:d,...i,className:(0,s.A)("tabs__item",b.tabItem,i?.className,{"tabs__item--active":a===n}),children:l??n},n)}))})}function v(e){let{lazy:n,children:l,selectedValue:i}=e;const r=(Array.isArray(l)?l:[l]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===i));return e?(0,a.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==i})))})}function E(e){const n=j(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",b.tabList),children:[(0,g.jsx)(f,{...n,...e}),(0,g.jsx)(v,{...n,...e})]})}function y(e){const n=(0,m.A)();return(0,g.jsx)(E,{...e,children:h(e.children)},String(n))}},28453:(e,n,l)=>{l.d(n,{R:()=>r,x:()=>c});var a=l(96540);const s={},i=a.createContext(s);function r(e){const n=a.useContext(i);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),a.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/76a5e22a.fa0582ac.js b/assets/js/76a5e22a.fa0582ac.js new file mode 100644 index 00000000000..baabde2deea --- /dev/null +++ b/assets/js/76a5e22a.fa0582ac.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[132,5327],{14311:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>t,contentTitle:()=>r,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>i});var c=a(74848),d=a(28453);const s={},r=void 0,l={id:"global/postman",title:"postman",description:"View the Besu JSON-RPC APIs documentation in the Postman format and obtain example requests in multiple coding languages.",source:"@site/docs/global/postman.md",sourceDirName:"global",slug:"/global/postman",permalink:"/global/postman",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/global/postman.md",tags:[],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{}},t={},i=[{value:"Run in Postman",id:"run-in-postman",level:4},{value:"Download collection",id:"download-collection",level:4}];function o(e){const n={a:"a",admonition:"admonition",h4:"h4",img:"img",p:"p",...(0,d.R)(),...e.components};return(0,c.jsxs)(n.admonition,{title:"Besu JSON-RPC APIs documentation in Postman format",type:"info",children:[(0,c.jsxs)(n.p,{children:["View the ",(0,c.jsx)(n.a,{href:"https://www.postman.com/hyperledger/workspace/hyperledger-besu/collection/11610746-f334929f-c8c3-43ed-bb73-69a6f0d728d8",children:"Besu JSON-RPC APIs documentation"})," in the Postman format and obtain example requests in multiple coding languages."]}),(0,c.jsx)(n.h4,{id:"run-in-postman",children:"Run in Postman"}),(0,c.jsx)(n.p,{children:"Click the following button to fork the collection and run requests directly on your local network."}),(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.a,{href:"https://god.gw.postman.com/run-collection/11610746-f334929f-c8c3-43ed-bb73-69a6f0d728d8?action=collection%2Ffork&collection-url=entityId%3D11610746-f334929f-c8c3-43ed-bb73-69a6f0d728d8%26entityType%3Dcollection%26workspaceId%3Dc4b60b6f-9f15-42d0-8327-7ebabca6f0fd#?env%5BBesu%20node%20on%20local%20host%5D=W3sia2V5IjoicnBjLWh0dHAtaG9zdCIsInZhbHVlIjoibG9jYWxob3N0IiwiZW5hYmxlZCI6ZmFsc2V9LHsia2V5IjoicnBjLWh0dHAtcG9ydCIsInZhbHVlIjoiODU0NSIsImVuYWJsZWQiOmZhbHNlfV0=",children:(0,c.jsx)(n.img,{src:"https://run.pstmn.io/button.svg",alt:"Run in Postman"})}),"."]}),(0,c.jsx)(n.h4,{id:"download-collection",children:"Download collection"}),(0,c.jsxs)(n.p,{children:["Alternatively you can ",(0,c.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:a(34705).A+"",children:"download the JSON collection file"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,c.jsx)(n,{...e,children:(0,c.jsx)(o,{...e})}):o(e)}},38456:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>h,contentTitle:()=>i,default:()=>x,frontMatter:()=>t,metadata:()=>o,toc:()=>b});var c=a(74848),d=a(28453),s=a(14311),r=a(11470),l=a(19365);const t={title:"Besu API",sidebar_position:2,description:"Besu JSON-RPC API methods reference",toc_max_heading_level:3,tags:["public networks","private networks"]},i="Besu API methods",o={id:"public-networks/reference/api/index",title:"Besu API",description:"Besu JSON-RPC API methods reference",source:"@site/docs/public-networks/reference/api/index.md",sourceDirName:"public-networks/reference/api",slug:"/public-networks/reference/api/",permalink:"/public-networks/reference/api/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/reference/api/index.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Besu API",sidebar_position:2,description:"Besu JSON-RPC API methods reference",toc_max_heading_level:3,tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Subcommands",permalink:"/public-networks/reference/cli/subcommands"},next:{title:"Objects",permalink:"/public-networks/reference/api/objects"}},h={},b=[...s.toc,{value:"ADMIN methods",id:"admin-methods",level:2},{value:"admin_addPeer",id:"admin_addpeer",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"admin_changeLogLevel",id:"admin_changeloglevel",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"admin_generateLogBloomCache",id:"admin_generatelogbloomcache",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"admin_logsRemoveCache",id:"admin_logsremovecache",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"admin_logsRepairCache",id:"admin_logsrepaircache",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-4",level:4},{value:"admin_nodeInfo",id:"admin_nodeinfo",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-5",level:4},{value:"admin_peers",id:"admin_peers",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-6",level:4},{value:"admin_removePeer",id:"admin_removepeer",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-7",level:4},{value:"DEBUG methods",id:"debug-methods",level:2},{value:"debug_accountAt",id:"debug_accountat",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-8",level:4},{value:"debug_accountRange",id:"debug_accountrange",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-9",level:4},{value:"debug_batchSendRawTransaction",id:"debug_batchsendrawtransaction",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-10",level:4},{value:"debug_getBadBlocks",id:"debug_getbadblocks",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-11",level:4},{value:"debug_getRawBlock",id:"debug_getrawblock",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-12",level:4},{value:"debug_getRawHeader",id:"debug_getrawheader",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-13",level:4},{value:"debug_getRawReceipts",id:"debug_getrawreceipts",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-14",level:4},{value:"debug_getRawTransaction",id:"debug_getrawtransaction",level:3},{value:"Parameters",id:"parameters-15",level:4},{value:"Returns",id:"returns-15",level:4},{value:"debug_metrics",id:"debug_metrics",level:3},{value:"Parameters",id:"parameters-16",level:4},{value:"Returns",id:"returns-16",level:4},{value:"debug_replayBlock",id:"debug_replayblock",level:3},{value:"Parameters",id:"parameters-17",level:4},{value:"Returns",id:"returns-17",level:4},{value:"debug_resyncWorldState",id:"debug_resyncworldstate",level:3},{value:"Parameters",id:"parameters-18",level:4},{value:"Returns",id:"returns-18",level:4},{value:"debug_setHead",id:"debug_sethead",level:3},{value:"Parameters",id:"parameters-19",level:4},{value:"Returns",id:"returns-19",level:4},{value:"debug_standardTraceBlockToFile",id:"debug_standardtraceblocktofile",level:3},{value:"Parameters",id:"parameters-20",level:4},{value:"Returns",id:"returns-20",level:4},{value:"debug_standardTraceBadBlockToFile",id:"debug_standardtracebadblocktofile",level:3},{value:"Parameters",id:"parameters-21",level:4},{value:"Returns",id:"returns-21",level:4},{value:"debug_storageRangeAt",id:"debug_storagerangeat",level:3},{value:"Parameters",id:"parameters-22",level:4},{value:"Returns",id:"returns-22",level:4},{value:"debug_traceTransaction",id:"debug_tracetransaction",level:3},{value:"Parameters",id:"parameters-23",level:4},{value:"Returns",id:"returns-23",level:4},{value:"debug_traceBlock",id:"debug_traceblock",level:3},{value:"Parameters",id:"parameters-24",level:4},{value:"Returns",id:"returns-24",level:4},{value:"debug_traceBlockByHash",id:"debug_traceblockbyhash",level:3},{value:"Parameters",id:"parameters-25",level:4},{value:"Returns",id:"returns-25",level:4},{value:"debug_traceBlockByNumber",id:"debug_traceblockbynumber",level:3},{value:"Parameters",id:"parameters-26",level:4},{value:"Returns",id:"returns-26",level:4},{value:"debug_traceCall",id:"debug_tracecall",level:3},{value:"Parameters",id:"parameters-27",level:4},{value:"Returns",id:"returns-27",level:4},{value:"ETH methods",id:"eth-methods",level:2},{value:"eth_accounts",id:"eth_accounts",level:3},{value:"Parameters",id:"parameters-28",level:4},{value:"Returns",id:"returns-28",level:4},{value:"eth_blobBaseFee",id:"eth_blobbasefee",level:3},{value:"Parameters",id:"parameters-29",level:4},{value:"Returns",id:"returns-29",level:4},{value:"eth_blockNumber",id:"eth_blocknumber",level:3},{value:"Parameters",id:"parameters-30",level:4},{value:"Returns",id:"returns-30",level:4},{value:"eth_call",id:"eth_call",level:3},{value:"Parameters",id:"parameters-31",level:4},{value:"Returns",id:"returns-31",level:4},{value:"eth_chainId",id:"eth_chainid",level:3},{value:"Parameters",id:"parameters-32",level:4},{value:"Returns",id:"returns-32",level:4},{value:"eth_coinbase",id:"eth_coinbase",level:3},{value:"Parameters",id:"parameters-33",level:4},{value:"Returns",id:"returns-33",level:4},{value:"eth_createAccessList",id:"eth_createaccesslist",level:3},{value:"Parameters",id:"parameters-34",level:4},{value:"Returns",id:"returns-34",level:4},{value:"eth_estimateGas",id:"eth_estimategas",level:3},{value:"Parameters",id:"parameters-35",level:4},{value:"Returns",id:"returns-35",level:4},{value:"eth_feeHistory",id:"eth_feehistory",level:3},{value:"Parameters",id:"parameters-36",level:4},{value:"Returns",id:"returns-36",level:4},{value:"eth_gasPrice",id:"eth_gasprice",level:3},{value:"Parameters",id:"parameters-37",level:4},{value:"Returns",id:"returns-37",level:4},{value:"eth_getBalance",id:"eth_getbalance",level:3},{value:"Parameters",id:"parameters-38",level:4},{value:"Returns",id:"returns-38",level:4},{value:"eth_getBlockByHash",id:"eth_getblockbyhash",level:3},{value:"Parameters",id:"parameters-39",level:4},{value:"Returns",id:"returns-39",level:4},{value:"eth_getBlockByNumber",id:"eth_getblockbynumber",level:3},{value:"Parameters",id:"parameters-40",level:4},{value:"Returns",id:"returns-40",level:4},{value:"eth_getBlockReceipts",id:"eth_getblockreceipts",level:3},{value:"Parameters",id:"parameters-41",level:4},{value:"Returns",id:"returns-41",level:4},{value:"eth_getBlockTransactionCountByHash",id:"eth_getblocktransactioncountbyhash",level:3},{value:"Parameters",id:"parameters-42",level:4},{value:"Returns",id:"returns-42",level:4},{value:"eth_getBlockTransactionCountByNumber",id:"eth_getblocktransactioncountbynumber",level:3},{value:"Parameters",id:"parameters-43",level:4},{value:"Returns",id:"returns-43",level:4},{value:"eth_getCode",id:"eth_getcode",level:3},{value:"Parameters",id:"parameters-44",level:4},{value:"Returns",id:"returns-44",level:4},{value:"eth_getFilterChanges",id:"eth_getfilterchanges",level:3},{value:"Parameters",id:"parameters-45",level:4},{value:"Returns",id:"returns-45",level:4},{value:"eth_getFilterLogs",id:"eth_getfilterlogs",level:3},{value:"Parameters",id:"parameters-46",level:4},{value:"Returns",id:"returns-46",level:4},{value:"eth_getLogs",id:"eth_getlogs",level:3},{value:"Parameters",id:"parameters-47",level:4},{value:"Returns",id:"returns-47",level:4},{value:"eth_getMinerDataByBlockHash (Deprecated)",id:"eth_getminerdatabyblockhash-deprecated",level:3},{value:"Parameters",id:"parameters-48",level:4},{value:"Returns",id:"returns-48",level:4},{value:"eth_getMinerDataByBlockNumber",id:"eth_getminerdatabyblocknumber",level:3},{value:"Parameters",id:"parameters-49",level:4},{value:"Returns",id:"returns-49",level:4},{value:"eth_getProof",id:"eth_getproof",level:3},{value:"Parameters",id:"parameters-50",level:4},{value:"Returns",id:"returns-50",level:4},{value:"eth_getStorageAt",id:"eth_getstorageat",level:3},{value:"Parameters",id:"parameters-51",level:4},{value:"Returns",id:"returns-51",level:4},{value:"eth_getTransactionByBlockHashAndIndex",id:"eth_gettransactionbyblockhashandindex",level:3},{value:"Parameters",id:"parameters-52",level:4},{value:"Returns",id:"returns-52",level:4},{value:"eth_getTransactionByBlockNumberAndIndex",id:"eth_gettransactionbyblocknumberandindex",level:3},{value:"Parameters",id:"parameters-53",level:4},{value:"Returns",id:"returns-53",level:4},{value:"eth_getTransactionByHash",id:"eth_gettransactionbyhash",level:3},{value:"Parameters",id:"parameters-54",level:4},{value:"Returns",id:"returns-54",level:4},{value:"eth_getTransactionCount",id:"eth_gettransactioncount",level:3},{value:"Parameters",id:"parameters-55",level:4},{value:"Returns",id:"returns-55",level:4},{value:"eth_getTransactionReceipt",id:"eth_gettransactionreceipt",level:3},{value:"Parameters",id:"parameters-56",level:4},{value:"Returns",id:"returns-56",level:4},{value:"eth_getUncleByBlockHashAndIndex",id:"eth_getunclebyblockhashandindex",level:3},{value:"Parameters",id:"parameters-57",level:4},{value:"Returns",id:"returns-57",level:4},{value:"eth_getUncleByBlockNumberAndIndex",id:"eth_getunclebyblocknumberandindex",level:3},{value:"Parameters",id:"parameters-58",level:4},{value:"Returns",id:"returns-58",level:4},{value:"eth_getUncleCountByBlockHash",id:"eth_getunclecountbyblockhash",level:3},{value:"Parameters",id:"parameters-59",level:4},{value:"Returns",id:"returns-59",level:4},{value:"eth_getUncleCountByBlockNumber",id:"eth_getunclecountbyblocknumber",level:3},{value:"Parameters",id:"parameters-60",level:4},{value:"Returns",id:"returns-60",level:4},{value:"eth_getWork (Deprecated)",id:"eth_getwork-deprecated",level:3},{value:"Parameters",id:"parameters-61",level:4},{value:"Returns",id:"returns-61",level:4},{value:"eth_hashrate (Deprecated)",id:"eth_hashrate-deprecated",level:3},{value:"Parameters",id:"parameters-62",level:4},{value:"Returns",id:"returns-62",level:4},{value:"eth_maxPriorityFeePerGas",id:"eth_maxpriorityfeepergas",level:3},{value:"Parameters",id:"parameters-63",level:4},{value:"Returns",id:"returns-63",level:4},{value:"eth_mining (Deprecated)",id:"eth_mining-deprecated",level:3},{value:"Parameters",id:"parameters-64",level:4},{value:"Returns",id:"returns-64",level:4},{value:"eth_newBlockFilter",id:"eth_newblockfilter",level:3},{value:"Parameters",id:"parameters-65",level:4},{value:"Returns",id:"returns-65",level:4},{value:"eth_newFilter",id:"eth_newfilter",level:3},{value:"Parameters",id:"parameters-66",level:4},{value:"Returns",id:"returns-66",level:4},{value:"eth_newPendingTransactionFilter",id:"eth_newpendingtransactionfilter",level:3},{value:"Parameters",id:"parameters-67",level:4},{value:"Returns",id:"returns-67",level:4},{value:"eth_protocolVersion",id:"eth_protocolversion",level:3},{value:"Parameters",id:"parameters-68",level:4},{value:"Returns",id:"returns-68",level:4},{value:"eth_sendRawTransaction",id:"eth_sendrawtransaction",level:3},{value:"Parameters",id:"parameters-69",level:4},{value:"Returns",id:"returns-69",level:4},{value:"eth_submitHashrate (Deprecated)",id:"eth_submithashrate-deprecated",level:3},{value:"Parameters",id:"parameters-70",level:4},{value:"Returns",id:"returns-70",level:4},{value:"eth_submitWork (Deprecated)",id:"eth_submitwork-deprecated",level:3},{value:"Parameters",id:"parameters-71",level:4},{value:"Returns",id:"returns-71",level:4},{value:"eth_syncing",id:"eth_syncing",level:3},{value:"Parameters",id:"parameters-72",level:4},{value:"Returns",id:"returns-72",level:4},{value:"eth_uninstallFilter",id:"eth_uninstallfilter",level:3},{value:"Parameters",id:"parameters-73",level:4},{value:"Returns",id:"returns-73",level:4},{value:"MINER methods",id:"miner-methods",level:2},{value:"miner_changeTargetGasLimit",id:"miner_changetargetgaslimit",level:3},{value:"Parameters",id:"parameters-74",level:4},{value:"Returns",id:"returns-74",level:4},{value:"miner_getExtraData",id:"miner_getextradata",level:3},{value:"Parameters",id:"parameters-75",level:4},{value:"Returns",id:"returns-75",level:4},{value:"miner_getMinGasPrice",id:"miner_getmingasprice",level:3},{value:"Parameters",id:"parameters-76",level:4},{value:"Returns",id:"returns-76",level:4},{value:"miner_getMinPriorityFee",id:"miner_getminpriorityfee",level:3},{value:"Parameters",id:"parameters-77",level:4},{value:"Returns",id:"returns-77",level:4},{value:"miner_setCoinbase",id:"miner_setcoinbase",level:3},{value:"Parameters",id:"parameters-78",level:4},{value:"Returns",id:"returns-78",level:4},{value:"miner_setExtraData",id:"miner_setextradata",level:3},{value:"Parameters",id:"parameters-79",level:4},{value:"Returns",id:"returns-79",level:4},{value:"miner_setMinGasPrice",id:"miner_setmingasprice",level:3},{value:"Parameters",id:"parameters-80",level:4},{value:"Returns",id:"returns-80",level:4},{value:"miner_setMinPriorityFee",id:"miner_setminpriorityfee",level:3},{value:"Parameters",id:"parameters-81",level:4},{value:"Returns",id:"returns-81",level:4},{value:"miner_start (Deprecated)",id:"miner_start-deprecated",level:3},{value:"Parameters",id:"parameters-82",level:4},{value:"Returns",id:"returns-82",level:4},{value:"miner_stop (Deprecated)",id:"miner_stop-deprecated",level:3},{value:"Parameters",id:"parameters-83",level:4},{value:"Returns",id:"returns-83",level:4},{value:"NET methods",id:"net-methods",level:2},{value:"net_enode",id:"net_enode",level:3},{value:"Parameters",id:"parameters-84",level:4},{value:"Returns",id:"returns-84",level:4},{value:"net_listening",id:"net_listening",level:3},{value:"Parameters",id:"parameters-85",level:4},{value:"Returns",id:"returns-85",level:4},{value:"net_peerCount",id:"net_peercount",level:3},{value:"Parameters",id:"parameters-86",level:4},{value:"Returns",id:"returns-86",level:4},{value:"net_services",id:"net_services",level:3},{value:"Parameters",id:"parameters-87",level:4},{value:"Returns",id:"returns-87",level:4},{value:"net_version",id:"net_version",level:3},{value:"Parameters",id:"parameters-88",level:4},{value:"Returns",id:"returns-88",level:4},{value:"PLUGINS methods",id:"plugins-methods",level:2},{value:"plugins_reloadPluginConfig",id:"plugins_reloadpluginconfig",level:3},{value:"Parameters",id:"parameters-89",level:4},{value:"Returns",id:"returns-89",level:4},{value:"TRACE methods",id:"trace-methods",level:2},{value:"trace_block",id:"trace_block",level:3},{value:"Parameters",id:"parameters-90",level:4},{value:"Returns",id:"returns-90",level:4},{value:"trace_call",id:"trace_call",level:3},{value:"Parameters",id:"parameters-91",level:4},{value:"Returns",id:"returns-91",level:4},{value:"trace_callMany",id:"trace_callmany",level:3},{value:"Parameters",id:"parameters-92",level:4},{value:"Returns",id:"returns-92",level:4},{value:"trace_filter",id:"trace_filter",level:3},{value:"Parameters",id:"parameters-93",level:4},{value:"Returns",id:"returns-93",level:4},{value:"trace_get",id:"trace_get",level:3},{value:"Parameters",id:"parameters-94",level:4},{value:"Returns",id:"returns-94",level:4},{value:"trace_rawTransaction",id:"trace_rawtransaction",level:3},{value:"Parameters",id:"parameters-95",level:4},{value:"Returns",id:"returns-95",level:4},{value:"trace_replayBlockTransactions",id:"trace_replayblocktransactions",level:3},{value:"Parameters",id:"parameters-96",level:4},{value:"Returns",id:"returns-96",level:4},{value:"trace_transaction",id:"trace_transaction",level:3},{value:"Parameters",id:"parameters-97",level:4},{value:"Returns",id:"returns-97",level:4},{value:"TXPOOL methods",id:"txpool-methods",level:2},{value:"txpool_besuPendingTransactions",id:"txpool_besupendingtransactions",level:3},{value:"Parameters",id:"parameters-98",level:4},{value:"Returns",id:"returns-98",level:4},{value:"txpool_besuStatistics",id:"txpool_besustatistics",level:3},{value:"Parameters",id:"parameters-99",level:4},{value:"Returns",id:"returns-99",level:4},{value:"txpool_besuTransactions",id:"txpool_besutransactions",level:3},{value:"Parameters",id:"parameters-100",level:4},{value:"Returns",id:"returns-100",level:4},{value:"WEB3 methods",id:"web3-methods",level:2},{value:"web3_clientVersion",id:"web3_clientversion",level:3},{value:"Parameters",id:"parameters-101",level:4},{value:"Returns",id:"returns-101",level:4},{value:"web3_sha3",id:"web3_sha3",level:3},{value:"Parameters",id:"parameters-102",level:4},{value:"Returns",id:"returns-102",level:4},{value:"Miscellaneous methods",id:"miscellaneous-methods",level:2},{value:"rpc_modules",id:"rpc_modules",level:3},{value:"Parameters",id:"parameters-103",level:4},{value:"Returns",id:"returns-103",level:4}];function f(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.header,{children:(0,c.jsx)(n.h1,{id:"besu-api-methods",children:"Besu API methods"})}),"\n",(0,c.jsx)(n.admonition,{type:"caution",children:(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["This reference contains API methods that apply to both public and private networks. For private-network-specific API methods, see the ",(0,c.jsx)(n.a,{href:"/private-networks/reference/api/",children:"private network API reference"}),"."]}),"\n",(0,c.jsxs)(n.li,{children:["All JSON-RPC HTTP examples use the default host and port endpoint ",(0,c.jsx)(n.code,{children:"http://127.0.0.1:8545"}),". If using the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-host",children:"--rpc-http-host"})," or ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:"--rpc-http-port"})," options, update the endpoint."]}),"\n",(0,c.jsx)(n.li,{children:"Most example requests are made against private networks. Depending on network configuration and activity, your example results might be different."}),"\n"]})}),"\n",(0,c.jsx)(s.default,{}),"\n",(0,c.jsxs)(n.h2,{id:"admin-methods",children:[(0,c.jsx)(n.code,{children:"ADMIN"})," methods"]}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"ADMIN"})," API methods provide administrative functionality to manage your node."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"ADMIN"})," API methods are not enabled by default for JSON-RPC. To enable the ",(0,c.jsx)(n.code,{children:"ADMIN"})," API methods, use the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,c.jsx)(n.code,{children:"--rpc-http-api"})})," or ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,c.jsx)(n.code,{children:"--rpc-ws-api"})})," options."]})}),"\n",(0,c.jsx)(n.h3,{id:"admin_addpeer",children:(0,c.jsx)(n.code,{children:"admin_addPeer"})}),"\n",(0,c.jsxs)(n.p,{children:["Adds a ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/connect/static-nodes",children:"static node"}),"."]}),"\n",(0,c.jsx)(n.admonition,{type:"caution",children:(0,c.jsxs)(n.p,{children:["If connections are timing out, ensure the node ID in the ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," is correct."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"enode"}),": ",(0,c.jsx)(n.em,{children:"string"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," of peer to add"]}),"\n",(0,c.jsx)(n.h4,{id:"returns",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," if peer added or ",(0,c.jsx)(n.code,{children:"false"})," if peer already a ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/connect/static-nodes",children:"static node"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"admin_addPeer","params":["enode://f59c0ab603377b6ec88b89d5bb41b98fc385030ab1e4b03752db6f7dab364559d92c757c13116ae6408d2d33f0138e7812eb8b696b2a22fe3332c4b5127b22a3@127.0.0.1:30304"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"admin_addPeer","params":["enode://f59c0ab603377b6ec88b89d5bb41b98fc385030ab1e4b03752db6f7dab364559d92c757c13116ae6408d2d33f0138e7812eb8b696b2a22fe3332c4b5127b22a3@127.0.0.1:30304"],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"admin_changeloglevel",children:(0,c.jsx)(n.code,{children:"admin_changeLogLevel"})}),"\n",(0,c.jsx)(n.p,{children:"Changes the log level without restarting Besu. You can change the log level for all logs, or you can change the log level for specific packages or classes."}),"\n",(0,c.jsx)(n.p,{children:"You can specify only one log level per RPC call."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-1",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"level"}),": ",(0,c.jsx)(n.em,{children:"string"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#logging",children:"log level"})]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"log_filter"}),": ",(0,c.jsx)(n.em,{children:"array"})," - (optional) packages or classes for which to change the log level"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-1",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - ",(0,c.jsx)(n.code,{children:"Success"})," if the log level has changed, otherwise ",(0,c.jsx)(n.code,{children:"error"})]}),"\n",(0,c.jsxs)(n.p,{children:["The following example changes the debug level for specified classes to ",(0,c.jsx)(n.code,{children:"DEBUG"}),"."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0", "method":"admin_changeLogLevel", "params":["DEBUG", ["org.hyperledger.besu.ethereum.eth.manager","org.hyperledger.besu.ethereum.p2p.rlpx.connections.netty.ApiHandler"]], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0", "method":"admin_changeLogLevel", "params":["DEBUG", ["org.hyperledger.besu.ethereum.eth.manager","org.hyperledger.besu.ethereum.p2p.rlpx.connections.netty.ApiHandler"]], "id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "Success"\n}\n'})})})]}),"\n",(0,c.jsxs)(n.p,{children:["The following example changes the debug level of all logs to ",(0,c.jsx)(n.code,{children:"WARN"}),"."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"admin_changeLogLevel","params":["WARN"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "admin_changeLogLevel",\n "params": ["WARN"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "Success"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"admin_generatelogbloomcache",children:(0,c.jsx)(n.code,{children:"admin_generateLogBloomCache"})}),"\n",(0,c.jsxs)(n.p,{children:["Generates cached log bloom indexes for blocks. APIs such as ",(0,c.jsx)(n.a,{href:"#eth_getlogs",children:(0,c.jsx)(n.code,{children:"eth_getLogs"})})," and ",(0,c.jsx)(n.a,{href:"#eth_getfilterlogs",children:(0,c.jsx)(n.code,{children:"eth_getFilterLogs"})})," use the cache for improved performance."]}),"\n",(0,c.jsx)(n.admonition,{type:"tip",children:(0,c.jsxs)(n.p,{children:["Manually executing ",(0,c.jsx)(n.code,{children:"admin_generateLogBloomCache"})," is not required unless the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#auto-log-bloom-caching-enabled",children:(0,c.jsx)(n.code,{children:"--auto-log-bloom-caching-enabled"})})," command line option is set to false."]})}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsx)(n.p,{children:"Each index file contains 100000 blocks. The last fragment of blocks less than 100000 are not indexed."})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-2",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"startBlock"}),": ",(0,c.jsx)(n.em,{children:"string"})," - block to start generating indexes"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"endBlock"}),": ",(0,c.jsx)(n.em,{children:"string"})," - block to stop generating indexes"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-2",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - log bloom index details:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"startBlock"}),": ",(0,c.jsx)(n.em,{children:"string"})," - starting block for the last requested cache generation"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"endBlock"}),": ",(0,c.jsx)(n.em,{children:"string"})," - ending block for the last requested cache generation"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"currentBlock"}),": ",(0,c.jsx)(n.em,{children:"string"})," - most recent block added to the cache"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"indexing"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - indicates if indexing is in progress"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.em,{children:"boolean"})," - indicates acceptance of the request from this call to generate the cache"]}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"admin_generateLogBloomCache", "params":["0x0", "0x10000"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "admin_generateLogBloomCache",\n "params": ["0x0", "0x10000"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "startBlock": "0x0",\n "endBlock": "0x10000",\n "currentBlock": "0x0",\n "indexing": true,\n "requestAccepted": true\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"admin_logsremovecache",children:(0,c.jsx)(n.code,{children:"admin_logsRemoveCache"})}),"\n",(0,c.jsx)(n.p,{children:"Removes cache files for the specified range of blocks."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-3",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"fromBlock"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the\nstring tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"toBlock"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the\nstring tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n",(0,c.jsxs)(n.p,{children:["You can skip a parameter by using an empty string, ",(0,c.jsx)(n.code,{children:'""'}),". If you specify:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsx)(n.p,{children:"No parameters, the call removes cache files for all blocks."}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:["Only ",(0,c.jsx)(n.code,{children:"fromBlock"}),", the call removes cache files for the specified block."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:["Only ",(0,c.jsx)(n.code,{children:"toBlock"}),", the call removes cache files from the genesis block to the specified block."]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-3",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.code,{children:"Cache Removed"})," status or ",(0,c.jsx)(n.code,{children:"error"}),"."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"admin_logsRemoveCache","params":["1", "100"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "admin_logsRemoveCache",\n "params": ["1", "100"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "Status": "Cache Removed"\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"admin_logsrepaircache",children:(0,c.jsx)(n.code,{children:"admin_logsRepairCache"})}),"\n",(0,c.jsx)(n.p,{children:"Repairs cached logs by fixing all segments starting with the specified block number."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-4",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"startBlock"}),": ",(0,c.jsx)(n.em,{children:"string"})," - decimal index of the starting block to fix; defaults to the head block"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-4",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - status of the repair request; ",(0,c.jsx)(n.code,{children:"Started"})," or ",(0,c.jsx)(n.code,{children:"Already running"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"admin_logsRepairCache","params":["1200"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "admin_logsRepairCache",\n "params": ["1200"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "Status": "Started"\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"admin_nodeinfo",children:(0,c.jsx)(n.code,{children:"admin_nodeInfo"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns networking information about the node. The information includes general information about the node and specific information from each running Ethereum sub-protocol (for example, ",(0,c.jsx)(n.code,{children:"eth"}),")."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-5",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-5",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - node object with the following fields:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"enode"}),": ",(0,c.jsx)(n.em,{children:"string"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," of the node"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"listenAddr"}),": ",(0,c.jsx)(n.em,{children:"string"})," - host and port for the node"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"name"}),": ",(0,c.jsx)(n.em,{children:"string"})," - client name"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"id"}),": ",(0,c.jsx)(n.em,{children:"string"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/node-keys#node-public-key",children:"node public key"})]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"ports"}),": ",(0,c.jsx)(n.em,{children:"object"})," - peer discovery and listening ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/connect/manage-peers#port-configuration",children:"ports"})]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"protocols"}),": ",(0,c.jsx)(n.em,{children:"object"})," - list of objects containing information for each Ethereum sub-protocol"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:["If the node is running locally, the host of the ",(0,c.jsx)(n.code,{children:"enode"})," and ",(0,c.jsx)(n.code,{children:"listenAddr"})," display as ",(0,c.jsx)(n.code,{children:"[::]"})," in the result. When advertising externally, the external address displayed for the ",(0,c.jsx)(n.code,{children:"enode"})," and ",(0,c.jsx)(n.code,{children:"listenAddr"})," is defined by ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat",children:(0,c.jsx)(n.code,{children:"--nat-method"})}),"."]})}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"admin_nodeInfo","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"admin_nodeInfo","params":[],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "enode": "enode://87ec35d558352cc55cd1bf6a472557797f91287b78fe5e86760219124563450ad1bb807e4cc61e86c574189a851733227155551a14b9d0e1f62c5e11332a18a3@[::]:30303",\n "listenAddr": "[::]:30303",\n "name": "besu/v1.0.1-dev-0d2294a5/osx-x86_64/oracle-java-1.8",\n "id": "87ec35d558352cc55cd1bf6a472557797f91287b78fe5e86760219124563450ad1bb807e4cc61e86c574189a851733227155551a14b9d0e1f62c5e11332a18a3",\n "ports": {\n "discovery": 30303,\n "listener": 30303\n },\n "protocols": {\n "eth": {\n "config": {\n "chainId": 2018,\n "homesteadBlock": 0,\n "daoForkBlock": 0,\n "daoForkSupport": true,\n "eip150Block": 0,\n "eip155Block": 0,\n "eip158Block": 0,\n "byzantiumBlock": 0,\n "constantinopleBlock": 0,\n "constantinopleFixBlock": 0,\n "ethash": {\n "fixeddifficulty": 100\n }\n },\n "difficulty": 78536,\n "genesis": "0x43ee12d45470e57c86a0dfe008a5b847af9e372d05e8ba8f01434526eb2bea0f",\n "head": "0xc6677651f16d07ae59cab3a5e1f0b814ed2ec27c00a93297b2aa2e29707844d9",\n "network": 2018\n }\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"admin_peers",children:(0,c.jsx)(n.code,{children:"admin_peers"})}),"\n",(0,c.jsx)(n.p,{children:"Returns networking information about connected remote nodes."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-6",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-6",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of objects returned for each remote node, with the following fields."]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"version"}),": ",(0,c.jsx)(n.em,{children:"string"})," - P2P protocol version"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"name"}),": ",(0,c.jsx)(n.em,{children:"string"})," - client name"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"caps"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," - list of Ethereum sub-protocol capabilities"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"network"}),": ",(0,c.jsx)(n.em,{children:"object"})," - local and remote addresses established at time of bonding with the peer (the remote address might not match the hex value for ",(0,c.jsx)(n.code,{children:"port"}),"; it depends on which node initiated the connection.)"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"port"}),": ",(0,c.jsx)(n.em,{children:"string"})," - port on the remote node on which P2P discovery is listening"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"id"}),": ",(0,c.jsx)(n.em,{children:"string"})," - node public key (excluding the ",(0,c.jsx)(n.code,{children:"0x"})," prefix, the node public key is the ID in the ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," ",(0,c.jsx)(n.code,{children:"enode://@:"}),".)"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"protocols"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/connect/manage-peers#monitor-peer-connections",children:"current state of peer"})," including ",(0,c.jsx)(n.code,{children:"difficulty"})," and ",(0,c.jsx)(n.code,{children:"head"})," (",(0,c.jsx)(n.code,{children:"head"})," is the hash of the highest known block for the peer.)"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"enode"}),": ",(0,c.jsx)(n.em,{children:"string"})," - enode URL of the remote node"]}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"admin_peers","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"admin_peers","params":[],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "version": "0x5",\n "name": "besu/v20.10.4-dev-0905d1b2/osx-x86_64/adoptopenjdk-java-11",\n "caps": ["eth/62", "eth/63", "eth/64", "eth/65", "IBF/1"],\n "network": {\n "localAddress": "192.168.1.229:50115",\n "remoteAddress": "168.61.153.255:40303"\n },\n "port": "0x765f",\n "id": "0xe143eadaf670d49afa3327cae2e655b083f5a89dac037c9af065914a9f8e6bceebcfe7ae2258bd22a9cd18b6a6de07b9790e71de49b78afa456e401bd2fb22fc",\n "protocols": {\n "eth": {\n "difficulty": "0x1ac",\n "head": "0x964090ae9277aef43f47f1b8c28411f162243d523118605f0b1231dbfdf3611a",\n "version": 65\n }\n },\n "enode": "enode://e143eadaf670d49afa3327cae2e655b083f5a89dac037c9af065914a9f8e6bceebcfe7ae2258bd22a9cd18b6a6de07b9790e71de49b78afa456e401bd2fb22fc@127.0.0.1:30303"\n }\n ]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"admin_removepeer",children:(0,c.jsx)(n.code,{children:"admin_removePeer"})}),"\n",(0,c.jsxs)(n.p,{children:["Removes a ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/connect/static-nodes",children:"static node"}),"."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-7",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"enode"}),": ",(0,c.jsx)(n.em,{children:"string"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," of peer to remove"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-7",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," if peer removed or ",(0,c.jsx)(n.code,{children:"false"})," if peer not a ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/connect/static-nodes",children:"static node"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"admin_removePeer","params":["enode://f59c0ab603377b6ec88b89d5bb41b98fc385030ab1e4b03752db6f7dab364559d92c757c13116ae6408d2d33f0138e7812eb8b696b2a22fe3332c4b5127b22a3@127.0.0.1:30304"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"admin_removePeer","params":["enode://f59c0ab603377b6ec88b89d5bb41b98fc385030ab1e4b03752db6f7dab364559d92c757c13116ae6408d2d33f0138e7812eb8b696b2a22fe3332c4b5127b22a3@127.0.0.1:30304"],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h2,{id:"debug-methods",children:[(0,c.jsx)(n.code,{children:"DEBUG"})," methods"]}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"DEBUG"})," API methods allow you to inspect and debug the network. The ",(0,c.jsx)(n.code,{children:"DEBUG"})," API is a more verbose alternative to the ",(0,c.jsxs)(n.a,{href:"#trace-methods",children:[(0,c.jsx)(n.code,{children:"TRACE"})," API"]}),", and its main purpose is compatibility with tools such as ",(0,c.jsx)(n.a,{href:"https://remix.ethereum.org/",children:"Remix"}),". Where these APIs overlap, we recommend using the ",(0,c.jsxs)(n.a,{href:"#trace-methods",children:[(0,c.jsx)(n.code,{children:"TRACE"})," API"]})," for production use over the ",(0,c.jsx)(n.code,{children:"DEBUG"})," API. Specifically, we recommend ",(0,c.jsx)(n.code,{children:"trace_block"})," over ",(0,c.jsx)(n.code,{children:"debug_traceBlock"}),", and ",(0,c.jsx)(n.code,{children:"trace_transaction"})," over ",(0,c.jsx)(n.code,{children:"debug_traceTransaction"}),"."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"DEBUG"})," API methods are not enabled by default for JSON-RPC. To enable the ",(0,c.jsx)(n.code,{children:"DEBUG"})," API methods, use the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,c.jsx)(n.code,{children:"--rpc-http-api"})})," or ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,c.jsx)(n.code,{children:"--rpc-ws-api"})})," options."]})}),"\n",(0,c.jsx)(n.h3,{id:"debug_accountat",children:(0,c.jsx)(n.code,{children:"debug_accountAt"})}),"\n",(0,c.jsx)(n.p,{children:"Returns account information at the specified index of the specified block."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-8",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockHashOrNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - block hash or number at which to retrieve account information"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"txIndex"}),": ",(0,c.jsx)(n.em,{children:"number"})," - transaction index at which to retrieve account information"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"address"}),": ",(0,c.jsx)(n.em,{children:"string"})," - contract or account address for which to retrieve information"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-8",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - account details object with the following fields:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"code"}),": ",(0,c.jsx)(n.em,{children:"data"})," - code for the account. Displays ",(0,c.jsx)(n.code,{children:"0x0"})," if the address is an externally owned account."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"nonce"}),": ",(0,c.jsx)(n.em,{children:"quantity"})," - number of transactions made by the account before this one"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"balance"}),": ",(0,c.jsx)(n.em,{children:"quantity"})," - balance of the account in wei"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"codehash"}),": ",(0,c.jsx)(n.em,{children:"data"})," - code hash for the account"]}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(n.p,{children:["This example uses an externally owned account address for the ",(0,c.jsx)(n.code,{children:"address"})," parameter."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_accountAt","params":["0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6", 0, "0xbcde5374fce5edbc8e2a8697c15331677e6ebf0b"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "debug_accountAt",\n "params": [\n "0xc8df1f061abb4d0c107b2b1a794ade8780b3120e681f723fe55a7be586d95ba6",\n 0,\n "0xbcde5374fce5edbc8e2a8697c15331677e6ebf0b"\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "code": "0x0",\n "nonce": "0x5",\n "balance": "0xad78ebc5ac6200000",\n "codehash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"\n }\n}\n'})})})]}),"\n",(0,c.jsxs)(n.p,{children:["This example uses a contract address for the ",(0,c.jsx)(n.code,{children:"address"})," parameter."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_accountAt","params":["0x2b76b3a2fc44c0e21ea183d06c846353279a7acf12abcc6fb9d5e8fb14ae2f8c", 0, "0x0e0d2c8f7794e82164f11798276a188147fbd415"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "debug_accountAt",\n "params": [\n "0x2b76b3a2fc44c0e21ea183d06c846353279a7acf12abcc6fb9d5e8fb14ae2f8c",\n 0,\n "0x0e0d2c8f7794e82164f11798276a188147fbd415"\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "code": "0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063b27b880414610030575b600080fd5b61004a60048036038101906100459190610108565b61004c565b005b60606000806000604051935036600085376000803686885af490503d9150816000853e806000811461007d57610093565b60008311156100925761012085019350836040525b5b5060008114156100ec578473ffffffffffffffffffffffffffffffffffffffff167f410d96db3f80b0f89b36888c4d8a94004268f8d42309ac39b7bcba706293e099856040516100e3919061016e565b60405180910390a25b5050505050565b60008135905061010281610227565b92915050565b60006020828403121561011e5761011d610211565b5b600061012c848285016100f3565b91505092915050565b600061014082610190565b61014a818561019b565b935061015a8185602086016101de565b61016381610216565b840191505092915050565b600060208201905081810360008301526101888184610135565b905092915050565b600081519050919050565b600082825260208201905092915050565b60006101b7826101be565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60005b838110156101fc5780820151818401526020810190506101e1565b8381111561020b576000848401525b50505050565b600080fd5b6000601f19601f8301169050919050565b610230816101ac565b811461023b57600080fd5b5056fea2646970667358221220fdfb5c371055342507b8fb9ca7b0c234f79819bd5cb05c0d467fb605de979eb564736f6c63430008060033",\n "nonce": "0x1",\n "balance": "0x0",\n "codehash": "0xf5f334d41776ed2828fc910d488a05c57fe7c2352aab2d16e30539d7726e1562"\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_accountrange",children:(0,c.jsx)(n.code,{children:"debug_accountRange"})}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.a,{href:"https://github.com/ethereum/retesteth/wiki/Retesteth-Overview",children:"Retesteth"})," uses ",(0,c.jsx)(n.code,{children:"debug_accountRange"})," to implement debugging."]}),"\n",(0,c.jsx)(n.p,{children:"Returns the accounts for a specified block."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-9",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockHashOrNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - block hash or number at which to retrieve account information"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"txIndex"}),": ",(0,c.jsx)(n.em,{children:"number"})," - transaction index at which to retrieve account information"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"address"}),": ",(0,c.jsx)(n.em,{children:"string"})," - address hash from which to start"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"limit"}),": ",(0,c.jsx)(n.em,{children:"integer"})," - maximum number of account entries to return"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-9",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - account details object with the following fields:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"addressMap"}),": ",(0,c.jsx)(n.em,{children:"map"})," of ",(0,c.jsx)(n.em,{children:"strings"})," to ",(0,c.jsx)(n.em,{children:"strings"})," - map of address hashes and account addresses"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"nextKey"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hash of the next address if any addresses remain in the state, otherwise zero"]}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_accountRange","params":["12345", 0, "0", 5],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "debug_accountRange",\n "params": ["12345", 0, "0", 5],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "addressMap": {\n "0x005e5...86960": "0x0000000000000000000000000000000000000000",\n "0x021fe...6ffe3": "0x0000000000000000000000000000000000000000",\n "0x028e6...ab776": "0x0000000000000000000000000000000000000000",\n "0x02cb5...bc4d8": "0x0000000000000000000000000000000000000000",\n "0x03089...23fd5": "0x0000000000000000000000000000000000000000"\n },\n "nextKey": "0x04242954a5cb9748d3f66bcd4583fd3830287aa585bebd9dd06fa6625976be49"\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_batchsendrawtransaction",children:(0,c.jsx)(n.code,{children:"debug_batchSendRawTransaction"})}),"\n",(0,c.jsxs)(n.p,{children:["Sends a list of ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/send-transactions",children:"signed transactions"}),". This is used to quickly load a network with a lot of transactions. This does the same thing as calling ",(0,c.jsx)(n.a,{href:"#eth_sendrawtransaction",children:(0,c.jsx)(n.code,{children:"eth_sendRawTransaction"})})," multiple times."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-10",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"data"}),": ",(0,c.jsx)(n.em,{children:"string"})," - signed transaction data array"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-10",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - object returned for each transaction, with the following fields:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"index"}),": ",(0,c.jsx)(n.em,{children:"string"})," - index of the transaction in the request parameters array"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"success"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - indicates whether or not the transaction has been added to the transaction pool"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"errorMessage"}),": ",(0,c.jsx)(n.em,{children:"string"})," - (optional) error message"]}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_batchSendRawTransaction","params":["0xf868808203e882520894627306090abab3a6e1400e9345bc60c78a8bef57872386f26fc10000801ba0ac74ecfa0e9b85785f042c143ead4780931234cc9a032fce99fab1f45e0d90faa02fd17e8eb433d4ca47727653232045d4f81322619c0852d3fe8ddcfcedb66a43","0x416","0xf868018203e882520894627306090abab3a6e1400e9345bc60c78a8bef57872386f26fc10000801ca0b24ea1bee8fe36984c36acbf80979a4509f23fc17141851e08d505c0df158aa0a00472a05903d4cd7a811bd4d5c59cc105d93f5943f3393f253e92e65fc36e7ce0","0xf868808203e882520894627306090abab3a6e1400e9345bc60c78a8bef5787470de4df820000801ca0f7936b4de04792e3c65095cfbfd1399d231368f5f05f877588c0c8509f6c98c9a01834004dead527c8da1396eede42e1c60e41f38a77c2fd13a6e495479c729b99"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"debug_batchSendRawTransaction","params":["0xf868808203e882520894627306090abab3a6e1400e9345bc60c78a8bef57872386f26fc10000801ba0ac74ecfa0e9b85785f042c143ead4780931234cc9a032fce99fab1f45e0d90faa02fd17e8eb433d4ca47727653232045d4f81322619c0852d3fe8ddcfcedb66a43","0x416","0xf868018203e882520894627306090abab3a6e1400e9345bc60c78a8bef57872386f26fc10000801ca0b24ea1bee8fe36984c36acbf80979a4509f23fc17141851e08d505c0df158aa0a00472a05903d4cd7a811bd4d5c59cc105d93f5943f3393f253e92e65fc36e7ce0","0xf868808203e882520894627306090abab3a6e1400e9345bc60c78a8bef5787470de4df820000801ca0f7936b4de04792e3c65095cfbfd1399d231368f5f05f877588c0c8509f6c98c9a01834004dead527c8da1396eede42e1c60e41f38a77c2fd13a6e495479c729b99"],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "index": 0,\n "success": true\n },\n {\n "index": 1,\n "success": false,\n "errorMessage": "Invalid raw transaction hex"\n },\n {\n "index": 2,\n "success": true\n },\n {\n "index": 3,\n "success": false,\n "errorMessage": "TRANSACTION_REPLACEMENT_UNDERPRICED"\n }\n ]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_getbadblocks",children:(0,c.jsx)(n.code,{children:"debug_getBadBlocks"})}),"\n",(0,c.jsx)(n.p,{children:"Returns a list of invalid blocks. This is used to detect and analyze consensus flaws."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-11",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-11",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#block-object",children:"block objects"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_getBadBlocks","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"debug_getBadBlocks","params":[],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "block": {\n "number": "0xd",\n "hash": "0x85c2edc1ca74b4863cab46ff6ed4df514a698aa7c29a9bce58742a33af07d7e6",\n "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "parentHash": "0x544a2f7a4c8defc0d8da44aa0c0db7c36b56db2605c01ed266e919e936579d31",\n "nonce": "0x0000000000000000",\n "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "transactionsRoot": "0x02c387e001cbe2a8296bfa2e18afbc3480d0e49588b05556148b0bf7c17dec41",\n "stateRoot": "0x861ab7e868e3c23f84b7c4ed86b52a6a4f063633bc45ef29212c33459df84ea5",\n "receiptsRoot": "0xccd2d33763dc0ac3fe02d4ecbbcd7d2bdc6f57db635ba31007184679303721d7",\n "miner": "0x0000000000000000000000000000000000000000",\n "difficulty": "0x1",\n "totalDifficulty": "0x1",\n "extraData": "0x00000000000000000000000000000000000000000000000000000000000000008c6a091f07e4ba3930f2f5fabbfc5b1c70986319096760ba200a6abc0d30e33c2d501702d1b58d7f75807bdbf981044557628611319121170b96466ec06bb3fd01",\n "size": "0x3a0",\n "gasLimit": "0xffffffffffff",\n "gasUsed": "0x1a488",\n "timestamp": "0x5f5b6824",\n "uncles": [],\n "transactions": [\n {\n "blockHash": "0x85c2edc1ca74b4863cab46ff6ed4df514a698aa7c29a9bce58742a33af07d7e6",\n "blockNumber": "0xd",\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas": "0x1a49e",\n "gasPrice": "0x3e8",\n "hash": "0xdd8cf045113754c306ba9ac8ac8786235e33bc5c087678084ef260a2a583f127",\n "input": "0x608060405234801561001057600080fd5b5060c78061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80636057361d146037578063b05784b8146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b6000805490509056fea26469706673582212208dea039245bf78c381278382d7056eef5083f7d243d8958817ef447e0a403bd064736f6c63430006060033",\n "nonce": "0x0",\n "to": null,\n "transactionIndex": "0x0",\n "value": "0x0",\n "v": "0xf9d",\n "r": "0xa7a15050302ca4b7d3842d35cdd3cbf25b2c48c0c37f96d78beb6a6a6bc4f1c7",\n "s": "0x130d29294b2b6a2b7e89f501eb27772f7abf37bfa28a1ce300daade975589fca"\n }\n ]\n },\n "hash": "0x85c2edc1ca74b4863cab46ff6ed4df514a698aa7c29a9bce58742a33af07d7e6",\n "rlp": "0xf9039df9025ca0544a2f7a4c8defc0d8da44aa0c0db7c36b56db2605c01ed266e919e936579d31a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0861ab7e868e3c23f84b7c4ed86b52a6a4f063633bc45ef29212c33459df84ea5a002c387e001cbe2a8296bfa2e18afbc3480d0e49588b05556148b0bf7c17dec41a0ccd2d33763dc0ac3fe02d4ecbbcd7d2bdc6f57db635ba31007184679303721d7b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010d86ffffffffffff8301a488845f5b6824b86100000000000000000000000000000000000000000000000000000000000000008c6a091f07e4ba3930f2f5fabbfc5b1c70986319096760ba200a6abc0d30e33c2d501702d1b58d7f75807bdbf981044557628611319121170b96466ec06bb3fd01a00000000000000000000000000000000000000000000000000000000000000000880000000000000000f9013af90137808203e88301a49e8080b8e6608060405234801561001057600080fd5b5060c78061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80636057361d146037578063b05784b8146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b6000805490509056fea26469706673582212208dea039245bf78c381278382d7056eef5083f7d243d8958817ef447e0a403bd064736f6c63430006060033820f9da0a7a15050302ca4b7d3842d35cdd3cbf25b2c48c0c37f96d78beb6a6a6bc4f1c7a0130d29294b2b6a2b7e89f501eb27772f7abf37bfa28a1ce300daade975589fcac0"\n },\n {\n "block": {\n "number": "0x8",\n "hash": "0x601a3ae9b6eceb2476d249e1cffe058ba3ff2c9c1b28b1ec7a0259fdd1d90121",\n "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "parentHash": "0x98ae440cd7b904d842daa6c263608969a3c8ce6a9acd6bd1f99b394f5f28a207",\n "nonce": "0x0000000000000000",\n "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "transactionsRoot": "0x8ee998cc699a1f9310a1079458780b3ebee8756f96a0905f5224b89d0eb17486",\n "stateRoot": "0x140a9783291704223eb759e3a0db5471a520d349fc17ac2f77ff8582472e3bac",\n "receiptsRoot": "0x2b5c77f6e7764d2468178fab7253346b9b8bb6a34b63946f6bdc2f5ad398bfc3",\n "miner": "0x0000000000000000000000000000000000000000",\n "difficulty": "0x2",\n "totalDifficulty": "0x2",\n "extraData": "0x00000000000000000000000000000000000000000000000000000000000000004d04551bdd9ae08af1fd661e49d4ab662c98c532c7ec0e4656a27e4de7d330af578ab1e4f5e49e085ff1d78673c7388ed9ccf017fbe89e53066bfa4018142c0701",\n "size": "0x3a0",\n "gasLimit": "0xffffffffffff",\n "gasUsed": "0x1a4c9",\n "timestamp": "0x5f5b6b80",\n "uncles": [],\n "transactions": [\n {\n "blockHash": "0x601a3ae9b6eceb2476d249e1cffe058ba3ff2c9c1b28b1ec7a0259fdd1d90121",\n "blockNumber": "0x8",\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas": "0x1a4c9",\n "gasPrice": "0x3e8",\n "hash": "0x675e336a4281b29c619dfd4ccfbd2f930f3728b20caf9e0067284aa3224e6758",\n "input": "0x608060405234801561001057600080fd5b5060c78061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80636057361d146037578063b05784b8146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b6000805490509056fea26469706673582212208dea039245bf78c381278382d7056eef5083f7d243d8958817ef447e0a403bd064736f6c63430006060033",\n "nonce": "0x0",\n "to": null,\n "transactionIndex": "0x0",\n "value": "0x0",\n "v": "0xf9d",\n "r": "0x2e30624c0305e64812e1d9e325ba6e50410314634b008edcb50f45be71fa0d4",\n "s": "0x50e205faed23c219ba15610de2451d458cbd4221207b2168344cfc972a7973c0"\n }\n ]\n },\n "hash": "0x601a3ae9b6eceb2476d249e1cffe058ba3ff2c9c1b28b1ec7a0259fdd1d90121",\n "rlp": "0xf9039df9025ca098ae440cd7b904d842daa6c263608969a3c8ce6a9acd6bd1f99b394f5f28a207a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347940000000000000000000000000000000000000000a0140a9783291704223eb759e3a0db5471a520d349fc17ac2f77ff8582472e3baca08ee998cc699a1f9310a1079458780b3ebee8756f96a0905f5224b89d0eb17486a02b5c77f6e7764d2468178fab7253346b9b8bb6a34b63946f6bdc2f5ad398bfc3b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020886ffffffffffff8301a4c9845f5b6b80b86100000000000000000000000000000000000000000000000000000000000000004d04551bdd9ae08af1fd661e49d4ab662c98c532c7ec0e4656a27e4de7d330af578ab1e4f5e49e085ff1d78673c7388ed9ccf017fbe89e53066bfa4018142c0701a00000000000000000000000000000000000000000000000000000000000000000880000000000000000f9013af90137808203e88301a4c98080b8e6608060405234801561001057600080fd5b5060c78061001f6000396000f3fe6080604052348015600f57600080fd5b506004361060325760003560e01c80636057361d146037578063b05784b8146062575b600080fd5b606060048036036020811015604b57600080fd5b8101908080359060200190929190505050607e565b005b60686088565b6040518082815260200191505060405180910390f35b8060008190555050565b6000805490509056fea26469706673582212208dea039245bf78c381278382d7056eef5083f7d243d8958817ef447e0a403bd064736f6c63430006060033820f9da002e30624c0305e64812e1d9e325ba6e50410314634b008edcb50f45be71fa0d4a050e205faed23c219ba15610de2451d458cbd4221207b2168344cfc972a7973c0c0"\n }\n ]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_getrawblock",children:(0,c.jsx)(n.code,{children:"debug_getRawBlock"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns the ",(0,c.jsx)(n.a,{href:"https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/",children:"RLP encoding"})," of the specified block."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-12",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the\nstring tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n",(0,c.jsx)(n.h4,{id:"returns-12",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - RLP-encoded ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#block-object",children:"block object"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_getRawBlock","params":["0x32026E"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"debug_getRawBlock","params":["0x32026E"],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0xf96096f90236a09f73691f6dabca4f0a99b05d0a701995506aa311dcaa9ce9833d6f4ca474c162a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794c6e2459991bfe27cca6d86722f35da23a1e4cb97a078103ea8c47231886481d72ec1afae6eeb06c3773ce24a91323d5c9eed69d4cca0008992da2531db404f07b0871dd620a94ba346963e1b1c6dc7b00748e8593a1ea0b6c3890d9604434fc52f722848c84d1770add20cd75bbc28cdedff42940dbb56b90100200800000400000002000e0000000401000000440100000000c0400600000002000801000000040480020840048000000000400000000000000020004220000011002000000000000204000800000010010002000002000000000040a000000000000400020000010885000000000808000000008800001004002010020300005000000010002110410402000000000000000890000008000000000000000000020040000002000000000000810400000040006000004000004080020000000000000022001000000000000840400000000220250000000000080402000420000418000000000000000400040000004080040010200000000000108020020000808332026e8401c9c380833e3c3c846436f93899d883010b05846765746888676f312e32302e32856c696e7578a0112d8f15793e7df7f8dcdb21c891cff78c0d1839cb5b6dcd06116cdbb99536ae88000000000000000008a0cdb97712af6685bb9650d21d609525913293c48adda7c45990926daada335c9bf95c56f8ac82d51f8502540be4008303c9e294a68d4c1e3de1b721ad1356bbf827d6bc8cef304f80b844b1bb4d351300dbc7e12342566318001b83aefc9f20080000f3ef25472407fe9c9c69a1470000000242692bb4cd506c409651ab80eb3acfa54551d3dbc9af4493605d79871ba01e474fb147b16b9538d7a59a57738e406158d9cc306a9062b1b7a9f544c35abfa061aabb714c760f2243a16a024811679d402c8822e8b25dfd0038d84298fb5205b87502f87283aa36a754849502f900849502f9108302222794102554afa6b5dbccc86176faef2b2d854201756e8084e2bc7b43c001a04f2398f24bc950db1f5439de3cf6431ea277236595ae8dc5815c0cc671c9f97ca029898786a59c56f086fc0f7a16859f366cf46084add999fe137cbf43693712e8b87c02f87983aa36a7830293748459682f00850165a0bc008255f094fafb56bb5b37c3b0b0ee9d7c31f018aac91dfb778806f05b59d3b2000080c080a0b069dd8967533a773e592c26b1b36df0793d0b9f6eceba34da246f602c2fae58a002009dab32ab63a25b705d9a00e311f7cd5d85e73f9b2c03ffd0e5135c0bb2c6b89502f89283aa36a7018459682f008459682f0983011fec945b9fedd37f0b92e7e282b19cebcf06f57b77c60480a46a62784200000000000000000000000019a1fcc6fcc5832cd2db7704d75efbc800f5a742c001a0c65eb0e48090a8f8830de47f430b9ad11071a62a5db9555619a990d7e9b81738a05a6e826610a5b2ee529a22942ebcd3abd2a8a10228098c8158380e8fcceb962fb9028002f9027c83aa36a7178459682f008459682f0983017ac9942ab7c0ab9ab47fcf370d13058bfee28f2ec0940c880169964394fc8860b9020496e17852000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000003aa4d7eb55ec2539f5305eb27ea42f6f90f168270000000000000000000000000000000000000000000000000000000000aa36a70000000000000000000000000000000000000000000000000000000000028c5c0000000000000000000000003aa4d7eb55ec2539f5305eb27ea42f6f90f168270000000000000000000000003aa4d7eb55ec2539f5305eb27ea42f6f90f168270000000000000000000000003aa4d7eb55ec2539f5305eb27ea42f6f90f16827000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000650cb3772886000000000000000000000000000000000000000000000000000000000000222e000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c080a004f8666c8e5d0f3c7110994f624d24aa47a1327814289698c3e2777284a5cfdca04ff05f1b8c5beb58972d40e5a7b894d5e28ad2f15a3429c7d2bee6b6a9633730b9019f02f9019b83aa36a70b8459682f008459682f098303644f944284890d4acd0bcb017ece481b96fd4cb457cac88715c0f4db6e0ea0b90124ee1490b20000000000000000000000000000000000000000000000000000000000028c5c0000000000000000000000007847f2e0262512206333ffb200f6d9df2da319d40000000000000000000000001e8c104d068f22d351859cdbfe41a697a98e6ea20000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000222e00000000000000000000000000000000000000000000000000015c0f4db6e0ea00000000000000000000000007847f2e0262512206333ffb200f6d9df2da319d400000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000c080a0e5270f6291acc162885656bedf64fbcb904c41951221dc0cbbbdca03bb33ce43a01f08c7ed3c231403b55f37a157d80e121b653baa810add8c02aea722631450dcb87c02f87983aa36a7830293758459682f00850165a0bc008255f0948d247f4fbbe81429d3d164a5c9ae0063210edbdc8806f05b59d3b2000080c080a0bb83dd6181c9a7ae3069af3bdf1820b5e556eaf99e385b8d7b3571321fb2966ba02ac193773704524adcd02824796df83407a42cdd81e786b591eba43c4ffc6c40b9028002f9027c83aa36a7048459682f008459682f0983017ac9942ab7c0ab9ab47fcf370d13058bfee28f2ec0940c880169964394fc8860b9020496e178520000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000100000000000000000000000062d23ed77d0e5d0205edabe4ce3a27adc49ac6790000000000000000000000000000000000000000000000000000000000aa36a70000000000000000000000000000000000000000000000000000000000028c5c00000000000000000000000062d23ed77d0e5d0205edabe4ce3a27adc49ac67900000000000000000000000062d23ed77d0e5d0205edabe4ce3a27adc49ac67900000000000000000000000062d23ed77d0e5d0205edabe4ce3a27adc49ac679000000000000000000000000000000000000000000000000016345785d8a00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000650cb3772886000000000000000000000000000000000000000000000000000000000000222e000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c001a0fc882968005f717a74a2c2fb345f691091cab084f4bd3934358741807bd5a66ea03f81c68d05d06bf851a6ef5ea6874557a221cbadde24f3fa51f777699b5d2804b8d802f8d583aa36a7822c0b8459682f008459682f098303534f943367dfa11e3148a07c2da773e1f65b155b0abe5680b864ad58bdd100000000000000000000000053844f9577c2334e541aec7df7174ece5df1fcf0000000000000000000000000e9e12c660e77a732940bab3c2cf385c843b834b800000000000000000000000000000000000000000006015d637c177581800000c001a0a292e7723d3c950aa8a557bd91dece34ec527d9efe2cc413d582dcd9fc6bf6eba03386ce6f58e862f329946bf32897f7df5d1c8f818fecfafc1223052fb251d97eb8b602f8b383aa36a7138459682f008459682f09832dc6c094ba175fdab00e7fcf603f43be8f68db7f4de9f3a980b844095ea7b300000000000000000000000084a0cc1ab353da6b7817947f7b116b8ea982c3d20000000000000000000000000000000000000000000000068f365aea1e440000c001a0968ed0274829918071d9cef28e1adbf1fd15ec76e5a4f809971e887b4c9f34b6a001ce26485bc7e3ea71fb99866bd43002b264b2ed80e10850203c2f07b78856bdb87c02f87983aa36a7830293768459682f00850165a0bc008255f0946d3b93db4e4078cf6541a68532d00705d9a4da618806f05b59d3b2000080c080a083c831630788e7ee57c87128d18582e29aa51f1f233e91d916c06d0750578156a0549b5a00477f3fb4d8fbf95ba3a636c3a14ff011c1bbf3a717e00d61735cbf34b87c02f87983aa36a7830293778459682f00850165a0bc008255f0940d3a7d69859a0dd6971d39703b15379e05ae2ec48806f05b59d3b2000080c001a0082660b5db2d3a8a58c0b863673ab27f7cfe4c049dcc52c76a00ab45b0358db5a05a7519a2d399cb534480383ac21262fbde2dd85241495d7832dee8bb02c49c87b87c02f87983aa36a7830293788459682f00850165a0bc008255f0941be13f64a2463fc7a76b4092c53328cc965a77fb8806f05b59d3b2000080c001a0e6ee9b85c3b729518524fdaeb25d47f89f6fc6c4d2c4df707187bef74d73f958a0756bbf4ab119805b77466957b5895c1d5bf422c5f65d8a06f7efd37dcb2c87afb87c02f87983aa36a7830293798459682f00850165a0bc008255f094a90b28fd6f8e46ac668fcb688414184a163e2cd28806f05b59d3b2000080c080a0d394dd43c58591e5dda8a7f3a2f4eae1bfd65655b9e9eec5facc6dcb39aa77baa002eeabf3fe9c0a56eae476d2f6452ea72e63a9c9b1180290b792883258f939f5b8f802f8f583aa36a7830283818459682f008459682f1082962494d0f723c6b2226df56fe41e63b9eaa66eb540bcb880b884abac047b000000000000000000000000000000000000000000000000000000000103e9f0f3471dc445d8f209ef546e0d20eaccc12ed0a5b4100007f57d9bc8638dacaf6480000000000000000000000000000000000000000000000000000000001d209b1ea11d77d1ab457eb3e2954cb2b98e77b5b07e2a4f48507af0adc61329ddc210c001a0efa10ab60f3bd1e7c4a8d52a275a568fbe2f5edc9e1eaf386299577ff9ddbd6ba06e62cf2f66b58f655ddd3eae47ce40408445b086f6ea858edb7bd847ee206207f86f82e6e582014482f618949ebf6b12e7e33b8672788e7b2b3330356f6f2c41880de0b6b3a7640000808401546d72a008d6be7aa21be0a43e08e960620f4c40c44010a743ead9919ef9423863c08b12a06a63a7caae4504ee5528e50387ca09974f7124035328a62d1085da2fee6618f9f86f82e1c382014482f618949c68eb31c4d00b94c3e3d4c2887946f8b076b24c880de0b6b3a7640000808401546d72a0c22d48d72c70ccf0a44d0950daf16741838f9333ee0bc5e05ff02b058da1e010a06a20c9f74cbc14c0d5bf3b3c38d3c33a5ace9194cddc2c533afb16459eaa7647f86f82e4cb82014482f61894d531e7aa3c0bee832aaff22642c7a3128d48a81a880de0b6b3a7640000808401546d72a01dbaeffc8e11964c06a722bae73e35bb5de55b8f959592868f2ff5fc13b69bd3a002acadc04665570a2032cdb616de15bdca79127f21302d62db5baf96ae4734e6f86e830176e381d882520894ad346e81c5b26fe563ab1ba2aa4ff811655882ca872386f26fc10000808401546d72a0b6de11598824e338100d5ebe70c0b0f4d6893fbb36f11ad55cf74b2f43afc5dda05101e65e7e84ea9edba6e5bf1a1e07028ae3fa5213240e812e57cf6b29080726b9235302f9234f83aa36a7830137d564748315f52194ac9251ee97ed8bef31706354310c6b020c35d87b80b922e48ed7b3be000000000000000000000000000000000000000000000000000000000001edc00000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000001fe000000000000000000000000000000000000000000000000000000000000020c00000000000000000000000000000000000000000000000000000000000001f60000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002200000000000000000000000009d69394bd71906a235f9113cc04321f573958d3e00000000000000000000000000000000000000000000000000000000000005200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001edc00000000000000000000000000000000000000000000000000000000000320266d6b1b655f66cf8f99d35432492f8fbedfa97a2a48f0efaae65de6738e2594aa5000000000000000000000000000077770000000000000000000000000000000191c15235c348207e935e72b9151056a9661d73631d1e2c3f89ffddf8e74efe8a42ab8767076a555a049372055c846097c99e69c26ab0a24553d21c15de29ea900000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000030ef2c000000000000000000000000000000000000000000000000000000006436f8d800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d65822107fcfd520000000000000000000000000000000000000000000000000000000000000000ec15abee257256da1a964434000f59ddd45b1ce67d5df44f1c82fd5bfe95c3b31dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493470000000000000000000000000000777700000000000000000000000000000001d4b5b35d93f51c8143f6a4cc3d7b320d37ce03989cd88c28601f4ea94cd6554249cff83e4dd8e99a8ef9004b2ac7518996f4784af1f9e52debb6223a697e9652530feda219f333e01f8cd0b31ee83b9c250ee51fde9718ef5fa305cbcd01901200200100002020000400000280000006004000c0020000000000000000000100000000029000000000000000090000000000008000200040000012004020000800000000240002400008000800000020000000001040000000000040824000000000000002040000400000002000080000000000000804000000001001000c84000208000000000180020000014000000000210100510008000082c0000000001200002000000024000008400000000220001800400000008010000052000200000200028000000000800000040200000110000010000010000001020000210004100002000000000900280000010008001000000018004000000020000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001edc0000000000000000000000000000000000000000000000000000000000034bfbc00000000000000000000000000000000000000000000000000000000002ddb24000000000000000000000000000000000000000000000000000000006436f8d800000000000000000000000000000000000000000000000000000000000002e042ab8767076a555a049372055c846097c99e69c26ab0a24553d21c15de29ea900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000016a000000000000000000000000000000000000000000000000000000000000017e000000000000000000000000000000000000000000000000000000000000016202bf20ff78727f38ef16e03bfb3d4895f35cc626f97ede7cc99f48aeff8661fe32015ea8d62ec7a79e01cd398e85867bafdcf55cb6a7121b6fef097f5f5656a5d11ddf336b6879926ea2ae425e91c748a553c9a496cbe2ab556a91689f75ee2b01ad3c43aa774b50a9d8411a9f65be42d6cde781db1a1949a1e886f868917997b2a7122720155935f15da0807d0054f1a4c3db2a92ec4124bf590ce7a16594f3f1812f260acb049d01ad534a937840a80c0f56fd9a54ca5a8628ed896d14a5f8b2570f5813e35c990656f6300a1a1849429135ada6337646248f6ea03a7f70ac426c1d805216d154ea5a8e5ff953bc04b71b049b4b5bd549b6b0cfa7f8b21dba72a3805c7093d8589f2d4c55b6211441041e8bd7916daed5093fcebd377c31e810a6499e6e26840e3afadc9b339c6abc86b7f89fc3559f4242d373a71389db20219195f6e13069701f6d539dcf63a049726cdd8cadc412d1c43cf3fc0095ae5e2157dc668bdb924d7d7afc2b4632ab8a0e4ef71941a0a6a65645f6cd8570302f90b98bbdd01be238dc07780ee9b93e22ab87f26170d7fc5531347fb9fadcb65dc2ca20442a70be9e785292d533fa9496308a7b1588b50b45c17ea765de525259f036edd3984782399b46793acd5abb9f49e38b309c2363aead57264ac1a44e6432b81127a0bfdc29f01bd04e7db2b2545ed8426d2fe9b3e561793ec8fc875f2a71f31c13d11b94f892bb9f96bd2931b66ffa5e22b104c549e7c0d5010e4e70e271d48c0bd6e4be68c920ea77af85d12eb155d9b25703eabbd0ede1909565a55f11fcba848e01c60438611958101321898e95c8fdc936d31389bdba8073b382e5b1e2cd25993ad31586d7525f165fb25a1cf8c22623f983c025d21f0e52ecfec5f0232a753addaad88340ca39f00e9722f35dd25fbe8fdd8846bfc0288215d0638004009396bfcd5e6eb0c587797ae8297decbca48b02407219b910ce163552ed230438292cec430007886beabe7cdf5c6f9c3740a3dd6c52ba88e6d652ce43f90044193c4a42335291795c2cc160dc68b6225edb425a88d27cae159f77df3a2241fbe809c8f1122d245bf439df0761bec97358b96d6653bc83702b559bde5a2d12f771a2a11bc9dc32580bc3ccf9dfacd0a5379587ac5160b45d333a85cde46810ad2875b406f00438aee245ecc63815528a185e9e2a029147db7fcffcb8875e5259f15c3e467de02e035891b131bc715e54e7e27a7acc437bb9f6f84fa4456aa016b3578a73ed8a4706efb935be8b6abe0697e46d878d9c74e274f2816d2fd88146b316731719e125d227e002af95aa13f468a9bae4ff41a4a6036ee7fc321b3249aed4dfb6e75089ec0656ee4e87e1fffefbd74edf55a20d752a85caccf583c0d9e2ef1040b4d36a8e992ad50ce1c4bd2b300b344ca881725c164886a5f8f18035f6e75e67a3eaa2064fc24ff79897edb624e1a67f34deb414d5efaf4c55d482da108aa2ab7504fd5d7f78d91da5c20230380ec013b910b01a26b8bed8a05a004d52db30b7fb01f16347692e9f19f303f48ea8cbbed2d3a3eb277ddf4e9ed8026af5ce92a618c8942caf28b3249044347e14e5c3c2ed5ec0f9cccf1d11a5b290c00773e12c25feafbcceeb8ae6c25a88c9657c627187af6fe0bfea0b3cc36c908a76f90e965bc4135c8596534f444c91aaaaaa6277985e36248bd53ef0f74f103eeac98ba92c5350e4a0c586c851ad25df982e16b2d408de37c687efc6915a41197df379614aa657ab5100627c47896b51b000cb95505bac77e4e440ecd1fe50252fc98f15ee41cafbf717e144da35f424e141639de04ebe5d333e9df8c06821c689d1ef2abbfd12e8a1edc059a9279db7ff44bac1962b5f7297da5c989528229e98a91a3a2e351f371dfa34d4c3676725baa5fa4696f67f4239b5fe1e3fa351d66aa5a2df992426d94ba049bbb4eea0ab22e3b9a7409f2b6719ede64353f4112e4da3919adc16dcd99c545966256493d2699ae529e365c20515d95c013ba2627576fb75a030ffd25b85ed3fc40dbbedbca54427f8dc2255c16b742b3e2b82e1bb634ae73a402927e6dc424d1908942b9b0f2cc17909ed050defe85d24a1986291facbb4ecf9b7ff66c27f8e771d28ec6866e3d24bc97e7be388013df8ba8f407b9147ed9b3581784003a22eeada55656d2be271afce06ef3fca32ac9b77b4f2420d60e892c95418b2a1b7d3dae2738a073ef105e66c08488e8a91e8ebdb5a10e979611bd29245c13cc4c0f5b33eedc5263edd6c27666e0c3f02161114120230511406f9f82102fd8c37c36d4e383e445df4afc6e7dbaa570cfe05b3f6038ec1b7932b70e7b068a2656173d241e8f20bb6be3a3a3767111aa6f459f84be961c2337f6e03ed3cc6c847a3683894288b471504cbdc43a78f856801a10a87c77322e36e0ca426ec67ad3a2a3b79bc5cb81928a79a67a0fb46bb967cbab73fd36022f92d920204de61717dde6a85b7bcf57584c11ce54ac92998f856bf042a01c5006f155ac97d6757728caceba5530eb745e72277723ad34268b34008a97a27c370e9bc006aeaca4ac36414f35aa41ff400f698623a447c949f7f004f3c3fdb09f2af3c96042e215f0d4bbb23fda72d4f01dd9a55dbdec930919715a23e2cd772a260e2b91324c244d88ce1b83c92dce1aa0e0c255b80ed9325dec0e677563984a1c559ddb4a544eadeb2a38e8ed7736174a30d2bee6e0b65f3766e0b7a4e4d8022dd9f82493a9b1fadd1907147ac29edeb8cf8c7c58fbfa9b82ed3d9f9f05bfc900e52e29a05ca8d445b5245b16928dd61800ebb63933d9c471c2fb38776459641e9debdc606abf6ccfdf8fb41da88ba0745d96fd4557a879fee82e33df32d18b18d7360529f89f3dea680a5cb0c6a7652ee38589e1997f3e64ce4db1d3c04cd628fc0fd6e7ef1944108d48eb742a28467fa4bca693dbc8f923945256da2a83222d172286c82b1949803c54409de4653f258d0cf4266c83d5675ca9b5b3a3fb322b9c493ed7bff0a6165babb19c94d9e2014b13b099f09894fbcf32959b9d4ce71ddf9d24dee8bc40d6be92ee6e1220d84d68ecf1a0424132315c0612802b477b0acabcf346b0ad5ea329ea72f4de7524530bc00ad36baeee835908655faecd350463484d31623127c09c6cec446a9ac9a53cb6841ca2a097ceef88e537e209880ffdcfd5033bc3f5a885c271e41ee332366345fa867780beb3c1d5eaa496ea0908c560e84b404afb45f69169d28348ca20bb4f5693db19304d154f60a91ec4e9255be05739f5dc7e0b420d4bde4b188a8520bf39202f81dd3e2f4adcc6f4b4be16880103e0ab232f509729c91ddf0006d6a099a769b38affb89d7489b3bf261106aec362c77acdbb0a71c3da369067eb0f2ee9866a0bbdc4ee41ae81a88d860f1784565b7b1cdd350e8e12241103ff9d57c86c368775530773bafc058cbcea6309bd6d9c144cf6657cac5084ac5fe63ef038a71b3d79e6b7a32cc70039e182052f5cd5e415128e9ab1f553f13c165ea122d089975c1daf617766e12d9f3abb2501571eefde182b767e4b63568d37a8c553671adcee2ee4c7c6d77493e4599cd70d002a718fe0d7c31b7df3893f8b9993c90d7d55eea1c38292f1eae3a7887cfd182977403d5c029a42809f2c6fb8d04aff1c60106ba36367ecca0699866e5ec922ebaeffc4e624d0cc2c748f9c446da0c293d8ba7a28125145ce0936a2dd47172c4502ccf050145fc0584ad8608ee8f6c34c3e718fa5ca616722c5b3549ddb5e2f6a96e82c3d706bf255afda0272c199da51f9a4a869ce8b164694f6ef7593ce08b4bb0afda822eed4a0a7863f532fc0a22de9de5d3456574021b711c42eb1c9190de35ea592568f8ba5528c0f5fadc38e10b14a89a1e49fba9a76ca2478dcca20f8a3c78bb3e1b9869b7375d0deb87819ce7209ad4d73d84a92d08d23649bb50ecb4a1763050b7860afb055461b3158647b453d7977bddde0fac9415327e7eb2ea373fc8abd6793f576e72a47c92d6f6e19fadfdf2c6912365b74929d9b483c19f5146ac5a8dd943caf50b2e0a95fb19066a63a71862a540b2e41731ea66697094e51d309589ce9d25a37c06c9a12839c4c08a050a3ff9e502514f20d573c610466ac5399e11b0153954428f25d16958ab48614d34f768991f84411c401e6900fb0dfaab4108db0ad42fc9ae0a255e60fa4d92747ddda47d07de9f847e7a2be289798c5d34924aae419abdc41d30fb095c6ccabe5c5d5be73ec6197371ea74e08f0583b21901bd748db5348282cabaf57d883f5c55311f1304d7fcd30a9f0b22f810b1a7f089860e4ca0f23ddce9a23d7167762734b10b995d5bd2cf3b31f8f24b18d0a2f7ce1101d3a32d18988f162e91ac94b0f521f24fa287b0d2b97c408079336b89af9e842cf31886c701018ba98d5b0eb0e6d41b67b499f4c466cb1412db0e5937f7ffa83426c9234c713096444d0fc65d1b45f166e54d2a54bc103de110669fbc34555a6d16714ca37651e976b06a7ee96d80af9ff50162016a998451e2ce5819f3346b1fcdf6fe9ff3ec8420d4860a9980ce28fd8c55660983a3fb02cbedb5c638a49e5cdf0b69b71d78e071f1200608e235e6ed0ee8fea5567be12018bcd026412db0538c28bcd4a9afe799d5c677298646943c4200a039d2fced71d985d188f84dfd3132b6a015c50b8a60d712a97c89e0cd7d3a1740244c1522b117dad1220463f5d4af1004c1a2ad6b5708d7d6b28f8ae1e1e7dd1b2d3798b8c2e27a3559c7202aa268099eb3bbdf7c42d0d20b47e5623dba8e6aa1392ff532113c32bd836f4160abb287aefe648aaff6bb0a23928f580347046b64babf354790704538c6ce83f117ac7e83e1e0f54054466cc82b2144cf135be31f24f1b224e2a956827c303b0d82964e284b968c5ebe97688e49ca793a4aba81a3d36eefd8c12e3ce9409be63c3a308636a7b296b804d8125b4f29068ef44d3f2a3c9eb13e61d6365bb96d6973e88a70757b1d9213511d357d252df58d1e848d534d9517165263e803855e8caf387579f1ff0e7e9c3c8e532a2025d8016b70a45c24a546f0b21acf38d16b27eae6466e22396097090291184a7719beb4a55beb89275c6893e01f2075d3b73e165c39335d34a5aa7b280386e30a6df9ba917e1dc6774e2edaa0c87e8f5fcf89306a6fdbcf8cf52cf25f5df473fe350325d510421546765acd00b34ef53e56b01445deea042282e7d6ce20c8f967204c26bda9f2596fa378dc611091ab6db9e1e8d4e9b5c1cc4c4d6ee2ad82b32d08f8cb5a9dd9b03f7aa754f2738ddf2dc0c3318974ff3810765917c251c74ce3d7132c26b5f2ede12a6f62f2e8ddecd5e0d02f99f2ed8ac15641c586d68e093fbe80cefd6a7dbdac6d43e261160807eb82fc2aea870a22b25148d256a083325a5b97bcf0187f748b6c0a1691867344efdd53809fb9edea57669c33780a4aa9e65149937817d3d845d9fccae1876575d5383d06adeacd0f3371209a30e1a9c98446174b0b98560652d0643f120bdabd5484435871b42ad0ce36aa8330c7edd26e64e89eb84e0c72a2c6e49fb24088ae2bdaf7ef07af9bfe381dd6a9ed430a553de1bad4dcefd5239b389090925a69e44e25800d9fccda11ff4e1e4d3049386397f1145c3595ab5115255bc1c1eabb379a37504eda27b1a103b88ae8f174e1d182e3dfbb0b8317d05d6e08c191661b04537421fd84057a9ff5a6eceb68c5bf1f0e356df6e93d936bb6bdccb42127cba43e7615d522242df13f08e5fa162a641430c1431a7d7181dec65202fb618a690c2bf3361d7dc689d5e4a97a550a9b17c8a5ada8f32db3f774e9ed047c02eb7d1ba7add29fa07ab90f290e77bd91ee9b5208b1fb19a37f29dd1a492fa32156a7d43146a336fe6144d19228f975c54ab304565269124e069e864873c0eef23f2e7b012e84ad0c71d76e1b23b8b9a0a66edcd59f4b203a9773ce26baee206254b49efb10cc48bad814b2e299bd478fd4bd8b1ae2c8bd99070b259a9e204e42fc5f65f9e25cb4e4a1a3b67872314fcaeede2abbbc6978660c3e685f6dccb53160d1f7517bbda54177495c23fcf45cdd66363a70a84f2699e239b5071c9e6cb19069f3e0be9f4390c8028ae9960851e34ea18ff88d36ee826c0a4db4e33e94f0ec6651a728a1a2b0c15b30a1783ad4b1d224d87264779a817d107d40c75b77c25addd7b7d6a8b73b2d551f125daed95786920c4130d2061178604f9604a0e2f1c6cdbf3066fd28bf276ee0aee379bc049bc8eba361f4052bd2a698da312c991015c0fbc43ea1d2e72426279fc5181851a15a2f4883018ab01ff8745625f388f05f5fa9abc5d87a710a1227322626115b60f781f4ddd91e205c1cca582a5e37e005396703375846be4f36fdb76c277dc1a2ff1f183cbafc6db485a562f4d08262a207844a3d12261fa0ac479abca76f417df42b037e611b1b6acfda94d5dacc620c3edf5744db24bcc41ef1722dc0e620f8a35c50585a7cecfc97f05bfec21f919420e62a9c4f28ea9585cc056aee08ed8891d077a9647d9c0b5c3141f8c517f13b05bf0a18b99111d2d6e7b4892e78fab35d882e4e153060f0c44cb946d20ad0897a34d2a24d3800b54acd68fdd797aa362560dcede6d12909948bd6f4726a20142eec9c6b78d224b2c24885490bfb492217c6809e0628164579d2c2c16a90f28aa5393ad44c45d4e1500fccdcc684023d7cac4e2cca889333f048cd9a29de018e958d00553c77c74ab50d974df5f654233fb923e809ef6ceabe6a860386603003cc376e90b8bee74f2477343a5ae923aea4ffe99a91b9d9289ddcc3ca316b026b3d369aca474b7941588fc6e9cb062528b10f13b90dd55afd64f7b0ab79163163ce02aed379af25740ac5e37c5628c0b868b7ccfed0ae521c964846f0287d3006952539b2dffaf891bd01fe98a1685e71536d7f33ae85775d11545eb379e0916be616206968605e5033267f6f79cc651c2ce71a790ae5cef19fea7604e479c0793f82db1f8e85bec40d8c6a2dbc9bf76d02a616aced611ae1a7a3756d87dab2855ca585d0048e1e4222ed9d6fa24e3e13677256fbb9959b965727c192696a11474a7f6a6b6c8efb649b1f601c76576f36996ec7a20eee84208232c20e8502903d4e303e4ad7139c654b7e5d2aa262d75672cbb4f653e62ed8e4d28835f7d6d0efb3f39c40558d9cbf19f250681a5c8a59143fec80d6a69d8a265835d6562ef248fa4ac508bd60c9283f6e731baa786828d0f7a635e1d14a448383c8b0243570df4a42799afe03143c227e3fcf0b1393bdf8bacbd26f1041d5e3112c84755942fac77981fe16f048cd882243a8787b09bdc38847a5a9cc9aaf4d30544181ff014dca8b2892c00a933333df6d8ef79041483f2d8c6416897ae7897ca1da85e8f0a493be4520595cd0dd7d32c87999e703704ba0ac7d8b444dba807746123100e2cf7573843a0a755eebad6045d2970a0ef8c9adddff093e79731d5e506f1c43318fb25144ff5fb63041574e89216ebe0ac75d7dcffc35d095691723493c94dcc11d4480bf3fe7b76ba53cae5b409c002f2d1bb5eab08ac993054ec297543798700fe3e2877a4a0cce53599a66eb4f1fef5cafc774277f0e694ebd7f8748fb5140735282e5e0b9bb35b8aeb098775a33820c9b8decad3ad6ce36f79c347dcc2c60a5442d2eab4368827acae1f0ccd52f0475fab95ac57c3c9d7c2649d355756140d5a1e8c6eab8b67a5c169cb899230c4be1dc702323f2b07ee1fcf5657361e250ccbe93bb403abd857eee4335e454e8485a3b055c908c957dca3f9a288299729216103089910386fb994285602ce12b04be1819a2c80394b2410767d9aabdb591e4c4dcd08d1d5bc1bcb532496ff1fc968ac3ff59bc7266d8ecbb67f34b681331685a99b781c9752dfe83d145bd4f3c8ec634f028e850e246aa81f1d03aef40d000000000000000000000000000000000000000000000000000000000000010cf90109b853f851a0bf32b9037b600aae3ecd3dd1838bc9f18ae1661f615cf3d70bc270b6c31f55fb80808080808080a0a2381991afea644ece5cba0d8d69f838f7b123d2e0057a54509e0c61e8b293028080808080808080b8b2f8b030b8adf8ab8301edbf808303d09094000077770000000000000000000000000000000180b844a0ca2d080000000000000000000000000000000000000000000000000000000000320266d6b1b655f66cf8f99d35432492f8fbedfa97a2a48f0efaae65de6738e2594aa5830518dca079be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798a05f3b41e975b46e86d5365943cfe25ae960fc2c7c1bb4eb0025eac5eb0bc6639c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ebf901e8b853f851a0529f2d89256fc038782a4d70b40bf127de906cbe211e7acaa3e928e0fd5cf11d80808080808080a0b4f4d0be01c65da5308bab41d52d8a7c93a1693c170c44d1f619b8364d40e3428080808080808080b90190f9018d30b90189f901860183039445b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000001000000000000000000000000000000000000000000800000000000000000000000000000000000200000000000000000000000000000000000000001000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000f87cf87a940000777700000000000000000000000000000001f842a058313b60ec6c5bfc381e52f0de3ede0faac3cdffea26f7d6bcc3d09b61018691a00000000000000000000000000000000000000000000000000000000000320266a0d6b1b655f66cf8f99d35432492f8fbedfa97a2a48f0efaae65de6738e2594aa500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000adf8ab8301edbf808303d09094000077770000000000000000000000000000000180b844a0ca2d080000000000000000000000000000000000000000000000000000000000320266d6b1b655f66cf8f99d35432492f8fbedfa97a2a48f0efaae65de6738e2594aa5830518dca079be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798a05f3b41e975b46e86d5365943cfe25ae960fc2c7c1bb4eb0025eac5eb0bc6639c000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000189f901860183039445b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000001000000000000000000000000000000000000000000800000000000000000000000000000000000200000000000000000000000000000000000000001000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000f87cf87a940000777700000000000000000000000000000001f842a058313b60ec6c5bfc381e52f0de3ede0faac3cdffea26f7d6bcc3d09b61018691a00000000000000000000000000000000000000000000000000000000000320266a0d6b1b655f66cf8f99d35432492f8fbedfa97a2a48f0efaae65de6738e2594aa50000000000000000000000000000000000000000000000c080a0ae5e67673b90f2d6802e8dba26aadb2e8b81e059d1611afd1908e743e3c0b75da004886b0ac3a810519aa2395bffdd94fbcfe4a2de989ec95d1aea0fcd09afd931b9235302f9234f83aa36a7830137d664748315f42594ac9251ee97ed8bef31706354310c6b020c35d87b80b922e48ed7b3be000000000000000000000000000000000000000000000000000000000001edc10000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000001fe000000000000000000000000000000000000000000000000000000000000020c00000000000000000000000000000000000000000000000000000000000001f60000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002200000000000000000000000009d69394bd71906a235f9113cc04321f573958d3e00000000000000000000000000000000000000000000000000000000000005200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001edc10000000000000000000000000000000000000000000000000000000000320267dbfbf2c535ffc52117d4cc616b8d97bd07cdd8585ab67d9095c067e9de6d674400000000000000000000000000007777000000000000000000000000000000010012f20d5ba20a09e185d452c999c129d712b83c75480e2e029fc895986d361a781b2045b8b5226f9c1fd712d8b1a5f1faca84f5fcee87a7d1dd2b57f55617df000000000000000000000000000000000000000000000000000000000000016000000000000000000000000000000000000000000000000000000000004f9456000000000000000000000000000000000000000000000000000000006436f8e400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004d65822107fcfd520000000000000000000000000000000000000000000000000000000000000000bbe20eedcc0216c615d3a0550a5507bdb2f9912eba7b608300486e871a4e42491dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934700000000000000000000000000007777000000000000000000000000000000014852ab81d236f35c396d4836a6f82239f5672a4b6136ab9ebdd8669a9f9e831b87a26944e5c04f16b79426135ac11b155922c14178bf3d1ecbb1fb12ccc8119a22df5003de2d5956c745f9e825a8f0ca1bb1e265d4d431781b00765e0fe37280000000000004a00000000000800000020400004002001000000000000000010000000002800000000000100009000000000000a000000050000010004020000000000000000412000008002900000000000000000000000000000000820000000000000002000000400000000000080000000000000800000000001000040c0400000000000000010000000001400000000081000001800800008280000000001200002000000000000008440000000000001000000000004000000000000200200040028000000000000000000200000000000000000010000000020200290004100000000000000902080400010000001000000008000000000020000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001edc100000000000000000000000000000000000000000000000000000000005364e600000000000000000000000000000000000000000000000000000000004456ed000000000000000000000000000000000000000000000000000000006436f8e400000000000000000000000000000000000000000000000000000000000002e0781b2045b8b5226f9c1fd712d8b1a5f1faca84f5fcee87a7d1dd2b57f55617df0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000016a000000000000000000000000000000000000000000000000000000000000017e000000000000000000000000000000000000000000000000000000000000016202bf20ff78727f38ef16e03bfb3d4895f35cc626f97ede7cc99f48aeff8661fe32015ea8d62ec7a79e01cd398e85867bafdcf55cb6a7121b6fef097f5f5656a5d11ddf336b6879926ea2ae425e91c748a553c9a496cbe2ab556a91689f75ee2b01ad3c43aa774b50a9d8411a9f65be42d6cde781db1a1949a1e886f868917997b21ad05b7c1eb0d208d17426c52831c6347a8db75b12bfeb2970c4dc6666e4eba0492d2ec318089b11ee7ec6087ab6a3df335770526cc0c1679b764d847b4ec1e303d400c12e690aa26a3771e5676e7ac95e2dc7a1b33be698f077c598f880d4203defa26ad36b84573e923af347475c7c7671be245e9859ca1db3c047faeee4b1c0e81d8a92915c2b94ff300e18f77f70ffec15631161e0bc3cdc9143c43422c208187652c1ec83c5d282e10587216eaf56689e5fe236f72c13eb9574afabc622a739cefbbe11aaa4e2e3d4c5415818914fe554a07be374f565d9bcebc0134940e8921b87bd4f6b42a6432e6e176be5ec82bb8eb6bdb7e4acc1f1e99725bd3ab2e3fa52e02c2741dfe6eddf5a3846dfd57f6a72e834faa048cb007826a293d9e163d47f9ea635871b25afcc3561dfce77b3a2604b3c8de90aa24916f41aed62d2e0c0d18f9c259bf614f1321c5b7cf7b5bd73cec408dd85f046bf36302e20f3603b7832071796022e893386de4e3b170135a591b1a44117240ba85876dba586b1f31c13d11b94f892bb9f96bd2931b66ffa5e22b104c549e7c0d5010e4e70e271d48c0bd6e4be68c920ea77af85d12eb155d9b25703eabbd0ede1909565a55f12f7e30e74b0329222f6067cad3b4324a80f570506985d729f7780955333f40e615f065023fb607d975d7a2b9f234137e72260d8f6b586baecf42819f8328dfb3304441f2c9e97d1fab9a3625073ac3d2bff6ba2f8d659cbc6f66e8d9afde1ef229ff39bac1ecd65eddc4953e2726a72daefa76f00d58e11c9a9ba3448fbe0d3a03db78d70ed9c574ddc45de5c73efdf3113ee70a4b42cea9884f85c1b995516912800abeb70f3022d5de6d9f49469161a36a6a309099ca43e388908635ed4ae825a14b7cf5213454a1f345497008ed417e5d33ef84c4934368b36f27606072192a1b43396f89647f0541dd25f55b42c5295d3ab2a22355664608b8dfec3c9d76045b27d8c2bdba7f376a44826bbf4044aed0d57068489fd32a2bf52f8613aa150185aafe655d2b86bf8867a6f7728c4133fb95776545b19767a0d7144f60f5ef038eac390d1cac6f9882211d7302137efc82b93b8f9c55db629f47a2c61931c21d01d5ad967c9dc6c1abfd496a74df2ac4714cfb027bc4d8c0153543ca663ded2af64f7396ed3b2ebd1976386814e94b7f7fcc3a19a4dd876288b905c381bc8f008de145083d6404890a863e1af1dd897aeef2516b20df50befb6c708c9728a22cb31d80b0e953aa71230d2462bb0668dd8701e11bc5240d85184f9298e2c5a3257b5dcc3e138df8b7d4162d6253fb5c21a65e952600c8764c613c6f43d22c861d4380cd688c286e9ffad6bb8582421fcab96b075769cf48b3160f056dfac4041b08287533a769bed0f08fdee9a16c5c8f414eb35830793c7b64341fef79dbc529a7b99f85d4e2e88b64954be967c5ee6386f9131b80b454ce70209f78f2101d0ca71da273735bcbcdc5ea5d3d54b607820b9bc852abb1b733cb7bb5018276d30c4c0a7f9ffcd318499a2041043494b82456ca8ac6f07678a8b770329b7c00f31e70e97ce48bc796570be27577e8986ee4c7fa51da44bdecfddfcf18686cbddc02ca206d9132d451ab55cce8069f631412ad2ae02b1a8245d31c0a65854d07370259f632fe253b2412c5a785148248d660d7cb6bef5240749d6ac4a4ac59384b27e7019c6cae15ef7c82e5a952f4da079b6205f9e16f3d3c84e94b490530c5b602d4bf5e9d34f2a785cdb7f7755d6d467a9d88071bbdf8c79195730db7d0b7872cbdcdabab02bd4b8487b726c5ce6492344ae7e900a21893e7b840b46380ba99278ce95322dc23daa97995d1149d425952913428c8ef8659dd2cc2895f12b08e0532a254fd5674fcac1b0992472ef75337d8d77f6fef3720d4b7b17302478c7d2e3b8dec7af4c681aba5e25d8aa3f4382b0082066c3f7a0b4e42c4637df90d9a1e2f3fd1cffa7e0d5577f5da89353521ed02cb1c39eb5746cef10ceb74c3fdba13199b42516ebfe29af40da64ad81b46b7bf04bf25994255c7a51f6839848810025bb52fe7500cf1ef628a07747894e3b73d53e6b2997d0654f1ffd0c070455400fd7e9d670984ac807a0f8131977ed1806fd3c0927c34b7b4dabf011d31e86b1b7932b70e7b068a2656173d241e8f20bb6be3a3a3767111aa6f459f84be961c2337f6e03ed3cc6c847a3683894288b471504cbdc43a78f856801a10a87c77322e36e0ca426ec67ad3a2a3b79bc5cb81928a79a67a0fb46bb967cbab73fd36022f92d920204de61717dde6a85b7bcf57584c11ce54ac92998f856bf042a01c5020d266b1ccea774955484405f58ad161251d879a87c43d5dbaecd976ac5d04dd2586d70031a86b0dcade14028f36a04508494c7a20e98b3b21f7765e7b3ef68f10960709e63eea35a26ff47424e18df8cc271ff3049262c855d6a131695a395f2ba2f1b039012ac8a2abdf6d9f6b0c432f0ae78b9bccb99f89759434477257ce1f44cc61e95b9c9843ec8efb17c640fc4c837ec125fb25323d3f0644615d21721607fee4d68e2dc9bd29f5b13fafe39b0710d0365dccda35e3c937aed1b6949b2a0a7523011eb706357b85e174376ea7cadbd01ed0dd1bc6a8e5a5a11bc6131f0661dd6365b13c6e2de50b98cba1cde58a921d19936c711424eb625b7c35cba01a0f7dfa8d6f86a2a02425ab48e2c28f8f2f61adbb744c221b9c4f35b16c749c227bcee1202e87537c7441f421c855ce87d858a679f09dcf814bfa1f26f7d9ce18f723d2f84d4b25ec60adbb6367e92270836d03c71ed43413767342a4fb8d6801b8755bf65e7947ed4459ad6486fc1cca1f1cc89df3d307f01d8ac68aa1d08d18aa35a46bf245589c599eddc6337e764c36426f7b7f5d2afde0a76fd3aa536d1a165f9f23cfc65866f574f2289aa5be056dd32c72a204ba8328dd9b0b4643790463484d31623127c09c6cec446a9ac9a53cb6841ca2a097ceef88e537e209880ffdcfd5033bc3f5a885c271e41ee332366345fa867780beb3c1d5eaa496ea09160db3fa7477a2fff436ecee95aa2d51ff42ca9d4fcf021b6e501410fd41098a1a8f6021636ece98c27bd74740b7280d3a5e13d9850fcf7f2118c4c91572ba5826fcc4b0837d0b394f6683cba38fa35a5e2bd242041533bd25939cc873d1f5852a2f57cb172eb17c2e3c351240a0b2b334978b90ac18041b09aead26649b1c1c019e41731e77c6b2211d7da94630507bad027561dc625b7e84094378e599a57b09eb32c2a67cf5f2f0bf9250e6da07b165f97dca10517e9f3fe3561d02ec83a722b544bd6e25ef27d9825d13651443c4d984d7e5d0fd70c2a7f983b3ae8c698d27a2a0bf2d35655f477adc99c56f48773922831746f8af58de941a020986ad7c23fb7d31c2f17f305174db26b40447e64c66216dce98e7a8316dd91dee468e602206a4d1d18fa7827f733037fa87dfc9c74c9df0960867087c776382b94db9420a19e5338e17e8a68cb7621f0b56984610bedd3d9b77dc5447cdb129ecc33596079cf206e93904368cae07f0d449e2095f8abd95f26603d2db047647babc8342200be0095aa5489fd18cd00a52f59b70ff04c4b1e572db76d08bad419abbabb00b9e485e3f017807c12b427b5e0e648cf7b16065e313c1c073ce354a5fc6812c02b8d4b6aa1168c575dad9875087fe9f61702309febfb99b895387cc1104c35e123b713019b5e51c320fc2521cdb5cfca20f617773fd46d3872128b87df6f66a21fb3fa16711245ab65eef629c5e6073efaff5b707657f4442f2eb2637fa71000f14fc691a71aacf902c0c1a1a5d7d8d351b8b3cad57acd0a9e47a1abdcaf2b70aed8b7370a6bb2bb4f3d679c4f9793e4b256deefaef1e6dbcdbb648b917e34822d833d2ac1614aebcf360d328d9271f27c52c93de4a9455ce6cd8d2140ebf6b21c9b172cf47556efc5dff9afb913e328a708292bfb65c96d668f4d0b3a9a21b222039156cba9980d6bf11efbd8dd893378e5dc1b323c57d8f702076c22d125d1489bab2553c5521631c35f7b5236007ce8f37012cace78d6eb39718904b5dc31ddcb6f4f175e52bcf6c6008f6f5a572925600194b9af7ae074dbf85119e3afd141b2ff2652a58f043e97f11b77997a9da1c96c18b5254a107f24e997a3ea61c2069b9d04d49bd1bcd2495b19bc71848f28bfb4f0346b682a1b474e040b056e60a32b5e8aa532103101cb45ca41c6a690c8688523b8566d507f29eb44fe2d2490e81f4343ca61c8783b83e40e3ce66532f186e9d09bd2667cf974a763072a910121aa5e86e151d92a868508b680f795bc30b4502769f41e3afef5f321be9ce2f1cff3eb3308d65aa0ed780cc889f605f35eb5e02ba772d08db2579f8561c61fa09a8e23ea1416fb95ca0c7e139ddd16f04b0c872499e44cb5a03868d6c5fa1300c19a96b8586b8f33bd760c6350713696b7d3236acb0eb35bde2e6378e9ef9b117b02290ead7824d42452e332f6ec95a7f871da9ebdf6ad02c959a1a36ba33ff0089a4f5217b7bfa5379a507b1e994fb7b8fef489f1f2cf6fdedf0e530635ef31faaa1a37457c445836376dc5cdefc7770fbbad8c326955655efe4ecde89bd2f1dc62a2551a45206fd7d42605aa1c0fc80476b741bd7df1f0f2db0fc387614240e78427bb3a8cbbaf9bb112da06ea6942335f88c65d42d17816136509ec39b51079b5eb2a8cd15c3d1fbc56dd72c3499c101e2fc9126e8f194c6c8006faef30917c5e535439c6b0d78be52a4d17a3a25d0878649b668db027eecbbafcfac7a612138c77d1511f9cc5e763eaddbad6d9d8770705ef7b4d062b4c6dc72f30d1d272dca8700ae03a4c6d2cc6a0a03f9bfb2615b2b294515ca80827ec9cbaa7746112530f5e70f236a641c05bbc8647dd130f02db3561f9dfaa1d687235bccb0498202af478a6070dfa49df99785a61eb5fe5f18777569c18b08d2042ae8639abbc225b832a2fbcd95ff43a3fee4fb2962983af8304ef995716110a7ad35c538697c109c01c427ca6cefef3a842fcf74b1c49a3f2da88b85fdb1d05e20cd567538942fa2f0ffbb5d2ff73d60d562d9a0a6894bec3d85a709b43e42ab64e2306cb96919e078b899f3155af56390d06ddc662afe8d2c91fc091e2c5cbbfab3fdb3f49423a5a5f7741f2d70c6736adc66e7c2caa89c6bbc678bb4b445a8a63d120867f01f164dc87adc853633ca7bd4b9d585c2a637d1469da612b5210476fc8d66f90029bdbf7fa5eddc8335cd23deb4bb47e1582e64a03dd021292d34435419af80af178cdfab0fb9374fa0fade48108cd3a571b814231784ac37c9f6071fc6ac0bb018595c9d8afbfcd6f31832b2581f7f7ce7c45d22817aab8ac6df0e0995e12dbd1595c3377b707b816c96ceb1893b9e7c747a577bb7540b89eb3ff7cac878a7a121a37b38fcd3248abfd24b50e25948dcaeff8c1c7ab8b745a93adb87cd54fca223dd940ef4d7eca9dd69243c74ea128ed624e52c7a2257f3950d0c7409d665d912495f8a8a2cf2482c1d51cd7793d3d31f32ffc24374d8606daa2a423931d97019ba2fd3ba773645b7fd01cf75e8201dd29f694a72136b585d940bff8867654223c28d0603d85fe4472d93ee30e35f46e27b8f40f9a9ad03992d9ff23305fc062c7d95971baae1ab074df88d41e09ec9752efff012c482e0cf9aea2b78cc26db146a278d584575ed615f5d168e6df7a832322da093f0aea706cee594207427d3005fd910843f3dc54b14f8b187e3b495b7474792743fc2e43f62bbc7fd50a76513f1fa4073b15a42d1e78a708134238f2521c749d086deeef512823b514aa64122b365efd51e11415de40826971c234d571c3e2a0507226c6ccc540e43a9aa32244b29784ac824c20d3d1b72dc7262f61cce4eefbe9a4ea4cb1061e4a71925aa13f31d6ce80bb7c56bf47b91cf107ab17168dd4fb60614757d7c7f4ebe0320692235fb502621ed9b15b9b3fa23aa1bf266a2a2c3f2386b52625e42e0cd85c37319e3266185419bcf6dea997e52ec8fca5887a68530002fcc5b3619e88d4dc9a918cc36bac2416ffa9b9734ac4e67a93a800f36d7aba4ecfed8d65f62cf6ad13d184a8c6406e3ba17b8aee6af0721ed091e1d225d044629a4ef5153c294a3e87e243e03bdcf6eaf7ee56d9d969a1f054d5774a7e2c363b160386b909c89717aa7015385f4ab8b6c97805c12c37d981ca945134cb1306d39a4d136b42c36d8aacd2c37575a11b17fa50ede8072d667f64bb55e3b54aff2c3c61782e442e088db7c1ce62287477132bef00c17e9992dd42f35b5e098eb97724fc4e697d75812635203abe8f96000d9553012be065980fb16d6d1c0c80457585c6eb699b0e8a6e36c1cd518dd1ffc517afcb9114a4ff629d06cd2f0be1495c4ee09243e96529e6c3a228c923ca2a703930ea94f7a5803645324ba9ea1a08e6c3241fe57a80bd24f780566342561189baed15e85ba9257b701d651754ff534e51279961ff379974e34010d80773b169a140e0ee7c5e2c0312c9dee46fb7b309710d448a43805c7eab513e84e346411b7145f77ff4ced7b32eb641528f78d88af0fe88e0840e9c16f2210e18c1da605bb04a4c963441c06fa839f722b0c67345168bc0fbb1c826f20472c7551a1327eae9eddbc24e63814fb81320cbc6f03488d64587f3e5f53c03db02cb15412e622f9ec9944643d4b5530b0cd4d577489d8ee499ecf2b74fb72423412aca8530fe53c3fc584ed8e39f900843ac73e36fb113c343cc197cd689a09e12f29203c1dfe839630f6932f3a29de81ba787f6044e70dff8981b71fe82f8a4d01f45770a53b090026a003b3e639eca0e6a1e5bdd0aad456e89d83012ea1f53e1a5fe848b33528f7195a7b0c36d4315f1b96b62d5603e87a13e12a97ec335e3922d4339d9575cb26d5691da78a738aa5c84aecc22a93033a6912f84360d13e2e23b0185bdc2cd331bd26ababcc91894935db5c7e1800b8a10db884a7614ceea91f38bbf623c5e7e7238eef06cd9fc9e43507c56e8d6212b7d03ef2db0dfceb040c0b206e1b7eee6ae564b15e4c02e9c3e4179d78bc68a9fbc2166cb8458342f218dc631705602b2ef1c6716dbc08f30810c9e2ab3ac7a03e300e9c21cd2a0240025ed5eda13e6daa246241669acfae65302dbca5c579d3b5c3a4c16a976209e22845337f9ca033329f849f3ccebc69ff01b301d99dbe9e79058fade67bf881c70283f41eaca130d1423e733ccd520f26ebbe8d304cbb8fa2f4bf67e2e041e5e90e840d5510d33a9f700219fbead699901ea3b3f8aa3d5ff0c028ceee5b5e711c29e7740bc98f4b78f15f2aa1e01449f1f15e68023861f540d2ae0541273c641914ea0e6abadbb2f11618bb678c8b7abff1f6d4e9f789706cdbd8dcc1acd4bbd506e42e928d134366d3f32d8caa4b86736bb065b1a3f89354835b7ba5ae1e53cc1bd9f5dfa3e0d49c0a0a8d32670c382712e30f8f4cb8fc980785fb6012df752e02c923d3f56f5764a41629646f9fd7641c8365f0917f85a64d0ba36179e2c2b3045d7b3c6ccfdb60cd5c365c43d88e231465c6616f7d2cab0db88cd79268e5ba0cecb98875958ee3827af7842e35d9cc89c3776e5640f2433a6afccf0e6fff9321e31802746639bf2bf77f375dd6799baa184b48815f24d3fca5d534dfe61d1306d15e97d3a320457ddd2239cc52fb31dbf98709cf090ae59afabbda6da75f4e1373a28bcadc2405e0a7f6dbf9a3e26511fc600a496b4623593213283a1fd33f000000000000000000000000000000000000000000000000000000000000010cf90109b853f851a04dd5a916917c46969db2e2093e73972daa52d5582e183eb0bd08362e7aca1dc280808080808080a03605d0d2c4765be29883abb71f1c4b162f9d6786835ccabb068a243ff819909f8080808080808080b8b2f8b030b8adf8ab8301edc0808303d09094000077770000000000000000000000000000000180b844a0ca2d080000000000000000000000000000000000000000000000000000000000320267dbfbf2c535ffc52117d4cc616b8d97bd07cdd8585ab67d9095c067e9de6d6744830518dba079be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798a05a4ba290d849b719839872aa1e6999ee672fff37d450956de85fe07c96f172d2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001ebf901e8b853f851a087eef6c6fab228bc280138441d870592a3910f042806b16f257faf5f1542f9a280808080808080a00ac60a3a5bafa4560edb7bd978a6b8980fa818c5edea7c010986328de4d9b4ba8080808080808080b90190f9018d30b90189f901860183039445b9010000000000000400000000000000000000040000000000000000000000000000000000000000000000000000000100000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000080000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000f87cf87a940000777700000000000000000000000000000001f842a058313b60ec6c5bfc381e52f0de3ede0faac3cdffea26f7d6bcc3d09b61018691a00000000000000000000000000000000000000000000000000000000000320267a0dbfbf2c535ffc52117d4cc616b8d97bd07cdd8585ab67d9095c067e9de6d674400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000adf8ab8301edc0808303d09094000077770000000000000000000000000000000180b844a0ca2d080000000000000000000000000000000000000000000000000000000000320267dbfbf2c535ffc52117d4cc616b8d97bd07cdd8585ab67d9095c067e9de6d6744830518dba079be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798a05a4ba290d849b719839872aa1e6999ee672fff37d450956de85fe07c96f172d2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000189f901860183039445b9010000000000000400000000000000000000040000000000000000000000000000000000000000000000000000000100000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000080000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000f87cf87a940000777700000000000000000000000000000001f842a058313b60ec6c5bfc381e52f0de3ede0faac3cdffea26f7d6bcc3d09b61018691a00000000000000000000000000000000000000000000000000000000000320267a0dbfbf2c535ffc52117d4cc616b8d97bd07cdd8585ab67d9095c067e9de6d67440000000000000000000000000000000000000000000000c080a0d86a71e8e531bae3b2a2e70d98e516ccf31b6583d936ffa31c3772ac265db828a0420f5a8067c7eec5214117647da149eaa4e7c78a10d8ee6fa62001ee1b680f9fb9060002f905fc83aa36a7823d3f647482a9c494bac000000000000000000000000000000000000380b905930001536cb8da3dd105e94414690798c7f100000000057b78da8ccffb3bd38b03c0f12199bb964b426dd6b091efd7dc3ad1a9d321d1713b2ea1189d39280b4791c5c858729090c3b6182ac75951eef74b38191686b35c4669656ca9dc5a0ce7e9399f7efffc03afe7fd6e7485887f6264e97e9856a6978b65c5db3b4ce57cf4812abeba0de10d0d6ee5a2cbc9885a2163a58d1895524adbfd86d795eac74ec74d783b599861bf4b7b3e6daf70b3ae0e5740c88a4dc15b893f76fe074a718bcead52fb2a06d6e5f1cf3ca344ad05dcf5ca10bd9bc2809cd8ecd40a2dd0e03200dadd8f921f0e9953a7e6d8c7dc99e60cf6fe81465175e0cf99b702ac6a13706e64ac349a1119796eb0b6e7d5ae48ad74a5c997d679ef9c637c619587cb98ecf88e620dacdc57701500c74e087533f978831a78bf3857cb6044a8c66e41645cdee74ac7cdac69a8484083eb003827ccfd6b92c77b7097a15f38a419f6f0578f3568465e6fb639f1a8d6e52e9d17a0413100ca8d08b210a2e5adb2bead3dfaada14b2513113802f3996daccac89014dafd1368700300053ad7daeea2a4d4d9e8502aa44337c6ff91165a25de84fe5273b2e5b7f4dda3a0410900125e7778d5c2a59a2ca2ce36bacc9e95812ae1b69a478fc7ecf5ded14b68a80a010d6e03e07137d5de8082773f8a422390cd0a592d81e6e623a42bc69547e6b343e1d9a14e64ac3486116e29a8315486a2324d93d3e33a8344ffdbc2655b76dbf72077e43c13961a6a52f0565f2000881576c7a113e7aa6e9a6ed4679014533f8d1bf80ff44ae5599813e80d2c1f2fd0a03400864952137916724a4504bb118ccaf9236f217a1e43c97e471397a3f86672226dd0e02e00d4dcbfe4dd250a97d0c830b3d93213fd048fed38ea8378018c726be68728e22c687037000e3bb6d2858fba82db877c2e28fa1e2cca4ce57b6bdfdba7513dcd2649da93544083d06f85c8f4d21559e8e7651dcaa0c3aafc4a691fdfb27f2f39ea08ea62feff43cf0d80061500b0b00cb246f3641d83f5c934c477ca641a5c545da8aa0e4662c4c5f26ee70525a04125006cf268fbdcaddb151168bf24d3fa2e09f7445d859ff9e5ba2fe71e7ef8861ba61834a80280ebddf1bc99e8d00ae5d2a0893d64774d4cea1bad7146fc964526b6c4617cd70a68500d00f7e8131b976b9537ab4e2b9c9cf086fcfd82e235cf6c6eabbf8030cc3fd1e395071a840120bfbd7fd4a54397eca0c0f7adc1231dd539950f508f92e237e3aeb91468c38d4083ea0068a89abd38178e2e9f67559758419b6908d48d58967547c9edfe98ba016e050734a809807957936c079272b238748593ee3a73f5c7647d0ece20a5c208769c484474aa2f192b6dcc780a770c9b40b42348219a34a746cb495f3f1efb710a816ac142121461c6f7bf82fb00b0dec5bfbcaa2e32983075c84989e439154bfc7df1d0549680a6c1a4999c18aa010dee074028fcade2995b7daec4562449ccbced0caf7a660f49ac4ea07d485b22348948a0415d001ce8e16f70ca5813141f7f7544586da1364d2f77dd8fbb7cc937c6d46136f93d68f000009a72d59e5a9bdf1de5e60bbb17358bc65e8ff1566fabad6d6eb42ef2781f6d6d40837000bce21c64847942319b4ac1c92b2ee02fe2bfbf43b685908b92a0c3cd25f21641a0417d0084138599419cf73489312bda0d53e1fa748e1f7927380961470ec9fda73b36978c953661c8065aaafe09fb847fb54e35b3c68f771b6953941b2b4e619b486d81761ee187bf828700301cd34529763c60738c12e1ccce6ddff8b8338cda8fda245e5d8d5613d20734408306df96bd65c7b8d5c27299269dd9335ef7cb1f3357145983f365ec2f933686fc6d77d0a01100ca3a3773d3f0a52559ee691776b714fedc8c7b2cd672c7065c295693d0616d37408318007c18e9a9f6e4929e20d8efd4c2428065720ed1938af8e5348c14b373b0a845d1063468d2f96f000000ffff86f9aa5001c001a08f785a1c8e4c549c415dd948da80f86e3aaabc4e7a784604b6362208e0fb6b85a011d366d57b6ad95cda2eb6b618704859b4d433ad7557cad177eff6f6bae578cbc0f90200df8345de7e8203e494e276bc378a527a8792b353cdca5b5e53263dfb9e82168cdf8345de7f8203e594e276bc378a527a8792b353cdca5b5e53263dfb9e82168cdf8345de8082062294388ea662ef2c223ec0b047d41bf3c0f362142ad58212cadf8345de8182062394388ea662ef2c223ec0b047d41bf3c0f362142ad58212cadf8345de828201949425c4a76e7d118705e7ea2e9b7d8c59930d8acd3b8212cadf8345de838201979425c4a76e7d118705e7ea2e9b7d8c59930d8acd3b8212cadf8345de848201999425c4a76e7d118705e7ea2e9b7d8c59930d8acd3b8212cadf8345de8582019a9425c4a76e7d118705e7ea2e9b7d8c59930d8acd3b8212cadf8345de8682019b9425c4a76e7d118705e7ea2e9b7d8c59930d8acd3b8212cadf8345de8782019e9425c4a76e7d118705e7ea2e9b7d8c59930d8acd3b820f08df8345de888201a29425c4a76e7d118705e7ea2e9b7d8c59930d8acd3b820f08df8345de898201a59425c4a76e7d118705e7ea2e9b7d8c59930d8acd3b820f08df8345de8a8201a89425c4a76e7d118705e7ea2e9b7d8c59930d8acd3b820f08df8345de8b8201a99425c4a76e7d118705e7ea2e9b7d8c59930d8acd3b820f08df8345de8c8201aa9425c4a76e7d118705e7ea2e9b7d8c59930d8acd3b820f08df8345de8d8201ac9425c4a76e7d118705e7ea2e9b7d8c59930d8acd3b820f08"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_getrawheader",children:(0,c.jsx)(n.code,{children:"debug_getRawHeader"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns the ",(0,c.jsx)(n.a,{href:"https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/",children:"RLP encoding"})," of the header of specified block."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-13",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the\nstring tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n",(0,c.jsx)(n.h4,{id:"returns-13",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - RLP-encoded block header or ",(0,c.jsx)(n.code,{children:"error"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_getRawHeader","params":["0x32026E"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "debug_getRawHeader",\n "params": ["0x32026E"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0xf90236a09f73691f6dabca4f0a99b05d0a701995506aa311dcaa9ce9833d6f4ca474c162a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794c6e2459991bfe27cca6d86722f35da23a1e4cb97a078103ea8c47231886481d72ec1afae6eeb06c3773ce24a91323d5c9eed69d4cca0008992da2531db404f07b0871dd620a94ba346963e1b1c6dc7b00748e8593a1ea0b6c3890d9604434fc52f722848c84d1770add20cd75bbc28cdedff42940dbb56b90100200800000400000002000e0000000401000000440100000000c0400600000002000801000000040480020840048000000000400000000000000020004220000011002000000000000204000800000010010002000002000000000040a000000000000400020000010885000000000808000000008800001004002010020300005000000010002110410402000000000000000890000008000000000000000000020040000002000000000000810400000040006000004000004080020000000000000022001000000000000840400000000220250000000000080402000420000418000000000000000400040000004080040010200000000000108020020000808332026e8401c9c380833e3c3c846436f93899d883010b05846765746888676f312e32302e32856c696e7578a0112d8f15793e7df7f8dcdb21c891cff78c0d1839cb5b6dcd06116cdbb99536ae88000000000000000008a0cdb97712af6685bb9650d21d609525913293c48adda7c45990926daada335c9b"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_getrawreceipts",children:(0,c.jsx)(n.code,{children:"debug_getRawReceipts"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns the ",(0,c.jsx)(n.a,{href:"https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/",children:"RLP encoding"}),"\nof the transaction receipts of the specified block."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-14",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the\nstring tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n",(0,c.jsx)(n.h4,{id:"returns-14",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - array of RLP-encoded ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-receipt-object",children:"transaction receipts"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_getRawReceipts","params":["0x32026E"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"debug_getRawReceipts","params":["0x32026E"],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "0xf901a60182c70eb9010000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000002000000000000000000000008000000000000000000000000000000000040000000001000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000100000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000002000000000100000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000020000000000000000f89df89b947753cfad258efbc52a9a1452e42ffbce9be486cbf863a0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa00000000000000000000000000828d0386c1122e565f07dd28c7d1340ed5b3315a000000000000000000000000021849e99c31e3113a489d7eb0fd4d8c0edbe47afa00000000000000000000000000000000000000000000000000000000029b92700",\n "0xf901a70183018e1cb9010000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000002000000000000000000000008000000000000000000000000000000000040000000001000000000000000000000000000000000000000000000000010000000000000000000000000000000008000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000002000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000020000000000000000f89df89b947753cfad258efbc52a9a1452e42ffbce9be486cbf863a0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa00000000000000000000000000828d0386c1122e565f07dd28c7d1340ed5b3315a000000000000000000000000069cda9d6cc6ce05982d0b4fdf9480f2991f39b5aa00000000000000000000000000000000000000000000000000000000029b92700"\n ]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_getrawtransaction",children:(0,c.jsx)(n.code,{children:"debug_getRawTransaction"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns the ",(0,c.jsx)(n.a,{href:"https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/",children:"RLP encoding"}),"\nof the specified transaction."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-15",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"transaction"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte transaction hash"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-15",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - RLP-encoded ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-object",children:"transaction object"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_getRawTransaction","params":["0x3a2fd1a5ea9ffee477f449be53a49398533d2c006a5815023920d1c397298df3"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"debug_getRawTransaction","params":["0x3a2fd1a5ea9ffee477f449be53a49398533d2c006a5815023920d1c397298df3"],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0xf8678084342770c182520894658bdf435d810c91414ec09147daa6db624063798203e880820a95a0af5fc351b9e457a31f37c84e5cd99dd3c5de60af3de33c6f4160177a2c786a60a0201da7a21046af55837330a2c52fc1543cd4d9ead00ddf178dd96935b607ff9b"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_metrics",children:(0,c.jsx)(n.code,{children:"debug_metrics"})}),"\n",(0,c.jsx)(n.p,{children:"Returns metrics providing information on the internal operation of Besu."}),"\n",(0,c.jsx)(n.p,{children:"The available metrics might change over time. The JVM metrics might vary based on the JVM implementation used."}),"\n",(0,c.jsx)(n.p,{children:"The metric types are:"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsx)(n.p,{children:"Timer"}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsx)(n.p,{children:"Counter"}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsx)(n.p,{children:"Gauge"}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-16",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-16",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - metrics object"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_metrics","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "debug_metrics", "params": [], "id": 1 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "jvm": {\n "memory_bytes_init": {\n "heap": 268435456,\n "nonheap": 2555904\n },\n "threads_current": 41,\n "memory_bytes_used": {\n "heap": 696923976,\n "nonheap": 63633456\n },\n "memory_pool_bytes_used": {\n "PS Eden Space": 669119360,\n "Code Cache": 19689024,\n "Compressed Class Space": 4871144,\n "PS Survivor Space": 2716320,\n "PS Old Gen": 25088296,\n "Metaspace": 39073288\n },\n ...\n },\n "process": {\n "open_fds": 546,\n "cpu_seconds_total": 67.148992,\n "start_time_seconds": 1543897699.589,\n "max_fds": 10240\n },\n "rpc": {\n "request_time": {\n "debug_metrics": {\n "bucket": {\n "+Inf": 2,\n "0.01": 1,\n "0.075": 2,\n "0.75": 2,\n "0.005": 1,\n "0.025": 2,\n "0.1": 2,\n "1.0": 2,\n "0.05": 2,\n "10.0": 2,\n "0.25": 2,\n "0.5": 2,\n "5.0": 2,\n "2.5": 2,\n "7.5": 2\n },\n "count": 2,\n "sum": 0.015925392\n }\n }\n },\n "blockchain": {\n "difficulty_total": 3533501,\n "announcedBlock_ingest": {\n "bucket": {\n "+Inf": 0,\n "0.01": 0,\n "0.075": 0,\n "0.75": 0,\n "0.005": 0,\n "0.025": 0,\n "0.1": 0,\n "1.0": 0,\n "0.05": 0,\n "10.0": 0,\n "0.25": 0,\n "0.5": 0,\n "5.0": 0,\n "2.5": 0,\n "7.5": 0\n },\n "count": 0,\n "sum": 0\n },\n "height": 1908793\n },\n "peers": {\n "disconnected_total": {\n "remote": {\n "SUBPROTOCOL_TRIGGERED": 5\n },\n "local": {\n "TCP_SUBSYSTEM_ERROR": 1,\n "SUBPROTOCOL_TRIGGERED": 2,\n "USELESS_PEER": 3\n }\n },\n "peer_count_current": 2,\n "connected_total": 10\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_replayblock",children:(0,c.jsx)(n.code,{children:"debug_replayBlock"})}),"\n",(0,c.jsx)(n.p,{children:"Re-imports the block matching the specified block number, by rolling the head of the local chain back to the block right before the specified block, then importing the specified block."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-17",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the\nstring tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n",(0,c.jsx)(n.h4,{id:"returns-17",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - ",(0,c.jsx)(n.code,{children:"Success"})," or ",(0,c.jsx)(n.code,{children:"error"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_replayBlock","params":["0x1"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "debug_replayBlock", "params": ["0x1"], "id": 1 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "Success"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_resyncworldstate",children:(0,c.jsx)(n.code,{children:"debug_resyncWorldState"})}),"\n",(0,c.jsx)(n.p,{children:"Triggers a re-synchronization of the world state while retaining imported blocks. This is useful if there are world state database inconsistencies (for example, Bonsai database issues)."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-18",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-18",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - ",(0,c.jsx)(n.code,{children:"Success"})," or ",(0,c.jsx)(n.code,{children:"error"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_resyncWorldState","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "debug_resyncWorldState", "params": [], "id": 1 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "Success"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_sethead",children:(0,c.jsx)(n.code,{children:"debug_setHead"})}),"\n",(0,c.jsx)(n.p,{children:"Sets the current head of the local chain to the block matching the specified block number."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-19",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the\nstring tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n",(0,c.jsx)(n.h4,{id:"returns-19",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - ",(0,c.jsx)(n.code,{children:"Success"})," or ",(0,c.jsx)(n.code,{children:"error"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_setHead","params":["0x1"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "debug_setHead", "params": ["0x1"], "id": 1 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "Success"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_standardtraceblocktofile",children:(0,c.jsx)(n.code,{children:"debug_standardTraceBlockToFile"})}),"\n",(0,c.jsx)(n.p,{children:"Generates files containing the block trace. A separate file is generated for each transaction in the block."}),"\n",(0,c.jsx)(n.p,{children:"You can also specify a trace file for a specific transaction in a block."}),"\n",(0,c.jsxs)(n.p,{children:["Use ",(0,c.jsx)(n.a,{href:"#debug_standardtracebadblocktofile",children:(0,c.jsx)(n.code,{children:"debug_standardTraceBadBlockToFile"})})," to view the trace for an invalid block."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-20",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockHash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - block hash"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"txHash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - (optional) transaction hash; if omitted, a trace file is generated for each transaction in the block."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableMemory"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - (optional) specifies whether to capture EVM memory during the trace; defaults to ",(0,c.jsx)(n.code,{children:"true"})]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-20",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - location of the generated trace files"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_standardTraceBlockToFile","params":["0x2dc0b6c43144e314a86777b4bd4f987c0790a6a0b21560671d221ed81a23f2dc", {\n"txHash": "0x4ff04c4aec9517721179c8dd435f47fbbfc2ed26cd4926845ab687420d5580a6", "disableMemory": false}], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "debug_standardTraceBlockToFile",\n "params": [\n "0x2dc0b6c43144e314a86777b4bd4f987c0790a6a0b21560671d221ed81a23f2dc",\n {\n "txHash": "0x4ff04c4aec9517721179c8dd435f47fbbfc2ed26cd4926845ab687420d5580a6",\n "disableMemory": false\n }\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "/Users/me/mynode/holesky/data/traces/block_0x2dc0b6c4-4-0x4ff04c4a-1612820117332"\n ]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_standardtracebadblocktofile",children:(0,c.jsx)(n.code,{children:"debug_standardTraceBadBlockToFile"})}),"\n",(0,c.jsx)(n.p,{children:"Generates files containing the block trace of invalid blocks. A separate file is generated for each transaction in the block."}),"\n",(0,c.jsxs)(n.p,{children:["Use ",(0,c.jsx)(n.a,{href:"#debug_standardtraceblocktofile",children:(0,c.jsx)(n.code,{children:"debug_standardTraceBlockToFile"})})," to view the trace for a valid block."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-21",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockHash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - block hash"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-21",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - location of the generated trace files"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_standardTraceBadBlockToFile","params":["0x53741e9e94791466d117c5f9e41a2ed1de3f73d39920c621dfc2f294e7779baa"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "debug_standardTraceBadBlockToFile",\n "params": [\n "0x53741e9e94791466d117c5f9e41a2ed1de3f73d39920c621dfc2f294e7779baa"\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "/Users/me/mynode/holesky/data/traces/block_0x53741e9e-0-0x407ec43d-1600951088172"\n ]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_storagerangeat",children:(0,c.jsx)(n.code,{children:"debug_storageRangeAt"})}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.a,{href:"https://remix.ethereum.org/",children:"Remix"})," uses ",(0,c.jsx)(n.code,{children:"debug_storageRangeAt"})," to implement debugging. Use the ",(0,c.jsx)(n.em,{children:"Debugger"})," tab in Remix instead of calling ",(0,c.jsx)(n.code,{children:"debug_storageRangeAt"})," directly."]}),"\n",(0,c.jsx)(n.p,{children:"Returns the contract storage for the specified range."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-22",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockHash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - block hash"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"txIndex"}),": ",(0,c.jsx)(n.em,{children:"number"})," - transaction index from which to start"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"address"}),": ",(0,c.jsx)(n.em,{children:"string"})," - contract address"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"startKey"}),": ",(0,c.jsx)(n.em,{children:"string"})," - start key"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"limit"}),": ",(0,c.jsx)(n.em,{children:"number"})," - number of storage entries to return"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-22",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#range-object",children:"range object"}),"."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_storageRangeAt","params":["0x2b76b3a2fc44c0e21ea183d06c846353279a7acf12abcc6fb9d5e8fb14ae2f8c",0,"0x0e0d2c8f7794e82164f11798276a188147fbd415","0x0000000000000000000000000000000000000000000000000000000000000000",1], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "debug_storageRangeAt",\n "params": [\n "0x2b76b3a2fc44c0e21ea183d06c846353279a7acf12abcc6fb9d5e8fb14ae2f8c",\n 0,\n "0x0e0d2c8f7794e82164f11798276a188147fbd415",\n "0x0000000000000000000000000000000000000000000000000000000000000000",\n 1\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "storage": {\n "0x290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563": {\n "key": null,\n "value": "0x0000000000000000000000000000000000000000000000000000000000000001"\n }\n },\n "nextKey": "0xb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6"\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_tracetransaction",children:(0,c.jsx)(n.code,{children:"debug_traceTransaction"})}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.a,{href:"https://remix.ethereum.org/",children:"Remix"})," uses ",(0,c.jsx)(n.code,{children:"debug_traceTransaction"})," to implement debugging. Use the ",(0,c.jsx)(n.em,{children:"Debugger"})," tab in Remix instead of calling ",(0,c.jsx)(n.code,{children:"debug_traceTransaction"})," directly."]}),"\n",(0,c.jsx)(n.p,{children:"Reruns the transaction with the same state as when the transaction executed."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-23",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"transactionHash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - transaction hash"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"options"}),": ",(0,c.jsx)(n.em,{children:"object"})," - request options object with the following fields (all optional and default to ",(0,c.jsx)(n.code,{children:"false"}),"):"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableStorage"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables storage capture."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableMemory"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables memory capture."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableStack"})," : ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables stack capture."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-23",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#trace-object",children:"trace object"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_traceTransaction","params":["0x2cc6c94c21685b7e0f8ddabf277a5ccf98db157c62619cde8baea696a74ed18e",{"disableStorage":true}],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "debug_traceTransaction",\n "params": [\n "0x2cc6c94c21685b7e0f8ddabf277a5ccf98db157c62619cde8baea696a74ed18e",\n { "disableStorage": true }\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "gas": 21000,\n "failed": false,\n "returnValue": "",\n "structLogs": [\n {\n "pc": 0,\n "op": "STOP",\n "gas": 0,\n "gasCost": 0,\n "depth": 1,\n "stack": [],\n "memory": [],\n "storage": null\n }\n ]\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_traceblock",children:(0,c.jsx)(n.code,{children:"debug_traceBlock"})}),"\n",(0,c.jsx)(n.p,{children:"Returns full trace of all invoked opcodes of all transactions included in the block."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-24",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"block"}),": ",(0,c.jsx)(n.em,{children:"string"})," - RLP of the block"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"options"}),": ",(0,c.jsx)(n.em,{children:"object"})," - request options object with the following fields (all optional and default to ",(0,c.jsx)(n.code,{children:"false"}),"):"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableStorage"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables storage capture."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableMemory"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables memory capture."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableStack"})," : ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables stack capture."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-24",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#trace-object",children:"trace object"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_traceBlock","params":["0xf90277f90208a05a41d0e66b4120775176c09fcf39e7c0520517a13d2b57b18d33d342df038bfca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794e6a7a1d47ff21b6321162aea7c6cb457d5476bcaa00e0df2706b0a4fb8bd08c9246d472abbe850af446405d9eba1db41db18b4a169a04513310fcb9f6f616972a3b948dc5d547f280849a87ebb5af0191f98b87be598a0fe2bf2a941abf41d72637e5b91750332a30283efd40c424dc522b77e6f0ed8c4b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000860153886c1bbd82b44382520b8252088455c426598b657468706f6f6c2e6f7267a0b48c515a9dde8d346c3337ea520aa995a4738bb595495506125449c1149d6cf488ba4f8ecd18aab215f869f86780862d79883d2000825208945df9b87991262f6ba471f09758cde1c0fc1de734827a69801ca088ff6cf0fefd94db46111149ae4bfc179e9b94721fffd821d38d16464b3f71d0a045e0aff800961cfce805daef7016b9b675c137a6a41a548f7b60a3484c06a33ac0"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "debug_traceBlock",\n "params": [\n "0xf90277f90208a05a41d0e66b4120775176c09fcf39e7c0520517a13d2b57b18d33d342df038bfca01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d4934794e6a7a1d47ff21b6321162aea7c6cb457d5476bcaa00e0df2706b0a4fb8bd08c9246d472abbe850af446405d9eba1db41db18b4a169a04513310fcb9f6f616972a3b948dc5d547f280849a87ebb5af0191f98b87be598a0fe2bf2a941abf41d72637e5b91750332a30283efd40c424dc522b77e6f0ed8c4b9010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000860153886c1bbd82b44382520b8252088455c426598b657468706f6f6c2e6f7267a0b48c515a9dde8d346c3337ea520aa995a4738bb595495506125449c1149d6cf488ba4f8ecd18aab215f869f86780862d79883d2000825208945df9b87991262f6ba471f09758cde1c0fc1de734827a69801ca088ff6cf0fefd94db46111149ae4bfc179e9b94721fffd821d38d16464b3f71d0a045e0aff800961cfce805daef7016b9b675c137a6a41a548f7b60a3484c06a33ac0"\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "gas": 21000,\n "failed": false,\n "returnValue": "",\n "structLogs": [\n {\n "pc": 0,\n "op": "STOP",\n "gas": 0,\n "gasCost": 0,\n "depth": 1,\n "stack": [],\n "memory": [],\n "storage": null\n }\n ]\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_traceblockbyhash",children:(0,c.jsx)(n.code,{children:"debug_traceBlockByHash"})}),"\n",(0,c.jsx)(n.p,{children:"Returns full trace of all invoked opcodes of all transactions included in the block."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-25",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockHash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - block hash"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"options"}),": ",(0,c.jsx)(n.em,{children:"object"})," - request options object with the following fields (all optional and default to ",(0,c.jsx)(n.code,{children:"false"}),"):"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableStorage"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables storage capture."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableMemory"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables memory capture."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableStack"})," : ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables stack capture."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-25",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#trace-object",children:"trace objects"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_traceBlockByHash","params":["0xaceb3b2c9b25b0589230873921eb894b28722011b8df63977145517d754875a5"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "debug_traceBlockByHash",\n "params": [\n "0xaceb3b2c9b25b0589230873921eb894b28722011b8df63977145517d754875a5"\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "gas": 21000,\n "failed": false,\n "returnValue": "",\n "structLogs": [\n {\n "pc": 0,\n "op": "STOP",\n "gas": 0,\n "gasCost": 0,\n "depth": 1,\n "stack": [],\n "memory": [],\n "storage": {},\n "reason": null\n }\n ]\n }\n ]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_traceblockbynumber",children:(0,c.jsx)(n.code,{children:"debug_traceBlockByNumber"})}),"\n",(0,c.jsx)(n.p,{children:"Returns full trace of all invoked opcodes of all transactions included in the block."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-26",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the\nstring tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"options"}),": ",(0,c.jsx)(n.em,{children:"object"})," - request options object with the following fields (all optional and default to ",(0,c.jsx)(n.code,{children:"false"}),"):"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableStorage"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables storage capture."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableMemory"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables memory capture."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableStack"})," : ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables stack capture."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-26",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#trace-object",children:"trace objects"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_traceBlockByNumber","params":["0x7224",{"disableStorage":true}], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "debug_traceBlockByNumber",\n "params": ["0x7224", { "disableStorage": true }],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "gas": 21000,\n "failed": false,\n "returnValue": "",\n "structLogs": [\n {\n "pc": 0,\n "op": "STOP",\n "gas": 0,\n "gasCost": 0,\n "depth": 1,\n "stack": [],\n "memory": [],\n "storage": null,\n "reason": null\n }\n ]\n }\n ]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"debug_tracecall",children:(0,c.jsx)(n.code,{children:"debug_traceCall"})}),"\n",(0,c.jsxs)(n.p,{children:["Performs an ",(0,c.jsx)(n.a,{href:"#eth_call",children:(0,c.jsx)(n.code,{children:"eth_call"})})," within the execution environment of a given block, using the final state of its parent block as the base, and provides a detailed trace of the executed opcodes."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-27",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"call"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-call-object",children:"transaction call object"})]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the\nstring tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"options"}),": ",(0,c.jsx)(n.em,{children:"object"})," - request options object with the following fields (all optional and default to ",(0,c.jsx)(n.code,{children:"false"}),"):"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableStorage"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables storage capture."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableMemory"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables memory capture."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"disableStack"})," : ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," disables stack capture."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-27",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#trace-object",children:"trace objects"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"debug_traceCall","params":[{"from":"","to":"","gas":"0xfffff2","gasPrice":"0xef","value":"0x0","data":""},"latest",{"disableMemory":true,"disableStack":true,"disableStorage":true}], "id":1}\' http://127.0.0.1:8545\n\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "debug_traceCall",\n "params": [{"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","0x0050000000000000000000000000000000000000", "0xfffff2","0xef","0x0","0x0000000000000000000000000030000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000001"},"latest",{"disableMemory":true,"disableStack":true,"disableStorage":true}],\n "id": 1\n}\n\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "gas": 21000,\n "failed": false,\n "returnValue": "",\n "structLogs": [\n {\n "pc": 0,\n "op": "STOP",\n "gas": 0,\n "gasCost": 0,\n "depth": 1,\n "stack": [],\n "memory": [],\n "storage": null,\n "reason": null\n }\n ]\n }\n ]\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h2,{id:"eth-methods",children:[(0,c.jsx)(n.code,{children:"ETH"})," methods"]}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"ETH"})," API methods allow you to interact with the blockchain."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:["Methods with an equivalent ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/graphql",children:"GraphQL"})," query include a GraphQL request and result in the method example. The parameter and result descriptions apply to the JSON-RPC requests. The GraphQL specification is defined in the ",(0,c.jsx)(n.a,{href:"https://github.com/hyperledger/besu/blob/750580dcca349d22d024cc14a8171b2fa74b505a/ethereum/api/src/main/resources/schema.graphqls",children:"schema"}),"."]})}),"\n",(0,c.jsx)(n.h3,{id:"eth_accounts",children:(0,c.jsx)(n.code,{children:"eth_accounts"})}),"\n",(0,c.jsx)(n.p,{children:"Returns a list of account addresses a client owns."}),"\n",(0,c.jsxs)(n.admonition,{type:"note",children:[(0,c.jsxs)(n.p,{children:["This method returns an empty object because Besu ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/send-transactions",children:"doesn't support key management"})," inside the client."]}),(0,c.jsxs)(n.p,{children:["To provide access to your key store and and then sign transactions, use ",(0,c.jsx)(n.a,{href:"https://docs.web3signer.consensys.net/",children:"Web3Signer"})," with Besu."]})]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-28",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-28",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," - list of 20-byte account addresses owned by the client"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "eth_accounts", "params": [], "id": 53 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": []\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_blobbasefee",children:(0,c.jsx)(n.code,{children:"eth_blobBaseFee"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the base fee per blob gas in wei."}),"\n",(0,c.jsx)(n.admonition,{type:"info",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.a,{href:"/public-networks/concepts/transactions/types#blob-transactions",children:"Shard blob transactions"})," enable scaling Ethereum by allowing blobs of\ndata to be stored temporarily by consensus clients."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-29",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-29",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal integer representing the base fee per blob gas."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_blobBaseFee","params":[],"id":51}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{"jsonrpc":"2.0","method":"eth_blobBaseFee","params":[],"id":51}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 51,\n "result": "0x3f5694c1f"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_blocknumber",children:(0,c.jsx)(n.code,{children:"eth_blockNumber"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the index corresponding to the block number of the current chain head."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-30",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-30",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal integer representing the index corresponding to the block number of the current chain head"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":51}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 51 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 51,\n "result": "0x2377"\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{block{number}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:"{\n block {\n number\n }\n}\n"})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "block": {\n "number": 16221\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_call",children:(0,c.jsx)(n.code,{children:"eth_call"})}),"\n",(0,c.jsx)(n.p,{children:"Invokes a contract function locally and does not change the state of the blockchain."}),"\n",(0,c.jsxs)(n.p,{children:["You can interact with contracts using ",(0,c.jsx)(n.a,{href:"#eth_sendrawtransaction",children:(0,c.jsx)(n.code,{children:"eth_sendRawTransaction"})})," or ",(0,c.jsx)(n.code,{children:"eth_call"}),"."]}),"\n",(0,c.jsxs)(n.p,{children:["By default, the ",(0,c.jsx)(n.code,{children:"eth_call"})," error response includes the ",(0,c.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/revert-reason",children:"revert reason"}),"."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-31",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"call"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-call-object",children:"transaction call object"})]}),"\n",(0,c.jsxs)(n.admonition,{type:"note",children:[(0,c.jsxs)(n.p,{children:["The ",(0,c.jsxs)(n.a,{href:"/public-networks/reference/api/objects#transaction-call-object",children:[(0,c.jsx)(n.code,{children:"strict"})," parameter"]})," determines if the sender account balance is checked:"]}),(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:["If ",(0,c.jsx)(n.code,{children:"strict:true"}),", the balance is checked and ",(0,c.jsx)(n.code,{children:"eth_call"})," fails if the sender account has an insufficient balance to send the transaction with the specified gas parameters."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:["If ",(0,c.jsx)(n.code,{children:"strict:false"}),", the balance is not checked and ",(0,c.jsx)(n.code,{children:"eth_call"})," can succeed even if the sender account has an insufficient balance."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:["If ",(0,c.jsx)(n.code,{children:"strict"})," is not specified, the balance is checked against the gas parameters if supplied."]}),"\n"]}),"\n"]}),(0,c.jsxs)(n.p,{children:["If you do not want the sender account balance checked, send zero gas or specify ",(0,c.jsx)(n.code,{children:"strict:false"}),"."]})]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"})," or ",(0,c.jsx)(n.code,{children:"blockHash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number,\nblock hash, or one of the string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as\ndescribed in ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-31",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - return value of the executed contract"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13","value":"0x1"}, "latest"],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_call",\n "params": [\n { "to": "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13", "value": "0x1" },\n "latest"\n ],\n "id": 53\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": "0x"\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{block {number call (data : {from : \\"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\\", to: \\"0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13\\", data :\\"0x12a7b914\\"}){data status}}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n block {\n number\n call(data: {from: "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", to: "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13", data: "0x12a7b914"}) {\n data\n status\n }\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "block": {\n "number": 17449,\n "call": {\n "data": "0x",\n "status": 1\n }\n }\n }\n}\n'})})})]}),"\n",(0,c.jsxs)(n.admonition,{title:"Example of a simulated contract creation",type:"info",children:[(0,c.jsxs)(n.p,{children:["The following example creates a simulated contract by not including the ",(0,c.jsx)(n.code,{children:"to"})," parameter from the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-call-object",children:"transaction call object"})," in the ",(0,c.jsx)(n.code,{children:"call"})," parameter. Besu simulates the data to create the contract."]}),(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_call","params":[{"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "data":"0x6080604052336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555034801561005057600080fd5b5061021e806100606000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063445df0ac146100465780638da5cb5b14610064578063fdacd576146100ae575b600080fd5b61004e6100dc565b6040518082815260200191505060405180910390f35b61006c6100e2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100da600480360360208110156100c457600080fd5b8101908080359060200190929190505050610107565b005b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806101b76033913960400191505060405180910390fd5b806001819055505056fe546869732066756e6374696f6e206973207265737472696374656420746f2074686520636f6e74726163742773206f776e6572a265627a7a7231582007302f208a10686769509b529e1878bda1859883778d70dedd1844fe790c9bde64736f6c63430005100032","gas":"0x439cf","gasPrice":"0x0"},"latest"],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063445df0ac146100465780638da5cb5b14610064578063fdacd576146100ae575b600080fd5b61004e6100dc565b6040518082815260200191505060405180910390f35b61006c6100e2565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100da600480360360208110156100c457600080fd5b8101908080359060200190929190505050610107565b005b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146101ac576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260338152602001806101b76033913960400191505060405180910390fd5b806001819055505056fe546869732066756e6374696f6e206973207265737472696374656420746f2074686520636f6e74726163742773206f776e6572a265627a7a7231582007302f208a10686769509b529e1878bda1859883778d70dedd1844fe790c9bde64736f6c63430005100032"\n}\n'})})})]})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_chainid",children:(0,c.jsx)(n.code,{children:"eth_chainId"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns the ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/network-and-chain-id",children:"chain ID"}),"."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-32",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-32",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - chain ID in hexadecimal"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":51}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "eth_chainId", "params": [], "id": 51 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 51,\n "result": "0x7e2"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_coinbase",children:(0,c.jsx)(n.code,{children:"eth_coinbase"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the client coinbase address. The coinbase address is the account to pay mining rewards to."}),"\n",(0,c.jsxs)(n.p,{children:["To set a coinbase address, start Besu with the ",(0,c.jsx)(n.code,{children:"--miner-coinbase"})," option set to a valid Ethereum account address. You can get the Ethereum account address from a client such as MetaMask or Etherscan. For example:"]}),"\n",(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",metastring:'title="Example"',children:'besu --miner-coinbase="0xfe3b557e8fb62b89f4916b721be55ceb828dbd73" --rpc-http-enabled\n'})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-33",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-33",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - coinbase address"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_coinbase","params":[],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "eth_coinbase", "params": [], "id": 53 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_createaccesslist",children:(0,c.jsx)(n.code,{children:"eth_createAccessList"})}),"\n",(0,c.jsxs)(n.p,{children:["Creates an ",(0,c.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-2930",children:"EIP-2930"})," access list that you can ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/transactions/types#access_list-transactions",children:"include in a transaction"}),"."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-34",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"transaction"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-call-object",children:"transaction call object"})]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"}),"."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-34",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - access list object with the following fields:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"accessList"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of objects with the following fields:","\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"address"}),": ",(0,c.jsx)(n.em,{children:"string"})," - addresses to be accessed by the transaction"]}),"\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"storageKeys"}),": ",(0,c.jsx)(n.em,{children:"array"})," - storage keys to be accessed by the transaction"]}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"gasUsed"}),": ",(0,c.jsx)(n.em,{children:"string"})," - approximate gas cost for the transaction if the access list is included"]}),"\n"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"method":"eth_createAccessList","params":[{"from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63", "data": "0x608060806080608155"}, "pending"],"id":1,"jsonrpc":"2.0"}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "method": "eth_createAccessList",\n "params": [\n {\n "from": "0xaeA8F8f781326bfE6A7683C2BD48Dd6AA4d3Ba63",\n "data": "0x608060806080608155"\n },\n "pending"\n ],\n "id": 1,\n "jsonrpc": "2.0"\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "accessList": [\n {\n "address": "0xa02457e5dfd32bda5fc7e1f1b008aa5979568150",\n "storageKeys": [\n "0x0000000000000000000000000000000000000000000000000000000000000081",\n ]\n }\n ]\n "gasUsed": "0x125f8"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_estimategas",children:(0,c.jsx)(n.code,{children:"eth_estimateGas"})}),"\n",(0,c.jsx)(n.p,{children:"Returns an estimate of the gas required for a transaction to complete. The estimation process does not use gas and the transaction is not added to the blockchain. The resulting estimate can be greater than the amount of gas the transaction ends up using, for reasons including EVM mechanics and node performance."}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"eth_estimateGas"})," call does not send a transaction. You must call ",(0,c.jsx)(n.a,{href:"#eth_sendrawtransaction",children:(0,c.jsx)(n.code,{children:"eth_sendRawTransaction"})})," to execute the transaction."]}),"\n",(0,c.jsxs)(n.p,{children:["By default, the ",(0,c.jsx)(n.code,{children:"eth_estimateGas"})," error response includes the ",(0,c.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/revert-reason",children:"revert reason"}),"."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-35",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:["For ",(0,c.jsx)(n.code,{children:"eth_estimateGas"}),", all fields are optional because setting a gas limit is irrelevant to the estimation process (unlike transactions, in which gas limits apply)."]}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"call"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-call-object",children:"transaction call object"})]}),"\n",(0,c.jsx)(n.h4,{id:"returns-35",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - amount of gas used"]}),"\n",(0,c.jsxs)(n.p,{children:["The following example returns an estimate of 21000 wei (",(0,c.jsx)(n.code,{children:"0x5208"}),") for the transaction."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_estimateGas","params":[{"from":"0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73","to":"0x44Aa93095D6749A706051658B970b941c72c1D53","value":"0x1"}],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_estimateGas",\n "params": [\n {\n "from": "0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73",\n "to": "0x44Aa93095D6749A706051658B970b941c72c1D53",\n "value": "0x1"\n }\n ],\n "id": 53\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": "0x5208"\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{block{estimateGas (data: {from :\\"0x6295ee1b4f6dd65047762f924ecd367c17eabf8f\\", to :\\"0x8888f1f195afa192cfee860698584c030f4c9db1\\"})}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n block {\n estimateGas(data: {from: "0x6295ee1b4f6dd65047762f924ecd367c17eabf8f", to: "0x8888f1f195afa192cfee860698584c030f4c9db1"})\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "block": {\n "estimateGas": 21000\n }\n }\n}\n'})})})]}),"\n",(0,c.jsxs)(n.p,{children:["The following example request estimates the cost of deploying a simple storage smart contract to the network. The data field contains the hash of the compiled contract you want to deploy. (You can get the compiled contract hash from your IDE, for example, ",(0,c.jsx)(n.strong,{children:"Remix > Compile tab > details > WEB3DEPLOY"}),".) The result is 113355 wei."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST \\\nhttp://127.0.0.1:8545 \\\n-H \'Content-Type: application/json\' \\\n-d \'{\n "jsonrpc": "2.0",\n "method": "eth_estimateGas",\n "params": [{\n "from": "0x8bad598904ec5d93d07e204a366d084a80c7694e",\n "data": "0x608060405234801561001057600080fd5b5060e38061001f6000396000f3fe6080604052600436106043576000357c0100000000000000000000000000000000000000000000000000000000900480633fa4f24514604857806355241077146070575b600080fd5b348015605357600080fd5b50605a60a7565b6040518082815260200191505060405180910390f35b348015607b57600080fd5b5060a560048036036020811015609057600080fd5b810190808035906020019092919050505060ad565b005b60005481565b806000819055505056fea165627a7a7230582020d7ad478b98b85ca751c924ef66bcebbbd8072b93031073ef35270a4c42f0080029"\n }],\n "id": 1\n}\'\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x1bacb"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_feehistory",children:(0,c.jsx)(n.code,{children:"eth_feeHistory"})}),"\n",(0,c.jsx)(n.p,{children:"Returns base fee per gas and transaction effective priority fee per gas history for the requested block\nrange, allowing you to track trends over time."}),"\n",(0,c.jsxs)(n.p,{children:["As of ",(0,c.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-4844",children:"EIP-4844"}),", this method tracks transaction blob gas fees as well."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-36",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockCount"}),": ",(0,c.jsx)(n.em,{children:"integer"})," or ",(0,c.jsx)(n.em,{children:"string"})," - Number of blocks in the requested range. Between 1 and 1024 blocks can be requested in a single query. If blocks in the specified block range are not available, then only the fee history for available blocks is returned. Accepts hexadecimal or integer values."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"newestBlock"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing the highest number block of\nthe requested range, or one of the string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or\n",(0,c.jsx)(n.code,{children:"safe"}),", as described in ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"}),"."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"array"})," of ",(0,c.jsx)(n.code,{children:"integers"})," - (optional) A monotonically increasing list of percentile values to sample from each block's effective priority fees per gas in ascending order, weighted by gas used."]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-36",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#fee-history-results-object",children:"Fee history results object"}),"."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_feeHistory","params": ["0x5", "latest", [20,30]],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_feeHistory",\n "params": ["0x5", "latest", [20, 30]],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "oldestBlock": "0x10b52f",\n "baseFeePerGas": [\n "0x3fa63a3f",\n "0x37f999ee",\n "0x3e36f20a",\n "0x4099f79a",\n "0x430d532d",\n "0x46fcd4a4"\n ],\n "baseFeePerBlobGas": [\n "0x7b7609c19",\n "0x6dbe41789",\n "0x7223341d4",\n "0x6574a002c",\n "0x7223341d4",\n "0x6574a002c"\n ],\n "gasUsedRatio": [\n 0.017712333333333333,\n 0.9458865666666667,\n 0.6534561,\n 0.6517375666666667,\n 0.7347769666666667\n ],\n "blobGasUsedRatio": [\n 0.0,\n 0.6666666666666666,\n 0.0,\n 1.0,\n 0.0\n ],\n "reward": [\n [\n "0x3b9aca00",\n "0x59682f00"\n ],\n [\n "0x3a13012",\n "0x3a13012"\n ],\n [\n "0xf4240",\n "0xf4240"\n ],\n [\n "0xf4240",\n "0xf4240"\n ],\n [\n "0xf4240",\n "0xf4240"\n ]\n ]\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_gasprice",children:(0,c.jsx)(n.code,{children:"eth_gasPrice"})}),"\n",(0,c.jsx)(n.p,{children:"Returns a percentile gas unit price for the most recent blocks, in wei. By default, the last 100 blocks are examined and the 50th percentile gas unit price (that is, the median value) is returned."}),"\n",(0,c.jsxs)(n.p,{children:["If there are no blocks, the value for ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#min-gas-price",children:(0,c.jsx)(n.code,{children:"--min-gas-price"})})," is returned. The value returned is restricted to values between ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#min-gas-price",children:(0,c.jsx)(n.code,{children:"--min-gas-price"})})," and ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#api-gas-price-max",children:(0,c.jsx)(n.code,{children:"--api-gas-price-max"})}),". By default, 1000 wei and 500 gwei."]}),"\n",(0,c.jsxs)(n.p,{children:["Use the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#api-gas-price-blocks",children:(0,c.jsx)(n.code,{children:"--api-gas-price-blocks"})}),", ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#api-gas-price-percentile",children:(0,c.jsx)(n.code,{children:"--api-gas-price-percentile"})})," , and ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#api-gas-price-max",children:(0,c.jsx)(n.code,{children:"--api-gas-price-max"})})," command line options to configure the ",(0,c.jsx)(n.code,{children:"eth_gasPrice"})," default values."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-37",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-37",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - percentile gas unit price for the most recent blocks, in wei, as a hexadecimal value"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 53 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": "0x3e8"\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{gasPrice}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:"{\n gasPrice\n}\n"})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "gasPrice": "0x3e8"\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getbalance",children:(0,c.jsx)(n.code,{children:"eth_getBalance"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the account balance of the specified address."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-38",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"address"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 20-byte account address from which to retrieve the balance"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"})," or ",(0,c.jsx)(n.code,{children:"blockHash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block\nnumber, block hash, or one of the string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or\n",(0,c.jsx)(n.code,{children:"safe"}),", as described in ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-38",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - current balance, in wei, as a hexadecimal value"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getBalance","params":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "latest"],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getBalance",\n "params": ["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "latest"],\n "id": 53\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": "0x1cfe56f3795885980000"\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{ account ( address: \\"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73\\") { balance } }"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n account(address: "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73") {\n balance\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "account": {\n "balance": "0x1ce96a1ffe7620d00000"\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getblockbyhash",children:(0,c.jsx)(n.code,{children:"eth_getBlockByHash"})}),"\n",(0,c.jsx)(n.p,{children:"Returns information about the block matching the specified block hash."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-39",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"hash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte hash of a block"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"verbose"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - if ",(0,c.jsx)(n.code,{children:"true"}),", returns the full ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-object",children:"transaction objects"}),"; if ",(0,c.jsx)(n.code,{children:"false"}),", returns the transaction hashes"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-39",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#block-object",children:"block object"}),", or ",(0,c.jsx)(n.code,{children:"null"})," when there is no block"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c", false],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getBlockByHash",\n "params": [\n "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",\n false\n ],\n "id": 53\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": {\n "number": "0x68b3",\n "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",\n "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",\n "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",\n "nonce": "0x378da40ff335b070",\n "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",\n "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",\n "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",\n "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",\n "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",\n "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",\n "difficulty": "0x66e619a",\n "totalDifficulty": "0x1e875d746ae",\n "extraData": "0xd583010502846765746885676f312e37856c696e7578",\n "size": "0x334",\n "gasLimit": "0x47e7c4",\n "gasUsed": "0x37993",\n "timestamp": "0x5835c54d",\n "uncles": [],\n "transactions": [\n "0xa0807e117a8dd124ab949f460f08c36c72b710188f01609595223b325e58e0fc",\n "0xeae6d797af50cb62a596ec3939114d63967c374fa57de9bc0f4e2b576ed6639d"\n ],\n "baseFeePerGas": "0x7"\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{block (hash : \\"0xb0efed1fc9326fee967cb2d845d4ebe57c5350a0670c8e86f8052dea6f219f92\\") {number transactions{hash} timestamp difficulty totalDifficulty gasUsed gasLimit hash nonce ommerCount logsBloom mixHash ommerHash extraData stateRoot receiptsRoot transactionCount transactionsRoot}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n block(hash: "0xb0efed1fc9326fee967cb2d845d4ebe57c5350a0670c8e86f8052dea6f219f92") {\n number\n transactions {\n hash\n }\n timestamp\n difficulty\n totalDifficulty\n gasUsed\n gasLimit\n hash\n nonce\n ommerCount\n logsBloom\n mixHash\n ommerHash\n extraData\n stateRoot\n receiptsRoot\n transactionCount\n transactionsRoot\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "block": {\n "number": 17607,\n "transactions": [],\n "timestamp": "0x5cdbdfb5",\n "difficulty": "0x1",\n "totalDifficulty": "0x44c8",\n "gasUsed": 0,\n "gasLimit": 4700000,\n "hash": "0xb0efed1fc9326fee967cb2d845d4ebe57c5350a0670c8e86f8052dea6f219f92",\n "nonce": "0x0000000000000000",\n "ommerCount": 0,\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",\n "ommerHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",\n "extraData": "0xf882a00000000000000000000000000000000000000000000000000000000000000000d5949811ebc35d7b06b3fa8dc5809a1f9c52751e1deb808400000000f843b841fae6d25da0b91e3e88669d0a765c98479d86d53e9ea1f3fb6b36d7ff22fa622a3da0c49c20e5562c774e90acae8ad487936f6b6019cd8a782db684693cba1e9800",\n "stateRoot": "0xa7086c266aed46cd3bc45579178f8acb36d9d147de575a3ecbf8c7e6f1c737fc",\n "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",\n "transactionCount": 0,\n "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",\n "baseFeePerGas": "0x7"\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getblockbynumber",children:(0,c.jsx)(n.code,{children:"eth_getBlockByNumber"})}),"\n",(0,c.jsx)(n.p,{children:"Returns information about the block matching the specified block number."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-40",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"}),"."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"verbose"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - if ",(0,c.jsx)(n.code,{children:"true"}),", returns the full ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-object",children:"transaction objects"}),"; if ",(0,c.jsx)(n.code,{children:"false"}),", returns only the hashes of the transactions."]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-40",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#block-object",children:"block object"}),", or ",(0,c.jsx)(n.code,{children:"null"})," when there is no block."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0x68B3", true],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getBlockByNumber",\n "params": ["0x68B3", true],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "number": "0x68b3",\n "hash": "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",\n "mixHash": "0x24900fb3da77674a861c428429dce0762707ecb6052325bbd9b3c64e74b5af9d",\n "parentHash": "0x1f68ac259155e2f38211ddad0f0a15394d55417b185a93923e2abe71bb7a4d6d",\n "nonce": "0x378da40ff335b070",\n "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",\n "logsBloom": "0x00000000000000100000004080000000000500000000000000020000100000000800001000000004000001000000000000000800040010000020100000000400000010000000000000000040000000000000040000000000000000000000000000000400002400000000000000000000000000000004000004000000000000840000000800000080010004000000001000000800000000000000000000000000000000000800000000000040000000020000000000000000000800000400000000000000000000000600000400000000002000000000000000000000004000000000000000100000000000000000000000000000000000040000900010000000",\n "transactionsRoot": "0x4d0c8e91e16bdff538c03211c5c73632ed054d00a7e210c0eb25146c20048126",\n "stateRoot": "0x91309efa7e42c1f137f31fe9edbe88ae087e6620d0d59031324da3e2f4f93233",\n "receiptsRoot": "0x68461ab700003503a305083630a8fb8d14927238f0bc8b6b3d246c0c64f21f4a",\n "miner": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",\n "difficulty": "0x66e619a",\n "totalDifficulty": "0x1e875d746ae",\n "extraData": "0xd583010502846765746885676f312e37856c696e7578",\n "size": "0x334",\n "gasLimit": "0x47e7c4",\n "gasUsed": "0x37993",\n "timestamp": "0x5835c54d",\n "uncles": [],\n "transactions": [],\n "baseFeePerGas": "0x7"\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{block (number : 100) {transactions{hash} timestamp difficulty totalDifficulty gasUsed gasLimit hash nonce ommerCount logsBloom mixHash ommerHash extraData stateRoot receiptsRoot transactionCount transactionsRoot ommers{hash} ommerAt(index : 1){hash} miner{address} account(address: \\"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73\\"){balance} parent{hash} }}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n block(number: 100) {\n transactions {\n hash\n }\n timestamp\n difficulty\n totalDifficulty\n gasUsed\n gasLimit\n hash\n nonce\n ommerCount\n logsBloom\n mixHash\n ommerHash\n extraData\n stateRoot\n receiptsRoot\n transactionCount\n transactionsRoot\n ommers {\n hash\n }\n ommerAt(index: 1) {\n hash\n }\n miner {\n address\n }\n account(address: "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73") {\n balance\n }\n parent {\n hash\n }\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "block": {\n "transactions": [],\n "timestamp": "0x5cd10933",\n "difficulty": "0x1",\n "totalDifficulty": "0x65",\n "gasUsed": 0,\n "gasLimit": 4700000,\n "hash": "0x63b3ea2bc37fec8f82680eb823652da6af8acebb4f6c4d0ff659c55be473c8b0",\n "nonce": "0x0000000000000000",\n "ommerCount": 0,\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",\n "ommerHash": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",\n "extraData": "0xf882a00000000000000000000000000000000000000000000000000000000000000000d5949811ebc35d7b06b3fa8dc5809a1f9c52751e1deb808400000000f843b8414d877d8d0ced37ea138fab55a978f3740367a24a31731322ecdc3368f11e0d4966c9ce17ae59a76fb94eb436e8a386868f6bd6b0a5678e58daf49f5dd940558b00",\n "stateRoot": "0xd650578a04b39f50cc979155f4510ec28c2c0a7c1e5fdbf84609bc7b1c430f48",\n "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",\n "transactionCount": 0,\n "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",\n "ommers": [],\n "ommerAt": null,\n "miner": {\n "address": "0x9811ebc35d7b06b3fa8dc5809a1f9c52751e1deb"\n },\n "account": {\n "balance": "0xad0f47f269cbf31ac"\n },\n "parent": {\n "hash": "0x7bca25e1fa5e395fd6029eb496a70b6b5495843976bf9e49b993c723ded29d9e"\n },\n "baseFeePerGas": "0x7"\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getblockreceipts",children:(0,c.jsx)(n.code,{children:"eth_getBlockReceipts"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns all transaction receipts for a given block. Transaction receipts provide a way to track the success or failure of a transaction (",(0,c.jsx)(n.code,{children:"1"})," if successful and ",(0,c.jsx)(n.code,{children:"0"})," if failed), as well as the amount of\ngas used and any event logs that might have been produced by a smart contract during the transaction."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-41",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"}),"."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n",(0,c.jsx)(n.h4,{id:"returns-41",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#block-object",children:"block object"}),", or ",(0,c.jsx)(n.code,{children:"null"})," when there is no block."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getBlockReceipts","params":["latest"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0", "method": "eth_getBlockReceipts", "params": ["0x6f55"], "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",\n "blockNumber": "0x6f55",\n "contractAddress": null,\n "cumulativeGasUsed": "0x18c36",\n "from": "0x22896bfc68814bfd855b1a167255ee497006e730",\n "gasUsed": "0x18c36",\n "effectiveGasPrice": "0x9502f907",\n "logs": [\n {\n "address": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",\n "topics": [\n "0x2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d",\n "0x4be29e0e4eb91f98f709d98803cba271592782e293b84a625e025cbb40197ba8",\n "0x000000000000000000000000835281a2563db4ebf1b626172e085dc406bfc7d2",\n "0x00000000000000000000000022896bfc68814bfd855b1a167255ee497006e730"\n ],\n "data": "0x",\n "blockNumber": "0x6f55",\n "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",\n "transactionIndex": "0x0",\n "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",\n "logIndex": "0x0",\n "removed": false\n }\n ],\n "logsBloom": "0x00000004000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000080020000000000000200010000000000000000000001000000800000000000000000000000000000000000000000000000000000100100000000000000000000008000000000000000000000000000000002000000000000000000000",\n "status": "0x1",\n "to": "0xfd584430cafa2f451b4e2ebcf3986a21fff04350",\n "transactionHash": "0x4a481e4649da999d92db0585c36cba94c18a33747e95dc235330e6c737c6f975",\n "transactionIndex": "0x0",\n "type": "0x0"\n },\n {\n "blockHash": "0x19514ce955c65e4dd2cd41f435a75a46a08535b8fc16bc660f8092b32590b182",\n "blockNumber": "0x6f55",\n "contractAddress": null,\n "cumulativeGasUsed": "0x1de3e",\n "from": "0x712e3a792c974b3e3dbe41229ad4290791c75a82",\n "gasUsed": "0x5208",\n "effectiveGasPrice": "0x9502f907",\n "logs": [],\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "status": "0x1",\n "to": "0xd42e2b1c14d02f1df5369a9827cb8e6f3f75f338",\n "transactionHash": "0xefb83b4e3f1c317e8da0f8e2fbb2fe964f34ee184466032aeecac79f20eacaf6",\n "transactionIndex": "0x1",\n "type": "0x2"\n }\n ]\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{block (hash: \\"0x4d746a3381673a5180744a56e78cded4696b77317866c2253566e0fa16967e1d\\") {transactions{block{hash logsBloom} hash createdContract{address} cumulativeGasUsed gas gasUsed logs{topics} from{address} to{address} index}}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n block (hash: "0x4d746a3381673a5180744a56e78cded4696b77317866c2253566e0fa16967e1d") {\n transactions { \n block { \n hash\n logsBloom\n } \n hash\n createdContract {\n address\n } \n cumulativeGasUsed\n gas\n gasUsed\n logs{ \n topics\n } \n from{ \n address\n }\n to { \n address\n } \n index\n }\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data" : {\n "block" : {\n "transactions" : [ {\n "block" : {\n "hash" : "0x4d746a3381673a5180744a56e78cded4696b77317866c2253566e0fa16967e1d",\n "logsBloom" : "0x2e0a8080520608000e38181e0c9081e813a00c184a010d1900c9602240428dc6480004444098428b945010802454104002827420426591a200224016802841900031bd4440828ec9b113081880027c01cc47105c1885d556216200880026160810050028422a4b0c4bc8087372860851000802c8d901158504a482100d488040119c08045e500824402054a0d91cc433188909020a06ac841914a2a082c104a1260460014b8b001b28030202518c040008266038a880026208041d082503589054581223c188004396804801280c00020c492816060a421831c8820ac04460303a9e48128238e0098f319030083808150c4914b8840000206715481500690000"\n },\n "hash" : "0x7afe779fd0c6d4a1b6f330e679a5cf94095eaa57d2ce0c0ef991dfb2b405374f",\n "createdContract" : null,\n "cumulativeGasUsed" : "0x5208",\n "gas" : "0x61a8",\n "gasUsed" : "0x5208",\n "logs" : [ ],\n "from" : {\n "address" : "0x66f962241b8ff853849c85a63a0ce20bae4f68d5"\n },\n "to" : {\n "address" : "0x6be8356826a9fc7b2d911fcc1de6342ae5f5b9a3"\n },\n "index" : "0x0"\n }, {\n "block" : {\n "hash" : "0x4d746a3381673a5180744a56e78cded4696b77317866c2253566e0fa16967e1d",\n "logsBloom" : "0x2e0a8080520608000e38181e0c9081e813a00c184a010d1900c9602240428dc6480004444098428b945010802454104002827420426591a200224016802841900031bd4440828ec9b113081880027c01cc47105c1885d556216200880026160810050028422a4b0c4bc8087372860851000802c8d901158504a482100d488040119c08045e500824402054a0d91cc433188909020a06ac841914a2a082c104a1260460014b8b001b28030202518c040008266038a880026208041d082503589054581223c188004396804801280c00020c492816060a421831c8820ac04460303a9e48128238e0098f319030083808150c4914b8840000206715481500690000"\n },\n "hash" : "0x412f04ba27c1c096dadb2d8af54ee61034c3d4679fdd025a634e95fa2238713c",\n "createdContract" : null,\n "cumulativeGasUsed" : "0xbcdb2",\n "gas" : "0xbdfe0",\n "gasUsed" : "0xb7baa",\n "logs" : [ {\n "topics" : [ "0xd93fde3ea1bb11dcd7a4e66320a05fc5aa63983b6447eff660084c4b1b1b499b", "0x00000000000000000000000000000000000000000000000000000000000e4d3a" ]\n } ],\n "from" : {\n "address" : "0xe253f7a6533c62755f470b33fa5bcd659a5db3cd"\n },\n "to" : {\n "address" : "0x95ff8d3ce9dcb7455beb7845143bea84fe5c4f6f"\n },\n "index" : "0x1"\n } ]\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getblocktransactioncountbyhash",children:(0,c.jsx)(n.code,{children:"eth_getBlockTransactionCountByHash"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the number of transactions in the block matching the specified block hash."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-42",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"hash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte block hash"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-42",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"number"})," - integer representing the number of transactions in the specified block, or ",(0,c.jsx)(n.code,{children:"null"})," if no matching block hash is found"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByHash","params":["0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getBlockTransactionCountByHash",\n "params": [\n "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"\n ],\n "id": 53\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": null\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{block(hash:\\"0xe455c14f757b0b9b67774baad1be1c180a4c1657df52259dbb685bf375408097\\"){transactionCount}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n block(hash: "0xe455c14f757b0b9b67774baad1be1c180a4c1657df52259dbb685bf375408097") {\n transactionCount\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "block": {\n "transactionCount": 1\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getblocktransactioncountbynumber",children:(0,c.jsx)(n.code,{children:"eth_getBlockTransactionCountByNumber"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the number of transactions in a block matching the specified block number."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-43",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"}),"."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n",(0,c.jsx)(n.h4,{id:"returns-43",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - integer representing the number of transactions in the specified block, or ",(0,c.jsx)(n.code,{children:"null"})," if no matching block number is found"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getBlockTransactionCountByNumber","params":["0xe8"],"id":51}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getBlockTransactionCountByNumber",\n "params": ["0xe8"],\n "id": 51\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 51,\n "result": "0x8"\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{block(number:232){transactionCount}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:"{\n block(number: 232) {\n transactionCount\n }\n}\n"})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "block": {\n "transactionCount": 1\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getcode",children:(0,c.jsx)(n.code,{children:"eth_getCode"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the code of the smart contract at the specified address. Besu stores compiled smart contract code as a hexadecimal value."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-44",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"address"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 20-byte contract address"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"})," or ",(0,c.jsx)(n.code,{children:"blockHash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number,\nblock hash, or one of the string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as\ndescribed in ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-44",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"data"})," - code stored at the specified address"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getCode","params":["0xa50a51c09a5c451c52bb714527e1974b686d8e77", "latest"],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getCode",\n "params": ["0xa50a51c09a5c451c52bb714527e1974b686d8e77", "latest"],\n "id": 53\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029"\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{"query": "{account(address: \\"0xa50a51c09a5c451c52bb714527e1974b686d8e77\\"){ code }}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n account(address: "0xa50a51c09a5c451c52bb714527e1974b686d8e77") {\n code\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "account": {\n "code": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029"\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getfilterchanges",children:(0,c.jsx)(n.code,{children:"eth_getFilterChanges"})}),"\n",(0,c.jsx)(n.p,{children:"Polls the specified filter and returns an array of changes that have occurred since the last poll."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-45",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"filterId"}),": ",(0,c.jsx)(n.em,{children:"string"})," - filter ID"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-45",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," or ",(0,c.jsx)(n.em,{children:"objects"})," - if nothing changed since the last poll, an empty list; otherwise:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:["For filters created with ",(0,c.jsx)(n.code,{children:"eth_newBlockFilter"}),", returns block hashes."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:["For filters created with ",(0,c.jsx)(n.code,{children:"eth_newPendingTransactionFilter"}),", returns transaction hashes."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:["For filters created with ",(0,c.jsx)(n.code,{children:"eth_newFilter"}),", returns ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#log-object",children:"log objects"}),"."]}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getFilterChanges","params":["0xf8bf5598d9e04fbe84523d42640b9b0e"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getFilterChanges",\n "params": ["0xf8bf5598d9e04fbe84523d42640b9b0e"],\n "id": 1\n}\n'})})}),(0,c.jsxs)(l.A,{value:"JSON result",label:"JSON result",children:[(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",metastring:'title="Example result from a filter created with eth_newBlockFilter"',children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "0xda2bfe44bf85394f0d6aa702b5af89ae50ae22c0928c18b8903d9269abe17e0b",\n "0x88cd3a37306db1306f01f7a0e5b25a9df52719ad2f87b0f88ee0e6753ed4a812",\n "0x4d4c731fe129ff32b425e6060d433d3fde278b565bbd1fd624d5a804a34f8786"\n ]\n}\n'})}),(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",metastring:'title="Example result from a filter created with eth_newPendingTransactionFilter"',children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "0x1e977049b6db09362da09491bee3949d9362080ce3f4fc19721196d508580d46",\n "0xa3abc4b9a4e497fd58dc59cdff52e9bb5609136bcd499e760798aa92802769be"\n ]\n}\n'})}),(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",metastring:'title="Example result from a filter created with eth_newFilter"',children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x233",\n "blockHash": "0xfc139f5e2edee9e9c888d8df9a2d2226133a9bd87c88ccbd9c930d3d4c9f9ef5",\n "transactionHash": "0x66e7a140c8fa27fe98fde923defea7562c3ca2d6bb89798aabec65782c08f63d",\n "transactionIndex": "0x0",\n "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",\n "data": "0x0000000000000000000000000000000000000000000000000000000000000004",\n "topics": [\n "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"\n ]\n },\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x238",\n "blockHash": "0x98b0ec0f9fea0018a644959accbe69cd046a8582e89402e1ab0ada91cad644ed",\n "transactionHash": "0xdb17aa1c2ce609132f599155d384c0bc5334c988a6c368056d7e167e23eee058",\n "transactionIndex": "0x0",\n "address": "0x42699a7612a82f1d9c36148af9c77354759b210b",\n "data": "0x0000000000000000000000000000000000000000000000000000000000000007",\n "topics": [\n "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"\n ]\n }\n ]\n}\n'})})]})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getfilterlogs",children:(0,c.jsx)(n.code,{children:"eth_getFilterLogs"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns an array of ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/events-and-logs",children:"logs"})," for the specified filter."]}),"\n",(0,c.jsxs)(n.p,{children:["Leave the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#auto-log-bloom-caching-enabled",children:(0,c.jsx)(n.code,{children:"--auto-log-bloom-caching-enabled"})})," command line option at the default value of ",(0,c.jsx)(n.code,{children:"true"})," to improve log retrieval performance."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"eth_getFilterLogs"})," is only used for filters created with ",(0,c.jsx)(n.code,{children:"eth_newFilter"}),". To specify a filter object and get logs without creating a filter, use ",(0,c.jsx)(n.code,{children:"eth_getLogs"}),"."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-46",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"filterId"}),": ",(0,c.jsx)(n.em,{children:"string"})," - filter ID"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-46",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#log-object",children:"log objects"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getFilterLogs","params":["0x5ace5de3985749b6a1b2b0d3f3e1fb69"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getFilterLogs",\n "params": ["0x5ace5de3985749b6a1b2b0d3f3e1fb69"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0xb3",\n "blockHash": "0xe7cd776bfee2fad031d9cc1c463ef947654a031750b56fed3d5732bee9c61998",\n "transactionHash": "0xff36c03c0fba8ac4204e4b975a6632c862a3f08aa01b004f570cc59679ed4689",\n "transactionIndex": "0x0",\n "address": "0x2e1f232a9439c3d459fceca0beef13acc8259dd8",\n "data": "0x0000000000000000000000000000000000000000000000000000000000000003",\n "topics": [\n "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"\n ]\n },\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0xb6",\n "blockHash": "0x3f4cf35e7ed2667b0ef458cf9e0acd00269a4bc394bb78ee07733d7d7dc87afc",\n "transactionHash": "0x117a31d0dbcd3e2b9180c40aca476586a648bc400aa2f6039afdd0feab474399",\n "transactionIndex": "0x0",\n "address": "0x2e1f232a9439c3d459fceca0beef13acc8259dd8",\n "data": "0x0000000000000000000000000000000000000000000000000000000000000005",\n "topics": [\n "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"\n ]\n }\n ]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getlogs",children:(0,c.jsx)(n.code,{children:"eth_getLogs"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns an array of ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/events-and-logs",children:"logs"})," matching a specified filter object."]}),"\n",(0,c.jsxs)(n.p,{children:["Leave the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#auto-log-bloom-caching-enabled",children:(0,c.jsx)(n.code,{children:"--auto-log-bloom-caching-enabled"})})," command line option at the default value of ",(0,c.jsx)(n.code,{children:"true"})," to improve log retrieval performance."]}),"\n",(0,c.jsx)(n.admonition,{type:"caution",children:(0,c.jsxs)(n.p,{children:["Using ",(0,c.jsx)(n.code,{children:"eth_getLogs"})," to get logs from a large range of blocks, especially an entire chain from its genesis block, might cause Besu to hang for an indeterminable amount of time while generating the response. We recommend setting a range limit using the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-max-logs-range",children:(0,c.jsx)(n.code,{children:"--rpc-max-logs-range"})})," option (or leaving it at its default value of 1000)."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-47",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"filterOptions"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#filter-options-object",children:"filter options object"})]}),"\n",(0,c.jsx)(n.h4,{id:"returns-47",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#log-object",children:"log objects"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"fromBlock":"earliest", "toBlock":"latest", "address": "0x2e1f232a9439c3d459fceca0beef13acc8259dd8", "topics":[]}], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getLogs",\n "params": [\n {\n "fromBlock": "earliest",\n "toBlock": "latest",\n "address": "0x2e1f232a9439c3d459fceca0beef13acc8259dd8",\n "topics": []\n }\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0xb3",\n "blockHash": "0xe7cd776bfee2fad031d9cc1c463ef947654a031750b56fed3d5732bee9c61998",\n "transactionHash": "0xff36c03c0fba8ac4204e4b975a6632c862a3f08aa01b004f570cc59679ed4689",\n "transactionIndex": "0x0",\n "address": "0x2e1f232a9439c3d459fceca0beef13acc8259dd8",\n "data": "0x0000000000000000000000000000000000000000000000000000000000000003",\n "topics": [\n "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"\n ]\n },\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0xb6",\n "blockHash": "0x3f4cf35e7ed2667b0ef458cf9e0acd00269a4bc394bb78ee07733d7d7dc87afc",\n "transactionHash": "0x117a31d0dbcd3e2b9180c40aca476586a648bc400aa2f6039afdd0feab474399",\n "transactionIndex": "0x0",\n "address": "0x2e1f232a9439c3d459fceca0beef13acc8259dd8",\n "data": "0x0000000000000000000000000000000000000000000000000000000000000005",\n "topics": [\n "0x04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce3"\n ]\n }\n ]\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{"query": "{logs(filter:{fromBlock: 1486000, toBlock: 1486010, addresses: [\\"0x7ef66b77759e12caf3ddb3e4aff524e577c59d8d\\"], topics: [[\\"0x8a22ee899102a366ac8ad0495127319cb1ff2403cfae855f83a89cda1266674d\\"]]}) {index topics data account{address} transaction{hash} }}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n logs(filter: {fromBlock: 1486000, toBlock: 1486010, addresses: ["0x7ef66b77759e12caf3ddb3e4aff524e577c59d8d"], topics: [["0x8a22ee899102a366ac8ad0495127319cb1ff2403cfae855f83a89cda1266674d"]]}) {\n index\n topics\n data\n account {\n address\n }\n transaction {\n hash\n }\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "logs": [\n {\n "index": 0,\n "topics": [\n "0x8a22ee899102a366ac8ad0495127319cb1ff2403cfae855f83a89cda1266674d",\n "0x0000000000000000000000000000000000000000000000000000000000000004",\n "0x0000000000000000000000000000000000000000000000000000000000508918"\n ],\n "data": "0xa5a04999ec29a8bd19ce32b859280ef9dbb464d846be06f64a1b1012ec08ab03",\n "account": {\n "address": "0x7ef66b77759e12caf3ddb3e4aff524e577c59d8d"\n },\n "transaction": {\n "hash": "0x36a2186344c6a32760e7700fdf3685936220876c51ff39d071eb48c17f7e802f"\n }\n },\n {\n "index": 0,\n "topics": [\n "0x8a22ee899102a366ac8ad0495127319cb1ff2403cfae855f83a89cda1266674d",\n "0x0000000000000000000000000000000000000000000000000000000000000003",\n "0x0000000000000000000000000000000000000000000000000000000000648c72"\n ],\n "data": "0x0ee96b660ad82c8010c90760a03edfbb40b4af5e3634a8c214e4ac7fa1f61492",\n "account": {\n "address": "0x7ef66b77759e12caf3ddb3e4aff524e577c59d8d"\n },\n "transaction": {\n "hash": "0x9e2cc9e84a9e78839d6f4b591dfd98cc7a454a8ee3cd6ccd0a18e662e22d3818"\n }\n }\n ]\n }\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h3,{id:"eth_getminerdatabyblockhash-deprecated",children:[(0,c.jsx)(n.code,{children:"eth_getMinerDataByBlockHash"})," (Deprecated)"]}),"\n",(0,c.jsx)(n.p,{children:"Returns miner data for the specified block."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-48",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"hash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte block hash"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-48",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#miner-data-object",children:"miner data object"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method": "eth_getMinerDataByBlockHash","params": ["0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7"],"id": 1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getMinerDataByBlockHash",\n "params": [\n "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7"\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "netBlockReward": "0x47c6f3739f3da800",\n "staticBlockReward": "0x4563918244f40000",\n "transactionFee": "0x38456548220800",\n "uncleInclusionReward": "0x22b1c8c1227a000",\n "uncleRewards": [\n {\n "hash": "0x2422d43b4f72e19faf4368949a804494f67559405046b39c6d45b1bd53044974",\n "coinbase": "0x0c062b329265c965deef1eede55183b3acb8f611"\n }\n ],\n "coinbase": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",\n "extraData": "0xd583010502846765746885676f312e37856c696e7578",\n "difficulty": "0x7348c20",\n "totalDifficulty": "0xa57bcfdd96"\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getminerdatabyblocknumber",children:(0,c.jsx)(n.code,{children:"eth_getMinerDataByBlockNumber"})}),"\n",(0,c.jsx)(n.p,{children:"Returns miner data for the specified block."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-49",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"}),"."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n",(0,c.jsx)(n.h4,{id:"returns-49",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#miner-data-object",children:"miner data object"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method": "eth_getMinerDataByBlockNumber","params": ["0x7689D2"],"id": 1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getMinerDataByBlockNumber",\n "params": ["0x7689D2"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "netBlockReward": "0x47c6f3739f3da800",\n "staticBlockReward": "0x4563918244f40000",\n "transactionFee": "0x38456548220800",\n "uncleInclusionReward": "0x22b1c8c1227a000",\n "uncleRewards": [\n {\n "hash": "0x2422d43b4f72e19faf4368949a804494f67559405046b39c6d45b1bd53044974",\n "coinbase": "0x0c062b329265c965deef1eede55183b3acb8f611"\n }\n ],\n "coinbase": "0xb42b6c4a95406c78ff892d270ad20b22642e102d",\n "extraData": "0xd583010502846765746885676f312e37856c696e7578",\n "difficulty": "0x7348c20",\n "totalDifficulty": "0xa57bcfdd96"\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getproof",children:(0,c.jsx)(n.code,{children:"eth_getProof"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the account and storage values of the specified account, including the Merkle proof."}),"\n",(0,c.jsx)(n.p,{children:"The API allows IoT devices or mobile apps which are unable to run light clients to verify responses from untrusted sources, by using a trusted block hash."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-50",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"address"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 20-byte address of the account or contract"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"keys"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," - list of 32-byte storage keys to generate proofs for"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"})," or ",(0,c.jsx)(n.code,{children:"blockHash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block\nnumber, block hash, or one of the string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or\n",(0,c.jsx)(n.code,{children:"safe"}),", as described in ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-50",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - account details object with the following fields:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"balance"}),": ",(0,c.jsx)(n.em,{children:"string"})," - account balance"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"codeHash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte hash of the account code"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"nonce"}),": ",(0,c.jsx)(n.em,{children:"string"})," - number of transactions sent from the account"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"storageHash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte SHA3 of the ",(0,c.jsx)(n.code,{children:"storageRoot"})]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"accountProof"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," - list of RLP-encoded Merkle tree nodes, starting with the ",(0,c.jsx)(n.code,{children:"stateRoot"})]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"storageProof"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of storage entry objects with the following fields:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"key"}),": ",(0,c.jsx)(n.em,{children:"string"})," - storage key"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"value"}),": ",(0,c.jsx)(n.em,{children:"string"})," - storage value"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"proof"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," - list of RLP-encoded Merkle tree nodes, starting with the ",(0,c.jsx)(n.code,{children:"storageHash"})]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method": "eth_getProof","params": [\n"0a8156e7ee392d885d10eaa86afd0e323afdcd95", ["0x0000000000000000000000000000000000000000000000000000000000000347"], "latest"],"id": 1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getProof",\n "params": [\n "0a8156e7ee392d885d10eaa86afd0e323afdcd95",\n ["0x0000000000000000000000000000000000000000000000000000000000000347"],\n "latest"\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "accountProof": [\n "0xf90211a0...608d898380",\n "0xf90211a0...ec33f19580",\n "0xf901d1a0...9e55584480",\n "0xf8718080...18e5777142"\n ],\n "address": "0x0a8156e7ee392d885d10eaa86afd0e323afdcd95",\n "balance": "0x0",\n "codeHash": "0x2b6975dcaf69f9bb9a3b30bb6a37b305ce440250bf0dd2f23338cb18e5777142",\n "nonce": "0x5f",\n "storageHash": "0x917688de43091589aa58c1dfd315105bc9de4478b9ba7471616a4d8a43d46203",\n "storageProof": [\n {\n "key": "0x0000000000000000000000000000000000000000000000000000000000000347",\n "value": "0x0",\n "proof": [\n "0xf90211a0...5176779280",\n "0xf901f1a0...c208d86580",\n "0xf8d180a0...1ce6808080"\n ]\n }\n ]\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getstorageat",children:(0,c.jsx)(n.code,{children:"eth_getStorageAt"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the value of a storage position at a specified address."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-51",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"address"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 20-byte storage address"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"index"}),": ",(0,c.jsx)(n.em,{children:"string"})," - integer index of the storage position"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"})," or ",(0,c.jsx)(n.code,{children:"blockHash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block\nnumber, block hash, or one of the string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or\n",(0,c.jsx)(n.code,{children:"safe"}),", as described in ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-51",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"})," : ",(0,c.jsx)(n.em,{children:"string"})," - value at the specified storage position"]}),"\n",(0,c.jsx)(n.p,{children:"Calculating the correct position depends on the storage you want to retrieve."}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method": "eth_getStorageAt","params": ["0x\u202d3B3F3E\u202c","0x0","latest"],"id": 53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getStorageAt",\n "params": ["0x\u202d3B3F3E\u202c", "0x0", "latest"],\n "id": 53\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": "0x0000000000000000000000000000000000000000000000000000000000000000"\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{account(address: \\"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73\\") {storage(slot: \\"0x04\\")}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n account(address: "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73") {\n storage(slot: "0x04")\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "account": {\n "storage": "0x0000000000000000000000000000000000000000000000000000000000000000"\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_gettransactionbyblockhashandindex",children:(0,c.jsx)(n.code,{children:"eth_getTransactionByBlockHashAndIndex"})}),"\n",(0,c.jsx)(n.p,{children:"Returns transaction information for the specified block hash and transaction index position."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-52",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"block"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte hash of a block"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"index"}),": ",(0,c.jsx)(n.em,{children:"string"})," - integer representing the transaction index position"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-52",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-object",children:"transaction object"}),", or ",(0,c.jsx)(n.code,{children:"null"})," when there is no transaction"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params":["0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7", "0x2"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getTransactionByBlockHashAndIndex",\n "params": [\n "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",\n "0x2"\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "blockHash": "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",\n "blockNumber": "0x1442e",\n "chainId": 2018,\n "from": "0x70c9217d814985faef62b124420f8dfbddd96433",\n "gas": "0x3d090",\n "gasPrice": "0x57148a6be",\n "hash": "0xfc766a71c406950d4a4955a340a092626c35083c64c7be907060368a5e6811d6",\n "input": "0x51a34eb8000000000000000000000000000000000000000000000029b9e659e41b780000",\n "nonce": "0x2cb2",\n "to": "0xcfdc98ec7f01dab1b67b36373524ce0208dc3953",\n "transactionIndex": "0x2",\n "value": "0x0",\n "v": "0x2a",\n "r": "0xa2d2b1021e1428740a7c67af3c05fe3160481889b25b921108ac0ac2c3d5d40a",\n "s": "0x63186d2aaefe188748bfb4b46fb9493cbc2b53cf36169e8501a5bc0ed941b484"\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{"query": "{ block(hash: \\"0x9270651f9c6fa36232c379d0ecf69b519383aa275815a65f1e03114346668f69\\") { transactionAt(index: 0) {block{hash} hash } } }"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n block(hash: "0x9270651f9c6fa36232c379d0ecf69b519383aa275815a65f1e03114346668f69") {\n transactionAt(index: 0) {\n block {\n hash\n }\n hash\n }\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "block": {\n "transactionAt": {\n "block": {\n "hash": "0x9270651f9c6fa36232c379d0ecf69b519383aa275815a65f1e03114346668f69"\n },\n "hash": "0x5f5366af89e8777d5ae62a1af94a0876bdccbc22417bed0aff361eefa3e37f86"\n }\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_gettransactionbyblocknumberandindex",children:(0,c.jsx)(n.code,{children:"eth_getTransactionByBlockNumberAndIndex"})}),"\n",(0,c.jsx)(n.p,{children:"Returns transaction information for the specified block number and transaction index position."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-53",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"index"}),": ",(0,c.jsx)(n.em,{children:"string"})," - transaction index position"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-53",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-object",children:"transaction object"}),", or ",(0,c.jsx)(n.code,{children:"null"})," when there is no transaction"]}),"\n",(0,c.jsxs)(n.p,{children:["This request returns the third transaction in the 82990 block on the Ropsten testnet. You can also view this ",(0,c.jsx)(n.a,{href:"https://ropsten.etherscan.io/txs?block=82990",children:"block"})," and ",(0,c.jsx)(n.a,{href:"https://ropsten.etherscan.io/tx/0xfc766a71c406950d4a4955a340a092626c35083c64c7be907060368a5e6811d6",children:"transaction"})," on Etherscan."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params":["82990", "0x2"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getTransactionByBlockNumberAndIndex",\n "params": ["82990", "0x2"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "blockHash": "0xbf137c3a7a1ebdfac21252765e5d7f40d115c2757e4a4abee929be88c624fdb7",\n "blockNumber": "0x1442e",\n "chainId": 2018,\n "from": "0x70c9217d814985faef62b124420f8dfbddd96433",\n "gas": "0x3d090",\n "gasPrice": "0x57148a6be",\n "hash": "0xfc766a71c406950d4a4955a340a092626c35083c64c7be907060368a5e6811d6",\n "input": "0x51a34eb8000000000000000000000000000000000000000000000029b9e659e41b780000",\n "nonce": "0x2cb2",\n "to": "0xcfdc98ec7f01dab1b67b36373524ce0208dc3953",\n "transactionIndex": "0x2",\n "value": "0x0",\n "v": "0x2a",\n "r": "0xa2d2b1021e1428740a7c67af3c05fe3160481889b25b921108ac0ac2c3d5d40a",\n "s": "0x63186d2aaefe188748bfb4b46fb9493cbc2b53cf36169e8501a5bc0ed941b484"\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{"query": "{block(number:20303) {transactionAt(index: 0) {block{hash} hash}}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:"{\n block(number: 20303) {\n transactionAt(index: 0) {\n block {\n hash\n }\n hash\n }\n }\n}\n"})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "block": {\n "transactionAt": {\n "block": {\n "hash": "0x9270651f9c6fa36232c379d0ecf69b519383aa275815a65f1e03114346668f69"\n },\n "hash": "0x5f5366af89e8777d5ae62a1af94a0876bdccbc22417bed0aff361eefa3e37f86"\n }\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_gettransactionbyhash",children:(0,c.jsx)(n.code,{children:"eth_getTransactionByHash"})}),"\n",(0,c.jsx)(n.p,{children:"Returns transaction information for the specified transaction hash."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-54",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"transaction"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte transaction hash"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-54",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-object",children:"transaction object"}),", or ",(0,c.jsx)(n.code,{children:"null"})," when there is no transaction"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getTransactionByHash",\n "params": [\n "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44"\n ],\n "id": 53\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": {\n "blockHash": "0x510efccf44a192e6e34bcb439a1947e24b86244280762cbb006858c237093fda",\n "blockNumber": "0x422",\n "chainId": 2018,\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas": "0x5208",\n "gasPrice": "0x3b9aca00",\n "hash": "0xa52be92809541220ee0aaaede6047d9a6c5d0cd96a517c854d944ee70a0ebb44",\n "input": "0x",\n "nonce": "0x1",\n "to": "0x627306090abab3a6e1400e9345bc60c78a8bef57",\n "transactionIndex": "0x0",\n "value": "0x4e1003b28d9280000",\n "v": "0xfe7",\n "r": "0x84caf09aefbd5e539295acc67217563438a4efb224879b6855f56857fa2037d3",\n "s": "0x5e863be3829812c81439f0ae9d8ecb832b531d651fb234c848d1bf45e62be8b9"\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{"query": "{transaction(hash : \\"0x03d80b9ca0a71435399a268609d6d7896f7155d2147cc22b780672bcb59b170d\\") { block{hash} gas gasPrice hash nonce value from {address} to {address} status}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n transaction(hash: "0x03d80b9ca0a71435399a268609d6d7896f7155d2147cc22b780672bcb59b170d") {\n block {\n hash\n }\n gas\n gasPrice\n hash\n nonce\n value\n from {\n address\n }\n to {\n address\n }\n status\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "transaction": {\n "block": {\n "hash": "0xb1ef35744bade6980c3a933024b2557a8c724a19e5fdd2116bac712aa5e57198"\n },\n "gas": 21000,\n "gasPrice": "0x2540be400",\n "hash": "0x03d80b9ca0a71435399a268609d6d7896f7155d2147cc22b780672bcb59b170d",\n "nonce": 6,\n "value": "0x8ac7230489e80000",\n "from": {\n "address": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"\n },\n "to": {\n "address": "0x9d8f8572f345e1ae53db1dfa4a7fce49b467bd7f"\n },\n "status": 1\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_gettransactioncount",children:(0,c.jsx)(n.code,{children:"eth_getTransactionCount"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns the number of transactions sent from a specified address. Use the ",(0,c.jsx)(n.code,{children:"pending"})," tag to get the next account nonce not used by any pending transactions."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-55",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"address"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 20-byte account address"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"})," or ",(0,c.jsx)(n.code,{children:"blockHash"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, block hash, or one of the string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-55",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - integer representing the number of transactions sent from the specified address"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0xc94770007dda54cF92009BFF0dE90c06F603a09f","latest"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getTransactionCount",\n "params": ["0xc94770007dda54cF92009BFF0dE90c06F603a09f", "latest"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x1"\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{ account (address:\\"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73\\"){transactionCount}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n account(address: "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73") {\n transactionCount\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "account": {\n "transactionCount": 5\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_gettransactionreceipt",children:(0,c.jsx)(n.code,{children:"eth_getTransactionReceipt"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the receipt of a transaction by transaction hash. Receipts for pending transactions are not available."}),"\n",(0,c.jsxs)(n.p,{children:["If you enabled ",(0,c.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/revert-reason",children:"revert reason"}),", the receipt includes available revert reasons in the response."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-56",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"transaction"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte hash of a transaction"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-56",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-receipt-object",children:"transaction receipt object"}),", or ",(0,c.jsx)(n.code,{children:"null"})," when there is no receipt"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getTransactionReceipt",\n "params": [\n "0x504ce587a65bdbdb6414a0c6c16d86a04dd79bfcc4f2950eec9634b30ce5370f"\n ],\n "id": 53\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",\n "blockNumber": "0x50",\n "contractAddress": null,\n "cumulativeGasUsed": "0x5208",\n "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",\n "gasUsed": "0x5208",\n "effectiveGasPrice": "0x1",\n "logs": [],\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "status": "0x1",\n "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",\n "transactionHash": "0xc00e97af59c6f88de163306935f7682af1a34c67245e414537d02e422815efc3",\n "transactionIndex": "0x0"\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{"query": "{transaction(hash: \\"0x5f5366af89e8777d5ae62a1af94a0876bdccbc22417bed0aff361eefa3e37f86\\") {block{hash logsBloom} hash createdContract{address} cumulativeGasUsed gas gasUsed logs{topics} from{address} to{address} index}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n transaction(hash: "0x5f5366af89e8777d5ae62a1af94a0876bdccbc22417bed0aff361eefa3e37f86") {\n block {\n hash\n logsBloom\n }\n hash\n createdContract {\n address\n }\n cumulativeGasUsed\n gas\n gasUsed\n logs {\n topics\n }\n from {\n address\n }\n to {\n address\n }\n index\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "transaction": {\n "block": {\n "hash": "0x9270651f9c6fa36232c379d0ecf69b519383aa275815a65f1e03114346668f69",\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"\n },\n "hash": "0x5f5366af89e8777d5ae62a1af94a0876bdccbc22417bed0aff361eefa3e37f86",\n "createdContract": null,\n "cumulativeGasUsed": 21000,\n "gas": 21000,\n "gasUsed": 21000,\n "effectiveGasPrice": "0x1",\n "logs": [],\n "from": {\n "address": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"\n },\n "to": {\n "address": "0x9d8f8572f345e1ae53db1dfa4a7fce49b467bd7f"\n },\n "index": 0\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getunclebyblockhashandindex",children:(0,c.jsx)(n.code,{children:"eth_getUncleByBlockHashAndIndex"})}),"\n",(0,c.jsx)(n.p,{children:"Returns uncle specified by block hash and index."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-57",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"block"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte block hash"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"uncleIndex"}),": ",(0,c.jsx)(n.em,{children:"string"})," - index of the uncle"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-57",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#block-object",children:"block object"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsx)(n.p,{children:"Uncles don't contain individual transactions."})}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getUncleByBlockHashAndIndex","params":["0xc48fb64230a82f65a08e7280bd8745e7fea87bc7c206309dee32209fe9a985f7", "0x0"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getUncleByBlockHashAndIndex",\n "params": [\n "0xc48fb64230a82f65a08e7280bd8745e7fea87bc7c206309dee32209fe9a985f7",\n "0x0"\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "difficulty": "0x76b123df93230",\n "extraData": "0x50505945206e616e6f706f6f6c2e6f7267",\n "gasLimit": "0x7a121d",\n "gasUsed": "0x7a0175",\n "hash": "0xc20189c0b1a4a23116ab3b177e929137f6e826f17fc4c2e880e7258c620e9817",\n "logsBloom": "0x890086c024487ca422be846a201a10e41bc2882902312116c1119609482031e9c000e2a708004a10281024028020c505727a12570c4810121c59024490b040894406a1c23c37a0094810921da3923600c71c03044b40924280038d07ab91964a008084264a01641380798840805a284cce201a8026045451002500113a00de441001320805ca2840037000111640d090442c11116d2112948084240242340400236ce81502063401dcc214b9105194d050884721c1208800b20501a4201400276004142f118e60808284506979a86e050820101c170c185e2310005205a82a2100382422104182090184800c02489e033440218142140045801c024cc1818485",\n "miner": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5",\n "mixHash": "0xf557cc827e058862aa3ea1bd6088fb8766f70c0eac4117c56cf85b7911f82a14",\n "nonce": "0xd320b48904347cdd",\n "number": "0x768964",\n "parentHash": "0x98d752708b3677df8f439c4529f999b94663d5494dbfc08909656db3c90f6255",\n "receiptsRoot": "0x0f838f0ceb73368e7fc8d713a7761e5be31e3b4beafe1a6875a7f275f82da45b",\n "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",\n "size": "0x21a",\n "stateRoot": "0xa0c7d4fca79810c89c517eff8dadb9c6d6f4bcc27c2edfb301301e1cf7dec642",\n "timestamp": "0x5cdcbba6",\n "totalDifficulty": "0x229ad33cabd4c40d23d",\n "transactionsRoot": "0x866e38e91d01ef0387b8e07ccf35cd910224271ccf2b7477b8c8439e8b70f365",\n "uncles": []\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{block(hash:\\"0xc48fb64230a82f65a08e7280bd8745e7fea87bc7c206309dee32209fe9a985f7\\"){ ommerAt(index: 0) {difficulty extraData gasLimit gasUsed hash logsBloom mixHash nonce number receiptsRoot stateRoot timestamp totalDifficulty transactionsRoot}}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n block(hash: "0xc48fb64230a82f65a08e7280bd8745e7fea87bc7c206309dee32209fe9a985f7") {\n ommerAt(index: 0) {\n difficulty\n extraData\n gasLimit\n gasUsed\n hash\n logsBloom\n mixHash\n nonce\n number\n receiptsRoot\n stateRoot\n timestamp\n totalDifficulty\n transactionsRoot\n }\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "block": {\n "difficulty": "0x1",\n "extraData": "0xf882a00000000000000000000000000000000000000000000000000000000000000000d5949811ebc35d7b06b3fa8dc5809a1f9c52751e1deb808400000000f843b8418e98ef756acdae1e510b1df4b507b7af04eb3802db7fa0f3e73e7d0721b3645e76f4eb3d0dbf0de75620c4405bd5a663247cdd9616482c883053856d857f884a01",\n "gasLimit": 4700000,\n "gasUsed": 0,\n "hash": "0x0efe67972b982eb6be5df84e5238eb07475f86afa8a7de708f6a13ac0ff60d6c",\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",\n "nonce": "0x0000000000000000",\n "number": 200,\n "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",\n "stateRoot": "0xd650578a04b39f50cc979155f4510ec28c2c0a7c1e5fdbf84609bc7b1c430f48",\n "timestamp": "0x5cd109fb",\n "totalDifficulty": "0xc9",\n "transactionsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getunclebyblocknumberandindex",children:(0,c.jsx)(n.code,{children:"eth_getUncleByBlockNumberAndIndex"})}),"\n",(0,c.jsx)(n.p,{children:"Returns uncle specified by block number and index."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-58",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"uncleIndex"}),": ",(0,c.jsx)(n.em,{children:"string"})," - index of the uncle"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-58",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#block-object",children:"block object"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsx)(n.p,{children:"Uncles do not contain individual transactions."})}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getUncleByBlockNumberAndIndex","params":["0x7689D2", "0x0"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getUncleByBlockNumberAndIndex",\n "params": ["0x7689D2", "0x0"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "difficulty": "0x77daec467bf93",\n "extraData": "0x50505945206e616e6f706f6f6c2e6f7267",\n "gasLimit": "0x7a121d",\n "gasUsed": "0x7a0f7b",\n "hash": "0x42d83ae9c0743f4b1f9c61ff7ea8b164c1bab3627decd49233760680be006ecf",\n "logsBloom": "0x888200800000340120220008640200500408006100038400100581c000080240080a0014e8002010080004088040004022402a000c18010001400100002a041141a0610a0052900600041018c0002a0003090020404c00206010010513d00020005380124e08050480710000000108401012b0901c1424006000083a10a8c1040100a0440081050210124400040044304070004001100000012600806008061d0320800000b40042160600002480000000800000c0002100200940801c000820800048024904710000400640490026000a44300309000286088010c2300060003011380006400200812009144042204810209020410a84000410520c08802941",\n "miner": "0x52bc44d5378309ee2abf1539bf71de1b7d7be3b5",\n "mixHash": "0xf977fcdb52868be410b75ef2becc35cc312f13ab0a6ce400ecd9d445f66fa3f2",\n "nonce": "0x628b28403bf1e3d3",\n "number": "0x7689d0",\n "parentHash": "0xb32cfdfbf4adb05d30f02fcc6fe039cc6666402142954051c1a1cb9cc91aa11e",\n "receiptsRoot": "0x9c7c8361d1a24ea2841432234c81974a9920d3eba2b2b1c496b5f925a95cb4ac",\n "sha3Uncles": "0x7d972aa1b182b7e93f1db043f03fbdbfac6874fe7e67e162141bcc0aefa6336b",\n "size": "0x21a",\n "stateRoot": "0x74e97b77813146344d75acb5a52a006cc6dfaca678a10fb8a484a8443e919272",\n "timestamp": "0x5cdcc0a7",\n "totalDifficulty": "0x229b0583b4bd2698ca0",\n "transactionsRoot": "0x1d21626afddf05e5866de66ca3fcd98f1caf5357eba0cc6ec675606e116a891b",\n "uncles": []\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{block(number:2587){ ommerAt(index: 0) {difficulty extraData gasLimit gasUsed hash logsBloom mixHash nonce number receiptsRoot stateRoot timestamp totalDifficulty transactionsRoot}}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:"{\n block(number: 2587) {\n ommerAt(index: 0) {\n difficulty\n extraData\n gasLimit\n gasUsed\n hash\n logsBloom\n mixHash\n nonce\n number\n receiptsRoot\n stateRoot\n timestamp\n totalDifficulty\n transactionsRoot\n }\n }\n}\n"})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "block": {\n "ommerAt": null\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getunclecountbyblockhash",children:(0,c.jsx)(n.code,{children:"eth_getUncleCountByBlockHash"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the number of uncles in a block from a block matching the given block hash."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-59",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"block"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte block hash"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-59",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - integer representing the number of uncles in the specified block"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockHash","params":["0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getUncleCountByBlockHash",\n "params": [\n "0xb903239f8543d04b5dc1ba6579132b143087c68db1b2168786408fcbce568238"\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": 0x0\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{block(hash:\\"0x65c08d792e4192b9ece6b6f2390da7da464208b22d88490be8add9373917b426\\"){ommerCount}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n block(hash: "0x65c08d792e4192b9ece6b6f2390da7da464208b22d88490be8add9373917b426") {\n ommerCount\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "block": {\n "ommerCount": 2\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_getunclecountbyblocknumber",children:(0,c.jsx)(n.code,{children:"eth_getUncleCountByBlockNumber"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the number of uncles in a block matching the specified block number."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-60",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n",(0,c.jsx)(n.h4,{id:"returns-60",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - integer representing the number of uncles in the specified block"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getUncleCountByBlockNumber","params":["0xe8"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_getUncleCountByBlockNumber",\n "params": ["0xe8"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x1"\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{block(number:\\"0x59fd\\"){ommerCount}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'{\n block(number: "0x59fd") {\n ommerCount\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "block": {\n "ommerCount": 0\n }\n }\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h3,{id:"eth_getwork-deprecated",children:[(0,c.jsx)(n.code,{children:"eth_getWork"})," (Deprecated)"]}),"\n",(0,c.jsx)(n.p,{children:"Returns the hash of the current block, the seed hash, and the required target boundary condition."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-61",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-61",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," - array with the following items:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"header"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte hash of the current block header (PoW-hash)"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"seed"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte seed hash used for the DAG"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"target"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte required target boundary condition: 2^256 / difficulty"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal integer representing the current block number"]}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_getWork","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "eth_getWork", "params": [], "id": 1 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "0xce5e32ca59cb86799a1879e90150b2c3b882852173e59865e9e79abb67a9d636",\n "0x0000000000000000000000000000000000000000000000000000000000000000",\n "0x00a3d70a3d70a3d70a3d70a3d70a3d70a3d70a3d70a3d70a3d70a3d70a3d70a3",\n "0x42"\n ]\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h3,{id:"eth_hashrate-deprecated",children:[(0,c.jsx)(n.code,{children:"eth_hashrate"})," (Deprecated)"]}),"\n",(0,c.jsx)(n.p,{children:"Returns the number of hashes per second with which the node is mining."}),"\n",(0,c.jsx)(n.p,{children:"When the stratum server is enabled, this method returns the cumulative hashrate of all sealers reporting their hashrate."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-62",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-62",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - number of hashes per second"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_hashrate","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"eth_hashrate","params":[],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x12b"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_maxpriorityfeepergas",children:(0,c.jsx)(n.code,{children:"eth_maxPriorityFeePerGas"})}),"\n",(0,c.jsx)(n.p,{children:"Returns an estimate of how much priority fee, in wei, you can pay to get a transaction included in the current block."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-63",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-63",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"hexadecimal"})," value in wei"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_maxPriorityFeePerGas","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "eth_maxPriorityFeePerGas", "params": [], "id": 1 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0xf4240"\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h3,{id:"eth_mining-deprecated",children:[(0,c.jsx)(n.code,{children:"eth_mining"})," (Deprecated)"]}),"\n",(0,c.jsx)(n.p,{children:"Whether the client is actively mining new blocks. Besu pauses mining while the client synchronizes with the network regardless of command settings or methods called."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-64",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-64",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - indicates if the client is actively mining new blocks"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_mining","params":[],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "eth_mining", "params": [], "id": 53 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": true\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_newblockfilter",children:(0,c.jsx)(n.code,{children:"eth_newBlockFilter"})}),"\n",(0,c.jsxs)(n.p,{children:["Creates a filter to retrieve new block hashes. To poll for new blocks, use ",(0,c.jsx)(n.a,{href:"#eth_getfilterchanges",children:(0,c.jsx)(n.code,{children:"eth_getFilterChanges"})}),"."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-65",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-65",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - filter ID"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_newBlockFilter","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "eth_newBlockFilter", "params": [], "id": 1 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x9d78b6780f844228b96ecc65a320a825"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_newfilter",children:(0,c.jsx)(n.code,{children:"eth_newFilter"})}),"\n",(0,c.jsxs)(n.p,{children:["Creates a ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/events-and-logs",children:"log filter"}),". To poll for logs associated with the created filter, use ",(0,c.jsx)(n.a,{href:"#eth_getfilterchanges",children:(0,c.jsx)(n.code,{children:"eth_getFilterChanges"})}),". To get all logs associated with the filter, use ",(0,c.jsx)(n.a,{href:"#eth_getfilterlogs",children:(0,c.jsx)(n.code,{children:"eth_getFilterLogs"})}),"."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-66",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"filterOptions"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#filter-options-object",children:"filter options object"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"fromBlock"})," and ",(0,c.jsx)(n.code,{children:"toBlock"})," in the filter options object default to ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n",(0,c.jsx)(n.h4,{id:"returns-66",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - filter ID"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_newFilter","params":[{"fromBlock":"earliest", "toBlock":"latest", "topics":[]}],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_newFilter",\n "params": [{ "fromBlock": "earliest", "toBlock": "latest", "topics": [] }],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x1ddf0c00989044e9b41cc0ae40272df3"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_newpendingtransactionfilter",children:(0,c.jsx)(n.code,{children:"eth_newPendingTransactionFilter"})}),"\n",(0,c.jsxs)(n.p,{children:["Creates a filter to retrieve new pending transactions hashes. To poll for new pending transactions, use ",(0,c.jsx)(n.a,{href:"#eth_getfilterchanges",children:(0,c.jsx)(n.code,{children:"eth_getFilterChanges"})}),"."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-67",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-67",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - filter ID"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_newPendingTransactionFilter","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_newPendingTransactionFilter",\n "params": [],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x443d6a77c4964707a8554c92f7e4debd"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_protocolversion",children:(0,c.jsx)(n.code,{children:"eth_protocolVersion"})}),"\n",(0,c.jsx)(n.p,{children:"Returns current Ethereum protocol version."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-68",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-68",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - Ethereum protocol version"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_protocolVersion","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "eth_protocolVersion", "params": [], "id": 1 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x3f"\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{protocolVersion}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:"{\n protocolVersion\n}\n"})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "protocolVersion": 63\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_sendrawtransaction",children:(0,c.jsx)(n.code,{children:"eth_sendRawTransaction"})}),"\n",(0,c.jsxs)(n.p,{children:["Sends a ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/send-transactions",children:"signed transaction"}),". A transaction can send ether, deploy a contract, or interact with a contract. Set the maximum transaction fee for transactions using the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-tx-feecap",children:(0,c.jsx)(n.code,{children:"--rpc-tx-feecap"})})," CLI option."]}),"\n",(0,c.jsxs)(n.p,{children:["You can interact with contracts using ",(0,c.jsx)(n.code,{children:"eth_sendRawTransaction"})," or ",(0,c.jsx)(n.a,{href:"#eth_call",children:(0,c.jsx)(n.code,{children:"eth_call"})}),"."]}),"\n",(0,c.jsxs)(n.p,{children:["To avoid exposing your private key, create signed transactions offline and send the signed transaction data using ",(0,c.jsx)(n.code,{children:"eth_sendRawTransaction"}),"."]}),"\n",(0,c.jsxs)(n.admonition,{type:"info",children:[(0,c.jsxs)(n.p,{children:["Besu doesn't implement ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/send-transactions",children:(0,c.jsx)(n.code,{children:"eth_sendTransaction"})}),"."]}),(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.a,{href:"https://docs.web3signer.consensys.net/",children:"Web3Signer"})," provides transaction signing and implements ",(0,c.jsx)(n.a,{href:"https://docs.web3signer.consensys.net/reference/api/json-rpc#eth_sendtransaction",children:(0,c.jsx)(n.code,{children:"eth_sendTransaction"})}),"."]})]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-69",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"transaction"}),": ",(0,c.jsx)(n.em,{children:"string"})," - signed transaction serialized to hexadecimal format"]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.a,{href:"/public-networks/how-to/send-transactions",children:"Creating and sending transactions"})," includes examples of creating signed transactions using the ",(0,c.jsx)(n.a,{href:"https://github.com/ethereum/web3.js/",children:"web3.js"})," library."]})}),"\n",(0,c.jsx)(n.h4,{id:"returns-69",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte transaction hash"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_sendRawTransaction","params":["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_sendRawTransaction",\n "params": [\n "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "id": 1,\n "jsonrpc": "2.0",\n "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "mutation {sendRawTransaction(data: \\"0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833\\")}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:'mutation {\n sendRawTransaction(data: "0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833")\n}\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "sendRawTransaction": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"\n }\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h3,{id:"eth_submithashrate-deprecated",children:[(0,c.jsx)(n.code,{children:"eth_submitHashrate"})," (Deprecated)"]}),"\n",(0,c.jsxs)(n.p,{children:["Submits the mining hashrate. This is used by mining software such as ",(0,c.jsx)(n.a,{href:"https://github.com/ethereum-mining/ethminer",children:"Ethminer"}),"."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-70",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"hashrate"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte hexadecimal string representation of the hashrate"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"id"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte random hexadecimal ID identifying the client"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-70",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - indicates if submission is successful"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0", "method":"eth_submitHashrate", "params":["0x0000000000000000000000000000000000000000000000000000000000500000", "0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_submitHashrate",\n "params": [\n "0x0000000000000000000000000000000000000000000000000000000000500000",\n "0x59daa26581d0acd1fce254fb7e85952f4c09d0915afd33d3886cd914bc7d283c"\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h3,{id:"eth_submitwork-deprecated",children:[(0,c.jsx)(n.code,{children:"eth_submitWork"})," (Deprecated)"]}),"\n",(0,c.jsxs)(n.p,{children:["Submits a proof of work (Ethash) solution. This is used by mining software such as ",(0,c.jsx)(n.a,{href:"https://github.com/ethereum-mining/ethminer",children:"Ethminer"}),"."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-71",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"nonce"}),": ",(0,c.jsx)(n.em,{children:"string"})," - retrieved 8-byte nonce"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"header"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-byte hash of the block header (PoW-hash)"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"digest"}),": ",(0,c.jsx)(n.em,{children:"string"})," - 32-bytes mix digest"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-71",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - indicates if the provided solution is valid"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0", "method":"eth_submitWork", "params":["0x0000000000000001", "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0xD1GE5700000000000000000000000000D1GE5700000000000000000000000000"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0", "method":"eth_submitWork", "params":["0x0000000000000001", "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef", "0xD1GE5700000000000000000000000000D1GE5700000000000000000000000000"],"id":73}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "id": 1,\n "jsonrpc": "2.0",\n "result": true\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_syncing",children:(0,c.jsx)(n.code,{children:"eth_syncing"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns an object with data about the synchronization status, or ",(0,c.jsx)(n.code,{children:"false"})," if not synchronizing."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:["Once the node reaches the head of the chain, ",(0,c.jsx)(n.code,{children:"eth_syncing"})," returns false, indicating that there is no active syncing target."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-72",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-72",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," or ",(0,c.jsx)(n.em,{children:"boolean"})," - synchronization status data object with the following fields, or ",(0,c.jsx)(n.code,{children:"false"})," if not synchronizing:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"startingBlock"}),": ",(0,c.jsx)(n.em,{children:"string"})," - index of the highest block on the blockchain when the network synchronization starts"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"currentBlock"}),": ",(0,c.jsx)(n.em,{children:"string"})," - index of the latest block (also known as the best block) for the current node (this is the same index that ",(0,c.jsx)(n.a,{href:"#eth_blocknumber",children:(0,c.jsx)(n.code,{children:"eth_blockNumber"})})," returns.)"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"highestBlock"}),": ",(0,c.jsx)(n.em,{children:"string"})," - index of the highest known block in the peer network (that is, the highest block so far discovered among peer nodes. This is the same value as ",(0,c.jsx)(n.code,{children:"currentBlock"})," if the current node has no peers.)"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pulledStates"}),": ",(0,c.jsx)(n.em,{children:"string"})," - if fast synchronizing, the number of state entries fetched so far, or ",(0,c.jsx)(n.code,{children:"null"})," if this is not known or not relevant (if full synchronizing or fully synchronized, this field is not returned.)"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"knownStates"}),": ",(0,c.jsx)(n.em,{children:"string"})," - if fast synchronizing, the number of states the node knows of so far, or ",(0,c.jsx)(n.code,{children:"null"})," if this is not known or not relevant (if full synchronizing or fully synchronized, this field is not returned.)"]}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":51}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "eth_syncing", "params": [], "id": 51 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 51,\n "result": {\n "startingBlock": "0x0",\n "currentBlock": "0x1518",\n "highestBlock": "0x9567a3",\n "pulledStates": "0x203ca",\n "knownStates": "0x200636"\n }\n}\n'})})}),(0,c.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{syncing{startingBlock currentBlock highestBlock pulledStates knownStates}}"}\' http://localhost:8547/graphql\n'})})}),(0,c.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-text",children:"{\n syncing {\n startingBlock\n currentBlock\n highestBlock\n pulledStates\n knownStates\n }\n}\n"})})}),(0,c.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "syncing": {\n "startingBlock": 0,\n "currentBlock": 5400,\n "highestBlock": 9791395,\n "pullStates": 132042,\n "knownStates": 2098742\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"eth_uninstallfilter",children:(0,c.jsx)(n.code,{children:"eth_uninstallFilter"})}),"\n",(0,c.jsx)(n.p,{children:"Uninstalls a filter with the specified ID. When a filter is no longer required, call this method."}),"\n",(0,c.jsxs)(n.p,{children:["Filters time out when not requested by ",(0,c.jsx)(n.a,{href:"#eth_getfilterchanges",children:(0,c.jsx)(n.code,{children:"eth_getFilterChanges"})})," or ",(0,c.jsx)(n.a,{href:"#eth_getfilterlogs",children:(0,c.jsx)(n.code,{children:"eth_getFilterLogs"})})," for 10 minutes."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-73",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"filterId"}),": ",(0,c.jsx)(n.em,{children:"string"})," - filter ID"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-73",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - indicates if the filter is successfully uninstalled"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_uninstallFilter","params":["0x70355a0b574b437eaa19fe95adfedc0a"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "eth_uninstallFilter",\n "params": ["0x70355a0b574b437eaa19fe95adfedc0a"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h2,{id:"miner-methods",children:[(0,c.jsx)(n.code,{children:"MINER"})," methods"]}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"MINER"})," API methods allow you to control the node's mining operation, or settings related to\nblock creation in general."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"MINER"})," API methods are not enabled by default for JSON-RPC. To enable the ",(0,c.jsx)(n.code,{children:"MINER"})," API methods, use the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,c.jsx)(n.code,{children:"--rpc-http-api"})})," or ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,c.jsx)(n.code,{children:"--rpc-ws-api"})})," options."]})}),"\n",(0,c.jsx)(n.h3,{id:"miner_changetargetgaslimit",children:(0,c.jsx)(n.code,{children:"miner_changeTargetGasLimit"})}),"\n",(0,c.jsxs)(n.p,{children:["Updates the target gas limit set using the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#target-gas-limit",children:(0,c.jsx)(n.code,{children:"--target-gas-limit"})})," command line option."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-74",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"gasPrice"}),": ",(0,c.jsx)(n.em,{children:"number"})," - target gas price in wei"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-74",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - ",(0,c.jsx)(n.code,{children:"Success"})," or ",(0,c.jsx)(n.code,{children:"error"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"miner_changeTargetGasLimit","params":[800000], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "miner_changeTargetGasLimit",\n "params": [800000],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "Success"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"miner_getextradata",children:(0,c.jsx)(n.code,{children:"miner_getExtraData"})}),"\n",(0,c.jsx)(n.p,{children:"Retrieves the current extra data field that is used when producing blocks."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-75",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-75",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - Hexadecimal string representation of the extra data bytes."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"miner_getExtraData","params":[], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "miner_getExtraData",\n "params": [],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x68656c6c6f20776f726c64"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"miner_getmingasprice",children:(0,c.jsx)(n.code,{children:"miner_getMinGasPrice"})}),"\n",(0,c.jsxs)(n.p,{children:["Gets the minimum gas price (in wei) offered by a transaction to be included in a block.\nThe initial value is set using the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#min-gas-price",children:(0,c.jsx)(n.code,{children:"--min-gas-price"})})," command line\noption, or is set to ",(0,c.jsx)(n.code,{children:"1000"})," if the command line option is not specified.\nUse ",(0,c.jsx)(n.a,{href:"#miner_setmingasprice",children:(0,c.jsx)(n.code,{children:"miner_setMinGasPrice"})})," to change the current value of the gas price."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-76",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-76",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - Minimum gas price (in wei) as a hexadecimal string"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"miner_getMinGasPrice","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "miner_getMinGasPrice",\n "params": [],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x3e8"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"miner_getminpriorityfee",children:(0,c.jsx)(n.code,{children:"miner_getMinPriorityFee"})}),"\n",(0,c.jsxs)(n.p,{children:["Gets the minimum priority fee per gas (in wei) offered by a transaction to be included in a block. The initial value is set using the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#min-priority-fee",children:(0,c.jsx)(n.code,{children:"--min-priority-fee"})})," command line option, or is set to ",(0,c.jsx)(n.code,{children:"0"})," if the command line option is not specified.\nUse ",(0,c.jsx)(n.a,{href:"#miner_setminpriorityfee",children:(0,c.jsx)(n.code,{children:"miner_setMinPriorityFee"})})," to change the current value of the fee."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-77",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-77",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - Minimum priority fee per gas (in wei) as a hexadecimal string"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"miner_getMinPriorityFee","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "miner_getMinPriorityFee",\n "params": [],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x1"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"miner_setcoinbase",children:(0,c.jsx)(n.code,{children:"miner_setCoinbase"})}),"\n",(0,c.jsx)(n.p,{children:"Sets the coinbase, the address for the mining rewards."}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:["You can also use ",(0,c.jsx)(n.code,{children:"miner_setEtherbase"})," as an alternative method. They both work the same way. Etherbase is a historic name for coinbase."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-78",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"coinbase"}),": ",(0,c.jsx)(n.em,{children:"string"})," - Account address you pay mining rewards to"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-78",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," when address is set"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"miner_setCoinbase","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "miner_setCoinbase",\n "params": ["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"miner_setextradata",children:(0,c.jsx)(n.code,{children:"miner_setExtraData"})}),"\n",(0,c.jsx)(n.p,{children:"Sets a new value for the extra data field that is used when producing blocks."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-79",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"extraData"}),": ",(0,c.jsx)(n.em,{children:"string"})," - Hexadecimal representation of the extra data field, with a maximum of 32 bytes."]}),"\n",(0,c.jsx)(n.h4,{id:"returns-79",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - ",(0,c.jsx)(n.code,{children:"true"})," or ",(0,c.jsx)(n.code,{children:"false"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"miner_setExtraData","params":["0x0010203"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "miner_setExtraData",\n "params": ["0x0010203"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "params": ["0x0010203"],\n "id": 1,\n "result": "true"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"miner_setmingasprice",children:(0,c.jsx)(n.code,{children:"miner_setMinGasPrice"})}),"\n",(0,c.jsxs)(n.p,{children:["Sets the minimum gas price (in wei) offered by a transaction to be included in a block.\nThe initial value is set using the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#min-gas-price",children:(0,c.jsx)(n.code,{children:"--min-gas-price"})})," command line\noption, or is set to ",(0,c.jsx)(n.code,{children:"1000"})," if the command line option is not specified.\nUse ",(0,c.jsx)(n.a,{href:"#miner_getmingasprice",children:(0,c.jsx)(n.code,{children:"miner_getMinGasPrice"})})," to get the current value of the gas price."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-80",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"minGasPrice"}),": ",(0,c.jsx)(n.em,{children:"string"})," - Minimum gas price in hexadecimal"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-80",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," when the gas price is set"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"miner_setMinGasPrice","params":["0x5dc"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "miner_setMinGasPrice",\n "params": ["0x5dc"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"miner_setminpriorityfee",children:(0,c.jsx)(n.code,{children:"miner_setMinPriorityFee"})}),"\n",(0,c.jsxs)(n.p,{children:["Sets the minimum priority fee per gas (in wei) offered by a transaction to be included in a block.\nThe initial value is set using the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#min-priority-fee",children:(0,c.jsx)(n.code,{children:"--min-priority-fee"})})," command line option, or is set to ",(0,c.jsx)(n.code,{children:"0"})," if the command line option is not specified.\nUse ",(0,c.jsx)(n.a,{href:"#miner_getminpriorityfee",children:(0,c.jsx)(n.code,{children:"miner_getMinPriorityFee"})})," to get the current value of the fee."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-81",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"minPriorityFeePerGas"}),": ",(0,c.jsx)(n.em,{children:"string"})," - Minimum priority fee per gas in hexadecimal"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-81",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," when the fee is set"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"miner_setMinPriorityFee","params":["0x0a"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "miner_setMinPriorityFee",\n "params": ["0x0a"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h3,{id:"miner_start-deprecated",children:[(0,c.jsx)(n.code,{children:"miner_start"})," (Deprecated)"]}),"\n",(0,c.jsxs)(n.p,{children:["Starts the mining process.\nTo start mining, you must first specify a miner coinbase using the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#miner-coinbase",children:(0,c.jsx)(n.code,{children:"--miner-coinbase"})})," command line option or using ",(0,c.jsx)(n.a,{href:"#miner_setcoinbase",children:(0,c.jsx)(n.code,{children:"miner_setCoinbase"})}),"."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-82",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-82",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," if mining starts, or if the node is already mining"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"miner_start","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "miner_start", "params": [], "id": 1 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h3,{id:"miner_stop-deprecated",children:[(0,c.jsx)(n.code,{children:"miner_stop"})," (Deprecated)"]}),"\n",(0,c.jsx)(n.p,{children:"Stops the mining process on the client."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-83",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-83",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - ",(0,c.jsx)(n.code,{children:"true"})," if mining stops, or if the node is not mining"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"miner_stop","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "miner_stop", "params": [], "id": 1 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h2,{id:"net-methods",children:[(0,c.jsx)(n.code,{children:"NET"})," methods"]}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"NET"})," API methods provide network-related information."]}),"\n",(0,c.jsx)(n.h3,{id:"net_enode",children:(0,c.jsx)(n.code,{children:"net_enode"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns the ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"}),"."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-84",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-84",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," of the node"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"net_enode","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"net_enode","params":[],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "enode://6a63160d0ccef5e4986d270937c6c8d60a9a4d3b25471cda960900d037c61988ea14da67f69dbfb3497c465d0de1f001bb95598f74b68a39a5156a608c42fa1b@127.0.0.1:30303"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"net_listening",children:(0,c.jsx)(n.code,{children:"net_listening"})}),"\n",(0,c.jsx)(n.p,{children:"Whether the client is actively listening for network connections."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-85",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-85",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"boolean"})," - indicates if the client is actively listening for network connections"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"net_listening","params":[],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"net_listening","params":[],"id":53}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": true\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"net_peercount",children:(0,c.jsx)(n.code,{children:"net_peerCount"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the number of peers currently connected to the client."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-86",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-86",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - number of connected peers in hexadecimal"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "net_peerCount", "params": [], "id": 53 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": "0x5"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"net_services",children:(0,c.jsx)(n.code,{children:"net_services"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns enabled services (for example, ",(0,c.jsx)(n.code,{children:"jsonrpc"}),") and the host and port for each service."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#nat-method",children:(0,c.jsx)(n.code,{children:"--nat-method"})})," setting affects the JSON-RPC and P2P host and port values, but not the metrics host and port values."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-87",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-87",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - enabled services"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"net_services","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"net_services","params":[],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "jsonrpc": {\n "host": "127.0.0.1",\n "port": "8545"\n },\n "p2p": {\n "host": "127.0.0.1",\n "port": "30303"\n },\n "metrics": {\n "host": "127.0.0.1",\n "port": "9545"\n }\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"net_version",children:(0,c.jsx)(n.code,{children:"net_version"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns the ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/network-and-chain-id",children:"network ID"}),"."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-88",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-88",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - current network ID"]}),"\n",(0,c.jsxs)(n.table,{children:[(0,c.jsx)(n.thead,{children:(0,c.jsxs)(n.tr,{children:[(0,c.jsx)(n.th,{children:"Network ID"}),(0,c.jsx)(n.th,{children:"Chain"}),(0,c.jsx)(n.th,{children:"Network"}),(0,c.jsx)(n.th,{children:"Description"})]})}),(0,c.jsxs)(n.tbody,{children:[(0,c.jsxs)(n.tr,{children:[(0,c.jsx)(n.td,{children:(0,c.jsx)(n.code,{children:"1"})}),(0,c.jsx)(n.td,{children:"ETH"}),(0,c.jsx)(n.td,{children:"Mainnet"}),(0,c.jsx)(n.td,{children:"Main Ethereum network"})]}),(0,c.jsxs)(n.tr,{children:[(0,c.jsx)(n.td,{children:(0,c.jsx)(n.code,{children:"17000"})}),(0,c.jsx)(n.td,{children:"ETH"}),(0,c.jsx)(n.td,{children:"Holesky"}),(0,c.jsx)(n.td,{children:"PoS test network"})]}),(0,c.jsxs)(n.tr,{children:[(0,c.jsx)(n.td,{children:(0,c.jsx)(n.code,{children:"11155111"})}),(0,c.jsx)(n.td,{children:"ETH"}),(0,c.jsx)(n.td,{children:"Sepolia"}),(0,c.jsx)(n.td,{children:"PoS test network"})]}),(0,c.jsxs)(n.tr,{children:[(0,c.jsx)(n.td,{children:(0,c.jsx)(n.code,{children:"2018"})}),(0,c.jsx)(n.td,{children:"ETH"}),(0,c.jsx)(n.td,{children:"Dev"}),(0,c.jsx)(n.td,{children:"PoW development network"})]}),(0,c.jsxs)(n.tr,{children:[(0,c.jsx)(n.td,{children:(0,c.jsx)(n.code,{children:"1"})}),(0,c.jsx)(n.td,{children:"ETC"}),(0,c.jsx)(n.td,{children:"Classic"}),(0,c.jsx)(n.td,{children:"Main Ethereum Classic network"})]}),(0,c.jsxs)(n.tr,{children:[(0,c.jsx)(n.td,{children:(0,c.jsx)(n.code,{children:"7"})}),(0,c.jsx)(n.td,{children:"ETC"}),(0,c.jsx)(n.td,{children:"Mordor"}),(0,c.jsx)(n.td,{children:"PoW test network"})]})]})]}),"\n",(0,c.jsxs)(n.admonition,{type:"note",children:[(0,c.jsx)(n.p,{children:"For almost all networks, network ID and chain ID are the same."}),(0,c.jsxs)(n.p,{children:["The only networks in the table above with different network and chain IDs are Classic with a chain ID of ",(0,c.jsx)(n.code,{children:"61"})," and Mordor with a chain ID of ",(0,c.jsx)(n.code,{children:"63"}),"."]})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"net_version","params":[],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "net_version", "params": [], "id": 53 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result for Mainnet",label:"JSON result for Mainnet",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 51,\n "result": "1"\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result for Holesky",label:"JSON result for Holesky",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": "5"\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h2,{id:"plugins-methods",children:[(0,c.jsx)(n.code,{children:"PLUGINS"})," methods"]}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"PLUGINS"})," API methods provide plugin-related functionality."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"PLUGINS"})," API methods are not enabled by default for JSON-RPC. To enable the ",(0,c.jsx)(n.code,{children:"PLUGINS"})," API methods, use the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,c.jsx)(n.code,{children:"--rpc-http-api"})})," or ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,c.jsx)(n.code,{children:"--rpc-ws-api"})})," options."]})}),"\n",(0,c.jsx)(n.h3,{id:"plugins_reloadpluginconfig",children:(0,c.jsx)(n.code,{children:"plugins_reloadPluginConfig"})}),"\n",(0,c.jsx)(n.p,{children:"Reloads specified plugin configuration."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-89",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"plugin"}),": ",(0,c.jsx)(n.em,{children:"string"})," - plugin"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-89",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - ",(0,c.jsx)(n.code,{children:"Success"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"plugins_reloadPluginConfig","params":["tech.pegasys.plus.plugin.kafka.KafkaPlugin"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "plugins_reloadPluginConfig",\n "params": ["tech.pegasys.plus.plugin.kafka.KafkaPlugin"],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "Success"\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h2,{id:"trace-methods",children:[(0,c.jsx)(n.code,{children:"TRACE"})," methods"]}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"TRACE"})," API is a more concise alternative to the ",(0,c.jsxs)(n.a,{href:"#debug-methods",children:[(0,c.jsx)(n.code,{children:"DEBUG"})," API"]}),"."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"TRACE"})," API methods are not enabled by default for JSON-RPC. To enable the ",(0,c.jsx)(n.code,{children:"TRACE"})," API methods, use the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,c.jsx)(n.code,{children:"--rpc-http-api"})})," or ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,c.jsx)(n.code,{children:"--rpc-ws-api"})})," options."]})}),"\n",(0,c.jsx)(n.h3,{id:"trace_block",children:(0,c.jsx)(n.code,{children:"trace_block"})}),"\n",(0,c.jsxs)(n.p,{children:["Provides transaction processing of ",(0,c.jsxs)(n.a,{href:"/public-networks/reference/trace-types#trace",children:["type ",(0,c.jsx)(n.code,{children:"trace"})]})," for the specified block."]}),"\n",(0,c.jsx)(n.admonition,{title:"note",type:"info",children:(0,c.jsxs)(n.p,{children:["Your node must be an ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/node-sync#archive-nodes",children:"archive node"}),", or\nthe requested block must be within the number of\n",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#bonsai-historical-block-limit",children:"blocks retained"})," when using\n",(0,c.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai"})," (by default, 512 from the head of the chain)."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-90",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n",(0,c.jsx)(n.h4,{id:"returns-90",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/trace-types#trace",children:"calls to other contracts"})," containing one object per call, in transaction execution order; if revert reason is enabled with ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#revert-reason-enabled",children:(0,c.jsx)(n.code,{children:"--revert-reason-enabled"})}),", the returned list items include the ",(0,c.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/revert-reason",children:"revert reason"}),"."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"trace_block","params":["0x6"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "trace_block", "params": ["0x6"], "id": 1 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "result": [\n {\n "action": {\n "callType": "call",\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas": "0xffad82",\n "input": "0x0000000000000000000000000000000000000999",\n "to": "0x0020000000000000000000000000000000000000",\n "value": "0x0"\n },\n "blockHash": "0x71512d31e18f828cef069a87bc2c7514a8ca334f9ee72625efdf5cc2d43768dd",\n "blockNumber": 6,\n "result": {\n "gasUsed": "0x7536",\n "output": "0x"\n },\n "subtraces": 1,\n "traceAddress": [],\n "transactionHash": "0x91eeabc671e2dd2b1c8ddebb46ba59e8cb3e7d189f80bcc868a9787728c6e59e",\n "transactionPosition": 0,\n "type": "call"\n },\n {\n "action": {\n "address": "0x0020000000000000000000000000000000000000",\n "balance": "0x300",\n "refundAddress": "0x0000000000000999000000000000000000000000"\n },\n "blockHash": "0x71512d31e18f828cef069a87bc2c7514a8ca334f9ee72625efdf5cc2d43768dd",\n "blockNumber": 6,\n "result": null,\n "subtraces": 0,\n "traceAddress": [0],\n "transactionHash": "0x91eeabc671e2dd2b1c8ddebb46ba59e8cb3e7d189f80bcc868a9787728c6e59e",\n "transactionPosition": 0,\n "type": "suicide"\n },\n {\n "action": {\n "author": "0x0000000000000000000000000000000000000000",\n "rewardType": "block",\n "value": "0x1bc16d674ec80000"\n },\n "blockHash": "0x71512d31e18f828cef069a87bc2c7514a8ca334f9ee72625efdf5cc2d43768dd",\n "blockNumber": 6,\n "result": null,\n "subtraces": 0,\n "traceAddress": [],\n "transactionHash": null,\n "transactionPosition": null,\n "type": "reward"\n }\n ],\n "id": 1\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"trace_call",children:(0,c.jsx)(n.code,{children:"trace_call"})}),"\n",(0,c.jsx)(n.p,{children:"Executes the given call and returns a number of possible traces for it."}),"\n",(0,c.jsx)(n.admonition,{title:"note",type:"info",children:(0,c.jsxs)(n.p,{children:["When using ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai"}),", the requested block must\nbe within the number of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#bonsai-historical-block-limit",children:"blocks retained"})," (by\ndefault, 512 from the head of the chain)."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-91",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"call"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-call-object",children:"transaction call object"})]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"options"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," - list of tracing options; tracing options are ",(0,c.jsxs)(n.a,{href:"/public-networks/reference/trace-types",children:[(0,c.jsx)(n.code,{children:"trace"}),", ",(0,c.jsx)(n.code,{children:"vmTrace"}),", and ",(0,c.jsx)(n.code,{children:"stateDiff"})]}),". Specify any combination of the three options including none of them."]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-91",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/trace-types#trace",children:"calls to other contracts"})," containing one object per call, in transaction execution order"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"trace_call","params":[{"from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73","to":"0x0010000000000000000000000000000000000000","gas":"0xfffff2","gasPrice":"0xef","value":"0x0","data":"0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002","nonce":"0x0"},["trace"],"latest"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "trace_call",\n "params": [\n {\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "to": "0x0010000000000000000000000000000000000000",\n "gas": "0xfffff2",\n "gasPrice": "0xef",\n "value": "0x0",\n "data": "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002",\n "nonce": "0x0"\n },\n ["trace"],\n "latest"\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "result": {\n "output" : "0x",\n "stateDiff" : null,\n "trace" : [ {\n "action" : {\n "callType" : "call",\n "from" : "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas" : "0xffabba",\n "input" : "0x0000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002",\n "to" : "0x0010000000000000000000000000000000000000",\n "value" : "0x0"\n },\n "result" : {\n "gasUsed" : "0x9c58",\n "output" : "0x"\n },\n "subtraces" : 0,\n "traceAddress" : [ ],\n "type" : "call"\n } ],\n "vmTrace" : null\n },\n"id" : 2\n},\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"trace_callmany",children:(0,c.jsx)(n.code,{children:"trace_callMany"})}),"\n",(0,c.jsx)(n.p,{children:"Performs multiple call traces on top of the same block. You can trace dependent transactions."}),"\n",(0,c.jsx)(n.admonition,{title:"note",type:"info",children:(0,c.jsxs)(n.p,{children:["When using ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai"}),", the requested block must\nbe within the number of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#bonsai-historical-block-limit",children:"blocks retained"})," (by\ndefault, 512 from the head of the chain)."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-92",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"options"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," - list of tracing options; tracing options are ",(0,c.jsxs)(n.a,{href:"/public-networks/reference/trace-types",children:[(0,c.jsx)(n.code,{children:"trace"}),", ",(0,c.jsx)(n.code,{children:"vmTrace"}),", and ",(0,c.jsx)(n.code,{children:"stateDiff"})]}),". Specify any combination of the three options including none of them."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-92",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/trace-types#trace",children:"calls to other contracts"})," containing one object per call, in transaction execution order"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"trace_callMany","params":[[[{"from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1","to":"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b","value":"0x186a0"},["trace"]],[{"from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1","to":"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b","value":"0x186a0"},["trace"]]],"latest"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{"jsonrpc":"2.0","method":"trace_callMany","params":[[[{"from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1","to":"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b","value":"0x186a0"},["trace"]],[{"from":"0x407d73d8a49eeb85d32cf465507dd71d507100c1","to":"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b","value":"0x186a0"},["trace"]]],"latest"],"latest"],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "result": [\n {\n "output" : "0x",\n "stateDiff" : null,\n "trace" : [ {\n "action" : {\n "callType" : "call",\n "from" : "0x407d73d8a49eeb85d32cf465507dd71d507100c1",\n "gas" : "0x1dcd12f8",\n "input" : "0x",\n "to" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",\n "value" : "0x186a0"\n },\n "result" : {\n "gasUsed" : "0x0",\n "output" : "0x"\n },\n "subtraces" : 0,\n "traceAddress" : [ ],\n "type" : "call"\n } ],\n "vmTrace" : null\n },\n {\n "output" : "0x",\n "stateDiff" : null,\n "trace" : [ {\n "action" : {\n "callType" : "call",\n "from" : "0x407d73d8a49eeb85d32cf465507dd71d507100c1",\n "gas" : "0x1dcd12f8",\n "input" : "0x",\n "to" : "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",\n "value" : "0x186a0"\n },\n "result" : {\n "gasUsed" : "0x0",\n "output" : "0x"\n },\n "subtraces" : 0,\n "traceAddress" : [ ],\n "type" : "call"\n } ],\n "vmTrace" : null\n },\n ],\n"id" : 1\n},\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"trace_filter",children:(0,c.jsx)(n.code,{children:"trace_filter"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns traces matching the specified filter. The maximum number of blocks you can supply to ",(0,c.jsx)(n.code,{children:"trace_filter"})," is 1000 by default. You can adjust this limit using the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-max-trace-filter-range",children:(0,c.jsx)(n.code,{children:"--rpc-max-trace-filter-range"})})," option."]}),"\n",(0,c.jsx)(n.admonition,{title:"note",type:"info",children:(0,c.jsxs)(n.p,{children:["Your node must be an ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/node-sync#archive-nodes",children:"archive node"}),", or\nthe requested blocks must be within the number of\n",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#bonsai-historical-block-limit",children:"blocks retained"})," when using\n",(0,c.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai"})," (by default, 512 from the head of the chain)."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-93",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"traceFilterOptions"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#trace-filter-options-object",children:"trace filter options object"})]}),"\n",(0,c.jsx)(n.h4,{id:"returns-93",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/trace-types#trace",children:"calls to other contracts"})," containing one object per call, in transaction execution order"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"trace_filter","params":[{"fromBlock":"0x1","toBlock":"0x21","after":2,"count":2,"fromAddress":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"]}],"id":415}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "trace_filter",\n "params": [\n {\n "fromBlock": "0x1",\n "toBlock": "0x21",\n "after": 2,\n "count": 2,\n "fromAddress": ["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"]\n }\n ],\n "id": 415\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "result": [\n {\n "action": {\n "callType": "call",\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas": "0xffad82",\n "input": "0x0000000000000000000000000000000000000999",\n "to": "0x0020000000000000000000000000000000000000",\n "value": "0x0"\n },\n "blockHash": "0xcd5d9c7acdcbd3fb4b24a39e05a38e32235751bb0c9e4f1aa16dc598a2c2a9e4",\n "blockNumber": 6,\n "result": {\n "gasUsed": "0x7536",\n "output": "0x"\n },\n "subtraces": 1,\n "traceAddress": [],\n "transactionHash": "0x91eeabc671e2dd2b1c8ddebb46ba59e8cb3e7d189f80bcc868a9787728c6e59e",\n "transactionPosition": 0,\n "type": "call"\n },\n {\n "action": {\n "callType": "call",\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas": "0xffad52",\n "input": "0xf000000000000000000000000000000000000000000000000000000000000001",\n "to": "0x0030000000000000000000000000000000000000",\n "value": "0x0"\n },\n "blockHash": "0xeed85fe57db751442c826cfe4fdf43b10a5c2bc8b6fd3a8ccced48eb3fb35885",\n "blockNumber": 7,\n "result": {\n "gasUsed": "0x1b",\n "output": "0xf000000000000000000000000000000000000000000000000000000000000002"\n },\n "subtraces": 0,\n "traceAddress": [],\n "transactionHash": "0x47f4d445ea1812cb1ddd3464ab23d2bfc6ed408a8a9db1c497f94e8e06e85286",\n "transactionPosition": 0,\n "type": "call"\n }\n ],\n "id": 415\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"trace_get",children:(0,c.jsx)(n.code,{children:"trace_get"})}),"\n",(0,c.jsx)(n.p,{children:"Returns a trace at the given position."}),"\n",(0,c.jsx)(n.admonition,{title:"note",type:"info",children:(0,c.jsxs)(n.p,{children:["Your node must be an ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/node-sync#archive-nodes",children:"archive node"}),", or\nthe requested transaction must be contained in a block within the number of\n",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#bonsai-historical-block-limit",children:"blocks retained"})," when using\n",(0,c.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai"})," (by default, 512 from the head of the chain)."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-94",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"transaction"}),": ",(0,c.jsx)(n.em,{children:"string"})," - transaction hash"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"indexPositions"}),": ",(0,c.jsx)(n.em,{children:"array"})," - Index positions of the traces"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-94",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/trace-types#trace",children:"calls to other contracts"})," containing one object per call, in the order called by the transaction"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"trace_get","params":["0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",["0x0"]],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "trace_get",\n "params": [\n "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",\n ["0x0"]\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "result": {\n "action" : {\n "callType" : "call",\n "from" : "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",\n "gas" : "0x13e99",\n "input" : "0x16c72721",\n "to" : "0x2bd2326c993dfaef84f696526064ff22eba5b362",\n "value" : "0x0"\n },\n "blockHash" : "0x7eb25504e4c202cf3d62fd585d3e238f592c780cca82dacb2ed3cb5b38883add"\n "blockNumber": 3068185,\n "result": {\n "gasUsed": "0x183",\n "output" : "0x0000000000000000000000000000000000000000000000000000000000000001"\n },\n "subtraces" : 0,\n "traceAddress" : [\n 0\n ],\n "transactionHash": "0x17104ac9d3312d8c136b7f44d4b8b47852618065ebfa534bd2d3b5ef218ca1f3",\n "transactionPosition": 2,\n "type" : "call"\n },\n"id" : 1\n},\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"trace_rawtransaction",children:(0,c.jsx)(n.code,{children:"trace_rawTransaction"})}),"\n",(0,c.jsxs)(n.p,{children:["Traces a call to ",(0,c.jsx)(n.code,{children:"eth_sendRawTransaction"})," without making the call, returning the traces."]}),"\n",(0,c.jsx)(n.admonition,{title:"note",type:"info",children:(0,c.jsxs)(n.p,{children:["When using ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai"}),", the requested transaction\nmust be contained in a block within the number of\n",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#bonsai-historical-block-limit",children:"blocks retained"})," (by default, 512 from the head of\nthe chain)."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-95",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"data"})," - ",(0,c.jsx)(n.em,{children:"string"})," - Raw transaction data"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"options"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," - list of tracing options; tracing options are ",(0,c.jsxs)(n.a,{href:"/public-networks/reference/trace-types",children:[(0,c.jsx)(n.code,{children:"trace"}),", ",(0,c.jsx)(n.code,{children:"vmTrace"}),", and ",(0,c.jsx)(n.code,{children:"stateDiff"})]}),". Specify any combination of the three options including none of them."]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-95",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/trace-types#trace",children:"calls to other contracts"})," containing one object per call, in the order called by the transaction"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"trace_rawTransaction","params":["0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",["trace"]],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "trace_rawTransaction",\n "params": [\n "0xd46e8dd67c5d32be8d46e8dd67c5d32be8058bb8eb970870f072445675058bb8eb970870f072445675",\n ["trace"]\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "result": {\n "output" : "0x"\n "stateDiff": null,\n "from" : "0x1c39ba39e4735cb65978d4db400ddd70a72dc750",\n "trace": [{\n "action": { ... },\n "result": {\n "gasUsed": "0x0",\n "output": "0x"\n }\n "subtraces": 0,\n "traceAddress": [],\n "type": "call"\n }],\n "vmTrace": null\n },\n"id" : 1\n},\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"trace_replayblocktransactions",children:(0,c.jsx)(n.code,{children:"trace_replayBlockTransactions"})}),"\n",(0,c.jsx)(n.p,{children:"Provides transaction processing tracing per block."}),"\n",(0,c.jsx)(n.admonition,{title:"note",type:"info",children:(0,c.jsxs)(n.p,{children:["When using ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai"}),", the requested block must\nbe within the number of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#bonsai-historical-block-limit",children:"blocks retained"})," (by\ndefault, 512 from the head of the chain)."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-96",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,c.jsx)(n.code,{children:"latest"}),", ",(0,c.jsx)(n.code,{children:"earliest"}),", ",(0,c.jsx)(n.code,{children:"pending"}),", ",(0,c.jsx)(n.code,{children:"finalized"}),", or ",(0,c.jsx)(n.code,{children:"safe"}),", as described in\n",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"pending"})," returns the same value as ",(0,c.jsx)(n.code,{children:"latest"}),"."]})}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"options"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," - list of tracing options; tracing options are ",(0,c.jsxs)(n.a,{href:"/public-networks/reference/trace-types",children:[(0,c.jsx)(n.code,{children:"trace"}),", ",(0,c.jsx)(n.code,{children:"vmTrace"}),", and ",(0,c.jsx)(n.code,{children:"stateDiff"})]}),". Specify any combination of the three options including none of them."]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-96",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#transaction-trace-object",children:"transaction trace objects"})," containing one object per transaction, in transaction execution order; if revert reason is enabled with ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#revert-reason-enabled",children:(0,c.jsx)(n.code,{children:"--revert-reason-enabled"})}),", the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/trace-types#trace",children:(0,c.jsx)(n.code,{children:"trace"})})," list items in the returned transaction trace object include the ",(0,c.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/revert-reason",children:"revert reason"}),"."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc": "2.0", "method": "trace_replayBlockTransactions","params": ["0x12",["trace","vmTrace","stateDiff"]],"id": 1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "trace_replayBlockTransactions",\n "params": ["0x12", ["trace", "vmTrace", "stateDiff"]],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result":[\n {\n "output":"0x",\n "vmTrace":{\n "code":"0x7f3940be4289e4c3587d88c1856cc95352461992db0a584c281226faefe560b3016000527f14c4d2c102bdeb2354bfc3dc96a95e4512cf3a8461e0560e2272dbf884ef3905601052600851",\n "ops":[\n {\n "cost":3,\n "ex":{\n "mem":null,\n "push":[\n "0x8"\n ],\n "store":null,\n "used":16756175\n },\n "pc":72,\n "sub":null\n },\n ...\n ]\n },\n "trace":[\n {\n "action":{\n "callType":"call",\n "from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas":"0xffadea",\n "input":"0x",\n "to":"0x0100000000000000000000000000000000000000",\n "value":"0x0"\n },\n "result":{\n "gasUsed":"0x1e",\n "output":"0x"\n },\n "subtraces":0,\n "traceAddress":[\n ],\n "type":"call"\n }\n ],\n "stateDiff":{\n "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73":{\n "balance":{\n "*":{\n "from":"0xffffffffffffffffffffffffffffffffc3e12a20b",\n "to":"0xffffffffffffffffffffffffffffffffc3dc5f091"\n }\n },\n "code":"=",\n "nonce":{\n "*":{\n "from":"0x14",\n "to":"0x15"\n }\n },\n "storage":{\n }\n }\n },\n "transactionHash":"0x2a5079cc535c429f668f13a7fb9a28bdba6831b5462bd04f781777b332a8fcbd",\n },\n {...}\n ]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"trace_transaction",children:(0,c.jsx)(n.code,{children:"trace_transaction"})}),"\n",(0,c.jsxs)(n.p,{children:["Provides transaction processing of ",(0,c.jsxs)(n.a,{href:"/public-networks/reference/trace-types#trace",children:["type ",(0,c.jsx)(n.code,{children:"trace"})]})," for the specified transaction."]}),"\n",(0,c.jsx)(n.admonition,{title:"note",type:"info",children:(0,c.jsxs)(n.p,{children:["Your node must be an ",(0,c.jsx)(n.a,{href:"/public-networks/concepts/node-sync#archive-nodes",children:"archive node"}),", or\nthe requested transaction must be contained in a block within the number of\n",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#bonsai-historical-block-limit",children:"blocks retained"})," when using\n",(0,c.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai"})," (by default, 512 from the head of the chain)."]})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-97",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"transaction"}),": ",(0,c.jsx)(n.em,{children:"string"})," - transaction hash"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-97",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/trace-types#trace",children:"calls to other contracts"})," containing one object per call, in the order called by the transaction; if revert reason is enabled with ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#revert-reason-enabled",children:(0,c.jsx)(n.code,{children:"--revert-reason-enabled"})}),", the returned list items include the ",(0,c.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/revert-reason",children:"revert reason"}),"."]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc": "2.0", "method": "trace_transaction","params": ["0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7"],"id": 1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "trace_transaction",\n "params": [\n "0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7"\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "result": [\n {\n "action": {\n "creationMethod": "create",\n "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",\n "gas": "0xff2e26",\n "init": "0x60006000600060006000732c2b9c9a4a25e24b174f26114e8926a9f2128fe45af2600060006000600060007300a00000000000000000000000000000000000005af2",\n "value": "0x0"\n },\n "blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",\n "blockNumber": 19,\n "result": {\n "address": "0x30753e4a8aad7f8597332e813735def5dd395028",\n "code": "0x",\n "gasUsed": "0x1c39"\n },\n "subtraces": 2,\n "traceAddress": [],\n "transactionHash": "0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7",\n "transactionPosition": 3,\n "type": "create"\n },\n {\n "action": {\n "callType": "callcode",\n "from": "0x30753e4a8aad7f8597332e813735def5dd395028",\n "gas": "0xfb2ea9",\n "input": "0x",\n "to": "0x2c2b9c9a4a25e24b174f26114e8926a9f2128fe4",\n "value": "0x0"\n },\n "blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",\n "blockNumber": 19,\n "result": {\n "gasUsed": "0x138e",\n "output": "0x"\n },\n "subtraces": 1,\n "traceAddress": [0],\n "transactionHash": "0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7",\n "transactionPosition": 3,\n "type": "call"\n },\n {\n "action": {\n "address": "0x30753e4a8aad7f8597332e813735def5dd395028",\n "balance": "0x0",\n "refundAddress": "0x0000000000000000000000000000000000000000"\n },\n "blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",\n "blockNumber": 19,\n "result": null,\n "subtraces": 0,\n "traceAddress": [0, 0],\n "transactionHash": "0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7",\n "transactionPosition": 3,\n "type": "suicide"\n },\n {\n "action": {\n "callType": "callcode",\n "from": "0x30753e4a8aad7f8597332e813735def5dd395028",\n "gas": "0xfb18a5",\n "input": "0x",\n "to": "0x00a0000000000000000000000000000000000000",\n "value": "0x0"\n },\n "blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",\n "blockNumber": 19,\n "result": {\n "gasUsed": "0x30b",\n "output": "0x"\n },\n "subtraces": 0,\n "traceAddress": [1],\n "transactionHash": "0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7",\n "transactionPosition": 3,\n "type": "call"\n }\n ],\n "id": 1\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h2,{id:"txpool-methods",children:[(0,c.jsx)(n.code,{children:"TXPOOL"})," methods"]}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"TXPOOL"})," API methods allow you to inspect the contents of the transaction pool."]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"TXPOOL"})," API methods are not enabled by default for JSON-RPC. To enable the ",(0,c.jsx)(n.code,{children:"TXPOOL"})," API methods, use the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,c.jsx)(n.code,{children:"--rpc-http-api"})})," or ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,c.jsx)(n.code,{children:"--rpc-ws-api"})})," options."]})}),"\n",(0,c.jsx)(n.h3,{id:"txpool_besupendingtransactions",children:(0,c.jsx)(n.code,{children:"txpool_besuPendingTransactions"})}),"\n",(0,c.jsx)(n.p,{children:"Lists pending transactions that match the supplied filter conditions."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-98",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"numResults"}),": ",(0,c.jsx)(n.em,{children:"number"})," - integer representing the maximum number of results to return"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"fields"}),": ",(0,c.jsx)(n.em,{children:"object"})," - object of fields used to create the filter condition"]}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(n.p,{children:["Each field in the object corresponds to a field name containing an operator, and a value for the operator. A field name can only be specified once, and can only contain one operator. For example, you cannot query transactions with a gas price between 8 and 9 Gwei by using both the ",(0,c.jsx)(n.code,{children:"gt"})," and ",(0,c.jsx)(n.code,{children:"lt"})," operator in the same field name instance."]}),"\n",(0,c.jsx)(n.p,{children:"All filters must be satisfied for a transaction to be returned."}),"\n",(0,c.jsxs)(n.table,{children:[(0,c.jsx)(n.thead,{children:(0,c.jsxs)(n.tr,{children:[(0,c.jsx)(n.th,{children:"Field name"}),(0,c.jsx)(n.th,{children:"Value"}),(0,c.jsx)(n.th,{style:{textAlign:"center"},children:"Value type"}),(0,c.jsx)(n.th,{children:"Supported operators"})]})}),(0,c.jsxs)(n.tbody,{children:[(0,c.jsxs)(n.tr,{children:[(0,c.jsx)(n.td,{children:(0,c.jsx)(n.code,{children:"from"})}),(0,c.jsx)(n.td,{children:"Address of the sender."}),(0,c.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,c.jsx)(n.em,{children:"Data"}),", 20\xa0bytes"]}),(0,c.jsx)(n.td,{children:(0,c.jsx)(n.code,{children:"eq"})})]}),(0,c.jsxs)(n.tr,{children:[(0,c.jsx)(n.td,{children:(0,c.jsx)(n.code,{children:"to"})}),(0,c.jsxs)(n.td,{children:["Address of the receiver, or ",(0,c.jsx)(n.code,{children:'"contract_creation"'}),"."]}),(0,c.jsxs)(n.td,{style:{textAlign:"center"},children:[(0,c.jsx)(n.em,{children:"Data"}),", 20\xa0bytes"]}),(0,c.jsxs)(n.td,{children:[(0,c.jsx)(n.code,{children:"eq"}),", ",(0,c.jsx)(n.code,{children:"action"})]})]}),(0,c.jsxs)(n.tr,{children:[(0,c.jsx)(n.td,{children:(0,c.jsx)(n.code,{children:"gas"})}),(0,c.jsx)(n.td,{children:"Gas provided by the sender."}),(0,c.jsx)(n.td,{style:{textAlign:"center"},children:(0,c.jsx)(n.em,{children:"Quantity"})}),(0,c.jsxs)(n.td,{children:[(0,c.jsx)(n.code,{children:"eq"}),", ",(0,c.jsx)(n.code,{children:"gt"}),", ",(0,c.jsx)(n.code,{children:"lt"})]})]}),(0,c.jsxs)(n.tr,{children:[(0,c.jsx)(n.td,{children:(0,c.jsx)(n.code,{children:"gasPrice"})}),(0,c.jsx)(n.td,{children:"Gas price, in wei, provided by the sender."}),(0,c.jsx)(n.td,{style:{textAlign:"center"},children:(0,c.jsx)(n.em,{children:"Quantity"})}),(0,c.jsxs)(n.td,{children:[(0,c.jsx)(n.code,{children:"eq"}),", ",(0,c.jsx)(n.code,{children:"gt"}),", ",(0,c.jsx)(n.code,{children:"lt"})]})]}),(0,c.jsxs)(n.tr,{children:[(0,c.jsx)(n.td,{children:(0,c.jsx)(n.code,{children:"value"})}),(0,c.jsx)(n.td,{children:"Value transferred, in wei."}),(0,c.jsx)(n.td,{style:{textAlign:"center"},children:(0,c.jsx)(n.em,{children:"Quantity"})}),(0,c.jsxs)(n.td,{children:[(0,c.jsx)(n.code,{children:"eq"}),", ",(0,c.jsx)(n.code,{children:"gt"}),", ",(0,c.jsx)(n.code,{children:"lt"})]})]}),(0,c.jsxs)(n.tr,{children:[(0,c.jsx)(n.td,{children:(0,c.jsx)(n.code,{children:"nonce"})}),(0,c.jsx)(n.td,{children:"Number of transactions made by the sender."}),(0,c.jsx)(n.td,{style:{textAlign:"center"},children:(0,c.jsx)(n.em,{children:"Quantity"})}),(0,c.jsxs)(n.td,{children:[(0,c.jsx)(n.code,{children:"eq"}),", ",(0,c.jsx)(n.code,{children:"gt"}),", ",(0,c.jsx)(n.code,{children:"lt"})]})]})]})]}),"\n",(0,c.jsx)(n.p,{children:"Supported operators:"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"eq"})," (equal to)"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"lt"})," (less than)"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"gt"})," (greater than)"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsx)(n.p,{children:(0,c.jsx)(n.code,{children:"action"})}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsxs)(n.p,{children:["The only supported ",(0,c.jsx)(n.code,{children:"action"})," is ",(0,c.jsx)(n.code,{children:'"contract_creation"'}),"."]})}),"\n",(0,c.jsx)(n.h4,{id:"returns-98",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of objects with ",(0,c.jsx)(n.a,{href:"/public-networks/reference/api/objects#pending-transaction-object",children:"details of the pending transaction"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"txpool_besuPendingTransactions","params":[2,{"from":{"eq":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"},"gas":{"lt":"0x5209"},"nonce":{"gt":"0x1"}}],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "txpool_besuPendingTransactions",\n "params": [\n 2,\n {\n "from": { "eq": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73" },\n "gas": { "lt": "0x5209" },\n "nonce": { "gt": "0x1" }\n }\n ],\n "id": 1\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas": "0x5208",\n "gasPrice": "0xab5d04c00",\n "hash": "0xb7b2f4306c1c228ec94043da73b582594007091a7dfe024b1f8d6d772284e54b",\n "input": "0x",\n "nonce": "0x2",\n "to": "0xf8be4ebda7f62d79a665294ec1263bfdb59aabf2",\n "value": "0x0",\n "v": "0xfe8",\n "r": "0x5beb711e652c6cf0a589d3cea904eefc4f45ce4372652288701d08cc4412086d",\n "s": "0x3af14a56e63aa5fb7dcb444a89708363a9d2c1eba1f777c67690288415080ded"\n }\n ]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"txpool_besustatistics",children:(0,c.jsx)(n.code,{children:"txpool_besuStatistics"})}),"\n",(0,c.jsx)(n.p,{children:"Lists statistics about the node transaction pool."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-99",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-99",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"object"})," - transaction pool statistics object with the following fields:"]}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"maxSize"}),": ",(0,c.jsx)(n.em,{children:"number"})," - maximum number of transactions kept in the transaction pool; use the ",(0,c.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-max-size",children:(0,c.jsx)(n.code,{children:"--tx-pool-max-size"})})," option to configure the maximum size."]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"localCount"}),": ",(0,c.jsx)(n.em,{children:"number"})," - number of transactions submitted directly to this node"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"remoteCount"}),": ",(0,c.jsx)(n.em,{children:"number"})," - number of transactions received from remote nodes"]}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"txpool_besuStatistics","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"txpool_besuStatistics","params":[],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "maxSize": 4096,\n "localCount": 1,\n "remoteCount": 0\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"txpool_besutransactions",children:(0,c.jsx)(n.code,{children:"txpool_besuTransactions"})}),"\n",(0,c.jsx)(n.p,{children:"Lists transactions in the node transaction pool."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-100",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-100",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - list of transactions"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"txpool_besuTransactions","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "txpool_besuTransactions", "params": [], "id": 1 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "hash": "0x8a66830098be4006a3f63a03b6e9b67aa721e04bd6b46d420b8f1937689fb4f1",\n "isReceivedFromLocalSource": true,\n "addedToPoolAt": "2019-03-21T01:35:50.911Z"\n },\n {\n "hash": "0x41ee803c3987ceb5bcea0fad7a76a8106a2a6dd654409007d9931032ea54579b",\n "isReceivedFromLocalSource": true,\n "addedToPoolAt": "2019-03-21T01:36:00.374Z"\n }\n ]\n}\n'})})})]}),"\n",(0,c.jsxs)(n.h2,{id:"web3-methods",children:[(0,c.jsx)(n.code,{children:"WEB3"})," methods"]}),"\n",(0,c.jsxs)(n.p,{children:["The ",(0,c.jsx)(n.code,{children:"WEB3"})," API methods provide functionality for the Ethereum ecosystem."]}),"\n",(0,c.jsx)(n.h3,{id:"web3_clientversion",children:(0,c.jsx)(n.code,{children:"web3_clientVersion"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the current client version."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-101",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-101",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - current client version"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{ "jsonrpc": "2.0", "method": "web3_clientVersion", "params": [], "id": 1 }\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": "besu/"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"web3_sha3",children:(0,c.jsx)(n.code,{children:"web3_sha3"})}),"\n",(0,c.jsxs)(n.p,{children:["Returns a ",(0,c.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/SHA-3",children:"SHA3"})," hash of the specified data. The result value is a ",(0,c.jsx)(n.a,{href:"https://keccak.team/keccak.html",children:"Keccak-256"})," hash, not the standardized SHA3-256."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-102",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"data"}),": ",(0,c.jsx)(n.em,{children:"string"})," - data to convert to a SHA3 hash"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-102",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"string"})," - SHA3 result of the input data"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"web3_sha3","params":["0x68656c6c6f20776f726c00"],"id":53}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "web3_sha3",\n "params": ["0x68656c6c6f20776f726c00"],\n "id": 53\n}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": "0x5e39a0a66544c0668bde22d61c47a8710000ece931f13b84d3b2feb44ec96d3f"\n}\n'})})})]}),"\n",(0,c.jsx)(n.h2,{id:"miscellaneous-methods",children:"Miscellaneous methods"}),"\n",(0,c.jsx)(n.h3,{id:"rpc_modules",children:(0,c.jsx)(n.code,{children:"rpc_modules"})}),"\n",(0,c.jsxs)(n.p,{children:["Lists ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#api-methods-enabled-by-default",children:"enabled APIs"})," and the version of each."]}),"\n",(0,c.jsx)(n.h4,{id:"parameters-103",children:"Parameters"}),"\n",(0,c.jsx)(n.p,{children:"None"}),"\n",(0,c.jsx)(n.h4,{id:"returns-103",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"result"}),": ",(0,c.jsx)(n.em,{children:"map"})," of ",(0,c.jsx)(n.em,{children:"strings"})," to ",(0,c.jsx)(n.em,{children:"strings"})," - enabled APIs and their versions"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"rpc_modules","params":[],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,c.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"rpc_modules","params":[],"id":1}\n'})})}),(0,c.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "web3": "1.0",\n "eth": "1.0",\n "net": "1.0"\n }\n}\n'})})})]})]})}function x(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,c.jsx)(n,{...e,children:(0,c.jsx)(f,{...e})}):f(e)}},19365:(e,n,a)=>{a.d(n,{A:()=>r});a(96540);var c=a(18215);const d={tabItem:"tabItem_Ymn6"};var s=a(74848);function r(e){let{children:n,hidden:a,className:r}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,c.A)(d.tabItem,r),hidden:a,children:n})}},11470:(e,n,a)=>{a.d(n,{A:()=>w});var c=a(96540),d=a(18215),s=a(23104),r=a(56347),l=a(205),t=a(57485),i=a(31682),o=a(70679);function h(e){return c.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,c.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function b(e){const{values:n,children:a}=e;return(0,c.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:a,attributes:c,default:d}}=e;return{value:n,label:a,attributes:c,default:d}}))}(a);return function(e){const n=(0,i.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,a])}function f(e){let{value:n,tabValues:a}=e;return a.some((e=>e.value===n))}function x(e){let{queryString:n=!1,groupId:a}=e;const d=(0,r.W6)(),s=function(e){let{queryString:n=!1,groupId:a}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:n,groupId:a});return[(0,t.aZ)(s),(0,c.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(d.location.search);n.set(s,e),d.replace({...d.location,search:n.toString()})}),[s,d])]}function u(e){const{defaultValue:n,queryString:a=!1,groupId:d}=e,s=b(e),[r,t]=(0,c.useState)((()=>function(e){let{defaultValue:n,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!f({value:n,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const c=a.find((e=>e.default))??a[0];if(!c)throw new Error("Unexpected error: 0 tabValues");return c.value}({defaultValue:n,tabValues:s}))),[i,h]=x({queryString:a,groupId:d}),[u,j]=function(e){let{groupId:n}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(n),[d,s]=(0,o.Dv)(a);return[d,(0,c.useCallback)((e=>{a&&s.set(e)}),[a,s])]}({groupId:d}),p=(()=>{const e=i??u;return f({value:e,tabValues:s})?e:null})();(0,l.A)((()=>{p&&t(p)}),[p]);return{selectedValue:r,selectValue:(0,c.useCallback)((e=>{if(!f({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);t(e),h(e),j(e)}),[h,j,s]),tabValues:s}}var j=a(92303);const p={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=a(74848);function g(e){let{className:n,block:a,selectedValue:c,selectValue:r,tabValues:l}=e;const t=[],{blockElementScrollPositionUntilNextRender:i}=(0,s.a_)(),o=e=>{const n=e.currentTarget,a=t.indexOf(n),d=l[a].value;d!==c&&(i(n),r(d))},h=e=>{let n=null;switch(e.key){case"Enter":o(e);break;case"ArrowRight":{const a=t.indexOf(e.currentTarget)+1;n=t[a]??t[0];break}case"ArrowLeft":{const a=t.indexOf(e.currentTarget)-1;n=t[a]??t[t.length-1];break}}n?.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,d.A)("tabs",{"tabs--block":a},n),children:l.map((e=>{let{value:n,label:a,attributes:s}=e;return(0,m.jsx)("li",{role:"tab",tabIndex:c===n?0:-1,"aria-selected":c===n,ref:e=>t.push(e),onKeyDown:h,onClick:o,...s,className:(0,d.A)("tabs__item",p.tabItem,s?.className,{"tabs__item--active":c===n}),children:a??n},n)}))})}function v(e){let{lazy:n,children:a,selectedValue:s}=e;const r=(Array.isArray(a)?a:[a]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===s));return e?(0,c.cloneElement)(e,{className:(0,d.A)("margin-top--md",e.props.className)}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,c.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function k(e){const n=u(e);return(0,m.jsxs)("div",{className:(0,d.A)("tabs-container",p.tabList),children:[(0,m.jsx)(g,{...n,...e}),(0,m.jsx)(v,{...n,...e})]})}function w(e){const n=(0,j.A)();return(0,m.jsx)(k,{...e,children:h(e.children)},String(n))}},34705:(e,n,a)=>{a.d(n,{A:()=>c});const c=a.p+"assets/files/postman_collection-53d58dda1f254764c957a43f3344607d.json"},28453:(e,n,a)=>{a.d(n,{R:()=>r,x:()=>l});var c=a(96540);const d={},s=c.createContext(d);function r(e){const n=c.useContext(s);return c.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:r(e.components),c.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/79bb8117.da871cdc.js b/assets/js/79bb8117.da871cdc.js new file mode 100644 index 00000000000..92767fd41ef --- /dev/null +++ b/assets/js/79bb8117.da871cdc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8230],{78747:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>i,default:()=>c,frontMatter:()=>s,metadata:()=>l,toc:()=>d});var o=n(74848),r=n(28453);const s={title:"Local playground",sidebar_position:1,description:"Deploying a Besu private network locally with Kubernetes",tags:["private networks"]},i="Deploy in a local environment",l={id:"private-networks/tutorials/kubernetes/playground",title:"Local playground",description:"Deploying a Besu private network locally with Kubernetes",source:"@site/docs/private-networks/tutorials/kubernetes/playground.md",sourceDirName:"private-networks/tutorials/kubernetes",slug:"/private-networks/tutorials/kubernetes/playground",permalink:"/private-networks/tutorials/kubernetes/playground",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/kubernetes/playground.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Local playground",sidebar_position:1,description:"Deploying a Besu private network locally with Kubernetes",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Deploy a Besu private network with Kubernetes",permalink:"/private-networks/tutorials/kubernetes/"},next:{title:"Create a cluster",permalink:"/private-networks/tutorials/kubernetes/cluster"}},a={},d=[{value:"Steps",id:"steps",level:2},{value:"Important notes",id:"important-notes",level:2}];function u(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"deploy-in-a-local-environment",children:"Deploy in a local environment"})}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/tree/master/playground",children:"playground"})," was created to provide an opportunity to deploy ",(0,o.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/",children:"quorum-kubernetes"})," in a local environment before attempting in a live environment (such as in the cloud or on-premise). Local deployment can be done with any local Kubernetes tool. Minikube and Rancher Desktop have been tested to work, but any complete Kubernetes solution with support for ",(0,o.jsx)(t.code,{children:"kubectl"})," should suffice."]}),"\n",(0,o.jsx)(t.h2,{id:"steps",children:"Steps"}),"\n",(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsxs)(t.li,{children:["Navigate to the playground ",(0,o.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/tree/master/playground",children:(0,o.jsx)(t.code,{children:"README"})}),"."]}),"\n",(0,o.jsx)(t.li,{children:"Ensure that your system meets the requirements specified."}),"\n",(0,o.jsxs)(t.li,{children:["Choose your Ethereum client (Besu or GoQuorum): ",(0,o.jsx)(t.code,{children:"quorum-besu"})," or ",(0,o.jsx)(t.code,{children:"quorum-go"}),"."]}),"\n",(0,o.jsx)(t.li,{children:"Choose your consensus algorithm. The playground supports Clique, Ethash (PoW, deprecated), and IBFT2 for Besu, and IBFT for GoQuorum."}),"\n",(0,o.jsxs)(t.li,{children:["Follow the instructions from the ",(0,o.jsx)(t.code,{children:"README"})," for the chosen client and consensus algorithm folder."]}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"important-notes",children:"Important notes"}),"\n",(0,o.jsx)(t.p,{children:"Consider the following when deploying and developing with the playground:"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:["The playground is created specifically for developers and operators to become familiar with the deployment of Besu in a Kubernetes environment in preparation for going into a cloud or on-premise environment. Thus, it should ",(0,o.jsx)(t.strong,{children:"not"})," be deployed into a production environment."]}),"\n",(0,o.jsxs)(t.li,{children:["The playground is not a complete reflection of the ",(0,o.jsx)(t.code,{children:"helm"})," charts as it does not use ",(0,o.jsx)(t.code,{children:"Helm"}),", but rather static or non-templated code that is deployed through ",(0,o.jsx)(t.code,{children:"kubectl apply -f"}),". This means that without ",(0,o.jsx)(t.code,{children:"Helm"})," there's a significant amount of repeated code. This is fine for development but not ideal for a production environment."]}),"\n",(0,o.jsxs)(t.li,{children:["The playground uses static/hard-coded keys. Automatic key generation is only supported in ",(0,o.jsx)(t.code,{children:"helm"})," charts."]}),"\n",(0,o.jsx)(t.li,{children:"As the playground is for local development, no cloud integration or lifecycle support is offered."}),"\n"]})]})}function c(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>l});var o=n(96540);const r={},s=o.createContext(r);function i(e){const t=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7a44c711.55fc5953.js b/assets/js/7a44c711.55fc5953.js new file mode 100644 index 00000000000..c507e9eecfe --- /dev/null +++ b/assets/js/7a44c711.55fc5953.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1283],{48739:(e,i,r)=>{r.r(i),r.d(i,{assets:()=>o,contentTitle:()=>s,default:()=>l,frontMatter:()=>a,metadata:()=>c,toc:()=>p});var t=r(74848),n=r(28453);const a={title:"Privacy groups",sidebar_position:2,description:"Privacy groups"},s="Privacy groups (Deprecated)",c={id:"private-networks/concepts/privacy/privacy-groups",title:"Privacy groups",description:"Privacy groups",source:"@site/docs/private-networks/concepts/privacy/privacy-groups.md",sourceDirName:"private-networks/concepts/privacy",slug:"/private-networks/concepts/privacy/privacy-groups",permalink:"/private-networks/concepts/privacy/privacy-groups",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/concepts/privacy/privacy-groups.md",tags:[],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Privacy groups",sidebar_position:2,description:"Privacy groups"},sidebar:"privateDocSidebar",previous:{title:"Private transaction processing",permalink:"/private-networks/concepts/privacy/private-transactions/processing"},next:{title:"Flexible privacy groups",permalink:"/private-networks/concepts/privacy/flexible-privacy"}},o={},p=[{value:"Privacy types",id:"privacy-types",level:2},{value:"Access between states",id:"access-between-states",level:3},{value:"Enterprise Ethereum Alliance privacy",id:"enterprise-ethereum-alliance-privacy",level:3},{value:"Besu-extended privacy",id:"besu-extended-privacy",level:3},{value:"Multi-tenancy",id:"multi-tenancy",level:2}];function d(e){const i={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.header,{children:(0,t.jsx)(i.h1,{id:"privacy-groups-deprecated",children:"Privacy groups (Deprecated)"})}),"\n",(0,t.jsx)(i.admonition,{type:"caution",children:(0,t.jsxs)(i.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,t.jsx)(i.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,t.jsx)(i.p,{children:"A privacy group is a group of nodes identified by a unique privacy group ID by Tessera. Tessera stores each private transaction with the privacy group ID."}),"\n",(0,t.jsx)(i.p,{children:"The Besu nodes maintain the public world state for the blockchain and a private state for each privacy group. The private states contain data that is not shared in the globally replicated world state."}),"\n",(0,t.jsxs)(i.admonition,{type:"caution",children:[(0,t.jsx)(i.p,{children:"The privacy group implementations described below are offchain privacy groups and cannot have their group membership updated."}),(0,t.jsxs)(i.p,{children:[(0,t.jsx)(i.a,{href:"/private-networks/concepts/privacy/flexible-privacy",children:"Flexible privacy groups are an early access feature"}),"."]})]}),"\n",(0,t.jsx)(i.h2,{id:"privacy-types",children:"Privacy types"}),"\n",(0,t.jsx)(i.p,{children:"Besu implements two types of privacy:"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsxs)(i.li,{children:["Enterprise Ethereum Alliance (EEA) privacy, where private transactions include ",(0,t.jsx)(i.code,{children:"privateFor"})," as the recipient."]}),"\n",(0,t.jsxs)(i.li,{children:["Besu-extended privacy, where private transactions include ",(0,t.jsx)(i.code,{children:"privacyGroupId"})," as the recipient."]}),"\n"]}),"\n",(0,t.jsx)(i.p,{children:"Both privacy types create privacy groups and store private transactions with their privacy group in Tessera."}),"\n",(0,t.jsx)("p",{align:"center",children:(0,t.jsx)(i.p,{children:(0,t.jsx)(i.img,{alt:"Privacy Groups",src:r(98971).A+"",width:"631",height:"638"})})}),"\n",(0,t.jsx)(i.admonition,{type:"note",children:(0,t.jsx)(i.p,{children:"For clarity, the Tessera nodes are not shown in the previous diagram. To send private transactions, each Besu node must have an associated Tessera node."})}),"\n",(0,t.jsx)(i.h3,{id:"access-between-states",children:"Access between states"}),"\n",(0,t.jsx)(i.p,{children:"A contract in a privacy group:"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsx)(i.li,{children:"Can read or write to a contract in the same privacy group."}),"\n",(0,t.jsx)(i.li,{children:"Can read from the public state including public contracts."}),"\n",(0,t.jsx)(i.li,{children:"Cannot access contracts from a different privacy group."}),"\n"]}),"\n",(0,t.jsx)(i.p,{children:"A public contract cannot access a private contract."}),"\n",(0,t.jsx)(i.h3,{id:"enterprise-ethereum-alliance-privacy",children:"Enterprise Ethereum Alliance privacy"}),"\n",(0,t.jsxs)(i.p,{children:["In the privacy implementation complying with the ",(0,t.jsx)(i.a,{href:"https://entethalliance.org/technical-documents/",children:"EEA Client Specification"})," the group of nodes specified by ",(0,t.jsx)(i.code,{children:"privateFrom"})," and ",(0,t.jsx)(i.code,{children:"privateFor"})," form a privacy group with a unique privacy group ID provided by Tessera."]}),"\n",(0,t.jsx)(i.p,{children:"The previous diagram illustrates two privacy groups enabling:"}),"\n",(0,t.jsxs)(i.ul,{children:["\n",(0,t.jsx)(i.li,{children:"A, B, and C to send transactions that are private from D."}),"\n",(0,t.jsx)(i.li,{children:"A, C, and D to send transactions that are private from B."}),"\n"]}),"\n",(0,t.jsxs)(i.p,{children:["Using EEA-compliant privacy, to send private transactions between A, B, and C, A initializes a contract in a private transaction with B and C specified as the ",(0,t.jsx)(i.code,{children:"privateFor"})," and A specified as the ",(0,t.jsx)(i.code,{children:"privateFrom"}),". Initializing the contract creates a privacy group consisting of A, B, and C. For the ABC private state to remain consistent, A, B, and C must be included on transactions (as either ",(0,t.jsx)(i.code,{children:"privateFrom"})," or ",(0,t.jsx)(i.code,{children:"privateFor"}),") even if they are between only two of the three parties."]}),"\n",(0,t.jsxs)(i.p,{children:["To send private transactions between A, C, and D, C initializes a different contract in a private transaction with A and D specified as the ",(0,t.jsx)(i.code,{children:"privateFor"})," and C specified as the ",(0,t.jsx)(i.code,{children:"privateFrom"}),". Initializing the contract creates a privacy group consisting of A, C, and D. For the ACD private state to remain consistent, A, C, and D must be included on transactions (as either ",(0,t.jsx)(i.code,{children:"privateFrom"})," or ",(0,t.jsx)(i.code,{children:"privateFor"}),") even if they are between only two of the three parties."]}),"\n",(0,t.jsx)(i.h3,{id:"besu-extended-privacy",children:"Besu-extended privacy"}),"\n",(0,t.jsxs)(i.p,{children:["The Besu-extended privacy implementation creates a privacy group using ",(0,t.jsx)(i.a,{href:"/public-networks/reference/api/#priv_createprivacygroup",children:(0,t.jsx)(i.code,{children:"priv_createPrivacyGroup"})})," with private transactions sent to the privacy group ID."]}),"\n",(0,t.jsx)(i.p,{children:"Using the same privacy groups as in the previous example."}),"\n",(0,t.jsx)(i.p,{children:"Using Besu-extended privacy, to send private transactions between A, B, and C, A creates a privacy group consisting of A, B, and C. The privacy group ID is specified when sending private transactions and A, B, and C are recipients of all private transactions sent to the privacy group."}),"\n",(0,t.jsx)(i.p,{children:"To send private transactions between A, C, and D, A creates a privacy group consisting of A, C, and D. The privacy group ID of this group is specified when sending private transactions with A, C, and D as recipients."}),"\n",(0,t.jsx)(i.h2,{id:"multi-tenancy",children:"Multi-tenancy"}),"\n",(0,t.jsxs)(i.p,{children:["When using ",(0,t.jsx)(i.a,{href:"/private-networks/concepts/privacy/multi-tenancy",children:"multi-tenancy"})," with privacy groups, each user provides a JSON Web Token (JWT) which allows Besu to check that the user has access to functionality and data associated with a privacy group."]})]})}function l(e={}){const{wrapper:i}={...(0,n.R)(),...e.components};return i?(0,t.jsx)(i,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},98971:(e,i,r)=>{r.d(i,{A:()=>t});const t=r.p+"assets/images/PrivacyGroups-f8b035c1df4b611ec108a113587611dc.png"},28453:(e,i,r)=>{r.d(i,{R:()=>s,x:()=>c});var t=r(96540);const n={},a=t.createContext(n);function s(e){const i=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(i):{...i,...e}}),[i,e])}function c(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),t.createElement(a.Provider,{value:i},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7b0f9452.faa64787.js b/assets/js/7b0f9452.faa64787.js new file mode 100644 index 00000000000..26e1caa637c --- /dev/null +++ b/assets/js/7b0f9452.faa64787.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8344],{26985:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>f,frontMatter:()=>o,metadata:()=>l,toc:()=>d});var r=t(74848),s=t(28453),a=t(11470),i=t(19365);const o={title:"Free gas network",description:"Configuring free gas networks",sidebar_position:2,tags:["private networks"]},c="Configure free gas networks",l={id:"private-networks/how-to/configure/free-gas",title:"Free gas network",description:"Configuring free gas networks",source:"@site/docs/private-networks/how-to/configure/free-gas.md",sourceDirName:"private-networks/how-to/configure",slug:"/private-networks/how-to/configure/free-gas",permalink:"/private-networks/how-to/configure/free-gas",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/configure/free-gas.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Free gas network",description:"Configuring free gas networks",sidebar_position:2,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Add and remove validators without voting",permalink:"/private-networks/how-to/configure/consensus/add-validators-without-voting"},next:{title:"Bootnodes",permalink:"/private-networks/how-to/configure/bootnodes"}},u={},d=[{value:"Configure free gas in Besu",id:"configure-free-gas-in-besu",level:2},{value:"1. Set the block size",id:"1-set-the-block-size",level:3},{value:"2. Set the contract size",id:"2-set-the-contract-size",level:3},{value:"3. Start Besu with a minimum gas price of zero",id:"3-start-besu-with-a-minimum-gas-price-of-zero",level:3},{value:"4. Enable zero base fee if using London fork or later",id:"4-enable-zero-base-fee-if-using-london-fork-or-later",level:3},{value:"Configure free gas in Hardhat",id:"configure-free-gas-in-hardhat",level:2},{value:"Update hardhat.config.js",id:"update-hardhatconfigjs",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"configure-free-gas-networks",children:"Configure free gas networks"})}),"\n",(0,r.jsx)(n.p,{children:"Transactions use computational resources so have an associated cost. Gas is the cost unit and the gas price is the price per gas unit. The transaction cost is the gas used * gas price."}),"\n",(0,r.jsx)(n.p,{children:"In public networks, the account submitting the transaction pays the transaction cost, in Ether. The miner (or validator in PoA networks) that includes the transaction in a block receives transaction cost."}),"\n",(0,r.jsx)(n.p,{children:"In many private networks, network participants run the validators and do not require gas as an incentive. Networks that don't require gas as an incentive usually configure the gas price to be zero (that is, free gas). Some private networks might allocate Ether and use a non-zero gas price to limit resource use."}),"\n",(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsxs)(n.p,{children:["We use the term ",(0,r.jsx)(n.em,{children:"free gas network"})," to refer to a network with a gas price of zero. A network with a gas price of zero is also known as a ",(0,r.jsx)(n.em,{children:"zero gas network"})," or ",(0,r.jsx)(n.em,{children:"no gas network"}),"."]})}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["Some pre-crafted transactions require the deployment account to have gas available. For example, the transaction that creates the smart contract in ",(0,r.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-1820",children:"EIP-1820"}),"."]})}),"\n",(0,r.jsx)(n.p,{children:"In a free gas network, transactions still use gas but the gas price is zero, meaning the transaction cost is zero. Transaction cost = gas used * 0 (the gas price)."}),"\n",(0,r.jsx)(n.h2,{id:"configure-free-gas-in-besu",children:"Configure free gas in Besu"}),"\n",(0,r.jsx)(n.p,{children:"When gas is free, limiting block and contract sizes is less important. In free gas networks, we increase the block size limit and set the contract size limit to the maximum value."}),"\n",(0,r.jsx)(n.h3,{id:"1-set-the-block-size",children:"1. Set the block size"}),"\n",(0,r.jsxs)(n.p,{children:["If you want to remove gas from consideration and don't mind blocks potentially taking longer to create, in the genesis file set the block size limit (measured in gas) to the maximum accepted by Hardhat (",(0,r.jsx)(n.code,{children:"0x1fffffffffffff"}),"). In the genesis file, specify ",(0,r.jsx)(n.code,{children:"gasLimit"})," following the ",(0,r.jsx)(n.code,{children:"config"})," key."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ....\n },\n ...\n "gasLimit": "0x1fffffffffffff",\n ....\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["If you are more concerned about blocks arriving on time and don't have expensive individual transactions, set ",(0,r.jsx)(n.code,{children:"gasLimit"})," to a value closer to the amount of gas your validators can process in the configured block time."]}),"\n",(0,r.jsx)(n.h3,{id:"2-set-the-contract-size",children:"2. Set the contract size"}),"\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.code,{children:"config"})," section of the genesis file, set the contract size limit to the maximum supported size (in bytes)."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'(\n "config": {\n ...\n "contractSizeLimit": 2147483647,\n ...\n }\n ...\n}\n'})}),"\n",(0,r.jsx)(n.h3,{id:"3-start-besu-with-a-minimum-gas-price-of-zero",children:"3. Start Besu with a minimum gas price of zero"}),"\n",(0,r.jsxs)(n.p,{children:["When starting nodes, set the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#min-gas-price",children:"minimum gas price"})," to zero."]}),"\n",(0,r.jsxs)(a.A,{children:[(0,r.jsx)(i.A,{value:"Command line",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"--min-gas-price=0\n"})})}),(0,r.jsx)(i.A,{value:"Configuration file",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"min-gas-price=0\n"})})})]}),"\n",(0,r.jsx)(n.admonition,{title:"Important",type:"danger",children:(0,r.jsxs)(n.p,{children:["In a free gas network, ensure the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#min-gas-price",children:"minimum gas price"})," is set to zero for every node. Any node with a minimum gas price set higher than zero will silently drop transactions with a zero gas price. You can query a node's gas configuration using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gasprice",children:(0,r.jsx)(n.code,{children:"eth_gasPrice"})}),"."]})}),"\n",(0,r.jsx)(n.h3,{id:"4-enable-zero-base-fee-if-using-london-fork-or-later",children:"4. Enable zero base fee if using London fork or later"}),"\n",(0,r.jsxs)(n.p,{children:["If your network is configured to use the ",(0,r.jsx)(n.code,{children:"londonBlock"})," or a later hard fork, then you must also enable the ",(0,r.jsx)(n.code,{children:"zeroBaseFee"})," configuration. You must set this on all your nodes. Once it is set, future blocks produced by that node will set a ",(0,r.jsx)(n.code,{children:"baseFee"})," of 0. This is required because the London hard fork (EIP-1559) introduced a non-zero ",(0,r.jsx)(n.code,{children:"baseFee"})," into the block which normally means transactions require gas."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n "londonBlock": 0,\n "zeroBaseFee": true,\n ...\n },\n ...\n}\n'})}),"\n",(0,r.jsxs)(n.p,{children:["If zero base fee is enabled, you cannot specify a value for ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-price-bump",children:(0,r.jsx)(n.code,{children:"--tx-pool-price-bump"})}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"configure-free-gas-in-hardhat",children:"Configure free gas in Hardhat"}),"\n",(0,r.jsx)(n.p,{children:"If using Hardhat to develop your free gas network, you also need to configure free gas in Hardhat."}),"\n",(0,r.jsx)(n.p,{children:"Like setting block and contract size limits to their maximum values for Besu, set the transaction gas limit in Hardhat to the maximum possible."}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:["Besu does not support private key management. To use Besu with Hardhat, you must configure a ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/develop/hardhat",children:"Hardhat wallet"}),"."]})}),"\n",(0,r.jsxs)(n.h3,{id:"update-hardhatconfigjs",children:["Update ",(0,r.jsx)(n.code,{children:"hardhat.config.js"})]}),"\n",(0,r.jsxs)(n.p,{children:["Update the ",(0,r.jsx)(n.code,{children:"hardhat.config.js"})," file:"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Set the gas price to zero."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:"gasPrice: 0;\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Set the gas limit for a transaction (that is, contract creation) to be the block gas limit - 1."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'gas: "0x1ffffffffffffe";\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Setting ",(0,r.jsx)(n.code,{children:"gasPrice"})," to ",(0,r.jsx)(n.code,{children:"0"})," should cover transaction costs for most deployments."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Specify ",(0,r.jsx)(n.code,{children:"evmVersion"})," when using the latest Solidity version."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-js",children:'solidity: {\n version: "0.8.20",\n settings: {\n evmVersion: "london", // required for Besu\n optimizer: {...},\n },\n },\n'})}),"\n"]}),"\n"]})]})}function f(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var r=t(18215);const s={tabItem:"tabItem_Ymn6"};var a=t(74848);function i(e){let{children:n,hidden:t,className:i}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,i),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>k});var r=t(96540),s=t(18215),a=t(23104),i=t(56347),o=t(205),c=t(57485),l=t(31682),u=t(70679);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:s}}=e;return{value:n,label:t,attributes:r,default:s}}))}(t);return function(e){const n=(0,l.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function f(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function p(e){let{queryString:n=!1,groupId:t}=e;const s=(0,i.W6)(),a=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,c.aZ)(a),(0,r.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(s.location.search);n.set(a,e),s.replace({...s.location,search:n.toString()})}),[a,s])]}function g(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,a=h(e),[i,c]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!f({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:a}))),[l,d]=p({queryString:t,groupId:s}),[g,m]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,a]=(0,u.Dv)(t);return[s,(0,r.useCallback)((e=>{t&&a.set(e)}),[t,a])]}({groupId:s}),b=(()=>{const e=l??g;return f({value:e,tabValues:a})?e:null})();(0,o.A)((()=>{b&&c(b)}),[b]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!f({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);c(e),d(e),m(e)}),[d,m,a]),tabValues:a}}var m=t(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=t(74848);function v(e){let{className:n,block:t,selectedValue:r,selectValue:i,tabValues:o}=e;const c=[],{blockElementScrollPositionUntilNextRender:l}=(0,a.a_)(),u=e=>{const n=e.currentTarget,t=c.indexOf(n),s=o[t].value;s!==r&&(l(n),i(s))},d=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const t=c.indexOf(e.currentTarget)+1;n=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(e.currentTarget)-1;n=c[t]??c[c.length-1];break}}n?.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:o.map((e=>{let{value:n,label:t,attributes:a}=e;return(0,x.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>c.push(e),onKeyDown:d,onClick:u,...a,className:(0,s.A)("tabs__item",b.tabItem,a?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function j(e){let{lazy:n,children:t,selectedValue:a}=e;const i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=i.find((e=>e.props.value===a));return e?(0,r.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:i.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function w(e){const n=g(e);return(0,x.jsxs)("div",{className:(0,s.A)("tabs-container",b.tabList),children:[(0,x.jsx)(v,{...n,...e}),(0,x.jsx)(j,{...n,...e})]})}function k(e){const n=(0,m.A)();return(0,x.jsx)(w,{...e,children:d(e.children)},String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var r=t(96540);const s={},a=r.createContext(s);function i(e){const n=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7b4961ca.e5b09a35.js b/assets/js/7b4961ca.e5b09a35.js new file mode 100644 index 00000000000..048f76890f5 --- /dev/null +++ b/assets/js/7b4961ca.e5b09a35.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[3034],{56042:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>a,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var t=s(74848),r=s(28453);const i={title:"Use Splunk",sidebar_position:5,toc_max_heading_level:2,description:"Send Besu logs to Splunk",tags:["private networks"]},l="Use Splunk",o={id:"private-networks/how-to/monitor/splunk",title:"Use Splunk",description:"Send Besu logs to Splunk",source:"@site/docs/private-networks/how-to/monitor/splunk.md",sourceDirName:"private-networks/how-to/monitor",slug:"/private-networks/how-to/monitor/splunk",permalink:"/private-networks/how-to/monitor/splunk",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/monitor/splunk.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:5,frontMatter:{title:"Use Splunk",sidebar_position:5,toc_max_heading_level:2,description:"Send Besu logs to Splunk",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use Quorum Hibernate",permalink:"/private-networks/how-to/monitor/quorum-hibernate"},next:{title:"Use OpenTelemetry",permalink:"/private-networks/how-to/monitor/opentelemetry"}},c={},d=[{value:"Developer Quickstart with Splunk",id:"developer-quickstart-with-splunk",level:2},{value:"Splunk Connect for Ethereum Docker Compose",id:"splunk-connect-for-ethereum-docker-compose",level:2},{value:"Requirements",id:"requirements",level:3},{value:"Steps",id:"steps",level:3},{value:"Use Splunk Enterprise as a Docker container",id:"use-splunk-enterprise-as-a-docker-container",level:2},{value:"Prerequisites",id:"prerequisites",level:3},{value:"Steps",id:"steps-1",level:3},{value:"Run a Splunk Enterprise instance",id:"run-a-splunk-enterprise-instance",level:2},{value:"Prerequisites",id:"prerequisites-1",level:3},{value:"Steps",id:"steps-2",level:3},{value:"Splunk options reference",id:"splunk-options-reference",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"use-splunk",children:"Use Splunk"})}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://splunkbase.splunk.com/app/4866/",children:"Splunk"})," is a third-party monitoring solution compatible with Besu. A Splunk server can receive Besu logs and enable complex search, visualization, and analysis."]}),"\n",(0,t.jsx)(n.p,{children:"Splunk can aggregate multiple logs in one place and run complex queries without being connected to the machine running Besu to read the standard output."}),"\n",(0,t.jsx)(n.p,{children:"Options for running Splunk and Besu are:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#developer-quickstart-with-splunk",children:"Developer Quickstart with Splunk"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#splunk-connect-for-ethereum-docker-compose",children:"Splunk Connect for Ethereum Docker Compose"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#use-splunk-enterprise-as-a-docker-container",children:"Use Splunk Enterprise as a Docker container"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"#run-a-splunk-enterprise-instance",children:"Run a Splunk Enterprise instance"})}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"developer-quickstart-with-splunk",children:"Developer Quickstart with Splunk"}),"\n",(0,t.jsx)(n.p,{children:"To view the Quickstart network logs in Splunk:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/private-networks/tutorials/quickstart",children:"Start the Developer Quickstart with Besu"}),", selecting Splunk monitoring."]}),"\n",(0,t.jsxs)(n.li,{children:["Open the ",(0,t.jsx)(n.a,{href:"http://localhost:8000",children:"Splunk UI"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"splunk-connect-for-ethereum-docker-compose",children:"Splunk Connect for Ethereum Docker Compose"}),"\n",(0,t.jsx)(n.p,{children:"To run a development Besu node and connect it to Splunk Enterprise, use the Splunk Connect for Ethereum demonstration Docker Compose environment provided by Splunk."}),"\n",(0,t.jsx)(n.h3,{id:"requirements",children:"Requirements"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://git-scm.com/",children:"Git"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://docs.docker.com/compose/install/",children:"Docker and Docker-compose"})}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsx)(n.p,{children:"A Splunk license is not required to use the Splunk Connect for Ethereum demonstration."})}),"\n",(0,t.jsx)(n.h3,{id:"steps",children:"Steps"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Clone the Splunk Connect for Ethereum repository:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/splunk/splunk-connect-for-ethereum.git\ncd splunk-connect-for-ethereum\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Start the demonstration environment by following the Splunk Connect for Ethereum repository ",(0,t.jsx)(n.a,{href:"https://github.com/splunk/splunk-connect-for-ethereum/tree/master/examples/besu",children:"README"}),"."]}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsx)(n.p,{children:"Splunk enterprise takes some time to start."}),(0,t.jsxs)(n.p,{children:["Run ",(0,t.jsx)(n.code,{children:"docker ps"})," and wait for the ",(0,t.jsx)(n.code,{children:"STATUS"})," of the 3 containers to be ",(0,t.jsx)(n.code,{children:"Up [number] seconds (healthy)"}),"."]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:'CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n127600dd1173 splunkdlt/ethlogger:latest "ethlogger" 53 seconds ago Up 51 seconds (healthy) ethlogger\n88dfcee683c4 splunk/splunk:latest "/sbin/entrypoint.sh\u2026" 53 seconds ago Up 52 seconds (healthy) 8065/tcp, 8088-8089/tcp, 8191/tcp, 9887/tcp, 9997/tcp, 0.0.0.0:18000->8000/tcp splunk\n111b0c6d6072 hyperledger/besu:1.4.4 "besu" 53 seconds ago Up 52 seconds (healthy) 8545-8547/tcp, 30303/tcp besu\n'})})]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"use-splunk-enterprise-as-a-docker-container",children:"Use Splunk Enterprise as a Docker container"}),"\n",(0,t.jsx)(n.h3,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://docs.docker.com/compose/install/",children:"Docker"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://github.com/hyperledger/besu/blob/750580dcca349d22d024cc14a8171b2fa74b505a/CHANGELOG.md#144",children:"Besu 1.4.4"})," or later ",(0,t.jsx)(n.a,{href:"/private-networks/get-started/install/binary-distribution",children:"installed"})]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["A Splunk license is not required to use the trial version of the Splunk Docker image. The image is not suitable for production use and has ",(0,t.jsx)(n.a,{href:"https://www.splunk.com/",children:"restrictions on daily log volume"}),"."]})}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["If running ",(0,t.jsx)(n.a,{href:"/private-networks/get-started/install/run-docker-image",children:"Besu as a Docker container"}),", consider using ",(0,t.jsx)(n.a,{href:"#splunk-connect-for-ethereum-docker-compose",children:"Splunk Connect for Ethereum Docker Compose"})," or ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/deploy/kubernetes",children:"Kubernetes"})," instead of the Splunk Enterprise trial container."]})}),"\n",(0,t.jsx)(n.h3,{id:"steps-1",children:"Steps"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Start the Splunk Enterprise container:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker run \\\n-e SPLUNK_START_ARGS=--accept-license \\\n-e SPLUNK_HEC_TOKEN=11111111-1111-1111-1111-1111111111113 \\\n-e SPLUNK_PASSWORD=changeme \\\n--rm \\\n-p8080:8000 -p8088:8088 \\\n-d \\\n--name splunk-demo \\\nsplunk/splunk:latest\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Once the service is started, connect on ",(0,t.jsx)(n.a,{href:"http://localhost:8080/",children:(0,t.jsx)(n.code,{children:"http://localhost:8080/"})})," and login as the ",(0,t.jsx)(n.code,{children:"admin"})," user with a password of ",(0,t.jsx)(n.code,{children:"changeme"}),"."]}),"\n",(0,t.jsxs)(n.admonition,{type:"tip",children:[(0,t.jsx)(n.p,{children:"To follow the logs of the Splunk container:"}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker logs -f splunk-demo\n"})})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Create the Besu index:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["In the Splunk Web interface, navigate to the ",(0,t.jsx)(n.a,{href:"http://localhost:8080/en-US/manager/search/data/indexes",children:"index list in the settings"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://docs.splunk.com/Documentation/Splunk/8.0.4/Indexer/Setupmultipleindexes#Create_events_indexes",children:"Create an event index"})," with an Index Name of ",(0,t.jsx)(n.code,{children:"besu"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"Leave other fields with the default values."}),"\n",(0,t.jsxs)(n.li,{children:["Save the ",(0,t.jsx)(n.code,{children:"besu"})," index."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Run Besu. To start a Besu node running in development mode, run the following command:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"LOGGER=Splunk \\\nSPLUNK_URL=https://localhost:8088 \\\nSPLUNK_TOKEN=11111111-1111-1111-1111-1111111111113 \\\nSPLUNK_SKIPTLSVERIFY=true \\\nbesu \\\n--network=dev \\\n--miner-coinbase=0xfe3b557e8fb62b89f4916b721be55ceb828dbd73 \\\n--miner-enabled \\\n--logging=trace\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The environment variables specified send the Besu logs to Splunk. Only ",(0,t.jsx)(n.code,{children:"LOGGER"}),", ",(0,t.jsx)(n.code,{children:"SPLUNK_URL"}),", ",(0,t.jsx)(n.code,{children:"SPLUNK_TOKEN"})," and ",(0,t.jsx)(n.code,{children:"SPLUNK_SKIPTLSVERIFY"})," are required in this example. The complete list of options is in the ",(0,t.jsx)(n.a,{href:"#splunk-options-reference",children:"Splunk options reference table"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["In the Splunk Web interface, navigate to the ",(0,t.jsx)(n.a,{href:"http://localhost:8080/en-US/app/search/search",children:"search page"}),". Type ",(0,t.jsx)(n.code,{children:'index="besu"'})," in the search field. Log events sent by Besu are displayed."]}),"\n",(0,t.jsx)(n.p,{children:"Congratulations! You can now play with the search and other Splunk features to explore your Besu logs."}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Splunk search page",src:s(11055).A+"",width:"2072",height:"1436"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Stop Besu with ++ctrl+c++. Stop the Splunk container with ",(0,t.jsx)(n.code,{children:"docker stop splunk-demo"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"run-a-splunk-enterprise-instance",children:"Run a Splunk Enterprise instance"}),"\n",(0,t.jsx)(n.h3,{id:"prerequisites-1",children:"Prerequisites"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.splunk.com/",children:"Splunk Enterprise license"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://github.com/hyperledger/besu/blob/master/CHANGELOG.md#144",children:"Besu 1.4.4"})," or later ",(0,t.jsx)(n.a,{href:"/private-networks/get-started/install/binary-distribution",children:"installed"})]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"steps-2",children:"Steps"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Follow the steps in the ",(0,t.jsx)(n.a,{href:"https://docs.splunk.com/Documentation/Splunk/8.0.4/Installation",children:"Splunk Enterprise documentation"})," to download, install, and run Splunk Enterprise."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"After logging into the Splunk Enterprise Web interface, navigate to the settings to:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://docs.splunk.com/Documentation/Splunk/8.0.4/Data/UsetheHTTPEventCollector",children:"Create an HTTP Event Collector"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://docs.splunk.com/Documentation/Splunk/8.0.4/Indexer/Setupmultipleindexes#Create_events_indexes",children:"Create an event index"})," named ",(0,t.jsx)(n.code,{children:"besu"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Run Besu as in step 3 in ",(0,t.jsx)(n.a,{href:"#use-splunk-enterprise-as-a-docker-container",children:"using Splunk on Docker"}),". Set the ",(0,t.jsx)(n.code,{children:"SPLUNK_URL"})," value to match the HTTP Event Collector address and port."]}),"\n",(0,t.jsxs)(n.p,{children:["You can display logs and use the search engine as in step 4 in ",(0,t.jsx)(n.a,{href:"#use-splunk-enterprise-as-a-docker-container",children:"using Splunk on Docker"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"splunk-options-reference",children:"Splunk options reference"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Name"}),(0,t.jsx)(n.th,{children:"Description"}),(0,t.jsx)(n.th,{children:"Required"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"LOGGER"})}),(0,t.jsxs)(n.td,{children:["Set to ",(0,t.jsx)(n.code,{children:"Splunk"})," to activate sending logs to Splunk."]}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"HOST"})}),(0,t.jsxs)(n.td,{children:["Current host. If in a Docker environment, the default value is the docker container ID. Otherwise, the default value is ",(0,t.jsx)(n.code,{children:"localhost"}),"."]}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"SPLUNK_URL"})}),(0,t.jsxs)(n.td,{children:["URL of the Splunk HTTP Event Collector. For example, use ",(0,t.jsx)(n.code,{children:"https://localhost:8088"})]}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"SPLUNK_TOKEN"})}),(0,t.jsxs)(n.td,{children:["Authentication token, usually of the form ",(0,t.jsx)(n.code,{children:"11111111-1111-1111-1111-111111111111"})]}),(0,t.jsx)(n.td,{children:"Yes"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"SPLUNK_INDEX"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.a,{href:"https://docs.splunk.com/Splexicon:Index",children:"Index"})," to store logs. Defaults to ",(0,t.jsx)(n.code,{children:"besu"})]}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"SPLUNK_SOURCE"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.a,{href:"https://docs.splunk.com/Splexicon:Source",children:"Source of the logs"}),". Defaults to ",(0,t.jsx)(n.code,{children:"besu"})]}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"SPLUNK_SOURCETYPE"})}),(0,t.jsxs)(n.td,{children:[(0,t.jsx)(n.a,{href:"https://docs.splunk.com/Splexicon:Sourcetype",children:"Source type of the logs"}),". Defaults to ",(0,t.jsx)(n.code,{children:"besu"})]}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"SPLUNK_BATCH_SIZE_BYTES"})}),(0,t.jsxs)(n.td,{children:["Size of a log batch in bytes. Defaults to ",(0,t.jsx)(n.code,{children:"65536"})]}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"SPLUNK_BATCH_SIZE_COUNT"})}),(0,t.jsxs)(n.td,{children:["Size of a log batch in number of events. Defaults to ",(0,t.jsx)(n.code,{children:"1000"})]}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"SPLUNK_BATCH_INTERVAL"})}),(0,t.jsxs)(n.td,{children:["Interval at which to send log batches. Defaults to ",(0,t.jsx)(n.code,{children:"500"})]}),(0,t.jsx)(n.td,{children:"No"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"SPLUNK_SKIPTLSVERIFY"})}),(0,t.jsxs)(n.td,{children:["Whether to check the Splunk instance TLS certificate when sending data. Defaults to ",(0,t.jsx)(n.code,{children:"false"})]}),(0,t.jsx)(n.td,{children:"No"})]})]})]})]})}function a(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},11055:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/splunk-ui-c43ce48c74291a12501d3c9a86614bd9.png"},28453:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>o});var t=s(96540);const r={},i=t.createContext(r);function l(e){const n=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),t.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7bb2e71b.cc249e11.js b/assets/js/7bb2e71b.cc249e11.js new file mode 100644 index 00000000000..953fec88028 --- /dev/null +++ b/assets/js/7bb2e71b.cc249e11.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[841],{42491:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>i,default:()=>p,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var s=t(74848),r=t(28453),a=t(11470),o=t(19365);const l={title:"Connect to Mainnet",sidebar_position:2,description:"How to connect to Mainnet",tags:["public networks"]},i="Connect to Mainnet",c={id:"public-networks/get-started/connect/mainnet",title:"Connect to Mainnet",description:"How to connect to Mainnet",source:"@site/docs/public-networks/get-started/connect/mainnet.md",sourceDirName:"public-networks/get-started/connect",slug:"/public-networks/get-started/connect/mainnet",permalink:"/public-networks/get-started/connect/mainnet",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/get-started/connect/mainnet.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Connect to Mainnet",sidebar_position:2,description:"How to connect to Mainnet",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Connect to a network overview",permalink:"/public-networks/get-started/connect/"},next:{title:"Connect to a testnet",permalink:"/public-networks/get-started/connect/testnet"}},u={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Steps",id:"steps",level:2},{value:"1. Generate the shared secret",id:"1-generate-the-shared-secret",level:3},{value:"2. Generate validator keys",id:"2-generate-validator-keys",level:3},{value:"3. Start Besu",id:"3-start-besu",level:3},{value:"4. Start the consensus client",id:"4-start-the-consensus-client",level:3},{value:"5. Wait for the clients to sync",id:"5-wait-for-the-clients-to-sync",level:3},{value:"6. Stake ETH",id:"6-stake-eth",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"connect-to-mainnet",children:"Connect to Mainnet"})}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["As a ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/proof-of-stake/",children:"Proof of Stake network"}),", running a full Ethereum node requires both ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-clients#execution-and-consensus-clients",children:"an execution client and a consensus client"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["Run Besu as an ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-clients#execution-clients",children:"execution client"})," with any ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-clients#consensus-clients",children:"consensus client"})," on Ethereum Mainnet."]}),"\n",(0,s.jsxs)(n.p,{children:["If you're using ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/en/stable/",children:"Teku"})," as a consensus client, you can follow the ",(0,s.jsx)(n.a,{href:"/public-networks/tutorials/besu-teku-mainnet",children:"Besu and Teku Mainnet tutorial"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/get-started/install/binary-distribution",children:"Besu installed"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["A consensus client installed. For example, ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/en/latest/",children:"Teku"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"steps",children:"Steps"}),"\n",(0,s.jsx)(n.h3,{id:"1-generate-the-shared-secret",children:"1. Generate the shared secret"}),"\n",(0,s.jsx)(n.p,{children:"Run the following command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'openssl rand -hex 32 | tr -d "\\n" > jwtsecret.hex\n'})}),"\n",(0,s.jsxs)(n.p,{children:["You will specify ",(0,s.jsx)(n.code,{children:"jwtsecret.hex"})," when starting Besu and the consensus client. This is a shared JWT secret the clients use to authenticate each other when using the ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-engine-api",children:"Engine API"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"2-generate-validator-keys",children:"2. Generate validator keys"}),"\n",(0,s.jsxs)(n.p,{children:["If you're running the consensus client as a beacon node only, skip to the ",(0,s.jsx)(n.a,{href:"#3-start-besu",children:"next step"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"If you're also running the consensus client as a validator client, have a funded Ethereum address ready (32 ETH and gas fees for each validator)."}),"\n",(0,s.jsxs)(n.p,{children:["Generate validator keys for one or more validators using the ",(0,s.jsx)(n.a,{href:"https://launchpad.ethereum.org/en/",children:"Staking Launchpad"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["Save the password you use to generate each key pair in a ",(0,s.jsx)(n.code,{children:".txt"})," file. You should also have a ",(0,s.jsx)(n.code,{children:".json"})," file for each validator key pair."]})}),"\n",(0,s.jsx)(n.h3,{id:"3-start-besu",children:"3. Start Besu"}),"\n",(0,s.jsxs)(n.p,{children:["Run the following command or specify the options in a ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/",children:"configuration file"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"besu \\\n --rpc-http-enabled=true \\\n --rpc-http-host=0.0.0.0 \\\n --rpc-ws-enabled=true \\\n --rpc-ws-host=0.0.0.0 \\\n --host-allowlist=,127.0.0.1,localhost \\\n --engine-host-allowlist=,127.0.0.1,localhost \\\n --engine-rpc-enabled \\\n --engine-jwt-secret=\n"})}),"\n",(0,s.jsx)(n.p,{children:"Specify:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The path to the ",(0,s.jsx)(n.code,{children:"jwtsecret.hex"})," file generated in ",(0,s.jsx)(n.a,{href:"#1-generate-the-shared-secret",children:"step 1"})," using the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#engine-jwt-secret",children:(0,s.jsx)(n.code,{children:"--engine-jwt-secret"})})," option."]}),"\n",(0,s.jsxs)(n.li,{children:["The IP address of your Besu node using the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#host-allowlist",children:(0,s.jsx)(n.code,{children:"--host-allowlist"})})," and ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#engine-host-allowlist",children:(0,s.jsx)(n.code,{children:"--engine-host-allowlist"})})," options."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Also, in the command:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,s.jsx)(n.code,{children:"--rpc-http-enabled"})})," enables the HTTP JSON-RPC service."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-host",children:(0,s.jsx)(n.code,{children:"--rpc-http-host"})})," is set to ",(0,s.jsx)(n.code,{children:"0.0.0.0"})," to allow remote RPC connections."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-enabled",children:(0,s.jsx)(n.code,{children:"--rpc-ws-enabled"})})," enables the WebSocket JSON-RPC service."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-host",children:(0,s.jsx)(n.code,{children:"--rpc-ws-host"})})," is set to ",(0,s.jsx)(n.code,{children:"0.0.0.0"})," to allow remote RPC connections."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#engine-rpc-enabled",children:(0,s.jsx)(n.code,{children:"--engine-rpc-enabled"})})," enables the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/engine-api/",children:"Engine API"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["You can modify the option values and add other ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options",children:"command line options"})," as needed."]}),"\n",(0,s.jsx)(n.h3,{id:"4-start-the-consensus-client",children:"4. Start the consensus client"}),"\n",(0,s.jsx)(n.p,{children:"Refer to your consensus client documentation to configure and start the consensus client."}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsx)(n.p,{children:"If you're running a validator client, make sure you set a fee recipient address."})}),"\n",(0,s.jsxs)(n.p,{children:["If you're using Teku, follow the ",(0,s.jsx)(n.a,{href:"/public-networks/tutorials/besu-teku-mainnet#5-start-teku",children:"Besu and Teku Mainnet tutorial"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"5-wait-for-the-clients-to-sync",children:"5. Wait for the clients to sync"}),"\n",(0,s.jsx)(n.p,{children:"After starting Besu and the consensus client, your node starts syncing and connecting to peers."}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(o.A,{value:"Besu logs",label:"Besu logs",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'{"@timestamp":"2023-02-03T04:43:49,555","level":"INFO","thread":"main","class":"DefaultSynchronizer","message":"Starting synchronizer.","throwable":""}\n{"@timestamp":"2023-02-03T04:43:49,556","level":"INFO","thread":"main","class":"SnapSyncDownloader","message":"Starting sync","throwable":""}\n{"@timestamp":"2023-02-03T04:43:49,559","level":"INFO","thread":"main","class":"Runner","message":"Ethereum main loop is up.","throwable":""}\n{"@timestamp":"2023-02-03T04:43:53,106","level":"INFO","thread":"Timer-0","class":"DNSResolver","message":"Resolved 2409 nodes","throwable":""}\n{"@timestamp":"2023-02-03T04:45:04,803","level":"INFO","thread":"nioEventLoopGroup-3-10","class":"SnapWorldStateDownloader","message":"Downloading world state from peers for pivot block 16545859 (0x616ae3c4cf85f95a9bce2814a7282d75dc2eac36\ncb9f0fcc6f16386df70da3c5). State root 0xa7114541f42c62a72c8b6bb9901c2ccf4b424cd7f76570a67b82a183b02f25dc pending requests 0","throwable":""}\n{"@timestamp":"2023-02-03T04:46:04,834","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.08%, Peer count: 8","throwable":""}\n{"@timestamp":"2023-02-03T04:48:01,840","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.23%, Peer count: 8","throwable":""}\n{"@timestamp":"2023-02-03T04:49:09,931","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.41%, Peer count: 11","throwable":""}\n{"@timestamp":"2023-02-03T04:50:12,466","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.61%, Peer count: 10","throwable":""}\n{"@timestamp":"2023-02-03T04:51:20,977","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.75%, Peer count: 10","throwable":""}\n{"@timestamp":"2023-02-03T04:51:28,985","level":"INFO","thread":"EthScheduler-Services-29 (importBlock)","class":"ImportBlocksStep","message":"Block import progress: 180400 of 16545859 (1%)","throwable":""}\n'})})}),(0,s.jsx)(o.A,{value:"Teku logs",label:"Teku logs",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"2022-03-21 20:43:24.355 INFO - Syncing *** Target slot: 76092, Head slot: 2680, Remaining slots: 73412, Connected peers: 8\n2022-03-21 20:43:36.363 INFO - Syncing *** Target slot: 76093, Head slot: 2879, Remaining slots: 73214, Connected peers: 10\n2022-03-21 20:43:48.327 INFO - Syncing *** Target slot: 76094, Head slot: 3080, Remaining slots: 73014, Connected peers: 8\n2022-03-21 20:44:00.339 INFO - Syncing *** Target slot: 76095, Head slot: 3317, Remaining slots: 72778, Connected peers: 6\n2022-03-21 20:44:12.353 INFO - Syncing *** Target slot: 76096, Head slot: 3519, Remaining slots: 72577, Connected peers: 9\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"If you're running the consensus client as a beacon node only, you're all set. If you're also running the consensus client as a validator client, ensure your clients are fully synced before submitting your staking deposit in the next step. Syncing Besu can take several days."}),"\n",(0,s.jsx)(n.h3,{id:"6-stake-eth",children:"6. Stake ETH"}),"\n",(0,s.jsxs)(n.p,{children:["Stake your ETH for one or more validators using the ",(0,s.jsx)(n.a,{href:"https://launchpad.ethereum.org/en/",children:"Staking Launchpad"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["You can check your validator status by searching your Ethereum address on the ",(0,s.jsx)(n.a,{href:"https://beaconcha.in/",children:"Beacon Chain explorer"}),". It may take up to multiple days for your validator to be activated and start proposing blocks."]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var s=t(18215);const r={tabItem:"tabItem_Ymn6"};var a=t(74848);function o(e){let{children:n,hidden:t,className:o}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,o),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>y});var s=t(96540),r=t(18215),a=t(23104),o=t(56347),l=t(205),i=t(57485),c=t(31682),u=t(70679);function d(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:s,default:r}}=e;return{value:n,label:t,attributes:s,default:r}}))}(t);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:t}=e;const r=(0,o.W6)(),a=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,i.aZ)(a),(0,s.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(r.location.search);n.set(a,e),r.replace({...r.location,search:n.toString()})}),[a,r])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,a=h(e),[o,i]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=t.find((e=>e.default))??t[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:a}))),[c,d]=f({queryString:t,groupId:r}),[b,m]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,a]=(0,u.Dv)(t);return[r,(0,s.useCallback)((e=>{t&&a.set(e)}),[t,a])]}({groupId:r}),g=(()=>{const e=c??b;return p({value:e,tabValues:a})?e:null})();(0,l.A)((()=>{g&&i(g)}),[g]);return{selectedValue:o,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);i(e),d(e),m(e)}),[d,m,a]),tabValues:a}}var m=t(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=t(74848);function j(e){let{className:n,block:t,selectedValue:s,selectValue:o,tabValues:l}=e;const i=[],{blockElementScrollPositionUntilNextRender:c}=(0,a.a_)(),u=e=>{const n=e.currentTarget,t=i.indexOf(n),r=l[t].value;r!==s&&(c(n),o(r))},d=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const t=i.indexOf(e.currentTarget)+1;n=i[t]??i[0];break}case"ArrowLeft":{const t=i.indexOf(e.currentTarget)-1;n=i[t]??i[i.length-1];break}}n?.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},n),children:l.map((e=>{let{value:n,label:t,attributes:a}=e;return(0,x.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>i.push(e),onKeyDown:d,onClick:u,...a,className:(0,r.A)("tabs__item",g.tabItem,a?.className,{"tabs__item--active":s===n}),children:t??n},n)}))})}function w(e){let{lazy:n,children:t,selectedValue:a}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=o.find((e=>e.props.value===a));return e?(0,s.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:o.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function v(e){const n=b(e);return(0,x.jsxs)("div",{className:(0,r.A)("tabs-container",g.tabList),children:[(0,x.jsx)(j,{...n,...e}),(0,x.jsx)(w,{...n,...e})]})}function y(e){const n=(0,m.A)();return(0,x.jsx)(v,{...e,children:d(e.children)},String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>l});var s=t(96540);const r={},a=s.createContext(r);function o(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7e9c70a7.e1727144.js b/assets/js/7e9c70a7.e1727144.js new file mode 100644 index 00000000000..683c3271dd1 --- /dev/null +++ b/assets/js/7e9c70a7.e1727144.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8090],{47239:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>c,default:()=>l,frontMatter:()=>r,metadata:()=>d,toc:()=>a});var i=t(74848),s=t(28453);const r={title:"Network ID and chain ID",sidebar_position:7,description:"Learn about network ID and chain ID in Besu.",tags:["public networks","private networks"]},c="Network ID and chain ID",d={id:"public-networks/concepts/network-and-chain-id",title:"Network ID and chain ID",description:"Learn about network ID and chain ID in Besu.",source:"@site/docs/public-networks/concepts/network-and-chain-id.md",sourceDirName:"public-networks/concepts",slug:"/public-networks/concepts/network-and-chain-id",permalink:"/public-networks/concepts/network-and-chain-id",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/concepts/network-and-chain-id.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:7,frontMatter:{title:"Network ID and chain ID",sidebar_position:7,description:"Learn about network ID and chain ID in Besu.",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Transaction validation",permalink:"/public-networks/concepts/transactions/validation"},next:{title:"Events and logs",permalink:"/public-networks/concepts/events-and-logs"}},o={},a=[{value:"Specify a different network ID",id:"specify-a-different-network-id",level:2},{value:"Start a new chain with a new chain ID",id:"start-a-new-chain-with-a-new-chain-id",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"network-id-and-chain-id",children:"Network ID and chain ID"})}),"\n",(0,i.jsx)(n.p,{children:"Ethereum networks have two identifiers, a network ID and a chain ID. Although they often have the same value, they have different uses."}),"\n",(0,i.jsxs)(n.p,{children:["Peer-to-peer communication between nodes uses the ",(0,i.jsx)(n.em,{children:"network ID"}),", while the transaction signature process uses the ",(0,i.jsx)(n.em,{children:"chain ID"}),"."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md",children:"EIP-155"})," introduced using the chain ID as part of the transaction signing process to protect against transaction replay attacks."]})}),"\n",(0,i.jsx)(n.p,{children:"For most networks, including Mainnet and the public testnets, the network ID and the chain ID are the same, with the network ID defaulting to the chain ID, as specified in the genesis file."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",metastring:'title="Chain ID in the genesis file"',children:'{\n "config": {\n "ethash": {\n },\n "chainID": 1981\n },\n ...\n}\n'})}),"\n",(0,i.jsxs)(n.p,{children:["Besu sets the chain ID (and by default the network ID) automatically, using either the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#genesis-file",children:(0,i.jsx)(n.code,{children:"--genesis-file"})})," option or when specifying a network using the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#network",children:(0,i.jsx)(n.code,{children:"--network"})})," option. The following table lists the available networks and their chain and network IDs."]}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Network"}),(0,i.jsx)(n.th,{children:"Chain"}),(0,i.jsx)(n.th,{children:"Chain ID"}),(0,i.jsx)(n.th,{children:"Network ID"}),(0,i.jsx)(n.th,{children:"Type"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"mainnet"})}),(0,i.jsx)(n.td,{children:"ETH"}),(0,i.jsx)(n.td,{children:"1"}),(0,i.jsx)(n.td,{children:"1"}),(0,i.jsx)(n.td,{children:"Production"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"holesky"})}),(0,i.jsx)(n.td,{children:"ETH"}),(0,i.jsx)(n.td,{children:"17000"}),(0,i.jsx)(n.td,{children:"17000"}),(0,i.jsx)(n.td,{children:"Test"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"sepolia"})}),(0,i.jsx)(n.td,{children:"ETH"}),(0,i.jsx)(n.td,{children:"11155111"}),(0,i.jsx)(n.td,{children:"11155111"}),(0,i.jsx)(n.td,{children:"Test"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"dev"})}),(0,i.jsx)(n.td,{children:"ETH"}),(0,i.jsx)(n.td,{children:"2018"}),(0,i.jsx)(n.td,{children:"2018"}),(0,i.jsx)(n.td,{children:"Development"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"classic"})}),(0,i.jsx)(n.td,{children:"ETC"}),(0,i.jsx)(n.td,{children:"61"}),(0,i.jsx)(n.td,{children:"1"}),(0,i.jsx)(n.td,{children:"Production"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"mordor"})}),(0,i.jsx)(n.td,{children:"ETC"}),(0,i.jsx)(n.td,{children:"63"}),(0,i.jsx)(n.td,{children:"7"}),(0,i.jsx)(n.td,{children:"Test"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"ephemery"})}),(0,i.jsx)(n.td,{children:"ETH"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://github.com/ephemery-testnet/ephemery-genesis/releases",children:"dynamic"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"https://github.com/ephemery-testnet/ephemery-genesis/releases",children:"dynamic"})}),(0,i.jsx)(n.td,{children:"Test"})]})]})]}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsx)(n.p,{children:"The Ropsten, Rinkeby, and Kiln testnets are deprecated."})}),"\n",(0,i.jsx)(n.h2,{id:"specify-a-different-network-id",children:"Specify a different network ID"}),"\n",(0,i.jsxs)(n.p,{children:["Usually the network ID is the same as the chain ID, but if you want to separate specific nodes from the rest of the network so they can't connect or synchronize with other nodes, you can override the default network ID for those nodes using the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#network-id",children:(0,i.jsx)(n.code,{children:"--network-id"})})," option."]}),"\n",(0,i.jsx)(n.h2,{id:"start-a-new-chain-with-a-new-chain-id",children:"Start a new chain with a new chain ID"}),"\n",(0,i.jsxs)(n.p,{children:["If you update the chain ID (or network ID) of existing nodes, they can no longer peer with other nodes in the network. Nodes need to have a matching ",(0,i.jsx)(n.a,{href:"/public-networks/concepts/genesis-file",children:"genesis file"}),", including the chain ID, in order to peer. In this case, you're effectively running two chains that can't communicate with each other."]}),"\n",(0,i.jsx)(n.p,{children:"To change a chain ID and start a new chain:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Stop all your nodes using ",(0,i.jsx)("kbd",{children:"ctrl+c"})," in each terminal window."]}),"\n",(0,i.jsxs)(n.li,{children:["Update the ",(0,i.jsx)(n.a,{href:"/public-networks/concepts/genesis-file",children:"genesis file"})," with the new chain ID."]}),"\n",(0,i.jsx)(n.li,{children:"Make sure all nodes have the same genesis file."}),"\n",(0,i.jsx)(n.li,{children:"Delete the old data directory or point to a new location for each node."}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/private-networks/tutorials/ibft/#6-start-the-first-node-as-the-bootnode",children:"Restart the nodes"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.admonition,{title:"Warning",type:"danger",children:[(0,i.jsx)(n.p,{children:"Starting a new chain is starting from block zero."}),(0,i.jsx)(n.p,{children:"This means when you start a new chain with a new chain ID, you lose all previous data."})]})]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>d});var i=t(96540);const s={},r=i.createContext(s);function c(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/7ea61495.60fc74c7.js b/assets/js/7ea61495.60fc74c7.js new file mode 100644 index 00000000000..c257c19663e --- /dev/null +++ b/assets/js/7ea61495.60fc74c7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5327],{14311:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var o=t(74848),s=t(28453);const i={},l=void 0,a={id:"global/postman",title:"postman",description:"View the Besu JSON-RPC APIs documentation in the Postman format and obtain example requests in multiple coding languages.",source:"@site/docs/global/postman.md",sourceDirName:"global",slug:"/global/postman",permalink:"/global/postman",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/global/postman.md",tags:[],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{}},c={},d=[{value:"Run in Postman",id:"run-in-postman",level:4},{value:"Download collection",id:"download-collection",level:4}];function r(n){const e={a:"a",admonition:"admonition",h4:"h4",img:"img",p:"p",...(0,s.R)(),...n.components};return(0,o.jsxs)(e.admonition,{title:"Besu JSON-RPC APIs documentation in Postman format",type:"info",children:[(0,o.jsxs)(e.p,{children:["View the ",(0,o.jsx)(e.a,{href:"https://www.postman.com/hyperledger/workspace/hyperledger-besu/collection/11610746-f334929f-c8c3-43ed-bb73-69a6f0d728d8",children:"Besu JSON-RPC APIs documentation"})," in the Postman format and obtain example requests in multiple coding languages."]}),(0,o.jsx)(e.h4,{id:"run-in-postman",children:"Run in Postman"}),(0,o.jsx)(e.p,{children:"Click the following button to fork the collection and run requests directly on your local network."}),(0,o.jsxs)(e.p,{children:[(0,o.jsx)(e.a,{href:"https://god.gw.postman.com/run-collection/11610746-f334929f-c8c3-43ed-bb73-69a6f0d728d8?action=collection%2Ffork&collection-url=entityId%3D11610746-f334929f-c8c3-43ed-bb73-69a6f0d728d8%26entityType%3Dcollection%26workspaceId%3Dc4b60b6f-9f15-42d0-8327-7ebabca6f0fd#?env%5BBesu%20node%20on%20local%20host%5D=W3sia2V5IjoicnBjLWh0dHAtaG9zdCIsInZhbHVlIjoibG9jYWxob3N0IiwiZW5hYmxlZCI6ZmFsc2V9LHsia2V5IjoicnBjLWh0dHAtcG9ydCIsInZhbHVlIjoiODU0NSIsImVuYWJsZWQiOmZhbHNlfV0=",children:(0,o.jsx)(e.img,{src:"https://run.pstmn.io/button.svg",alt:"Run in Postman"})}),"."]}),(0,o.jsx)(e.h4,{id:"download-collection",children:"Download collection"}),(0,o.jsxs)(e.p,{children:["Alternatively you can ",(0,o.jsx)(e.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(34705).A+"",children:"download the JSON collection file"}),"."]})]})}function u(n={}){const{wrapper:e}={...(0,s.R)(),...n.components};return e?(0,o.jsx)(e,{...n,children:(0,o.jsx)(r,{...n})}):r(n)}},34705:(n,e,t)=>{t.d(e,{A:()=>o});const o=t.p+"assets/files/postman_collection-53d58dda1f254764c957a43f3344607d.json"},28453:(n,e,t)=>{t.d(e,{R:()=>l,x:()=>a});var o=t(96540);const s={},i=o.createContext(s);function l(n){const e=o.useContext(i);return o.useMemo((function(){return"function"==typeof n?n(e):{...e,...n}}),[e,n])}function a(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(s):n.components||s:l(n.components),o.createElement(i.Provider,{value:e},n.children)}}}]); \ No newline at end of file diff --git a/assets/js/810074cd.1fafbb8c.js b/assets/js/810074cd.1fafbb8c.js new file mode 100644 index 00000000000..1cdf1996c27 --- /dev/null +++ b/assets/js/810074cd.1fafbb8c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[3474],{60277:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>a});var o=t(74848),s=t(28453);const i={title:"Configure static nodes",sidebar_position:1,description:"Configuring static nodes",tags:["public networks","private networks"]},c="Static nodes",r={id:"public-networks/how-to/connect/static-nodes",title:"Configure static nodes",description:"Configuring static nodes",source:"@site/docs/public-networks/how-to/connect/static-nodes.md",sourceDirName:"public-networks/how-to/connect",slug:"/public-networks/how-to/connect/static-nodes",permalink:"/public-networks/how-to/connect/static-nodes",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/connect/static-nodes.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Configure static nodes",sidebar_position:1,description:"Configuring static nodes",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Create and send transactions",permalink:"/public-networks/how-to/send-transactions"},next:{title:"Configure ports",permalink:"/public-networks/how-to/connect/configure-ports"}},d={},a=[{value:"Configure static nodes",id:"configure-static-nodes",level:2},{value:"static-nodes.json file",id:"static-nodesjson-file",level:3}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"static-nodes",children:"Static nodes"})}),"\n",(0,o.jsxs)(n.p,{children:["Static nodes are a configured set of trusted nodes. Static nodes are exempt from ",(0,o.jsx)(n.a,{href:"/public-networks/how-to/connect/manage-peers#limit-peers",children:"maximum peer"})," and ",(0,o.jsx)(n.a,{href:"/public-networks/how-to/connect/manage-peers#limit-remote-connections",children:"remote connection"})," limits."]}),"\n",(0,o.jsx)(n.p,{children:"Besu periodically initiates a connection to any unconnected static node. To mitigate low peer count issues in small networks, we recommend using static nodes, or static nodes and bootnodes."}),"\n",(0,o.jsxs)(n.admonition,{type:"tip",children:[(0,o.jsx)(n.p,{children:"Bootnodes and static nodes are both methods for finding peers. Depending on your use case, you can use only bootnodes, only static nodes, or both bootnodes and static nodes."}),(0,o.jsx)(n.p,{children:"When connecting to bootnodes, Besu attempts to connect to all bootnodes at once, at startup.\nWhen connecting to static nodes, Besu attempts to reconnect periodically, if the connection fails or is lost."}),(0,o.jsx)(n.p,{children:"For example:"}),(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"You run multiple nodes on Mainnet, using bootnodes for discovery, but want to ensure your nodes are always connected to each other, using static nodes."}),"\n",(0,o.jsx)(n.li,{children:"You run a small network and want your nodes to reconnect if disconnected, using static nodes."}),"\n"]}),(0,o.jsxs)(n.p,{children:["To find peers, configure one or more ",(0,o.jsx)(n.a,{href:"/private-networks/how-to/configure/bootnodes",children:"bootnodes"}),". To configure a specific set of peer connections, use static nodes."]})]}),"\n",(0,o.jsx)(n.h2,{id:"configure-static-nodes",children:"Configure static nodes"}),"\n",(0,o.jsx)(n.p,{children:"To configure a network of static nodes:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["List the ",(0,o.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URLs"})," of the nodes in the ",(0,o.jsxs)(n.a,{href:"#static-nodesjson-file",children:[(0,o.jsx)(n.code,{children:"static-nodes.json"})," file"]}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Save the ",(0,o.jsx)(n.code,{children:"static-nodes.json"})," file in the data directory (specified by ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,o.jsx)(n.code,{children:"--data-path"})}),") of each node. Alternatively, you can explicitly specify the static nodes file on the command line using ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#static-nodes-file",children:(0,o.jsx)(n.code,{children:"--static-nodes-file"})}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Start Besu with discovery disabled using ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#discovery-enabled",children:(0,o.jsx)(n.code,{children:"--discovery-enabled=false"})}),"."]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["To update the list of static peers at run time, use the ",(0,o.jsx)(n.a,{href:"/public-networks/reference/api/#admin_addpeer",children:(0,o.jsx)(n.code,{children:"admin_addPeer"})})," and ",(0,o.jsx)(n.a,{href:"/public-networks/reference/api/#admin_removepeer",children:(0,o.jsx)(n.code,{children:"admin_removePeer"})})," JSON-RPC API methods."]}),"\n",(0,o.jsxs)(n.admonition,{type:"note",children:[(0,o.jsxs)(n.p,{children:["Runtime modifications of static nodes are not persisted between runs. The ",(0,o.jsx)(n.code,{children:"static-nodes.json"})," file is not updated by the ",(0,o.jsx)(n.code,{children:"admin_addPeer"})," and ",(0,o.jsx)(n.code,{children:"admin_removePeer"})," methods."]}),(0,o.jsxs)(n.p,{children:["Nodes not in the list of the static nodes are not prevented from connecting. To prevent nodes from connecting, use ",(0,o.jsx)(n.a,{href:"/private-networks/concepts/permissioning/",children:"Permissioning"}),"."]})]}),"\n",(0,o.jsx)(n.admonition,{type:"tip",children:(0,o.jsxs)(n.p,{children:["If the added peer does not appear in the peer list (returned by ",(0,o.jsx)(n.a,{href:"/public-networks/reference/api/#admin_peers",children:(0,o.jsx)(n.code,{children:"admin_peers"})}),"), check the supplied ",(0,o.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," is correct, the node is running, and the node is listening for TCP connections on the endpoint."]})}),"\n",(0,o.jsxs)(n.h3,{id:"static-nodesjson-file",children:[(0,o.jsx)(n.code,{children:"static-nodes.json"})," file"]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.code,{children:"static-nodes.json"})," file must be in the data directory (specified by ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,o.jsx)(n.code,{children:"--data-path"})}),") and contain a JSON array of ",(0,o.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URLs"}),"."]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-json",metastring:'title="Example"',children:'[\n "enode://cea71cb65a471037e01508cebcc178f176f9d5267bf29507ea1f6431eb6a5dc67d086dc8dc54358a72299dab1161febc5d7af49d1609c69b42b5e54544145d4f@127.0.0.1:30303",\n "enode://ca05e940488614402705a6b6836288ea902169ecc67a89e1bd5ef94bc0d1933f20be16bc881ffb4be59f521afa8718fc26eec2b0e90f2cd0f44f99bc8103e60f@127.0.0.1:30304"\n]\n'})}),"\n",(0,o.jsx)(n.admonition,{type:"note",children:(0,o.jsxs)(n.p,{children:["Each node has a ",(0,o.jsx)(n.code,{children:"static-nodes.json"})," file. We recommend each node in the network has the same ",(0,o.jsx)(n.code,{children:"static-nodes.json"})," file."]})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>r});var o=t(96540);const s={},i=o.createContext(s);function c(e){const n=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8161613e.2a25bb28.js b/assets/js/8161613e.2a25bb28.js new file mode 100644 index 00000000000..f52a76851f2 --- /dev/null +++ b/assets/js/8161613e.2a25bb28.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7882],{38253:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var o=t(74848),r=t(28453);const i={description:"Monitoring using metrics and logging",tags:["private networks"]},s="Monitoring",a={id:"private-networks/how-to/monitor/index",title:"Monitoring",description:"Monitoring using metrics and logging",source:"@site/docs/private-networks/how-to/monitor/index.md",sourceDirName:"private-networks/how-to/monitor",slug:"/private-networks/how-to/monitor/",permalink:"/private-networks/how-to/monitor/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/monitor/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{description:"Monitoring using metrics and logging",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Include revert reason",permalink:"/private-networks/how-to/send-transactions/revert-reason"},next:{title:"Use Grafana Loki",permalink:"/private-networks/how-to/monitor/loki"}},c={},l=[];function d(e){const n={a:"a",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"monitoring",children:"Monitoring"})}),"\n",(0,o.jsxs)(n.p,{children:["Use monitoring to identify node and network issues. In private networks, you can ",(0,o.jsx)(n.a,{href:"/public-networks/how-to/monitor/",children:"configure metrics and logging"})," as in public networks."]}),"\n",(0,o.jsx)(n.p,{children:"You can also use the following monitoring tools in private networks:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/private-networks/how-to/monitor/loki",children:"Loki"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/private-networks/how-to/monitor/elastic-stack",children:"Elastic Stack"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/private-networks/how-to/monitor/quorum-hibernate",children:"Quorum Hibernate"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/private-networks/how-to/monitor/splunk",children:"Splunk"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/private-networks/how-to/monitor/opentelemetry",children:"OpenTelemetry"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/private-networks/how-to/monitor/chainlens",children:"Chainlens Explorer"})}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["For an overview of monitoring Besu, view ",(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=7BuutRe0I28&feature=youtu.be",children:"this recording"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>a});var o=t(96540);const r={},i=o.createContext(r);function s(e){const n=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),o.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/84b35613.dd245543.js b/assets/js/84b35613.dd245543.js new file mode 100644 index 00000000000..1c1ed0b7fc4 --- /dev/null +++ b/assets/js/84b35613.dd245543.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2559],{49475:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>a,toc:()=>l});var r=o(74848),t=o(28453);const s={description:"Troubleshoot poor performance and resource constraints.",sidebar_label:"Troubleshoot performance",sidebar_position:3,tags:["public networks"]},i="Troubleshoot performance",a={id:"public-networks/how-to/troubleshoot/performance",title:"Troubleshoot performance",description:"Troubleshoot poor performance and resource constraints.",source:"@site/docs/public-networks/how-to/troubleshoot/performance.md",sourceDirName:"public-networks/how-to/troubleshoot",slug:"/public-networks/how-to/troubleshoot/performance",permalink:"/public-networks/how-to/troubleshoot/performance",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/troubleshoot/performance.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{description:"Troubleshoot poor performance and resource constraints.",sidebar_label:"Troubleshoot performance",sidebar_position:3,tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Trace transactions",permalink:"/public-networks/how-to/troubleshoot/trace-transactions"},next:{title:"Troubleshoot peering",permalink:"/public-networks/how-to/troubleshoot/peering"}},c={},l=[];function u(e){const n={a:"a",code:"code",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"troubleshoot-performance",children:"Troubleshoot performance"})}),"\n",(0,r.jsxs)(n.p,{children:["Your hardware, machine environment, and node configuration can affect your node's ability to serve\nrequests and perform ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/proof-of-stake/",children:"validator duties"}),", including\n",(0,r.jsx)(n.a,{href:"/public-networks/concepts/proof-of-stake/attestations",children:"attestation performance"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["If you notice high resource usage when ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/monitor/",children:"monitoring your node"}),", you can\ntry the following suggestions:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Disable swapping.\nBesu is an I/O intensive application, especially during sync, enabling swapping hurts Besu's performance.\nYou can disable swap at the OS level.\n",(0,r.jsx)(n.a,{href:"https://www.tecmint.com/disable-swap-partition/",children:"This article"})," provides information on how to\ndisable swap (and caveats)."]}),"\n",(0,r.jsx)(n.li,{children:"Use a high performance SSD disk with NVMe, since Besu's performance bottleneck is often slow disk I/O."}),"\n",(0,r.jsxs)(n.li,{children:["Configure memory and RAM:","\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["If you have RAM constraints, use ",(0,r.jsx)(n.a,{href:"/public-networks/get-started/system-requirements",children:"OpenJ9"})," if you're\nrunning on ",(0,r.jsx)(n.code,{children:"x86_64"})," Linux architecture to reduce memory usage."]}),"\n",(0,r.jsxs)(n.li,{children:["Review and change your ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/configure-java/manage-memory",children:"Java heap size"})," if necessary.\n5GB is an appropriate limit.\nHigher values may improve sync time, but can be reduced after completing sync."]}),"\n",(0,r.jsxs)(n.li,{children:["Ensure Besu is using ",(0,r.jsx)(n.a,{href:"/public-networks/get-started/install/binary-distribution",children:"jemalloc"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["If you have 32GB RAM or more, set the ",(0,r.jsx)(n.code,{children:"Xplugin-rocksdb-high-spec-enabled"})," configuration option\nto ",(0,r.jsx)(n.code,{children:"true"}),".\nDon't use this on RAM machines with 16GB RAM or less if you're running a consensus client on the\nsame hardware."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["If you're running on ARM64, make sure the glibc version is greater than 2.29.\nIf not, Besu uses a Java implementation instead of the native one for some precompiled contracts,\nwhich results in lower performance.","\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["On Ubuntu, run ",(0,r.jsx)(n.code,{children:"ldd --version"}),".\nSee ",(0,r.jsx)(n.a,{href:"https://dev.to/0xbf/how-to-get-glibc-version-c-lang-26he",children:"the methods for other environments"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.li,{children:"Pay attention to what processes are running on the same machine/VM as Besu.\nJava applications, with default settings, are designed to run alone on the machine.\nYou can run your consensus client on the same machine, but this adds overhead on Besu, and vice\nversa (on CPU cache misses, CPU scheduler latency, IO, etc.)."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"You should continue to monitor your node after following these suggestions."})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>a});var r=o(96540);const t={},s=r.createContext(t);function i(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/87114070.31099ec0.js b/assets/js/87114070.31099ec0.js new file mode 100644 index 00000000000..6ab17061cc7 --- /dev/null +++ b/assets/js/87114070.31099ec0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1975],{16528:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>p,frontMatter:()=>o,metadata:()=>r,toc:()=>a});var i=s(74848),d=s(28453);const o={title:"Node keys",sidebar_position:10,description:"Learn about node public and private keys, and the node address.",tags:["public networks","private networks"]},t="Node keys and node address",r={id:"public-networks/concepts/node-keys",title:"Node keys",description:"Learn about node public and private keys, and the node address.",source:"@site/docs/public-networks/concepts/node-keys.md",sourceDirName:"public-networks/concepts",slug:"/public-networks/concepts/node-keys",permalink:"/public-networks/concepts/node-keys",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/concepts/node-keys.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:10,frontMatter:{title:"Node keys",sidebar_position:10,description:"Learn about node public and private keys, and the node address.",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Genesis file",permalink:"/public-networks/concepts/genesis-file"},next:{title:"Tutorials",permalink:"/public-networks/tutorials"}},c={},a=[{value:"Node private key",id:"node-private-key",level:2},{value:"Node public key",id:"node-public-key",level:2},{value:"Node address",id:"node-address",level:2},{value:"Specify a custom node private key file",id:"specify-a-custom-node-private-key-file",level:2},{value:"Enode URL",id:"enode-url",level:2},{value:"Domain name support",id:"domain-name-support",level:3}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"node-keys-and-node-address",children:"Node keys and node address"})}),"\n",(0,i.jsx)(n.p,{children:"Each node has a private and public key pair, and a node address. Besu uses the private and public key pair to sign and verify transactions, and the node address as an identifier for the node."}),"\n",(0,i.jsx)(n.h2,{id:"node-private-key",children:"Node private key"}),"\n",(0,i.jsxs)(n.p,{children:["When starting Besu, if the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#node-private-key-file",children:(0,i.jsx)(n.code,{children:"--node-private-key-file"})})," option is not specified and a ",(0,i.jsx)(n.code,{children:"key"})," file does not exist in the data directory for the node, Besu generates a node private key and writes it to the ",(0,i.jsx)(n.code,{children:"key"})," file."]}),"\n",(0,i.jsxs)(n.p,{children:["If a ",(0,i.jsx)(n.code,{children:"key"})," file does exist in the data directory when starting Besu, the node starts using the private key in the ",(0,i.jsx)(n.code,{children:"key"})," file."]}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsx)(n.p,{children:"The private key is not encrypted."})}),"\n",(0,i.jsx)(n.h2,{id:"node-public-key",children:"Node public key"}),"\n",(0,i.jsx)(n.p,{children:"The node public key displays in the log after starting Besu. Also referred to as the node ID, the node public key forms part of the enode URL of a node."}),"\n",(0,i.jsxs)(n.p,{children:["You can export the node public key, either to standard output or to a specified file, using the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/subcommands#public-key",children:(0,i.jsx)(n.code,{children:"public-key export"})})," subcommand."]}),"\n",(0,i.jsx)(n.h2,{id:"node-address",children:"Node address"}),"\n",(0,i.jsx)(n.p,{children:"Besu generates the node address by creating a hash of the node public key and using the last 20 bytes of the hash as the node address. It is also displayed in the logs after starting Besu."}),"\n",(0,i.jsxs)(n.p,{children:["You can export the node address, either to standard output or to a specified file, using the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/subcommands#public-key",children:(0,i.jsx)(n.code,{children:"public-key export-address"})})," subcommand."]}),"\n",(0,i.jsx)(n.h2,{id:"specify-a-custom-node-private-key-file",children:"Specify a custom node private key file"}),"\n",(0,i.jsxs)(n.p,{children:["Use the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#node-private-key-file",children:(0,i.jsx)(n.code,{children:"--node-private-key-file"})})," option to specify a custom ",(0,i.jsx)(n.code,{children:"key"})," file in any location."]}),"\n",(0,i.jsxs)(n.p,{children:["If the ",(0,i.jsx)(n.code,{children:"key"})," file exists, the node starts with the private key in the ",(0,i.jsx)(n.code,{children:"key"})," file. If the ",(0,i.jsx)(n.code,{children:"key"})," file does not exist, Besu generates a node private key and writes it to the ",(0,i.jsx)(n.code,{children:"key"})," file."]}),"\n",(0,i.jsxs)(n.p,{children:["For example, the following command either reads the node private key from ",(0,i.jsx)(n.code,{children:"privatekeyfile"})," or writes a generated private key to ",(0,i.jsx)(n.code,{children:"privatekeyfile"}),"."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'besu --node-private-key-file="/Users/username/privatekeyfile"\n'})}),"\n",(0,i.jsx)(n.h2,{id:"enode-url",children:"Enode URL"}),"\n",(0,i.jsxs)(n.p,{children:["The enode URL identifies a node. For example, the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#bootnodes",children:(0,i.jsx)(n.code,{children:"--bootnodes"})})," option and the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#admin_addpeer",children:(0,i.jsx)(n.code,{children:"admin_addPeer"})})," method specify nodes by the enode URL."]}),"\n",(0,i.jsxs)(n.p,{children:["The enode URL format is ",(0,i.jsx)(n.code,{children:"enode://@[?discport=]"})," where:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:""})," is the node public key, excluding the initial 0x."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:""})," is the host and TCP port the bootnode is listening on for P2P discovery. Specify the host and TCP port using the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-host",children:(0,i.jsx)(n.code,{children:"--p2p-host"})})," and ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,i.jsx)(n.code,{children:"--p2p-port"})})," options. The default host is ",(0,i.jsx)(n.code,{children:"127.0.0.1"})," and the default port is ",(0,i.jsx)(n.code,{children:"30303"}),"."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["Standard Ethereum enode URLs allow hostnames as IP addresses only, however Besu provides ",(0,i.jsx)(n.a,{href:"#domain-name-support",children:"domain name support"})," in private permissioned networks."]})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["If the TCP listening and UDP discovery ports differ, the UDP port is specified as query parameter ",(0,i.jsx)(n.code,{children:"discport"}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.admonition,{type:"info",children:[(0,i.jsxs)(n.p,{children:["If the node public key is ",(0,i.jsx)(n.code,{children:"0xc35c3ec90a8a51fd5703594c6303382f3ae6b2ecb9589bab2c04b3794f2bc3fc2631dabb0c08af795787a6c004d8f532230ae6e9925cbbefb0b28b79295d615f"}),", the host is ",(0,i.jsx)(n.code,{children:"10.3.58.6"}),", the TCP listening port is ",(0,i.jsx)(n.code,{children:"30303"}),", and the UDP discovery port is ",(0,i.jsx)(n.code,{children:"30301"}),", then the enode URL is ",(0,i.jsx)(n.code,{children:"enode://c35c3ec90a8a51fd5703594c6303382f3ae6b2ecb9589bab2c04b3794f2bc3fc2631dabb0c08af795787a6c004d8f532230ae6e9925cbbefb0b28b79295d615f@10.3.58.6:30303?discport=30301"})]}),(0,i.jsxs)(n.p,{children:["If the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-host",children:(0,i.jsx)(n.code,{children:"--p2p-host"})})," or ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,i.jsx)(n.code,{children:"--p2p-port"})})," options are not specified and the node public key is ",(0,i.jsx)(n.code,{children:"0xc35c3ec90a8a51fd5703594c6303382f3ae6b2ecb9589bab2c04b3794f2bc3fc2631dabb0c08af795787a6c004d8f532230ae6e9925cbbefb0b28b79295d615f"}),", then the enode URL is ",(0,i.jsx)(n.code,{children:"enode://c35c3ec90a8a51fd5703594c6303382f3ae6b2ecb9589bab2c04b3794f2bc3fc2631dabb0c08af795787a6c004d8f532230ae6e9925cbbefb0b28b79295d615f@127.0.0.1:30303"})]})]}),"\n",(0,i.jsxs)(n.p,{children:["The enode URL displays when starting a Besu node. Use the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#net_enode",children:(0,i.jsx)(n.code,{children:"net_enode"})})," JSON-RPC API method to get the enode URL of the node."]}),"\n",(0,i.jsxs)(n.p,{children:["The enode advertised to other nodes during discovery is the external IP address and port, as defined by ",(0,i.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat",children:(0,i.jsx)(n.code,{children:"--nat-method"})}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"domain-name-support",children:"Domain name support"}),"\n",(0,i.jsx)(n.admonition,{type:"caution",children:(0,i.jsxs)(n.p,{children:["Enode URL domain name support is an early access feature that you can use in private ",(0,i.jsx)(n.a,{href:"/private-networks/concepts/permissioning/",children:"permissioned networks"})," only."]})}),"\n",(0,i.jsx)(n.p,{children:"To use domain names in enode URLs:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Configure DNS reverse lookup."}),"\n",(0,i.jsxs)(n.li,{children:["Enable DNS support using the early access option ",(0,i.jsx)(n.code,{children:"--Xdns-enabled"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",metastring:'title="Example enode URL using a domain name"',children:"enode://c35c3ec90a8a51fd5703594c6303382f3ae6b2ecb9589bab2c04b3794f2bc3fc2631dabb0c08af795787a6c004d8f532230ae6e9925cbbefb0b28b79295d615f@mydomain.dev.example.net:30301\n"})}),"\n",(0,i.jsxs)(n.admonition,{type:"tip",children:[(0,i.jsxs)(n.p,{children:["If deploying Besu using Kubernetes in private permissioned networks, use the ",(0,i.jsx)(n.code,{children:"--Xdns-enabled"})," and ",(0,i.jsx)(n.code,{children:"--Xdns-update-enabled"})," options to ensure that Besu can connect to a container after restarting even if the IP address of the container changes."]}),(0,i.jsxs)(n.p,{children:["Use the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#xhelp",children:(0,i.jsx)(n.code,{children:"--Xhelp"})})," command line option to view early access options and their descriptions."]})]}),"\n",(0,i.jsxs)(n.p,{children:["If nodes are not connecting as expected, set the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#admin_changeloglevel",children:"log level to TRACE"})," to help troubleshoot the issue."]})]})}function p(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},28453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>r});var i=s(96540);const d={},o=i.createContext(d);function t(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:t(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/88771ea1.0cf7abbf.js b/assets/js/88771ea1.0cf7abbf.js new file mode 100644 index 00000000000..671c6e1d5bc --- /dev/null +++ b/assets/js/88771ea1.0cf7abbf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4265],{73703:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>s,default:()=>l,frontMatter:()=>o,metadata:()=>a,toc:()=>c});var n=r(74848),i=r(28453);const o={title:"Use Quorum Hibernate",sidebar_position:4,description:"Use Quorum Hibernate with Besu",tags:["private networks"]},s="Use Quorum Hibernate (Deprecated)",a={id:"private-networks/how-to/monitor/quorum-hibernate",title:"Use Quorum Hibernate",description:"Use Quorum Hibernate with Besu",source:"@site/docs/private-networks/how-to/monitor/quorum-hibernate.md",sourceDirName:"private-networks/how-to/monitor",slug:"/private-networks/how-to/monitor/quorum-hibernate",permalink:"/private-networks/how-to/monitor/quorum-hibernate",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/monitor/quorum-hibernate.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Use Quorum Hibernate",sidebar_position:4,description:"Use Quorum Hibernate with Besu",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use Elastic Stack",permalink:"/private-networks/how-to/monitor/elastic-stack"},next:{title:"Use Splunk",permalink:"/private-networks/how-to/monitor/splunk"}},u={},c=[];function d(e){const t={a:"a",admonition:"admonition",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"use-quorum-hibernate-deprecated",children:"Use Quorum Hibernate (Deprecated)"})}),"\n",(0,n.jsx)(t.admonition,{type:"caution",children:(0,n.jsxs)(t.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,n.jsx)(t.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-hibernate",children:"Quorum Hibernate"})," is a proxy that monitors a node's API traffic and hibernates the node when inactive. This reduces infrastructure costs by ensuring only nodes receiving API requests or nodes required to establish consensus are running."]}),"\n",(0,n.jsx)(t.p,{children:"Quorum Hibernate wakes up hibernating nodes:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"When a new transaction or API request is received."}),"\n",(0,n.jsx)(t.li,{children:"To allow it to periodically sync with the network."}),"\n"]})]})}function l(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,t,r)=>{r.d(t,{R:()=>s,x:()=>a});var n=r(96540);const i={},o=n.createContext(i);function s(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/887b6037.879af06d.js b/assets/js/887b6037.879af06d.js new file mode 100644 index 00000000000..3bb0e9f4c15 --- /dev/null +++ b/assets/js/887b6037.879af06d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4068],{22751:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>f,frontMatter:()=>i,metadata:()=>c,toc:()=>u});var o=t(74848),r=t(28453),a=t(11470),s=t(19365);const i={title:"Add and remove validators without voting",description:"How to add or remove validators without voting",sidebar_position:5,tags:["private networks"]},l="Add and remove validators without voting",c={id:"private-networks/how-to/configure/consensus/add-validators-without-voting",title:"Add and remove validators without voting",description:"How to add or remove validators without voting",source:"@site/docs/private-networks/how-to/configure/consensus/add-validators-without-voting.md",sourceDirName:"private-networks/how-to/configure/consensus",slug:"/private-networks/how-to/configure/consensus/add-validators-without-voting",permalink:"/private-networks/how-to/configure/consensus/add-validators-without-voting",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/configure/consensus/add-validators-without-voting.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:5,frontMatter:{title:"Add and remove validators without voting",description:"How to add or remove validators without voting",sidebar_position:5,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Clique",permalink:"/private-networks/how-to/configure/consensus/clique"},next:{title:"Free gas network",permalink:"/private-networks/how-to/configure/free-gas"}},d={},u=[{value:"Override smart contract validators",id:"override-smart-contract-validators",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"add-and-remove-validators-without-voting",children:"Add and remove validators without voting"})}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft",children:"QBFT"})," or ",(0,o.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft",children:"IBFT 2.0"})," network conditions might not allow voting to change validators. For example, if a majority of the current validators are no longer participating in the network, a vote to add or remove validators won't be successful. You can bypass voting and specify new validators using a transition in the genesis file."]}),"\n",(0,o.jsx)(n.admonition,{type:"caution",children:(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["In most cases, add or remove validators ",(0,o.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft#add-and-remove-validators",children:"by voting or smart contract for QBFT"}),"; or ",(0,o.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft#add-and-remove-validators",children:"by voting for IBFT 2.0"}),". Use transitions only when voting isn't possible. Using transitions requires coordinating a rolling update of all the nodes in order to pick up the configuration at the correct block height. Using transitions also leaves the validator overrides permanently in your genesis configuration."]}),"\n",(0,o.jsx)(n.li,{children:"Transitions are a Besu-specific feature. If you run a mixed-client QBFT network, you can't use transitions to change the validators."}),"\n"]})}),"\n",(0,o.jsx)(n.p,{children:"To add or remove validators without voting:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["In the genesis file, add the ",(0,o.jsx)(n.code,{children:"transitions"})," configuration item where:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:""})," is the upcoming block at which to change validators."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:" ... "})," are strings representing the account addresses of the validators after ",(0,o.jsx)(n.code,{children:""}),"."]}),"\n"]}),"\n",(0,o.jsxs)(a.A,{children:[(0,o.jsx)(s.A,{value:"QBFT syntax",label:"QBFT syntax",default:!0,children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n },\n "transitions": {\n "qbft": [\n {\n "block": ,\n "validators": [\n ,\n ...\n \n ]\n }\n ]\n }\n },\n ...\n}\n'})})}),(0,o.jsx)(s.A,{value:"QBFT example",label:"QBFT example",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n },\n "transitions": {\n "qbft": [\n {\n "block": 25,\n "validators": [\n "0x372a70ace72b02cc7f1757183f98c620254f9c8d",\n "0x9811ebc35d7b06b3fa8dc5809a1f9c52751e1deb"\n ]\n }\n ]\n }\n },\n ...\n}\n'})})}),(0,o.jsx)(s.A,{value:"IBFT 2.0 syntax",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "ibft2": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n },\n "transitions": {\n "ibft2": [\n {\n "block": ,\n "validators": [\n ,\n ...\n \n ]\n }\n ]\n }\n },\n ...\n}\n'})})}),(0,o.jsx)(s.A,{value:"IBFT 2.0 example",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "ibft2": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n },\n "transitions": {\n "ibft2": [\n {\n "block": 25,\n "validators": [\n "0x372a70ace72b02cc7f1757183f98c620254f9c8d",\n "0x9811ebc35d7b06b3fa8dc5809a1f9c52751e1deb"\n ]\n }\n ]\n }\n },\n ...\n}\n'})})})]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Restart all nodes in the network using the updated genesis file. You can make a rolling update of the nodes, as long as they're all up before the transition block is processed."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["To verify the changes after the transition block, call ",(0,o.jsx)(n.a,{href:"/private-networks/reference/api/#qbft_getvalidatorsbyblocknumber",children:(0,o.jsx)(n.code,{children:"qbft_getValidatorsByBlockNumber"})})," or ",(0,o.jsx)(n.a,{href:"/private-networks/reference/api/#ibft_getvalidatorsbyblocknumber",children:(0,o.jsx)(n.code,{children:"ibft_getValidatorsByBlockNumber"})}),", specifying ",(0,o.jsx)(n.code,{children:"latest"}),"."]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.admonition,{type:"caution",children:[(0,o.jsx)(n.p,{children:"Don't specify a transition block in the past."}),(0,o.jsx)(n.p,{children:"Specifying a transition block in the past can result in unexpected behavior, such as causing the network to fork."})]}),"\n",(0,o.jsx)(n.h2,{id:"override-smart-contract-validators",children:"Override smart contract validators"}),"\n",(0,o.jsxs)(n.p,{children:["When using ",(0,o.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft#add-and-remove-validators-using-a-smart-contract",children:"QBFT contract validator selection"}),", if network conditions require it, you can bypass the smart contract and specify new validators in the genesis file. For example, you lose quorum for your current list of contract validators, and you can't perform a transaction to vote more in."]}),"\n",(0,o.jsxs)(n.p,{children:["This requires temporarily ",(0,o.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft#swap-validator-management-methods",children:"switching to block header validator selection mode"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"To bypass the smart contract and specify new validators:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["In the genesis file, add a ",(0,o.jsx)(n.code,{children:"transitions"})," configuration item where:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:""})," is the upcoming block at which to change validators."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:""})," is the validator selection mode to switch to. In this case we'll switch to the ",(0,o.jsx)(n.code,{children:"blockheader"})," mode temporarily."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:" ... "})," are strings representing the account addresses of the validators after ",(0,o.jsx)(n.code,{children:""}),". These validators only need to be sufficient to progress the chain and allow a new contract to be deployed."]}),"\n"]}),"\n",(0,o.jsxs)(a.A,{children:[(0,o.jsx)(s.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4,\n "validatorcontractaddress": "0x0000000000000000000000000000000000007777"\n },\n "transitions": {\n "qbft": [\n {\n "block": ,\n "validatorselectionmode": ,\n "validators": [\n ,\n ...\n \n ]\n }\n ]\n }\n },\n ...\n}\n'})})}),(0,o.jsx)(s.A,{value:"Example",label:"Example",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4,\n "validatorcontractaddress": "0x0000000000000000000000000000000000007777"\n },\n "transitions": {\n "qbft": [\n {\n "block": 2555,\n "validatorselectionmode": "blockheader",\n "validators": [\n "0x372a70ace72b02cc7f1757183f98c620254f9c8d",\n "0x9811ebc35d7b06b3fa8dc5809a1f9c52751e1deb"\n ]\n }\n ]\n }\n },\n ...\n}\n'})})})]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Restart all nodes in the network using the updated genesis file. You can make a rolling update of the nodes, as long as they're all up before the transition block is processed."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Deploy a new contract to the blockchain containing the desired list of validators."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["In the genesis file, add another ",(0,o.jsx)(n.code,{children:"transitions"})," configuration item where:"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:""})," is the upcoming block at which to change validators."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:""})," is the validator selection mode to switch to. In this case we'll switch to ",(0,o.jsx)(n.code,{children:"contract"})," mode."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.code,{children:""})," is the address of the new smart contract."]}),"\n"]}),"\n",(0,o.jsxs)(a.A,{children:[(0,o.jsx)(s.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4,\n \u201cvalidatorcontractaddress\u201d: \u201c0x0000000000000000000000000000000000007777\u201d\n },\n "transitions": {\n "qbft": [\n {\n "block": 2555,\n "validatorselectionmode": "blockheader",\n "validators": [\n "0x372a70ace72b02cc7f1757183f98c620254f9c8d",\n "0x9811ebc35d7b06b3fa8dc5809a1f9c52751e1deb"\n ]\n },\n {\n "block": ,\n "validatorselectionmode": ,\n "validatorcontractaddress": \n }\n ]\n }\n },\n ...\n}\n'})})}),(0,o.jsx)(s.A,{value:"Example",label:"Example",children:(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4,\n "validatorcontractaddress": "0x0000000000000000000000000000000000007777"\n },\n "transitions": {\n "qbft": [\n {\n "block": 2555,\n "validatorselectionmode": "blockheader",\n "validators": [\n "0x372a70ace72b02cc7f1757183f98c620254f9c8d",\n "0x9811ebc35d7b06b3fa8dc5809a1f9c52751e1deb"\n ]\n },\n {\n "block": 2755,\n "validatorselectionmode": "contract",\n "validatorcontractaddress": "0x0000000000000000000000000000000000009999"\n }\n ]\n }\n },\n ...\n}\n'})})})]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Restart all nodes in the network using the updated genesis file. You can make a rolling update of the nodes, as long as they're all up before the transition block is processed."}),"\n"]}),"\n"]})]})}function f(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>s});t(96540);var o=t(18215);const r={tabItem:"tabItem_Ymn6"};var a=t(74848);function s(e){let{children:n,hidden:t,className:s}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,o.A)(r.tabItem,s),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>k});var o=t(96540),r=t(18215),a=t(23104),s=t(56347),i=t(205),l=t(57485),c=t(31682),d=t(70679);function u(e){return o.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,o.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,o.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:o,default:r}}=e;return{value:n,label:t,attributes:o,default:r}}))}(t);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function f(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function p(e){let{queryString:n=!1,groupId:t}=e;const r=(0,s.W6)(),a=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l.aZ)(a),(0,o.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(r.location.search);n.set(a,e),r.replace({...r.location,search:n.toString()})}),[a,r])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,a=h(e),[s,l]=(0,o.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!f({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const o=t.find((e=>e.default))??t[0];if(!o)throw new Error("Unexpected error: 0 tabValues");return o.value}({defaultValue:n,tabValues:a}))),[c,u]=p({queryString:t,groupId:r}),[b,v]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,a]=(0,d.Dv)(t);return[r,(0,o.useCallback)((e=>{t&&a.set(e)}),[t,a])]}({groupId:r}),m=(()=>{const e=c??b;return f({value:e,tabValues:a})?e:null})();(0,i.A)((()=>{m&&l(m)}),[m]);return{selectedValue:s,selectValue:(0,o.useCallback)((e=>{if(!f({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);l(e),u(e),v(e)}),[u,v,a]),tabValues:a}}var v=t(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function x(e){let{className:n,block:t,selectedValue:o,selectValue:s,tabValues:i}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,a.a_)(),d=e=>{const n=e.currentTarget,t=l.indexOf(n),r=i[t].value;r!==o&&(c(n),s(r))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},n),children:i.map((e=>{let{value:n,label:t,attributes:a}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:o===n?0:-1,"aria-selected":o===n,ref:e=>l.push(e),onKeyDown:u,onClick:d,...a,className:(0,r.A)("tabs__item",m.tabItem,a?.className,{"tabs__item--active":o===n}),children:t??n},n)}))})}function j(e){let{lazy:n,children:t,selectedValue:a}=e;const s=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=s.find((e=>e.props.value===a));return e?(0,o.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:s.map(((e,n)=>(0,o.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function w(e){const n=b(e);return(0,g.jsxs)("div",{className:(0,r.A)("tabs-container",m.tabList),children:[(0,g.jsx)(x,{...n,...e}),(0,g.jsx)(j,{...n,...e})]})}function k(e){const n=(0,v.A)();return(0,g.jsx)(w,{...e,children:u(e.children)},String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>i});var o=t(96540);const r={},a=o.createContext(r);function s(e){const n=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/88996aea.4734e667.js b/assets/js/88996aea.4734e667.js new file mode 100644 index 00000000000..de3fffdd650 --- /dev/null +++ b/assets/js/88996aea.4734e667.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7952],{77410:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var t=r(74848),i=r(28453);const a={title:"Sample load balancer configurations",sidebar_position:1,description:"Sample load balancers",tags:["public networks","private networks"]},s="Sample load balancer configurations",o={id:"public-networks/how-to/configure-ha/sample-configuration",title:"Sample load balancer configurations",description:"Sample load balancers",source:"@site/docs/public-networks/how-to/configure-ha/sample-configuration.md",sourceDirName:"public-networks/how-to/configure-ha",slug:"/public-networks/how-to/configure-ha/sample-configuration",permalink:"/public-networks/how-to/configure-ha/sample-configuration",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/configure-ha/sample-configuration.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Sample load balancer configurations",sidebar_position:1,description:"Sample load balancers",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"High availability of JSON-RPC and RPC Pub/Sub APIs",permalink:"/public-networks/how-to/configure-ha/"},next:{title:"Install and update Java",permalink:"/public-networks/how-to/configure-java/install-update-java"}},c={},l=[{value:"AWS",id:"aws",level:2},{value:"HTTPS redirection",id:"https-redirection",level:3},{value:"Elastic Kubernetes Service",id:"elastic-kubernetes-service",level:2},{value:"Manual configurations",id:"manual-configurations",level:2},{value:"HTTPS redirection",id:"https-redirection-1",level:3}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"sample-load-balancer-configurations",children:"Sample load balancer configurations"})}),"\n",(0,t.jsx)(n.h2,{id:"aws",children:"AWS"}),"\n",(0,t.jsxs)(n.p,{children:["For AWS, we recommend the Classic Load Balancer. The Classic Load Balancer is the easiest to configure and work with. Register the Besu instances to the load balancer and use the ",(0,t.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#readiness-and-liveness-endpoints",children:"liveness endpoint"})," for health checks."]}),"\n",(0,t.jsx)(n.p,{children:"For finer grain control, use the Application Load Balancer:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Configure one target group with n nodes."}),"\n",(0,t.jsxs)(n.li,{children:["Configure multiple listeners with one per port (for example, ",(0,t.jsx)(n.code,{children:"30303"}),", ",(0,t.jsx)(n.code,{children:"8545"}),") you are using and route to the target group."]}),"\n",(0,t.jsxs)(n.li,{children:["Use the ",(0,t.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#readiness-and-liveness-endpoints",children:"liveness endpoint"})," for health checks."]}),"\n",(0,t.jsx)(n.li,{children:"Register the Besu instances multiple times with different ports. This is like configuring microservices on Elastic Container Service (ECS) or Elastic Kubernetes Service (EKS)."}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"https-redirection",children:"HTTPS redirection"}),"\n",(0,t.jsx)(n.p,{children:"With either AWS load balancer, you can add certificates using ACM (Amazon Certificate Manager), add them to the load balancers, and redirect all HTTP calls to HTTPS."}),"\n",(0,t.jsx)(n.h2,{id:"elastic-kubernetes-service",children:"Elastic Kubernetes Service"}),"\n",(0,t.jsx)(n.p,{children:"For Elastic Kubernetes Service (AWS Kubernetes service) use the same load balancer configuration as when running nodes in Kubernetes. Use labels to specify nodes for the load balanced group."}),"\n",(0,t.jsx)(n.h2,{id:"manual-configurations",children:"Manual configurations"}),"\n",(0,t.jsx)(n.p,{children:"Where applicable, we strongly recommend using service discovery. That is, pair your load balancer configuration with something that dynamically detects new nodes and removed failed nodes."}),"\n",(0,t.jsx)(n.p,{children:"For Nginx, use multiple upstreams (one for each port). Pair each upstream with a separate server block."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-conf",metastring:'title="Upstreams paired with server blocks"',children:"upstream discovery_tcp_30303 {\n server 10.0.1.1:30303;\n server 10.0.1.2:30303;\n}\n\nupstream rpc_tcp_8545 {\n server 10.0.1.1:8545;\n server 10.0.1.2:8545;\n}\n\nserver {\n listen 30303;\n server_name some.host;\n location / {\n proxy_pass http://discovery_tcp_30303;\n }\n}\n\nserver {\n listen 8545;\n server_name some.host;\n location / {\n proxy_pass http://rpc_tcp_8545;\n }\n}\n...\n"})}),"\n",(0,t.jsx)(n.p,{children:"For HAProxy, create multiple backend and frontend sets."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-text",metastring:'title="Multiple backend and frontend sets"',children:"frontend discovery-tcp-30303\n bind *:30303\n acl ...\n ...\n default_backend back-discovery-tcp-30303\n\nfrontend rpc-tcp-8545\n bind *:8545\n acl ...\n ...\n default_backend back-rpc-tcp-8545\n\nbackend back-discovery-tcp-30303\n balance leastconn\n server node-01 10.0.1.1:30303 weight 1 check\n server node-02 10.0.1.2:30303 weight 1 check\n option ...\n timeout server 600s\n\nbackend back-rpc-tcp-8545\n balance leastconn\n server node-01 10.0.1.1:8545 weight 1 check\n server node-02 10.0.1.2:8545 weight 1 check\n option ....\n timeout server 600s\n...\n"})}),"\n",(0,t.jsx)(n.h3,{id:"https-redirection-1",children:"HTTPS redirection"}),"\n",(0,t.jsx)(n.p,{children:"To add HTTPS capability, update the above server blocks to include the certificates and specific ciphers. If you require an HTTP to HTTPS redirection, add separate blocks to return a 301 code with the new URI."})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>o});var t=r(96540);const i={},a=t.createContext(i);function s(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/89f1fe89.8a3d9311.js b/assets/js/89f1fe89.8a3d9311.js new file mode 100644 index 00000000000..9cf3dbfe95e --- /dev/null +++ b/assets/js/89f1fe89.8a3d9311.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[3623],{37971:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>h});var s=t(74848),o=t(28453),a=t(11470),r=t(19365);const i={title:"Deploy charts",sidebar_position:3,description:"Deploying Besu Helm Charts for a Kubernetes cluster",tags:["private networks"]},l="Deploy charts",c={id:"private-networks/tutorials/kubernetes/charts",title:"Deploy charts",description:"Deploying Besu Helm Charts for a Kubernetes cluster",source:"@site/docs/private-networks/tutorials/kubernetes/charts.md",sourceDirName:"private-networks/tutorials/kubernetes",slug:"/private-networks/tutorials/kubernetes/charts",permalink:"/private-networks/tutorials/kubernetes/charts",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/kubernetes/charts.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Deploy charts",sidebar_position:3,description:"Deploying Besu Helm Charts for a Kubernetes cluster",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Create a cluster",permalink:"/private-networks/tutorials/kubernetes/cluster"},next:{title:"Use the Quorum Explorer",permalink:"/private-networks/tutorials/kubernetes/quorum-explorer"}},d={},h=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Provision with Helm charts",id:"provision-with-helm-charts",level:2},{value:"1. Check that you can connect to the cluster with kubectl",id:"1-check-that-you-can-connect-to-the-cluster-with-kubectl",level:3},{value:"2. Create the namespace",id:"2-create-the-namespace",level:3},{value:"3. Deploy the monitoring chart",id:"3-deploy-the-monitoring-chart",level:3},{value:"4. Deploy the genesis chart",id:"4-deploy-the-genesis-chart",level:3},{value:"5. Deploy the bootnodes",id:"5-deploy-the-bootnodes",level:3},{value:"6. Deploy the validators",id:"6-deploy-the-validators",level:3},{value:"7. Add/Remove additional validators to the validator pool",id:"7-addremove-additional-validators-to-the-validator-pool",level:3},{value:"8. Deploy RPC or Transaction nodes",id:"8-deploy-rpc-or-transaction-nodes",level:3},{value:"9. Connect to the node from your local machine via an ingress",id:"9-connect-to-the-node-from-your-local-machine-via-an-ingress",level:3},{value:"10. Blockchain explorer",id:"10-blockchain-explorer",level:3}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"deploy-charts",children:"Deploy charts"})}),"\n",(0,s.jsx)(n.p,{children:"You can deploy Besu Helm charts for a Kubernetes cluster."}),"\n",(0,s.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Clone the ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-kubernetes",children:"Quorum-Kubernetes"})," repository"]}),"\n",(0,s.jsxs)(n.li,{children:["A ",(0,s.jsx)(n.a,{href:"/private-networks/tutorials/kubernetes/cluster",children:"running Kubernetes cluster"})]}),"\n",(0,s.jsxs)(n.li,{children:["Install ",(0,s.jsx)(n.a,{href:"https://kubernetes.io/docs/tasks/tools/",children:"Kubectl"})]}),"\n",(0,s.jsxs)(n.li,{children:["Install ",(0,s.jsx)(n.a,{href:"https://helm.sh/docs/intro/install/",children:"Helm3"})]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"provision-with-helm-charts",children:"Provision with Helm charts"}),"\n",(0,s.jsxs)(n.p,{children:["Helm is a method of packaging a collection of objects into a chart which can then be deployed to the cluster. After you have cloned the ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-kubernetes",children:"Quorum-Kubernetes"})," repository, change the directory to ",(0,s.jsx)(n.code,{children:"helm"})," for the rest of this tutorial."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"cd helm\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Each helm chart has the following key-map values which you will need to set depending on your needs. The ",(0,s.jsx)(n.code,{children:"cluster.provider"})," is used as a key for the various cloud features enabled. Please specify only one cloud provider, not both. At present, the charts have full support for cloud native services in both AWS and Azure. Please note that if you use GCP, IBM etc please set ",(0,s.jsx)(n.code,{children:"cluster.provider: local"})," and set ",(0,s.jsx)(n.code,{children:"cluster.cloudNativeServices: false"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Please update the ",(0,s.jsx)(n.code,{children:"aws"})," or ",(0,s.jsx)(n.code,{children:"azure"})," map as shown below if you deploy to either cloud provider."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"cluster:\n provider: local # choose from: local | aws | azure\n cloudNativeServices: false # set to true to use Cloud Native Services (SecretsManager and IAM for AWS; KeyVault & Managed Identities for Azure)\n reclaimPolicy: Delete # set to either Retain or Delete; note that PVCs and PVs will still exist after a 'helm delete'. Setting to Retain will keep volumes even if PVCs/PVs are deleted in kubernetes. Setting to Delete will remove volumes from EC2 EBS when PVC is deleted\n\nquorumFlags:\n privacy: false\n removeKeysOnDelete: false\n\naws:\n # the aws cli commands uses the name 'quorum-node-secrets-sa' so only change this if you altered the name\n serviceAccountName: quorum-node-secrets-sa\n # the region you are deploying to\n region: ap-southeast-2\n\nazure:\n # the script/bootstrap.sh uses the name 'quorum-pod-identity' so only change this if you altered the name\n identityName: quorum-pod-identity\n # the clientId of the user assigned managed identity created in the template\n identityClientId: azure-clientId\n keyvaultName: azure-keyvault\n # the tenant ID of the key vault\n tenantId: azure-tenantId\n # the subscription ID to use - this needs to be set explicitly when using multi tenancy\n subscriptionId: azure-subscriptionId\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Setting the ",(0,s.jsx)(n.code,{children:"cluster.cloudNativeServices: true"}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Stores keys in Azure Key Vault or AWS Secrets Manager."}),"\n",(0,s.jsx)(n.li,{children:"Uses Azure Managed Identities or AWS Identity and Access Management for pod identity access."}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:"You can customize any of the charts in this repository to suit your requirements, and make pull requests to extend functionality."})}),"\n",(0,s.jsxs)(n.h3,{id:"1-check-that-you-can-connect-to-the-cluster-with-kubectl",children:["1. Check that you can connect to the cluster with ",(0,s.jsx)(n.code,{children:"kubectl"})]}),"\n",(0,s.jsx)(n.p,{children:"Verify kubectl is connected to cluster using: (use the latest version)"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"kubectl version\n"})}),"\n",(0,s.jsx)(n.p,{children:"The result looks similar to:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.1", GitCommit:"86ec240af8cbd1b60bcc4c03c20da9b98005b92e", GitTreeState:"clean", BuildDate:"2021-12-16T11:41:01Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/amd64"}\nServer Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.3", GitCommit:"c92036820499fedefec0f847e2054d824aea6cd1", GitTreeState:"clean", BuildDate:"2021-10-27T18:35:25Z", GoVersion:"go1.16.9", Compiler:"gc", Platform:"linux/amd64"}\n'})}),"\n",(0,s.jsx)(n.h3,{id:"2-create-the-namespace",children:"2. Create the namespace"}),"\n",(0,s.jsx)(n.p,{children:"This tutorial isolates groups of resources (for example, StatefulSets and Services) within a single cluster."}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["The rest of this tutorial uses ",(0,s.jsx)(n.code,{children:"besu"})," as the namespace, but you're free to pick any name when deploying, as long as it's consistent across the ",(0,s.jsx)(n.a,{href:"/private-networks/tutorials/kubernetes/cluster",children:"infrastructure scripts"})," and charts."]})}),"\n",(0,s.jsx)(n.p,{children:"Run the following in a terminal window:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"kubectl create namespace besu\n"})}),"\n",(0,s.jsx)(n.h3,{id:"3-deploy-the-monitoring-chart",children:"3. Deploy the monitoring chart"}),"\n",(0,s.jsx)(n.p,{children:"This chart deploys Prometheus and Grafana to monitor the metrics of the cluster, nodes and state of the network."}),"\n",(0,s.jsxs)(n.p,{children:["Update the admin ",(0,s.jsx)(n.code,{children:"username"})," and ",(0,s.jsx)(n.code,{children:"password"})," in the ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/helm/values/monitoring.yml",children:"monitoring values file"}),". Configure alerts to the receiver of your choice (for example, email or Slack), then deploy the chart using:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"helm repo add prometheus-community https://prometheus-community.github.io/helm-charts\nhelm repo update\nhelm install monitoring prometheus-community/kube-prometheus-stack --version 34.10.0 --namespace=besu --values ./values/monitoring.yml --wait\nkubectl --namespace besu apply -f ./values/monitoring/\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Metrics are collected via a ",(0,s.jsx)(n.a,{href:"https://github.com/prometheus-operator/prometheus-operator/blob/7c77626e5e270a2530e187b185d45eeed8a773bf/Documentation/user-guides/getting-started.md",children:"ServiceMonitor"})," that scrapes each Besu pod, using given ",(0,s.jsx)(n.a,{href:"https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/",children:(0,s.jsx)(n.code,{children:"annotations"})})," which specify the port and path to use. For example:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:' template:\n metadata:\n annotations:\n prometheus.io/scrape: "true"\n prometheus.io/port: 9545\n prometheus.io/path: "/metrics"\n'})}),"\n",(0,s.jsx)(n.admonition,{type:"warning",children:(0,s.jsxs)(n.p,{children:["For production use cases, configure Grafana with one of the supported ",(0,s.jsx)(n.a,{href:"https://grafana.com/docs/grafana/latest/auth/",children:"native auth mechanisms"}),"."]})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"k8s-metrics",src:t(2828).A+"",width:"1918",height:"943"})}),"\n",(0,s.jsxs)(n.p,{children:["Optionally you can also deploy the ",(0,s.jsx)(n.a,{href:"https://www.elastic.co/elastic-stack/",children:"Elastic Stack"})," to view logs (and metrics)."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"helm repo add elastic https://helm.elastic.co\nhelm repo update\n# if on cloud\nhelm install elasticsearch --version 7.17.1 elastic/elasticsearch --namespace quorum --values ./values/elasticsearch.yml\n# if local - set the replicas to 1\nhelm install elasticsearch --version 7.17.1 elastic/elasticsearch --namespace quorum --values ./values/elasticsearch.yml --set replicas=1 --set minimumMasterNodes: 1\nhelm install kibana --version 7.17.1 elastic/kibana --namespace quorum --values ./values/kibana.yml\nhelm install filebeat --version 7.17.1 elastic/filebeat --namespace quorum --values ./values/filebeat.yml\n"})}),"\n",(0,s.jsxs)(n.p,{children:["If you install ",(0,s.jsx)(n.code,{children:"filebeat"}),", please create a ",(0,s.jsx)(n.code,{children:"filebeat-*"})," index pattern in ",(0,s.jsx)(n.code,{children:"kibana"}),". All the logs from the nodes are sent to the ",(0,s.jsx)(n.code,{children:"filebeat"})," index. If you use The Elastic stack for logs and metrics, please deploy ",(0,s.jsx)(n.code,{children:"metricbeat"})," in a similar manner to ",(0,s.jsx)(n.code,{children:"filebeat"})," and create an index pattern in Kibana."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"k8s-elastic",src:t(46973).A+"",width:"1919",height:"937"})}),"\n",(0,s.jsx)(n.p,{children:"To connect to Kibana or Grafana, we also need to deploy an ingress so you can access your monitoring endpoints publicly. We use Nginx as our ingress here, and you are free to configure any ingress per your requirements."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx\nhelm repo update\nhelm install quorum-monitoring-ingress ingress-nginx/ingress-nginx \\\n --namespace quorum \\\n --set controller.ingressClassResource.name="monitoring-nginx" \\\n --set controller.ingressClassResource.controllerValue="k8s.io/monitoring-ingress-nginx" \\\n --set controller.replicaCount=1 \\\n --set controller.nodeSelector."kubernetes\\.io/os"=linux \\\n --set defaultBackend.nodeSelector."kubernetes\\.io/os"=linux \\\n --set controller.admissionWebhooks.patch.nodeSelector."kubernetes\\.io/os"=linux \\\n --set controller.service.externalTrafficPolicy=Local\n\nkubectl apply -f ../ingress/ingress-rules-monitoring.yml\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Once complete, view the IP address listed under the ",(0,s.jsx)(n.code,{children:"Ingress"})," section if you're using the Kubernetes Dashboard or on the command line ",(0,s.jsx)(n.code,{children:"kubectl -n quorum get services quorum-monitoring-ingress-ingress-nginx-controller"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["We refer to the ingress here as ",(0,s.jsx)(n.code,{children:"external-nginx"})," because it deals with monitoring endpoints specifically. We also deploy a second ingress called ",(0,s.jsx)(n.code,{children:"network-ingress"})," which is for the blockchain nodes only in ",(0,s.jsx)(n.a,{href:"#9-connect-to-the-node-from-your-local-machine-via-an-ingress",children:"step 8"})]})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"k8s-ingress-external",src:t(47019).A+"",width:"1902",height:"899"})}),"\n",(0,s.jsx)(n.p,{children:"You can view the Besu dashboard by going to:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"http:///d/XE4V0WGZz/besu-overview?orgId=1&refresh=10s\n"})}),"\n",(0,s.jsx)(n.p,{children:"You can view the Kibana dashboard (if deployed) by going to:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"http:///kibana\n"})}),"\n",(0,s.jsx)(n.h3,{id:"4-deploy-the-genesis-chart",children:"4. Deploy the genesis chart"}),"\n",(0,s.jsx)(n.p,{children:"The genesis chart creates the genesis file and keys for the validators."}),"\n",(0,s.jsx)(n.admonition,{type:"warning",children:(0,s.jsxs)(n.p,{children:["It's important to keep the release names of the initial validator pool as per this tutorial, that is ",(0,s.jsx)(n.code,{children:"validator-n"}),", where ",(0,s.jsx)(n.code,{children:"n"})," is the node number. Any validators created after the initial pool can be named to anything you like."]})}),"\n",(0,s.jsxs)(n.p,{children:["The override ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/helm/values/genesis-besu.yml",children:"values.yml"})," looks like below:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"---\nquorumFlags:\n removeGenesisOnDelete: true\n\ncluster:\n provider: local # choose from: local | aws | azure\n cloudNativeServices: false\n\naws:\n # the aws cli commands uses the name 'quorum-node-secrets-sa' so only change this if you altered the name\n serviceAccountName: quorum-node-secrets-sa\n # the region you are deploying to\n region: ap-southeast-2\n\nazure:\n # the script/bootstrap.sh uses the name 'quorum-pod-identity' so only change this if you altered the name\n identityName: quorum-pod-identity\n # the clientId of the user assigned managed identity created in the template\n identityClientId: azure-clientId\n keyvaultName: azure-keyvault\n # the tenant ID of the key vault\n tenantId: azure-tenantId\n # the subscription ID to use - this needs to be set explicitly when using multi tenancy\n subscriptionId: azure-subscriptionId\n\n# the raw Genesis config\n# rawGenesisConfig.blockchain.nodes set the number of validators/signers\nrawGenesisConfig:\n genesis:\n config:\n chainId: 1337\n algorithm:\n consensus: qbft # choose from: ibft2 | qbft | clique\n blockperiodseconds: 10\n epochlength: 30000\n requesttimeoutseconds: 20\n gasLimit: '0x47b760'\n difficulty: '0x1'\n coinbase: '0x0000000000000000000000000000000000000000'\n blockchain:\n nodes:\n generate: true\n count: 4\n accountPassword: 'password'\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Please set the ",(0,s.jsx)(n.code,{children:"aws"}),", ",(0,s.jsx)(n.code,{children:"azure"})," and ",(0,s.jsx)(n.code,{children:"cluster"})," keys are as per the ",(0,s.jsx)(n.a,{href:"#provision-with-helm-charts",children:"Provisioning"})," step. ",(0,s.jsx)(n.code,{children:"quorumFlags.removeGenesisOnDelete: true"})," tells the chart to delete the genesis file when the chart is deleted. If you may wish to retain the genesis on deletion, please set that value to ",(0,s.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["The last config item is ",(0,s.jsx)(n.code,{children:"rawGenesisConfig"})," which has details of the chain you are creating, please edit any of the parameters in there to match your requirements. To set the number of initial validators set the ",(0,s.jsx)(n.code,{children:"rawGenesisConfig.blockchain.nodes"})," to the number that you'd like. We recommend using the Byzantine formula of ",(0,s.jsx)(n.code,{children:"N=3F+1"})," when setting the number of validators."]}),"\n",(0,s.jsxs)(n.p,{children:["One more thing to note is that when ",(0,s.jsx)(n.code,{children:"cluster.cloudNativeServices: true"})," is set, the genesis job will not add the ",(0,s.jsx)(n.a,{href:"/private-networks/tutorials/quickstart",children:"Quickstart"})," test accounts into the genesis file."]}),"\n",(0,s.jsx)(n.p,{children:"When you are ready deploy the chart with :"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"cd helm\nhelm install genesis ./charts/besu-genesis --namespace besu --create-namespace --values ./values/genesis-besu.yml\n"})}),"\n",(0,s.jsx)(n.p,{children:"Once completed, view the genesis and enodes (the list of static nodes) configuration maps that every Besu node uses, and the validator and bootnode node keys as secrets."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"k8s-genesis-configmaps",src:t(10066).A+"",width:"1910",height:"416"})}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"k8s-genesis-secrets",src:t(44931).A+"",width:"1906",height:"789"})}),"\n",(0,s.jsx)(n.h3,{id:"5-deploy-the-bootnodes",children:"5. Deploy the bootnodes"}),"\n",(0,s.jsxs)(n.p,{children:["This is an optional but recommended step. In a production setup we recommend the use of two ore more bootnodes for best practices. Each Besu node has a map that tells the StatefulSet what to deploy and how to clean up. The default ",(0,s.jsx)(n.code,{children:"values.yml"})," for the StatefulSet define the following flags which are present in all the override values files."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"---\nquorumFlags:\n privacy: false\n removeKeysOnDelete: true\n isBootnode: true # set this to true if this node is a bootnode\n usesBootnodes: true # set this to true if the network you are connecting to use a bootnode/s that are deployed in the cluster\n\ncluster:\n provider: local # choose from: local | aws | azure\n cloudNativeServices: false\n reclaimPolicy: Delete # set to either Retain or Delete; note that PVCs and PVs will still exist after a 'helm delete'. Setting to Retain will keep volumes even if PVCs/PVs are deleted in kubernetes. Setting to Delete will remove volumes from EC2 EBS when PVC is deleted\n\naws:\n # the aws cli commands uses the name 'quorum-node-secrets-sa' so only change this if you altered the name\n serviceAccountName: quorum-node-secrets-sa\n # the region you are deploying to\n region: ap-southeast-2\n\nazure:\n # the script/bootstrap.sh uses the name 'quorum-pod-identity' so only change this if you altered the name\n identityName: quorum-pod-identity\n # the clientId of the user assigned managed identity created in the template\n identityClientId: azure-clientId\n keyvaultName: azure-keyvault\n # the tenant ID of the key vault\n tenantId: azure-tenantId\n # the subscription ID to use - this needs to be set explicitly when using multi tenancy\n subscriptionId: azure-subscriptionId\n\nnode:\n besu:\n metrics:\n serviceMonitorEnabled: true\n resources:\n cpuLimit: 1\n cpuRequest: 0.1\n memLimit: \"2G\"\n memRequest: \"1G\"\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Please set the ",(0,s.jsx)(n.code,{children:"aws"}),", ",(0,s.jsx)(n.code,{children:"azure"})," and ",(0,s.jsx)(n.code,{children:"cluster"})," keys are as per the ",(0,s.jsx)(n.a,{href:"#provision-with-helm-charts",children:"Provisioning"})," step. ",(0,s.jsx)(n.code,{children:"quorumFlags.removeKeysOnDelete: true"})," tells the chart to delete the node's keys when the chart is deleted. If you may wish to retain the keys on deletion, please set that value to ",(0,s.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["For the bootnodes only, set the ",(0,s.jsx)(n.code,{children:"quorumFlags.isBootnode: true"}),". When using bootnodes you have to also set ",(0,s.jsx)(n.code,{children:"quorumFlags.usesBootnodes: true"})," to indicate that all nodes on the network will use these bootnodes."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["If you use bootnodes, you must set ",(0,s.jsx)(n.code,{children:"quorumFlags.usesBootnodes: true"})," in the override values.yaml for every other node type, that is validators.yaml, txnode.yaml and reader.yaml"]})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"helm install bootnode-1 ./charts/besu-node --namespace besu --values ./values/bootnode.yml\nhelm install bootnode-2 ./charts/besu-node --namespace besu --values ./values/bootnode.yml\n"})}),"\n",(0,s.jsx)(n.p,{children:"Once complete, you see two StatefulSets, and the two bootnodes discover themselves and peer. Because there are no validators present yet, there are no blocks created, as seen in the following logs."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"k8s-bootnode-logs",src:t(49140).A+"",width:"1909",height:"782"})}),"\n",(0,s.jsx)(n.h3,{id:"6-deploy-the-validators",children:"6. Deploy the validators"}),"\n",(0,s.jsx)(n.p,{children:"The validators peer with the bootnodes and themselves, and when a majority of the validators have peered, blocks are proposed and created on the chain."}),"\n",(0,s.jsxs)(n.p,{children:["These are the next set of nodes that we will deploy. The charts use four validators (default) to replicate best practices for a network. The override ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/helm/values/validator.yml",children:"values.yml"})," for the StatefulSet looks like below:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"---\nquorumFlags:\n privacy: false\n removeKeysOnDelete: false\n isBootnode: false # set this to true if this node is a bootnode\n usesBootnodes: true # set this to true if the network you are connecting to use a bootnode/s that are deployed in the cluster\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Please set the ",(0,s.jsx)(n.code,{children:"aws"}),", ",(0,s.jsx)(n.code,{children:"azure"})," and ",(0,s.jsx)(n.code,{children:"cluster"})," keys are as per the ",(0,s.jsx)(n.a,{href:"#provision-with-helm-charts",children:"Provisioning"})," step. ",(0,s.jsx)(n.code,{children:"quorumFlags.removeKeysOnDelete: true"})," tells the chart to delete the node's keys when the chart is deleted. If you may wish to retain the keys on deletion, please set that value to ",(0,s.jsx)(n.code,{children:"false"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"warning",children:(0,s.jsx)(n.p,{children:"Please note that if you delete a majority of the validators, the network will halt. Additionally, if the validator keys are deleted you may not be able to recover as you need a majority of the validators up to vote to add new validators into the pool"})}),"\n",(0,s.jsxs)(n.p,{children:["When using bootnodes (if deployed in the previous step) you have to also set ",(0,s.jsx)(n.code,{children:"quorumFlags.usesBootnodes: true"})," to indicate that all nodes on the network will use these bootnodes."]}),"\n",(0,s.jsxs)(n.p,{children:["For the initial validator pool we set all the node flags to ",(0,s.jsx)(n.code,{children:"false"})," and then deploy."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"helm install validator-1 ./charts/besu-node --namespace besu --values ./values/validator.yml\nhelm install validator-2 ./charts/besu-node --namespace besu --values ./values/validator.yml\nhelm install validator-3 ./charts/besu-node --namespace besu --values ./values/validator.yml\nhelm install validator-4 ./charts/besu-node --namespace besu --values ./values/validator.yml\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"warning",children:(0,s.jsxs)(n.p,{children:["It's important to keep the release names of the validators the same as it is tied to the keys that the genesis chart creates. So we use ",(0,s.jsx)(n.code,{children:"validator-1"}),", ",(0,s.jsx)(n.code,{children:"validator-2"}),", etc. in the following command."]})}),"\n",(0,s.jsx)(n.p,{children:"Once completed, you may need to give the validators a few minutes to peer and for round changes, depending on when the first validator was spun up, before the logs display blocks being created."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"k8s-validator-logs",src:t(97588).A+"",width:"1904",height:"853"})}),"\n",(0,s.jsx)(n.h3,{id:"7-addremove-additional-validators-to-the-validator-pool",children:"7. Add/Remove additional validators to the validator pool"}),"\n",(0,s.jsxs)(n.p,{children:["To add (or remove) more validators to the initial validator pool, you need to deploy a node such as an RPC node (step 8) and then ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft#add-and-remove-validators",children:"vote"})," that node in. The vote API call must be made on a majority of the existing pool and the new node will then become a validator."]}),"\n",(0,s.jsxs)(n.p,{children:["Please refer to the ",(0,s.jsx)(n.a,{href:"#9-connect-to-the-node-from-your-local-machine-via-an-ingress",children:"Ingress Section"})," for details on making the API calls from your local machine or equivalent."]}),"\n",(0,s.jsx)(n.h3,{id:"8-deploy-rpc-or-transaction-nodes",children:"8. Deploy RPC or Transaction nodes"}),"\n",(0,s.jsxs)(n.p,{children:["An RPC node is simply a node that can be used to make public transactions or perform read heavy operations such as when connected to a chain explorer like ",(0,s.jsx)(n.a,{href:"https://github.com/blockscout/blockscout",children:"BlockScout"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["The RPC override ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/helm/values/reader.yml",children:"values.yml"})," for the StatefulSet looks identical to that of the validators above, and will create it's own node keys before the node starts."]}),"\n",(0,s.jsx)(n.p,{children:"To deploy an RPC node:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"helm install rpc-1 ./charts/besu-node --namespace besu --values ./values/reader.yml\n"})}),"\n",(0,s.jsx)(n.p,{children:"A Transaction or Member node in turn is one which has an accompanying Private Transaction Manager, such as Tessera; which allow you to make private transactions between nodes."}),"\n",(0,s.jsxs)(n.p,{children:["The Transaction override ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/helm/values/txnode.yml",children:"values.yml"})," for the StatefulSet looks identical to that of the validators above and only has ",(0,s.jsx)(n.code,{children:"quorumFlags.privacy: true"})," to indicate that it is deploying a pair of GoQuorum and Tessera nodes."]}),"\n",(0,s.jsx)(n.p,{children:"To deploy a Transaction or Member node:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"helm install member-1 ./charts/besu-node --namespace besu --values ./values/txnode.yml\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Logs for ",(0,s.jsx)(n.code,{children:"member-1"})," resemble the following for Tessera:"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"k8s-tx-tessera-logs",src:t(21780).A+"",width:"1951",height:"602"})}),"\n",(0,s.jsx)(n.p,{children:"Logs for Besu resemble the following:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"k8s-tx-Besu-logs",src:t(23396).A+"",width:"1951",height:"605"})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["In these examples we use ",(0,s.jsx)(n.code,{children:"member-1"})," and ",(0,s.jsx)(n.code,{children:"rpc-1"})," as release names for the deployments. You can pick any release name that you'd like to use in place of those as per your requirements."]})}),"\n",(0,s.jsx)(n.h3,{id:"9-connect-to-the-node-from-your-local-machine-via-an-ingress",children:"9. Connect to the node from your local machine via an ingress"}),"\n",(0,s.jsxs)(n.p,{children:["In order to view the Grafana dashboards or connect to the nodes to make transactions from your local machine you can deploy an ingress controller with rules. We use the ",(0,s.jsx)(n.code,{children:"ingress-nginx"})," ingress controller which can be deployed as follows:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx\nhelm repo update\nhelm install quorum-network-ingress ingress-nginx/ingress-nginx \\\n --namespace quorum \\\n --set controller.ingressClassResource.name="network-nginx" \\\n --set controller.ingressClassResource.controllerValue="k8s.io/network-ingress-nginx" \\\n --set controller.replicaCount=1 \\\n --set controller.nodeSelector."kubernetes\\.io/os"=linux \\\n --set defaultBackend.nodeSelector."kubernetes\\.io/os"=linux \\\n --set controller.admissionWebhooks.patch.nodeSelector."kubernetes\\.io/os"=linux \\\n --set controller.service.externalTrafficPolicy=Local\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Use ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/ingress/ingress-rules-besu.yml",children:"pre-defined rules"})," to test functionality, and alter to suit your requirements (for example, restrict access for API calls to trusted CIDR blocks)."]}),"\n",(0,s.jsxs)(n.p,{children:["Edit the ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/ingress/ingress-rules-besu.yml",children:"rules"})," file so that the service names match your release name. In the example, we deployed a transaction node with the release name ",(0,s.jsx)(n.code,{children:"member-1"})," so the corresponding service is called ",(0,s.jsx)(n.code,{children:"besu-node-member-1"}),". Once you have settings that match your deployments, deploy the rules as follows:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"kubectl apply -f ../ingress/ingress-rules-besu.yml\n"})}),"\n",(0,s.jsxs)(n.p,{children:["Once complete, view the IP address listed under the ",(0,s.jsx)(n.code,{children:"Ingress"})," section if you're using the Kubernetes Dashboard or on the command line ",(0,s.jsx)(n.code,{children:"kubectl -n quorum get services quorum-network-ingress-ingress-nginx-controller"}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"k8s-ingress",src:t(47019).A+"",width:"1902",height:"899"})}),"\n",(0,s.jsx)(n.p,{children:"The following is an example RPC call, which confirms that the node running the JSON-RPC service is syncing:"}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(r.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'curl -v -X POST -H "Content-Type: application/json" --data \'{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}\' http:///rpc\n'})})}),(0,s.jsx)(r.A,{value:"JSON result",label:"JSON result",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x4e9"\n}\n'})})})]}),"\n",(0,s.jsx)(n.h3,{id:"10-blockchain-explorer",children:"10. Blockchain explorer"}),"\n",(0,s.jsxs)(n.p,{children:["You can deploy ",(0,s.jsx)(n.a,{href:"https://github.com/blockscout/blockscout",children:"BlockScout"})," to aid with monitoring the blockchain. To do this, update the ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/helm/values/blockscout-besu.yml",children:"BlockScout values file"})," and set the ",(0,s.jsx)(n.code,{children:"database"})," and ",(0,s.jsx)(n.code,{children:"secret_key_base"})," values."]}),"\n",(0,s.jsx)(n.admonition,{type:"important",children:(0,s.jsxs)(n.p,{children:["Changes to the database requires changes to both the ",(0,s.jsx)(n.code,{children:"database"})," and the ",(0,s.jsx)(n.code,{children:"blockscout"})," dictionaries."]})}),"\n",(0,s.jsx)(n.p,{children:"Once completed, deploy the chart using:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"helm dependency update ./charts/blockscout\nhelm install blockscout ./charts/blockscout --namespace quorum --values ./values/blockscout-goquorum.yaml\n"})}),"\n",(0,s.jsxs)(n.p,{children:["You can optionally deploy the ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-explorer",children:"Quorum-Explorer"})," as a lightweight blockchain explorer. The Quorum Explorer is not recommended for use in production and is intended for demonstration or Development purposes only. The Explorer can give an overview over the whole network, such as querying each node on the network for node or block information, voting (add/remove) validators from the network, demonstrating a SimpleStorage smart contract with privacy enabled, and sending transactions between wallets as you would do in MetaMask. Please see the ",(0,s.jsx)(n.a,{href:"/private-networks/tutorials/kubernetes/quorum-explorer",children:"Explorer"})," page for details on how to use the application."]}),"\n",(0,s.jsx)(n.admonition,{type:"warning",children:(0,s.jsx)(n.p,{children:"The accounts listed in the file below are for test purposes only and should not be used on a production network."})}),"\n",(0,s.jsxs)(n.p,{children:["To deploy the application, update the ",(0,s.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/helm/values/explorer-besu.yaml",children:"Explorer values file"})," with details of your nodes and endpoints and then deploy."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"helm install quorum-explorer ./charts/explorer --namespace besu --values ./values/explorer-besu.yaml\n"})}),"\n",(0,s.jsxs)(n.p,{children:["You will also need deploy the ingress (if not already done in ",(0,s.jsx)(n.a,{href:"#3-deploy-the-monitoring-chart",children:"Monitoring"})," to access the endpoint on ",(0,s.jsx)(n.code,{children:"http:///explorer"})]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"k8s-explorer",src:t(88591).A+"",width:"1917",height:"944"})})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var s=t(18215);const o={tabItem:"tabItem_Ymn6"};var a=t(74848);function r(e){let{children:n,hidden:t,className:r}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.A)(o.tabItem,r),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>k});var s=t(96540),o=t(18215),a=t(23104),r=t(56347),i=t(205),l=t(57485),c=t(31682),d=t(70679);function h(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function u(e){const{values:n,children:t}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:t,attributes:s,default:o}}=e;return{value:n,label:t,attributes:s,default:o}}))}(t);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:t}=e;const o=(0,r.W6)(),a=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l.aZ)(a),(0,s.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(o.location.search);n.set(a,e),o.replace({...o.location,search:n.toString()})}),[a,o])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:o}=e,a=u(e),[r,l]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=t.find((e=>e.default))??t[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:a}))),[c,h]=m({queryString:t,groupId:o}),[b,g]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[o,a]=(0,d.Dv)(t);return[o,(0,s.useCallback)((e=>{t&&a.set(e)}),[t,a])]}({groupId:o}),f=(()=>{const e=c??b;return p({value:e,tabValues:a})?e:null})();(0,i.A)((()=>{f&&l(f)}),[f]);return{selectedValue:r,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);l(e),h(e),g(e)}),[h,g,a]),tabValues:a}}var g=t(92303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=t(74848);function v(e){let{className:n,block:t,selectedValue:s,selectValue:r,tabValues:i}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,a.a_)(),d=e=>{const n=e.currentTarget,t=l.indexOf(n),o=i[t].value;o!==s&&(c(n),r(o))},h=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":t},n),children:i.map((e=>{let{value:n,label:t,attributes:a}=e;return(0,x.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>l.push(e),onKeyDown:h,onClick:d,...a,className:(0,o.A)("tabs__item",f.tabItem,a?.className,{"tabs__item--active":s===n}),children:t??n},n)}))})}function y(e){let{lazy:n,children:t,selectedValue:a}=e;const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===a));return e?(0,s.cloneElement)(e,{className:(0,o.A)("margin-top--md",e.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function j(e){const n=b(e);return(0,x.jsxs)("div",{className:(0,o.A)("tabs-container",f.tabList),children:[(0,x.jsx)(v,{...n,...e}),(0,x.jsx)(y,{...n,...e})]})}function k(e){const n=(0,g.A)();return(0,x.jsx)(j,{...e,children:h(e.children)},String(n))}},44931:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/kuberenetes-genesis-secrets-01ce3f7990b79414bad9ca1178d66700.png"},49140:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/kubernetes-bootnode-logs-01c0c7d459650185e6acb4f897ef0973.png"},46973:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/kubernetes-elastic-77850ddd9691a3c8f64bd625d3af3a4d.png"},88591:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/kubernetes-explorer-41af1feb005383ef1871e47d4792c3b5.png"},10066:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/kubernetes-genesis-configmaps-829bdeea072f7fadfe9c440cceff33fd.png"},2828:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/kubernetes-grafana-f5b7e488c30e4bbacde6f0fba682e0a2.png"},47019:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/kubernetes-ingress-ip-12a419bfc4a14aa9dee58168f8dc012b.png"},23396:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/kubernetes-tx-Besu-logs-86e44cf39e1bad7a0760e75e04663f8e.png"},21780:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/kubernetes-tx-tessera-logs-9dc3ebbea91d127a6279fe8fe8e3edcc.png"},97588:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/kubernetes-validator-logs-85c883d2e1a7e2addc592ab2f3fc62a4.png"},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>i});var s=t(96540);const o={},a=s.createContext(o);function r(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8a886138.e319aec1.js b/assets/js/8a886138.e319aec1.js new file mode 100644 index 00000000000..3cde2882841 --- /dev/null +++ b/assets/js/8a886138.e319aec1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4852],{93120:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>u,frontMatter:()=>c,metadata:()=>r,toc:()=>d});var o=t(74848),s=t(28453);const c={},i=void 0,r={id:"global/test_accounts",title:"test_accounts",description:"The following accounts are test accounts and their private keys are publicly visible in this documentation and in publicly available source code.",source:"@site/docs/global/test_accounts.md",sourceDirName:"global",slug:"/global/test_accounts",permalink:"/global/test_accounts",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/global/test_accounts.md",tags:[],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{}},a={},d=[];function l(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.admonition,{type:"danger",children:[(0,o.jsx)(n.mdxAdmonitionTitle,{children:(0,o.jsx)(n.strong,{children:"Do not use the test accounts on Ethereum Mainnet or any production network."})}),(0,o.jsx)(n.p,{children:"The following accounts are test accounts and their private keys are publicly visible in this documentation and in publicly available source code."}),(0,o.jsx)(n.p,{children:"They are not secure and everyone can use them."}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Using test accounts on Ethereum Mainnet and production networks can lead to loss of funds and identity fraud."})}),(0,o.jsx)(n.p,{children:"In this documentation, we only provide test accounts for ease of testing and learning purposes; never use them for other purposes."}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Always secure your Ethereum Mainnet and any production account properly."})}),(0,o.jsxs)(n.p,{children:["See for instance ",(0,o.jsx)(n.a,{href:"https://support.mycrypto.com/staying-safe/protecting-yourself-and-your-funds",children:'MyCrypto "Protecting Yourself and Your Funds" guide'}),"."]})]}),"\n",(0,o.jsxs)(n.admonition,{type:"info",children:[(0,o.jsxs)(n.mdxAdmonitionTitle,{children:['"Test Account 1 (address ',(0,o.jsx)(n.code,{children:"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"}),')"']}),(0,o.jsx)(n.p,{children:"Private key to copy :"}),(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-text",children:"0x8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63\n"})}),(0,o.jsxs)(n.p,{children:["Initial balance : 200 Eth ",(0,o.jsx)(n.em,{children:"(200000000000000000000 Wei)"})]})]}),"\n",(0,o.jsxs)(n.admonition,{type:"info",children:[(0,o.jsxs)(n.mdxAdmonitionTitle,{children:['"Test Account 2 (address ',(0,o.jsx)(n.code,{children:"0x627306090abaB3A6e1400e9345bC60c78a8BEf57"}),')"']}),(0,o.jsx)(n.p,{children:"Private key to copy :"}),(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-text",children:"0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3\n"})}),(0,o.jsxs)(n.p,{children:["Initial balance : 90000 Eth ",(0,o.jsx)(n.em,{children:"(90000000000000000000000 Wei)"})]})]}),"\n",(0,o.jsxs)(n.admonition,{type:"info",children:[(0,o.jsxs)(n.mdxAdmonitionTitle,{children:['"Test Account 3 (address ',(0,o.jsx)(n.code,{children:"0xf17f52151EbEF6C7334FAD080c5704D77216b732"}),')"']}),(0,o.jsx)(n.p,{children:"Private key to copy :"}),(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-text",children:"0xae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f\n"})}),(0,o.jsxs)(n.p,{children:["Initial balance : 90000 Eth ",(0,o.jsx)(n.em,{children:"(90000000000000000000000 Wei)"})]})]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>r});var o=t(96540);const s={},c=o.createContext(s);function i(e){const n=o.useContext(c);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),o.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8b137bfa.0a8d6cfd.js b/assets/js/8b137bfa.0a8d6cfd.js new file mode 100644 index 00000000000..849e4ff9b62 --- /dev/null +++ b/assets/js/8b137bfa.0a8d6cfd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7045,5327],{14311:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>c,toc:()=>i});var t=s(74848),r=s(28453);const a={},l=void 0,c={id:"global/postman",title:"postman",description:"View the Besu JSON-RPC APIs documentation in the Postman format and obtain example requests in multiple coding languages.",source:"@site/docs/global/postman.md",sourceDirName:"global",slug:"/global/postman",permalink:"/global/postman",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/global/postman.md",tags:[],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{}},o={},i=[{value:"Run in Postman",id:"run-in-postman",level:4},{value:"Download collection",id:"download-collection",level:4}];function d(e){const n={a:"a",admonition:"admonition",h4:"h4",img:"img",p:"p",...(0,r.R)(),...e.components};return(0,t.jsxs)(n.admonition,{title:"Besu JSON-RPC APIs documentation in Postman format",type:"info",children:[(0,t.jsxs)(n.p,{children:["View the ",(0,t.jsx)(n.a,{href:"https://www.postman.com/hyperledger/workspace/hyperledger-besu/collection/11610746-f334929f-c8c3-43ed-bb73-69a6f0d728d8",children:"Besu JSON-RPC APIs documentation"})," in the Postman format and obtain example requests in multiple coding languages."]}),(0,t.jsx)(n.h4,{id:"run-in-postman",children:"Run in Postman"}),(0,t.jsx)(n.p,{children:"Click the following button to fork the collection and run requests directly on your local network."}),(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://god.gw.postman.com/run-collection/11610746-f334929f-c8c3-43ed-bb73-69a6f0d728d8?action=collection%2Ffork&collection-url=entityId%3D11610746-f334929f-c8c3-43ed-bb73-69a6f0d728d8%26entityType%3Dcollection%26workspaceId%3Dc4b60b6f-9f15-42d0-8327-7ebabca6f0fd#?env%5BBesu%20node%20on%20local%20host%5D=W3sia2V5IjoicnBjLWh0dHAtaG9zdCIsInZhbHVlIjoibG9jYWxob3N0IiwiZW5hYmxlZCI6ZmFsc2V9LHsia2V5IjoicnBjLWh0dHAtcG9ydCIsInZhbHVlIjoiODU0NSIsImVuYWJsZWQiOmZhbHNlfV0=",children:(0,t.jsx)(n.img,{src:"https://run.pstmn.io/button.svg",alt:"Run in Postman"})}),"."]}),(0,t.jsx)(n.h4,{id:"download-collection",children:"Download collection"}),(0,t.jsxs)(n.p,{children:["Alternatively you can ",(0,t.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:s(34705).A+"",children:"download the JSON collection file"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},69261:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>i,default:()=>b,frontMatter:()=>o,metadata:()=>d,toc:()=>u});var t=s(74848),r=s(28453),a=s(14311),l=s(11470),c=s(19365);const o={title:"Use JSON-RPC over HTTP, WS, and IPC",sidebar_position:1,description:"How to access the Besu API using JSON-RPC",tags:["public networks","private networks"]},i="Use JSON-RPC over HTTP, WebSocket, and IPC",d={id:"public-networks/how-to/use-besu-api/json-rpc",title:"Use JSON-RPC over HTTP, WS, and IPC",description:"How to access the Besu API using JSON-RPC",source:"@site/docs/public-networks/how-to/use-besu-api/json-rpc.md",sourceDirName:"public-networks/how-to/use-besu-api",slug:"/public-networks/how-to/use-besu-api/json-rpc",permalink:"/public-networks/how-to/use-besu-api/json-rpc",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/use-besu-api/json-rpc.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Use JSON-RPC over HTTP, WS, and IPC",sidebar_position:1,description:"How to access the Besu API using JSON-RPC",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Access the Besu API",permalink:"/public-networks/how-to/use-besu-api/"},next:{title:"Use RPC Pub/Sub over WS",permalink:"/public-networks/how-to/use-besu-api/rpc-pubsub"}},h={},u=[...a.toc,{value:"Geth console",id:"geth-console",level:2},{value:"JSON-RPC authentication",id:"json-rpc-authentication",level:2},{value:"HTTP and WebSocket requests",id:"http-and-websocket-requests",level:2},{value:"HTTP",id:"http",level:3},{value:"WebSocket",id:"websocket",level:3},{value:"Readiness and liveness endpoints",id:"readiness-and-liveness-endpoints",level:2},{value:"Readiness",id:"readiness",level:3},{value:"Liveness",id:"liveness",level:3},{value:"API methods enabled by default",id:"api-methods-enabled-by-default",level:2},{value:"Block parameter",id:"block-parameter",level:2}];function p(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"use-json-rpc-over-http-websocket-and-ipc",children:"Use JSON-RPC over HTTP, WebSocket, and IPC"})}),"\n",(0,t.jsx)(n.p,{children:"JSON-RPC APIs allow you to interact with your node. JSON-RPC endpoints are not enabled by default."}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsx)(n.p,{children:"You should secure access to your node's JSON-RPC endpoints. Users with access to your node via JSON-RPC can make calls directly to your node, causing your node to consume resources."})}),"\n",(0,t.jsxs)(n.p,{children:["To enable JSON-RPC over HTTP or WebSocket, use the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,t.jsx)(n.code,{children:"--rpc-http-enabled"})})," and ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-enabled",children:(0,t.jsx)(n.code,{children:"--rpc-ws-enabled"})})," options."]}),"\n",(0,t.jsxs)(n.p,{children:["To enable JSON-RPC over an ",(0,t.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/#socket-path",children:"IPC socket"}),", use the ",(0,t.jsx)(n.code,{children:"--Xrpc-ipc-enabled"})," option."]}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"--Xrpc-ipc-enabled"})," is an early access option."]})}),"\n",(0,t.jsx)(a.default,{}),"\n",(0,t.jsx)(n.h2,{id:"geth-console",children:"Geth console"}),"\n",(0,t.jsx)(n.p,{children:"The geth console is a REPL (Read, Evaluate, & Print Loop) JavaScript console. Use JSON-RPC APIs supported by geth and Besu directly in the console."}),"\n",(0,t.jsx)(n.p,{children:"To use the geth console with Besu:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Start Besu with the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,t.jsx)(n.code,{children:"--rpc-http-enabled"})})," or ",(0,t.jsx)(n.code,{children:"--Xrpc-ipc-enabled"})," option."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Specify which APIs to enable using the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,t.jsx)(n.code,{children:"--rpc-http-api"})})," or ",(0,t.jsx)(n.code,{children:"--Xrpc-ipc-api"})," option."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Start the geth console specifying the JSON-RPC endpoint:"}),"\n",(0,t.jsxs)(l.A,{children:[(0,t.jsx)(c.A,{value:"HTTP endpoint",label:"HTTP endpoint",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"geth attach http://localhost:8545\n"})})}),(0,t.jsx)(c.A,{value:"IPC endpoint",label:"IPC endpoint",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"geth attach /path/to/besu.ipc\n"})})})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Use the geth console to call ",(0,t.jsx)(n.a,{href:"/public-networks/reference/api/",children:"JSON-RPC API methods"})," that geth and Besu share."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"eth.syncing\n"})}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"json-rpc-authentication",children:"JSON-RPC authentication"}),"\n",(0,t.jsxs)(n.p,{children:["Besu disables ",(0,t.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"Authentication"})," by default."]}),"\n",(0,t.jsx)(n.h2,{id:"http-and-websocket-requests",children:"HTTP and WebSocket requests"}),"\n",(0,t.jsx)(n.h3,{id:"http",children:"HTTP"}),"\n",(0,t.jsxs)(n.p,{children:["To make RPC requests over HTTP, you can use ",(0,t.jsx)(n.a,{href:"https://curl.haxx.se/download.html",children:(0,t.jsx)(n.code,{children:"curl"})}),"."]}),"\n",(0,t.jsxs)(l.A,{children:[(0,t.jsx)(c.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","id":,"method":"","params":[]}\' \n'})})}),(0,t.jsx)(c.A,{value:"curl HTTP request",label:"curl HTTP request",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","id":"1","method":"eth_blockNumber","params":[]}\' http://127.0.0.1:8555\n'})})}),(0,t.jsx)(c.A,{value:"JSON result",label:"JSON result",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": "1",\n "result": "0x60e"\n}\n'})})})]}),"\n",(0,t.jsxs)(n.p,{children:["You can use ",(0,t.jsx)(n.code,{children:"curl"})," to make multiple RPC requests (batch requests) over HTTP at the same time. Send the requests as an array, and receive an array of responses. The default number of allowed requests in a RPC batch request is ",(0,t.jsx)(n.code,{children:"1024"}),". Use the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-max-batch-size",children:(0,t.jsx)(n.code,{children:"--rpc-http-max-batch-size"})})," command line option to update the default value."]}),"\n",(0,t.jsxs)(l.A,{children:[(0,t.jsx)(c.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'[{"jsonrpc":"2.0","id":"1","method":"eth_blockNumber","params":[]}, {"jsonrpc":"2.0","id":"2","method":"admin_peers","params":[]}]\' http://127.0.0.1:8555\n'})})}),(0,t.jsx)(c.A,{value:"JSON result",label:"JSON result",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'[\n {\n "jsonrpc": "2.0",\n "id": "1",\n "result": "0x60e"\n },\n {\n "jsonrpc": "2.0",\n "id": "2",\n "result": []\n }\n]\n'})})})]}),"\n",(0,t.jsx)(n.h3,{id:"websocket",children:"WebSocket"}),"\n",(0,t.jsxs)(n.p,{children:["To make RPC requests over WebSocket, you can use ",(0,t.jsx)(n.a,{href:"https://github.com/websockets/wscat",children:(0,t.jsx)(n.code,{children:"wscat"})}),", a Node.js based command-line tool."]}),"\n",(0,t.jsxs)(n.p,{children:["First connect to the WebSocket server using ",(0,t.jsx)(n.code,{children:"wscat"})," (you only need to connect once per session):"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"wscat -c ws://\n"})}),"\n",(0,t.jsx)(n.p,{children:"After you establish a connection, the terminal displays a '>' prompt. Send individual requests as a JSON data package at each prompt."}),"\n",(0,t.jsxs)(l.A,{children:[(0,t.jsx)(c.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","id":,"method":"","params":[]}\n'})})}),(0,t.jsx)(c.A,{value:"wscat WS request",label:"wscat WS request",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'{"jsonrpc":"2.0","id":"1","method":"eth_blockNumber","params":[]}\n'})})}),(0,t.jsx)(c.A,{value:"JSON result",label:"JSON result",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": "1",\n "result": "0x23"\n}\n'})})})]}),"\n",(0,t.jsxs)(n.p,{children:["You can use ",(0,t.jsx)(n.code,{children:"wscat"})," to make multiple RPC requests over WebSocket at the same time. Send the requests as an array, and receive an array of responses."]}),"\n",(0,t.jsxs)(l.A,{children:[(0,t.jsx)(c.A,{value:"wscat WS request",label:"wscat WS request",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:'[{"jsonrpc":"2.0","id":"1","method":"eth_blockNumber","params":[]}, {"jsonrpc":"2.0","id":"2","method":"admin_peers","params":[]}]\n'})})}),(0,t.jsx)(c.A,{value:"JSON result",label:"JSON result",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'[\n {\n "jsonrpc": "2.0",\n "id": "1",\n "result": "0x23"\n },\n {\n "jsonrpc": "2.0",\n "id": "2",\n "result": []\n }\n]\n'})})})]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"wscat"})," does not support headers. ",(0,t.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"Authentication"})," requires you to pass an authentication token in the request header. To use authentication with WebSocket, you need an app that supports headers."]})}),"\n",(0,t.jsx)(n.h2,{id:"readiness-and-liveness-endpoints",children:"Readiness and liveness endpoints"}),"\n",(0,t.jsxs)(n.p,{children:["Besu provides readiness and liveness endpoints to confirm the Besu node status. Both return a ",(0,t.jsx)(n.code,{children:"200 OK"})," status when ready or live and a ",(0,t.jsx)(n.code,{children:"503 Service Unavailable"})," status if not ready or live."]}),"\n",(0,t.jsx)(n.h3,{id:"readiness",children:"Readiness"}),"\n",(0,t.jsxs)(n.p,{children:["By default, the readiness check requires a connected peer and the node to be within two blocks of the best known block. If you have ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-enabled",children:"disabled P2P communication"}),", you do not need peers. A live node with P2P disabled is always ready."]}),"\n",(0,t.jsxs)(n.p,{children:["Use the query parameters ",(0,t.jsx)(n.code,{children:"minPeers"})," and ",(0,t.jsx)(n.code,{children:"maxBlocksBehind"})," to adjust the number of peers required and the number of blocks tolerance."]}),"\n",(0,t.jsxs)(l.A,{children:[(0,t.jsx)(c.A,{value:"Readiness endpoint",label:"Readiness endpoint",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"http:///readiness\n"})})}),(0,t.jsx)(c.A,{value:"curl request example",label:"curl request example",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -v 'http://localhost:8545/readiness'\n"})})}),(0,t.jsx)(c.A,{value:"Query parameters example",label:"Query parameters example",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -v 'http://localhost:8545/readiness?minPeers=0&maxBlocksBehind=10'\n"})})})]}),"\n",(0,t.jsx)(n.h3,{id:"liveness",children:"Liveness"}),"\n",(0,t.jsxs)(n.p,{children:["The liveness check requires the JSON-RPC server to be up. You can use the endpoint to verify that the node can respond to RPC calls. The status in the response will always be ",(0,t.jsx)(n.code,{children:"UP"}),"."]}),"\n",(0,t.jsxs)(l.A,{children:[(0,t.jsx)(c.A,{value:"Liveness endpoint",label:"Liveness endpoint",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"http:///liveness\n"})})}),(0,t.jsx)(c.A,{value:"curl request example",label:"curl request example",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -v 'http://localhost:8545/liveness'\n"})})})]}),"\n",(0,t.jsx)(n.h2,{id:"api-methods-enabled-by-default",children:"API methods enabled by default"}),"\n",(0,t.jsxs)(n.p,{children:["Besu enables the ",(0,t.jsx)(n.code,{children:"ETH"}),", ",(0,t.jsx)(n.code,{children:"NET"}),", and ",(0,t.jsx)(n.code,{children:"WEB3"})," API methods by default."]}),"\n",(0,t.jsxs)(n.p,{children:["To enable the ",(0,t.jsx)(n.code,{children:"ADMIN"}),", ",(0,t.jsx)(n.code,{children:"CLIQUE"}),", ",(0,t.jsx)(n.code,{children:"DEBUG"}),", ",(0,t.jsx)(n.code,{children:"EEA"}),", ",(0,t.jsx)(n.code,{children:"IBFT"}),", ",(0,t.jsx)(n.code,{children:"MINER"}),", ",(0,t.jsx)(n.code,{children:"PERM"}),", ",(0,t.jsx)(n.code,{children:"PLUGINS"}),", ",(0,t.jsx)(n.code,{children:"PRIV"}),", ",(0,t.jsx)(n.code,{children:"TRACE"}),", and ",(0,t.jsx)(n.code,{children:"TXPOOL"})," API methods, use the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,t.jsx)(n.code,{children:"--rpc-http-api"})}),", ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,t.jsx)(n.code,{children:"--rpc-ws-api"})}),", or ",(0,t.jsx)(n.code,{children:"--Xrpc-ipc-api"})," options."]}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"--Xrpc-ipc-api"})," is an early access option."]})}),"\n",(0,t.jsx)(n.h2,{id:"block-parameter",children:"Block parameter"}),"\n",(0,t.jsxs)(n.p,{children:["When you make requests that might have different results depending on the block accessed, the block\nparameter specifies the block.\nMethods such as ",(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gettransactionbyblocknumberandindex",children:(0,t.jsx)(n.code,{children:"eth_getTransactionByBlockNumberAndIndex"})}),"\nhave a block parameter."]}),"\n",(0,t.jsx)(n.p,{children:"The block parameter can have one of the following values:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"blockNumber"})," : ",(0,t.jsx)(n.em,{children:"quantity"})," - The block number, specified in hexadecimal or decimal.\n",(0,t.jsx)(n.code,{children:"0"})," represents the genesis block."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"blockHash"})," : ",(0,t.jsx)(n.em,{children:"string"})," or ",(0,t.jsx)(n.em,{children:"object"})," - 32-byte block hash or JSON object specifying the block hash.\nIf using a JSON object, you can specify ",(0,t.jsx)(n.code,{children:"requireCanonical"})," to indicate whether the block must be a\ncanonical block.\nSee ",(0,t.jsx)(n.a,{href:"https://github.com/hyperledger/besu/blob/a2dedb0b2c7980cdc35db8eb4c094f2eb0dc7deb/ethereum/api/src/test/resources/org/hyperledger/besu/ethereum/api/jsonrpc/eth/eth_getBalance_blockHashObjectCanonical.json",children:"this example"}),"."]}),"\n",(0,t.jsxs)(n.admonition,{type:"note",children:[(0,t.jsxs)(n.p,{children:["Only the following methods support the ",(0,t.jsx)(n.code,{children:"blockHash"})," parameter:"]}),(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#eth_call",children:(0,t.jsx)(n.code,{children:"eth_call"})})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getbalance",children:(0,t.jsx)(n.code,{children:"eth_getBalance"})})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getcode",children:(0,t.jsx)(n.code,{children:"eth_getCode"})})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getproof",children:(0,t.jsx)(n.code,{children:"eth_getProof"})})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#eth_getstorageat",children:(0,t.jsx)(n.code,{children:"eth_getStorageAt"})})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gettransactioncount",children:(0,t.jsx)(n.code,{children:"eth_getTransactionCount"})})}),"\n"]})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"earliest"})," : ",(0,t.jsx)(n.em,{children:"tag"})," - The earliest (genesis) block."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"latest"})," : ",(0,t.jsx)(n.em,{children:"tag"})," - The last block mined."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"pending"})," : ",(0,t.jsx)(n.em,{children:"tag"})," - When used with ",(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gettransactioncount",children:(0,t.jsx)(n.code,{children:"eth_getTransactionCount"})}),",\nrefers to the last block mined plus pending transactions.\nWhen used with ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#qbft_getvalidatorsbyblocknumber",children:(0,t.jsx)(n.code,{children:"qbft_getValidatorsByBlockNumber"})}),",\nreturns a list of validators that will be used to produce the next block."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"finalized"})," : ",(0,t.jsx)(n.em,{children:"tag"})," - The most recent crypto-economically secure block.\nIt cannot be reorganized outside manual intervention driven by community coordination."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"safe"})," : ",(0,t.jsx)(n.em,{children:"tag"})," - The most recent block that is safe from reorganization under honest majority and\ncertain synchronicity assumptions."]}),"\n"]}),"\n"]})]})}function b(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},19365:(e,n,s)=>{s.d(n,{A:()=>l});s(96540);var t=s(18215);const r={tabItem:"tabItem_Ymn6"};var a=s(74848);function l(e){let{children:n,hidden:s,className:l}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,t.A)(r.tabItem,l),hidden:s,children:n})}},11470:(e,n,s)=>{s.d(n,{A:()=>w});var t=s(96540),r=s(18215),a=s(23104),l=s(56347),c=s(205),o=s(57485),i=s(31682),d=s(70679);function h(e){return t.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,t.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function u(e){const{values:n,children:s}=e;return(0,t.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:s,attributes:t,default:r}}=e;return{value:n,label:s,attributes:t,default:r}}))}(s);return function(e){const n=(0,i.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,s])}function p(e){let{value:n,tabValues:s}=e;return s.some((e=>e.value===n))}function b(e){let{queryString:n=!1,groupId:s}=e;const r=(0,l.W6)(),a=function(e){let{queryString:n=!1,groupId:s}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return s??null}({queryString:n,groupId:s});return[(0,o.aZ)(a),(0,t.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(r.location.search);n.set(a,e),r.replace({...r.location,search:n.toString()})}),[a,r])]}function j(e){const{defaultValue:n,queryString:s=!1,groupId:r}=e,a=u(e),[l,o]=(0,t.useState)((()=>function(e){let{defaultValue:n,tabValues:s}=e;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:s}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${s.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const t=s.find((e=>e.default))??s[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:n,tabValues:a}))),[i,h]=b({queryString:s,groupId:r}),[j,x]=function(e){let{groupId:n}=e;const s=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,a]=(0,d.Dv)(s);return[r,(0,t.useCallback)((e=>{s&&a.set(e)}),[s,a])]}({groupId:r}),m=(()=>{const e=i??j;return p({value:e,tabValues:a})?e:null})();(0,c.A)((()=>{m&&o(m)}),[m]);return{selectedValue:l,selectValue:(0,t.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);o(e),h(e),x(e)}),[h,x,a]),tabValues:a}}var x=s(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=s(74848);function g(e){let{className:n,block:s,selectedValue:t,selectValue:l,tabValues:c}=e;const o=[],{blockElementScrollPositionUntilNextRender:i}=(0,a.a_)(),d=e=>{const n=e.currentTarget,s=o.indexOf(n),r=c[s].value;r!==t&&(i(n),l(r))},h=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const s=o.indexOf(e.currentTarget)+1;n=o[s]??o[0];break}case"ArrowLeft":{const s=o.indexOf(e.currentTarget)-1;n=o[s]??o[o.length-1];break}}n?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":s},n),children:c.map((e=>{let{value:n,label:s,attributes:a}=e;return(0,f.jsx)("li",{role:"tab",tabIndex:t===n?0:-1,"aria-selected":t===n,ref:e=>o.push(e),onKeyDown:h,onClick:d,...a,className:(0,r.A)("tabs__item",m.tabItem,a?.className,{"tabs__item--active":t===n}),children:s??n},n)}))})}function v(e){let{lazy:n,children:s,selectedValue:a}=e;const l=(Array.isArray(s)?s:[s]).filter(Boolean);if(n){const e=l.find((e=>e.props.value===a));return e?(0,t.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:l.map(((e,n)=>(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function k(e){const n=j(e);return(0,f.jsxs)("div",{className:(0,r.A)("tabs-container",m.tabList),children:[(0,f.jsx)(g,{...n,...e}),(0,f.jsx)(v,{...n,...e})]})}function w(e){const n=(0,x.A)();return(0,f.jsx)(k,{...e,children:h(e.children)},String(n))}},34705:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/files/postman_collection-53d58dda1f254764c957a43f3344607d.json"},28453:(e,n,s)=>{s.d(n,{R:()=>l,x:()=>c});var t=s(96540);const r={},a=t.createContext(r);function l(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:l(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8b8c93ab.4cf23d97.js b/assets/js/8b8c93ab.4cf23d97.js new file mode 100644 index 00000000000..e7d1e70abdb --- /dev/null +++ b/assets/js/8b8c93ab.4cf23d97.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2735],{25119:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>o,default:()=>d,frontMatter:()=>s,metadata:()=>c,toc:()=>l});var i=n(74848),r=n(28453);const s={title:"Alternative elliptic curves",description:"Using alternative elliptic curves in Besu",sidebar_position:8,tags:["private networks"]},o="Configure alternative elliptic curves",c={id:"private-networks/how-to/configure/curves",title:"Alternative elliptic curves",description:"Using alternative elliptic curves in Besu",source:"@site/docs/private-networks/how-to/configure/curves.md",sourceDirName:"private-networks/how-to/configure",slug:"/private-networks/how-to/configure/curves",permalink:"/private-networks/how-to/configure/curves",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/configure/curves.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:8,frontMatter:{title:"Alternative elliptic curves",description:"Using alternative elliptic curves in Besu",sidebar_position:8,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Client and server TLS",permalink:"/private-networks/how-to/configure/tls/client-and-server"},next:{title:"Create and send transactions",permalink:"/private-networks/how-to/send-transactions/"}},a={},l=[];function u(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",header:"header",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"configure-alternative-elliptic-curves",children:"Configure alternative elliptic curves"})}),"\n",(0,i.jsx)(t.admonition,{type:"caution",children:(0,i.jsx)(t.p,{children:"Configuring alternative elliptic curves is an early access feature."})}),"\n",(0,i.jsxs)(t.p,{children:["By default, Besu uses the Ethereum standard ",(0,i.jsx)(t.code,{children:"secp256k1"})," elliptic curve (EC). However, when running nodes in a private network, it is possible to configure an alternative elliptic curve."]}),"\n",(0,i.jsxs)(t.p,{children:["The configuration for what elliptic curve Besu will use is done in the network configuration section of genesis file, using the ",(0,i.jsx)(t.a,{href:"/public-networks/reference/genesis-items#Configuration_Items",children:(0,i.jsx)(t.code,{children:"ecCurve"})})," key:"]}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-bash",children:'{\n "genesis": {\n "config": {\n "ecCurve": "secp256k1",\n [...]\n },\n [...]\n}\n'})}),"\n",(0,i.jsx)(t.admonition,{title:"Important",type:"danger",children:(0,i.jsxs)(t.p,{children:["All nodes in the network ",(0,i.jsx)(t.strong,{children:"MUST"})," use the same elliptic curve. Nodes with different EC configuration from the network won't be able to send messages to other nodes or verify transactions and blocks."]})}),"\n",(0,i.jsx)(t.p,{children:"Besu supports the following elliptic curves:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"secp256k1"})," (Ethereum default)"]}),"\n",(0,i.jsx)(t.li,{children:(0,i.jsx)(t.code,{children:"secp256r1"})}),"\n"]})]})}function d(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>c});var i=n(96540);const r={},s=i.createContext(r);function o(e){const t=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8c0ee333.baf93dfc.js b/assets/js/8c0ee333.baf93dfc.js new file mode 100644 index 00000000000..9e132be102f --- /dev/null +++ b/assets/js/8c0ee333.baf93dfc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[379],{45462:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>r,contentTitle:()=>l,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var s=a(74848),t=a(28453);const i={sidebar_position:1,description:"Install or update Java for use with Besu",tags:["public networks","private networks"]},l="Install and update Java",o={id:"public-networks/how-to/configure-java/install-update-java",title:"Install and update Java",description:"Install or update Java for use with Besu",source:"@site/docs/public-networks/how-to/configure-java/install-update-java.md",sourceDirName:"public-networks/how-to/configure-java",slug:"/public-networks/how-to/configure-java/install-update-java",permalink:"/public-networks/how-to/configure-java/install-update-java",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/configure-java/install-update-java.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{sidebar_position:1,description:"Install or update Java for use with Besu",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Sample load balancer configurations",permalink:"/public-networks/how-to/configure-ha/sample-configuration"},next:{title:"Pass JVM options",permalink:"/public-networks/how-to/configure-java/pass-jvm-options"}},r={},d=[{value:"Install Java",id:"install-java",level:2},{value:"Install Java on Ubuntu",id:"install-java-on-ubuntu",level:3},{value:"Install Java on MacOS",id:"install-java-on-macos",level:3},{value:"Update Java",id:"update-java",level:2},{value:"Update Java on Ubuntu",id:"update-java-on-ubuntu",level:3},{value:"Update Java on MacOS",id:"update-java-on-macos",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"install-and-update-java",children:"Install and update Java"})}),"\n",(0,s.jsxs)(n.p,{children:["There are many flavors of Java and the Java Virtual Machine (JVM) that work with Besu.\nThey might impact performance, start time, and more.\nConsider the options carefully when installing Java on your host machine.\nCurrently, ",(0,s.jsx)(n.a,{href:"/public-networks/get-started/system-requirements#java-distribution-and-installation",children:"we recommend Java 21"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"install-java",children:"Install Java"}),"\n",(0,s.jsx)(n.p,{children:"Download the version of Java you would like to install.\nIf you are running Besu outside a virtual environment, like Docker, you must have Java installed on\nthe host machine."}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["Download ",(0,s.jsx)(n.a,{href:"https://jdk.java.net/21/",children:"OpenJDK 21"}),"."]})}),"\n",(0,s.jsx)(n.p,{children:"You can find platform-specific installation instructions with the download.\nThe following installation examples use OpenJDK."}),"\n",(0,s.jsx)(n.h3,{id:"install-java-on-ubuntu",children:"Install Java on Ubuntu"}),"\n",(0,s.jsxs)(n.p,{children:["You can install OpenJDK on Ubuntu using the ",(0,s.jsx)(n.code,{children:"apt-get"})," command."]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Ensure ",(0,s.jsx)(n.code,{children:"apt"})," libraries are installed and up-to-date:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo apt update && sudo apt upgrade -y\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Confirm whether Java is already installed:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"java -version\n"})}),"\n",(0,s.jsxs)(n.p,{children:["If a version is returned, and you would like to update, see how to ",(0,s.jsx)(n.a,{href:"#update-java-on-ubuntu",children:"update Java on Ubuntu"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["If no version is returned, use ",(0,s.jsx)(n.code,{children:"apt"})," to install the preferred version."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo apt-get install openjdk-21-jdk\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Confirm the installation:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"java -version\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["You might need to update your environment to make Java visible to Besu.\nEdit the ",(0,s.jsx)(n.code,{children:".bashrc"})," file in your home directory (or create it if needed) and add the following\nlines to the end of the file:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",metastring:'title=".bashrc"',children:"export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java))))\nexport PATH=$PATH:$JAVA_HOME/bin\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Save your changes and source the file:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"source ~/.bashrc \n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Verify that you updated your environment:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"echo $JAVA_HOME\necho $PATH\n"})}),"\n",(0,s.jsx)(n.p,{children:"You should see the JDK versions output."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"install-java-on-macos",children:"Install Java on MacOS"}),"\n",(0,s.jsx)(n.p,{children:"You can install OpenJDK on MacOS using Homebrew."}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["With ",(0,s.jsx)(n.code,{children:"brew"})," installed, run:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"brew install openjdk@21\n"})}),"\n",(0,s.jsx)(n.p,{children:"You can target another version if you prefer."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Confirm the installation:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"java -version\n"})}),"\n",(0,s.jsx)(n.p,{children:"The OpenJDK version you install should display."}),"\n",(0,s.jsxs)(n.p,{children:["If this command returns ",(0,s.jsx)(n.code,{children:"command not found: java"}),", check your terminal logs.\nBrew might prompt you to create a symlink or update your path variables within the logs in the\nterminal output.\nIf so, run the prompts provided."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"update-java",children:"Update Java"}),"\n",(0,s.jsx)(n.h3,{id:"update-java-on-ubuntu",children:"Update Java on Ubuntu"}),"\n",(0,s.jsxs)(n.p,{children:["To update Java on Ubuntu, uninstall the current versions and follow the instructions to\n",(0,s.jsx)(n.a,{href:"#install-java-on-ubuntu",children:"install Java on Ubuntu"})," with your target version."]}),"\n",(0,s.jsx)(n.p,{children:"If you started with this guide, you can uninstall Java using the following command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo apt-get purge openjdk-\\*\n"})}),"\n",(0,s.jsx)(n.h3,{id:"update-java-on-macos",children:"Update Java on MacOS"}),"\n",(0,s.jsx)(n.p,{children:"You can update Java on MacOS using Homebrew."}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"List your Homebrew packages:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"brew ls\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"To update the JDK version (for example, from 17 to 21), uninstall the old version and reinstall\nthe target version:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"brew uninstall openjdk@17\nbrew install openjdk@21\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["If you installed a version of Java not using Homebrew, it is located at\n",(0,s.jsx)(n.code,{children:"/Library/Java/JavaVirtualMachines"})," and can be safely deleted from that directory."]})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To update point versions of Java, run the ",(0,s.jsx)(n.code,{children:"upgrade"})," command:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"brew upgrade openjdk\n"})}),"\n"]}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,n,a)=>{a.d(n,{R:()=>l,x:()=>o});var s=a(96540);const t={},i=s.createContext(t);function l(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8d677f34.bfeae8dd.js b/assets/js/8d677f34.bfeae8dd.js new file mode 100644 index 00000000000..18b79ba23a5 --- /dev/null +++ b/assets/js/8d677f34.bfeae8dd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2056],{70316:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>l,default:()=>u,frontMatter:()=>a,metadata:()=>d,toc:()=>h});var r=n(74848),s=n(28453),i=n(11470),o=n(19365);const a={title:"Create a Clique network",sidebar_position:4,description:"Create a private network using the Clique consensus protocol.",tags:["private networks"]},l="Create a private network using Clique",d={id:"private-networks/tutorials/clique",title:"Create a Clique network",description:"Create a private network using the Clique consensus protocol.",source:"@site/docs/private-networks/tutorials/clique.md",sourceDirName:"private-networks/tutorials",slug:"/private-networks/tutorials/clique",permalink:"/private-networks/tutorials/clique",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/clique.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Create a Clique network",sidebar_position:4,description:"Create a private network using the Clique consensus protocol.",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Add and removing IBFT 2.0 validators",permalink:"/private-networks/tutorials/ibft/validators"},next:{title:"Create an Ethash network",permalink:"/private-networks/tutorials/ethash"}},c={},h=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Steps",id:"steps",level:2},{value:"1. Create directories",id:"1-create-directories",level:3},{value:"2. Get the address for Node-1",id:"2-get-the-address-for-node-1",level:3},{value:"3. Create the genesis file",id:"3-create-the-genesis-file",level:3},{value:"4. Start the first node as the bootnode",id:"4-start-the-first-node-as-the-bootnode",level:3},{value:"5. Start Node-2",id:"5-start-node-2",level:3},{value:"6. Start Node-3",id:"6-start-node-3",level:3},{value:"7. Confirm the private network is working",id:"7-confirm-the-private-network-is-working",level:3},{value:"Next steps",id:"next-steps",level:2},{value:"Stop the nodes",id:"stop-the-nodes",level:2}];function p(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"create-a-private-network-using-clique",children:"Create a private network using Clique"})}),"\n",(0,r.jsxs)(t.p,{children:["A private network provides a configurable network for testing. This private network uses the ",(0,r.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/clique",children:"Clique (proof of authority) consensus protocol"}),"."]}),"\n",(0,r.jsx)(t.admonition,{type:"danger",children:(0,r.jsx)(t.p,{children:"The steps in this tutorial create an isolated, but not protected or secure, Ethereum private network. We recommend running the private network behind a properly configured firewall."})}),"\n",(0,r.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"/private-networks/get-started/install/binary-distribution",children:"Besu"})}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://curl.haxx.se/download.html",children:"Curl (or similar webservice client)"}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"steps",children:"Steps"}),"\n",(0,r.jsx)(t.p,{children:"Listed on the right-hand side of the page are the steps to create a private network using Clique."}),"\n",(0,r.jsx)(t.h3,{id:"1-create-directories",children:"1. Create directories"}),"\n",(0,r.jsxs)(t.p,{children:["Each node requires a data directory for the blockchain data. When the node starts, Besu saves the ",(0,r.jsx)(t.a,{href:"/public-networks/concepts/node-keys",children:"node key"})," in this directory."]}),"\n",(0,r.jsx)(t.p,{children:"Create directories for your private network, each of the three nodes, and a data directory for each node:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"Clique-Network/\n\u251c\u2500\u2500 Node-1\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u251c\u2500\u2500 Node-2\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2514\u2500\u2500 Node-3\n \u251c\u2500\u2500 data\n"})}),"\n",(0,r.jsx)(t.h3,{id:"2-get-the-address-for-node-1",children:"2. Get the address for Node-1"}),"\n",(0,r.jsx)(t.p,{children:"In Clique networks, you must include the address of at least one initial signer in the genesis file. For this Clique network, we'll use Node-1 as the initial signer. This requires obtaining the address for Node-1."}),"\n",(0,r.jsxs)(t.p,{children:["To get the address for Node-1, in the ",(0,r.jsx)(t.code,{children:"Node-1"})," directory, use the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/subcommands#export-address",children:(0,r.jsx)(t.code,{children:"public-key export-address"})})," subcommand to write the node address to the specified file (",(0,r.jsx)(t.code,{children:"node1Address"})," in this example)."]}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"besu --data-path=data public-key export-address --to=data/node1Address\n"})})}),(0,r.jsx)(o.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"besu --data-path=data public-key export-address --to=data\\node1Address\n"})})})]}),"\n",(0,r.jsx)(t.h3,{id:"3-create-the-genesis-file",children:"3. Create the genesis file"}),"\n",(0,r.jsxs)(t.p,{children:["The genesis file defines the genesis block of the blockchain (that is, the start of the blockchain). The ",(0,r.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/clique#genesis-file",children:"Clique genesis file"})," includes the address of Node-1 as the initial signer in the ",(0,r.jsx)(t.code,{children:"extraData"})," field."]}),"\n",(0,r.jsx)(t.p,{children:"All nodes in a network must use the same genesis file."}),"\n",(0,r.jsxs)(t.p,{children:["Copy the following genesis definition to a file called ",(0,r.jsx)(t.code,{children:"cliqueGenesis.json"})," and save it in the ",(0,r.jsx)(t.code,{children:"Clique-Network"})," directory:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "config": {\n "chainId": 1337,\n "berlinBlock": 0,\n "clique": {\n "blockperiodseconds": 15,\n "epochlength": 30000\n }\n },\n "coinbase": "0x0000000000000000000000000000000000000000",\n "difficulty": "0x1",\n\n "extraData": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "gasLimit": "0xa00000",\n "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "nonce": "0x0",\n "timestamp": "0x5c51a607",\n "alloc": {\n "fe3b557e8fb62b89f4916b721be55ceb828dbd73": {\n "privateKey": "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63",\n "comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",\n "balance": "0xad78ebc5ac6200000"\n },\n "627306090abaB3A6e1400e9345bC60c78a8BEf57": {\n "privateKey": "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3",\n "comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",\n "balance": "90000000000000000000000"\n },\n "f17f52151EbEF6C7334FAD080c5704D77216b732": {\n "privateKey": "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f",\n "comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",\n "balance": "90000000000000000000000"\n }\n }\n}\n'})}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsxs)(t.p,{children:["We recommend specifying the latest ",(0,r.jsx)(t.a,{href:"/public-networks/reference/genesis-items#milestone-blocks",children:"milestone"})," when creating the genesis file for a private network. This ensures you are using the most up-to-date protocol and have access to the most recent opcodes."]})}),"\n",(0,r.jsxs)(t.p,{children:["In ",(0,r.jsx)(t.code,{children:"extraData"}),", replace ",(0,r.jsx)(t.code,{children:""})," with the ",(0,r.jsx)(t.a,{href:"#2-get-the-address-for-node-1",children:"address for Node-1"}),", excluding the 0x prefix."]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n ...\n"extraData":"0x0000000000000000000000000000000000000000000000000000000000000000b9b81ee349c3807e46bc71aa2632203c5b4620340000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n ...\n}\n'})}),"\n",(0,r.jsx)(t.admonition,{type:"warning",children:(0,r.jsxs)(t.p,{children:["Do not use the accounts in ",(0,r.jsx)(t.code,{children:"alloc"})," in the genesis file on Mainnet or any public network except for testing. The private keys display, which means the accounts are not secure."]})}),"\n",(0,r.jsx)(t.h3,{id:"4-start-the-first-node-as-the-bootnode",children:"4. Start the first node as the bootnode"}),"\n",(0,r.jsx)(t.p,{children:"Start Node-1:"}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../cliqueGenesis.json --network-id 123 --rpc-http-enabled --rpc-http-api=ETH,NET,CLIQUE --host-allowlist="*" --rpc-http-cors-origins="all" --profile=ENTERPRISE\n'})})}),(0,r.jsx)(o.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\cliqueGenesis.json --network-id 123 --rpc-http-enabled --rpc-http-api=ETH,NET,CLIQUE --host-allowlist="*" --rpc-http-cors-origins="all" --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(t.p,{children:"The command line enables:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["The JSON-RPC API using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,r.jsx)(t.code,{children:"--rpc-http-enabled"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["The ETH, NET, and CLIQUE APIs using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,r.jsx)(t.code,{children:"--rpc-http-api"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["All-host access to the HTTP JSON-RPC API using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#host-allowlist",children:(0,r.jsx)(t.code,{children:"--host-allowlist"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["All-domain access to the node through the HTTP JSON-RPC API using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-cors-origins",children:(0,r.jsx)(t.code,{children:"--rpc-http-cors-origins"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["The ",(0,r.jsx)(t.a,{href:"/public-networks/how-to/configure-besu/profile#enterpriseprivate-profile",children:"enterprise/private profile"}),"\nusing the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#profile",children:(0,r.jsx)(t.code,{children:"--profile"})})," option."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["When the node starts, the ",(0,r.jsx)(t.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," displays. Copy the enode URL to specify Node-1 as the bootnode in the following steps."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Node 1 Enode URL",src:n(14739).A+"",width:"988",height:"126"})}),"\n",(0,r.jsx)(t.h3,{id:"5-start-node-2",children:"5. Start Node-2"}),"\n",(0,r.jsxs)(t.p,{children:["Start another terminal, change to the ",(0,r.jsx)(t.code,{children:"Node-2"})," directory and start Node-2 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:"]}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../cliqueGenesis.json --bootnodes= --network-id 123 --p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,CLIQUE --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8546 --profile=ENTERPRISE\n'})})}),(0,r.jsx)(o.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\cliqueGenesis.json --bootnodes= --network-id 123 --p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,CLIQUE --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8546 --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(t.p,{children:"The command line specifies:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["A different port to Node-1 for P2P discovery using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,r.jsx)(t.code,{children:"--p2p-port"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["A different port to Node-1 for HTTP JSON-RPC using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,r.jsx)(t.code,{children:"--rpc-http-port"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["The enode URL of Node-1 using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#bootnodes",children:(0,r.jsx)(t.code,{children:"--bootnodes"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["The data directory for Node-2 using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(t.code,{children:"--data-path"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["Other options as for ",(0,r.jsx)(t.a,{href:"#4-start-the-first-node-as-the-bootnode",children:"Node-1"}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"6-start-node-3",children:"6. Start Node-3"}),"\n",(0,r.jsxs)(t.p,{children:["Start another terminal, change to the ",(0,r.jsx)(t.code,{children:"Node-3"})," directory and start Node-3 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:"]}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../cliqueGenesis.json --bootnodes= --network-id 123 --p2p-port=30305 --rpc-http-enabled --rpc-http-api=ETH,NET,CLIQUE --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8547 --profile=ENTERPRISE\n'})})}),(0,r.jsx)(o.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\cliqueGenesis.json --bootnodes= --network-id 123 --p2p-port=30305 --rpc-http-enabled --rpc-http-api=ETH,NET,CLIQUE --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8547 --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(t.p,{children:"The command line specifies:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["A different port to Node-1 and Node-2 for P2P discovery using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,r.jsx)(t.code,{children:"--p2p-port"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["A different port to Node-1 and Node-2 for HTTP JSON-RPC using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,r.jsx)(t.code,{children:"--rpc-http-port"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["The data directory for Node-3 using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(t.code,{children:"--data-path"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["The bootnode as for ",(0,r.jsx)(t.a,{href:"#5-start-node-2",children:"Node-2"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Other options as for ",(0,r.jsx)(t.a,{href:"#4-start-the-first-node-as-the-bootnode",children:"Node-1"}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"7-confirm-the-private-network-is-working",children:"7. Confirm the private network is working"}),"\n",(0,r.jsxs)(t.p,{children:["Start another terminal, use curl to call the JSON-RPC API ",(0,r.jsx)(t.a,{href:"/public-networks/reference/api/#net_peercount",children:(0,r.jsx)(t.code,{children:"net_peerCount"})})," method and confirm the nodes are functioning as peers:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}\' localhost:8545\n'})}),"\n",(0,r.jsx)(t.p,{children:"The result confirms Node-1 has two peers (Node-2 and Node-3):"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x2"\n}\n'})}),"\n",(0,r.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsx)(t.p,{children:"Look at the logs displayed to confirm Node-1 is producing blocks and Node-2 and Node-3 are importing blocks."}),"\n",(0,r.jsxs)(t.p,{children:["Use the ",(0,r.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/clique#add-and-remove-signers",children:"Clique API to add"})," Node-2 or Node-3 as a signer."]}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsxs)(t.p,{children:["To add Node-2 or Node-3 as a signer you need the ",(0,r.jsx)(t.a,{href:"#2-get-the-address-for-node-1",children:"node address as when specifying Node-1"})," as the initial signer."]})}),"\n",(0,r.jsxs)(t.p,{children:["Import accounts to MetaMask and send transactions, as described in the ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/quickstart#create-a-transaction-using-metamask",children:"Quickstart tutorial"}),"."]}),"\n",(0,r.jsx)(t.admonition,{type:"info",children:(0,r.jsxs)(t.p,{children:["Besu doesn't support ",(0,r.jsx)(t.a,{href:"/public-networks/how-to/send-transactions",children:"private key management"}),"."]})}),"\n",(0,r.jsx)(t.h2,{id:"stop-the-nodes",children:"Stop the nodes"}),"\n",(0,r.jsx)(t.p,{children:"When finished using the private network, stop all nodes using ++ctrl+c++ in each terminal window."}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["To restart the Clique network in the future, start from ",(0,r.jsx)(t.a,{href:"#4-start-the-first-node-as-the-bootnode",children:"4. Start First Node as Bootnode"}),"."]})})]})}function u(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},19365:(e,t,n)=>{n.d(t,{A:()=>o});n(96540);var r=n(18215);const s={tabItem:"tabItem_Ymn6"};var i=n(74848);function o(e){let{children:t,hidden:n,className:o}=e;return(0,i.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,o),hidden:n,children:t})}},11470:(e,t,n)=>{n.d(t,{A:()=>k});var r=n(96540),s=n(18215),i=n(23104),o=n(56347),a=n(205),l=n(57485),d=n(31682),c=n(70679);function h(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??function(e){return h(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:s}}=e;return{value:t,label:n,attributes:r,default:s}}))}(n);return function(e){const t=(0,d.XI)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function u(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const s=(0,o.W6)(),i=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,l.aZ)(i),(0,r.useCallback)((e=>{if(!i)return;const t=new URLSearchParams(s.location.search);t.set(i,e),s.replace({...s.location,search:t.toString()})}),[i,s])]}function x(e){const{defaultValue:t,queryString:n=!1,groupId:s}=e,i=p(e),[o,l]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!u({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:i}))),[d,h]=f({queryString:n,groupId:s}),[x,b]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[s,i]=(0,c.Dv)(n);return[s,(0,r.useCallback)((e=>{n&&i.set(e)}),[n,i])]}({groupId:s}),j=(()=>{const e=d??x;return u({value:e,tabValues:i})?e:null})();(0,a.A)((()=>{j&&l(j)}),[j]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!u({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);l(e),h(e),b(e)}),[h,b,i]),tabValues:i}}var b=n(92303);const j={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=n(74848);function m(e){let{className:t,block:n,selectedValue:r,selectValue:o,tabValues:a}=e;const l=[],{blockElementScrollPositionUntilNextRender:d}=(0,i.a_)(),c=e=>{const t=e.currentTarget,n=l.indexOf(t),s=a[n].value;s!==r&&(d(t),o(s))},h=e=>{let t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const n=l.indexOf(e.currentTarget)+1;t=l[n]??l[0];break}case"ArrowLeft":{const n=l.indexOf(e.currentTarget)-1;t=l[n]??l[l.length-1];break}}t?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":n},t),children:a.map((e=>{let{value:t,label:n,attributes:i}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:r===t?0:-1,"aria-selected":r===t,ref:e=>l.push(e),onKeyDown:h,onClick:c,...i,className:(0,s.A)("tabs__item",j.tabItem,i?.className,{"tabs__item--active":r===t}),children:n??t},t)}))})}function v(e){let{lazy:t,children:n,selectedValue:i}=e;const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=o.find((e=>e.props.value===i));return e?(0,r.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:o.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==i})))})}function w(e){const t=x(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",j.tabList),children:[(0,g.jsx)(m,{...t,...e}),(0,g.jsx)(v,{...t,...e})]})}function k(e){const t=(0,b.A)();return(0,g.jsx)(w,{...e,children:h(e.children)},String(t))}},14739:(e,t,n)=>{n.d(t,{A:()=>r});const r=n.p+"assets/images/EnodeStartup-145939e1c789c28e464db82faa0fb3ca.png"},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>a});var r=n(96540);const s={},i=r.createContext(s);function o(e){const t=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/8ef40281.efd977be.js b/assets/js/8ef40281.efd977be.js new file mode 100644 index 00000000000..f597a63c6b6 --- /dev/null +++ b/assets/js/8ef40281.efd977be.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1703],{70682:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>d,default:()=>u,frontMatter:()=>i,metadata:()=>c,toc:()=>h});var r=n(74848),o=n(28453),s=n(11470),a=n(19365);const i={title:"Create a QBFT network",sidebar_position:2,description:"Create a private network using the QBFT consensus protocol.",tags:["private networks"]},d="Create a private network using QBFT",c={id:"private-networks/tutorials/qbft",title:"Create a QBFT network",description:"Create a private network using the QBFT consensus protocol.",source:"@site/docs/private-networks/tutorials/qbft.md",sourceDirName:"private-networks/tutorials",slug:"/private-networks/tutorials/qbft",permalink:"/private-networks/tutorials/qbft",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/qbft.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Create a QBFT network",sidebar_position:2,description:"Create a private network using the QBFT consensus protocol.",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Quorum Developer Quickstart",permalink:"/private-networks/tutorials/quickstart"},next:{title:"Create a private network using IBFT 2.0",permalink:"/private-networks/tutorials/ibft/"}},l={},h=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Steps",id:"steps",level:2},{value:"1. Create directories",id:"1-create-directories",level:3},{value:"2. Create a configuration file",id:"2-create-a-configuration-file",level:3},{value:"3. Generate node keys and a genesis file",id:"3-generate-node-keys-and-a-genesis-file",level:3},{value:"4. Copy the genesis file to the QBFT-Network directory",id:"4-copy-the-genesis-file-to-the-qbft-network-directory",level:3},{value:"5. Copy the node private keys to the node directories",id:"5-copy-the-node-private-keys-to-the-node-directories",level:3},{value:"6. Start the first node as the bootnode",id:"6-start-the-first-node-as-the-bootnode",level:3},{value:"7. Start Node-2",id:"7-start-node-2",level:3},{value:"8. Start Node-3",id:"8-start-node-3",level:3},{value:"9. Start Node-4",id:"9-start-node-4",level:3},{value:"10. Confirm the private network is working",id:"10-confirm-the-private-network-is-working",level:3},{value:"Next steps",id:"next-steps",level:2},{value:"Stop the nodes",id:"stop-the-nodes",level:2}];function p(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"create-a-private-network-using-qbft",children:"Create a private network using QBFT"})}),"\n",(0,r.jsxs)(t.p,{children:["A private network provides a configurable network for testing. This private network uses the ",(0,r.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/qbft",children:"QBFT (proof of authority) consensus protocol"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["The QBFT network in this tutorial implements the ",(0,r.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/qbft#add-and-remove-validators-using-block-headers",children:"block header validator selection method"})," to manage validators. For a tutorial on how to implement the ",(0,r.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/qbft#add-and-remove-validators-using-a-smart-contract",children:"contract validator selection method"}),", follow the steps in the ",(0,r.jsx)(t.a,{href:"https://github.com/ConsenSys/validator-smart-contracts",children:"example smart contract repository"}),"."]}),"\n",(0,r.jsxs)(t.admonition,{type:"important",children:[(0,r.jsx)(t.p,{children:"The steps in this tutorial create an isolated, but not protected or secure, Ethereum private network. We recommend running the private network behind a properly configured firewall."}),(0,r.jsx)(t.p,{children:"This tutorial configures a private network using QBFT for educational purposes only. QBFT requires 4 validators to be Byzantine fault tolerant."})]}),"\n",(0,r.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"/private-networks/get-started/install/binary-distribution",children:"Besu"})}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"https://curl.haxx.se/download.html",children:"Curl (or similar webservice client)"}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"steps",children:"Steps"}),"\n",(0,r.jsx)(t.p,{children:"Listed on the right-hand side of the page are the steps to create a private network using QBFT with four nodes. The four nodes are all validators."}),"\n",(0,r.jsx)(t.h3,{id:"1-create-directories",children:"1. Create directories"}),"\n",(0,r.jsx)(t.p,{children:"Each node requires a data directory for the blockchain data."}),"\n",(0,r.jsx)(t.p,{children:"Create directories for your private network, each of the four nodes, and a data directory for each node:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"QBFT-Network/\n\u251c\u2500\u2500 Node-1\n\u2502 \u251c\u2500\u2500 data\n\u251c\u2500\u2500 Node-2\n\u2502 \u251c\u2500\u2500 data\n\u251c\u2500\u2500 Node-3\n\u2502 \u251c\u2500\u2500 data\n\u2514\u2500\u2500 Node-4\n \u251c\u2500\u2500 data\n"})}),"\n",(0,r.jsx)(t.h3,{id:"2-create-a-configuration-file",children:"2. Create a configuration file"}),"\n",(0,r.jsxs)(t.p,{children:["The configuration file defines the ",(0,r.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/qbft#genesis-file",children:"QBFT genesis file"})," and the number of node key pairs to generate."]}),"\n",(0,r.jsxs)(t.p,{children:["The configuration file has two nested JSON nodes. The first is the ",(0,r.jsx)(t.code,{children:"genesis"})," property defining the QBFT genesis file, except for the ",(0,r.jsx)(t.code,{children:"extraData"})," string, which Besu generates automatically in the resulting genesis file. The second is the ",(0,r.jsx)(t.code,{children:"blockchain"})," property defining the number of key pairs to generate."]}),"\n",(0,r.jsxs)(t.p,{children:["Copy the following configuration file definition to a file called ",(0,r.jsx)(t.code,{children:"qbftConfigFile.json"})," and save it in the ",(0,r.jsx)(t.code,{children:"QBFT-Network"})," directory:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "genesis": {\n "config": {\n "chainId": 1337,\n "berlinBlock": 0,\n "qbft": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n }\n },\n "nonce": "0x0",\n "timestamp": "0x58ee40ba",\n "gasLimit": "0x47b760",\n "difficulty": "0x1",\n "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",\n "coinbase": "0x0000000000000000000000000000000000000000",\n "alloc": {\n "fe3b557e8fb62b89f4916b721be55ceb828dbd73": {\n "privateKey": "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63",\n "comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",\n "balance": "0xad78ebc5ac6200000"\n },\n "627306090abaB3A6e1400e9345bC60c78a8BEf57": {\n "privateKey": "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3",\n "comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",\n "balance": "90000000000000000000000"\n },\n "f17f52151EbEF6C7334FAD080c5704D77216b732": {\n "privateKey": "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f",\n "comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",\n "balance": "90000000000000000000000"\n }\n }\n },\n "blockchain": {\n "nodes": {\n "generate": true,\n "count": 4\n }\n }\n}\n'})}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsxs)(t.p,{children:["We recommend specifying the latest ",(0,r.jsx)(t.a,{href:"/public-networks/reference/genesis-items#milestone-blocks",children:"milestone"})," when creating the genesis file for a private network. This ensures you are using the most up-to-date protocol and have access to the most recent opcodes."]})}),"\n",(0,r.jsx)(t.admonition,{type:"warning",children:(0,r.jsxs)(t.p,{children:["Do not use the accounts in ",(0,r.jsx)(t.code,{children:"alloc"})," in the genesis file on Mainnet or any public network except for testing. The private keys display, which means the accounts are not secure."]})}),"\n",(0,r.jsx)(t.h3,{id:"3-generate-node-keys-and-a-genesis-file",children:"3. Generate node keys and a genesis file"}),"\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.code,{children:"QBFT-Network"})," directory, generate the node key and genesis file:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"besu operator generate-blockchain-config --config-file=qbftConfigFile.json --to=networkFiles --private-key-file-name=key\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Besu creates the following in the ",(0,r.jsx)(t.code,{children:"networkFiles"})," directory:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"genesis.json"})," - The genesis file including the ",(0,r.jsx)(t.code,{children:"extraData"})," property specifying the four nodes are validators."]}),"\n",(0,r.jsx)(t.li,{children:"A directory for each node named using the node address and containing the public and private key for each node."}),"\n"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-text",children:"networkFiles/\n\u251c\u2500\u2500 genesis.json\n\u2514\u2500\u2500 keys\n \u251c\u2500\u2500 0x438821c42b812fecdcea7fe8235806a412712fc0\n \u2502 \u251c\u2500\u2500 key\n \u2502 \u2514\u2500\u2500 key.pub\n \u251c\u2500\u2500 0xca9c2dfa62f4589827c0dd7dcf48259aa29f22f5\n \u2502 \u251c\u2500\u2500 key\n \u2502 \u2514\u2500\u2500 key.pub\n \u251c\u2500\u2500 0xcd5629bd37155608a0c9b28c4fd19310d53b3184\n \u2502 \u251c\u2500\u2500 key\n \u2502 \u2514\u2500\u2500 key.pub\n \u2514\u2500\u2500 0xe96825c5ab8d145b9eeca1aba7ea3695e034911a\n \u251c\u2500\u2500 key\n \u2514\u2500\u2500 key.pub\n"})}),"\n",(0,r.jsx)(t.h3,{id:"4-copy-the-genesis-file-to-the-qbft-network-directory",children:"4. Copy the genesis file to the QBFT-Network directory"}),"\n",(0,r.jsxs)(t.p,{children:["Copy the ",(0,r.jsx)(t.code,{children:"genesis.json"})," file to the ",(0,r.jsx)(t.code,{children:"QBFT-Network"})," directory."]}),"\n",(0,r.jsx)(t.h3,{id:"5-copy-the-node-private-keys-to-the-node-directories",children:"5. Copy the node private keys to the node directories"}),"\n",(0,r.jsxs)(t.p,{children:["For each node, copy the key files to the ",(0,r.jsx)(t.code,{children:"data"})," directory for that node"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-text",children:"QBFT-Network/\n\u251c\u2500\u2500 genesis.json\n\u251c\u2500\u2500 Node-1\n\u2502 \u251c\u2500\u2500 data\n\u2502 \u2502 \u251c\u2500\u2500 key\n\u2502 \u2502 \u251c\u2500\u2500 key.pub\n\u251c\u2500\u2500 Node-2\n\u2502 \u251c\u2500\u2500 data\n\u2502 \u2502 \u251c\u2500\u2500 key\n\u2502 \u2502 \u251c\u2500\u2500 key.pub\n\u251c\u2500\u2500 Node-3\n\u2502 \u251c\u2500\u2500 data\n\u2502 \u2502 \u251c\u2500\u2500 key\n\u2502 \u2502 \u251c\u2500\u2500 key.pub\n\u251c\u2500\u2500 Node-4\n\u2502 \u251c\u2500\u2500 data\n\u2502 \u2502 \u251c\u2500\u2500 key\n\u2502 \u2502 \u251c\u2500\u2500 key.pub\n"})}),"\n",(0,r.jsx)(t.h3,{id:"6-start-the-first-node-as-the-bootnode",children:"6. Start the first node as the bootnode"}),"\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.code,{children:"Node-1"})," directory, start Node-1:"]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(a.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --rpc-http-enabled --rpc-http-api=ETH,NET,QBFT --host-allowlist="*" --rpc-http-cors-origins="all" --profile=ENTERPRISE\n'})})}),(0,r.jsx)(a.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\genesis.json --rpc-http-enabled --rpc-http-api=ETH,NET,QBFT --host-allowlist="*" --rpc-http-cors-origins="all" --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(t.p,{children:"The command line:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["Specifies the data directory for Node-1 using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(t.code,{children:"--data-path"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["Enables the JSON-RPC API using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,r.jsx)(t.code,{children:"--rpc-http-enabled"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["Enables the ETH, NET, and QBFT APIs using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,r.jsx)(t.code,{children:"--rpc-http-api"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["Enables all-host access to the HTTP JSON-RPC API using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#host-allowlist",children:(0,r.jsx)(t.code,{children:"--host-allowlist"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["Enables all-domain access to the node through the HTTP JSON-RPC API using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-cors-origins",children:(0,r.jsx)(t.code,{children:"--rpc-http-cors-origins"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["Loads the ",(0,r.jsx)(t.a,{href:"/public-networks/how-to/configure-besu/profile#enterpriseprivate-profile",children:"enterprise/private profile"}),"\nusing the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#profile",children:(0,r.jsx)(t.code,{children:"--profile"})})," option."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["When the node starts, the ",(0,r.jsx)(t.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," displays. Copy the enode URL to specify Node-1 as the bootnode in the following steps."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Node 1 Enode URL",src:n(14739).A+"",width:"988",height:"126"})}),"\n",(0,r.jsx)(t.h3,{id:"7-start-node-2",children:"7. Start Node-2"}),"\n",(0,r.jsxs)(t.p,{children:["Start another terminal, change to the ",(0,r.jsx)(t.code,{children:"Node-2"})," directory and start Node-2 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:"]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(a.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --bootnodes= --p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,QBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8546 --profile=ENTERPRISE\n'})})}),(0,r.jsx)(a.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\genesis.json --bootnodes= --p2p-port=30304 --rpc-http-enabled --rpc-http-api=ETH,NET,QBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8546 --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(t.p,{children:"The command line specifies:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["The data directory for Node-2 using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(t.code,{children:"--data-path"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["A different port to Node-1 for P2P discovery using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,r.jsx)(t.code,{children:"--p2p-port"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["A different port to Node-1 for HTTP JSON-RPC using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,r.jsx)(t.code,{children:"--rpc-http-port"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["The enode URL of Node-1 using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#bootnodes",children:(0,r.jsx)(t.code,{children:"--bootnodes"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["Other options as for ",(0,r.jsx)(t.a,{href:"#6-start-the-first-node-as-the-bootnode",children:"Node-1"}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"8-start-node-3",children:"8. Start Node-3"}),"\n",(0,r.jsxs)(t.p,{children:["Start another terminal, change to the ",(0,r.jsx)(t.code,{children:"Node-3"})," directory and start Node-3 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:"]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(a.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --bootnodes= --p2p-port=30305 --rpc-http-enabled --rpc-http-api=ETH,NET,QBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8547 --profile=ENTERPRISE\n'})})}),(0,r.jsx)(a.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\genesis.json --bootnodes= --p2p-port=30305 --rpc-http-enabled --rpc-http-api=ETH,NET,QBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8547 --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(t.p,{children:"The command line specifies:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["The data directory for Node-3 using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(t.code,{children:"--data-path"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["A different port to Node-1 and Node-2 for P2P discovery using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,r.jsx)(t.code,{children:"--p2p-port"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["A different port to Node-1 and Node-2 for HTTP JSON-RPC using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,r.jsx)(t.code,{children:"--rpc-http-port"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["The bootnode as for ",(0,r.jsx)(t.a,{href:"#7-start-node-2",children:"Node-2"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Other options as for ",(0,r.jsx)(t.a,{href:"#6-start-the-first-node-as-the-bootnode",children:"Node-1"}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"9-start-node-4",children:"9. Start Node-4"}),"\n",(0,r.jsxs)(t.p,{children:["Start another terminal, change to the ",(0,r.jsx)(t.code,{children:"Node-4"})," directory and start Node-4 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:"]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(a.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --bootnodes= --p2p-port=30306 --rpc-http-enabled --rpc-http-api=ETH,NET,QBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8548 --profile=ENTERPRISE\n'})})}),(0,r.jsx)(a.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\genesis.json --bootnodes= --p2p-port=30306 --rpc-http-enabled --rpc-http-api=ETH,NET,QBFT --host-allowlist="*" --rpc-http-cors-origins="all" --rpc-http-port=8548 --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(t.p,{children:"The command line specifies:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["The data directory for Node-4 using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(t.code,{children:"--data-path"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["A different port to Node-1, Node-2, and Node-3 for P2P discovery using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,r.jsx)(t.code,{children:"--p2p-port"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["A different port to Node-1, Node-2, and Node-3 for HTTP JSON-RPC using the ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,r.jsx)(t.code,{children:"--rpc-http-port"})})," option."]}),"\n",(0,r.jsxs)(t.li,{children:["The bootnode as for ",(0,r.jsx)(t.a,{href:"#7-start-node-2",children:"Node-2"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Other options as for ",(0,r.jsx)(t.a,{href:"#6-start-the-first-node-as-the-bootnode",children:"Node-1"}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"10-confirm-the-private-network-is-working",children:"10. Confirm the private network is working"}),"\n",(0,r.jsxs)(t.p,{children:["Start another terminal, use curl to call the JSON-RPC API ",(0,r.jsx)(t.a,{href:"/private-networks/reference/api/#qbft_getvalidatorsbyblocknumber",children:(0,r.jsx)(t.code,{children:"qbft_getvalidatorsbyblocknumber"})})," method and confirm the network has four validators:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"qbft_getValidatorsByBlockNumber","params":["latest"], "id":1}\' localhost:8545\n'})}),"\n",(0,r.jsx)(t.p,{children:"The result displays the four validators:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "0x73ced0bd3def2e2d9859e3bd0882683a2e6835fb",\n "0x7a175f3542ceb60bf80fb536b3f42e7a30c0a6d7",\n "0x7f6efa6e34f8c9b591a9ad4763e21b3fca31bcd6",\n "0xc64140f1c9d5bb82e54976e568ad39958c3e94be"\n ]\n}\n'})}),"\n",(0,r.jsx)(t.p,{children:"Look at the logs to confirm Besu is producing blocks:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"2021-05-26 08:47:00.221+10:00 | EthScheduler-Workers-0 | INFO | PersistBlockTask | Imported #1 / 0 tx / 0 om / 0 (0.0%) gas / (0x4ee4456536e2793523df87288fae76518089eec91c3f7e05e220f1f4d3f6f95b) in 0.016s. Peers: 4\n2021-05-26 08:47:02.071+10:00 | pool-8-thread-1 | INFO | QbftBesuControllerBuilder | Imported #2 / 0 tx / 0 pending / 0 (0.0%) gas / (0x6fc47ada7146d75f6a46911d8d4038795b0c99970bbd4ce0c6d6aa60955f66fe)\n2021-05-26 08:47:04.051+10:00 | pool-8-thread-1 | INFO | QbftBesuControllerBuilder | Imported #3 / 0 tx / 0 pending / 0 (0.0%) gas / (0x3cb663880a65103266b11a8d8631beca5c482d515ac287125aa077b2e31b80b0)\n2021-05-26 08:47:06.058+10:00 | pool-8-thread-1 | INFO | QbftBesuControllerBuilder | Produced #4 / 0 tx / 0 pending / 0 (0.0%) gas / (0xc2927915ac0c94bab5fc9acea6608455f1c857d69e97191dc2c39e4ac411817b)\n2021-05-26 08:47:08.058+10:00 | pool-8-thread-1 | INFO | QbftBesuControllerBuilder | Imported #5 / 0 tx / 0 pending / 0 (0.0%) gas / (0xba63471d62c936733add9b884f5213c3842af9f52460268e39e0666ab82f02a5)\n"})}),"\n",(0,r.jsxs)(t.admonition,{type:"important",children:[(0,r.jsxs)(t.p,{children:["If the key files were not copied to the correct directory in ",(0,r.jsx)(t.a,{href:"#5-copy-the-node-private-keys-to-the-node-directories",children:"step 5"}),", the network will not start producing blocks."]}),(0,r.jsxs)(t.p,{children:["The logs for each node should indicate the public key was loaded from the ",(0,r.jsx)(t.code,{children:"data/key"})," directory:"]}),(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"2021-05-26 08:43:16.592+10:00 | main | INFO | KeyPairUtil | Loaded public key 0x931d32f1aec4e45b150ee38f3c74157a750fc53f523e63fe2b07bf3fce43a3de64587fc9aaf3736444f2e3eef0eea90be3b67d18be7b5b2b7cb2fcd670416a7e from /QBFT-Network/Node-1/data/key\n"})}),(0,r.jsx)(t.p,{children:"If the keys were not copied to the correct directory, Besu creates a key when starting up:"}),(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"2021-05-26 08:43:16.592+10:00 | main | INFO | KeyPairUtil | Generated new public key 0x1a4a2ade5ebc0a85572e2492e0cdf3e96b8928c75fa55b4425de8849850cf9b3a8cad1e27d98a3d3afac326a5e8788dbe6cc40249715c92825aebb28abe3e346 and stored it to /QBFT-Network/Node-1/data/key\n"})}),(0,r.jsx)(t.p,{children:"If a new key was created, the validator key specified in the configuration does not match the created key and the node cannot participate in creating blocks."})]}),"\n",(0,r.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(t.p,{children:["Use the ",(0,r.jsx)(t.a,{href:"/private-networks/reference/api/#qbft-methods",children:"QBFT API"})," to remove or add validators, or import accounts to MetaMask and send transactions as described in the ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/quickstart#create-a-transaction-using-metamask",children:"Quickstart tutorial"}),"."]}),"\n",(0,r.jsxs)(t.admonition,{type:"note",children:[(0,r.jsxs)(t.p,{children:["To add or remove nodes as validators you need the node address. The directory ",(0,r.jsx)(t.a,{href:"#3-generate-node-keys-and-a-genesis-file",children:"created for each node"})," has the node address as the name."]}),(0,r.jsxs)(t.p,{children:["Besu doesn't support ",(0,r.jsx)(t.a,{href:"/public-networks/how-to/send-transactions",children:"private key management"}),"."]})]}),"\n",(0,r.jsxs)(t.p,{children:["You can switch from the ",(0,r.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/qbft#add-and-remove-validators-using-block-headers",children:"block header validator selection method"})," configured here, to the ",(0,r.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/qbft#add-and-remove-validators-using-a-smart-contract",children:"contract validator selection method"})," by updating the genesis file and ",(0,r.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/qbft#transitions",children:"configuring a transition"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"stop-the-nodes",children:"Stop the nodes"}),"\n",(0,r.jsx)(t.p,{children:"When finished using the private network, stop all nodes using ++ctrl+c++ in each terminal window."}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["To restart the QBFT network in the future, start from ",(0,r.jsx)(t.a,{href:"#6-start-the-first-node-as-the-bootnode",children:"step 6"}),"."]})}),"\n",(0,r.jsx)(t.p,{children:"*[Byzantine fault tolerant]: Ability to function correctly and reach consensus despite nodes failing or propagating incorrect information to peers."})]})}function u(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},19365:(e,t,n)=>{n.d(t,{A:()=>a});n(96540);var r=n(18215);const o={tabItem:"tabItem_Ymn6"};var s=n(74848);function a(e){let{children:t,hidden:n,className:a}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.A)(o.tabItem,a),hidden:n,children:t})}},11470:(e,t,n)=>{n.d(t,{A:()=>w});var r=n(96540),o=n(18215),s=n(23104),a=n(56347),i=n(205),d=n(57485),c=n(31682),l=n(70679);function h(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:t,children:n}=e;return(0,r.useMemo)((()=>{const e=t??function(e){return h(e).map((e=>{let{props:{value:t,label:n,attributes:r,default:o}}=e;return{value:t,label:n,attributes:r,default:o}}))}(n);return function(e){const t=(0,c.XI)(e,((e,t)=>e.value===t.value));if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[t,n])}function u(e){let{value:t,tabValues:n}=e;return n.some((e=>e.value===t))}function f(e){let{queryString:t=!1,groupId:n}=e;const o=(0,a.W6)(),s=function(e){let{queryString:t=!1,groupId:n}=e;if("string"==typeof t)return t;if(!1===t)return null;if(!0===t&&!n)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:t,groupId:n});return[(0,d.aZ)(s),(0,r.useCallback)((e=>{if(!s)return;const t=new URLSearchParams(o.location.search);t.set(s,e),o.replace({...o.location,search:t.toString()})}),[s,o])]}function b(e){const{defaultValue:t,queryString:n=!1,groupId:o}=e,s=p(e),[a,d]=(0,r.useState)((()=>function(e){let{defaultValue:t,tabValues:n}=e;if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(t){if(!u({value:t,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${t}" but none of its children has the corresponding value. Available values are: ${n.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return t}const r=n.find((e=>e.default))??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:t,tabValues:s}))),[c,h]=f({queryString:n,groupId:o}),[b,x]=function(e){let{groupId:t}=e;const n=function(e){return e?`docusaurus.tab.${e}`:null}(t),[o,s]=(0,l.Dv)(n);return[o,(0,r.useCallback)((e=>{n&&s.set(e)}),[n,s])]}({groupId:o}),g=(()=>{const e=c??b;return u({value:e,tabValues:s})?e:null})();(0,i.A)((()=>{g&&d(g)}),[g]);return{selectedValue:a,selectValue:(0,r.useCallback)((e=>{if(!u({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);d(e),h(e),x(e)}),[h,x,s]),tabValues:s}}var x=n(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=n(74848);function m(e){let{className:t,block:n,selectedValue:r,selectValue:a,tabValues:i}=e;const d=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.a_)(),l=e=>{const t=e.currentTarget,n=d.indexOf(t),o=i[n].value;o!==r&&(c(t),a(o))},h=e=>{let t=null;switch(e.key){case"Enter":l(e);break;case"ArrowRight":{const n=d.indexOf(e.currentTarget)+1;t=d[n]??d[0];break}case"ArrowLeft":{const n=d.indexOf(e.currentTarget)-1;t=d[n]??d[d.length-1];break}}t?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":n},t),children:i.map((e=>{let{value:t,label:n,attributes:s}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:r===t?0:-1,"aria-selected":r===t,ref:e=>d.push(e),onKeyDown:h,onClick:l,...s,className:(0,o.A)("tabs__item",g.tabItem,s?.className,{"tabs__item--active":r===t}),children:n??t},t)}))})}function k(e){let{lazy:t,children:n,selectedValue:s}=e;const a=(Array.isArray(n)?n:[n]).filter(Boolean);if(t){const e=a.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:(0,o.A)("margin-top--md",e.props.className)}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:a.map(((e,t)=>(0,r.cloneElement)(e,{key:t,hidden:e.props.value!==s})))})}function v(e){const t=b(e);return(0,j.jsxs)("div",{className:(0,o.A)("tabs-container",g.tabList),children:[(0,j.jsx)(m,{...t,...e}),(0,j.jsx)(k,{...t,...e})]})}function w(e){const t=(0,x.A)();return(0,j.jsx)(v,{...e,children:h(e.children)},String(t))}},14739:(e,t,n)=>{n.d(t,{A:()=>r});const r=n.p+"assets/images/EnodeStartup-145939e1c789c28e464db82faa0fb3ca.png"},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>i});var r=n(96540);const o={},s=r.createContext(o);function a(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/91cde904.6fcce82e.js b/assets/js/91cde904.6fcce82e.js new file mode 100644 index 00000000000..840e9be0581 --- /dev/null +++ b/assets/js/91cde904.6fcce82e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7650],{18538:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>o,default:()=>d,frontMatter:()=>r,metadata:()=>l,toc:()=>c});var s=n(74848),i=n(28453);const r={title:"Installation options",description:"Options for getting started with Besu",tags:["public networks"]},o="Installation options",l={id:"public-networks/get-started/install/index",title:"Installation options",description:"Options for getting started with Besu",source:"@site/docs/public-networks/get-started/install/index.md",sourceDirName:"public-networks/get-started/install",slug:"/public-networks/get-started/install/",permalink:"/public-networks/get-started/install/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/get-started/install/index.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{title:"Installation options",description:"Options for getting started with Besu",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"System requirements",permalink:"/public-networks/get-started/system-requirements"},next:{title:"Run Besu from Docker image",permalink:"/public-networks/get-started/install/run-docker-image"}},a={},c=[{value:"Build from source",id:"build-from-source",level:2}];function u(e){const t={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"installation-options",children:"Installation options"})}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/public-networks/get-started/install/run-docker-image",children:"Docker image"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/public-networks/get-started/install/binary-distribution",children:"Binaries"})}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"build-from-source",children:"Build from source"}),"\n",(0,s.jsxs)(t.p,{children:["If you want to use the latest development version of Besu or a specific commit, build from source. Otherwise, use the ",(0,s.jsx)(t.a,{href:"/public-networks/get-started/install/binary-distribution",children:"binary"})," or ",(0,s.jsx)(t.a,{href:"/public-networks/get-started/install/run-docker-image",children:"Docker image"})," for more stable versions."]}),"\n",(0,s.jsxs)(t.p,{children:["View the ",(0,s.jsx)(t.a,{href:"https://wiki.hyperledger.org/display/BESU/Building+from+source",children:"Wiki"})," for instructions to install Besu from source."]})]})}function d(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>l});var s=n(96540);const i={},r=s.createContext(i);function o(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/91f929bc.731f780c.js b/assets/js/91f929bc.731f780c.js new file mode 100644 index 00000000000..c67d9e25231 --- /dev/null +++ b/assets/js/91f929bc.731f780c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4340],{58088:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var o=r(74848),n=r(28453);const i={title:"Use Java Flight Recorder",sidebar_position:4,description:"Using Java Flight Recorder with Besu",tags:["public networks","private networks"]},a="Use Java Flight Recorder",s={id:"public-networks/how-to/configure-java/java-flight-recorder",title:"Use Java Flight Recorder",description:"Using Java Flight Recorder with Besu",source:"@site/docs/public-networks/how-to/configure-java/java-flight-recorder.md",sourceDirName:"public-networks/how-to/configure-java",slug:"/public-networks/how-to/configure-java/java-flight-recorder",permalink:"/public-networks/how-to/configure-java/java-flight-recorder",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/configure-java/java-flight-recorder.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Use Java Flight Recorder",sidebar_position:4,description:"Using Java Flight Recorder with Besu",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Manage JVM memory",permalink:"/public-networks/how-to/configure-java/manage-memory"},next:{title:"Reduce storage for Bonsai Tries",permalink:"/public-networks/how-to/bonsai-limit-trie-logs"}},c={},l=[{value:"Enable Java Flight Recorder",id:"enable-java-flight-recorder",level:2}];function d(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"use-java-flight-recorder",children:"Use Java Flight Recorder"})}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.a,{href:"https://docs.oracle.com/javacomponents/jmc-5-4/jfr-runtime-guide/about.htm#JFRUH170",children:"Java Flight Recorder (JFR)"})," is a monitoring tool that collects information about the Java Virtual Machine (JVM) when Besu is running. Use the JFR as a tool to analyze Besu performance."]}),"\n",(0,o.jsx)(t.h2,{id:"enable-java-flight-recorder",children:"Enable Java Flight Recorder"}),"\n",(0,o.jsxs)(t.p,{children:["To enable JFR, set ",(0,o.jsx)(t.code,{children:"BESU_OPTS"})," to the JFR tags as follows:"]}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-bash",children:"export BESU_OPTS=-XX:StartFlightRecording=disk=true,delay=15s,dumponexit=true,\\\nfilename=/tmp/recording.jfr,maxsize=1024m,maxage=1d,\\\nsettings=profile,path-to-gc-roots=true\n"})}),"\n",(0,o.jsx)(t.admonition,{type:"tip",children:(0,o.jsx)(t.p,{children:"When recording, cleanly exiting Besu results in better data. If not possible to cleanly exit, the file may be missing some information not flushed to disk."})}),"\n",(0,o.jsxs)(t.p,{children:["Inspect the file written to ",(0,o.jsx)(t.code,{children:"/tmp/recording.jfr"})," with tools such as ",(0,o.jsx)(t.a,{href:"https://docs.oracle.com/javacomponents/jmc-5-5/jmc-user-guide/intro.htm#JMCCI109",children:"Mission Control"}),"."]}),"\n",(0,o.jsx)(t.admonition,{type:"danger",children:(0,o.jsxs)(t.p,{children:["If providing the output file to ",(0,o.jsx)(t.a,{href:"https://consensys.net/quorum/support/",children:"ConsenSys Quorum support"}),", be aware that while JFR files don't contain secrets such as private keys, some details about the user configuration can be inferred from the JFR output."]})})]})}function h(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},28453:(e,t,r)=>{r.d(t,{R:()=>a,x:()=>s});var o=r(96540);const n={},i=o.createContext(n);function a(e){const t=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:a(e.components),o.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9213a1f9.82823be8.js b/assets/js/9213a1f9.82823be8.js new file mode 100644 index 00000000000..facd3852fec --- /dev/null +++ b/assets/js/9213a1f9.82823be8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5303],{87514:(e,r,i)=>{i.r(r),i.d(r,{assets:()=>p,contentTitle:()=>s,default:()=>u,frontMatter:()=>n,metadata:()=>o,toc:()=>c});var t=i(74848),a=i(28453);const n={title:"Create and manage privacy groups",description:"Create and manage privacy groups with Besu",sidebar_position:4,tags:["private networks"]},s="Create and manage privacy groups (Deprecated)",o={id:"private-networks/how-to/use-privacy/privacy-groups",title:"Create and manage privacy groups",description:"Create and manage privacy groups with Besu",source:"@site/docs/private-networks/how-to/use-privacy/privacy-groups.md",sourceDirName:"private-networks/how-to/use-privacy",slug:"/private-networks/how-to/use-privacy/privacy-groups",permalink:"/private-networks/how-to/use-privacy/privacy-groups",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/use-privacy/privacy-groups.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Create and manage privacy groups",description:"Create and manage privacy groups with Besu",sidebar_position:4,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Run Tessera with Besu",permalink:"/private-networks/how-to/use-privacy/tessera"},next:{title:"Use flexible privacy groups",permalink:"/private-networks/how-to/use-privacy/flexible"}},p={},c=[];function d(e){const r={a:"a",admonition:"admonition",code:"code",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"create-and-manage-privacy-groups-deprecated",children:"Create and manage privacy groups (Deprecated)"})}),"\n",(0,t.jsx)(r.admonition,{type:"caution",children:(0,t.jsxs)(r.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,t.jsx)(r.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,t.jsx)(r.p,{children:"Besu-extended privacy provides JSON-RPC API methods for creating and managing privacy groups:"}),"\n",(0,t.jsxs)(r.ul,{children:["\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.a,{href:"/private-networks/reference/api/#priv_createprivacygroup",children:(0,t.jsx)(r.code,{children:"priv_createPrivacyGroup"})})}),"\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.a,{href:"/private-networks/reference/api/#priv_findprivacygroup",children:(0,t.jsx)(r.code,{children:"priv_findPrivacyGroup"})})}),"\n",(0,t.jsxs)(r.li,{children:[(0,t.jsx)(r.a,{href:"/private-networks/reference/api/#priv_deleteprivacygroup",children:(0,t.jsx)(r.code,{children:"priv_deletePrivacyGroup"})}),"."]}),"\n"]}),"\n",(0,t.jsx)(r.admonition,{type:"tip",children:(0,t.jsxs)(r.p,{children:["You can find and delete ",(0,t.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"EEA-compliant privacy groups"})," using ",(0,t.jsx)(r.a,{href:"/private-networks/reference/api/#priv_findprivacygroup",children:(0,t.jsx)(r.code,{children:"priv_findPrivacyGroup"})})," and ",(0,t.jsx)(r.a,{href:"/private-networks/reference/api/#priv_deleteprivacygroup",children:(0,t.jsx)(r.code,{children:"priv_deletePrivacyGroup"})}),"."]})})]})}function u(e={}){const{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453:(e,r,i)=>{i.d(r,{R:()=>s,x:()=>o});var t=i(96540);const a={},n=t.createContext(a);function s(e){const r=t.useContext(n);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),t.createElement(n.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/93e76459.8440837a.js b/assets/js/93e76459.8440837a.js new file mode 100644 index 00000000000..4f52bf6f110 --- /dev/null +++ b/assets/js/93e76459.8440837a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[23],{57695:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var r=n(74848),s=n(28453);const a={description:"Besu privacy-enabled private network tutorial",tags:["private networks"]},i="Create a privacy-enabled network using the Quorum Developer Quickstart (Deprecated)",o={id:"private-networks/tutorials/privacy/quickstart",title:"Create a privacy-enabled network using the Quorum Developer Quickstart (Deprecated)",description:"Besu privacy-enabled private network tutorial",source:"@site/docs/private-networks/tutorials/privacy/quickstart.md",sourceDirName:"private-networks/tutorials/privacy",slug:"/private-networks/tutorials/privacy/quickstart",permalink:"/private-networks/tutorials/privacy/quickstart",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/privacy/quickstart.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{description:"Besu privacy-enabled private network tutorial",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use the web3js-quorum multi-node example",permalink:"/private-networks/tutorials/privacy/web3js-quorum"},next:{title:"Create a permissioned network",permalink:"/private-networks/tutorials/permissioning/"}},c={},l=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Steps",id:"steps",level:2},{value:"1. Create Docker-compose file",id:"1-create-docker-compose-file",level:3},{value:"2. Start the network",id:"2-start-the-network",level:3},{value:"3. Deploy the private contract and interact with the nodes",id:"3-deploy-the-private-contract-and-interact-with-the-nodes",level:3},{value:"4. Stop the network",id:"4--stop-the-network",level:3},{value:"More examples",id:"more-examples",level:2}];function d(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"create-a-privacy-enabled-network-using-the-quorum-developer-quickstart-deprecated",children:"Create a privacy-enabled network using the Quorum Developer Quickstart (Deprecated)"})}),"\n",(0,r.jsx)(t.admonition,{type:"caution",children:(0,r.jsxs)(t.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,r.jsx)(t.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,r.jsxs)(t.p,{children:["You can create a privacy-enabled network using the ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/quickstart",children:"Quorum Developer Quickstart"}),". It runs a private Besu network that uses ",(0,r.jsx)(t.a,{href:"https://docs.tessera.consensys.net/en/stable/",children:"Tessera"})," as its private transaction manager."]}),"\n",(0,r.jsxs)(t.p,{children:["You can use the ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/quickstart#block-explorer",children:"Block Explorer"}),", make ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/quickstart#run-json-rpc-requests",children:"JSON-RPC requests"}),", and ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/quickstart#create-a-transaction-using-metamask",children:"create transactions using MetaMask"}),". This tutorial describes how to make private transactions between nodes, and perform read and write operations on private contracts."]}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsx)(t.p,{children:"This tutorial runs a private network suitable for education or demonstration purposes and is not intended for running production networks."})}),"\n",(0,r.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsx)(t.p,{children:"To run this tutorial, you must have the following installed:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.a,{href:"https://docs.docker.com/compose/install/",children:"Docker and Docker-compose"})}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["If using ",(0,r.jsx)(t.a,{href:"https://docs.docker.com/docker-for-mac/",children:"MacOS"})," or ",(0,r.jsx)(t.a,{href:"https://docs.docker.com/docker-for-windows/",children:"Windows"}),", enable Docker to use up to 6GB of memory on the ",(0,r.jsx)(t.em,{children:"Advanced"})," tab in ",(0,r.jsx)(t.em,{children:"Preferences"}),"."]})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.a,{href:"https://nodejs.org/en/download/",children:"Nodejs"})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.a,{href:"https://git-scm.com/",children:"Git command line"})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://curl.haxx.se/download.html",children:"Curl command line"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"steps",children:"Steps"}),"\n",(0,r.jsx)(t.h3,{id:"1-create-docker-compose-file",children:"1. Create Docker-compose file"}),"\n",(0,r.jsx)(t.p,{children:"To create the docker-compose file and artifacts, run:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"npx quorum-dev-quickstart\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Follow the prompts displayed to run Besu, private transactions, and ",(0,r.jsx)(t.a,{href:"/private-networks/how-to/monitor/elastic-stack",children:"logging with ELK"}),". Enter ",(0,r.jsx)(t.code,{children:"n"})," for Codefi Orchestrate."]}),"\n",(0,r.jsx)(t.h3,{id:"2-start-the-network",children:"2. Start the network"}),"\n",(0,r.jsx)(t.admonition,{type:"caution",children:(0,r.jsx)(t.p,{children:"If running in Windows, please run commands from the GitBash shell"})}),"\n",(0,r.jsx)(t.p,{children:"In the installation directory, start the network:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"./run.sh\n"})}),"\n",(0,r.jsx)(t.p,{children:"The script pulls the Docker images starts the network. Pulling the images takes a few minutes the first time. The network details display."}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"*************************************\nQuorum Dev Quickstart\n*************************************\nSetting up the index patterns in kibana .................\n----------------------------------\nList endpoints and services\n----------------------------------\nJSON-RPC HTTP service endpoint : http://localhost:8545\nJSON-RPC WebSocket service endpoint : ws://localhost:8546\nWeb block explorer address : http://localhost:25000/\nPrometheus address : http://localhost:9090/graph\nGrafana address : http://localhost:3000/d/XE4V0WGZz/besu-overview?orgId=1&refresh=10s&from=now-30m&to=now&var-system=All\nCollated logs using Kibana endpoint : http://localhost:5601/app/kibana#/discover\n\nFor more information on the endpoints and services, refer to README.md in the installation directory.\n****************************************************************\n"})}),"\n",(0,r.jsx)(t.h3,{id:"3-deploy-the-private-contract-and-interact-with-the-nodes",children:"3. Deploy the private contract and interact with the nodes"}),"\n",(0,r.jsxs)(t.p,{children:["To deploy a private contract to another ",(0,r.jsx)(t.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"privacy group"})," member, use the ",(0,r.jsx)(t.a,{href:"https://consensys.github.io/web3js-quorum/latest/index.html",children:"web3js-quorum"})," library and the ",(0,r.jsx)(t.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,r.jsx)(t.code,{children:"eea_sendRawTransaction"})})," API call. You must use this API call instead of ",(0,r.jsx)(t.a,{href:"https://ethereum.github.io/execution-apis/api-documentation",children:(0,r.jsx)(t.code,{children:"eth_sendTransaction"})})," because Besu keeps account management separate for stronger security."]}),"\n",(0,r.jsxs)(t.p,{children:["This example uses the ",(0,r.jsx)(t.a,{href:"https://www.npmjs.com/package/web3",children:"web3js"})," library to make the API calls, the example creates three Besu nodes, with each node having a corresponding Tessera node for privacy. You can access the Besu member nodes for API calls on the following ports:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"Member1Besu RPC: http://localhost:20000\nMember1Tessera: http://localhost:9081\n\nMember2Besu RPC: http://localhost:20002\nMember2Tessera: http://localhost:9082\n\nMember3Besu RPC: http://localhost:20004\nMember3Tessera: http://localhost:9083\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Navigate to the ",(0,r.jsx)(t.code,{children:"smart_contracts"})," directory and deploy the private transaction:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"cd smart_contracts\nnpm install\nnode scripts/private/private_tx.js\n"})}),"\n",(0,r.jsxs)(t.p,{children:["The script deploys the contract and sends an arbitrary value (47) from ",(0,r.jsx)(t.code,{children:"Member1"})," to ",(0,r.jsx)(t.code,{children:"Member3"}),". Once done, it queries all three members (Tessera) to check the value at an address. Only ",(0,r.jsx)(t.code,{children:"Member1"})," & ",(0,r.jsx)(t.code,{children:"Member3"})," has this information as they were involved in the transaction, ",(0,r.jsx)(t.code,{children:"Member2"})," responds with a ",(0,r.jsx)(t.code,{children:"0x"})," to indicate it is unaware of the transaction."]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"node scripts/private/private_tx.js\nCreating contract...\nGetting contractAddress from txHash: 0xc1b57f6a7773fe887afb141a09a573d19cb0fdbb15e0f2b9ed0dfead6f5b5dbf\nWaiting for transaction to be mined ...\nAddress of transaction: 0x8220ca987f7bb7f99815d0ef64e1d8a072a2c167\nUse the smart contracts 'get' function to read the contract's constructor initialized value ..\nWaiting for transaction to be mined ...\nMember1 value from deployed contract is: 0x000000000000000000000000000000000000000000000000000000000000002f\nUse the smart contracts 'set' function to update that value to 123 .. - from member1 to member3\nTransaction hash: 0x387c6627fe87e235b0f2bbbe1b2003a11b54afc737dca8da4990d3de3197ac5f\nWaiting for transaction to be mined ...\nVerify the private transaction is private by reading the value from all three members ..\nWaiting for transaction to be mined ...\nMember1 value from deployed contract is: 0x000000000000000000000000000000000000000000000000000000000000007b\nWaiting for transaction to be mined ...\nMember2 value from deployed contract is: 0x\nWaiting for transaction to be mined ...\nMember3 value from deployed contract is: 0x000000000000000000000000000000000000000000000000000000000000007b\n"})}),"\n",(0,r.jsx)(t.p,{children:"The general contract deployment flow is:"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Deploy a contract, which returns a transaction hash."}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Obtain the privacy transaction receipt from the transaction hash."}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Use the contract address in the privacy transaction receipt to ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/contracts/interact",children:"interact with the contract"})," from that point on."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"4--stop-the-network",children:"4. Stop the network"}),"\n",(0,r.jsx)(t.p,{children:"Do one of the following to stop the network:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Stop the network:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"./stop.sh\n"})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Stop the network and remove the containers and volumes:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"./remove.sh\n"})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"more-examples",children:"More examples"}),"\n",(0,r.jsxs)(t.p,{children:["View the ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/privacy/web3js-quorum",children:"web3js-quorum client library example"})," and\n",(0,r.jsx)(t.a,{href:"https://github.com/ConsenSys/web3js-quorum/tree/master/example",children:"code examples"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["You can also test the ERC-20 token example by executing ",(0,r.jsx)(t.code,{children:"erc20.js"}),", which deploys a\n",(0,r.jsx)(t.code,{children:"HumanStandardToken"})," contract and transfers one token to Node-2."]}),"\n",(0,r.jsxs)(t.p,{children:["You can verify this by observing the ",(0,r.jsx)(t.code,{children:"data"})," field of the ",(0,r.jsx)(t.code,{children:"logs"}),", which is ",(0,r.jsx)(t.code,{children:"1"}),"."]})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>o});var r=n(96540);const s={},a=r.createContext(s);function i(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/981fdc44.3d68d69f.js b/assets/js/981fdc44.3d68d69f.js new file mode 100644 index 00000000000..8e5d4256320 --- /dev/null +++ b/assets/js/981fdc44.3d68d69f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4990],{1142:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>u,contentTitle:()=>o,default:()=>p,frontMatter:()=>l,metadata:()=>c,toc:()=>d});var s=r(74848),t=r(28453),a=r(11470),i=r(19365);const l={title:"System requirements",sidebar_position:1,description:"Ensure you meet the system requirements to sync and run Besu.",tags:["public networks"]},o="System requirements",c={id:"public-networks/get-started/system-requirements",title:"System requirements",description:"Ensure you meet the system requirements to sync and run Besu.",source:"@site/docs/public-networks/get-started/system-requirements.md",sourceDirName:"public-networks/get-started",slug:"/public-networks/get-started/system-requirements",permalink:"/public-networks/get-started/system-requirements",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/get-started/system-requirements.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"System requirements",sidebar_position:1,description:"Ensure you meet the system requirements to sync and run Besu.",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Get started",permalink:"/public-networks/get-started"},next:{title:"Installation options",permalink:"/public-networks/get-started/install/"}},u={},d=[{value:"Java distribution and installation",id:"java-distribution-and-installation",level:2},{value:"Java Virtual Machine size",id:"java-virtual-machine-size",level:2},{value:"Disk space",id:"disk-space",level:2},{value:"Disk type",id:"disk-type",level:2},{value:"AWS requirements",id:"aws-requirements",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"system-requirements",children:"System requirements"})}),"\n",(0,s.jsxs)(n.p,{children:["Determine public network system requirements by checking CPU and disk space requirements using ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/monitor/metrics",children:"Prometheus"}),". Grafana provides a ",(0,s.jsx)(n.a,{href:"https://grafana.com/grafana/dashboards/10273",children:"sample dashboard"})," for Besu."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(n.p,{children:"CPU requirements are highest when syncing to the network and typically reduce after the node is synchronized to the chain head."})}),"\n",(0,s.jsx)(n.h2,{id:"java-distribution-and-installation",children:"Java distribution and installation"}),"\n",(0,s.jsxs)(n.p,{children:["Besu requires an installation of Java 21+ to run.\nWe currently recommend two Java distributions, ",(0,s.jsx)(n.a,{href:"https://jdk.java.net/21/",children:"OpenJDK 21"})," and\n",(0,s.jsx)(n.a,{href:"https://www.eclipse.org/openj9/",children:"OpenJ9"}),", though you can experiment based on your needs."]}),"\n",(0,s.jsx)(n.p,{children:"OpenJDK is the default for many Java users and is balanced in performance and garbage collection.\nOpenJ9 consumes less memory and system resources, but can have worse performance on some setups."}),"\n",(0,s.jsxs)(n.p,{children:["If you have more than 32GB RAM (for Besu and your ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-clients#consensus-clients",children:"consensus client"}),"), use OpenJDK.\nIf you have less RAM:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"If you're on Linux (or Unix-based) and your CPU is x86-64 bit architecture (like Intel), use OpenJ9."}),"\n",(0,s.jsx)(n.li,{children:"If you're on ARM-64 CPU architecture (Mac M-series, Raspberry Pi), use OpenJDK."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"If you have OpenJDK installed or need a fresh installation of OpenJ9, you can pick up the OpenJ9\ndocker image, or install the OpenJ9 JDK using the following steps:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Get the ",(0,s.jsx)(n.a,{href:"https://github.com/ibmruntimes/semeru21-certified-binaries/releases",children:"binaries"})," corresponding to\nyour OS architecture.\nFor example:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"wget https://github.com/ibmruntimes/semeru21-certified-binaries/releases/download/jdk-21.0.3%2B9_openj9-0.44.0/ibm-semeru-certified-jdk_x64_linux_21.0.3.0.tar.gz\n"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Uncompress the binaries:"}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(i.A,{value:"Command",label:"Command",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"tar -xvf YOUR_J9_IMAGE.tar.gz\n"})})}),(0,s.jsx)(i.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"tar -xvf ibm-semeru-certified-jdk_x64_linux_21.0.3.0.tar.gz\n"})})})]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Move the binaries to ",(0,s.jsx)(n.code,{children:"bin"})," directory:"]}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(i.A,{value:"Command",label:"Command",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo cp -r YOUR_IMAGE/ /usr/bin/\n"})})}),(0,s.jsx)(i.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"sudo cp -r jdk-21.0.3+9/ /usr/bin/\n"})})})]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Specify OpenJ9 for Java on your machine:"}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(i.A,{value:"Command",label:"Command",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'sudo update-alternatives --install "/usr/bin/java" "java" "/usr/bin/YOUR_IMAGE" 1\nsudo update-alternatives --config java (and choose OpenJ9)\n'})})}),(0,s.jsx)(i.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'sudo update-alternatives --install "/usr/bin/java" "java" "/usr/bin/jdk-21.0.3+9/bin/java"\n'})})})]}),"\n",(0,s.jsxs)(n.p,{children:["Change your ",(0,s.jsx)(n.code,{children:"JAVA_HOME"})," to OpenJ9 (if using the JDK implementation), where ",(0,s.jsx)(n.code,{children:"jdk-install-dir"})," is\nthe installation location you specified:"]}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(i.A,{value:"Command",label:"Command",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"export JAVA_HOME=jdk-install-dir`\n"})})}),(0,s.jsx)(i.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"export JAVA_HOME=/usr/bin/jdk-21.0.3+9\n"})})})]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"java-virtual-machine-size",children:"Java Virtual Machine size"}),"\n",(0,s.jsxs)(n.p,{children:["For Mainnet and testnets, the minimum ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/configure-java/manage-memory",children:"Java Virtual Machine (JVM) memory requirement is 8 GB"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"JVM memory requirements are highest when syncing, but will reduce after the node is synchronized to the chain head. Monitor your system to determine your actual JVM memory needs."}),"\n",(0,s.jsx)(n.h2,{id:"disk-space",children:"Disk space"}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:"Fast synchronization"})," with ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats",children:"pruning"})," enabled requires approximately 750 GB of disk space. ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:"Full synchronization"})," requires approximately 3 TB."]}),"\n",(0,s.jsx)(n.h2,{id:"disk-type",children:"Disk type"}),"\n",(0,s.jsxs)(n.p,{children:["Use ",(0,s.jsx)(n.a,{href:"https://cloud.google.com/compute/docs/disks",children:"local SSD storage"})," for high throughput nodes (validators and RPC nodes). Read-only nodes can use a lower performance setup."]}),"\n",(0,s.jsxs)(n.p,{children:["You can use local SSDs through ",(0,s.jsx)(n.a,{href:"https://en.wikipedia.org/wiki/SCSI",children:"SCSI interfaces"}),". For higher performance in production settings, we recommend upgrading to ",(0,s.jsx)(n.a,{href:"https://cloud.google.com/compute/docs/disks/local-ssd#performance",children:"NVMe interfaces"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"aws-requirements",children:"AWS requirements"}),"\n",(0,s.jsxs)(n.p,{children:["We are running 22.4.2 Mainnet nodes using ",(0,s.jsx)(n.code,{children:"m6gd.2xlarge"})," boxes."]}),"\n",(0,s.jsxs)(n.p,{children:["We synchronized the 22.4.2 Mainnet nodes using ",(0,s.jsx)(n.code,{children:"m6gd.2xlarge"})," boxes."]}),"\n",(0,s.jsx)(n.p,{children:"Using a larger box while synchronizing speeds up the sync process by giving it more resources. When the sync is completed, the box size can be reduced."}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsx)(n.p,{children:"If you are using a more recent release than 22.4.2, resource requirements may have increased."})})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},19365:(e,n,r)=>{r.d(n,{A:()=>i});r(96540);var s=r(18215);const t={tabItem:"tabItem_Ymn6"};var a=r(74848);function i(e){let{children:n,hidden:r,className:i}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.A)(t.tabItem,i),hidden:r,children:n})}},11470:(e,n,r)=>{r.d(n,{A:()=>k});var s=r(96540),t=r(18215),a=r(23104),i=r(56347),l=r(205),o=r(57485),c=r(31682),u=r(70679);function d(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:r}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:r,attributes:s,default:t}}=e;return{value:n,label:r,attributes:s,default:t}}))}(r);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,r])}function p(e){let{value:n,tabValues:r}=e;return r.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:r}=e;const t=(0,i.W6)(),a=function(e){let{queryString:n=!1,groupId:r}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!r)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return r??null}({queryString:n,groupId:r});return[(0,o.aZ)(a),(0,s.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(t.location.search);n.set(a,e),t.replace({...t.location,search:n.toString()})}),[a,t])]}function b(e){const{defaultValue:n,queryString:r=!1,groupId:t}=e,a=h(e),[i,o]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:r}=e;if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${r.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=r.find((e=>e.default))??r[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:a}))),[c,d]=m({queryString:r,groupId:t}),[b,x]=function(e){let{groupId:n}=e;const r=function(e){return e?`docusaurus.tab.${e}`:null}(n),[t,a]=(0,u.Dv)(r);return[t,(0,s.useCallback)((e=>{r&&a.set(e)}),[r,a])]}({groupId:t}),f=(()=>{const e=c??b;return p({value:e,tabValues:a})?e:null})();(0,l.A)((()=>{f&&o(f)}),[f]);return{selectedValue:i,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);o(e),d(e),x(e)}),[d,x,a]),tabValues:a}}var x=r(92303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=r(74848);function g(e){let{className:n,block:r,selectedValue:s,selectValue:i,tabValues:l}=e;const o=[],{blockElementScrollPositionUntilNextRender:c}=(0,a.a_)(),u=e=>{const n=e.currentTarget,r=o.indexOf(n),t=l[r].value;t!==s&&(c(n),i(t))},d=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const r=o.indexOf(e.currentTarget)+1;n=o[r]??o[0];break}case"ArrowLeft":{const r=o.indexOf(e.currentTarget)-1;n=o[r]??o[o.length-1];break}}n?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.A)("tabs",{"tabs--block":r},n),children:l.map((e=>{let{value:n,label:r,attributes:a}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>o.push(e),onKeyDown:d,onClick:u,...a,className:(0,t.A)("tabs__item",f.tabItem,a?.className,{"tabs__item--active":s===n}),children:r??n},n)}))})}function v(e){let{lazy:n,children:r,selectedValue:a}=e;const i=(Array.isArray(r)?r:[r]).filter(Boolean);if(n){const e=i.find((e=>e.props.value===a));return e?(0,s.cloneElement)(e,{className:(0,t.A)("margin-top--md",e.props.className)}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:i.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function y(e){const n=b(e);return(0,j.jsxs)("div",{className:(0,t.A)("tabs-container",f.tabList),children:[(0,j.jsx)(g,{...n,...e}),(0,j.jsx)(v,{...n,...e})]})}function k(e){const n=(0,x.A)();return(0,j.jsx)(y,{...e,children:d(e.children)},String(n))}},28453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>l});var s=r(96540);const t={},a=s.createContext(t);function i(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/99a5eb2e.8239cbdc.js b/assets/js/99a5eb2e.8239cbdc.js new file mode 100644 index 00000000000..290f3ee8bac --- /dev/null +++ b/assets/js/99a5eb2e.8239cbdc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4353],{52491:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>a,frontMatter:()=>r,metadata:()=>d,toc:()=>h});var s=n(74848),i=n(28453);const r={title:"Objects",description:"Engine API objects reference",tags:["public networks"]},c="Engine API objects",d={id:"public-networks/reference/engine-api/objects",title:"Objects",description:"Engine API objects reference",source:"@site/docs/public-networks/reference/engine-api/objects.md",sourceDirName:"public-networks/reference/engine-api",slug:"/public-networks/reference/engine-api/objects",permalink:"/public-networks/reference/engine-api/objects",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/reference/engine-api/objects.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{title:"Objects",description:"Engine API objects reference",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Engine API",permalink:"/public-networks/reference/engine-api/"},next:{title:"Genesis file items",permalink:"/public-networks/reference/genesis-items"}},l={},h=[{value:"Blob and proof object",id:"blob-and-proof-object",level:2},{value:"Execution payload object",id:"execution-payload-object",level:2},{value:"Fork choice state object",id:"fork-choice-state-object",level:2},{value:"Payload attributes object",id:"payload-attributes-object",level:2},{value:"Payload status object",id:"payload-status-object",level:2},{value:"Transition configuration object",id:"transition-configuration-object",level:2}];function o(e){const t={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"engine-api-objects",children:"Engine API objects"})}),"\n",(0,s.jsxs)(t.p,{children:["The following objects are parameters for or returned by the ",(0,s.jsx)(t.a,{href:"/public-networks/reference/engine-api/",children:"Engine API methods"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"blob-and-proof-object",children:"Blob and proof object"}),"\n",(0,s.jsxs)(t.p,{children:["Returned by ",(0,s.jsx)(t.a,{href:"/public-networks/reference/engine-api/#engine_getblobsv1",children:(0,s.jsx)(t.code,{children:"engine_getBlobsV1"})}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Key"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,s.jsx)(t.th,{children:"Value"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"blob"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 131072 Bytes"]}),(0,s.jsxs)(t.td,{children:["An SSZ-encoded ",(0,s.jsx)(t.code,{children:"Blob"})," as defined in ",(0,s.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-4844",children:"EIP-4844"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"proof"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 48 Bytes"]}),(0,s.jsxs)(t.td,{children:["A ",(0,s.jsx)(t.code,{children:"KZGProof"})," as defined in ",(0,s.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-4844",children:"EIP-4844"}),"."]})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"execution-payload-object",children:"Execution payload object"}),"\n",(0,s.jsxs)(t.p,{children:["Parameter for ",(0,s.jsx)(t.a,{href:"/public-networks/reference/engine-api/#engine_newpayloadv1",children:(0,s.jsx)(t.code,{children:"engine_newPayloadV1"})}),". Returned by ",(0,s.jsx)(t.a,{href:"/public-networks/reference/engine-api/#engine_getpayloadv1",children:(0,s.jsx)(t.code,{children:"engine_getPayloadV1"})}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Key"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,s.jsx)(t.th,{children:"Value"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"parentHash"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 32 Bytes"]}),(0,s.jsx)(t.td,{children:"Hash of the parent block."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"feeRecipient"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 20 Bytes"]}),(0,s.jsx)(t.td,{children:"Beneficiary of the fee."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"stateRoot"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 32 Bytes"]}),(0,s.jsx)(t.td,{children:"Root of the final state trie for the block."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"receiptsRoot"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 32 Bytes"]}),(0,s.jsx)(t.td,{children:"Root of the receipts trie for the block."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"logsBloom"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 256 Bytes"]}),(0,s.jsx)(t.td,{children:"Bloom filter for light clients to quickly retrieve related logs."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"prevRandao"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 32 Bytes"]}),(0,s.jsx)(t.td,{children:"Difficulty for this block."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"blockNumber"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Quantity"}),", 64 Bits"]}),(0,s.jsx)(t.td,{children:"Block number of block containing this transaction."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"gasLimit"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Quantity"}),", 64 Bits"]}),(0,s.jsx)(t.td,{children:"Maximum gas allowed in this block."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"gasUsed"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Quantity"}),", 64 Bits"]}),(0,s.jsx)(t.td,{children:"Total gas used by all transactions in this block."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"timestamp"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Quantity"}),", 64 Bits"]}),(0,s.jsx)(t.td,{children:"Unix timestamp (milliseconds) for block assembly."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"extraData"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 0 to 32 Bytes"]}),(0,s.jsx)(t.td,{children:"Extra data field for this block."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"baseFeePerGas"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Quantity"}),", 256 Bits"]}),(0,s.jsxs)(t.td,{children:["The block's ",(0,s.jsx)(t.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:"base fee per gas"}),". This field is empty for blocks created before ",(0,s.jsx)(t.a,{href:"https://github.com/ethereum/EIPs/blob/2d8a95e14e56de27c5465d93747b0006bd8ac47f/EIPS/eip-1559.md",children:"EIP-1559"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"blockHash"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 32 Bytes"]}),(0,s.jsx)(t.td,{children:"Hash of the execution block."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"transactions"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:(0,s.jsx)(t.em,{children:"Array"})}),(0,s.jsxs)(t.td,{children:["Array of transaction objects, each object is a list representing ",(0,s.jsx)(t.code,{children:"TransactionType"}),", ",(0,s.jsx)(t.code,{children:"TransactionPayload"}),", or ",(0,s.jsx)(t.code,{children:"LegacyTransaction"})," as defined in ",(0,s.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-2718",children:"EIP-2718"}),"."]})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"fork-choice-state-object",children:"Fork choice state object"}),"\n",(0,s.jsxs)(t.p,{children:["Parameter for ",(0,s.jsx)(t.a,{href:"/public-networks/reference/engine-api/#engine_forkchoiceupdatedv1",children:(0,s.jsx)(t.code,{children:"engine_forkchoiceUpdatedV1"})}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Key"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,s.jsx)(t.th,{children:"Value"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"headBlockHash"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 32 Bytes"]}),(0,s.jsx)(t.td,{children:"Block hash of the head of the canonical chain."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"safeBlockHash"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 32 Bytes"]}),(0,s.jsxs)(t.td,{children:['"Safe" block hash of the canonical chain under certain synchrony and honesty assumptions. This value MUST be either equal to or an ancestor of ',(0,s.jsx)(t.code,{children:"headBlockHash"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"finalizedBlockHash"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 32 Bytes"]}),(0,s.jsx)(t.td,{children:"Block hash of the most recent finalized block."})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"payload-attributes-object",children:"Payload attributes object"}),"\n",(0,s.jsxs)(t.p,{children:["Parameter for ",(0,s.jsx)(t.a,{href:"/public-networks/reference/engine-api/#engine_forkchoiceupdatedv1",children:(0,s.jsx)(t.code,{children:"engine_forkchoiceUpdatedV1"})}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Key"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,s.jsx)(t.th,{children:"Value"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"timestamp"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Quantity"}),", 64 Bits"]}),(0,s.jsxs)(t.td,{children:["Value for the ",(0,s.jsx)(t.code,{children:"timestamp"})," field of the new payload."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"prevRandao"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 32 Bytes"]}),(0,s.jsxs)(t.td,{children:["Value for the ",(0,s.jsx)(t.code,{children:"prevRandao"})," field of the new payload."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"suggestedFeeRecipient"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 20 Bytes"]}),(0,s.jsxs)(t.td,{children:["Suggested value for the ",(0,s.jsx)(t.code,{children:"feeRecipient"})," field of the new payload."]})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"payload-status-object",children:"Payload status object"}),"\n",(0,s.jsxs)(t.p,{children:["Returned by ",(0,s.jsx)(t.a,{href:"/public-networks/reference/engine-api/#engine_newpayloadv1",children:(0,s.jsx)(t.code,{children:"engine_newPayloadV1"})})," and ",(0,s.jsx)(t.a,{href:"/public-networks/reference/engine-api/#engine_forkchoiceupdatedv1",children:(0,s.jsx)(t.code,{children:"engine_forkchoiceUpdatedV1"})}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Key"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,s.jsx)(t.th,{children:"Value"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"status"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:(0,s.jsx)(t.em,{children:"Enumeration"})}),(0,s.jsxs)(t.td,{children:["Either ",(0,s.jsx)(t.code,{children:'"VALID"'}),", ",(0,s.jsx)(t.code,{children:'"INVALID"'}),", ",(0,s.jsx)(t.code,{children:'"SYNCING"'}),", ",(0,s.jsx)(t.code,{children:'"ACCEPTED"'}),", ",(0,s.jsx)(t.code,{children:'"INVALID_BLOCK_HASH"'}),", or ",(0,s.jsx)(t.code,{children:'"INVALID_TERMINAL_BLOCK"'}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"latestValidHash"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 32 Bytes"]}),(0,s.jsx)(t.td,{children:"Hash of the most recent valid block in the branch defined by payload and its ancestors."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"validationError"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:(0,s.jsx)(t.em,{children:"String"})}),(0,s.jsxs)(t.td,{children:["Message providing additional details on the validation error if the payload is classified as ",(0,s.jsx)(t.code,{children:"INVALID"}),", ",(0,s.jsx)(t.code,{children:"INVALID_BLOCK_HASH"})," or ",(0,s.jsx)(t.code,{children:"INVALID_TERMINAL_BLOCK"}),"."]})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"transition-configuration-object",children:"Transition configuration object"}),"\n",(0,s.jsxs)(t.p,{children:["Parameter for and returned by ",(0,s.jsx)(t.a,{href:"/public-networks/reference/engine-api/#engine_exchangetransitionconfigurationv1",children:(0,s.jsx)(t.code,{children:"engine_exchangeTransitionConfigurationV1"})}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Key"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,s.jsx)(t.th,{children:"Value"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"terminalTotalDifficulty"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Quantity"}),", 256 Bits"]}),(0,s.jsxs)(t.td,{children:["Maps on the ",(0,s.jsx)(t.code,{children:"TERMINAL_TOTAL_DIFFICULTY"})," parameter of ",(0,s.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-3675#client-software-configuration",children:"EIP-3675"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"terminalBlockHash"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Data"}),", 32 Bytes"]}),(0,s.jsxs)(t.td,{children:["Maps on the ",(0,s.jsx)(t.code,{children:"TERMINAL_BLOCK_HASH"})," parameter of ",(0,s.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-3675#client-software-configuration",children:"EIP-3675"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"terminalBlockNumber"})}),(0,s.jsxs)(t.td,{style:{textAlign:"center"},children:[(0,s.jsx)(t.em,{children:"Quantity"}),", 64 Bits"]}),(0,s.jsxs)(t.td,{children:["Maps on the ",(0,s.jsx)(t.code,{children:"TERMINAL_BLOCK_NUMBER"})," parameter of ",(0,s.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-3675#client-software-configuration",children:"EIP-3675"}),"."]})]})]})]})]})}function a(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>c,x:()=>d});var s=n(96540);const i={},r=s.createContext(i);function c(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:c(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9a50decc.73be5a08.js b/assets/js/9a50decc.73be5a08.js new file mode 100644 index 00000000000..8195ca4502e --- /dev/null +++ b/assets/js/9a50decc.73be5a08.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8721],{1770:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>h});var r=t(74848),s=t(28453),i=t(11470),a=t(19365);const o={title:"Create an Ethash network",sidebar_position:5,description:"Create a private network using the Ethash consensus protocol.",tags:["private networks"]},l="Create a private network using Ethash (Deprecated)",c={id:"private-networks/tutorials/ethash",title:"Create an Ethash network",description:"Create a private network using the Ethash consensus protocol.",source:"@site/docs/private-networks/tutorials/ethash.md",sourceDirName:"private-networks/tutorials",slug:"/private-networks/tutorials/ethash",permalink:"/private-networks/tutorials/ethash",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/ethash.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:5,frontMatter:{title:"Create an Ethash network",sidebar_position:5,description:"Create a private network using the Ethash consensus protocol.",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Create a Clique network",permalink:"/private-networks/tutorials/clique"},next:{title:"Create a privacy enabled network using the Quickstart",permalink:"/private-networks/tutorials/privacy/"}},d={},h=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Steps",id:"steps",level:2},{value:"1. Create directories",id:"1-create-directories",level:3},{value:"2. Create a genesis file",id:"2-create-a-genesis-file",level:3},{value:"3. Start the first node as a bootnode",id:"3-start-the-first-node-as-a-bootnode",level:3},{value:"4. Start Node-2",id:"4-start-node-2",level:3},{value:"5. Start Node-3",id:"5-start-node-3",level:3},{value:"6. Confirm the private network is working",id:"6-confirm-the-private-network-is-working",level:3},{value:"Next steps",id:"next-steps",level:2},{value:"Stop the nodes",id:"stop-the-nodes",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"create-a-private-network-using-ethash-deprecated",children:"Create a private network using Ethash (Deprecated)"})}),"\n",(0,r.jsx)(n.admonition,{type:"caution",children:(0,r.jsxs)(n.p,{children:["PoW consensus is deprecated in Besu version 24.11.0 and later. Please read this ",(0,r.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,r.jsx)(n.p,{children:"A private network provides a configurable network for testing. By configuring a low difficulty and enabling mining, this allows for fast block creation."}),"\n",(0,r.jsx)(n.p,{children:"You can test multi-block and multi-user scenarios on a private network before moving to one of the public testnets."}),"\n",(0,r.jsx)(n.admonition,{type:"danger",children:(0,r.jsx)(n.p,{children:"The steps in this tutorial create an isolated, but not protected or secure, Ethereum private network. We recommend running the private network behind a properly configured firewall."})}),"\n",(0,r.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/private-networks/get-started/install/binary-distribution",children:"Besu"})}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://curl.haxx.se/download.html",children:"Curl (or similar webservice client)"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"steps",children:"Steps"}),"\n",(0,r.jsx)(n.p,{children:"Listed on the right-hand side of the page are the steps to create a private network using Ethash."}),"\n",(0,r.jsx)(n.h3,{id:"1-create-directories",children:"1. Create directories"}),"\n",(0,r.jsxs)(n.p,{children:["Each node requires a data directory for the blockchain data. When the node starts, Besu saves the ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/node-keys",children:"node key"})," in this directory."]}),"\n",(0,r.jsx)(n.p,{children:"Create directories for your private network, each of the three nodes, and a data directory for each node:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"Private-Network/\n\u251c\u2500\u2500 Node-1\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u251c\u2500\u2500 Node-2\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2514\u2500\u2500 Node-3\n \u251c\u2500\u2500 data\n"})}),"\n",(0,r.jsx)(n.h3,{id:"2-create-a-genesis-file",children:"2. Create a genesis file"}),"\n",(0,r.jsx)(n.p,{children:"The genesis file defines the genesis block of the blockchain (that is, the start of the blockchain). The genesis file includes entries for configuring the blockchain, such as the mining difficulty and initial accounts and balances."}),"\n",(0,r.jsxs)(n.p,{children:["All nodes in a network must use the same genesis file. The ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/network-and-chain-id",children:"network ID"})," defaults to the ",(0,r.jsx)(n.code,{children:"chainID"})," in the genesis file. The ",(0,r.jsx)(n.code,{children:"fixeddifficulty"})," enables fast block mining."]}),"\n",(0,r.jsxs)(n.p,{children:["Copy the following genesis definition to a file called ",(0,r.jsx)(n.code,{children:"privateNetworkGenesis.json"})," and save it in the ",(0,r.jsx)(n.code,{children:"Private-Network"})," directory:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n "berlinBlock": 0,\n "ethash": {\n "fixeddifficulty": 1000\n },\n "chainID": 1337\n },\n "nonce": "0x42",\n "gasLimit": "0x1000000",\n "difficulty": "0x10000",\n "alloc": {\n "fe3b557e8fb62b89f4916b721be55ceb828dbd73": {\n "privateKey": "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63",\n "comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",\n "balance": "0xad78ebc5ac6200000"\n },\n "f17f52151EbEF6C7334FAD080c5704D77216b732": {\n "privateKey": "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f",\n "comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",\n "balance": "90000000000000000000000"\n }\n }\n}\n'})}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["We recommend specifying the latest ",(0,r.jsx)(n.a,{href:"/public-networks/reference/genesis-items#milestone-blocks",children:"milestone"})," when creating the genesis file for a private network. This ensures you are using the most up-to-date protocol and have access to the most recent opcodes."]})}),"\n",(0,r.jsx)(n.admonition,{type:"warning",children:(0,r.jsxs)(n.p,{children:["Don't use the accounts in ",(0,r.jsx)(n.code,{children:"alloc"})," in the genesis file on Mainnet or any public network except for testing. The private keys display, which means the accounts are not secure."]})}),"\n",(0,r.jsx)(n.h3,{id:"3-start-the-first-node-as-a-bootnode",children:"3. Start the first node as a bootnode"}),"\n",(0,r.jsx)(n.p,{children:"Start Node-1:"}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(a.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../privateNetworkGenesis.json --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-http-enabled --host-allowlist="*" --rpc-http-cors-origins="all" --profile=ENTERPRISE\n'})})}),(0,r.jsx)(a.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\privateNetworkGenesis.json --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-http-enabled --host-allowlist="*" --rpc-http-cors-origins="all" --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:"The command line enables:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Mining and specifies the account to pay mining rewards to using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#miner-enabled",children:(0,r.jsx)(n.code,{children:"--miner-enabled"})})," and ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#miner-coinbase",children:(0,r.jsx)(n.code,{children:"--miner-coinbase"})})," options."]}),"\n",(0,r.jsxs)(n.li,{children:["JSON-RPC API using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,r.jsx)(n.code,{children:"--rpc-http-enabled"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["All-host access to the HTTP JSON-RPC API using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#host-allowlist",children:(0,r.jsx)(n.code,{children:"--host-allowlist"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["All-domain access to the node through the HTTP JSON-RPC API using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-cors-origins",children:(0,r.jsx)(n.code,{children:"--rpc-http-cors-origins"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["The ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/profile#enterpriseprivate-profile",children:"enterprise/private profile"}),"\nusing the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#profile",children:(0,r.jsx)(n.code,{children:"--profile"})})," option."]}),"\n"]}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsx)(n.p,{children:"The miner coinbase account is one of the accounts defined in the genesis file."})}),"\n",(0,r.jsxs)(n.p,{children:["When the node starts, the ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," displays. Copy the enode URL to specify Node-1 as the bootnode in the following steps."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Node 1 Enode URL",src:t(14739).A+"",width:"988",height:"126"})}),"\n",(0,r.jsx)(n.h3,{id:"4-start-node-2",children:"4. Start Node-2"}),"\n",(0,r.jsxs)(n.p,{children:["Start another terminal, change to the ",(0,r.jsx)(n.code,{children:"Node-2"})," directory and start Node-2 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:"]}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(a.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"besu --data-path=data --genesis-file=../privateNetworkGenesis.json --bootnodes= --p2p-port=30304 --profile=ENTERPRISE\n"})})}),(0,r.jsx)(a.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"besu --data-path=data --genesis-file=..\\privateNetworkGenesis.json --bootnodes= --p2p-port=30304 --profile=ENTERPRISE\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:"The command line specifies:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["A different port to Node-1 for P2P discovery using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,r.jsx)(n.code,{children:"--p2p-port"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["The enode URL of Node-1 using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#bootnodes",children:(0,r.jsx)(n.code,{children:"--bootnodes"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["A data directory for Node-2 using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(n.code,{children:"--data-path"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["Other options as for ",(0,r.jsx)(n.a,{href:"#3-start-the-first-node-as-a-bootnode",children:"Node-1"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"5-start-node-3",children:"5. Start Node-3"}),"\n",(0,r.jsxs)(n.p,{children:["Start another terminal, change to the ",(0,r.jsx)(n.code,{children:"Node-3"})," directory and start Node-3 specifying the Node-1 enode URL copied when starting Node-1 as the bootnode:"]}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(a.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"besu --data-path=data --genesis-file=../privateNetworkGenesis.json --bootnodes= --p2p-port=30305 --profile=ENTERPRISE\n"})})}),(0,r.jsx)(a.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"besu --data-path=data --genesis-file=..\\privateNetworkGenesis.json --bootnodes= --p2p-port=30305 --profile=ENTERPRISE\n"})})})]}),"\n",(0,r.jsx)(n.p,{children:"The command line specifies:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"A different port to Node-1 and Node-2 for P2P discovery."}),"\n",(0,r.jsxs)(n.li,{children:["A data directory for Node-3 using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(n.code,{children:"--data-path"})})," option."]}),"\n",(0,r.jsxs)(n.li,{children:["Other options as for ",(0,r.jsx)(n.a,{href:"#4-start-node-2",children:"Node-2"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"6-confirm-the-private-network-is-working",children:"6. Confirm the private network is working"}),"\n",(0,r.jsxs)(n.p,{children:["Start another terminal, use curl to call the JSON-RPC API ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#net_peercount",children:(0,r.jsx)(n.code,{children:"net_peerCount"})})," method and confirm the nodes are functioning as peers:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}\' localhost:8545\n'})}),"\n",(0,r.jsx)(n.p,{children:"The result confirms Node-1 (the node running the JSON-RPC service) has two peers (Node-2 and Node-3):"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x2"\n}\n'})}),"\n",(0,r.jsx)(n.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,r.jsxs)(n.p,{children:["Import accounts to MetaMask and send transactions as described in the ",(0,r.jsx)(n.a,{href:"/private-networks/tutorials/quickstart#create-a-transaction-using-metamask",children:"Quickstart tutorial"}),"."]}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:["Besu doesn't support ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/send-transactions",children:"private key management"}),"."]})}),"\n",(0,r.jsxs)(n.p,{children:["Send transactions using ",(0,r.jsx)(n.code,{children:"eth_sendRawTransaction"})," to ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/",children:"send ether or, deploy or invoke contracts"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/json-rpc",children:"JSON-RPC API"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["Start a node with the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-enabled",children:(0,r.jsx)(n.code,{children:"--rpc-ws-enabled"})})," option and use the ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/rpc-pubsub",children:"RPC Pub/Sub API"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"stop-the-nodes",children:"Stop the nodes"}),"\n",(0,r.jsx)(n.p,{children:"When finished using the private network, stop all nodes using ++ctrl+c++ in each terminal window."}),"\n",(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsxs)(n.p,{children:["To restart the private network in the future, start from ",(0,r.jsx)(n.a,{href:"#3-start-the-first-node-as-a-bootnode",children:"3. Start the first node as a bootnode"}),"."]})})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>a});t(96540);var r=t(18215);const s={tabItem:"tabItem_Ymn6"};var i=t(74848);function a(e){let{children:n,hidden:t,className:a}=e;return(0,i.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,a),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>k});var r=t(96540),s=t(18215),i=t(23104),a=t(56347),o=t(205),l=t(57485),c=t(31682),d=t(70679);function h(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function u(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:s}}=e;return{value:n,label:t,attributes:r,default:s}}))}(t);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:t}=e;const s=(0,a.W6)(),i=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l.aZ)(i),(0,r.useCallback)((e=>{if(!i)return;const n=new URLSearchParams(s.location.search);n.set(i,e),s.replace({...s.location,search:n.toString()})}),[i,s])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,i=u(e),[a,l]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:i}))),[c,h]=f({queryString:t,groupId:s}),[b,x]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,i]=(0,d.Dv)(t);return[s,(0,r.useCallback)((e=>{t&&i.set(e)}),[t,i])]}({groupId:s}),j=(()=>{const e=c??b;return p({value:e,tabValues:i})?e:null})();(0,o.A)((()=>{j&&l(j)}),[j]);return{selectedValue:a,selectValue:(0,r.useCallback)((e=>{if(!p({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);l(e),h(e),x(e)}),[h,x,i]),tabValues:i}}var x=t(92303);const j={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function m(e){let{className:n,block:t,selectedValue:r,selectValue:a,tabValues:o}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.a_)(),d=e=>{const n=e.currentTarget,t=l.indexOf(n),s=o[t].value;s!==r&&(c(n),a(s))},h=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:o.map((e=>{let{value:n,label:t,attributes:i}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>l.push(e),onKeyDown:h,onClick:d,...i,className:(0,s.A)("tabs__item",j.tabItem,i?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function v(e){let{lazy:n,children:t,selectedValue:i}=e;const a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===i));return e?(0,r.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==i})))})}function w(e){const n=b(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",j.tabList),children:[(0,g.jsx)(m,{...n,...e}),(0,g.jsx)(v,{...n,...e})]})}function k(e){const n=(0,x.A)();return(0,g.jsx)(w,{...e,children:h(e.children)},String(n))}},14739:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/EnodeStartup-145939e1c789c28e464db82faa0fb3ca.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var r=t(96540);const s={},i=r.createContext(s);function a(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9bb932b9.2395ad2a.js b/assets/js/9bb932b9.2395ad2a.js new file mode 100644 index 00000000000..2d374b6c73f --- /dev/null +++ b/assets/js/9bb932b9.2395ad2a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1589],{65463:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>a,contentTitle:()=>i,default:()=>u,frontMatter:()=>s,metadata:()=>l,toc:()=>d});var n=o(74848),r=o(28453);const s={title:"Deploy to the cloud",sidebar_position:1,description:"Deploying Besu to the cloud",tags:["private networks"]},i="Deploy Besu to the cloud",l={id:"private-networks/how-to/deploy/cloud",title:"Deploy to the cloud",description:"Deploying Besu to the cloud",source:"@site/docs/private-networks/how-to/deploy/cloud.md",sourceDirName:"private-networks/how-to/deploy",slug:"/private-networks/how-to/deploy/cloud",permalink:"/private-networks/how-to/deploy/cloud",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/deploy/cloud.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Deploy to the cloud",sidebar_position:1,description:"Deploying Besu to the cloud",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use onchain permissioning",permalink:"/private-networks/how-to/use-permissioning/onchain"},next:{title:"Use Ansible",permalink:"/private-networks/how-to/deploy/ansible"}},a={},d=[];function c(e){const t={a:"a",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"deploy-besu-to-the-cloud",children:"Deploy Besu to the cloud"})}),"\n",(0,n.jsx)(t.p,{children:"When deploying Besu to the cloud:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Ensure you have enough spread across Availability Zones (AZs) and Regions, especially for bootnodes and validators."}),"\n",(0,n.jsx)(t.li,{children:"If your network is a multi-region network, consider using VPC Peering to reduce latency."}),"\n",(0,n.jsx)(t.li,{children:"Where required, use VPNs to connect to your on premise systems, or single private chains."}),"\n",(0,n.jsxs)(t.li,{children:["If deploying to Kubernetes, please refer to the ",(0,n.jsx)(t.a,{href:"/private-networks/tutorials/kubernetes/",children:"tutorial"}),"."]}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(c,{...e})}):c(e)}},28453:(e,t,o)=>{o.d(t,{R:()=>i,x:()=>l});var n=o(96540);const r={},s=n.createContext(r);function i(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/9ffeb22a.aaaf724c.js b/assets/js/9ffeb22a.aaaf724c.js new file mode 100644 index 00000000000..b1664557219 --- /dev/null +++ b/assets/js/9ffeb22a.aaaf724c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[9334],{55847:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>l,metadata:()=>u,toc:()=>d});var r=t(74848),s=t(28453),o=t(11470),a=t(19365);const l={title:"Consensus protocols",description:"Besu consensus protocols",sidebar_position:1,tags:["private networks"]},i="Consensus protocols",u={id:"private-networks/how-to/configure/consensus/index",title:"Consensus protocols",description:"Besu consensus protocols",source:"@site/docs/private-networks/how-to/configure/consensus/index.md",sourceDirName:"private-networks/how-to/configure/consensus",slug:"/private-networks/how-to/configure/consensus/",permalink:"/private-networks/how-to/configure/consensus/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/configure/consensus/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Consensus protocols",description:"Besu consensus protocols",sidebar_position:1,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"How to",permalink:"/private-networks/how-to/"},next:{title:"QBFT",permalink:"/private-networks/how-to/configure/consensus/qbft"}},c={},d=[];function p(e){const n={a:"a",code:"code",h1:"h1",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"consensus-protocols",children:"Consensus protocols"})}),"\n",(0,r.jsx)(n.p,{children:"Besu supports the following consensus protocols:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft",children:"QBFT"})," (proof of authority) - The recommended enterprise-grade consensus protocol for private networks."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft",children:"IBFT 2.0"})," (proof of authority) - Supported for existing private networks."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/clique",children:"Clique"})," (proof of authority) - Not recommended for production use."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"/public-networks/concepts/proof-of-stake/",children:"Proof of stake"})," - Used on Ethereum Mainnet and public testnets."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.a,{href:"https://ethereum.org/en/developers/docs/consensus-mechanisms/pow/",children:"Ethash"})," (proof of work) - Can be used in ",(0,r.jsx)(n.a,{href:"/private-networks/tutorials/ethash",children:"small development networks"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["See a ",(0,r.jsx)(n.a,{href:"/private-networks/concepts/poa",children:"comparison of the proof of authority consensus protocols"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"config"})," property in the genesis file specifies the consensus protocol for a chain."]}),"\n",(0,r.jsxs)(o.A,{children:[(0,r.jsx)(a.A,{value:"Ethash",label:"Ethash",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "ethash": {\n ...\n }\n },\n ...\n}\n'})})}),(0,r.jsx)(a.A,{value:"Clique",label:"Clique",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "clique": {\n ...\n }\n },\n ...\n}\n'})})}),(0,r.jsx)(a.A,{value:"IBFT 2.0",label:"IBFT 2.0",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "ibft2": {\n ...\n }\n },\n ...\n}\n'})})}),(0,r.jsx)(a.A,{value:"QBFT",label:"QBFT",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n ...\n }\n },\n ...\n}\n'})})})]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>a});t(96540);var r=t(18215);const s={tabItem:"tabItem_Ymn6"};var o=t(74848);function a(e){let{children:n,hidden:t,className:a}=e;return(0,o.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,a),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>k});var r=t(96540),s=t(18215),o=t(23104),a=t(56347),l=t(205),i=t(57485),u=t(31682),c=t(70679);function d(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:s}}=e;return{value:n,label:t,attributes:r,default:s}}))}(t);return function(e){const n=(0,u.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function h(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:t}=e;const s=(0,a.W6)(),o=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,i.aZ)(o),(0,r.useCallback)((e=>{if(!o)return;const n=new URLSearchParams(s.location.search);n.set(o,e),s.replace({...s.location,search:n.toString()})}),[o,s])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,o=p(e),[a,i]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!h({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:o}))),[u,d]=f({queryString:t,groupId:s}),[b,m]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,o]=(0,c.Dv)(t);return[s,(0,r.useCallback)((e=>{t&&o.set(e)}),[t,o])]}({groupId:s}),v=(()=>{const e=u??b;return h({value:e,tabValues:o})?e:null})();(0,l.A)((()=>{v&&i(v)}),[v]);return{selectedValue:a,selectValue:(0,r.useCallback)((e=>{if(!h({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),d(e),m(e)}),[d,m,o]),tabValues:o}}var m=t(92303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function w(e){let{className:n,block:t,selectedValue:r,selectValue:a,tabValues:l}=e;const i=[],{blockElementScrollPositionUntilNextRender:u}=(0,o.a_)(),c=e=>{const n=e.currentTarget,t=i.indexOf(n),s=l[t].value;s!==r&&(u(n),a(s))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const t=i.indexOf(e.currentTarget)+1;n=i[t]??i[0];break}case"ArrowLeft":{const t=i.indexOf(e.currentTarget)-1;n=i[t]??i[i.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:l.map((e=>{let{value:n,label:t,attributes:o}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>i.push(e),onKeyDown:d,onClick:c,...o,className:(0,s.A)("tabs__item",v.tabItem,o?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function x(e){let{lazy:n,children:t,selectedValue:o}=e;const a=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=a.find((e=>e.props.value===o));return e?(0,r.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:a.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==o})))})}function j(e){const n=b(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",v.tabList),children:[(0,g.jsx)(w,{...n,...e}),(0,g.jsx)(x,{...n,...e})]})}function k(e){const n=(0,m.A)();return(0,g.jsx)(j,{...e,children:d(e.children)},String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>l});var r=t(96540);const s={},o=r.createContext(s);function a(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a0f949fc.3514adf5.js b/assets/js/a0f949fc.3514adf5.js new file mode 100644 index 00000000000..e0e2e081999 --- /dev/null +++ b/assets/js/a0f949fc.3514adf5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8587],{48098:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>h});var l=s(74848),a=s(28453),r=s(11470),t=s(19365);const i={title:"Subcommands",description:"Besu command line interface subcommands",sidebar_position:2,tags:["public networks","private networks"]},o="Subcommands",c={id:"public-networks/reference/cli/subcommands",title:"Subcommands",description:"Besu command line interface subcommands",source:"@site/docs/public-networks/reference/cli/subcommands.md",sourceDirName:"public-networks/reference/cli",slug:"/public-networks/reference/cli/subcommands",permalink:"/public-networks/reference/cli/subcommands",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/reference/cli/subcommands.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Subcommands",description:"Besu command line interface subcommands",sidebar_position:2,tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Options",permalink:"/public-networks/reference/cli/options"},next:{title:"Besu API",permalink:"/public-networks/reference/api/"}},d={},h=[{value:"blocks",id:"blocks",level:2},{value:"import",id:"import",level:3},{value:"export",id:"export",level:3},{value:"operator",id:"operator",level:2},{value:"generate-log-bloom-cache",id:"generate-log-bloom-cache",level:3},{value:"password",id:"password",level:2},{value:"hash",id:"hash",level:3},{value:"public-key",id:"public-key",level:2},{value:"export",id:"export-1",level:3},{value:"export-address",id:"export-address",level:3},{value:"retesteth",id:"retesteth",level:2},{value:"storage",id:"storage",level:2},{value:"revert-metadata",id:"revert-metadata",level:3},{value:"revert-variables",id:"revert-variables",level:3},{value:"rocksdb usage",id:"rocksdb-usage",level:3},{value:"trie-log",id:"trie-log",level:3},{value:"count",id:"count",level:4},{value:"prune",id:"prune",level:4},{value:"validate-config",id:"validate-config",level:2}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.header,{children:(0,l.jsx)(n.h1,{id:"subcommands",children:"Subcommands"})}),"\n",(0,l.jsx)(n.p,{children:"This reference describes the syntax of the Besu command line interface (CLI) subcommands."}),"\n",(0,l.jsx)(n.admonition,{type:"note",children:(0,l.jsxs)(n.p,{children:["This reference contains subcommands that apply to both public and private networks. For private-network-specific subcommands, see the ",(0,l.jsx)(n.a,{href:"/private-networks/reference/cli/subcommands",children:"private network subcommands reference"}),"."]})}),"\n",(0,l.jsx)(n.p,{children:"To start a Besu node using subcommands, run:"}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu [OPTIONS] [SUBCOMMAND] [SUBCOMMAND OPTIONS]\n"})}),"\n",(0,l.jsx)(n.p,{children:"If using Bash or Z shell, you can view subcommand suggestions by pressing the Tab key twice."}),"\n",(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu Tab+Tab\n"})}),"\n",(0,l.jsx)(n.h2,{id:"blocks",children:(0,l.jsx)(n.code,{children:"blocks"})}),"\n",(0,l.jsx)(n.p,{children:"Provides blocks related actions."}),"\n",(0,l.jsx)(n.h3,{id:"import",children:(0,l.jsx)(n.code,{children:"import"})}),"\n",(0,l.jsxs)(r.A,{children:[(0,l.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu blocks import [--skip-pow-validation-enabled] [--start-block=] [--end-block=] --from=\n"})})}),(0,l.jsx)(t.A,{value:"Example",label:"Example",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu blocks import --skip-pow-validation-enabled --start-block=100 --end-block=300 --from=/home/me/me_project/mainnet-export1.blocks --from=/home/me/me_project/mainnet-export2.blocks\n"})})})]}),"\n",(0,l.jsx)(n.p,{children:"Imports a block or range of blocks from the specified file into the blockchain database."}),"\n",(0,l.jsxs)(n.p,{children:["You can specify the starting index of the block range to import with ",(0,l.jsx)(n.code,{children:"--start-block"}),". If omitted, the default start block is 0 (the beginning of the chain)."]}),"\n",(0,l.jsxs)(n.p,{children:["You can specify the ending index (exclusive) of the block range to import with ",(0,l.jsx)(n.code,{children:"--end-block"}),". If omitted, all blocks after the start block are imported."]}),"\n",(0,l.jsxs)(n.p,{children:["You can specify multiple ",(0,l.jsx)(n.code,{children:"--from"})," arguments. This can be useful when blocks have been exported over time to multiple files. If multiple files are provided they are read in the order specified in the command."]}),"\n",(0,l.jsxs)(n.p,{children:["Including ",(0,l.jsx)(n.code,{children:"--skip-pow-validation-enabled"})," skips validation of the ",(0,l.jsx)(n.code,{children:"mixHash"})," when importing blocks."]}),"\n",(0,l.jsx)(n.admonition,{type:"note",children:(0,l.jsxs)(n.p,{children:["Use ",(0,l.jsx)(n.code,{children:"--skip-pow-validation-enabled"})," when performing ",(0,l.jsx)(n.a,{href:"https://github.com/ethereum/hive",children:"Ethereum Foundation hive testing"}),"."]})}),"\n",(0,l.jsx)(n.h3,{id:"export",children:(0,l.jsx)(n.code,{children:"export"})}),"\n",(0,l.jsxs)(r.A,{children:[(0,l.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu blocks export [--start-block=] [--end-block=] --to=\n"})})}),(0,l.jsx)(t.A,{value:"Example",label:"Example",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --network=holesky --data-path=/home/data/ blocks export --start-block=100 --end-block=300 --to=/home/exportblock.bin\n"})})})]}),"\n",(0,l.jsx)(n.p,{children:"Exports a block or range of blocks from storage to a file in RLP format."}),"\n",(0,l.jsxs)(n.p,{children:["If you omit ",(0,l.jsx)(n.code,{children:"--start-block"}),", the default start block is 0 (the beginning of the chain), and if you omit ",(0,l.jsx)(n.code,{children:"--end-block"}),", the default end block is the current chain head."]}),"\n",(0,l.jsxs)(n.p,{children:["If you are not running the command against the default network (Mainnet), specify the ",(0,l.jsx)(n.code,{children:"--network"})," or ",(0,l.jsx)(n.code,{children:"--genesis-file"})," parameter."]}),"\n",(0,l.jsx)(n.h2,{id:"operator",children:(0,l.jsx)(n.code,{children:"operator"})}),"\n",(0,l.jsx)(n.p,{children:"Provides operator actions."}),"\n",(0,l.jsx)(n.h3,{id:"generate-log-bloom-cache",children:(0,l.jsx)(n.code,{children:"generate-log-bloom-cache"})}),"\n",(0,l.jsxs)(r.A,{children:[(0,l.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu operator generate-log-bloom-cache [--start-block=] [--end-block=]\n"})})}),(0,l.jsx)(t.A,{value:"Example",label:"Example",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --network=holesky --data-path=/project/holesky operator generate-log-bloom-cache --start-block=0 --end-block=100000\n"})})})]}),"\n",(0,l.jsx)(n.admonition,{type:"tip",children:(0,l.jsxs)(n.p,{children:["Manually executing ",(0,l.jsx)(n.code,{children:"generate-log-bloom-cache"})," is not required unless you set the ",(0,l.jsx)(n.a,{href:"/public-networks/reference/cli/options#auto-log-bloom-caching-enabled",children:(0,l.jsx)(n.code,{children:"--auto-log-bloom-caching-enabled"})})," command line option to false."]})}),"\n",(0,l.jsx)(n.p,{children:"Generates cached log bloom indexes for blocks. APIs use the cached indexes for improved log query performance."}),"\n",(0,l.jsx)(n.admonition,{type:"note",children:(0,l.jsx)(n.p,{children:"Each index file contains 100000 blocks. The last fragment of blocks less that 100000 are not indexed."})}),"\n",(0,l.jsxs)(n.p,{children:["To generate cached log bloom indexes while the node is running, use the ",(0,l.jsx)(n.a,{href:"/public-networks/reference/api/#admin_generatelogbloomcache",children:(0,l.jsx)(n.code,{children:"admin_generateLogBloomCache"})})," API."]}),"\n",(0,l.jsx)(n.h2,{id:"password",children:(0,l.jsx)(n.code,{children:"password"})}),"\n",(0,l.jsx)(n.p,{children:"Provides password related actions."}),"\n",(0,l.jsx)(n.h3,{id:"hash",children:(0,l.jsx)(n.code,{children:"hash"})}),"\n",(0,l.jsxs)(r.A,{children:[(0,l.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu password hash --password=\n"})})}),(0,l.jsx)(t.A,{value:"Example",label:"Example",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu password hash --password=myPassword123\n"})})})]}),"\n",(0,l.jsxs)(n.p,{children:["Generates the hash of a given password. Include the hash in the ",(0,l.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate#credentials-file",children:"credentials file"})," for JSON-RPC API ",(0,l.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/authenticate",children:"authentication"}),"."]}),"\n",(0,l.jsx)(n.h2,{id:"public-key",children:(0,l.jsx)(n.code,{children:"public-key"})}),"\n",(0,l.jsx)(n.p,{children:"Provides node public key related actions."}),"\n",(0,l.jsx)(n.admonition,{type:"caution",children:(0,l.jsxs)(n.p,{children:["To get the public key or address of a node, ensure you use the ",(0,l.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,l.jsx)(n.code,{children:"--data-path"})})," or ",(0,l.jsx)(n.a,{href:"/public-networks/reference/cli/options#node-private-key-file",children:(0,l.jsx)(n.code,{children:"--node-private-key-file"})})," option with the ",(0,l.jsx)(n.code,{children:"public-key"})," command. Otherwise, a new ",(0,l.jsx)(n.a,{href:"/public-networks/concepts/node-keys",children:"node key"})," is silently generated when starting Besu."]})}),"\n",(0,l.jsx)(n.h3,{id:"export-1",children:(0,l.jsx)(n.code,{children:"export"})}),"\n",(0,l.jsxs)(r.A,{children:[(0,l.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu public-key export [--node-private-key-file=] [--to=] [--ec-curve=]\n"})})}),(0,l.jsx)(t.A,{value:"Example to standard output",label:"Example (to standard output)",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --data-path= public-key export --node-private-key-file=/home/me/me_node/myPrivateKey --ec-curve=secp256k1\n"})})}),(0,l.jsx)(t.A,{value:"Example to file",label:"Example (to file)",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --data-path= public-key export --node-private-key-file=/home/me/me_node/myPrivateKey --to=/home/me/me_project/not_precious_pub_key --ec-curve=secp256k1\n"})})})]}),"\n",(0,l.jsxs)(n.p,{children:["Outputs the node public key to standard output or to the file specified by ",(0,l.jsx)(n.code,{children:"--to="}),". You can output the public key associated with a specific private key file using the ",(0,l.jsx)(n.a,{href:"/public-networks/reference/cli/options#node-private-key-file",children:(0,l.jsx)(n.code,{children:"--node-private-key-file"})})," option. The default elliptic curve used for the key is ",(0,l.jsx)(n.code,{children:"secp256k1"}),". Use the ",(0,l.jsx)(n.code,{children:"--ec-curve"})," option to choose between ",(0,l.jsx)(n.code,{children:"secp256k1"})," or ",(0,l.jsx)(n.code,{children:"secp256r1"}),"."]}),"\n",(0,l.jsx)(n.h3,{id:"export-address",children:(0,l.jsx)(n.code,{children:"export-address"})}),"\n",(0,l.jsxs)(r.A,{children:[(0,l.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu public-key export-address [--node-private-key-file=] [--to=] [--ec-curve=]\n"})})}),(0,l.jsx)(t.A,{value:"Example to standard output",label:"Example (to standard output)",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --data-path= public-key export-address --node-private-key-file=/home/me/me_node/myPrivateKey --ec-curve=secp256k1\n"})})}),(0,l.jsx)(t.A,{value:"Example to file",label:"Example (to file)",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --data-path= public-key export-address --node-private-key-file=/home/me/me_node/myPrivateKey --to=/home/me/me_project/me_node_address --ec-curve=secp256k1\n"})})})]}),"\n",(0,l.jsxs)(n.p,{children:["Outputs the node address to standard output or to the file specified by ",(0,l.jsx)(n.code,{children:"--to="}),". You can output the address associated with a specific private key file using the ",(0,l.jsx)(n.a,{href:"/public-networks/reference/cli/options#node-private-key-file",children:(0,l.jsx)(n.code,{children:"--node-private-key-file"})})," option. The default elliptic curve used for the key is ",(0,l.jsx)(n.code,{children:"secp256k1"}),". Use the ",(0,l.jsx)(n.code,{children:"--ec-curve"})," option to choose between ",(0,l.jsx)(n.code,{children:"secp256k1"})," or ",(0,l.jsx)(n.code,{children:"secp256r1"}),"."]}),"\n",(0,l.jsx)(n.h2,{id:"retesteth",children:(0,l.jsx)(n.code,{children:"retesteth"})}),"\n",(0,l.jsxs)(r.A,{children:[(0,l.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu retesteth [--data-path=] [--rpc-http-host=] [--rpc-http-port=] [-l=] [--host-allowlist=[,\u2026]\u2026 or * or all]\n"})})}),(0,l.jsx)(t.A,{value:"Example",label:"Example",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu retesteth --data-path=/home/me/me_node --rpc-http-port=8590 --host-allowlist=*\n"})})})]}),"\n",(0,l.jsxs)(n.p,{children:["Runs a Retesteth-compatible server. ",(0,l.jsx)(n.a,{href:"https://github.com/ethereum/retesteth/wiki",children:"Retesteth"})," is a developer tool that can generate and run consensus tests against any Ethereum client running such a server."]}),"\n",(0,l.jsx)(n.p,{children:"The command accepts the following command line options:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,l.jsx)(n.code,{children:"--data-path"})})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.a,{href:"/public-networks/reference/cli/options#host-allowlist",children:(0,l.jsx)(n.code,{children:"--host-allowlist"})})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-host",children:(0,l.jsx)(n.code,{children:"--rpc-http-host"})})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,l.jsx)(n.code,{children:"--rpc-http-port"})})}),"\n",(0,l.jsx)(n.li,{children:(0,l.jsx)(n.a,{href:"/public-networks/reference/cli/options#logging",children:(0,l.jsx)(n.code,{children:"--logging"})})}),"\n"]}),"\n",(0,l.jsx)(n.h2,{id:"storage",children:(0,l.jsx)(n.code,{children:"storage"})}),"\n",(0,l.jsx)(n.p,{children:"Provides storage related actions."}),"\n",(0,l.jsx)(n.h3,{id:"revert-metadata",children:(0,l.jsx)(n.code,{children:"revert-metadata"})}),"\n",(0,l.jsx)(r.A,{children:(0,l.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu storage revert-metadata v2-to-v1\n"})})})}),"\n",(0,l.jsxs)(n.p,{children:["Reverts the modifications made by the ",(0,l.jsx)(n.a,{href:"https://github.com/hyperledger/besu/pull/6555",children:"database metadata refactor"}),".\nIf you need to downgrade Besu, run this subcommand before installing the previous binaries."]}),"\n",(0,l.jsx)(n.h3,{id:"revert-variables",children:(0,l.jsx)(n.code,{children:"revert-variables"})}),"\n",(0,l.jsxs)(r.A,{children:[(0,l.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --config-file storage revert-variables\n"})})}),(0,l.jsx)(t.A,{value:"Example",label:"Example",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --config-file config.toml storage revert-variables\n"})})})]}),"\n",(0,l.jsxs)(n.p,{children:["Reverts the modifications made by the ",(0,l.jsx)(n.a,{href:"https://github.com/hyperledger/besu/pull/5471",children:"variables storage feature"}),".\nIf you need to downgrade Besu, first run this subcommand specifying the path to\nthe ",(0,l.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/",children:"configuration file"})," normally used to\nstart Besu."]}),"\n",(0,l.jsx)(n.h3,{id:"rocksdb-usage",children:(0,l.jsx)(n.code,{children:"rocksdb usage"})}),"\n",(0,l.jsxs)(r.A,{children:[(0,l.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --config-file storage rocksdb usage\n"})})}),(0,l.jsx)(t.A,{value:"Example",label:"Example",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --config-file config.toml storage rocksdb usage\n"})})}),(0,l.jsx)(t.A,{value:"Example output",label:"Example output",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"|--------------------------------|-----------------|-------------|-----------------|------------------|\n| Column Family | Keys | Total Size | SST Files Size | Blob Files Size |\n|--------------------------------|-----------------|-------------|-----------------|------------------|\n| BLOCKCHAIN | 2355141414 | 933 GiB | 166 GiB | 767 GiB |\n| VARIABLES | 26 | 240 KiB | 240 KiB | 0 B |\n| ACCOUNT_INFO_STATE | 9634454 | 496 MiB | 496 MiB | 0 B |\n| ACCOUNT_STORAGE_STORAGE | 24041432 | 1 GiB | 1 GiB | 0 B |\n| CODE_STORAGE | 37703864 | 12 GiB | 12 GiB | 0 B |\n| TRIE_BRANCH_STORAGE | 1885032116 | 138 GiB | 138 GiB | 0 B |\n| TRIE_LOG_STORAGE | 267301 | 17 GiB | 17 GiB | 0 B |\n|--------------------------------|-----------------|-------------|-----------------|------------------|\n| ESTIMATED TOTAL | 4311820607 | 1104 GiB | 337 GiB | 767 GiB |\n|--------------------------------|-----------------|-------------|-----------------|------------------|\n"})})})]}),"\n",(0,l.jsx)(n.p,{children:"Displays the disk space used by the RocksDB key-value database, categorized into column families."}),"\n",(0,l.jsx)(n.h3,{id:"trie-log",children:(0,l.jsx)(n.code,{children:"trie-log"})}),"\n",(0,l.jsx)(n.p,{children:"Provides actions related to managing, recording, and logging changes for the Bonsai Trie data."}),"\n",(0,l.jsx)(n.h4,{id:"count",children:(0,l.jsx)(n.code,{children:"count"})}),"\n",(0,l.jsxs)(r.A,{children:[(0,l.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --config-file storage trie-log count\n"})})}),(0,l.jsx)(t.A,{value:"Example",label:"Example",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --config-file config.toml storage trie-log count\n"})})}),(0,l.jsx)(t.A,{value:"Example output",label:"Example output",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"trieLog count: 742311\n - canonical count: 681039\n - fork count: 217\n - orphaned count: 61055\n"})})})]}),"\n",(0,l.jsxs)(n.p,{children:["Displays the number of trie logs in the database.\nThis is the number of keys for the ",(0,l.jsx)(n.code,{children:"TRIE_LOG_STORAGE"})," ",(0,l.jsx)(n.a,{href:"#rocksdb-usage",children:"column family in RocksDB"}),".\nThe following are specified in the ",(0,l.jsx)(n.code,{children:"trieLog count"}),":"]}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"canonical count"})," represents the finalized blockchain."]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"fork count"})," represents non-finalized branches of the blockchain."]}),"\n",(0,l.jsxs)(n.li,{children:[(0,l.jsx)(n.code,{children:"orphaned count"})," represents trie logs not in the blockchain, which can occur during block creation."]}),"\n"]}),"\n",(0,l.jsx)(n.h4,{id:"prune",children:(0,l.jsx)(n.code,{children:"prune"})}),"\n",(0,l.jsxs)(r.A,{children:[(0,l.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --config-file storage trie-log prune\n"})})}),(0,l.jsx)(t.A,{value:"Example",label:"Example",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --config-file config.toml storage trie-log prune\n"})})}),(0,l.jsx)(t.A,{value:"Example setting retention limit",label:"Example setting retention limit",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu --config-file config.toml --bonsai-historical-block-limit=1024 storage trie-log prune\n"})})})]}),"\n",(0,l.jsxs)(n.p,{children:["Removes all trie log layers below the specified retention limit, including orphaned trie logs.\nYou can configure the retention limit using ",(0,l.jsx)(n.a,{href:"/public-networks/reference/cli/options#bonsai-historical-block-limit",children:(0,l.jsx)(n.code,{children:"--bonsai-historical-block-limit"})}),".\nThe retention limit should match the configuration used with ",(0,l.jsx)(n.a,{href:"/public-networks/reference/cli/options#bonsai-limit-trie-logs-enabled",children:(0,l.jsx)(n.code,{children:"--bonsai-limit-trie-logs-enabled"})}),".\nThe default limit is ",(0,l.jsx)(n.code,{children:"512"}),"."]}),"\n",(0,l.jsx)(n.h2,{id:"validate-config",children:(0,l.jsx)(n.code,{children:"validate-config"})}),"\n",(0,l.jsxs)(r.A,{children:[(0,l.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu validate-config --config-file \n"})})}),(0,l.jsx)(t.A,{value:"Example",label:"Example",children:(0,l.jsx)(n.pre,{children:(0,l.jsx)(n.code,{className:"language-bash",children:"besu validate-config --config-file config.toml\n"})})})]}),"\n",(0,l.jsxs)(n.p,{children:["Performs basic syntax validation of the specified ",(0,l.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/",children:"configuration file"}),". Checks TOML syntax (for example, valid format and unmatched quotes) and flags unknown options. Doesn't check data types, and doesn't check dependencies between options (this is done at Besu startup)."]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(u,{...e})}):u(e)}},19365:(e,n,s)=>{s.d(n,{A:()=>t});s(96540);var l=s(18215);const a={tabItem:"tabItem_Ymn6"};var r=s(74848);function t(e){let{children:n,hidden:s,className:t}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,l.A)(a.tabItem,t),hidden:s,children:n})}},11470:(e,n,s)=>{s.d(n,{A:()=>y});var l=s(96540),a=s(18215),r=s(23104),t=s(56347),i=s(205),o=s(57485),c=s(31682),d=s(70679);function h(e){return l.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,l.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function u(e){const{values:n,children:s}=e;return(0,l.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:s,attributes:l,default:a}}=e;return{value:n,label:s,attributes:l,default:a}}))}(s);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,s])}function p(e){let{value:n,tabValues:s}=e;return s.some((e=>e.value===n))}function x(e){let{queryString:n=!1,groupId:s}=e;const a=(0,t.W6)(),r=function(e){let{queryString:n=!1,groupId:s}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return s??null}({queryString:n,groupId:s});return[(0,o.aZ)(r),(0,l.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(a.location.search);n.set(r,e),a.replace({...a.location,search:n.toString()})}),[r,a])]}function b(e){const{defaultValue:n,queryString:s=!1,groupId:a}=e,r=u(e),[t,o]=(0,l.useState)((()=>function(e){let{defaultValue:n,tabValues:s}=e;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:s}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${s.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const l=s.find((e=>e.default))??s[0];if(!l)throw new Error("Unexpected error: 0 tabValues");return l.value}({defaultValue:n,tabValues:r}))),[c,h]=x({queryString:s,groupId:a}),[b,m]=function(e){let{groupId:n}=e;const s=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,r]=(0,d.Dv)(s);return[a,(0,l.useCallback)((e=>{s&&r.set(e)}),[s,r])]}({groupId:a}),f=(()=>{const e=c??b;return p({value:e,tabValues:r})?e:null})();(0,i.A)((()=>{f&&o(f)}),[f]);return{selectedValue:t,selectValue:(0,l.useCallback)((e=>{if(!p({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);o(e),h(e),m(e)}),[h,m,r]),tabValues:r}}var m=s(92303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=s(74848);function g(e){let{className:n,block:s,selectedValue:l,selectValue:t,tabValues:i}=e;const o=[],{blockElementScrollPositionUntilNextRender:c}=(0,r.a_)(),d=e=>{const n=e.currentTarget,s=o.indexOf(n),a=i[s].value;a!==l&&(c(n),t(a))},h=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const s=o.indexOf(e.currentTarget)+1;n=o[s]??o[0];break}case"ArrowLeft":{const s=o.indexOf(e.currentTarget)-1;n=o[s]??o[o.length-1];break}}n?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":s},n),children:i.map((e=>{let{value:n,label:s,attributes:r}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:l===n?0:-1,"aria-selected":l===n,ref:e=>o.push(e),onKeyDown:h,onClick:d,...r,className:(0,a.A)("tabs__item",f.tabItem,r?.className,{"tabs__item--active":l===n}),children:s??n},n)}))})}function v(e){let{lazy:n,children:s,selectedValue:r}=e;const t=(Array.isArray(s)?s:[s]).filter(Boolean);if(n){const e=t.find((e=>e.props.value===r));return e?(0,l.cloneElement)(e,{className:(0,a.A)("margin-top--md",e.props.className)}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:t.map(((e,n)=>(0,l.cloneElement)(e,{key:n,hidden:e.props.value!==r})))})}function k(e){const n=b(e);return(0,j.jsxs)("div",{className:(0,a.A)("tabs-container",f.tabList),children:[(0,j.jsx)(g,{...n,...e}),(0,j.jsx)(v,{...n,...e})]})}function y(e){const n=(0,m.A)();return(0,j.jsx)(k,{...e,children:h(e.children)},String(n))}},28453:(e,n,s)=>{s.d(n,{R:()=>t,x:()=>i});var l=s(96540);const a={},r=l.createContext(a);function t(e){const n=l.useContext(r);return l.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:t(e.components),l.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a2bd30e6.7e3cceb2.js b/assets/js/a2bd30e6.7e3cceb2.js new file mode 100644 index 00000000000..c6bdb206742 --- /dev/null +++ b/assets/js/a2bd30e6.7e3cceb2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6792],{37416:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>p,contentTitle:()=>t,default:()=>g,frontMatter:()=>o,metadata:()=>c,toc:()=>a});var s=i(74848),r=i(28453);const o={title:"Permissioning plugin",description:"Plugin based permissioning",sidebar_position:2,tags:["private networks"]},t="Permissioning plugin",c={id:"private-networks/concepts/permissioning/plugin",title:"Permissioning plugin",description:"Plugin based permissioning",source:"@site/docs/private-networks/concepts/permissioning/plugin.md",sourceDirName:"private-networks/concepts/permissioning",slug:"/private-networks/concepts/permissioning/plugin",permalink:"/private-networks/concepts/permissioning/plugin",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/concepts/permissioning/plugin.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Permissioning plugin",description:"Plugin based permissioning",sidebar_position:2,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Onchain permissioning",permalink:"/private-networks/concepts/permissioning/onchain"},next:{title:"Node synchronization",permalink:"/private-networks/concepts/node-sync-private"}},p={},a=[{value:"Connection permissioning",id:"connection-permissioning",level:2},{value:"Message permissioning",id:"message-permissioning",level:2},{value:"Register your plugin",id:"register-your-plugin",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"permissioning-plugin",children:"Permissioning plugin"})}),"\n",(0,s.jsxs)(n.p,{children:["You can define complex ",(0,s.jsx)(n.a,{href:"/private-networks/concepts/permissioning/",children:"permissioning"})," solutions by building a plugin that extends Besu functionality."]}),"\n",(0,s.jsxs)(n.p,{children:["The plugin API provides a ",(0,s.jsx)(n.code,{children:"PermissioningService"})," interface that currently supports connection permissioning and message permissioning."]}),"\n",(0,s.jsx)(n.h2,{id:"connection-permissioning",children:"Connection permissioning"}),"\n",(0,s.jsx)(n.p,{children:"Use connection permissioning when deciding whether to restrict node access to known participants only."}),"\n",(0,s.jsx)(n.h2,{id:"message-permissioning",children:"Message permissioning"}),"\n",(0,s.jsx)(n.p,{children:"Use message permissioning to propagate different types of devP2P messages to particular nodes. For example, this can be used to prevent pending transactions from being forwarded to other nodes."}),"\n",(0,s.jsx)(n.h2,{id:"register-your-plugin",children:"Register your plugin"}),"\n",(0,s.jsxs)(n.p,{children:["To enable permissioning in your plugin, implement the ",(0,s.jsx)(n.code,{children:"PermissioningService"})," interface and register your providers."]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-java",children:"@AutoService(BesuPlugin.class)\npublic class TestPermissioningPlugin implements BesuPlugin {\n PermissioningService service;\n @Override\n public void register(final BesuContext context) {\n service = context.getService(PermissioningService.class).get();\n }\n @Override\n public void start() {\n service.registerNodePermissioningProvider((sourceEnode, destinationEnode) -> {\n // perform logic for node permissioning\n return true;\n });\n service.registerNodeMessagePermissioningProvider((destinationEnode, code) -> {\n // perform logic for message permissioning\n return true;\n });\n }\n @Override\n public void stop() {}\n}\n"})})]})}function g(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>t,x:()=>c});var s=i(96540);const r={},o=s.createContext(r);function t(e){const n=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:t(e.components),s.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a626427b.792d2e8a.js b/assets/js/a626427b.792d2e8a.js new file mode 100644 index 00000000000..1d74f1614f0 --- /dev/null +++ b/assets/js/a626427b.792d2e8a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[779],{70459:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>d,frontMatter:()=>r,metadata:()=>o,toc:()=>c});var s=n(74848),a=n(28453);const r={title:"Maintenance",sidebar_position:5,description:"Maintenance for Besu on a Kubernetes cluster",tags:["private networks"]},i="Maintenance",o={id:"private-networks/tutorials/kubernetes/maintenance",title:"Maintenance",description:"Maintenance for Besu on a Kubernetes cluster",source:"@site/docs/private-networks/tutorials/kubernetes/maintenance.md",sourceDirName:"private-networks/tutorials/kubernetes",slug:"/private-networks/tutorials/kubernetes/maintenance",permalink:"/private-networks/tutorials/kubernetes/maintenance",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/kubernetes/maintenance.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:5,frontMatter:{title:"Maintenance",sidebar_position:5,description:"Maintenance for Besu on a Kubernetes cluster",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use the Quorum Explorer",permalink:"/private-networks/tutorials/kubernetes/quorum-explorer"},next:{title:"Production",permalink:"/private-networks/tutorials/kubernetes/production"}},l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Update a persistent volume claim size",id:"update-a-persistent-volume-claim-size",level:2},{value:"Update Besu versions",id:"update-besu-versions",level:2}];function u(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"maintenance",children:"Maintenance"})}),"\n",(0,s.jsx)(t.p,{children:"You can perform maintenance for Besu on a Kubernetes cluster."}),"\n",(0,s.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["Clone the ",(0,s.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-kubernetes",children:"Quorum-Kubernetes"})," repository"]}),"\n",(0,s.jsxs)(t.li,{children:["A ",(0,s.jsx)(t.a,{href:"/private-networks/tutorials/kubernetes/cluster",children:"running Kubernetes cluster"})," with a ",(0,s.jsx)(t.a,{href:"/private-networks/tutorials/kubernetes/charts",children:"network"})]}),"\n",(0,s.jsxs)(t.li,{children:["Install ",(0,s.jsx)(t.a,{href:"https://kubernetes.io/docs/tasks/tools/",children:"Kubectl"})]}),"\n",(0,s.jsxs)(t.li,{children:["Install ",(0,s.jsx)(t.a,{href:"https://helm.sh/docs/intro/install/",children:"Helm3"})]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"update-a-persistent-volume-claim-size",children:"Update a persistent volume claim size"}),"\n",(0,s.jsxs)(t.p,{children:["Over time, as the chain grows, so will the amount of space used by the persistent volume claim (PVC). As of Kubernetes v1.11, ",(0,s.jsx)(t.a,{href:"https://kubernetes.io/docs/concepts/storage/storage-classes/#allow-volume-expansion",children:"certain types of Storage Classes"})," allow volume resizing. Production charts for Azure use Azure Files, and on AWS use EBS Block Store which allow for volume expansion."]}),"\n",(0,s.jsxs)(t.p,{children:["To update the volume size, you must update the override values file. For example, to increase the size on the transaction nodes volumes, add the following snippet to the ",(0,s.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/helm/values/txnode.yml",children:(0,s.jsx)(t.code,{children:"txnode values.yml"})})," file, with the new size limit (the following example uses 50Gi)."]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:'storage:\n sizeLimit: "50Gi"\n pvcSizeLimit: "50Gi"\n'})}),"\n",(0,s.jsx)(t.p,{children:"Once complete, update the node via helm:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"helm upgrade tx-1 ./charts/besu-node --namespace besu --values ./values/txnode.yml\n"})}),"\n",(0,s.jsx)(t.h2,{id:"update-besu-versions",children:"Update Besu versions"}),"\n",(0,s.jsx)(t.admonition,{type:"important",children:(0,s.jsx)(t.p,{children:"When updating Besu nodes across a cluster, perform the updates as a rolling update and not all at once, especially for the validator pool. If all the validators are taken offline, the chain halts, and you must wait for round changes to expire before blocks are created again."})}),"\n",(0,s.jsxs)(t.p,{children:["Updates for Besu can be done via Helm in exactly the same manner as other applications. Alternatively, this can be done via ",(0,s.jsx)(t.code,{children:"kubectl"}),". This example updates a node called ",(0,s.jsx)(t.code,{children:"besu-validator-3"}),":"]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Set the update policy to use rolling updates (if not done already):"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:'kubectl patch statefulset besu-validator-3 --namespace besu -p \'{"spec":{"updateStrategy":{"type":"RollingUpdate"}}}\'\n'})}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Update the Besu version via Helm:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"helm upgrade bootnode-1 ./charts/besu-node --namespace besu --values ./values/bootnode.yml --set image.besu.tag=21.10.0\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Or via ",(0,s.jsx)(t.code,{children:"kubectl"}),":"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:'kubectl patch statefulset besu-validator-3 --namespace besu --type=\'json\' -p=\'[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"hyperledger/besu:21.10.0"}]\'\n'})}),"\n"]}),"\n"]})]})}function d(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>o});var s=n(96540);const a={},r=s.createContext(a);function i(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a99a03ac.ff4385fe.js b/assets/js/a99a03ac.ff4385fe.js new file mode 100644 index 00000000000..b2f9c41bd33 --- /dev/null +++ b/assets/js/a99a03ac.ff4385fe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[9624],{95062:(t,n,a)=>{a.r(n),a.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>p,frontMatter:()=>o,metadata:()=>r,toc:()=>l});var i=a(74848),e=a(28453);const o={title:"Transaction validation",sidebar_position:3,description:"What transaction validation and when",tags:["public networks","private networks"]},s="Transaction validation",r={id:"public-networks/concepts/transactions/validation",title:"Transaction validation",description:"What transaction validation and when",source:"@site/docs/public-networks/concepts/transactions/validation.md",sourceDirName:"public-networks/concepts/transactions",slug:"/public-networks/concepts/transactions/validation",permalink:"/public-networks/concepts/transactions/validation",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/concepts/transactions/validation.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Transaction validation",sidebar_position:3,description:"What transaction validation and when",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Transaction pool",permalink:"/public-networks/concepts/transactions/pool"},next:{title:"Network ID and chain ID",permalink:"/public-networks/concepts/network-and-chain-id"}},c={},l=[];function d(t){const n={admonition:"admonition",h1:"h1",header:"header",img:"img",p:"p",...(0,e.R)(),...t.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"transaction-validation",children:"Transaction validation"})}),"\n",(0,i.jsx)(n.p,{children:"For transactions submitted and added to a block, Besu validates the transactions, as illustrated in the following diagram."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Transaction Validation",src:a(35027).A+"",width:"1380",height:"1310"})}),"\n",(0,i.jsx)(n.p,{children:"Besu repeats the set of transaction pool validations after propagating the transaction. Besu repeats the same set of validations when importing the block that includes the transaction, except the nonce must be exactly right when importing the block."}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsx)(n.p,{children:"Private transactions are not added to the transaction pool. The privacy marker transaction is submitted to the transaction pool but the private transaction itself is directly distributed to the transaction participants."})}),"\n",(0,i.jsx)(n.p,{children:"When adding the transaction to a block, Besu performs an additional validation to check that the transaction gas limit is less than the remaining block gas limit. After creating a block, the node imports the block and then repeats the transaction pool validations."}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsx)(n.p,{children:"The transaction is only added if the entire transaction gas limit is less than the remaining gas for the block. The total gas used by the transaction is not relevant to this validation. That is, if the total gas used by the transaction is less than the remaining block gas, but the transaction gas limit is more than the remaining block gas, the transaction is not added."})})]})}function p(t={}){const{wrapper:n}={...(0,e.R)(),...t.components};return n?(0,i.jsx)(n,{...t,children:(0,i.jsx)(d,{...t})}):d(t)}},35027:(t,n,a)=>{a.d(n,{A:()=>i});const i=a.p+"assets/images/transaction-validation-3e8deafb4d76b8cab2bc1d341ebeb0a9.png"},28453:(t,n,a)=>{a.d(n,{R:()=>s,x:()=>r});var i=a(96540);const e={},o=i.createContext(e);function s(t){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof t?t(n):{...n,...t}}),[n,t])}function r(t){let n;return n=t.disableParentContext?"function"==typeof t.components?t.components(e):t.components||e:s(t.components),i.createElement(o.Provider,{value:n},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/aa0c6744.d7c231cf.js b/assets/js/aa0c6744.d7c231cf.js new file mode 100644 index 00000000000..90f573cbf6e --- /dev/null +++ b/assets/js/aa0c6744.d7c231cf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6867],{44207:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>u});var s=t(74848),r=t(28453),a=t(11470),i=t(19365);const o={title:"Run Besu and Teku on Mainnet",sidebar_position:1,description:"Run Besu and Teku on Ethereum Mainnet.",tags:["public networks"]},l="Run Besu and Teku on Mainnet",c={id:"public-networks/tutorials/besu-teku-mainnet",title:"Run Besu and Teku on Mainnet",description:"Run Besu and Teku on Ethereum Mainnet.",source:"@site/docs/public-networks/tutorials/besu-teku-mainnet.md",sourceDirName:"public-networks/tutorials",slug:"/public-networks/tutorials/besu-teku-mainnet",permalink:"/public-networks/tutorials/besu-teku-mainnet",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/tutorials/besu-teku-mainnet.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Run Besu and Teku on Mainnet",sidebar_position:1,description:"Run Besu and Teku on Ethereum Mainnet.",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Tutorials",permalink:"/public-networks/tutorials"},next:{title:"Run Besu and Teku on a testnet",permalink:"/public-networks/tutorials/besu-teku-testnet"}},d={},u=[{value:"1. Install Besu and Teku",id:"1-install-besu-and-teku",level:2},{value:"2. Generate the shared secret",id:"2-generate-the-shared-secret",level:2},{value:"3. Generate validator keys",id:"3-generate-validator-keys",level:2},{value:"4. Start Besu",id:"4-start-besu",level:2},{value:"5. Start Teku",id:"5-start-teku",level:2},{value:"Beacon node only",id:"beacon-node-only",level:3},{value:"Beacon node and validator client",id:"beacon-node-and-validator-client",level:3},{value:"6. Wait for Besu and Teku to sync",id:"6-wait-for-besu-and-teku-to-sync",level:2},{value:"7. Stake ETH",id:"7-stake-eth",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"run-besu-and-teku-on-mainnet",children:"Run Besu and Teku on Mainnet"})}),"\n",(0,s.jsxs)(n.p,{children:["Run Besu as an ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-clients#execution-clients",children:"execution client"})," and ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/",children:"Teku"})," as a ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-clients#consensus-clients",children:"consensus client"})," on Ethereum Mainnet."]}),"\n",(0,s.jsx)(n.h2,{id:"1-install-besu-and-teku",children:"1. Install Besu and Teku"}),"\n",(0,s.jsxs)(n.p,{children:["Install ",(0,s.jsx)(n.a,{href:"/public-networks/get-started/install/binary-distribution",children:"Besu"})," and ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/HowTo/Get-Started/Installation-Options/Install-Binaries/",children:"Teku"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"Ensure you meet the prerequisites for the installation option you use. For example, you must have Java 21+ if using the Besu and Teku binary distributions."}),"\n",(0,s.jsxs)(n.p,{children:["Ensure you meet the ",(0,s.jsx)(n.a,{href:"/public-networks/get-started/system-requirements",children:"system requirements for Besu on public networks"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"2-generate-the-shared-secret",children:"2. Generate the shared secret"}),"\n",(0,s.jsx)(n.p,{children:"Run the following command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'openssl rand -hex 32 | tr -d "\\n" > jwtsecret.hex\n'})}),"\n",(0,s.jsxs)(n.p,{children:["You will specify ",(0,s.jsx)(n.code,{children:"jwtsecret.hex"})," when starting Besu and Teku. This is a shared JWT secret the clients use to authenticate each other when using the ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-engine-api",children:"Engine API"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"3-generate-validator-keys",children:"3. Generate validator keys"}),"\n",(0,s.jsxs)(n.p,{children:["If you're running Teku as a beacon node only, skip to the ",(0,s.jsx)(n.a,{href:"#4-start-besu",children:"next step"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"If you're also running Teku as a validator client, have a funded Ethereum address ready (32 ETH and gas fees for each validator)."}),"\n",(0,s.jsxs)(n.p,{children:["Generate validator keys and stake your ETH for one or more validators using the ",(0,s.jsx)(n.a,{href:"https://launchpad.ethereum.org/en/",children:"Staking Launchpad"}),"."]}),"\n",(0,s.jsxs)(n.admonition,{type:"info",children:[(0,s.jsxs)(n.p,{children:["Save the password you use to generate each key pair in a ",(0,s.jsx)(n.code,{children:".txt"})," file."]}),(0,s.jsxs)(n.p,{children:["You should also have a ",(0,s.jsx)(n.code,{children:".json"})," file for each validator key pair."]})]}),"\n",(0,s.jsx)(n.h2,{id:"4-start-besu",children:"4. Start Besu"}),"\n",(0,s.jsxs)(n.p,{children:["Run the following command or specify the options in a ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/",children:"configuration file"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"besu \\\n --sync-mode=SNAP \\\n --data-storage-format=BONSAI \\\n --rpc-http-enabled=true \\\n --p2p-host= \\\n --host-allowlist=,127.0.0.1,localhost \\\n --engine-host-allowlist=,127.0.0.1,localhost \\\n --engine-rpc-enabled \\\n --engine-jwt-secret=\n"})}),"\n",(0,s.jsx)(n.p,{children:"Specify:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The path to the ",(0,s.jsx)(n.code,{children:"jwtsecret.hex"})," file generated in ",(0,s.jsx)(n.a,{href:"#2-generate-the-shared-secret",children:"step 2"})," using the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#engine-jwt-secret",children:(0,s.jsx)(n.code,{children:"--engine-jwt-secret"})})," option."]}),"\n",(0,s.jsxs)(n.li,{children:["The public IP address of your Besu node using the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#host-allowlist",children:(0,s.jsx)(n.code,{children:"--host-allowlist"})})," and ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#engine-host-allowlist",children:(0,s.jsx)(n.code,{children:"--engine-host-allowlist"})})," options."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Also, in the command:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:(0,s.jsx)(n.code,{children:"--sync-mode"})})," specifies using ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-sync#snap-synchronization",children:"snap sync"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-storage-format",children:(0,s.jsx)(n.code,{children:"--data-storage-format"})})," specifies using ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai Tries"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,s.jsx)(n.code,{children:"--rpc-http-enabled"})})," enables the HTTP JSON-RPC service."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#engine-rpc-enabled",children:(0,s.jsx)(n.code,{children:"--engine-rpc-enabled"})})," enables the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/engine-api/",children:"Engine API"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["You can modify the option values and add other ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options",children:"command line options"})," as needed."]}),"\n",(0,s.jsx)(n.h2,{id:"5-start-teku",children:"5. Start Teku"}),"\n",(0,s.jsx)(n.p,{children:"Open a new terminal window."}),"\n",(0,s.jsx)(n.h3,{id:"beacon-node-only",children:"Beacon node only"}),"\n",(0,s.jsxs)(n.p,{children:["To run Teku as a beacon node only (without validator duties), run the following command or specify the options in the ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/HowTo/Configure/Use-Configuration-File/",children:"Teku configuration file"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"teku \\\n --ee-endpoint=http://localhost:8551 \\\n --ee-jwt-secret-file= \\\n --metrics-enabled=true \\\n --rest-api-enabled=true \\\n --p2p-advertised-ip= \\\n --checkpoint-sync-url=\n"})}),"\n",(0,s.jsx)(n.p,{children:"Specify:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The path to the ",(0,s.jsx)(n.code,{children:"jwtsecret.hex"})," file generated in ",(0,s.jsx)(n.a,{href:"#2-generate-the-shared-secret",children:"step 2"})," using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#ee-jwt-secret-file",children:(0,s.jsx)(n.code,{children:"--ee-jwt-secret-file"})})," option."]}),"\n",(0,s.jsxs)(n.li,{children:["The public IP address of your Teku node using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#p2p-advertised-ip",children:(0,s.jsx)(n.code,{children:"--p2p-advertised-ip"})})," option."]}),"\n",(0,s.jsxs)(n.li,{children:["The URL of a checkpoint sync endpoint using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#checkpoint-sync-url",children:(0,s.jsx)(n.code,{children:"--checkpoint-sync-url"})})," option."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Also, in the command:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#ee-endpoint",children:(0,s.jsx)(n.code,{children:"--ee-endpoint"})})," is set to the default URL of Besu's Engine API."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#metrics-enabled",children:(0,s.jsx)(n.code,{children:"--metrics-enabled"})})," enables Teku's metrics exporter."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#rest-api-enabled",children:(0,s.jsx)(n.code,{children:"--rest-api-enabled"})})," enables Teku's REST API service."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["You can modify the option values and add other ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/Reference/CLI/CLI-Syntax/",children:"Teku command line options"})," as needed."]}),"\n",(0,s.jsx)(n.h3,{id:"beacon-node-and-validator-client",children:"Beacon node and validator client"}),"\n",(0,s.jsxs)(n.p,{children:["To run Teku as a beacon node and validator in a single process, run the following command or specify the options in the ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/HowTo/Configure/Use-Configuration-File/",children:"Teku configuration file"}),":"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"teku \\\n --ee-endpoint http://localhost:8551 \\\n --ee-jwt-secret-file \\\n --metrics-enabled=true \\\n --rest-api-enabled=true \\\n --checkpoint-sync-url= \\\n --validators-proposer-default-fee-recipient= \\\n --validator-keys=:[,:,...]\n"})}),"\n",(0,s.jsx)(n.p,{children:"Specify:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The path to the ",(0,s.jsx)(n.code,{children:"jwtsecret.hex"})," file generated in ",(0,s.jsx)(n.a,{href:"#2-generate-the-shared-secret",children:"step 2"})," using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#ee-jwt-secret-file",children:(0,s.jsx)(n.code,{children:"--ee-jwt-secret-file"})})," option."]}),"\n",(0,s.jsxs)(n.li,{children:["The URL of a checkpoint sync endpoint using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#checkpoint-sync-url",children:(0,s.jsx)(n.code,{children:"--checkpoint-sync-url"})})," option."]}),"\n",(0,s.jsxs)(n.li,{children:["An Ethereum address you own as the default fee recipient using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#validators-proposer-default-fee-recipient",children:(0,s.jsx)(n.code,{children:"--validators-proposer-default-fee-recipient"})}),"\noption."]}),"\n",(0,s.jsxs)(n.li,{children:["The paths to the keystore ",(0,s.jsx)(n.code,{children:".json"})," file and password ",(0,s.jsx)(n.code,{children:".txt"})," file created in\n",(0,s.jsx)(n.a,{href:"#3-generate-validator-keys",children:"step 3"})," for each validator using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#validator-keys",children:(0,s.jsx)(n.code,{children:"--validator-keys"})})," option.\nSeparate the ",(0,s.jsx)(n.code,{children:".json"})," and ",(0,s.jsx)(n.code,{children:".txt"})," files with a colon, and separate entries for multiple validators with commas."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Also, in the command:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#ee-endpoint",children:(0,s.jsx)(n.code,{children:"--ee-endpoint"})})," is set to the default URL of Besu's Engine API."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#metrics-enabled",children:(0,s.jsx)(n.code,{children:"--metrics-enabled"})})," enables Teku's metrics exporter."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#rest-api-enabled",children:(0,s.jsx)(n.code,{children:"--rest-api-enabled"})})," enables Teku's REST API service."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["You can modify the option values and add other ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/Reference/CLI/CLI-Syntax/",children:"Teku command line options"})," as needed."]}),"\n",(0,s.jsx)(n.h2,{id:"6-wait-for-besu-and-teku-to-sync",children:"6. Wait for Besu and Teku to sync"}),"\n",(0,s.jsx)(n.p,{children:"After starting Besu and Teku, your node starts syncing and connecting to peers."}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(i.A,{value:"Besu logs",label:"Besu logs",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{"@timestamp":"2023-02-03T04:43:49,555","level":"INFO","thread":"main","class":"DefaultSynchronizer","message":"Starting synchronizer.","throwable":""}\n{"@timestamp":"2023-02-03T04:43:49,556","level":"INFO","thread":"main","class":"FastSyncDownloader","message":"Starting sync","throwable":""}\n{"@timestamp":"2023-02-03T04:43:49,559","level":"INFO","thread":"main","class":"Runner","message":"Ethereum main loop is up.","throwable":""}\n{"@timestamp":"2023-02-03T04:43:53,106","level":"INFO","thread":"Timer-0","class":"DNSResolver","message":"Resolved 2409 nodes","throwable":""}\n{"@timestamp":"2023-02-03T04:45:04,803","level":"INFO","thread":"nioEventLoopGroup-3-10","class":"SnapWorldStateDownloader","message":"Downloading world state from peers for pivot block 16545859 (0x616ae3c4cf85f95a9bce2814a7282d75dc2eac36\ncb9f0fcc6f16386df70da3c5). State root 0xa7114541f42c62a72c8b6bb9901c2ccf4b424cd7f76570a67b82a183b02f25dc pending requests 0","throwable":""}\n{"@timestamp":"2023-02-03T04:46:04,834","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.08%, Peer count: 8","throwable":""}\n{"@timestamp":"2023-02-03T04:48:01,840","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.23%, Peer count: 8","throwable":""}\n{"@timestamp":"2023-02-03T04:49:09,931","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.41%, Peer count: 11","throwable":""}\n{"@timestamp":"2023-02-03T04:50:12,466","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.61%, Peer count: 10","throwable":""}\n{"@timestamp":"2023-02-03T04:51:20,977","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.75%, Peer count: 10","throwable":""}\n{"@timestamp":"2023-02-03T04:51:28,985","level":"INFO","thread":"EthScheduler-Services-29 (importBlock)","class":"FastImportBlocksStep","message":"Block import progress: 180400 of 16545859 (1%)","throwable":""}\n'})})}),(0,s.jsx)(i.A,{value:"Teku logs",label:"Teku logs",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"2022-03-21 20:43:24.355 INFO - Syncing *** Target slot: 76092, Head slot: 2680, Remaining slots: 73412, Connected peers: 8\n2022-03-21 20:43:36.363 INFO - Syncing *** Target slot: 76093, Head slot: 2879, Remaining slots: 73214, Connected peers: 10\n2022-03-21 20:43:48.327 INFO - Syncing *** Target slot: 76094, Head slot: 3080, Remaining slots: 73014, Connected peers: 8\n2022-03-21 20:44:00.339 INFO - Syncing *** Target slot: 76095, Head slot: 3317, Remaining slots: 72778, Connected peers: 6\n2022-03-21 20:44:12.353 INFO - Syncing *** Target slot: 76096, Head slot: 3519, Remaining slots: 72577, Connected peers: 9\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"If you're running Teku as a beacon node only, you're all set. If you're also running Teku as a validator client, ensure Besu and Teku are fully synced before submitting your staking deposit in the next step. Syncing Besu can take several days."}),"\n",(0,s.jsx)(n.h2,{id:"7-stake-eth",children:"7. Stake ETH"}),"\n",(0,s.jsxs)(n.p,{children:["Stake your ETH for one or more validators using the ",(0,s.jsx)(n.a,{href:"https://launchpad.ethereum.org/en/",children:"Staking Launchpad"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["You can check your validator status by searching your Ethereum address on the ",(0,s.jsx)(n.a,{href:"https://beaconcha.in/",children:"Beacon Chain explorer"}),". It may take up to multiple days for your validator to be activated and start proposing blocks."]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var s=t(18215);const r={tabItem:"tabItem_Ymn6"};var a=t(74848);function i(e){let{children:n,hidden:t,className:i}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,i),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>v});var s=t(96540),r=t(18215),a=t(23104),i=t(56347),o=t(205),l=t(57485),c=t(31682),d=t(70679);function u(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:s,default:r}}=e;return{value:n,label:t,attributes:s,default:r}}))}(t);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:t}=e;const r=(0,i.W6)(),a=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l.aZ)(a),(0,s.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(r.location.search);n.set(a,e),r.replace({...r.location,search:n.toString()})}),[a,r])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,a=h(e),[i,l]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=t.find((e=>e.default))??t[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:a}))),[c,u]=f({queryString:t,groupId:r}),[b,x]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,a]=(0,d.Dv)(t);return[r,(0,s.useCallback)((e=>{t&&a.set(e)}),[t,a])]}({groupId:r}),m=(()=>{const e=c??b;return p({value:e,tabValues:a})?e:null})();(0,o.A)((()=>{m&&l(m)}),[m]);return{selectedValue:i,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);l(e),u(e),x(e)}),[u,x,a]),tabValues:a}}var x=t(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=t(74848);function g(e){let{className:n,block:t,selectedValue:s,selectValue:i,tabValues:o}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,a.a_)(),d=e=>{const n=e.currentTarget,t=l.indexOf(n),r=o[t].value;r!==s&&(c(n),i(r))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},n),children:o.map((e=>{let{value:n,label:t,attributes:a}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>l.push(e),onKeyDown:u,onClick:d,...a,className:(0,r.A)("tabs__item",m.tabItem,a?.className,{"tabs__item--active":s===n}),children:t??n},n)}))})}function k(e){let{lazy:n,children:t,selectedValue:a}=e;const i=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=i.find((e=>e.props.value===a));return e?(0,s.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:i.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function y(e){const n=b(e);return(0,j.jsxs)("div",{className:(0,r.A)("tabs-container",m.tabList),children:[(0,j.jsx)(g,{...n,...e}),(0,j.jsx)(k,{...n,...e})]})}function v(e){const n=(0,x.A)();return(0,j.jsx)(y,{...e,children:u(e.children)},String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var s=t(96540);const r={},a=s.createContext(r);function i(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/aa612600.f8435eb7.js b/assets/js/aa612600.f8435eb7.js new file mode 100644 index 00000000000..545d6fe158d --- /dev/null +++ b/assets/js/aa612600.f8435eb7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2778],{31204:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>o,contentTitle:()=>d,default:()=>x,frontMatter:()=>c,metadata:()=>i,toc:()=>h});var s=a(74848),l=a(28453),r=a(11470),t=a(19365);const c={title:"EVM tool options",sidebar_position:5,toc_max_heading_level:3,description:"Besu EVM tool options reference",tags:["public networks","private networks"]},d="EVM tool reference",i={id:"public-networks/reference/evm-tool",title:"EVM tool options",description:"Besu EVM tool options reference",source:"@site/docs/public-networks/reference/evm-tool.md",sourceDirName:"public-networks/reference",slug:"/public-networks/reference/evm-tool",permalink:"/public-networks/reference/evm-tool",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/reference/evm-tool.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:5,frontMatter:{title:"EVM tool options",sidebar_position:5,toc_max_heading_level:3,description:"Besu EVM tool options reference",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Genesis file items",permalink:"/public-networks/reference/genesis-items"},next:{title:"Transaction trace types",permalink:"/public-networks/reference/trace-types"}},o={},h=[{value:"Options",id:"options",level:2},{value:"code",id:"code",level:3},{value:"gas",id:"gas",level:3},{value:"price",id:"price",level:3},{value:"sender",id:"sender",level:3},{value:"receiver",id:"receiver",level:3},{value:"input",id:"input",level:3},{value:"value",id:"value",level:3},{value:"json, trace",id:"json-trace",level:3},{value:"json-alloc",id:"json-alloc",level:3},{value:"[no]memory, trace.[no]memory",id:"nomemory-tracenomemory",level:3},{value:"trace.[no]stack",id:"tracenostack",level:3},{value:"trace.[no]returndata",id:"tracenoreturndata",level:3},{value:"[no]time",id:"notime",level:3},{value:"genesis",id:"genesis",level:3},{value:"chain",id:"chain",level:3},{value:"repeat",id:"repeat",level:3},{value:"revert-reason-enabled",id:"revert-reason-enabled",level:3},{value:"fork",id:"fork",level:3},{value:"key-value-storage",id:"key-value-storage",level:3},{value:"data-path",id:"data-path",level:3},{value:"block-number",id:"block-number",level:3},{value:"version",id:"version",level:3},{value:"Subcommands",id:"subcommands",level:2},{value:"code-validate",id:"code-validate",level:3},{value:"Use command arguments",id:"use-command-arguments",level:4},{value:"Use standard input",id:"use-standard-input",level:4},{value:"state-test",id:"state-test",level:3},{value:"Use command arguments",id:"use-command-arguments-1",level:4},{value:"Use standard input",id:"use-standard-input-1",level:4},{value:"transition, t8n, t8n-server",id:"transition-t8n-t8n-server",level:3}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",p:"p",pre:"pre",...(0,l.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"evm-tool-reference",children:"EVM tool reference"})}),"\n",(0,s.jsxs)(n.p,{children:["This reference describes ",(0,s.jsx)(n.a,{href:"#options",children:"options"})," and ",(0,s.jsx)(n.a,{href:"#subcommands",children:"subcommands"})," for the\n",(0,s.jsx)(n.a,{href:"/public-networks/how-to/troubleshoot/evm-tool",children:"EVM tool"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["Option names that include ",(0,s.jsx)(n.code,{children:"trace"}),", such as ",(0,s.jsx)(n.a,{href:"#json-trace",children:(0,s.jsx)(n.code,{children:"--trace"})})," and ",(0,s.jsx)(n.a,{href:"#nomemory-tracenomemory",children:(0,s.jsx)(n.code,{children:"--trace.[no]memory"})})," exist to support ",(0,s.jsx)(n.a,{href:"https://ethereum-tests.readthedocs.io/en/latest/t8ntool.html",children:(0,s.jsx)(n.code,{children:"t8ntool"})})," reference testing, and are interchangeable with their standard option names."]})}),"\n",(0,s.jsx)(n.h2,{id:"options",children:"Options"}),"\n",(0,s.jsx)(n.h3,{id:"code",children:(0,s.jsx)(n.code,{children:"code"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--code=\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--code=5B600080808060045AFA50600056\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"The code to be executed, in compiled hex code form. Execution fails if this is not set."}),"\n",(0,s.jsx)(n.h3,{id:"gas",children:(0,s.jsx)(n.code,{children:"gas"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--gas=\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--gas=100000000\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"Amount of gas to make available to the EVM. The default is 10 billion, a number unlikely to be seen in any production blockchain."}),"\n",(0,s.jsx)(n.h3,{id:"price",children:(0,s.jsx)(n.code,{children:"price"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--price=\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--price=10\n"})})})]}),"\n",(0,s.jsxs)(n.p,{children:["Price of gas in Gwei. The default is ",(0,s.jsx)(n.code,{children:"0"}),". If set to a non-zero value, the sender account must have enough value to cover the gas fees."]}),"\n",(0,s.jsx)(n.h3,{id:"sender",children:(0,s.jsx)(n.code,{children:"sender"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--sender=
\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--sender=0xfe3b557e8fb62b89f4916b721be55ceb828dbd73\n"})})})]}),"\n",(0,s.jsxs)(n.p,{children:["The account the invocation is sent from. The specified account must exist in the world state, which, unless specified by ",(0,s.jsx)(n.a,{href:"#genesis",children:(0,s.jsx)(n.code,{children:"--genesis"})}),", is the set of ",(0,s.jsx)(n.a,{href:"/private-networks/reference/accounts-for-testing",children:"accounts used for testing"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"receiver",children:(0,s.jsx)(n.code,{children:"receiver"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--receiver=
\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--receiver=0x588108d3eab34e94484d7cda5a1d31804ca96fe7\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"The account the invocation is sent to. The specified account does not need to exist."}),"\n",(0,s.jsx)(n.h3,{id:"input",children:(0,s.jsx)(n.code,{children:"input"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--input=\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--input=9064129300000000000000000000000000000000000000000000000000000000\n"})})})]}),"\n",(0,s.jsxs)(n.p,{children:["The data passed into the call. Corresponds to the ",(0,s.jsx)(n.code,{children:"data"})," field of the transaction and is returned by the ",(0,s.jsx)(n.code,{children:"CALLDATA"})," and related opcodes."]}),"\n",(0,s.jsx)(n.h3,{id:"value",children:(0,s.jsx)(n.code,{children:"value"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--value=\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--value=1000000000000000000\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"The value, in wei, attached to this transaction. For operations that query the value or transfer it to other accounts this is the amount that is available. The amount is not reduced to cover intrinsic cost and gas fees."}),"\n",(0,s.jsxs)(n.h3,{id:"json-trace",children:[(0,s.jsx)(n.code,{children:"json"}),", ",(0,s.jsx)(n.code,{children:"trace"})]}),"\n",(0,s.jsx)(r.A,{children:(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--json\n"})})})}),"\n",(0,s.jsx)(n.p,{children:"Provides an operation-by-operation trace of the command in JSON."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"--trace"})," is an alias for ",(0,s.jsx)(n.code,{children:"--json"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"json-alloc",children:(0,s.jsx)(n.code,{children:"json-alloc"})}),"\n",(0,s.jsx)(r.A,{children:(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--json-alloc\n"})})})}),"\n",(0,s.jsx)(n.p,{children:"Outputs a JSON summary of the post-execution world state and allocations."}),"\n",(0,s.jsxs)(n.h3,{id:"nomemory-tracenomemory",children:[(0,s.jsx)(n.code,{children:"[no]memory"}),", ",(0,s.jsx)(n.code,{children:"trace.[no]memory"})]}),"\n",(0,s.jsx)(r.A,{children:(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--nomemory, --memory\n"})})})}),"\n",(0,s.jsxs)(n.p,{children:["Setting ",(0,s.jsx)(n.code,{children:"--nomemory"})," disables tracing the memory output for each operation. Setting ",(0,s.jsx)(n.code,{children:"--memory"})," enables it. Memory traces are disabled by default."]}),"\n",(0,s.jsx)(n.p,{children:"For memory heavy scripts, disabling memory traces may reduce the volume of JSON output."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"--trace.[no]memory"})," is an alias for ",(0,s.jsx)(n.code,{children:"--[no]memory"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"tracenostack",children:(0,s.jsx)(n.code,{children:"trace.[no]stack"})}),"\n",(0,s.jsx)(r.A,{children:(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--trace.nostack, --trace.stack\n"})})})}),"\n",(0,s.jsxs)(n.p,{children:["Setting ",(0,s.jsx)(n.code,{children:"--trace.nostack"})," disables tracing the operand stack for each operation. Setting ",(0,s.jsx)(n.code,{children:"--trace.stack"})," enables it. Stack traces are enabled by default."]}),"\n",(0,s.jsx)(n.h3,{id:"tracenoreturndata",children:(0,s.jsx)(n.code,{children:"trace.[no]returndata"})}),"\n",(0,s.jsx)(r.A,{children:(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--trace.noreturndata, --trace.returndata\n"})})})}),"\n",(0,s.jsxs)(n.p,{children:["Setting ",(0,s.jsx)(n.code,{children:"--trace.noreturndata"})," disables tracing the return data for each operation. Setting ",(0,s.jsx)(n.code,{children:"--trace.returndata"})," enables it. Return data traces are enabled by default."]}),"\n",(0,s.jsx)(n.h3,{id:"notime",children:(0,s.jsx)(n.code,{children:"[no]time"})}),"\n",(0,s.jsx)(r.A,{children:(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--notime, --time\n"})})})}),"\n",(0,s.jsxs)(n.p,{children:["Setting ",(0,s.jsx)(n.code,{children:"--notime"})," disables including time data in the summary output. Setting ",(0,s.jsx)(n.code,{children:"--time"})," enables it."]}),"\n",(0,s.jsx)(n.p,{children:"This is useful for testing and differential evaluations."}),"\n",(0,s.jsx)(n.h3,{id:"genesis",children:(0,s.jsx)(n.code,{children:"genesis"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--genesis=\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--genesis=/opt/besu/genesis.json\n"})})})]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"/public-networks/reference/genesis-items",children:"Besu genesis file"})," to use when evaluating the EVM. Most useful are the ",(0,s.jsx)(n.code,{children:"alloc"})," items that set up accounts and their stored memory states."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"--prestate"})," is a deprecated alias for ",(0,s.jsx)(n.code,{children:"--genesis"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"chain",children:(0,s.jsx)(n.code,{children:"chain"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--chain=\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--chain=holesky\n"})})})]}),"\n",(0,s.jsxs)(n.p,{children:["The well-known network genesis file to use when evaluating the EVM. These values are an alternative to the ",(0,s.jsx)(n.a,{href:"#genesis",children:(0,s.jsx)(n.code,{children:"--genesis"})})," option for well-known networks."]}),"\n",(0,s.jsx)(n.h3,{id:"repeat",children:(0,s.jsx)(n.code,{children:"repeat"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--repeat=\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--repeat=1000\n"})})})]}),"\n",(0,s.jsxs)(n.p,{children:["Number of times to repeat the contract before gathering timing information. This is useful when benchmarking EVM operations. The default is ",(0,s.jsx)(n.code,{children:"0"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"revert-reason-enabled",children:(0,s.jsx)(n.code,{children:"revert-reason-enabled"})}),"\n",(0,s.jsx)(r.A,{children:(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--revert-reason-enabled\n"})})})}),"\n",(0,s.jsxs)(n.p,{children:["Enables tracing the reason included in ",(0,s.jsx)(n.code,{children:"REVERT"})," operations. The revert reason is enabled by default."]}),"\n",(0,s.jsx)(n.h3,{id:"fork",children:(0,s.jsx)(n.code,{children:"fork"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--fork=\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--fork=FutureEips\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"Specific fork to evaluate, overriding network settings."}),"\n",(0,s.jsx)(n.h3,{id:"key-value-storage",children:(0,s.jsx)(n.code,{children:"key-value-storage"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--key-value-storage=\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--key-value-storage=rocksdb\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"Kind of key value storage to use."}),"\n",(0,s.jsxs)(n.p,{children:["It might be useful to execute isolated EVM calls in the context of an actual world state. The default is ",(0,s.jsx)(n.code,{children:"memory"}),", which executes the call only in the context of the world provided by ",(0,s.jsx)(n.a,{href:"#genesis",children:(0,s.jsx)(n.code,{children:"--genesis"})})," or ",(0,s.jsx)(n.a,{href:"#chain",children:(0,s.jsx)(n.code,{children:"--chain"})})," at block zero."]}),"\n",(0,s.jsxs)(n.p,{children:["When set to ",(0,s.jsx)(n.code,{children:"rocksdb"})," and combined with ",(0,s.jsx)(n.a,{href:"#data-path",children:(0,s.jsx)(n.code,{children:"--data-path"})}),", ",(0,s.jsx)(n.a,{href:"#block-number",children:(0,s.jsx)(n.code,{children:"--block-number"})}),", and ",(0,s.jsx)(n.a,{href:"#genesis",children:(0,s.jsx)(n.code,{children:"--genesis"})}),", a Besu node that isn't currently running can be used to provide the appropriate world state for a transaction. This is useful when evaluating consensus failures."]}),"\n",(0,s.jsx)(n.h3,{id:"data-path",children:(0,s.jsx)(n.code,{children:"data-path"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--data-path=\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--data-path=/opt/besu/data\n"})})})]}),"\n",(0,s.jsxs)(n.p,{children:["When ",(0,s.jsx)(n.a,{href:"#key-value-storage",children:(0,s.jsx)(n.code,{children:"--key-value-storage"})})," is set to ",(0,s.jsx)(n.code,{children:"rocksdb"}),", specifies the location of the database on disk."]}),"\n",(0,s.jsx)(n.h3,{id:"block-number",children:(0,s.jsx)(n.code,{children:"block-number"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--block-number=\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--block-number=10000000\n"})})})]}),"\n",(0,s.jsxs)(n.p,{children:["The block number to evaluate the code against. Used to ensure that the EVM is evaluating the code against the correct fork, or to specify the world state when ",(0,s.jsx)(n.a,{href:"#key-value-storage",children:(0,s.jsx)(n.code,{children:"--key-value-storage"})})," is set to ",(0,s.jsx)(n.code,{children:"rocksdb"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"version",children:(0,s.jsx)(n.code,{children:"version"})}),"\n",(0,s.jsx)(r.A,{children:(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"--version\n"})})})}),"\n",(0,s.jsx)(n.p,{children:"Displays the version information."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.code,{children:"-v"})," is an alias for ",(0,s.jsx)(n.code,{children:"--version"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"subcommands",children:"Subcommands"}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsx)(n.p,{children:"The following subcommands are used for testing code bases and not meant for typical user interactions."})}),"\n",(0,s.jsx)(n.h3,{id:"code-validate",children:(0,s.jsx)(n.code,{children:"code-validate"})}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"evmtool code-validate --file=\n"})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"evmtool code-validate --file=eof.txt\n"})})})]}),"\n",(0,s.jsxs)(n.p,{children:["Allows ",(0,s.jsx)(n.a,{href:"https://eips.ethereum.org/EIPS/eip-3540",children:"Ethereum object formatted (EOF)"})," code to be validated."]}),"\n",(0,s.jsxs)(n.p,{children:["You can specify a file containing one or more EOF containers or EVM bytecode using the ",(0,s.jsx)(n.code,{children:"--file"})," option.\nEach line in the file is considered a separate program."]}),"\n",(0,s.jsx)(n.h4,{id:"use-command-arguments",children:"Use command arguments"}),"\n",(0,s.jsx)(n.p,{children:"If you use command arguments, each argument is considered a separate program.\nIf a code segment includes spaces, it must be contained in quotes."}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Docker example",label:"Docker example",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'docker run --rm hyperledger/besu-evmtool:develop code-validate "0xef0001 010008 020002-0007-0002 030000 00 00000002-02010002 59-59-b00001-50-b1 03-b1" 0xef0002 0xef00010100040200010001030000000000000000\n'})})}),(0,s.jsx)(t.A,{value:"Example",label:"Example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'evmtool code-validate "0xef0001 010008 020002-0007-0002 030000 00 00000002-02010002 59-59-b00001-50-b1 03-b1" 0xef0002 0xef00010100040200010001030000000000000000\n'})})})]}),"\n",(0,s.jsx)(n.h4,{id:"use-standard-input",children:"Use standard input"}),"\n",(0,s.jsx)(n.p,{children:"If no reference tests are passed in using the command line, the EVM tool loads and validates code\nfrom standard input.\nEach line is considered a separate program.\nComment lines and blanks are ignored."}),"\n",(0,s.jsx)(n.h3,{id:"state-test",children:(0,s.jsx)(n.code,{children:"state-test"})}),"\n",(0,s.jsxs)(n.p,{children:["Allows the ",(0,s.jsx)(n.a,{href:"https://github.com/ethereum/tests/tree/develop/GeneralStateTests",children:"Ethereum state tests"}),"\nto be evaluated.\nRun ",(0,s.jsx)(n.code,{children:"evmtool state-test --help"})," for the full list of supported options.\nNotable options are ",(0,s.jsx)(n.a,{href:"#json-trace",children:(0,s.jsx)(n.code,{children:"--json"})})," and ",(0,s.jsx)(n.a,{href:"#nomemory-tracenomemory",children:(0,s.jsx)(n.code,{children:"--nomemory"})}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Set ",(0,s.jsx)(n.code,{children:"--json"})," for EVM Lab Fuzzing.\nWhether or not ",(0,s.jsx)(n.code,{children:"--json"})," is set, a summary JSON object is printed to standard output for each state\ntest executed."]}),"\n",(0,s.jsx)(n.h4,{id:"use-command-arguments-1",children:"Use command arguments"}),"\n",(0,s.jsx)(n.p,{children:"If you use command arguments, you can list one or more state tests.\nAll the state tests are evaluated in the order they are specified."}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Docker example",label:"Docker example",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"docker run --rm -v ${PWD}:/opt/referencetests hyperledger/besu-evmtool:develop --json state-test /opt/referencetests/GeneralStateTests/stExample/add11.json\n"})})}),(0,s.jsx)(t.A,{value:"CLI example",label:"CLI example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"evmtool --json state-test stExample/add11.json\n"})})})]}),"\n",(0,s.jsx)(n.h4,{id:"use-standard-input-1",children:"Use standard input"}),"\n",(0,s.jsx)(n.p,{children:"If no reference tests are passed in using the command line, the EVM tool loads one complete JSON\nobject from standard input and executes that state test."}),"\n",(0,s.jsxs)(r.A,{children:[(0,s.jsx)(t.A,{value:"Docker example",label:"Docker example",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"docker run --rm -i hyperledger/besu-evmtool:develop --json state-test < stExample/add11.json\n"})})}),(0,s.jsx)(t.A,{value:"CLI example",label:"CLI example",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"evmtool --json state-test < stExample/add11.json\n"})})})]}),"\n",(0,s.jsxs)(n.h3,{id:"transition-t8n-t8n-server",children:[(0,s.jsx)(n.code,{children:"transition"}),", ",(0,s.jsx)(n.code,{children:"t8n"}),", ",(0,s.jsx)(n.code,{children:"t8n-server"})]}),"\n",(0,s.jsxs)(n.p,{children:["Allows the Ethereum state transition and blockchain tests to be evaluated.\nSee the ",(0,s.jsx)(n.a,{href:"https://ethereum-tests.readthedocs.io/en/develop/t8ntool-ref.html",children:"transition tool reference"}),"\nand ",(0,s.jsx)(n.a,{href:"https://ethereum.github.io/execution-spec-tests/v1.0.6/",children:"Execution Spec Tests"})," for more\ninformation about this subcommand."]})]})}function x(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},19365:(e,n,a)=>{a.d(n,{A:()=>t});a(96540);var s=a(18215);const l={tabItem:"tabItem_Ymn6"};var r=a(74848);function t(e){let{children:n,hidden:a,className:t}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,s.A)(l.tabItem,t),hidden:a,children:n})}},11470:(e,n,a)=>{a.d(n,{A:()=>k});var s=a(96540),l=a(18215),r=a(23104),t=a(56347),c=a(205),d=a(57485),i=a(31682),o=a(70679);function h(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function u(e){const{values:n,children:a}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:a,attributes:s,default:l}}=e;return{value:n,label:a,attributes:s,default:l}}))}(a);return function(e){const n=(0,i.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,a])}function x(e){let{value:n,tabValues:a}=e;return a.some((e=>e.value===n))}function j(e){let{queryString:n=!1,groupId:a}=e;const l=(0,t.W6)(),r=function(e){let{queryString:n=!1,groupId:a}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:n,groupId:a});return[(0,d.aZ)(r),(0,s.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(l.location.search);n.set(r,e),l.replace({...l.location,search:n.toString()})}),[r,l])]}function p(e){const{defaultValue:n,queryString:a=!1,groupId:l}=e,r=u(e),[t,d]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!x({value:n,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=a.find((e=>e.default))??a[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:r}))),[i,h]=j({queryString:a,groupId:l}),[p,m]=function(e){let{groupId:n}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(n),[l,r]=(0,o.Dv)(a);return[l,(0,s.useCallback)((e=>{a&&r.set(e)}),[a,r])]}({groupId:l}),b=(()=>{const e=i??p;return x({value:e,tabValues:r})?e:null})();(0,c.A)((()=>{b&&d(b)}),[b]);return{selectedValue:t,selectValue:(0,s.useCallback)((e=>{if(!x({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);d(e),h(e),m(e)}),[h,m,r]),tabValues:r}}var m=a(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=a(74848);function f(e){let{className:n,block:a,selectedValue:s,selectValue:t,tabValues:c}=e;const d=[],{blockElementScrollPositionUntilNextRender:i}=(0,r.a_)(),o=e=>{const n=e.currentTarget,a=d.indexOf(n),l=c[a].value;l!==s&&(i(n),t(l))},h=e=>{let n=null;switch(e.key){case"Enter":o(e);break;case"ArrowRight":{const a=d.indexOf(e.currentTarget)+1;n=d[a]??d[0];break}case"ArrowLeft":{const a=d.indexOf(e.currentTarget)-1;n=d[a]??d[d.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,l.A)("tabs",{"tabs--block":a},n),children:c.map((e=>{let{value:n,label:a,attributes:r}=e;return(0,v.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>d.push(e),onKeyDown:h,onClick:o,...r,className:(0,l.A)("tabs__item",b.tabItem,r?.className,{"tabs__item--active":s===n}),children:a??n},n)}))})}function g(e){let{lazy:n,children:a,selectedValue:r}=e;const t=(Array.isArray(a)?a:[a]).filter(Boolean);if(n){const e=t.find((e=>e.props.value===r));return e?(0,s.cloneElement)(e,{className:(0,l.A)("margin-top--md",e.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:t.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r})))})}function y(e){const n=p(e);return(0,v.jsxs)("div",{className:(0,l.A)("tabs-container",b.tabList),children:[(0,v.jsx)(f,{...n,...e}),(0,v.jsx)(g,{...n,...e})]})}function k(e){const n=(0,m.A)();return(0,v.jsx)(y,{...e,children:h(e.children)},String(n))}},28453:(e,n,a)=>{a.d(n,{R:()=>t,x:()=>c});var s=a(96540);const l={},r=s.createContext(l);function t(e){const n=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(l):e.components||l:t(e.components),s.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/af3555a6.f0cef4d7.js b/assets/js/af3555a6.f0cef4d7.js new file mode 100644 index 00000000000..1ee54cf5d86 --- /dev/null +++ b/assets/js/af3555a6.f0cef4d7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[849],{14396:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>u,contentTitle:()=>o,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>h});var r=t(74848),a=t(28453),s=t(11470),l=t(19365);const i={title:"Use GraphQL over HTTP",sidebar_position:3,description:"How to access the Besu API using GraphQL",tags:["public networks","private networks"]},o="Use GraphQL over HTTP",c={id:"public-networks/how-to/use-besu-api/graphql",title:"Use GraphQL over HTTP",description:"How to access the Besu API using GraphQL",source:"@site/docs/public-networks/how-to/use-besu-api/graphql.md",sourceDirName:"public-networks/how-to/use-besu-api",slug:"/public-networks/how-to/use-besu-api/graphql",permalink:"/public-networks/how-to/use-besu-api/graphql",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/use-besu-api/graphql.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Use GraphQL over HTTP",sidebar_position:3,description:"How to access the Besu API using GraphQL",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Use RPC Pub/Sub over WS",permalink:"/public-networks/how-to/use-besu-api/rpc-pubsub"},next:{title:"Authenticate over JSON-RPC requests",permalink:"/public-networks/how-to/use-besu-api/authenticate"}},u={},h=[{value:"GraphQL requests with cURL",id:"graphql-requests-with-curl",level:2},{value:"GraphQL requests with GraphiQL app",id:"graphql-requests-with-graphiql-app",level:2},{value:"Pending",id:"pending",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",img:"img",p:"p",pre:"pre",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"use-graphql-over-http",children:"Use GraphQL over HTTP"})}),"\n",(0,r.jsx)(n.p,{children:"GraphQL can reduce the overhead needed for common queries.\nFor example, instead of querying each receipt in a block, GraphQL can get the same result with a\nsingle query for the entire block."}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.a,{href:"https://github.com/hyperledger/besu/blob/750580dcca349d22d024cc14a8171b2fa74b505a/ethereum/api/src/main/resources/schema.graphqls",children:"Besu GraphQL schema"})," describes the GraphQL implementation for Ethereum.\nEnable the GraphQL service using ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/#enable-api-access",children:"command line options"}),"."]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsx)(n.p,{children:"GraphQL is not supported over WebSocket."})}),"\n",(0,r.jsxs)(n.p,{children:["Access the GraphQL endpoint at ",(0,r.jsx)(n.code,{children:"http://:/graphql"}),".\nConfigure ",(0,r.jsx)(n.code,{children:""})," and ",(0,r.jsx)(n.code,{children:""})," using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#graphql-http-host",children:(0,r.jsx)(n.code,{children:"graphql-http-host"})}),"\nand ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#graphql-http-port",children:(0,r.jsx)(n.code,{children:"graphql-http-port"})}),".\nThe default endpoint is ",(0,r.jsx)(n.code,{children:"http://127.0.0.1:8547/graphql"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"graphql-requests-with-curl",children:"GraphQL requests with cURL"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/public-networks/reference/api/",children:"Besu JSON-RPC API methods"})," with an equivalent\n",(0,r.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/graphql",children:"GraphQL"})," query include a GraphQL request and result in the method example."]}),"\n",(0,r.jsx)(n.p,{children:"For example, the following request returns the block number:"}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(l.A,{value:"Request",label:"Request",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{block{number}}"}\' http://localhost:8547/graphql\n'})})}),(0,r.jsx)(l.A,{value:"Response",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "data" : {\n "block" : {\n "number" : "0x281"\n }\n }\n}\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:"The following request returns the gas price:"}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(l.A,{value:"Request",label:"Request",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{gasPrice}"}\' http://localhost:8547/graphql\n'})})}),(0,r.jsx)(l.A,{value:"Response",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "data" : {\n "gasPrice" : "0x0"\n }\n}\n'})})})]}),"\n",(0,r.jsxs)(n.p,{children:["The following ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_syncing",children:(0,r.jsx)(n.code,{children:"syncing"})})," request returns data about the\nsynchronization status:"]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(l.A,{value:"Request",label:"Request",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{syncing{startingBlock currentBlock highestBlock}}"}\' http://localhost:8547/graphql\n'})})}),(0,r.jsx)(l.A,{value:"Response",label:"Response",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "data" : {\n "syncing" : {\n "startingBlock" : 665,\n "currentBlock" : 3190,\n "highestBlock" : 26395\n }\n }\n}\n'})})})]}),"\n",(0,r.jsxs)(n.admonition,{title:"note",type:"info",children:[(0,r.jsxs)(n.p,{children:["In some cases, for example, when your node is fully synced, the syncing request returns a ",(0,r.jsx)(n.code,{children:"null"})," response:"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "data" : {\n "syncing" : null\n }\n}\n'})})]}),"\n",(0,r.jsx)(n.h2,{id:"graphql-requests-with-graphiql-app",children:"GraphQL requests with GraphiQL app"}),"\n",(0,r.jsxs)(n.p,{children:["The third-party tool, ",(0,r.jsx)(n.a,{href:"https://github.com/skevy/graphiql-app",children:"GraphiQL"}),", provides a tabbed interface\nfor editing and testing GraphQL queries and mutations.\nGraphiQL also provides access to the ",(0,r.jsx)(n.a,{href:"https://github.com/hyperledger/besu/blob/750580dcca349d22d024cc14a8171b2fa74b505a/ethereum/api/src/main/resources/schema.graphqls",children:"Besu GraphQL schema"})," from within the app."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"GraphiQL",src:t(80229).A+"",width:"2002",height:"786"})}),"\n",(0,r.jsx)(n.h2,{id:"pending",children:"Pending"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"transactionCount"})," and ",(0,r.jsx)(n.code,{children:"transactions"})," supports the Pending query."]}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:["Besu does not execute pending transactions so results from ",(0,r.jsx)(n.code,{children:"account"}),", ",(0,r.jsx)(n.code,{children:"call"}),", and ",(0,r.jsx)(n.code,{children:"estimateGas"})," for\nPending do not reflect pending transactions."]})}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(l.A,{value:"Pending transactions",label:"Pending transactions",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{pending {transactionCount}}"}\' http://localhost:8547/graphql\n'})})}),(0,r.jsx)(l.A,{value:"Result",label:"Result",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "pending": {\n "transactionCount": 2\n }\n }\n}\n'})})})]}),"\n",(0,r.jsxs)(s.A,{children:[(0,r.jsx)(l.A,{value:"Pending transactions",label:"Pending transactions",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{pending {transactions{hash}}}"}\' http://localhost:8547/graphql\n'})})}),(0,r.jsx)(l.A,{value:"Result",label:"Result",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "data": {\n "pending": {\n "transactions": [\n {\n "hash": "0xbb3ab8e2113a4afdde9753782cb0680408c0d5b982572dda117a4c72fafbf3fa"\n },\n {\n "hash": "0xf6bd6b1bccf765024bd482a71c6855428e2903895982090ab5dbb0feda717af6"\n }\n ]\n }\n }\n}\n'})})})]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>l});t(96540);var r=t(18215);const a={tabItem:"tabItem_Ymn6"};var s=t(74848);function l(e){let{children:n,hidden:t,className:l}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.A)(a.tabItem,l),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>q});var r=t(96540),a=t(18215),s=t(23104),l=t(56347),i=t(205),o=t(57485),c=t(31682),u=t(70679);function h(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function d(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:a}}=e;return{value:n,label:t,attributes:r,default:a}}))}(t);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function b(e){let{queryString:n=!1,groupId:t}=e;const a=(0,l.W6)(),s=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,o.aZ)(s),(0,r.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(a.location.search);n.set(s,e),a.replace({...a.location,search:n.toString()})}),[s,a])]}function g(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,s=d(e),[l,o]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:s}))),[c,h]=b({queryString:t,groupId:a}),[g,f]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,s]=(0,u.Dv)(t);return[a,(0,r.useCallback)((e=>{t&&s.set(e)}),[t,s])]}({groupId:a}),m=(()=>{const e=c??g;return p({value:e,tabValues:s})?e:null})();(0,i.A)((()=>{m&&o(m)}),[m]);return{selectedValue:l,selectValue:(0,r.useCallback)((e=>{if(!p({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);o(e),h(e),f(e)}),[h,f,s]),tabValues:s}}var f=t(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=t(74848);function j(e){let{className:n,block:t,selectedValue:r,selectValue:l,tabValues:i}=e;const o=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.a_)(),u=e=>{const n=e.currentTarget,t=o.indexOf(n),a=i[t].value;a!==r&&(c(n),l(a))},h=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const t=o.indexOf(e.currentTarget)+1;n=o[t]??o[0];break}case"ArrowLeft":{const t=o.indexOf(e.currentTarget)-1;n=o[t]??o[o.length-1];break}}n?.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:i.map((e=>{let{value:n,label:t,attributes:s}=e;return(0,x.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>o.push(e),onKeyDown:h,onClick:u,...s,className:(0,a.A)("tabs__item",m.tabItem,s?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function v(e){let{lazy:n,children:t,selectedValue:s}=e;const l=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=l.find((e=>e.props.value===s));return e?(0,r.cloneElement)(e,{className:(0,a.A)("margin-top--md",e.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:l.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function w(e){const n=g(e);return(0,x.jsxs)("div",{className:(0,a.A)("tabs-container",m.tabList),children:[(0,x.jsx)(j,{...n,...e}),(0,x.jsx)(v,{...n,...e})]})}function q(e){const n=(0,f.A)();return(0,x.jsx)(w,{...e,children:h(e.children)},String(n))}},80229:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/GraphiQL-a6360ff9467a3f33ade0bf00e6eec49e.png"},28453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>i});var r=t(96540);const a={},s=r.createContext(a);function l(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:l(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b0eb7c42.6e5f4dae.js b/assets/js/b0eb7c42.6e5f4dae.js new file mode 100644 index 00000000000..b5350a00a11 --- /dev/null +++ b/assets/js/b0eb7c42.6e5f4dae.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5580],{2414:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>l});var s=t(74848),o=t(28453);const i={title:"Node clients",sidebar_position:1,description:"Learn about execution and consensus clients.",tags:["public networks"]},c="Node clients",r={id:"public-networks/concepts/node-clients",title:"Node clients",description:"Learn about execution and consensus clients.",source:"@site/docs/public-networks/concepts/node-clients.md",sourceDirName:"public-networks/concepts",slug:"/public-networks/concepts/node-clients",permalink:"/public-networks/concepts/node-clients",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/concepts/node-clients.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Node clients",sidebar_position:1,description:"Learn about execution and consensus clients.",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Concepts",permalink:"/public-networks/concepts"},next:{title:"Proof of stake consensus",permalink:"/public-networks/concepts/proof-of-stake/"}},a={},l=[{value:"Execution and consensus clients",id:"execution-and-consensus-clients",level:2},{value:"Execution clients",id:"execution-clients",level:3},{value:"Consensus clients",id:"consensus-clients",level:3},{value:"Validator clients",id:"validator-clients",level:4}];function d(e){const n={a:"a",admonition:"admonition",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",img:"img",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"node-clients",children:"Node clients"})}),"\n",(0,s.jsxs)(n.p,{children:["Ethereum's Proof of Stake (PoS) protocol leverages two separate P2P networks supporting\nseparate clients. Execution clients gossip transactions over their network, enabling them to manage\ntheir local transaction pool. Consensus clients gossip blocks over their network, enabling consensus\nand chain growth. A validator node also runs the ",(0,s.jsx)(n.a,{href:"#validator-clients",children:"validator client"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["As as result of ",(0,s.jsx)(n.a,{href:"https://ethereum.org/en/upgrades/merge/",children:"the 2022 Merge"}),", Ethereum Mainnet\ntransitioned from Proof of Work (PoW) to ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/proof-of-stake/",children:"PoS"})," consensus."]})}),"\n",(0,s.jsx)(n.h2,{id:"execution-and-consensus-clients",children:"Execution and consensus clients"}),"\n",(0,s.jsxs)(n.p,{children:["Under PoS, a full Ethereum Mainnet node is a combination of an execution client (previously called\nan ",(0,s.jsx)(n.a,{href:"https://blog.ethereum.org/2022/01/24/the-great-eth2-renaming/",children:"Eth1 client"})," client) and a\nconsensus client (previously called an\n",(0,s.jsx)(n.a,{href:"https://blog.ethereum.org/2022/01/24/the-great-eth2-renaming/",children:"Eth2 client"}),"). The consensus client\nuses the ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-engine-api",children:"Engine API"})," to communicate with the execution client."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Ethereum Merge node",src:t(12573).A+"",width:"1542",height:"1134"})}),"\n",(0,s.jsx)(n.h3,{id:"execution-clients",children:"Execution clients"}),"\n",(0,s.jsxs)(n.p,{children:["Execution clients, such as Besu, manage the execution layer, including executing transactions and\nupdating the world state. Execution clients serve ",(0,s.jsx)(n.a,{href:"/public-networks/reference/engine-api/",children:"JSON-RPC API"}),"\nrequests and communicate with each other P2P."]}),"\n",(0,s.jsx)(n.p,{children:"Besu is an execution client that you can run with:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/get-started/connect/mainnet",children:"Any consensus client on Mainnet"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/get-started/connect/testnet",children:"Any consensus client on a testnet"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/tutorials/besu-teku-mainnet",children:"Teku on Mainnet"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/public-networks/tutorials/besu-teku-testnet",children:"Teku on a testnet"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"consensus-clients",children:"Consensus clients"}),"\n",(0,s.jsxs)(n.p,{children:["The consensus client (also known as the beacon node, CL client or, formerly, the Eth2 client)\nimplements the PoS consensus algorithm, which enables the network to achieve agreement based on\nvalidated data from the execution client. Consensus clients serve\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/reference/rest",children:"REST API"})," requests and\ncommunicate with each other P2P."]}),"\n",(0,s.jsxs)(n.p,{children:["Consensus clients, such as ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/en/latest/",children:"Teku"})," contain beacon node\nimplementations. The beacon node is the primary link to the ",(0,s.jsx)(n.a,{href:"https://ethereum.org/en/upgrades/beacon-chain/",children:"Beacon Chain"})," (i.e. the consensus layer).\nA consensus client can run without the (bundled) validator to keep up with the head of the chain,\nallowing the node to stay synced."]}),"\n",(0,s.jsx)(n.h4,{id:"validator-clients",children:"Validator clients"}),"\n",(0,s.jsxs)(n.p,{children:["To operate a validator node, node operators must also run a validator client and deposit the\n",(0,s.jsx)(n.a,{href:"https://ethereum.org/en/developers/docs/consensus-mechanisms/pos/#validators",children:"required ETH"})," into the\ndeposit contract. The validator client handles attestations and block proposal \u2014 i.e. performs\n",(0,s.jsx)(n.a,{href:"/public-networks/concepts/proof-of-stake/",children:"validator duties"})," on the consensus layer.\nThe validator client may either be run\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/get-started/start-teku#start-the-clients-in-a-single-process",children:"in the same process"}),"\nas the beacon node or ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/get-started/start-teku#run-the-clients-separately",children:"separately"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Validators earn ",(0,s.jsx)(n.a,{href:"https://www.blocknative.com/ethereum-staking-calculator",children:"rewards"})," for performing\n",(0,s.jsx)(n.a,{href:"/public-networks/concepts/proof-of-stake/",children:"validator duties"}),", and\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/reference/cli#validators-proposer-default-fee-recipient",children:"fee recipients"}),"\nalso earn rewards for the inclusion of execution layer transactions."]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},12573:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/Execution-Consensus-Clients-EngineAPI-92aa028e4d500a83a7887cdcf7724db8.png"},28453:(e,n,t)=>{t.d(n,{R:()=>c,x:()=>r});var s=t(96540);const o={},i=s.createContext(o);function c(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:c(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b2d12fc2.bc73913d.js b/assets/js/b2d12fc2.bc73913d.js new file mode 100644 index 00000000000..2d5d104076b --- /dev/null +++ b/assets/js/b2d12fc2.bc73913d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7949],{37680:(e,t,o)=>{o.r(t),o.d(t,{assets:()=>l,contentTitle:()=>s,default:()=>h,frontMatter:()=>r,metadata:()=>a,toc:()=>c});var i=o(74848),n=o(28453);const r={title:"Use Grafana Loki",sidebar_position:2,description:"Using Grafana Loki log management platform with Besu",tags:["private networks"]},s="Grafana Loki",a={id:"private-networks/how-to/monitor/loki",title:"Use Grafana Loki",description:"Using Grafana Loki log management platform with Besu",source:"@site/docs/private-networks/how-to/monitor/loki.md",sourceDirName:"private-networks/how-to/monitor",slug:"/private-networks/how-to/monitor/loki",permalink:"/private-networks/how-to/monitor/loki",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/monitor/loki.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Use Grafana Loki",sidebar_position:2,description:"Using Grafana Loki log management platform with Besu",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Monitoring",permalink:"/private-networks/how-to/monitor/"},next:{title:"Use Elastic Stack",permalink:"/private-networks/how-to/monitor/elastic-stack"}},l={},c=[];function d(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",header:"header",img:"img",li:"li",ol:"ol",p:"p",...(0,n.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"grafana-loki",children:"Grafana Loki"})}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"https://grafana.com/oss/loki/",children:"Grafana Loki"})," is an open-source log management platform that is available when using the ",(0,i.jsx)(t.a,{href:"/private-networks/tutorials/quickstart",children:"Developer Quickstart"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart/blob/master/files/common/promtail/promtail.yml",children:"Promtail configuration"})," ingests logs at regular defined intervals and outputs them to ",(0,i.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart/blob/master/files/common/loki/loki.yml",children:"Loki"})," for storage."]}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.code,{children:"pipeline configuration"})," in Promtail defines pipeline stages that can collate logs natively or using the JSON format."]}),"\n",(0,i.jsx)(t.admonition,{type:"note",children:(0,i.jsxs)(t.p,{children:["If using the pipeline regex stage in ",(0,i.jsx)(t.code,{children:"Promtail"}),", configuration must match your log format."]})}),"\n",(0,i.jsx)(t.p,{children:"To view the GoQuorum Quickstart network logs in Loki:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"/private-networks/tutorials/quickstart",children:"Start the Developer Quickstart with Besu"}),", selecting Loki monitoring."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Open the ",(0,i.jsx)(t.a,{href:"http://localhost:3000/d/Ak6eXLsPxFemKYKEXfcH/quorum-logs-loki?orgId=1&var-app=besu&var-search=&from=now-15m&to=now",children:(0,i.jsx)(t.code,{children:"Grafana Loki address"})})," listed by the sample networks ",(0,i.jsx)(t.code,{children:"list.sh"})," script."]}),"\n",(0,i.jsx)(t.p,{children:"The logs display in Loki."}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Loki logs",src:o(60119).A+"",width:"1915",height:"898"})}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},60119:(e,t,o)=>{o.d(t,{A:()=>i});const i=o.p+"assets/images/grafana_loki-b7ec065514dfe7bb716e9029bda5c056.png"},28453:(e,t,o)=>{o.d(t,{R:()=>s,x:()=>a});var i=o(96540);const n={},r=i.createContext(n);function s(e){const t=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),i.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b4b83649.e1b7333f.js b/assets/js/b4b83649.e1b7333f.js new file mode 100644 index 00000000000..857a1b76c66 --- /dev/null +++ b/assets/js/b4b83649.e1b7333f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4397],{4881:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var r=t(74848),s=t(28453);const i={title:"Start Besu",description:"Start Besu on a private Ethereum network.",sidebar_position:3,tags:["private networks"]},o="Start Besu",a={id:"private-networks/get-started/start-node",title:"Start Besu",description:"Start Besu on a private Ethereum network.",source:"@site/docs/private-networks/get-started/start-node.md",sourceDirName:"private-networks/get-started",slug:"/private-networks/get-started/start-node",permalink:"/private-networks/get-started/start-node",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/get-started/start-node.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Start Besu",description:"Start Besu on a private Ethereum network.",sidebar_position:3,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Install binary distribution",permalink:"/private-networks/get-started/install/binary-distribution"},next:{title:"How to",permalink:"/private-networks/how-to/"}},c={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Local block data",id:"local-block-data",level:2},{value:"Genesis configuration",id:"genesis-configuration",level:2},{value:"Confirm node is running",id:"confirm-node-is-running",level:2},{value:"Run a node for testing",id:"run-a-node-for-testing",level:2},{value:"Run a node on a private network",id:"run-a-node-on-a-private-network",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"start-besu",children:"Start Besu"})}),"\n",(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.a,{href:"/private-networks/reference/cli/options",children:(0,r.jsx)(n.code,{children:"besu"})})," command with the required command line options to start a node."]}),"\n",(0,r.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.a,{href:"/private-networks/get-started/install/binary-distribution",children:"Besu installed"})}),"\n",(0,r.jsx)(n.h2,{id:"local-block-data",children:"Local block data"}),"\n",(0,r.jsxs)(n.p,{children:["When connecting to a network other than the network previously connected to, you must either delete the local block data or use the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(n.code,{children:"--data-path"})})," option to specify a different data directory."]}),"\n",(0,r.jsxs)(n.p,{children:["To delete the local block data, delete the ",(0,r.jsx)(n.code,{children:"database"})," directory in the ",(0,r.jsx)(n.code,{children:"besu/build/distribution/besu-"})," directory."]}),"\n",(0,r.jsx)(n.h2,{id:"genesis-configuration",children:"Genesis configuration"}),"\n",(0,r.jsxs)(n.p,{children:["To define a genesis configuration, create a ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/genesis-file",children:"genesis file"})," (for example, ",(0,r.jsx)(n.code,{children:"genesis.json"}),") and specify the file using the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#genesis-file",children:(0,r.jsx)(n.code,{children:"--genesis-file"})})," option."]}),"\n",(0,r.jsxs)(n.p,{children:["When you specify ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#network",children:(0,r.jsx)(n.code,{children:"--network=dev"})}),", Besu uses the development mode genesis configuration with a fixed low difficulty. A node started with ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#network",children:(0,r.jsx)(n.code,{children:"--network=dev"})})," has an empty bootnodes list by default."]}),"\n",(0,r.jsxs)(n.p,{children:["Predefined genesis configurations for named networks are in the ",(0,r.jsx)(n.a,{href:"https://github.com/hyperledger/besu/tree/master/config/src/main/resources",children:"Besu source files"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"confirm-node-is-running",children:"Confirm node is running"}),"\n",(0,r.jsxs)(n.p,{children:["If you started Besu with the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,r.jsx)(n.code,{children:"--rpc-http-enabled"})})," option, use ",(0,r.jsx)(n.a,{href:"https://curl.haxx.se/",children:"cURL"})," to call ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/",children:"JSON-RPC API methods"})," to confirm the node is running."]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"eth_chainId"})," returns the chain ID of the network."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}\' localhost:8545\n'})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.code,{children:"eth_syncing"})," returns the starting, current, and highest block."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}\' localhost:8545\n'})}),"\n",(0,r.jsxs)(n.p,{children:["For example, after connecting to Mainnet, ",(0,r.jsx)(n.code,{children:"eth_syncing"})," will return something similar to:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "startingBlock": "0x0",\n "currentBlock": "0x2d0",\n "highestBlock": "0x66c0"\n }\n}\n'})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"run-a-node-for-testing",children:"Run a node for testing"}),"\n",(0,r.jsx)(n.p,{children:"To run a node that mines blocks at a rate suitable for testing purposes:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --network=dev --miner-enabled --miner-coinbase=0xfe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-http-cors-origins="all" --host-allowlist="*" --rpc-ws-enabled --rpc-http-enabled --data-path=/tmp/tmpDatdir\n'})}),"\n",(0,r.jsxs)(n.p,{children:["You can also use the following ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/",children:"configuration file"})," on the command line to start a node with the same options as above:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-toml",children:'network="dev"\nminer-enabled=true\nminer-coinbase="0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"\nrpc-http-cors-origins=["all"]\nhost-allowlist=["*"]\nrpc-ws-enabled=true\nrpc-http-enabled=true\ndata-path="/tmp/tmpdata-path"\n'})}),"\n",(0,r.jsxs)(n.admonition,{type:"caution",children:[(0,r.jsx)(n.p,{children:"The following settings are a security risk in production environments:"}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Enabling the HTTP JSON-RPC service (",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,r.jsx)(n.code,{children:"--rpc-http-enabled"})}),") and setting ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-host",children:(0,r.jsx)(n.code,{children:"--rpc-http-host"})})," to 0.0.0.0 exposes the RPC connection on your node to any remote connection."]}),"\n",(0,r.jsxs)(n.li,{children:["Setting ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#host-allowlist",children:(0,r.jsx)(n.code,{children:"--host-allowlist"})})," to ",(0,r.jsx)(n.code,{children:'"*"'})," allows JSON-RPC API access from any host."]}),"\n",(0,r.jsxs)(n.li,{children:["Setting ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-cors-origins",children:(0,r.jsx)(n.code,{children:"--rpc-http-cors-origins"})})," to ",(0,r.jsx)(n.code,{children:'"all"'})," or ",(0,r.jsx)(n.code,{children:'"*"'})," allows cross-origin resource sharing (CORS) access from any domain."]}),"\n"]})]}),"\n",(0,r.jsx)(n.h2,{id:"run-a-node-on-a-private-network",children:"Run a node on a private network"}),"\n",(0,r.jsx)(n.p,{children:"To run a node on your private network specifying a genesis file and data directory:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"besu --genesis-file=/genesis.json --data-path= --rpc-http-enabled --bootnodes=\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Where ",(0,r.jsx)(n.code,{children:""})," is the path to the directory to save the chain data to. Ensure you configure a peer discovery method, such as ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/bootnodes",children:"bootnodes"}),"."]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["You might need to set ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-limit-by-account-percentage",children:(0,r.jsx)(n.code,{children:"--tx-pool-limit-by-account-percentage"})})," to 1. The default value is suitable for Mainnet, but may cause issues on private networks."]})}),"\n",(0,r.jsxs)(n.admonition,{title:"Sync nodes for BFT",type:"note",children:[(0,r.jsxs)(n.p,{children:["If you're running a node on a ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft",children:"QBFT"})," or ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft",children:"IBFT 2.0"})," network, your node must use ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/node-sync#fast-synchronization-deprecated",children:"fast sync"})," or ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/node-sync#full-synchronization",children:"full sync"}),"."]}),(0,r.jsx)(n.p,{children:"Full sync is set by default."})]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var r=t(96540);const s={},i=r.createContext(s);function o(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b5388cc7.55c8c0c9.js b/assets/js/b5388cc7.55c8c0c9.js new file mode 100644 index 00000000000..e342fe5e174 --- /dev/null +++ b/assets/js/b5388cc7.55c8c0c9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4872],{78814:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>l,contentTitle:()=>c,default:()=>b,frontMatter:()=>o,metadata:()=>d,toc:()=>h});var t=a(74848),i=a(28453),s=a(11470),r=a(19365);const o={title:"QBFT",description:"Besu QBFT proof of authority (PoA) consensus protocol implementation",sidebar_position:2,tags:["private networks"]},c="Configure QBFT consensus",d={id:"private-networks/how-to/configure/consensus/qbft",title:"QBFT",description:"Besu QBFT proof of authority (PoA) consensus protocol implementation",source:"@site/docs/private-networks/how-to/configure/consensus/qbft.md",sourceDirName:"private-networks/how-to/configure/consensus",slug:"/private-networks/how-to/configure/consensus/qbft",permalink:"/private-networks/how-to/configure/consensus/qbft",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/configure/consensus/qbft.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"QBFT",description:"Besu QBFT proof of authority (PoA) consensus protocol implementation",sidebar_position:2,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Consensus protocols",permalink:"/private-networks/how-to/configure/consensus/"},next:{title:"IBFT 2.0",permalink:"/private-networks/how-to/configure/consensus/ibft"}},l={},h=[{value:"Genesis file",id:"genesis-file",level:2},{value:"Extra data",id:"extra-data",level:3},{value:"Generate extra data",id:"generate-extra-data",level:4},{value:"Block time",id:"block-time",level:3},{value:"Tune block timeout",id:"tune-block-timeout",level:4},{value:"Optional configuration options",id:"optional-configuration-options",level:3},{value:"Post-Merge configuration",id:"post-merge-configuration",level:3},{value:"Add and remove validators",id:"add-and-remove-validators",level:2},{value:"Add and remove validators using block headers",id:"add-and-remove-validators-using-block-headers",level:3},{value:"Add a validator",id:"add-a-validator",level:4},{value:"Remove a validator",id:"remove-a-validator",level:4},{value:"Epoch transition",id:"epoch-transition",level:4},{value:"Add and remove validators using a smart contract",id:"add-and-remove-validators-using-a-smart-contract",level:3},{value:"Minimum number of validators",id:"minimum-number-of-validators",level:3},{value:"Transitions",id:"transitions",level:2},{value:"Configure block time on an existing network",id:"configure-block-time-on-an-existing-network",level:3},{value:"Configure block rewards on an existing network",id:"configure-block-rewards-on-an-existing-network",level:3},{value:"Swap validator management methods",id:"swap-validator-management-methods",level:3},{value:"Configure the mining beneficiary on an existing network",id:"configure-the-mining-beneficiary-on-an-existing-network",level:3}];function f(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"configure-qbft-consensus",children:"Configure QBFT consensus"})}),"\n",(0,t.jsxs)(n.p,{children:["Besu implements the QBFT proof of authority (PoA) ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/",children:"consensus protocol"}),". QBFT is the recommended enterprise-grade consensus protocol for private networks."]}),"\n",(0,t.jsx)(n.p,{children:"In QBFT networks, approved accounts, known as validators, validate transactions and blocks. Validators take turns to create the next block. Before inserting the block onto the chain, a super-majority (greater than or equal to 2/3) of validators must first sign the block."}),"\n",(0,t.jsxs)(n.p,{children:["Existing validators propose and vote to ",(0,t.jsx)(n.a,{href:"#add-and-remove-validators",children:"add or remove validators"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["You can ",(0,t.jsx)(n.a,{href:"/private-networks/tutorials/qbft",children:"create a private network using QBFT"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsx)(n.p,{children:"Configure your network to ensure you never lose more than 1/3 of your validators.\nIf more than 1/3 of validators stop participating, the network stops creating new blocks and stalls.\nIt might take significant time to recover after nodes are restarted."})}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["You can use a plugin to securely store a validator's key using the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#security-module",children:(0,t.jsx)(n.code,{children:"--security-module"})})," option."]})}),"\n",(0,t.jsxs)(n.admonition,{title:"Early access feature",type:"info",children:[(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"--Xsnapsync-bft-enabled"})," is an early access feature available in Besu version 24.7.1 and later.\nIt is not stable, so use this option with caution."]}),(0,t.jsxs)(n.p,{children:["Use ",(0,t.jsx)(n.code,{children:"--Xsnapsync-bft-enabled"})," with ",(0,t.jsx)(n.code,{children:"--sync-mode=SNAP"})," to enable\n",(0,t.jsx)(n.a,{href:"/private-networks/concepts/node-sync-private",children:"snap sync"})," in QBFT networks."]})]}),"\n",(0,t.jsx)(n.h2,{id:"genesis-file",children:"Genesis file"}),"\n",(0,t.jsxs)(n.p,{children:["To use QBFT, define a ",(0,t.jsx)(n.a,{href:"/public-networks/concepts/genesis-file",children:"genesis file"})," that contains the QBFT properties."]}),"\n",(0,t.jsxs)(n.p,{children:["The genesis file differs depending on the ",(0,t.jsx)(n.a,{href:"#add-and-remove-validators",children:"validator management method"})," you intend to use."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["You can use a ",(0,t.jsx)(n.a,{href:"#transitions",children:"transitions"})," to change the ",(0,t.jsx)(n.code,{children:"blockperiodseconds"})," or validator management method of the network at a later time."]})}),"\n",(0,t.jsxs)(s.A,{children:[(0,t.jsx)(r.A,{value:"Block header validator selection",label:"Block header validator selection",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n "chainid": 1337,\n "berlinBlock": 0,\n "qbft": {\n "epochlength": 30000,\n "blockperiodseconds": 5,\n "requesttimeoutseconds": 10\n }\n },\n "nonce": "0x0",\n "timestamp": "0x5b3d92d7",\n "extraData": "0xf87aa00000000000000000000000000000000000000000000000000000000000000000f8549464a702e6263b7297a96638cac6ae65e6541f4169943923390ad55e90c237593b3b0e401f3b08a0318594aefdb9a738c9f433e5b6b212a6d62f6370c2f69294c7eeb9a4e00ce683cf93039b212648e01c6c6b78c080c0",\n "gasLimit": "0x29b92700",\n "difficulty": "0x1",\n "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",\n "coinbase": "0x0000000000000000000000000000000000000000",\n "alloc": {\n "64d9be4177f418bcf4e56adad85f33e3a64efe22": {\n "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"\n },\n "9f66f8a0f0a6537e4a36aa1799673ea7ae97a166": {\n "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"\n },\n "a7f25969fb6f3d5ac09a88862c90b5ff664557a7": {\n "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"\n },\n "f4bbfd32c11c9d63e9b4c77bb225810f840342df": {\n "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"\n }\n },\n "number": "0x0",\n "gasUsed": "0x0",\n "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"\n}\n'})})}),(0,t.jsx)(r.A,{value:"Contract validator selection",label:"Contract validator selection",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n "chainid": 1337,\n "berlinBlock": 0,\n "qbft": {\n "epochlength": 30000,\n "blockperiodseconds": 5,\n "requesttimeoutseconds": 10,\n "validatorcontractaddress": "0x0000000000000000000000000000000000007777"\n }\n },\n "nonce": "0x0",\n "timestamp": "0x5b3d92d7",\n "extraData": "0xe5a00000000000000000000000000000000000000000000000000000000000000000c0c080c0",\n "gasLimit": "0x29b92700",\n "difficulty": "0x1",\n "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",\n "coinbase": "0x0000000000000000000000000000000000000000",\n "alloc": {\n "64d9be4177f418bcf4e56adad85f33e3a64efe22": {\n "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"\n },\n "9f66f8a0f0a6537e4a36aa1799673ea7ae97a166": {\n "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"\n },\n "a7f25969fb6f3d5ac09a88862c90b5ff664557a7": {\n "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"\n },\n "f4bbfd32c11c9d63e9b4c77bb225810f840342df": {\n "balance": "0x446c3b15f9926687d2c40534fdb564000000000000"\n },\n "0x0000000000000000000000000000000000007777": {\n "comment": "validator smart contract",\n "balance": "0",\n "code": "0x608060405234801561001057600080fd5b50600436106100a5576000357c0100000000000000000000000000000000000000000000000000000000900480639692ea25116100785780639692ea2514610113578063b4ec9ac114610126578063b7ab4db514610139578063c76f24371461014e57600080fd5b80631c5a9d9c146100aa578063508adcfc146100bf57806351b42b00146100db5780635dc43899146100e3575b600080fd5b6100bd6100b8366004611399565b610161565b005b6100c860035481565b6040519081526020015b60405180910390f35b6100bd6104aa565b6100f66100f1366004611399565b61074e565b6040805193845260208401929092521515908201526060016100d2565b6100bd610121366004611399565b610bbd565b6100bd610134366004611399565b610deb565b6101416110a3565b6040516100d291906113c9565b6100bd61015c366004611399565b611105565b3360009081526001602052604090205460ff1661019c5760405160e560020a62461bcd02815260040161019390611416565b60405180910390fd5b600160a060020a03811661021b5760405160e560020a62461bcd02815260206004820152602860248201527f63616e6e6f742061637469766174652076616c696461746f722077697468206160448201527f64647265737320300000000000000000000000000000000000000000000000006064820152608401610193565b60005b6000548110156102b7576000818154811061023b5761023b611505565b600091825260209091200154600160a060020a03838116911614156102a55760405160e560020a62461bcd02815260206004820152601b60248201527f76616c696461746f7220697320616c72656164792061637469766500000000006044820152606401610193565b806102af816114b8565b91505061021e565b33600090815260016020526040902054610100900460ff16156103345733600090815260016020526040812054815484929162010000900460ff1690811061030157610301611505565b9060005260206000200160006101000a815481600160a060020a030219169083600160a060020a03160217905550610432565b600054610100116103b05760405160e560020a62461bcd02815260206004820152602e60248201527f6e756d626572206f662076616c696461746f72732063616e6e6f74206265206c60448201527f6172676572207468616e203235360000000000000000000000000000000000006064820152608401610193565b3360009081526001602081905260408220805461ff001981166101009081178355845460ff16620100000262ffff001990921691909117179055815490810182559080527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563018054600160a060020a038416600160a060020a03199091161790555b600160a060020a0382166000818152600260205260408082208054600160a060020a03191633908117909155915490519192917fbdea108da876d927928b65816d521f940fd6dc068dc0e02ba434e0ed0f2d915f9161049e916001909182521515602082015260400190565b60405180910390a35050565b3360009081526001602052604090205460ff166104dc5760405160e560020a62461bcd02815260040161019390611416565b6000546001106105315760405160e560020a62461bcd02815260206004820181905260248201527f63616e6e6f742064656163746976617465206c6173742076616c696461746f726044820152606401610193565b33600090815260016020526040902054610100900460ff166105be5760405160e560020a62461bcd02815260206004820152602860248201527f73656e64657220646f6573206e6f74206861766520616e20616374697665207660448201527f616c696461746f720000000000000000000000000000000000000000000000006064820152608401610193565b336000908152600160205260408120805461ff0019169081905581546201000090910460ff1691908190839081106105f8576105f8611505565b60009182526020822001548154600160a060020a03909116925081906106209060019061148a565b8154811061063057610630611505565b60009182526020822001548154600160a060020a03909116925082919060ff861690811061066057610660611505565b60009182526020808320919091018054600160a060020a031916600160a060020a03948516179055838316825260028152604080832054909316825260019052908120805462ff000019166201000060ff8716021790558054806106c6576106c66114ec565b6000828152602080822060001990840181018054600160a060020a03199081169091559301909355600160a060020a03851680825260028452604080832080549094169093558154835190815293840191909152339290917fbdea108da876d927928b65816d521f940fd6dc068dc0e02ba434e0ed0f2d915f910160405180910390a3505050565b336000908152600160205260408120548190819060ff166107845760405160e560020a62461bcd02815260040161019390611416565b60005b600160a060020a03851660009081526004602052604090205481101561082357600160a060020a038516600090815260046020526040812080546001929190849081106107d6576107d6611505565b6000918252602080832090910154600160a060020a0316835282019290925260400190205460ff1615610811578361080d816114b8565b9450505b8061081b816114b8565b915050610787565b5060026003546108339190611465565b831115610b8657600160a060020a038416600090815260046020526040812061085b9161135f565b600160a060020a03841660009081526001602052604090205460ff1615610ab0576003805490600061088c836114a1565b9091555050600160a060020a038416600090815260016020526040902054610100900460ff1615610a89576000546001106109325760405160e560020a62461bcd02815260206004820152603860248201527f63616e6e6f742072656d6f766520616c6c6f776564206163636f756e7420776960448201527f7468206c617374206163746976652076616c696461746f7200000000000000006064820152608401610193565b600160a060020a03841660009081526001602052604081205481546201000090910460ff169160029181908490811061096d5761096d611505565b6000918252602080832090910154600160a060020a0316835282019290925260400181208054600160a060020a0319169055805481906109af9060019061148a565b815481106109bf576109bf611505565b60009182526020822001548154600160a060020a03909116925082919060ff85169081106109ef576109ef611505565b600091825260208220018054600160a060020a031916600160a060020a039390931692909217909155805480610a2757610a276114ec565b6000828152602080822083016000199081018054600160a060020a0319169055909201909255600160a060020a0392831682526002815260408083205490931682526001905220805460ff909216620100000262ff0000199092169190911790555b600160a060020a0384166000908152600160205260409020805462ffffff19169055610b32565b60038054906000610ac0836114b8565b909155505060408051606081018252600180825260006020808401828152848601838152600160a060020a038b16845293909152939020915182549351915160ff16620100000262ff0000199215156101000261ff00199215159290921661ffff199095169490941717169190911790555b600160a060020a03841660008181526001602090815260409182902054915160ff909216151582527f94154efdb7741591680558a88682943a481f1a468cb81f46fe7f8cead2e40519910160405180910390a25b826002600354610b969190611465565b610ba190600161144d565b6002600354610bb09190611465565b9196909550931192915050565b3360009081526001602052604090205460ff16610bef5760405160e560020a62461bcd02815260040161019390611416565b60005b600160a060020a038216600090815260046020526040902054811015610d4b57600160a060020a0382166000908152600460205260409020805433919083908110610c3f57610c3f611505565b600091825260209091200154600160a060020a03161415610d3957600160a060020a03821660009081526004602052604090208054610c809060019061148a565b81548110610c9057610c90611505565b6000918252602080832090910154600160a060020a03858116845260049092526040909220805491909216919083908110610ccd57610ccd611505565b60009182526020808320919091018054600160a060020a031916600160a060020a039485161790559184168152600490915260409020805480610d1257610d126114ec565b60008281526020902081016000199081018054600160a060020a0319169055019055610d4b565b80610d43816114b8565b915050610bf2565b50600160a060020a0381166000818152600460205260409020546003543392917f91ad81c76cda7c0ccc324838ae74757eab38b250da52daab154daf408cb3bcba91610d9990600290611465565b610da490600161144d565b600160a060020a0386166000908152600160208181526040928390205483519586529085019390935260ff909216159083015260608201526080015b60405180910390a350565b3360009081526001602052604090205460ff16610e1d5760405160e560020a62461bcd02815260040161019390611416565b600160a060020a038116610e765760405160e560020a62461bcd02815260206004820152601f60248201527f6163636f756e7420746f2062652061646465642063616e6e6f742062652030006044820152606401610193565b600160a060020a03811660009081526001602081905260409091205460ff16151514610f0d5760405160e560020a62461bcd02815260206004820152602a60248201527f6163636f756e7420746f2072656d6f7665206973206e6f74206f6e207468652060448201527f616c6c6f77206c697374000000000000000000000000000000000000000000006064820152608401610193565b60005b600160a060020a038216600090815260046020526040902054811015610ffb57600160a060020a0382166000908152600460205260409020805433919083908110610f5d57610f5d611505565b600091825260209091200154600160a060020a03161415610fe95760405160e560020a62461bcd02815260206004820152602a60248201527f73656e6465722068617320616c726561647920766f74656420746f2072656d6f60448201527f7665206163636f756e74000000000000000000000000000000000000000000006064820152608401610193565b80610ff3816114b8565b915050610f10565b50600160a060020a0381166000818152600460209081526040822080546001810182558184529183209091018054600160a060020a0319163390811790915591839052546003549192917f91ad81c76cda7c0ccc324838ae74757eab38b250da52daab154daf408cb3bcba919061107490600290611465565b61107f90600161144d565b60408051928352602083019190915260009082018190526060820152608001610de0565b606060008054806020026020016040519081016040528092919081815260200182805480156110fb57602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116110dd575b5050505050905090565b3360009081526001602052604090205460ff166111375760405160e560020a62461bcd02815260040161019390611416565b600160a060020a03811660009081526001602052604090205460ff16156111c95760405160e560020a62461bcd02815260206004820152602b60248201527f6163636f756e7420746f2061646420697320616c7265616479206f6e2074686560448201527f20616c6c6f77206c6973740000000000000000000000000000000000000000006064820152608401610193565b60005b600160a060020a0382166000908152600460205260409020548110156112b757600160a060020a038216600090815260046020526040902080543391908390811061121957611219611505565b600091825260209091200154600160a060020a031614156112a55760405160e560020a62461bcd02815260206004820152602760248201527f73656e6465722068617320616c726561647920766f74656420746f206164642060448201527f6163636f756e74000000000000000000000000000000000000000000000000006064820152608401610193565b806112af816114b8565b9150506111cc565b50600160a060020a0381166000818152600460209081526040822080546001810182558184529183209091018054600160a060020a0319163390811790915591839052546003549192917f91ad81c76cda7c0ccc324838ae74757eab38b250da52daab154daf408cb3bcba919061133090600290611465565b61133b90600161144d565b60408051928352602083019190915260019082015260006060820152608001610de0565b508054600082559060005260206000209081019061137d9190611380565b50565b5b808211156113955760008155600101611381565b5090565b6000602082840312156113ab57600080fd5b8135600160a060020a03811681146113c257600080fd5b9392505050565b6020808252825182820181905260009190848201906040850190845b8181101561140a578351600160a060020a0316835292840192918401916001016113e5565b50909695505050505050565b6020808252601f908201527f73656e646572206973206e6f74206f6e2074686520616c6c6f77206c69737400604082015260600190565b60008219821115611460576114606114d3565b500190565b6000826114855760e060020a634e487b7102600052601260045260246000fd5b500490565b60008282101561149c5761149c6114d3565b500390565b6000816114b0576114b06114d3565b506000190190565b60006000198214156114cc576114cc6114d3565b5060010190565b60e060020a634e487b7102600052601160045260246000fd5b60e060020a634e487b7102600052603160045260246000fd5b60e060020a634e487b7102600052603260045260246000fdfea26469706673582212200c3e9c07521b155532c0de1605aae52f4ae953670f0afb0f30d320580b93213d64736f6c63430008070033",\n "storage": {\n "0000000000000000000000000000000000000000000000000000000000000000": "0000000000000000000000000000000000000000000000000000000000000002",\n "290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e563": "0000000000000000000000009a6d82ef3912d5ab60473124bccd2f2a640769d7",\n "290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e564": "00000000000000000000000065463bf6268e5cc409b6501ec846487b935a1446",\n "aedead2c33b41c31b4afd2246c6bf5131c209d4b0ca6c2247778ac7be7443a00": "0000000000000000000000000000000000000000000000000000000000000101",\n "33784757d5da236467d27a7c5b0cc5aa9026ca3b79e29106a67a5e93c292a523": "0000000000000000000000000000000000000000000000000000000000010101",\n "35aba1eb0bbe741ac01e5b6ce584bc042b1a0b7d115eb8f7dd02a1a1de2fd14d": "000000000000000000000000fe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "0d9217f0a1f7c602fd67052d20171ff73b156d1b87ea258cb6a5d94f71298158": "000000000000000000000000627306090abab3a6e1400e9345bc60c78a8bef57",\n "0000000000000000000000000000000000000000000000000000000000000003": "0000000000000000000000000000000000000000000000000000000000000002"\n },\n "version": "0x01"\n }\n },\n "number": "0x0",\n "gasUsed": "0x0",\n "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"\n}\n'})})})]}),"\n",(0,t.jsx)(n.p,{children:"The QBFT properties are:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"blockperiodseconds"})," - The minimum block time, in seconds."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"epochlength"})," - The number of blocks after which to reset all votes."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"requesttimeoutseconds"})," - The timeout for each consensus round before a round change, in seconds."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"blockreward"})," - Optional reward amount in Wei to reward the beneficiary. Defaults to zero (0). Can be specified as a hexadecimal (with 0x prefix) or decimal string value. If set, then all nodes on the network must use the identical value."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"validatorcontractaddress"})," - Address of the validator smart contract. Required only if using a contract validator selection. The address must be identical to the address in the ",(0,t.jsx)(n.code,{children:"alloc"})," section. This option can also be used in the ",(0,t.jsx)(n.a,{href:"#transitions",children:"transitions"})," configuration item if swapping ",(0,t.jsx)(n.a,{href:"#add-and-remove-validators",children:"validator management methods"})," in an existing network."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"miningbeneficiary"})," - Optional beneficiary of the ",(0,t.jsx)(n.code,{children:"blockreward"}),". Defaults to the validator that proposes the block. If set, then all nodes on the network must use the same beneficiary."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"#extra-data",children:(0,t.jsx)(n.code,{children:"extraData"})})," - RLP encoded ",(0,t.jsx)(n.a,{href:"#extra-data",children:"extra data"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsxs)(n.p,{children:["We don't recommend changing ",(0,t.jsx)(n.code,{children:"epochlength"})," in a running network. Changing the ",(0,t.jsx)(n.code,{children:"epochlength"})," after genesis can result in illegal blocks."]})}),"\n",(0,t.jsxs)(n.admonition,{title:"Invalid block header error",type:"caution",children:[(0,t.jsxs)(n.p,{children:["When adding a new node, if a ",(0,t.jsx)(n.code,{children:"TimeStampMoreRecentThanParent | Invalid block header"})," error occurs, the genesis file of the new node specifies a higher ",(0,t.jsx)(n.code,{children:"blockperiodseconds"})," than the imported chain. The imported chain makes new blocks faster than the genesis file allows and Besu rejects them with this error. This error most often occurs when importing chains from older versions of Besu."]}),(0,t.jsxs)(n.p,{children:["Decrease the ",(0,t.jsx)(n.code,{children:"blockperiodseconds"})," in the new QBFT genesis file to a lower value that satisfies the block header validation."]}),(0,t.jsxs)(n.p,{children:["If the error reads ",(0,t.jsx)(n.code,{children:"| TimestampMoreRecentThanParent | Invalid block header: timestamp 1619660141 is only 3 seconds newer than parent timestamp 1619660138. Minimum 4 seconds"}),", decrease the ",(0,t.jsx)(n.code,{children:"blockperiodseconds"})," from 4 seconds to 3 seconds to match the imported chain."]}),(0,t.jsxs)(n.p,{children:["After you update the new genesis file, if the imported chain has a ",(0,t.jsx)(n.code,{children:"blockperiodseconds"})," value set lower than you prefer, you can adjust it by ",(0,t.jsx)(n.a,{href:"#configure-block-time-on-an-existing-network",children:"configuring the block time on an existing QBFT network"}),"."]})]}),"\n",(0,t.jsx)(n.p,{children:"The properties with specific values in the QBFT genesis files are:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"difficulty"})," - ",(0,t.jsx)(n.code,{children:"0x1"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"mixHash"})," - ",(0,t.jsx)(n.code,{children:"0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365"})," for Istanbul block identification"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["To start a node on a QBFT private network, use the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#genesis-file",children:(0,t.jsx)(n.code,{children:"--genesis-file"})})," option to specify the custom genesis file."]}),"\n",(0,t.jsx)(n.h3,{id:"extra-data",children:"Extra data"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"extraData"})," property is an RLP encoding of:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"32 bytes of vanity data."}),"\n",(0,t.jsxs)(n.li,{children:["If using:","\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"#add-and-remove-validators-using-block-headers",children:"Block header validator selection"}),", a list of validator addresses."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"#add-and-remove-validators-using-a-smart-contract",children:"Contract validator selection"}),", no validators."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.li,{children:"Any validator votes. No vote is included in the genesis block."}),"\n",(0,t.jsx)(n.li,{children:"The round the block was created on. The round in the genesis block is 0."}),"\n",(0,t.jsx)(n.li,{children:"A list of seals of the validators (signed block hashes). No seals are included in the genesis block."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"When using block header validator selection, the important information in the genesis block extra data is the list of validators. All other details have empty values in the genesis block."}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsxs)(n.p,{children:["When using contract validator selection to manage validators, the list of validators is configured\nin the ",(0,t.jsx)(n.code,{children:"alloc"})," property's ",(0,t.jsx)(n.code,{children:"storage"})," section.\nView the ",(0,t.jsx)(n.a,{href:"https://github.com/ConsenSys/validator-smart-contracts",children:"example smart contract"})," for more\ninformation on how to generate the ",(0,t.jsx)(n.code,{children:"storage"})," section."]})}),"\n",(0,t.jsxs)(n.p,{children:["Formally, ",(0,t.jsx)(n.code,{children:"extraData"})," in the genesis block contains:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["If using block header validator selection: ",(0,t.jsx)(n.code,{children:"RLP([32 bytes Vanity, List, No Vote, Round=Int(0), 0 Seals])"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["If using contract validator selection: ",(0,t.jsx)(n.code,{children:"RLP([32 bytes Vanity, 0 Validators, No Vote, Round=Int(0), 0 Seals])"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"info",children:(0,t.jsx)(n.p,{children:"RLP encoding is a space-efficient object serialization scheme used in Ethereum."})}),"\n",(0,t.jsx)(n.h4,{id:"generate-extra-data",children:"Generate extra data"}),"\n",(0,t.jsxs)(n.p,{children:["To generate the ",(0,t.jsx)(n.code,{children:"extraData"})," RLP string for inclusion in the genesis file, use the ",(0,t.jsx)(n.a,{href:"/private-networks/reference/cli/subcommands#encode",children:(0,t.jsx)(n.code,{children:"rlp encode"})})," Besu subcommand."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",metastring:'title="Example"',children:"besu rlp encode --from=toEncode.json --type=QBFT_EXTRA_DATA\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Where the ",(0,t.jsx)(n.code,{children:"toEncode.json"})," file contains a list of the initial validators, in ascending order. To write the validator address and copy it to the ",(0,t.jsx)(n.code,{children:"toEncode.json"})," file, use the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/subcommands#export-address",children:(0,t.jsx)(n.code,{children:"public-key export-address"})})," Besu subcommand. For example:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",metastring:'title="Initial validators in toEncode.json file"',children:'[\n "0x4592c8e45706cc08b8f44b11e43cba0cfc5892cb",\n "0x06e23768a0f59cf365e18c2e0c89e151bcdedc70",\n "0xc5327f96ee02d7bcbc1bf1236b8c15148971e1de",\n "0xab5e7f4061c605820d3744227eed91ff8e2c8908"\n]\n'})}),"\n",(0,t.jsxs)(n.p,{children:["Copy the RLP encoded data to the ",(0,t.jsx)(n.code,{children:"extraData"})," property in the genesis file."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",metastring:'title="RLP encoded data"',children:"0xf87aa00000000000000000000000000000000000000000000000000000000000000000f854944592c8e45706cc08b8f44b11e43cba0cfc5892cb9406e23768a0f59cf365e18c2e0c89e151bcdedc7094c5327f96ee02d7bcbc1bf1236b8c15148971e1de94ab5e7f4061c605820d3744227eed91ff8e2c8908c080c0\n"})}),"\n",(0,t.jsxs)(n.p,{children:["When you start the network, the four nodes previously specified in ",(0,t.jsx)(n.code,{children:"toEncode.json"})," are the validators for the network."]}),"\n",(0,t.jsx)(n.h3,{id:"block-time",children:"Block time"}),"\n",(0,t.jsxs)(n.p,{children:["When the protocol receives a new chain head, the block time (",(0,t.jsx)(n.code,{children:"blockperiodseconds"}),") timer starts. When ",(0,t.jsx)(n.code,{children:"blockperiodseconds"})," expires, the round timeout (",(0,t.jsx)(n.code,{children:"requesttimeoutseconds"}),") timer starts and the protocol proposes a new block."]}),"\n",(0,t.jsxs)(n.p,{children:["If ",(0,t.jsx)(n.code,{children:"requesttimeoutseconds"})," expires before adding the proposed block, a round change occurs, with the block time and timeout timers reset. The timeout period for the new round is two times ",(0,t.jsx)(n.code,{children:"requesttimeoutseconds"}),". The timeout period continues to double each time a round fails to add a block."]}),"\n",(0,t.jsxs)(n.p,{children:["Usually, the protocol adds the proposed block before reaching ",(0,t.jsx)(n.code,{children:"requesttimeoutseconds"}),". A new round then starts, resetting the block time and round timeout timers. When ",(0,t.jsx)(n.code,{children:"blockperiodseconds"})," expires, the protocol proposes the next new block."]}),"\n",(0,t.jsx)(n.admonition,{type:"danger",children:(0,t.jsxs)(n.p,{children:["If more than 1/3 of validators stop participating, new blocks can no longer be created and ",(0,t.jsx)(n.code,{children:"requesttimeoutseconds"})," doubles with each round change. The quickest method to resume block production is to restart all validators, which resets ",(0,t.jsx)(n.code,{children:"requesttimeoutseconds"})," to its genesis value."]})}),"\n",(0,t.jsxs)(n.p,{children:["Once ",(0,t.jsx)(n.code,{children:"blockperiodseconds"})," is over, the time from proposing a block to adding the block is small (usually around one second) even in networks with geographically dispersed validators."]}),"\n",(0,t.jsx)(n.h4,{id:"tune-block-timeout",children:"Tune block timeout"}),"\n",(0,t.jsx)(n.p,{children:"To tune the block timeout for your network deployment:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Set ",(0,t.jsx)(n.code,{children:"blockperiodseconds"})," to your desired block time and ",(0,t.jsx)(n.code,{children:"requesttimeoutseconds"})," to two times ",(0,t.jsx)(n.code,{children:"blockperiodseconds"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Reduce ",(0,t.jsx)(n.code,{children:"requesttimeoutseconds"})," until you start to see round changes occurring."]}),"\n",(0,t.jsxs)(n.li,{children:["Increase ",(0,t.jsx)(n.code,{children:"requesttimeoutseconds"})," to the value where round changes are no longer occurring."]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["View ",(0,t.jsxs)(n.a,{href:"/public-networks/reference/api/#admin_changeloglevel",children:[(0,t.jsx)(n.code,{children:"TRACE"})," logs"]})," to see round change log messages."]})}),"\n",(0,t.jsxs)(n.p,{children:["Use a ",(0,t.jsx)(n.a,{href:"#transitions",children:"transition"})," to update the ",(0,t.jsx)(n.code,{children:"blockperiodseconds"})," in an existing network."]}),"\n",(0,t.jsx)(n.h3,{id:"optional-configuration-options",children:"Optional configuration options"}),"\n",(0,t.jsx)(n.p,{children:"Optional configuration options in the genesis file are:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"messageQueueLimit"})," - In large networks with limited resources, increasing the message queue limit might help with message activity surges. The default is 1000."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"duplicateMessageLimit"})," - If the same node is retransmitting messages, increasing the duplicate message limit might reduce the number of retransmissions. A value of two to three times the number of validators is usually enough. The default is 100."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"futureMessagesLimit"})," - The future messages buffer holds messages for a future chain height. For large networks, increasing the future messages limit might be useful. The default is 1000."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"futureMessagesMaxDistance"})," - The maximum height from the current chain height for buffering messages in the future messages buffer. The default is 10."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"post-merge-configuration",children:"Post-Merge configuration"}),"\n",(0,t.jsxs)(n.p,{children:["After ",(0,t.jsx)(n.a,{href:"https://ethereum.org/en/upgrades/merge/",children:"The Merge"}),", the following block fields are modified or deprecated. Their fields ",(0,t.jsx)(n.strong,{children:"must"})," contain only the constant values from the following chart."]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Field"}),(0,t.jsx)(n.th,{children:"Constant value"}),(0,t.jsx)(n.th,{children:"Comment"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"ommersHash"})})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"= Keccak256(RLP([]))"})})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"difficulty"})})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"0"})}),(0,t.jsxs)(n.td,{children:["Replaced with ",(0,t.jsx)(n.code,{children:"prevrandao"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"mixHash"})})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"0x0000000000000000000000000000000000000000000000000000000000000000"})}),(0,t.jsxs)(n.td,{children:["Replaced with ",(0,t.jsx)(n.code,{children:"prevrandao"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"nonce"})})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"0x0000000000000000"})}),(0,t.jsx)(n.td,{})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.code,{children:"ommers"})})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"[]"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"RLP([]) = 0xc0"})})]})]})]}),"\n",(0,t.jsxs)(n.p,{children:["Additionally, ",(0,t.jsx)(n.a,{href:"#extra-data",children:(0,t.jsx)(n.code,{children:"extraData"})})," is limited to the 32 bytes of vanity data after The Merge."]}),"\n",(0,t.jsx)(n.h2,{id:"add-and-remove-validators",children:"Add and remove validators"}),"\n",(0,t.jsx)(n.p,{children:"QBFT provides two methods to manage validators:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"#add-and-remove-validators-using-block-headers",children:"Block header validator selection"})," - Existing validators propose and vote to add or remove validators using the QBFT JSON-RPC API methods."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"#add-and-remove-validators-using-a-smart-contract",children:"Contract validator selection"})," - Use a smart contract to specify the validators used to propose and validate blocks."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["You can use ",(0,t.jsx)(n.a,{href:"#transitions",children:"transitions"})," to swap between block header validator selection and contract validator selection in an existing network."]}),"\n",(0,t.jsxs)(n.p,{children:["For block header validator selection, initial validators are configured in the genesis file's ",(0,t.jsx)(n.a,{href:"#extra-data",children:(0,t.jsx)(n.code,{children:"extraData"})})," property, whereas the initial validators when using the contract validator selection method are configured in the genesis file's ",(0,t.jsx)(n.code,{children:"storage"})," section."]}),"\n",(0,t.jsx)(n.h3,{id:"add-and-remove-validators-using-block-headers",children:"Add and remove validators using block headers"}),"\n",(0,t.jsxs)(n.p,{children:["Enable the HTTP interface with ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,t.jsx)(n.code,{children:"--rpc-http-enabled"})})," or the WebSockets interface with ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-enabled",children:(0,t.jsx)(n.code,{children:"--rpc-ws-enabled"})}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["The QBFT API methods are disabled by default. To enable them, specify the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,t.jsx)(n.code,{children:"--rpc-http-api"})})," or ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,t.jsx)(n.code,{children:"--rpc-ws-api"})})," option and include ",(0,t.jsx)(n.code,{children:"QBFT"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"The methods to add or remove validators are:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#qbft_getpendingvotes",children:(0,t.jsx)(n.code,{children:"qbft_getPendingVotes"})}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#qbft_proposevalidatorvote",children:(0,t.jsx)(n.code,{children:"qbft_proposeValidatorVote"})}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#qbft_discardvalidatorvote",children:(0,t.jsx)(n.code,{children:"qbft_discardValidatorVote"})}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["To view validator metrics for a specified block range, use ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#qbft_getsignermetrics",children:(0,t.jsx)(n.code,{children:"qbft_getSignerMetrics"})}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["If network conditions render it impossible to add and remove validators by voting, you can ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/add-validators-without-voting",children:"add and remove validators without voting"}),"."]})}),"\n",(0,t.jsx)(n.h4,{id:"add-a-validator",children:"Add a validator"}),"\n",(0,t.jsxs)(n.p,{children:["To propose adding a validator, call ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#qbft_proposevalidatorvote",children:(0,t.jsx)(n.code,{children:"qbft_proposeValidatorVote"})}),", specifying the address of the proposed validator and ",(0,t.jsx)(n.code,{children:"true"}),". A majority of validators must execute the call."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",metastring:'title="JSON-RPC qbft_proposeValidatorVote request example"',children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"qbft_proposeValidatorVote","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73", true], "id":1}\' \n'})}),"\n",(0,t.jsxs)(n.p,{children:["When the validator proposes the next block, the protocol inserts one proposal received from ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#qbft_proposevalidatorvote",children:(0,t.jsx)(n.code,{children:"qbft_proposeValidatorVote"})})," into the block. If blocks include all proposals, subsequent blocks proposed by the validator will not contain a vote."]}),"\n",(0,t.jsx)(n.p,{children:"When more than 50% of the existing validators have published a matching proposal, the protocol adds the proposed validator to the validator pool and the validator can begin validating blocks."}),"\n",(0,t.jsxs)(n.p,{children:["To return a list of validators and confirm the addition of a proposed validator, use ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#qbft_getvalidatorsbyblocknumber",children:(0,t.jsx)(n.code,{children:"qbft_getValidatorsByBlockNumber"})}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",metastring:'title="JSON-RPC qbft_getValidatorsByBlockNumber request example"',children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"qbft_getValidatorsByBlockNumber","params":["latest"], "id":1}\' \n'})}),"\n",(0,t.jsxs)(n.p,{children:["To discard your proposal after confirming the addition of a validator, call ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#qbft_discardvalidatorvote",children:(0,t.jsx)(n.code,{children:"qbft_discardValidatorVote"})}),", specifying the address of the proposed validator."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",metastring:'title="JSON-RPC qbft_discardValidatorVote request example"',children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"qbft_discardValidatorVote","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73"], "id":1}\' \n'})}),"\n",(0,t.jsx)(n.h4,{id:"remove-a-validator",children:"Remove a validator"}),"\n",(0,t.jsxs)(n.p,{children:["The process for removing a validator is the same as adding a validator except you specify ",(0,t.jsx)(n.code,{children:"false"})," as the second parameter of ",(0,t.jsx)(n.a,{href:"/private-networks/reference/api/#qbft_proposevalidatorvote",children:(0,t.jsx)(n.code,{children:"qbft_proposeValidatorVote"})}),"."]}),"\n",(0,t.jsx)(n.h4,{id:"epoch-transition",children:"Epoch transition"}),"\n",(0,t.jsx)(n.p,{children:"At each epoch transition, QBFT discards all pending votes collected from received blocks. Existing proposals remain in effect and validators re-add their vote the next time they create a block."}),"\n",(0,t.jsxs)(n.p,{children:["An epoch transition occurs every ",(0,t.jsx)(n.code,{children:"epochLength"})," blocks. Define ",(0,t.jsx)(n.code,{children:"epochlength"})," in the QBFT genesis file."]}),"\n",(0,t.jsx)(n.h3,{id:"add-and-remove-validators-using-a-smart-contract",children:"Add and remove validators using a smart contract"}),"\n",(0,t.jsxs)(n.p,{children:["Users can create their own smart contracts to add or remove validators based on their organizational requirements. View the ",(0,t.jsx)(n.a,{href:"https://github.com/ConsenSys/validator-smart-contracts",children:"example smart contract"})," for more information on how to create and deploy the smart contract."]}),"\n",(0,t.jsxs)(n.p,{children:["You can pre-deploy the validator smart contract in a new QBFT network by specifying the contract details in the ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft#genesis-file",children:"genesis file"}),". For existing QBFT networks you need to compile and deploy the contract using a transaction, then obtain the contract address from the receipt and use that in a ",(0,t.jsx)(n.a,{href:"#swap-validator-management-methods",children:"transition"}),"."]}),"\n",(0,t.jsxs)(n.admonition,{type:"info",children:[(0,t.jsx)(n.p,{children:"You can't use the JSON-RPC methods to add or remove validators when using a smart contract to manage nodes."}),(0,t.jsx)(n.p,{children:"You must interact with the contract functions using transactions."})]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["If network conditions render it impossible to add and remove validators using a smart contract, you can ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/add-validators-without-voting#override-smart-contract-validators",children:"override smart contract validators"}),"."]})}),"\n",(0,t.jsx)(n.h3,{id:"minimum-number-of-validators",children:"Minimum number of validators"}),"\n",(0,t.jsx)(n.p,{children:"QBFT requires four validators to be Byzantine fault tolerant. Byzantine fault tolerance is the ability for a blockchain network to function correctly and reach consensus despite nodes failing or propagating incorrect information to peers."}),"\n",(0,t.jsx)(n.h2,{id:"transitions",children:"Transitions"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"transitions"})," genesis configuration item allows you to specify a future block number at which to\nthe QBFT network configuration in an existing network.\nFor example, you can update the ",(0,t.jsx)(n.a,{href:"#configure-block-time-on-an-existing-network",children:"block time"}),",\n",(0,t.jsx)(n.a,{href:"#configure-block-rewards-on-an-existing-network",children:"block reward"}),",\n",(0,t.jsx)(n.a,{href:"#swap-validator-management-methods",children:"validator management method"}),", or\n",(0,t.jsx)(n.a,{href:"#configure-the-mining-beneficiary-on-an-existing-network",children:"mining beneficiary"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsx)(n.p,{children:"Do not specify a transition block in the past.\nSpecifying a transition block in the past can result in unexpected behavior, such as causing the\nnetwork to fork."})}),"\n",(0,t.jsx)(n.h3,{id:"configure-block-time-on-an-existing-network",children:"Configure block time on an existing network"}),"\n",(0,t.jsxs)(n.p,{children:["To update an existing network with a new ",(0,t.jsx)(n.code,{children:"blockperiodseconds"}),":"]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Stop all nodes in the network."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.a,{href:"#genesis-file",children:"genesis file"}),", add the ",(0,t.jsx)(n.code,{children:"transitions"})," configuration item where:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:""})," is the upcoming block at which to change ",(0,t.jsx)(n.code,{children:"blockperiodseconds"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:""})," is the updated value for ",(0,t.jsx)(n.code,{children:"blockperiodseconds"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(s.A,{children:[(0,t.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n },\n "transitions": {\n "qbft": [\n {\n "block": ,\n "blockperiodseconds": \n }\n ]\n }\n },\n ...\n}\n'})})}),(0,t.jsx)(r.A,{value:"Example",label:"Example",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n },\n "transitions": {\n "qbft": [\n {\n "block": 1240,\n "blockperiodseconds": 4\n }\n ]\n }\n },\n ...\n}\n'})})})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Restart all nodes in the network using the updated genesis file."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"To verify the changes after the transition block, view the Besu logs and check that the time\ndifference between each block matches the updated block period."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"configure-block-rewards-on-an-existing-network",children:"Configure block rewards on an existing network"}),"\n",(0,t.jsxs)(n.p,{children:["To update an existing network with a new ",(0,t.jsx)(n.code,{children:"blockreward"}),":"]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Stop all nodes in the network."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.a,{href:"#genesis-file",children:"genesis file"}),", add the ",(0,t.jsx)(n.code,{children:"transitions"})," configuration item where:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:""})," is the upcoming block at which to change ",(0,t.jsx)(n.code,{children:"blockreward"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:""})," is the updated value for ",(0,t.jsx)(n.code,{children:"blockreward"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(s.A,{children:[(0,t.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n "blockreward": "5000000000000000"\n },\n "transitions": {\n "qbft": [\n {\n "block": ,\n "blockreward": \n },\n {\n "block": ,\n "blockreward": \n },\n {\n "block": ,\n "blockreward": \n }\n ]\n }\n },\n ...\n}\n'})})}),(0,t.jsx)(r.A,{value:"Example",label:"Example",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n "blockreward": "5000000000000000"\n },\n "transitions": {\n "qbft": [\n {\n "block": 10,\n "blockreward": "6000000000000000"\n },\n {\n "block": 15,\n "blockreward": "75000000000000000"\n },\n {\n "block": 20,\n "blockreward": "0"\n }\n ]\n }\n },\n ...\n}\n'})})})]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["You can add multiple ",(0,t.jsx)(n.code,{children:"blockreward"})," updates in one transition object by specifying multiple future blocks."]})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Restart all nodes in the network using the updated genesis file."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"swap-validator-management-methods",children:"Swap validator management methods"}),"\n",(0,t.jsx)(n.p,{children:"To swap between block header validator selection and contract validator selection methods in an existing network:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Stop all nodes in the network."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.a,{href:"#genesis-file",children:"genesis file"}),", add the ",(0,t.jsx)(n.code,{children:"transitions"})," configuration item where:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:""})," is the upcoming block at which to change the validator selection method."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:""})," is the validator selection mode to switch to. Valid options are ",(0,t.jsx)(n.code,{children:"contract"})," and ",(0,t.jsx)(n.code,{children:"blockheader"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:""})," is the smart contract address, if switching to the contract validator selection method."]}),"\n"]}),"\n",(0,t.jsxs)(s.A,{children:[(0,t.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n "blockperiodseconds": 5,\n "epochlength": 30000,\n "requesttimeoutseconds": 10\n },\n "transitions": {\n "qbft": [\n {\n "block": ,\n "validatorselectionmode": ,\n "validatorcontractaddress": \n }\n ]\n }\n },\n ...\n}\n'})})}),(0,t.jsx)(r.A,{value:"Example",label:"Example",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n "blockperiodseconds": 5,\n "epochlength": 30000,\n "requesttimeoutseconds": 10\n },\n "transitions": {\n "qbft": [\n {\n "block": 102885,\n "validatorselectionmode": "contract",\n "validatorcontractaddress": "0x0000000000000000000000000000000000007777"\n }\n ]\n }\n },\n ...\n}\n'})})})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Restart all nodes in the network using the updated genesis file."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"configure-the-mining-beneficiary-on-an-existing-network",children:"Configure the mining beneficiary on an existing network"}),"\n",(0,t.jsx)(n.p,{children:"To update an existing network with a new mining beneficiary:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Stop all nodes in the network."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.a,{href:"#genesis-file",children:"genesis file"}),", add the ",(0,t.jsx)(n.code,{children:"transitions"})," configuration item where:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:""})," is the upcoming block at which to change ",(0,t.jsx)(n.code,{children:"miningbeneficiary"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:""})," is the updated 20-byte address for ",(0,t.jsx)(n.code,{children:"miningbeneficiary"}),". Starting at ",(0,t.jsx)(n.code,{children:""}),", block rewards go to this address."]}),"\n"]}),"\n",(0,t.jsxs)(s.A,{children:[(0,t.jsx)(r.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n "blockperiodseconds": 5,\n "epochlength": 30000,\n "requesttimeoutseconds": 10\n },\n "transitions": {\n "qbft": [\n {\n "block": ,\n "miningbeneficiary": \n },\n {\n "block": ,\n "miningbeneficiary": \n }\n ]\n }\n },\n ...\n}\n'})})}),(0,t.jsx)(r.A,{value:"Example",label:"Example",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "config": {\n ...\n "qbft": {\n "blockperiodseconds": 5,\n "epochlength": 30000,\n "requesttimeoutseconds": 10\n },\n "transitions": {\n "qbft": [\n {\n "block": 10000,\n "miningbeneficiary": "0x0000000000000000000000000000000000000002",\n },\n {\n "block": 20000,\n "miningbeneficiary": "",\n }\n ]\n }\n },\n ...\n}\n'})})})]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsxs)(n.p,{children:["Setting the ",(0,t.jsx)(n.code,{children:"miningbeneficiary"})," to an empty value clears out any override so that block rewards go to the block producer rather than a global override address."]})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Restart all nodes in the network using the updated genesis file."}),"\n"]}),"\n"]})]})}function b(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(f,{...e})}):f(e)}},19365:(e,n,a)=>{a.d(n,{A:()=>r});a(96540);var t=a(18215);const i={tabItem:"tabItem_Ymn6"};var s=a(74848);function r(e){let{children:n,hidden:a,className:r}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,t.A)(i.tabItem,r),hidden:a,children:n})}},11470:(e,n,a)=>{a.d(n,{A:()=>w});var t=a(96540),i=a(18215),s=a(23104),r=a(56347),o=a(205),c=a(57485),d=a(31682),l=a(70679);function h(e){return t.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,t.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function f(e){const{values:n,children:a}=e;return(0,t.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:a,attributes:t,default:i}}=e;return{value:n,label:a,attributes:t,default:i}}))}(a);return function(e){const n=(0,d.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,a])}function b(e){let{value:n,tabValues:a}=e;return a.some((e=>e.value===n))}function u(e){let{queryString:n=!1,groupId:a}=e;const i=(0,r.W6)(),s=function(e){let{queryString:n=!1,groupId:a}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:n,groupId:a});return[(0,c.aZ)(s),(0,t.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(i.location.search);n.set(s,e),i.replace({...i.location,search:n.toString()})}),[s,i])]}function x(e){const{defaultValue:n,queryString:a=!1,groupId:i}=e,s=f(e),[r,c]=(0,t.useState)((()=>function(e){let{defaultValue:n,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!b({value:n,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const t=a.find((e=>e.default))??a[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:n,tabValues:s}))),[d,h]=u({queryString:a,groupId:i}),[x,p]=function(e){let{groupId:n}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(n),[i,s]=(0,l.Dv)(a);return[i,(0,t.useCallback)((e=>{a&&s.set(e)}),[a,s])]}({groupId:i}),m=(()=>{const e=d??x;return b({value:e,tabValues:s})?e:null})();(0,o.A)((()=>{m&&c(m)}),[m]);return{selectedValue:r,selectValue:(0,t.useCallback)((e=>{if(!b({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);c(e),h(e),p(e)}),[h,p,s]),tabValues:s}}var p=a(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=a(74848);function g(e){let{className:n,block:a,selectedValue:t,selectValue:r,tabValues:o}=e;const c=[],{blockElementScrollPositionUntilNextRender:d}=(0,s.a_)(),l=e=>{const n=e.currentTarget,a=c.indexOf(n),i=o[a].value;i!==t&&(d(n),r(i))},h=e=>{let n=null;switch(e.key){case"Enter":l(e);break;case"ArrowRight":{const a=c.indexOf(e.currentTarget)+1;n=c[a]??c[0];break}case"ArrowLeft":{const a=c.indexOf(e.currentTarget)-1;n=c[a]??c[c.length-1];break}}n?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":a},n),children:o.map((e=>{let{value:n,label:a,attributes:s}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:t===n?0:-1,"aria-selected":t===n,ref:e=>c.push(e),onKeyDown:h,onClick:l,...s,className:(0,i.A)("tabs__item",m.tabItem,s?.className,{"tabs__item--active":t===n}),children:a??n},n)}))})}function v(e){let{lazy:n,children:a,selectedValue:s}=e;const r=(Array.isArray(a)?a:[a]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===s));return e?(0,t.cloneElement)(e,{className:(0,i.A)("margin-top--md",e.props.className)}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function k(e){const n=x(e);return(0,j.jsxs)("div",{className:(0,i.A)("tabs-container",m.tabList),children:[(0,j.jsx)(g,{...n,...e}),(0,j.jsx)(v,{...n,...e})]})}function w(e){const n=(0,p.A)();return(0,j.jsx)(k,{...e,children:h(e.children)},String(n))}},28453:(e,n,a)=>{a.d(n,{R:()=>r,x:()=>o});var t=a(96540);const i={},s=t.createContext(i);function r(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b5e9b728.47acb136.js b/assets/js/b5e9b728.47acb136.js new file mode 100644 index 00000000000..dbc78f5fa3d --- /dev/null +++ b/assets/js/b5e9b728.47acb136.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4597],{61312:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>a,contentTitle:()=>i,default:()=>d,frontMatter:()=>s,metadata:()=>o,toc:()=>l});var n=t(74848),c=t(28453);const s={title:"Trace transactions",sidebar_position:2,description:"How to trace transactions",tags:["public networks","private networks"]},i="Trace transactions",o={id:"public-networks/how-to/troubleshoot/trace-transactions",title:"Trace transactions",description:"How to trace transactions",source:"@site/docs/public-networks/how-to/troubleshoot/trace-transactions.md",sourceDirName:"public-networks/how-to/troubleshoot",slug:"/public-networks/how-to/troubleshoot/trace-transactions",permalink:"/public-networks/how-to/troubleshoot/trace-transactions",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/troubleshoot/trace-transactions.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Trace transactions",sidebar_position:2,description:"How to trace transactions",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Use EVM tool",permalink:"/public-networks/how-to/troubleshoot/evm-tool"},next:{title:"Troubleshoot performance",permalink:"/public-networks/how-to/troubleshoot/performance"}},a={},l=[{value:"Ad-hoc tracing APIs",id:"ad-hoc-tracing-apis",level:2},{value:"Transaction-trace filtering APIs",id:"transaction-trace-filtering-apis",level:2}];function h(e){const r={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",ul:"ul",...(0,c.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"trace-transactions",children:"Trace transactions"})}),"\n",(0,n.jsxs)(r.p,{children:["To get detailed information about transaction processing, use the ",(0,n.jsxs)(r.a,{href:"/public-networks/reference/api/#trace-methods",children:[(0,n.jsx)(r.code,{children:"TRACE"})," API"]}),". Enable the ",(0,n.jsx)(r.code,{children:"TRACE"})," API using the ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,n.jsx)(r.code,{children:"--rpc-http-api"})})," or ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,n.jsx)(r.code,{children:"--rpc-ws-api"})})," command line options."]}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"TRACE"})," API has two sets of trace calls, ",(0,n.jsx)(r.a,{href:"#ad-hoc-tracing-apis",children:"ad-hoc tracing APIs"})," and ",(0,n.jsx)(r.a,{href:"#transaction-trace-filtering-apis",children:"transaction-trace filtering APIs"}),"."]}),"\n",(0,n.jsx)(r.h2,{id:"ad-hoc-tracing-apis",children:"Ad-hoc tracing APIs"}),"\n",(0,n.jsxs)(r.p,{children:["These APIs allow you to use the ",(0,n.jsxs)(r.a,{href:"/public-networks/reference/trace-types",children:[(0,n.jsx)(r.code,{children:"trace"}),", ",(0,n.jsx)(r.code,{children:"vmTrace"}),", or ",(0,n.jsx)(r.code,{children:"stateDiff"})]})," diagnostic options when tracing calls or transactions."]}),"\n",(0,n.jsxs)(r.p,{children:["When using ",(0,n.jsx)(r.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai Tries"})," with the ad-hoc\ntracing APIs, the requested block or transaction must be within the number of\n",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#bonsai-historical-block-limit",children:"blocks retained"})," (by default, 512\nfrom the head of the chain)."]}),"\n",(0,n.jsx)(r.p,{children:"The ad-hoc tracing APIs are:"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"/public-networks/reference/api/#trace_call",children:(0,n.jsx)(r.code,{children:"trace_call"})})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"/public-networks/reference/api/#trace_callmany",children:(0,n.jsx)(r.code,{children:"trace_callMany"})})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"/public-networks/reference/api/#trace_rawtransaction",children:(0,n.jsx)(r.code,{children:"trace_rawTransaction"})})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"/public-networks/reference/api/#trace_replayblocktransactions",children:(0,n.jsx)(r.code,{children:"trace_replayBlockTransactions"})})}),"\n"]}),"\n",(0,n.jsx)(r.h2,{id:"transaction-trace-filtering-apis",children:"Transaction-trace filtering APIs"}),"\n",(0,n.jsxs)(r.p,{children:["These APIs allow you to filter and search by specific information such as the block, address, or transaction. These APIs only use the ",(0,n.jsxs)(r.a,{href:"/public-networks/reference/trace-types#trace",children:[(0,n.jsx)(r.code,{children:"trace"})," type"]}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["To use the transaction-trace filtering APIs, your node must be an\n",(0,n.jsx)(r.a,{href:"/public-networks/concepts/node-sync#archive-nodes",children:"archive node"}),", or the requested block\nor transaction must be within the number of\n",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#bonsai-historical-block-limit",children:"blocks retained"})," when using\n",(0,n.jsx)(r.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai Tries"})," (by default, 512 from the head\nof the chain)."]}),"\n",(0,n.jsx)(r.p,{children:"The transaction-trace filtering APIs are:"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"/public-networks/reference/api/#trace_block",children:(0,n.jsx)(r.code,{children:"trace_block"})})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"/public-networks/reference/api/#trace_filter",children:(0,n.jsx)(r.code,{children:"trace_filter"})})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"/public-networks/reference/api/#trace_get",children:(0,n.jsx)(r.code,{children:"trace_get"})})}),"\n",(0,n.jsx)(r.li,{children:(0,n.jsx)(r.a,{href:"/public-networks/reference/api/#trace_transaction",children:(0,n.jsx)(r.code,{children:"trace_transaction"})})}),"\n"]})]})}function d(e={}){const{wrapper:r}={...(0,c.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(h,{...e})}):h(e)}},28453:(e,r,t)=>{t.d(r,{R:()=>i,x:()=>o});var n=t(96540);const c={},s=n.createContext(c);function i(e){const r=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:i(e.components),n.createElement(s.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b658262b.9ca3c8e9.js b/assets/js/b658262b.9ca3c8e9.js new file mode 100644 index 00000000000..bef533dbae3 --- /dev/null +++ b/assets/js/b658262b.9ca3c8e9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1384],{93440:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>a,toc:()=>d});var r=t(74848),s=t(28453);const o={title:"Run Besu from Docker image",sidebar_position:1,description:"Run Besu using the official docker image",tags:["public networks"]},i="Run Besu from a Docker image",a={id:"public-networks/get-started/install/run-docker-image",title:"Run Besu from Docker image",description:"Run Besu using the official docker image",source:"@site/docs/public-networks/get-started/install/run-docker-image.md",sourceDirName:"public-networks/get-started/install",slug:"/public-networks/get-started/install/run-docker-image",permalink:"/public-networks/get-started/install/run-docker-image",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/get-started/install/run-docker-image.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Run Besu from Docker image",sidebar_position:1,description:"Run Besu using the official docker image",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Installation options",permalink:"/public-networks/get-started/install/"},next:{title:"Install binary distribution",permalink:"/public-networks/get-started/install/binary-distribution"}},c={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Default node for Mainnet",id:"default-node-for-mainnet",level:2},{value:"Expose ports",id:"expose-ports",level:2},{value:"Start Besu",id:"start-besu",level:2},{value:"Run a node for testing",id:"run-a-node-for-testing",level:3},{value:"Run a node on Holesky testnet",id:"run-a-node-on-holesky-testnet",level:3},{value:"Run a node on Ethereum Mainnet",id:"run-a-node-on-ethereum-mainnet",level:3},{value:"Stop Besu and clean up resources",id:"stop-besu-and-clean-up-resources",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"run-besu-from-a-docker-image",children:"Run Besu from a Docker image"})}),"\n",(0,r.jsx)(n.p,{children:"Besu provides a Docker image to run a Besu node in a Docker container."}),"\n",(0,r.jsx)(n.p,{children:"Use this Docker image to run a single Besu node without installing Besu."}),"\n",(0,r.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.a,{href:"https://docs.docker.com/install/",children:"Docker"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"MacOS or Linux"}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsx)(n.p,{children:"The Docker image doesn't run on Windows."})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"default-node-for-mainnet",children:"Default node for Mainnet"}),"\n",(0,r.jsx)(n.p,{children:"To run a Besu node in a container connected to the Ethereum Mainnet:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker run hyperledger/besu:latest\n"})}),"\n",(0,r.jsxs)(n.admonition,{type:"note",children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://hub.docker.com/r/hyperledger/besu/tags",children:"https://hub.docker.com/r/hyperledger/besu/tags"})," lists the available tags for the image."]}),(0,r.jsxs)(n.p,{children:["If you previously pulled ",(0,r.jsx)(n.code,{children:"latest"}),", Docker runs the cached version."]}),(0,r.jsxs)(n.p,{children:["To ensure your image is up to date, pull the ",(0,r.jsx)(n.code,{children:"latest"})," version again using ",(0,r.jsx)(n.code,{children:"docker pull hyperledger/besu:latest"}),"."]})]}),"\n",(0,r.jsx)(n.h2,{id:"expose-ports",children:"Expose ports"}),"\n",(0,r.jsxs)(n.p,{children:["Expose ports for P2P discovery, GraphQL, metrics, and HTTP and WebSocket JSON-RPC. You need to expose the ports to use the default ports or the ports specified using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,r.jsx)(n.code,{children:"--rpc-http-port"})}),", ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,r.jsx)(n.code,{children:"--p2p-port"})}),", ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-port",children:(0,r.jsx)(n.code,{children:"--rpc-ws-port"})}),", ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#metrics-port",children:(0,r.jsx)(n.code,{children:"--metrics-port"})}),", ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#graphql-http-port",children:(0,r.jsx)(n.code,{children:"--graphql-http-port"})}),", and ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#metrics-push-port",children:(0,r.jsx)(n.code,{children:"--metrics-push-port"})})," options."]}),"\n",(0,r.jsx)(n.p,{children:"To run Besu exposing local ports for access:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker run -p :8545 -p :8546 -p :30303 hyperledger/besu:latest --rpc-http-enabled --rpc-ws-enabled\n"})}),"\n",(0,r.jsxs)(n.admonition,{type:"note",children:[(0,r.jsxs)(n.p,{children:["The examples on this page expose TCP ports only. To expose UDP ports, specify ",(0,r.jsx)(n.code,{children:"/udp"})," at the end of the argument for the ",(0,r.jsx)(n.code,{children:"-p"})," Docker subcommand option:"]}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker run -p :/udp\n"})}),(0,r.jsxs)(n.p,{children:["See the ",(0,r.jsxs)(n.a,{href:"https://docs.docker.com/engine/reference/commandline/run/#publish-or-expose-port--p---expose",children:[(0,r.jsx)(n.code,{children:"docker run -p"})," documentation"]}),"."]})]}),"\n",(0,r.jsxs)(n.p,{children:["To enable JSON-RPC HTTP calls to ",(0,r.jsx)(n.code,{children:"127.0.0.1:8545"})," and P2P discovery on ",(0,r.jsx)(n.code,{children:"127.0.0.1:13001"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker run -p 8545:8545 -p 13001:30303 hyperledger/besu:latest --rpc-http-enabled\n"})}),"\n",(0,r.jsx)(n.h2,{id:"start-besu",children:"Start Besu"}),"\n",(0,r.jsxs)(n.admonition,{type:"danger",children:[(0,r.jsxs)(n.p,{children:["Don't mount a volume at the default data path (",(0,r.jsx)(n.code,{children:"/opt/besu"}),"). Mounting a volume at the default data path interferes with the operation of Besu and prevents Besu from safely launching."]}),(0,r.jsxs)(n.p,{children:["To run a node that maintains the node state (key and database), ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(n.code,{children:"--data-path"})})," must be set to a location other than ",(0,r.jsx)(n.code,{children:"/opt/besu"})," and a storage volume mounted at that location."]}),(0,r.jsxs)(n.p,{children:["When running in a Docker container, ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat",children:(0,r.jsx)(n.code,{children:"--nat-method"})})," must be set to ",(0,r.jsx)(n.code,{children:"DOCKER"})," or ",(0,r.jsx)(n.code,{children:"AUTO"})," (default). Don't set ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat",children:(0,r.jsx)(n.code,{children:"--nat-method"})})," to ",(0,r.jsx)(n.code,{children:"NONE"})," or ",(0,r.jsx)(n.code,{children:"UPNP"}),"."]})]}),"\n",(0,r.jsxs)(n.p,{children:["You can specify ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#specify-options",children:"Besu environment variables"})," with the Docker image instead of the command line options."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",metastring:'title="Example"',children:"docker run -p 30303:30303 -p 8545:8545 -e BESU_RPC_HTTP_ENABLED=true -e BESU_NETWORK=holesky hyperledger/besu:latest\n"})}),"\n",(0,r.jsxs)(n.admonition,{title:"Unsupported address type exception",type:"caution",children:[(0,r.jsx)(n.p,{children:"When running Besu from a Docker image, you might get the following exception:"}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"Unsupported address type exception when connecting to peer {}, this is likely due to ipv6 not being enabled at runtime.\n"})}),(0,r.jsx)(n.p,{children:"This happens when the IPv6 support in Docker is disabled while connecting to an IPv6 peer, preventing outbound communication. IPv6 is disabled by default in Docker."}),(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://docs.docker.com/config/daemon/ipv6/",children:"Enable IPv6 support in Docker"})," to allow outbound IPv6 traffic and allow connection with IPv6 peers."]})]}),"\n",(0,r.jsx)(n.h3,{id:"run-a-node-for-testing",children:"Run a node for testing"}),"\n",(0,r.jsx)(n.p,{children:"To run a node that mines blocks at a rate suitable for testing purposes with WebSocket enabled:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker run -p 8546:8546 --mount type=bind,source=/,target=/var/lib/besu hyperledger/besu:latest --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-ws-enabled --network=dev --data-path=/var/lib/besu\n"})}),"\n",(0,r.jsx)(n.h3,{id:"run-a-node-on-holesky-testnet",children:"Run a node on Holesky testnet"}),"\n",(0,r.jsx)(n.p,{children:"To run a node on Holesky:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker run -p 30303:30303 --mount type=bind,source=/,target=/var/lib/besu hyperledger/besu:latest --network=holesky --data-path=/var/lib/besu\n"})}),"\n",(0,r.jsx)(n.h3,{id:"run-a-node-on-ethereum-mainnet",children:"Run a node on Ethereum Mainnet"}),"\n",(0,r.jsx)(n.p,{children:"To run a node on Ethereum Mainnet with the HTTP JSON-RPC service enabled:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker run -p 8545:8545 --mount type=bind,source=/,target=/var/lib/besu -p 30303:30303 hyperledger/besu:latest --rpc-http-enabled --data-path=/var/lib/besu\n"})}),"\n",(0,r.jsx)(n.h2,{id:"stop-besu-and-clean-up-resources",children:"Stop Besu and clean up resources"}),"\n",(0,r.jsxs)(n.p,{children:["When done running nodes, you can shut down the node container without deleting resources or you can delete the container after stopping it. Run ",(0,r.jsx)(n.code,{children:"docker container ls"})," and ",(0,r.jsx)(n.code,{children:"docker volume ls"})," to get the container and volume names."]}),"\n",(0,r.jsx)(n.p,{children:"To stop a container:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker stop \n"})}),"\n",(0,r.jsx)(n.p,{children:"To delete a container:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker rm \n"})})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var r=t(96540);const s={},o=r.createContext(s);function i(e){const n=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b6b2f0db.6014a9b2.js b/assets/js/b6b2f0db.6014a9b2.js new file mode 100644 index 00000000000..49379b6401b --- /dev/null +++ b/assets/js/b6b2f0db.6014a9b2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[499],{4522:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>s,metadata:()=>i,toc:()=>l});var t=r(74848),c=r(28453);const s={title:"Transaction trace types",sidebar_position:6,description:"Transaction trace types reference",tags:["public networks","private networks"]},d="Transaction trace types",i={id:"public-networks/reference/trace-types",title:"Transaction trace types",description:"Transaction trace types reference",source:"@site/docs/public-networks/reference/trace-types.md",sourceDirName:"public-networks/reference",slug:"/public-networks/reference/trace-types",permalink:"/public-networks/reference/trace-types",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/reference/trace-types.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:6,frontMatter:{title:"Transaction trace types",sidebar_position:6,description:"Transaction trace types reference",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"EVM tool options",permalink:"/public-networks/reference/evm-tool"},next:{title:"Projects using Besu",permalink:"/public-networks/reference/projects-using-besu"}},a={},l=[{value:"trace",id:"trace",level:2},{value:"vmTrace",id:"vmtrace",level:2},{value:"stateDiff",id:"statediff",level:2},{value:"Applicable API methods",id:"applicable-api-methods",level:2}];function o(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,c.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"transaction-trace-types",children:"Transaction trace types"})}),"\n",(0,t.jsxs)(n.p,{children:["When ",(0,t.jsx)(n.a,{href:"/public-networks/how-to/troubleshoot/trace-transactions",children:"tracing transactions"}),", the trace type options are ",(0,t.jsx)(n.a,{href:"#trace",children:(0,t.jsx)(n.code,{children:"trace"})}),", ",(0,t.jsx)(n.a,{href:"#vmtrace",children:(0,t.jsx)(n.code,{children:"vmTrace"})}),", and ",(0,t.jsx)(n.a,{href:"#statediff",children:(0,t.jsx)(n.code,{children:"stateDiff"})}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"trace",children:(0,t.jsx)(n.code,{children:"trace"})}),"\n",(0,t.jsx)(n.p,{children:"An ordered list of calls to other contracts, excluding precompiled contracts."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",metastring:'title="trace example"',children:'"trace":[\n {\n "action":{\n "callType":"call",\n "from":"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas":"0xffadea",\n "input":"0x",\n "to":"0x0100000000000000000000000000000000000000",\n "value":"0x0"\n },\n "result":{\n "gasUsed":"0x1e",\n "output":"0x"\n },\n "subtraces":0,\n "traceAddress":[\n ],\n "type":"call"\n }\n]\n'})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Key"}),(0,t.jsx)(n.th,{children:"Value"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"action"})}),(0,t.jsx)(n.td,{children:"Transaction details."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"callType"})}),(0,t.jsxs)(n.td,{children:["Whether the transaction is ",(0,t.jsx)(n.code,{children:"call"})," or ",(0,t.jsx)(n.code,{children:"create"}),"."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"from"})}),(0,t.jsx)(n.td,{children:"Address of the transaction sender."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"gas"})}),(0,t.jsx)(n.td,{children:"Gas provided by sender."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"input"})}),(0,t.jsx)(n.td,{children:"Transaction data."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"to"})}),(0,t.jsx)(n.td,{children:"Target of the transaction."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"value"})}),(0,t.jsx)(n.td,{children:"Value transferred in the transaction."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"result"})}),(0,t.jsx)(n.td,{children:"Transaction result."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"gasUsed"})}),(0,t.jsx)(n.td,{children:"Gas used by the transaction. Includes any refunds of unused gas."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"output"})}),(0,t.jsxs)(n.td,{children:["Return value of the contract call. Contains only the actual value sent by a ",(0,t.jsx)(n.code,{children:"RETURN"})," operation. If a ",(0,t.jsx)(n.code,{children:"RETURN"})," was not executed, the output is empty bytes."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"subTraces"})}),(0,t.jsx)(n.td,{children:"Traces of contract calls made by the transaction."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"traceAddress"})}),(0,t.jsx)(n.td,{children:"Tree list address of where the call occurred, address of the parents, and order of the current sub call."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"type"})}),(0,t.jsxs)(n.td,{children:["Whether the transaction is a ",(0,t.jsx)(n.code,{children:"CALL"})," or ",(0,t.jsx)(n.code,{children:"CREATE"})," series operation."]})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"vmtrace",children:(0,t.jsx)(n.code,{children:"vmTrace"})}),"\n",(0,t.jsx)(n.p,{children:"An ordered list of EVM actions when processing the transaction."}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"vmTrace"})," only reports actual data returned from a ",(0,t.jsx)(n.code,{children:"RETURN"})," opcode and does not return the contents of the reserved output space for the call operations. As a result:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"vmTrace"})," reports ",(0,t.jsx)(n.code,{children:"null"})," when a call operation ends because of a ",(0,t.jsx)(n.code,{children:"STOP"}),", ",(0,t.jsx)(n.code,{children:"HALT"}),", ",(0,t.jsx)(n.code,{children:"REVERT"}),", running out of instructions, or any exceptional halts."]}),"\n",(0,t.jsxs)(n.li,{children:["When a ",(0,t.jsx)(n.code,{children:"RETURN"})," operation returns data of a different length to the space reserved by the call, ",(0,t.jsx)(n.code,{children:"vmTrace"})," reports only the data passed to the ",(0,t.jsx)(n.code,{children:"RETURN"})," operation and does not include pre-existing memory data or trim the returned data."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["For out of gas operations, ",(0,t.jsx)(n.code,{children:"vmTrace"})," reports the operation that caused the out of gas exception, including the calculated gas cost. ",(0,t.jsx)(n.code,{children:"vmTrace"})," does not report ",(0,t.jsx)(n.code,{children:"ex"})," values because the operation is not executed."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",metastring:'title="vmTrace example"',children:'"vmTrace":{\n "code":"0x7f3940be4289e4c3587d88c1856cc95352461992db0a584c281226faefe560b3016000527f14c4d2c102bdeb2354bfc3dc96a95e4512cf3a8461e0560e2272dbf884ef3905601052600851",\n "ops":[\n {\n "cost":3,\n "ex":{\n "mem":null,\n "push":[\n "0x8"\n ],\n "store":null,\n "used":16756175\n },\n "pc":72,\n "sub":null\n },\n ...\n ]\n}\n'})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Key"}),(0,t.jsx)(n.th,{children:"Value"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"code"})}),(0,t.jsx)(n.td,{children:"Code executed by the EVM."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ops"})}),(0,t.jsx)(n.td,{children:"Sequence of EVM operations (opcodes) executed in the transaction."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"cost"})}),(0,t.jsx)(n.td,{children:"Gas cost of the opcode. Includes memory expansion costs but not gas refunds. For precompiled contract calls, reports only the actual cost."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"ex"})}),(0,t.jsx)(n.td,{children:"Executed operations."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"mem"})}),(0,t.jsx)(n.td,{children:"Memory read or written by the operation."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"push"})}),(0,t.jsx)(n.td,{children:"Adjusted stack items. For swap, includes all intermediate values and the result. Otherwise, is the value pushed onto the stack."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"store"})}),(0,t.jsx)(n.td,{children:"Account storage written by the operation."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"used"})}),(0,t.jsx)(n.td,{children:"Remaining gas taking into account the all but 1/64th rule for calls."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"pc"})}),(0,t.jsx)(n.td,{children:"Program counter."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"sub"})}),(0,t.jsx)(n.td,{children:"Sub call operations."})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"statediff",children:(0,t.jsx)(n.code,{children:"stateDiff"})}),"\n",(0,t.jsxs)(n.p,{children:["State changes in the requested block for each transaction represented as a map of accounts to an object. Besu lists the balance, code, nonce, and storage changes from immediately before the transaction to after the transaction. For the ",(0,t.jsx)(n.code,{children:"key:value"})," pairs:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"+"})," indicates the field didn\u2019t exist before and now has the specified value"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"-"})," indicates a deleted value"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"*"})," has a ",(0,t.jsx)(n.code,{children:"from"})," and a ",(0,t.jsx)(n.code,{children:"to"})," value."]}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:"An absent value is distinct from zero when creating accounts or clearing storage."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",metastring:'title="stateDiff example"',children:'"stateDiff":{\n "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73":{\n "balance":{\n "*":{\n "from":"0xffffffffffffffffffffffffffffffffc3e12a20b",\n "to":"0xffffffffffffffffffffffffffffffffc3dc5f091"\n }\n },\n "code":"=",\n "nonce":{\n "*":{\n "from":"0x14",\n "to":"0x15"\n }\n },\n "storage":{\n }\n }\n}\n'})}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Key"}),(0,t.jsx)(n.th,{children:"Value"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"balance"})}),(0,t.jsx)(n.td,{children:"Change of balance event."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"balance.from"})}),(0,t.jsx)(n.td,{children:"Balance before the transaction."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"balance.to"})}),(0,t.jsx)(n.td,{children:"Balance after the transaction."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"code"})}),(0,t.jsx)(n.td,{children:"Changes to code. None in this example."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"nonce"})}),(0,t.jsx)(n.td,{children:"Change of nonce."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"nonce.from"})}),(0,t.jsx)(n.td,{children:"Nonce before the transaction."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"nonce.to"})}),(0,t.jsx)(n.td,{children:"Nonce after the transaction."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"storage"})}),(0,t.jsx)(n.td,{children:"Changes to storage. None in this example."})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"applicable-api-methods",children:"Applicable API methods"}),"\n",(0,t.jsxs)(n.p,{children:["The trace options ",(0,t.jsx)(n.code,{children:"trace"}),", ",(0,t.jsx)(n.code,{children:"vmTrace"}),", and ",(0,t.jsx)(n.code,{children:"stateDiff"})," are available for the following ",(0,t.jsx)(n.a,{href:"/public-networks/how-to/troubleshoot/trace-transactions#ad-hoc-tracing-apis",children:"ad-hoc tracing API methods"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#trace_call",children:(0,t.jsx)(n.code,{children:"trace_call"})})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#trace_callmany",children:(0,t.jsx)(n.code,{children:"trace_callMany"})})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#trace_rawtransaction",children:(0,t.jsx)(n.code,{children:"trace_rawTransaction"})})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#trace_replayblocktransactions",children:(0,t.jsx)(n.code,{children:"trace_replayBlockTransactions"})})}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Only the ",(0,t.jsx)(n.code,{children:"trace"})," option is available for the following ",(0,t.jsx)(n.a,{href:"/public-networks/how-to/troubleshoot/trace-transactions#transaction-trace-filtering-apis",children:"transaction-trace filtering API methods"}),":"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#trace_block",children:(0,t.jsx)(n.code,{children:"trace_block"})})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#trace_filter",children:(0,t.jsx)(n.code,{children:"trace_filter"})})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#trace_get",children:(0,t.jsx)(n.code,{children:"trace_get"})})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#trace_transaction",children:(0,t.jsx)(n.code,{children:"trace_transaction"})})}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(o,{...e})}):o(e)}},28453:(e,n,r)=>{r.d(n,{R:()=>d,x:()=>i});var t=r(96540);const c={},s=t.createContext(c);function d(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:d(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b7759d8d.947e5d2f.js b/assets/js/b7759d8d.947e5d2f.js new file mode 100644 index 00000000000..7ac1c7c3228 --- /dev/null +++ b/assets/js/b7759d8d.947e5d2f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1625],{76552:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>o,metadata:()=>i,toc:()=>c});var n=t(74848),r=t(28453);const o={title:"Deploy a Besu private network with Kubernetes",description:"Deploying Besu with Kubernetes",tags:["private networks"]},a="Deploy Besu using Kubernetes",i={id:"private-networks/tutorials/kubernetes/index",title:"Deploy a Besu private network with Kubernetes",description:"Deploying Besu with Kubernetes",source:"@site/docs/private-networks/tutorials/kubernetes/index.md",sourceDirName:"private-networks/tutorials/kubernetes",slug:"/private-networks/tutorials/kubernetes/",permalink:"/private-networks/tutorials/kubernetes/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/kubernetes/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{title:"Deploy a Besu private network with Kubernetes",description:"Deploying Besu with Kubernetes",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Interact with a deployed contract",permalink:"/private-networks/tutorials/contracts/interact"},next:{title:"Local playground",permalink:"/private-networks/tutorials/kubernetes/playground"}},l={},c=[{value:"Quorum-Kubernetes",id:"quorum-kubernetes",level:2},{value:"Cloud support",id:"cloud-support",level:3},{value:"Limitations",id:"limitations",level:2},{value:"CNI",id:"cni",level:3},{value:"Multi-cluster",id:"multi-cluster",level:2},{value:"Concepts",id:"concepts",level:2},{value:"Namespaces",id:"namespaces",level:3},{value:"Nodes",id:"nodes",level:3},{value:"Role-based access controls",id:"role-based-access-controls",level:3},{value:"Storage",id:"storage",level:3},{value:"Monitoring",id:"monitoring",level:3},{value:"Ingress Controllers",id:"ingress-controllers",level:3}];function u(e){const s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"deploy-besu-using-kubernetes",children:"Deploy Besu using Kubernetes"})}),"\n",(0,n.jsxs)(s.p,{children:["Use the ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/besu-kubernetes",children:"reference implementations"})," to install private networks using Kubernetes (K8s). Reference implementations are available using:"]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/tree/master/helm",children:"Helm"}),"."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/roboll/helmfile",children:"Helmfile"}),"."]}),"\n",(0,n.jsxs)(s.li,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/besu-kubernetes/tree/master/playground/kubectl",children:(0,n.jsx)(s.code,{children:"kubectl"})}),"."]}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"Familiarize yourself with the reference implementations and customize them for your requirements."}),"\n",(0,n.jsx)(s.h2,{id:"quorum-kubernetes",children:"Quorum-Kubernetes"}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-Kubernetes",children:"Quorum-Kubernetes"})," is a repository containing Kubernetes manifests and Helm charts that you can customize and deploy on a local cluster or in the cloud."]}),"\n",(0,n.jsx)(s.admonition,{type:"important",children:(0,n.jsxs)(s.p,{children:["We recommend starting with the ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/tree/master/playground",children:"playground"})," directory and working through the example setups before moving to the ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/tree/master/helm/",children:(0,n.jsx)(s.code,{children:"Helm charts"})})," directory."]})}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.code,{children:"helm"})," directory contains charts for the various components, and each chart has a ",(0,n.jsx)(s.code,{children:"cluster"})," map with features that you can toggle."]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:"cluster:\n provider: local # choose from: local | aws | azure\n cloudNativeServices: false # set to true to use Cloud Native Services (SecretsManager and IAM for AWS; KeyVault & Managed Identities for Azure)\n"})}),"\n",(0,n.jsxs)(s.p,{children:["Setting ",(0,n.jsx)(s.code,{children:"cluster.cloudNativeServices: true"})," stores keys in AWS Secrets Manager or Azure Key Vault instead of Kubernetes Secrets, and will also make use of AWS IAM or Azure Managed Identities for the pods."]}),"\n",(0,n.jsx)(s.h3,{id:"cloud-support",children:"Cloud support"}),"\n",(0,n.jsxs)(s.p,{children:["The repository's ",(0,n.jsx)(s.code,{children:"helm"})," charts support on-premise and cloud providers such as AWS, Azure, GCP, IBM etc. You can configure the provider in the ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/helm/values/genesis-besu.yml",children:"values.yml"})," file of the respective charts by setting ",(0,n.jsx)(s.code,{children:"cluster.provider"})," to ",(0,n.jsx)(s.code,{children:"local"}),", ",(0,n.jsx)(s.code,{children:"aws"}),", or ",(0,n.jsx)(s.code,{children:"azure"}),". If you use GCP, IBM etc., please set ",(0,n.jsx)(s.code,{children:"cluster.provider: local"})," and ",(0,n.jsx)(s.code,{children:"cluster.cloudNativeServices: false"}),"."]}),"\n",(0,n.jsxs)(s.p,{children:["The repository also contains ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/tree/master/azure",children:"Azure ARM templates"})," and ",(0,n.jsxs)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/tree/master/aws",children:["AWS ",(0,n.jsx)(s.code,{children:"eksctl"})," templates"]})," to deploy the required base infrastructure."]}),"\n",(0,n.jsx)(s.h2,{id:"limitations",children:"Limitations"}),"\n",(0,n.jsx)(s.p,{children:"When using multi-clusters, Kubernetes load balancers disallow TCP and UDP traffic on the same port, which inhibits discovery working natively for each pod. Use the following solutions to mitigate this limitation:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Disallow discovery and use static nodes to allow only TCP traffic. This isn't an issue for load balancers or exposing nodes publicly."}),"\n",(0,n.jsxs)(s.li,{children:["If you need to use discovery, use something such as ",(0,n.jsx)(s.a,{href:"#cni",children:"CNI"})," which is supported by all major cloud providers, and the cloud templates already have CNI implemented."]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"cni",children:"CNI"}),"\n",(0,n.jsxs)(s.p,{children:["With the traditional ",(0,n.jsx)(s.code,{children:"kubenet"})," networking mode, nodes get an IP from the virtual network subnet. Each node in turn uses NAT to configure the pods so that they reach other pods on the virtual network. This limits where they can reach but also more specifically what can reach them. For example, an external VM which must have custom routes does not scale well."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"without-CNI",src:t(45934).A+"",width:"956",height:"412"})}),"\n",(0,n.jsx)(s.p,{children:"CNI, on the other hand, allows every pod to get a unique IP directly from the virtual subnet which removes this restriction. Therefore, it has a limit on the maximum number of pods that can be spun up, so you must plan ahead to avoid IP exhaustion."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"with-CNI",src:t(59227).A+"",width:"957",height:"404"})}),"\n",(0,n.jsx)(s.h2,{id:"multi-cluster",children:"Multi-cluster"}),"\n",(0,n.jsxs)(s.p,{children:["You must enable ",(0,n.jsx)(s.a,{href:"#cni",children:"CNI"})," to use multi-cluster, or to connect external nodes to an existing Kubernetes cluster. To connect multiple clusters, they must each have different CIDR blocks to ensure no conflicts, and the first step is to peer the VPCs or VNets together and update the route tables. From that point on you can use static nodes and pods to communicate across the cluster."]}),"\n",(0,n.jsx)(s.p,{children:"The same setup also works to connect external nodes and business applications from other infrastructure, either in the cloud or on premise."}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"multi-cluster",src:t(19395).A+"",width:"1151",height:"591"})}),"\n",(0,n.jsx)(s.h2,{id:"concepts",children:"Concepts"}),"\n",(0,n.jsx)(s.h3,{id:"namespaces",children:"Namespaces"}),"\n",(0,n.jsxs)(s.p,{children:["In Kubernetes, ",(0,n.jsx)(s.a,{href:"https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/",children:"namespaces"})," provide a mechanism for isolating groups of resources within a single cluster. Both namespaces and resources (for example, Stateful Sets or Services) within a namespace must be unique, but resources across namespaces don't need to be."]}),"\n",(0,n.jsx)(s.admonition,{type:"note",children:(0,n.jsx)(s.p,{children:"Namespace-based scoping is not applicable for cluster-wide objects (for example, Storage Class or Persistent Volumes)."})}),"\n",(0,n.jsx)(s.h3,{id:"nodes",children:"Nodes"}),"\n",(0,n.jsx)(s.p,{children:"Consider using Stateful Sets instead of Deployments for Besu. The term 'client node' refers to bootnode, validator and member/RPC nodes. For Besu nodes, we only use CLI arguments to keep things consistent."}),"\n",(0,n.jsx)(s.h3,{id:"role-based-access-controls",children:"Role-based access controls"}),"\n",(0,n.jsx)(s.p,{children:"We encourage using role-based access controls (RBACs) for access to the private key of each node, that is, only a specific pod or statefulset is allowed to access a specific secret."}),"\n",(0,n.jsxs)(s.p,{children:["If you need to specify a Kube configuration file for each pod, use the ",(0,n.jsx)(s.code,{children:"KUBE_CONFIG_PATH"})," variable."]}),"\n",(0,n.jsx)(s.h3,{id:"storage",children:"Storage"}),"\n",(0,n.jsx)(s.p,{children:"We use separate data volumes to store the blockchain data. This is similar to using separate volumes to store data when using docker containers natively or docker-compose. This is done for a few reasons:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsx)(s.li,{children:"Containers are mortal and we do not want to store data on them."}),"\n",(0,n.jsx)(s.li,{children:"Kubernetes host nodes can fail and we want the chain data to persist."}),"\n"]}),"\n",(0,n.jsxs)(s.p,{children:["Ensure that you provide enough data storage capacity for all nodes on the cluster. Select the appropriate type of ",(0,n.jsx)(s.a,{href:"https://kubernetes.io/docs/concepts/storage/storage-classes/",children:"Storage Class"})," based on your cloud provider. In the templates, the size of the ",(0,n.jsx)(s.a,{href:"https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims",children:"volume claims"})," is set to 20Gb by default; you can change this depending on your needs. If you have a different storage account than the one in the charts, you may edit those ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/helm/charts/besu-node/templates/node-storage.yaml",children:"Storage Classes"}),"."]}),"\n",(0,n.jsxs)(s.p,{children:["When using Persistent Volume Claims, set the ",(0,n.jsx)(s.code,{children:"allowVolumeExpansion"})," to ",(0,n.jsx)(s.code,{children:"true"}),". This helps keep costs low and enables growing the volume over time rather than creating new volumes and copying data across."]}),"\n",(0,n.jsx)(s.h3,{id:"monitoring",children:"Monitoring"}),"\n",(0,n.jsx)(s.p,{children:"We recommend deploying metrics to get an overview of the network, nodes, and volumes. You can also create alerts."}),"\n",(0,n.jsx)(s.p,{children:"Besu publishes metrics to Prometheus, and you can configure metrics using the kubernetes scraper configuration. We also have custom Grafana dashboards to monitor the blockchain."}),"\n",(0,n.jsx)(s.admonition,{type:"note",children:(0,n.jsxs)(s.p,{children:["Refer to ",(0,n.jsx)(s.code,{children:"values/monitoring.yml"})," to configure the alerts per your requirements (for example slack or email)."]})}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:"cd helm\nhelm repo add prometheus-community https://prometheus-community.github.io/helm-charts\nhelm repo update\nhelm install monitoring prometheus-community/kube-prometheus-stack --version 34.10.0 --namespace=besu --create-namespace --values ./values/monitoring.yml --wait\nkubectl --namespace besu apply -f ./values/monitoring/\n"})}),"\n",(0,n.jsx)(s.p,{children:"You can configure Besu to suit your environment. For example, use the Elastic charts to log to a file that you can parse using Logstash into an ELK cluster."}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:"cd helm\nhelm repo add elastic https://helm.elastic.co\nhelm repo update\n# if on cloud\nhelm install elasticsearch --version 7.17.1 elastic/elasticsearch --namespace besu --create-namespace --values ./values/elasticsearch.yml\n# if local - set the replicas to 1\nhelm install elasticsearch --version 7.17.1 elastic/elasticsearch --namespace besu --create-namespace --values ./values/elasticsearch.yml --set replicas=1 --set minimumMasterNodes: 1\nhelm install kibana --version 7.17.1 elastic/kibana --namespace besu --values ./values/kibana.yml\nhelm install filebeat --version 7.17.1 elastic/filebeat --namespace besu --values ./values/filebeat.yml\n"})}),"\n",(0,n.jsx)(s.h3,{id:"ingress-controllers",children:"Ingress Controllers"}),"\n",(0,n.jsxs)(s.p,{children:["If you require the ingress controllers for the RPC calls or the monitoring dashboards, we have provided example ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/ingress/ingress-rules-besu.yml",children:"rules"})," that are pre-configured for common use cases. Use these as a reference and develop solutions to match your network topology and requirements."]})]})}function d(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(u,{...e})}):u(e)}},45934:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/kubernetes-1-d999da470021bd1aba37a76fd868e18f.jpeg"},59227:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/kubernetes-2-4503dd0ffbb4151254fcf515a0e5fbd2.jpeg"},19395:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/kubernetes-3-eb071f2ad027b1e11e96e3c4f68a745a.png"},28453:(e,s,t)=>{t.d(s,{R:()=>a,x:()=>i});var n=t(96540);const r={},o=n.createContext(r);function a(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function i(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bbdbb161.05b13db2.js b/assets/js/bbdbb161.05b13db2.js new file mode 100644 index 00000000000..0c5708680c9 --- /dev/null +++ b/assets/js/bbdbb161.05b13db2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8521],{95129:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>l,contentTitle:()=>c,default:()=>p,frontMatter:()=>i,metadata:()=>o,toc:()=>a});var t=n(74848),s=n(28453);const i={description:"private networks reference overview",tags:["private networks"]},c="Reference",o={id:"private-networks/reference/index",title:"Reference",description:"private networks reference overview",source:"@site/docs/private-networks/reference/index.md",sourceDirName:"private-networks/reference",slug:"/private-networks/reference/",permalink:"/private-networks/reference/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/reference/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{description:"private networks reference overview",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Deploy using Microsoft Azure",permalink:"/private-networks/tutorials/azure"},next:{title:"Private network options",permalink:"/private-networks/reference/cli/options"}},l={},a=[];function d(e){const r={a:"a",h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"reference",children:"Reference"})}),"\n",(0,t.jsx)(r.p,{children:"This section provides reference material for private network features."}),"\n",(0,t.jsxs)(r.p,{children:["The following features and resources are shared with ",(0,t.jsx)(r.a,{href:"/public-networks/",children:"public networks"})," and the content can be found in the public networks section:"]}),"\n",(0,t.jsxs)(r.ul,{children:["\n",(0,t.jsxs)(r.li,{children:["Besu command line:","\n",(0,t.jsxs)(r.ul,{children:["\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.a,{href:"/public-networks/reference/cli/options",children:"Standard options"})}),"\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.a,{href:"/public-networks/reference/cli/subcommands",children:"Standard subcommands"})}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(r.li,{children:["Besu API:","\n",(0,t.jsxs)(r.ul,{children:["\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.a,{href:"/public-networks/reference/api/",children:"Standard Besu API methods"})}),"\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.a,{href:"/public-networks/reference/api/objects",children:"Standard Besu API objects"})}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.a,{href:"/public-networks/reference/genesis-items",children:"Genesis file items"})}),"\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.a,{href:"/public-networks/reference/evm-tool",children:"EVM tool options"})}),"\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.a,{href:"/public-networks/reference/trace-types",children:"Transaction trace types"})}),"\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.a,{href:"/public-networks/reference/projects-using-besu",children:"Projects using Besu"})}),"\n",(0,t.jsx)(r.li,{children:(0,t.jsx)(r.a,{href:"/public-networks/reference/disclosure",children:"Security disclosure policy"})}),"\n"]})]})}function p(e={}){const{wrapper:r}={...(0,s.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453:(e,r,n)=>{n.d(r,{R:()=>c,x:()=>o});var t=n(96540);const s={},i=t.createContext(s);function c(e){const r=t.useContext(i);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),t.createElement(i.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bc60af12.ac8f074d.js b/assets/js/bc60af12.ac8f074d.js new file mode 100644 index 00000000000..6d80e95d59f --- /dev/null +++ b/assets/js/bc60af12.ac8f074d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[9084],{29827:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>s,default:()=>l,frontMatter:()=>c,metadata:()=>i,toc:()=>d});var o=n(74848),r=n(28453);const c={title:"Connect to a network overview",tags:["public networks"],hide:["feedback"]},s="Connect to a network",i={id:"public-networks/get-started/connect/index",title:"Connect to a network overview",description:"This section provides information on connecting Besu to a public Ethereum network.",source:"@site/docs/public-networks/get-started/connect/index.md",sourceDirName:"public-networks/get-started/connect",slug:"/public-networks/get-started/connect/",permalink:"/public-networks/get-started/connect/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/get-started/connect/index.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{title:"Connect to a network overview",tags:["public networks"],hide:["feedback"]},sidebar:"publicDocSidebar",previous:{title:"Start Besu",permalink:"/public-networks/get-started/start-node"},next:{title:"Connect to Mainnet",permalink:"/public-networks/get-started/connect/mainnet"}},a={},d=[];function u(e){const t={h1:"h1",header:"header",p:"p",...(0,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"connect-to-a-network",children:"Connect to a network"})}),"\n",(0,o.jsx)(t.p,{children:"This section provides information on connecting Besu to a public Ethereum network."})]})}function l(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(u,{...e})}):u(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>i});var o=n(96540);const r={},c=o.createContext(r);function s(e){const t=o.useContext(c);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),o.createElement(c.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bc69a950.2defb99c.js b/assets/js/bc69a950.2defb99c.js new file mode 100644 index 00000000000..a63365fd4c2 --- /dev/null +++ b/assets/js/bc69a950.2defb99c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7044],{74198:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>l,default:()=>p,frontMatter:()=>a,metadata:()=>c,toc:()=>u});var r=t(74848),s=t(28453),i=t(11470),o=t(19365);const a={title:"Use metrics",sidebar_position:1,description:"Monitoring and metrics",tags:["public networks","private networks"]},l="Use metrics to monitor node performance",c={id:"public-networks/how-to/monitor/metrics",title:"Use metrics",description:"Monitoring and metrics",source:"@site/docs/public-networks/how-to/monitor/metrics.md",sourceDirName:"public-networks/how-to/monitor",slug:"/public-networks/how-to/monitor/metrics",permalink:"/public-networks/how-to/monitor/metrics",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/monitor/metrics.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Use metrics",sidebar_position:1,description:"Monitoring and metrics",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Monitor Besu",permalink:"/public-networks/how-to/monitor/"},next:{title:"Understand metrics",permalink:"/public-networks/how-to/monitor/understand-metrics"}},h={},u=[{value:"Install Prometheus",id:"install-prometheus",level:2},{value:"Set up and run Prometheus with Besu",id:"set-up-and-run-prometheus-with-besu",level:2},{value:"Run Prometheus with Besu in push mode",id:"run-prometheus-with-besu-in-push-mode",level:2},{value:"View Prometheus graphical interface",id:"view-prometheus-graphical-interface",level:2},{value:"View the metrics list",id:"view-the-metrics-list",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"use-metrics-to-monitor-node-performance",children:"Use metrics to monitor node performance"})}),"\n",(0,r.jsxs)(n.p,{children:["To enable the ",(0,r.jsx)(n.a,{href:"https://prometheus.io/",children:"Prometheus"})," monitoring and alerting service to access Besu metrics, use the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#metrics-enabled",children:(0,r.jsx)(n.code,{children:"--metrics-enabled"})})," option. Use ",(0,r.jsx)(n.a,{href:"https://grafana.com/",children:"Grafana"})," to visualize the collected data. See the sample ",(0,r.jsx)(n.a,{href:"https://grafana.com/grafana/dashboards/16455-besu-full/",children:"Besu Full Grafana dashboard"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The Besu example networks have ",(0,r.jsx)(n.a,{href:"/private-networks/tutorials/quickstart#monitor-nodes-with-prometheus-and-grafana",children:"monitoring with Prometheus and Grafana configured"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"Use Prometheus to monitor the number of blocks your Besu node is behind the chain head, and to alert you that your node is not keeping up with the chain head."}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://www.youtube.com/watch?v=7BuutRe0I28&feature=youtu.be",children:"This recording"})," shows examples of monitoring Besu."]}),"\n",(0,r.jsx)(n.h2,{id:"install-prometheus",children:"Install Prometheus"}),"\n",(0,r.jsxs)(n.p,{children:["To use Prometheus with Besu, install the ",(0,r.jsx)(n.a,{href:"https://prometheus.io/download/",children:"Prometheus main component"}),". On MacOS, install with ",(0,r.jsx)(n.a,{href:"https://formulae.brew.sh/formula/prometheus",children:"Homebrew"}),":"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"brew install prometheus\n"})}),"\n",(0,r.jsxs)(n.admonition,{type:"tip",children:[(0,r.jsx)(n.p,{children:"You can also install:"}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Exporters that send system metrics to Prometheus to monitor non-Besu-specific items such as disk and CPU usage."}),"\n",(0,r.jsx)(n.li,{children:"Other Prometheus components, such as the Alert Manager. Additional configuration is not required for these components because Prometheus handles and analyzes data directly from the feed."}),"\n"]})]}),"\n",(0,r.jsx)(n.h2,{id:"set-up-and-run-prometheus-with-besu",children:"Set up and run Prometheus with Besu"}),"\n",(0,r.jsx)(n.p,{children:"To configure Prometheus and run with Besu:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Configure Prometheus to poll Besu.\nFor example, add the following YAML fragment to the ",(0,r.jsx)(n.code,{children:"scrape_configs"})," block of the ",(0,r.jsx)(n.code,{children:"prometheus.yml"})," file:"]}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"Fragment to insert in prometheus.yml",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yml",children:"- job_name: besu\n scrape_interval: 15s\n scrape_timeout: 10s\n metrics_path: /metrics\n scheme: http\n static_configs:\n - targets:\n - localhost:9545\n"})})}),(0,r.jsx)(o.A,{value:"Full prometheus.yml example",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yml",children:'global:\n scrape_interval: 15s\n\nscrape_configs:\n - job_name: "prometheus"\n static_configs:\n - targets: ["localhost:9090"]\n - job_name: besu\n scrape_interval: 15s\n scrape_timeout: 10s\n metrics_path: /metrics\n scheme: http\n static_configs:\n - targets:\n - localhost:9545\n'})})})]}),"\n",(0,r.jsxs)(n.p,{children:["Prometheus requires 3 MB of space per node per hour for metrics, with a ",(0,r.jsx)(n.code,{children:"scrape_interval"})," of 15 seconds."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Start Besu with the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#metrics-enabled",children:(0,r.jsx)(n.code,{children:"--metrics-enabled"})})," option.\nTo start a single node for testing with metrics enabled, run the following command:"]}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"Syntax",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --network=dev --miner-enabled --miner-coinbase --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-enabled\n'})})}),(0,r.jsx)(o.A,{value:"Example",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --network=dev --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-enabled\n'})})})]}),"\n",(0,r.jsxs)(n.p,{children:["To specify the host and port on which Prometheus accesses Besu, use the\n",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#metrics-host",children:(0,r.jsx)(n.code,{children:"--metrics-host"})})," and\n",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#metrics-port",children:(0,r.jsx)(n.code,{children:"--metrics-port"})})," options.\nThe default host and port are ",(0,r.jsx)(n.code,{children:"127.0.0.1"})," (",(0,r.jsx)(n.code,{children:"localhost"}),") and ",(0,r.jsx)(n.code,{children:"9545"}),"."]}),"\n",(0,r.jsx)(n.admonition,{type:"danger",children:(0,r.jsxs)(n.p,{children:["To avoid DNS rebinding attacks, if running Prometheus on a different host than your Besu node\n(any host other than ",(0,r.jsx)(n.code,{children:"localhost"}),"), add the hostname that Prometheus uses to\n",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#host-allowlist",children:(0,r.jsx)(n.code,{children:"--host-allowlist"})}),".\nFor example, if Prometheus is configured to get metrics from ",(0,r.jsx)(n.code,{children:"http://besu.local:8008/metrics"}),",\nthen ",(0,r.jsx)(n.code,{children:"besu.local"})," must be in ",(0,r.jsx)(n.code,{children:"--host-allowlist"}),"."]})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In another terminal, run Prometheus specifying the ",(0,r.jsx)(n.code,{children:"prometheus.yml"})," file:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"prometheus --config.file=prometheus.yml\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["View the ",(0,r.jsx)(n.a,{href:"#view-prometheus-graphical-interface",children:"Prometheus graphical interface"}),"."]}),"\n",(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsx)(n.p,{children:"Use a log ingestion tool, such as Logstash, to parse the logs and alert you to configured anomalies."})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"run-prometheus-with-besu-in-push-mode",children:"Run Prometheus with Besu in push mode"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#metrics-enabled",children:(0,r.jsx)(n.code,{children:"--metrics-enabled"})})," option enables Prometheus\npolling of Besu, but sometimes metrics are hard to poll (for example, when running inside Docker\ncontainers with varying IP addresses).\nTo enable Besu to push metrics to a ",(0,r.jsx)(n.a,{href:"https://github.com/prometheus/pushgateway",children:"Prometheus push gateway"}),",\nuse the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#metrics-push-enabled",children:(0,r.jsx)(n.code,{children:"--metrics-push-enabled"})})," option."]}),"\n",(0,r.jsx)(n.p,{children:"To configure Prometheus and run with Besu pushing to a push gateway:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Configure Prometheus to read from a push gateway.\nFor example, add the following YAML fragment to the ",(0,r.jsx)(n.code,{children:"scrape_configs"})," block of the ",(0,r.jsx)(n.code,{children:"prometheus.yml"})," file:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-yml",children:"- job_name: push-gateway\n metrics_path: /metrics\n scheme: http\n static_configs:\n - targets:\n - localhost:9091\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Start the push gateway.\nYou can deploy the push gateway using the Docker image:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker pull prom/pushgateway\ndocker run -d -p 9091:9091 prom/pushgateway\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Start Besu specifying the ",(0,r.jsx)(n.code,{children:"--metrics-push-enabled"})," option and port of the push gateway:"]}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(o.A,{value:"Syntax",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --network=dev --miner-enabled --miner-coinbase --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-push-enabled --metrics-push-port=9091 --metrics-push-host=127.0.0.1\n'})})}),(0,r.jsx)(o.A,{value:"Example",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --network=dev --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-http-cors-origins="all" --rpc-http-enabled --metrics-push-enabled --metrics-push-port=9091 --metrics-push-host=127.0.0.1\n'})})})]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In another terminal, run Prometheus specifying the ",(0,r.jsx)(n.code,{children:"prometheus.yml"})," file:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"prometheus --config.file=prometheus.yml\n"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["View the ",(0,r.jsx)(n.a,{href:"#view-prometheus-graphical-interface",children:"Prometheus graphical interface"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"view-prometheus-graphical-interface",children:"View Prometheus graphical interface"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Open a Web browser to ",(0,r.jsx)(n.a,{href:"http://localhost:9090",children:(0,r.jsx)(n.code,{children:"http://localhost:9090"})})," to view the Prometheus graphical interface."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Choose ",(0,r.jsx)(n.strong,{children:"Graph"})," from the menu bar and click the ",(0,r.jsx)(n.strong,{children:"Console"})," tab below."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["From the ",(0,r.jsx)(n.strong,{children:"Insert metric at cursor"})," drop-down, select a ",(0,r.jsx)(n.a,{href:"#metrics-list",children:"metric"})," such as ",(0,r.jsx)(n.code,{children:"besu_blockchain_difficulty_total"})," or ",(0,r.jsx)(n.code,{children:"ethereum_blockchain_height"})," and click ",(0,r.jsx)(n.strong,{children:"Execute"}),". The values display."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click the ",(0,r.jsx)(n.strong,{children:"Graph"})," tab to view the data as a time-based graph. The query string displays below the graph. For example, ",(0,r.jsx)(n.code,{children:'{ethereum_blockchain_height{instance="localhost:9545",job="prometheus"}'}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"view-the-metrics-list",children:"View the metrics list"}),"\n",(0,r.jsx)(n.p,{children:"Run the following command to view the full list of available metrics:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"curl http://localhost:9545/metrics\n"})}),"\n",(0,r.jsx)(n.p,{children:"Update the host and port if you are not using the default values."}),"\n",(0,r.jsxs)(n.p,{children:["Each metric, such as ",(0,r.jsx)(n.code,{children:"besu_blockchain_chain_head_gas_limit"}),", starts with a metric category prefix.\nMetrics specific to Besu use the ",(0,r.jsx)(n.code,{children:"besu_"})," prefix, followed by another metric category.\nYou can enable metric categories using the\n",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#metrics-category",children:(0,r.jsx)(n.code,{children:"--metrics-category"})})," command line option."]})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var r=t(18215);const s={tabItem:"tabItem_Ymn6"};var i=t(74848);function o(e){let{children:n,hidden:t,className:o}=e;return(0,i.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,o),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>y});var r=t(96540),s=t(18215),i=t(23104),o=t(56347),a=t(205),l=t(57485),c=t(31682),h=t(70679);function u(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function d(e){const{values:n,children:t}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:r,default:s}}=e;return{value:n,label:t,attributes:r,default:s}}))}(t);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function m(e){let{queryString:n=!1,groupId:t}=e;const s=(0,o.W6)(),i=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l.aZ)(i),(0,r.useCallback)((e=>{if(!i)return;const n=new URLSearchParams(s.location.search);n.set(i,e),s.replace({...s.location,search:n.toString()})}),[i,s])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,i=d(e),[o,l]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=t.find((e=>e.default))??t[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:i}))),[c,u]=m({queryString:t,groupId:s}),[b,f]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,i]=(0,h.Dv)(t);return[s,(0,r.useCallback)((e=>{t&&i.set(e)}),[t,i])]}({groupId:s}),x=(()=>{const e=c??b;return p({value:e,tabValues:i})?e:null})();(0,a.A)((()=>{x&&l(x)}),[x]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!p({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);l(e),u(e),f(e)}),[u,f,i]),tabValues:i}}var f=t(92303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function j(e){let{className:n,block:t,selectedValue:r,selectValue:o,tabValues:a}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.a_)(),h=e=>{const n=e.currentTarget,t=l.indexOf(n),s=a[t].value;s!==r&&(c(n),o(s))},u=e=>{let n=null;switch(e.key){case"Enter":h(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},n),children:a.map((e=>{let{value:n,label:t,attributes:i}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>l.push(e),onKeyDown:u,onClick:h,...i,className:(0,s.A)("tabs__item",x.tabItem,i?.className,{"tabs__item--active":r===n}),children:t??n},n)}))})}function w(e){let{lazy:n,children:t,selectedValue:i}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=o.find((e=>e.props.value===i));return e?(0,r.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:o.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==i})))})}function v(e){const n=b(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",x.tabList),children:[(0,g.jsx)(j,{...n,...e}),(0,g.jsx)(w,{...n,...e})]})}function y(e){const n=(0,f.A)();return(0,g.jsx)(v,{...e,children:u(e.children)},String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var r=t(96540);const s={},i=r.createContext(s);function o(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bd3642f6.380bcf35.js b/assets/js/bd3642f6.380bcf35.js new file mode 100644 index 00000000000..5bffbdfa32b --- /dev/null +++ b/assets/js/bd3642f6.380bcf35.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2868],{1634:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>i,metadata:()=>o,toc:()=>d});var s=t(74848),r=t(28453);const i={title:"Privacy",sidebar_position:1,description:"Privacy"},a="Privacy (Deprecated)",o={id:"private-networks/concepts/privacy/index",title:"Privacy",description:"Privacy",source:"@site/docs/private-networks/concepts/privacy/index.md",sourceDirName:"private-networks/concepts/privacy",slug:"/private-networks/concepts/privacy/",permalink:"/private-networks/concepts/privacy/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/concepts/privacy/index.md",tags:[],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Privacy",sidebar_position:1,description:"Privacy"},sidebar:"privateDocSidebar",previous:{title:"Proof of authority consensus",permalink:"/private-networks/concepts/poa"},next:{title:"Private transactions (Deprecated)",permalink:"/private-networks/concepts/privacy/private-transactions/"}},c={},d=[{value:"Private transaction manager",id:"private-transaction-manager",level:2},{value:"Privacy-enabled networks",id:"privacy-enabled-networks",level:2},{value:"Reorg-compatible privacy",id:"reorg-compatible-privacy",level:2}];function p(e){const n={a:"a",admonition:"admonition",h1:"h1",h2:"h2",header:"header",img:"img",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"privacy-deprecated",children:"Privacy (Deprecated)"})}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsxs)(n.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,s.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,s.jsx)(n.p,{children:"In Besu, privacy refers to the ability to keep transactions private between the involved participants. Other participants cannot access the transaction content or list of participants."}),"\n",(0,s.jsxs)(n.admonition,{type:"danger",children:[(0,s.jsx)(n.p,{children:"For production environments requiring private transactions:"}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["We recommend using a network with a consensus mechanism supporting transaction finality. For example, ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft",children:"IBFT 2.0"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Tessera must be ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/use-privacy/tessera",children:"highly available and run in a separate instance to Besu"}),"."]}),"\n"]}),(0,s.jsxs)(n.p,{children:["Using private transactions with ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#pruning",children:"pruning"})," or ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:"fast sync"})," isn't supported."]})]}),"\n",(0,s.jsx)(n.h2,{id:"private-transaction-manager",children:"Private transaction manager"}),"\n",(0,s.jsxs)(n.p,{children:["Besu uses a private transaction manager, ",(0,s.jsx)(n.a,{href:"https://docs.tessera.consensys.net/",children:"Tessera"}),", to implement privacy. Each Besu node that sends or receives ",(0,s.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/",children:"private transactions"})," requires an associated Tessera node."]}),"\n",(0,s.jsx)("p",{align:"center",children:(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Tessera Nodes",src:t(40785).A+"",width:"731",height:"807"})})}),"\n",(0,s.jsx)(n.p,{children:"Private transactions pass from the Besu node to the associated Tessera node. The Tessera node encrypts and directly distributes (that is, point-to-point) the private transaction to the Tessera nodes participating in the transaction."}),"\n",(0,s.jsxs)(n.p,{children:["By default, each participant in a privacy-enabled network uses its own Besu and Tessera node. ",(0,s.jsx)(n.a,{href:"/private-networks/concepts/privacy/multi-tenancy",children:"Multi-tenancy"})," allows more than one participant to use the same Besu and Tessera node."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(n.p,{children:"Private Transaction Managers are also known as Enclaves."})}),"\n",(0,s.jsx)(n.h2,{id:"privacy-enabled-networks",children:"Privacy-enabled networks"}),"\n",(0,s.jsxs)(n.p,{children:["When enabling privacy in a ",(0,s.jsx)(n.a,{href:"/private-networks/get-started/system-requirements",children:"private network"}),", there's an assumed level of trust among the node operators, since all are members of the private network."]}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsx)(n.p,{children:"Inefficient contracts deployed accidentally or deliberately can cause performance issues in privacy-enabled networks because gas isn't required in private transactions."})}),"\n",(0,s.jsx)(n.p,{children:"In contrast, gas is required in Ethereum Mainnet and public testnets because they are trustless environments."}),"\n",(0,s.jsx)(n.p,{children:"Privacy-enabled networks should have a mechanism to establish trust offchain. Node operators should be informed on:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Guidelines for use, responsibilities, and good behavior."}),"\n",(0,s.jsx)(n.li,{children:"Smart contract security, so contracts deployed on the network use resources efficiently."}),"\n",(0,s.jsx)(n.li,{children:"Consequences for malicious activity."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Privacy-enabled networks should run development and test environments that closely resemble production, so contracts can be tested, and potential issues can be found before they're deployed in production."}),"\n",(0,s.jsx)(n.h2,{id:"reorg-compatible-privacy",children:"Reorg-compatible privacy"}),"\n",(0,s.jsx)(n.p,{children:"In v1.4, using private transactions in a network using a consensus mechanism where forks occur (that is, PoW algorithms or Clique) is an early access feature."}),"\n",(0,s.jsx)(n.p,{children:"Do not use private transactions in production environments using consensus mechanisms where forks occur."})]})}function l(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},40785:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/TesseraNodes-ea2944d12c284fc0bad69e7c3f898817.png"},28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var s=t(96540);const r={},i=s.createContext(r);function a(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:a(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bd4880eb.bcab1d22.js b/assets/js/bd4880eb.bcab1d22.js new file mode 100644 index 00000000000..9c678441a70 --- /dev/null +++ b/assets/js/bd4880eb.bcab1d22.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1572],{43573:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>o,default:()=>u,frontMatter:()=>s,metadata:()=>c,toc:()=>d});var r=n(74848),a=n(28453);const s={title:"Interact with a deployed contract",sidebar_position:2,description:"calling smart contracts functions",tags:["private networks"]},o="Interact with deployed smart contracts",c={id:"private-networks/tutorials/contracts/interact",title:"Interact with a deployed contract",description:"calling smart contracts functions",source:"@site/docs/private-networks/tutorials/contracts/interact.md",sourceDirName:"private-networks/tutorials/contracts",slug:"/private-networks/tutorials/contracts/interact",permalink:"/private-networks/tutorials/contracts/interact",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/contracts/interact.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Interact with a deployed contract",sidebar_position:2,description:"calling smart contracts functions",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Transfer account funds",permalink:"/private-networks/tutorials/contracts/transfer-funds"},next:{title:"Deploy a Besu private network with Kubernetes",permalink:"/private-networks/tutorials/kubernetes/"}},i={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Interact with public contracts",id:"interact-with-public-contracts",level:2},{value:"1. Perform a read operation",id:"1-perform-a-read-operation",level:3},{value:"2. Perform a write operation",id:"2-perform-a-write-operation",level:3},{value:"3. Verify an updated value",id:"3-verify-an-updated-value",level:3},{value:"Interact with private contracts",id:"interact-with-private-contracts",level:2},{value:"1. Perform a read operation",id:"1-perform-a-read-operation-1",level:3},{value:"2. Perform a write operation",id:"2-perform-a-write-operation-1",level:3},{value:"3. Verify an updated value",id:"3-verify-an-updated-value-1",level:3}];function l(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"interact-with-deployed-smart-contracts",children:"Interact with deployed smart contracts"})}),"\n",(0,r.jsxs)(t.p,{children:["You can get started with the ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/quickstart",children:"Developer Quickstart"})," to rapidly generate local blockchain networks."]}),"\n",(0,r.jsx)(t.p,{children:"This tutorial shows you how to interact with smart contracts that have been deployed to a network."}),"\n",(0,r.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["A network with a deployed smart contract as in the ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/contracts/",children:"deploying smart contracts tutorial"})]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"interact-with-public-contracts",children:"Interact with public contracts"}),"\n",(0,r.jsxs)(t.p,{children:["This tutorial uses the ",(0,r.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart/blob/1e8cc281098923802845cd829ec20c88513c2e1c/files/common/smart_contracts/privacy/contracts/SimpleStorage.sol",children:(0,r.jsx)(t.code,{children:"SimpleStorage.sol"})})," contract:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-js",children:"pragma solidity ^0.7.0;\n\ncontract SimpleStorage {\n uint public storedData;\n\n constructor(uint initVal) public {\n storedData = initVal;\n }\n\n function set(uint x) public {\n storedData = x;\n }\n\n function get() view public returns (uint retVal) {\n return storedData;\n }\n}\n"})}),"\n",(0,r.jsxs)(t.p,{children:["Once the contract is deployed, you can perform a read operation using the ",(0,r.jsx)(t.code,{children:"get"})," function call and a write operation using the ",(0,r.jsx)(t.code,{children:"set"})," function call. This tutorial uses the ",(0,r.jsx)(t.a,{href:"https://www.npmjs.com/package/web3",children:"web3js"})," library to interact with the contract. A ",(0,r.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart/blob/1e8cc281098923802845cd829ec20c88513c2e1c/files/besu/smart_contracts/privacy/scripts/public_tx.js",children:"full example"})," of these calls can be found in the ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/quickstart",children:"Developer Quickstart"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"1-perform-a-read-operation",children:"1. Perform a read operation"}),"\n",(0,r.jsxs)(t.p,{children:["To perform a read operation, you need the address that the contract was deployed to and the contract's ABI. The contract's ABI can be obtained from compiling the contract; see the ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/contracts/",children:"deploying smart contracts tutorial"})," for an example."]}),"\n",(0,r.jsxs)(t.p,{children:["Use the ",(0,r.jsx)(t.a,{href:"https://web3js.readthedocs.io/en/v1.3.4/web3-eth-contract.html",children:(0,r.jsx)(t.code,{children:"web3.eth.Contract"})})," object to create a new instance of the smart contract, then make the ",(0,r.jsx)(t.code,{children:"get"})," function call from the contract's list of methods, which will return the value stored:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-js",children:'async function getValueAtAddress(\n host,\n deployedContractAbi,\n deployedContractAddress,\n) {\n const web3 = new Web3(host);\n const contractInstance = new web3.eth.Contract(\n deployedContractAbi,\n deployedContractAddress,\n );\n const res = await contractInstance.methods.get().call();\n console.log("Obtained value at deployed contract is: " + res);\n return res;\n}\n'})}),"\n",(0,r.jsx)(t.h3,{id:"2-perform-a-write-operation",children:"2. Perform a write operation"}),"\n",(0,r.jsxs)(t.p,{children:["To perform a write operation, send a transaction to update the stored value. As with the ",(0,r.jsxs)(t.a,{href:"#1-perform-a-read-operation",children:[(0,r.jsx)(t.code,{children:"get"})," call"]}),", you need to use the address that the contract was deployed to and the contract's ABI. The account address must correspond to an actual account with some ETH in it to perform the transaction. Because Besu doesn't manage accounts, this address is the address you use in ",(0,r.jsx)(t.a,{href:"https://docs.web3signer.consensys.net/",children:"Web3Signer"})," (or equivalent) to manage your accounts."]}),"\n",(0,r.jsxs)(t.p,{children:["Make the ",(0,r.jsx)(t.code,{children:"set"})," call passing in your account address, ",(0,r.jsx)(t.code,{children:"value"})," as the updated value of the contract, and the amount of gas you are willing to spend for the transaction:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-js",children:'// You need to use the accountAddress details provided to Besu to send/interact with contracts\nasync function setValueAtAddress(\n host,\n accountAddress,\n value,\n deployedContractAbi,\n deployedContractAddress,\n) {\n const web3 = new Web3(host);\n const contractInstance = new web3.eth.Contract(\n deployedContractAbi,\n deployedContractAddress,\n );\n const res = await contractInstance.methods\n .set(value)\n .send({ from: accountAddress, gasPrice: "0xFF", gasLimit: "0x24A22" });\n return res;\n}\n'})}),"\n",(0,r.jsx)(t.h3,{id:"3-verify-an-updated-value",children:"3. Verify an updated value"}),"\n",(0,r.jsxs)(t.p,{children:["To verify that a value has been updated, perform a ",(0,r.jsx)(t.code,{children:"get"})," call after a ",(0,r.jsx)(t.code,{children:"set"})," update call."]}),"\n",(0,r.jsx)(t.h2,{id:"interact-with-private-contracts",children:"Interact with private contracts"}),"\n",(0,r.jsxs)(t.p,{children:["This private contracts example uses the same ",(0,r.jsx)(t.code,{children:"SimpleStorage.sol"})," contract as in the ",(0,r.jsx)(t.a,{href:"#interact-with-public-contracts",children:"public contracts example"}),", but it uses the ",(0,r.jsx)(t.a,{href:"https://consensys.github.io/web3js-quorum/latest/index.html",children:"web3js-quorum"})," library and the ",(0,r.jsx)(t.a,{href:"https://consensys.github.io/web3js-quorum/latest/module-priv.html#~generateAndSendRawTransaction",children:(0,r.jsx)(t.code,{children:"generateAndSendRawTransaction"})})," method to interact with the contract. Both read and write operations are performed using the ",(0,r.jsx)(t.code,{children:"generateAndSendRawTransaction"})," API call. A ",(0,r.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart/blob/1e8cc281098923802845cd829ec20c88513c2e1c/files/besu/smart_contracts/privacy/scripts/private_tx.js",children:"full example"})," can be found in the ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/quickstart",children:"Developer Quickstart"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"1-perform-a-read-operation-1",children:"1. Perform a read operation"}),"\n",(0,r.jsx)(t.p,{children:"As in the public contracts example, to perform a read operation, you need the address that the contract was deployed to and the contract's ABI. You also need your private and public keys and the recipient's public key."}),"\n",(0,r.jsxs)(t.p,{children:["Use the ",(0,r.jsx)(t.a,{href:"https://web3js.readthedocs.io/en/v1.3.4/web3-eth-contract.html",children:(0,r.jsx)(t.code,{children:"web3.eth.Contract"})})," object to create a new instance of the smart contract, extract the signature of function's ABI for the ",(0,r.jsx)(t.code,{children:"get"})," method, and then use this value as the ",(0,r.jsx)(t.code,{children:"data"})," parameter for the ",(0,r.jsx)(t.code,{children:"generateAndSendRawTransaction"})," transaction."]}),"\n",(0,r.jsxs)(t.p,{children:["The keys remain the same for the sender and recipient, and the ",(0,r.jsx)(t.code,{children:"to"})," field is the contract's address. Once you make the request, you receive a ",(0,r.jsx)(t.code,{children:"transactionHash"}),", which you can use to get a ",(0,r.jsx)(t.code,{children:"transactionReceipt"})," containing the value stored:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-js",children:'async function getValueAtAddress(\n clientUrl,\n address,\n contractAbi,\n fromPrivateKey,\n fromPublicKey,\n toPublicKey,\n) {\n const Web3 = require("web3");\n const Web3Quorum = require("web3js-quorum");\n const web3 = new Web3Quorum(new Web3("http://localhost:22000"));\n // eslint-disable-next-line no-underscore-dangle\n const functionAbi = contract._jsonInterface.find((e) => {\n return e.name === "get";\n });\n const functionParams = {\n to: address,\n data: functionAbi.signature,\n privateKey: fromPrivateKey,\n privateFrom: fromPublicKey,\n privateFor: [toPublicKey],\n };\n const transactionHash = await web3quorum.priv.generateAndSendRawTransaction(\n functionParams,\n );\n // console.log(`Transaction hash: ${transactionHash}`);\n const result = await web3quorum.priv.waitForTransactionReceipt(\n transactionHash,\n );\n console.log(\n "" + nodeName + " value from deployed contract is: " + result.output,\n );\n return result;\n}\n'})}),"\n",(0,r.jsx)(t.h3,{id:"2-perform-a-write-operation-1",children:"2. Perform a write operation"}),"\n",(0,r.jsxs)(t.p,{children:["Performing a write operation is almost the same process as the read operation, except that you encode the new value to the ",(0,r.jsx)(t.code,{children:"set"})," function's ABI, and then append these arguments to the ",(0,r.jsx)(t.code,{children:"set"})," function's ABI and use this as the ",(0,r.jsx)(t.code,{children:"data"})," field:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-js",children:'async function setValueAtAddress(\n clientUrl,\n address,\n value,\n contractAbi,\n fromPrivateKey,\n fromPublicKey,\n toPublicKey,\n) {\n const Web3 = require("web3");\n const Web3Quorum = require("web3js-quorum");\n const web3 = new Web3Quorum(new Web3("http://localhost:22000"));\n // eslint-disable-next-line no-underscore-dangle\n const functionAbi = contract._jsonInterface.find((e) => {\n return e.name === "set";\n });\n const functionArgs = web3quorum.eth.abi\n .encodeParameters(functionAbi.inputs, [value])\n .slice(2);\n const functionParams = {\n to: address,\n data: functionAbi.signature + functionArgs,\n privateKey: fromPrivateKey,\n privateFrom: fromPublicKey,\n privateFor: [toPublicKey],\n };\n const transactionHash = await web3quorum.priv.generateAndSendRawTransaction(\n functionParams,\n );\n console.log(`Transaction hash: ${transactionHash}`);\n const result = await web3quorum.priv.waitForTransactionReceipt(\n transactionHash,\n );\n return result;\n}\n'})}),"\n",(0,r.jsx)(t.h3,{id:"3-verify-an-updated-value-1",children:"3. Verify an updated value"}),"\n",(0,r.jsxs)(t.p,{children:["To verify that a value has been updated, perform a ",(0,r.jsx)(t.code,{children:"get"})," call after a ",(0,r.jsx)(t.code,{children:"set"})," update call."]})]})}function u(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>c});var r=n(96540);const a={},s=r.createContext(a);function o(e){const t=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:o(e.components),r.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/bea70e21.8fbd02fc.js b/assets/js/bea70e21.8fbd02fc.js new file mode 100644 index 00000000000..fb37934324b --- /dev/null +++ b/assets/js/bea70e21.8fbd02fc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7618],{57760:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>c});var r=s(74848),t=s(28453);const i={title:"Deploy using Microsoft Azure",sidebar_position:10,description:"Deploy a private IBFT 2.0 network using Microsoft Azure.",tags:["private networks"]},o="Deploy private network example on Azure",a={id:"private-networks/tutorials/azure",title:"Deploy using Microsoft Azure",description:"Deploy a private IBFT 2.0 network using Microsoft Azure.",source:"@site/docs/private-networks/tutorials/azure.md",sourceDirName:"private-networks/tutorials",slug:"/private-networks/tutorials/azure",permalink:"/private-networks/tutorials/azure",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/azure.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:10,frontMatter:{title:"Deploy using Microsoft Azure",sidebar_position:10,description:"Deploy a private IBFT 2.0 network using Microsoft Azure.",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Configure Kubernetes mode in NAT manager",permalink:"/private-networks/tutorials/kubernetes/nat-manager"},next:{title:"Reference",permalink:"/private-networks/reference/"}},l={},c=[{value:"Overview",id:"overview",level:2},{value:"Deploy",id:"deploy",level:2},{value:"Block explorer",id:"block-explorer",level:2},{value:"Metrics",id:"metrics",level:2},{value:"Connect to VM RPC endpoint",id:"connect-to-vm-rpc-endpoint",level:2},{value:"SSH",id:"ssh",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"deploy-private-network-example-on-azure",children:"Deploy private network example on Azure"})}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.a,{href:"https://azuremarketplace.microsoft.com/en-us/marketplace/apps/consensys.quorum-dev-quickstart",children:"Quorum Dev Quickstart on Azure Marketplace"})," enables deploying a private IBFT 2.0 network, which includes:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"A bootnode."}),"\n",(0,r.jsx)(n.li,{children:"An RPC node."}),"\n",(0,r.jsx)(n.li,{children:"Three regular nodes."}),"\n",(0,r.jsx)(n.li,{children:"A block explorer."}),"\n",(0,r.jsx)(n.li,{children:"Prometheus and Grafana with the Besu dashboard installed."}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"These are deployed on a single Azure VM in minutes."}),"\n",(0,r.jsxs)(n.p,{children:["Once deployed, you can develop and test applications and connect to the Visual Studio Code (VSCode) plugin using the RPC endpoint ",(0,r.jsx)(n.code,{children:"http:///jsonrpc"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,r.jsx)(n.p,{children:"The following is a high-level overview of the deployed network."}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Image landing",src:s(69507).A+"",width:"1512",height:"1746"})}),"\n",(0,r.jsx)(n.h2,{id:"deploy",children:"Deploy"}),"\n",(0,r.jsx)(n.p,{children:"To deploy the private network example on Azure:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Create a Resource Group in the ",(0,r.jsx)(n.a,{href:"https://portal.azure.com",children:"Azure Portal"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Go to the ",(0,r.jsx)(n.a,{href:"https://azuremarketplace.microsoft.com/en-us/marketplace/apps/consensys.quorum-dev-quickstart",children:"Quorum Dev Quickstart on Azure Marketplace"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Get It Now"})," and ",(0,r.jsx)(n.strong,{children:"Continue"}),". The Quickstart landing page is displayed."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Image landing",src:s(24825).A+"",width:"2646",height:"1762"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Create"}),". The ",(0,r.jsx)(n.strong,{children:"Basics"})," page is displayed."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Image basics",src:s(31508).A+"",width:"2672",height:"2030"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Enter:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Details of the Resource Group you created earlier."}),"\n",(0,r.jsx)(n.li,{children:"Basic user credentials to start a VM."}),"\n",(0,r.jsx)(n.li,{children:"Prefix for your new VM and any other resources created."}),"\n",(0,r.jsx)(n.li,{children:"Region to which you wish to deploy the VM."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Next: Size"})," and select the size of the VM you want to use."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To start the deployment, click ",(0,r.jsx)(n.strong,{children:"Review + create"})," at the bottom left of the page."]}),"\n",(0,r.jsx)(n.p,{children:"The deployment typically takes 3--5 minutes. The progress of your deployment is displayed."}),"\n",(0,r.jsx)(n.p,{children:"When the deployment is complete, the resources created are displayed."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Go to Resource"}),". Everything created in the deployment is displayed."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Click on the VM name. The VM details such as the IP and DNS name are displayed. Use the IP and DNS name displayed to connect to the VM, either in browser or via RPC calls."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"block-explorer",children:"Block explorer"}),"\n",(0,r.jsx)(n.p,{children:"To display the block explorer, open a new tab and enter either the IP of the VM or the DNS name."}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Image be",src:s(58829).A+"",width:"1919",height:"1020"})}),"\n",(0,r.jsx)(n.h2,{id:"metrics",children:"Metrics"}),"\n",(0,r.jsx)(n.p,{children:"The deployment includes Prometheus metrics and Grafana with a custom Besu Dashboard installed. To display the dashboard:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Open a new tab and enter the IP or DNS name appended with ",(0,r.jsx)(n.code,{children:"/grafana"}),". For example: ",(0,r.jsx)(n.code,{children:"http:///grafana"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Click on home and select the Besu dashboard."}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Grafana screenshot",src:s(81813).A+"",width:"1919",height:"1020"})}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"The dashboard provides a visual way to monitor your network and nodes as the chain progresses. Alerting can also be configured."}),"\n",(0,r.jsx)(n.h2,{id:"connect-to-vm-rpc-endpoint",children:"Connect to VM RPC endpoint"}),"\n",(0,r.jsxs)(n.p,{children:["You can connect dapps or develop directly from the IDE by using VSCode and connecting to the VM RPC endpoint. The endpoint is the DNS name appended with ",(0,r.jsx)(n.code,{children:"/jsonrpc"}),": ",(0,r.jsx)(n.code,{children:"http:///jsonrpc"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"ssh",children:"SSH"}),"\n",(0,r.jsxs)(n.p,{children:["You can SSH into the VM to see how everything is set up and working. Use the credentials from step 5 of ",(0,r.jsx)(n.a,{href:"#deploy",children:"deployment"})," and your preferred client:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"ssh username@\n"})}),"\n",(0,r.jsxs)(n.p,{children:["To list all containers running, run ",(0,r.jsx)(n.code,{children:"docker ps"}),". Find the complete setup in ",(0,r.jsx)(n.code,{children:"/home//besu-quickstart"}),"."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Image ssh",src:s(55877).A+"",width:"1912",height:"993"})})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},24825:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/mp_0_landing-5cdec9b2528e30ce29b06d11ecb77938.png"},55877:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/mp_10_ssh-47c3a844de85d9a9e17e33c3234b32c4.png"},31508:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/mp_1_basics-fcefb199c3a414a1df4e9c55a39502bc.png"},58829:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/mp_8_block_explorer-acb08c38f2b2d6293ac0ce112808cb56.png"},81813:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/mp_9_grafana-8553c7f464c56edad72663f6425e95d7.png"},69507:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/sampleNetworks-poa-f758f8253e9ab26a321c53c3b3c7259b.png"},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var r=s(96540);const t={},i=r.createContext(t);function o(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:o(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c029b5c7.9727eb79.js b/assets/js/c029b5c7.9727eb79.js new file mode 100644 index 00000000000..f601249c4bc --- /dev/null +++ b/assets/js/c029b5c7.9727eb79.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7800],{9424:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>i,default:()=>p,frontMatter:()=>s,metadata:()=>o,toc:()=>c});var n=r(74848),a=r(28453);const s={title:"Backup and restore",description:"Backing up and restoring Besu",sidebar_position:7,tags:["private networks"]},i="Backup and restore Besu",o={id:"private-networks/how-to/backup",title:"Backup and restore",description:"Backing up and restoring Besu",source:"@site/docs/private-networks/how-to/backup.md",sourceDirName:"private-networks/how-to",slug:"/private-networks/how-to/backup",permalink:"/private-networks/how-to/backup",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/backup.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:7,frontMatter:{title:"Backup and restore",description:"Backing up and restoring Besu",sidebar_position:7,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use Ethstats network monitor",permalink:"/private-networks/how-to/deploy/ethstats"},next:{title:"Upgrade",permalink:"/private-networks/how-to/upgrade"}},d={},c=[{value:"Genesis file",id:"genesis-file",level:2},{value:"Data backups",id:"data-backups",level:2},{value:"Data restores",id:"data-restores",level:2},{value:"Corrupted data",id:"corrupted-data",level:2},{value:"Prevent accidental downgrade",id:"prevent-accidental-downgrade",level:2},{value:"Find peers after restarting",id:"find-peers-after-restarting",level:2}];function l(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"backup-and-restore-besu",children:"Backup and restore Besu"})}),"\n",(0,n.jsx)(t.p,{children:"In a decentralized blockchain, data replicates between nodes so it is not lost. But backing up configuration and data ensures a smoother recovery from corrupted data or other failures."}),"\n",(0,n.jsx)(t.h2,{id:"genesis-file",children:"Genesis file"}),"\n",(0,n.jsx)(t.p,{children:"The genesis file for a network must be accessible on every node. We recommend storing the genesis file under source control."}),"\n",(0,n.jsx)(t.h2,{id:"data-backups",children:"Data backups"}),"\n",(0,n.jsx)(t.p,{children:"If installed locally, the default data location is the Besu installation directory."}),"\n",(0,n.jsxs)(t.p,{children:["We recommend mounting a ",(0,n.jsx)(t.a,{href:"/private-networks/get-started/install/run-docker-image",children:"separate volume to store data"}),". Use the ",(0,n.jsx)(t.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,n.jsx)(t.code,{children:"--data-path"})})," command line option to pass the path to Besu."]}),"\n",(0,n.jsxs)(t.p,{children:["The default data location is the Besu installation directory, or ",(0,n.jsx)(t.code,{children:"/opt/besu/database"})," if using the ",(0,n.jsx)(t.a,{href:"/private-networks/get-started/install/run-docker-image",children:"Besu Docker image"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["Having some data reduces the time to synchronize a new node. You can perform periodic backups of the data directory and send the data to your preferred backup mechanism. For example, ",(0,n.jsx)(t.code,{children:"cron"})," job and ",(0,n.jsx)(t.code,{children:"rsync"}),", archives to the cloud such as s3, or ",(0,n.jsx)(t.code,{children:"tar.gz"})," archives."]}),"\n",(0,n.jsx)(t.h2,{id:"data-restores",children:"Data restores"}),"\n",(0,n.jsx)(t.p,{children:"To restore data:"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsx)(t.li,{children:"If the node is running, stop the node."}),"\n",(0,n.jsx)(t.li,{children:"If required, move the data directory to another location for analysis."}),"\n",(0,n.jsx)(t.li,{children:"Restore the data from your last known good backup to the same directory."}),"\n",(0,n.jsx)(t.li,{children:"Ensure user permissions are valid so you can read from and write to the data directory."}),"\n",(0,n.jsx)(t.li,{children:"Restart the node."}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"corrupted-data",children:"Corrupted data"}),"\n",(0,n.jsx)(t.p,{children:"If log messages signify a corrupt database, the cleanest way to recover is:"}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsx)(t.li,{children:"Stop the node."}),"\n",(0,n.jsxs)(t.li,{children:["Restore the data from a ",(0,n.jsx)(t.a,{href:"#data-backups",children:"previous backup"}),"."]}),"\n",(0,n.jsx)(t.li,{children:"Restart the node."}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"prevent-accidental-downgrade",children:"Prevent accidental downgrade"}),"\n",(0,n.jsxs)(t.p,{children:["When restarting Besu, accidentally using an earlier version of Besu might risk corrupting your database.\nTo protect against incompatibility between versions, set the\n",(0,n.jsx)(t.a,{href:"/public-networks/reference/cli/options#version-compatibility-protection",children:(0,n.jsx)(t.code,{children:"--version-compatibility-protection"})}),"\noption to ",(0,n.jsx)(t.code,{children:"true"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"find-peers-after-restarting",children:"Find peers after restarting"}),"\n",(0,n.jsxs)(t.p,{children:["The process for finding peers after restarting is the same as for ",(0,n.jsx)(t.a,{href:"/public-networks/how-to/upgrade-node#find-peers-on-restarting",children:"finding peers after upgrading and restarting"}),"."]})]})}function p(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},28453:(e,t,r)=>{r.d(t,{R:()=>i,x:()=>o});var n=r(96540);const a={},s=n.createContext(a);function i(e){const t=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c14ba340.53ca64b6.js b/assets/js/c14ba340.53ca64b6.js new file mode 100644 index 00000000000..ece34059294 --- /dev/null +++ b/assets/js/c14ba340.53ca64b6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1157],{63905:e=>{e.exports=JSON.parse('{"tag":{"label":"public networks","permalink":"/tags/public-networks","allTagsPath":"/tags","count":72,"items":[{"id":"public-networks/how-to/use-besu-api/access-logs","title":"Access logs using JSON-RPC","description":"Accessing logs using the Besu API","permalink":"/public-networks/how-to/use-besu-api/access-logs"},{"id":"public-networks/how-to/use-besu-api/index","title":"Access the Besu API","description":"Besu API","permalink":"/public-networks/how-to/use-besu-api/"},{"id":"public-networks/concepts/proof-of-stake/attestations","title":"Attestations","description":"Proof of stake attestations","permalink":"/public-networks/concepts/proof-of-stake/attestations"},{"id":"public-networks/how-to/use-besu-api/authenticate","title":"Authenticate over JSON-RPC requests","description":"Besu authentication and authorization for JSON-RPC","permalink":"/public-networks/how-to/use-besu-api/authenticate"},{"id":"public-networks/reference/api/index","title":"Besu API","description":"Besu JSON-RPC API methods reference","permalink":"/public-networks/reference/api/"},{"id":"public-networks/chatbot","title":"Chatbot","description":"Chatbot","permalink":"/public-networks/chatbot"},{"id":"public-networks/how-to/configure-besu/index","title":"Configure Besu","description":"Specify options in the Besu configuration file.","permalink":"/public-networks/how-to/configure-besu/"},{"id":"public-networks/how-to/monitor/logging","title":"Configure logging","description":"Besu log level setting and log formatting","permalink":"/public-networks/how-to/monitor/logging"},{"id":"public-networks/how-to/use-pow/mining","title":"Configure mining","description":"Using Besu for PoW CPU mining","permalink":"/public-networks/how-to/use-pow/mining"},{"id":"public-networks/how-to/connect/configure-ports","title":"Configure ports","description":"To enable communication you must expose Besu ports appropriately","permalink":"/public-networks/how-to/connect/configure-ports"},{"id":"public-networks/how-to/connect/static-nodes","title":"Configure static nodes","description":"Configuring static nodes","permalink":"/public-networks/how-to/connect/static-nodes"},{"id":"public-networks/get-started/connect/index","title":"Connect to a network overview","description":"This section provides information on connecting Besu to a public Ethereum network.","permalink":"/public-networks/get-started/connect/"},{"id":"public-networks/get-started/connect/testnet","title":"Connect to a testnet","description":"Run Besu as an execution client with any consensus client on the Holesky, Sepolia, and Ephemery testnets.","permalink":"/public-networks/get-started/connect/testnet"},{"id":"public-networks/get-started/connect/mainnet","title":"Connect to Mainnet","description":"How to connect to Mainnet","permalink":"/public-networks/get-started/connect/mainnet"},{"id":"public-networks/how-to/send-transactions","title":"Create and send transactions","description":"Send transactions using eth_call or eth_sendRawTransaction.","permalink":"/public-networks/how-to/send-transactions"},{"id":"public-networks/concepts/data-storage-formats","title":"Data storage formats","description":"Learn about storing data using Forest of Tries and Bonsai Tries.","permalink":"/public-networks/concepts/data-storage-formats"},{"id":"public-networks/tutorials/aws-node-runners","title":"Deploy AWS Node Runners","description":"Configure Ethereum nodes using AWS Blockchain Node Runners.","permalink":"/public-networks/tutorials/aws-node-runners"},{"id":"public-networks/tutorials/kubernetes","title":"Deploy Besu using Kubernetes","description":"Deploy a Besu node using Kubernetes.","permalink":"/public-networks/tutorials/kubernetes"},{"id":"public-networks/reference/engine-api/index","title":"Engine API","description":"Engine API methods reference","permalink":"/public-networks/reference/engine-api/"},{"id":"public-networks/concepts/events-and-logs","title":"Events and logs","description":"Learn about events and logs in Besu.","permalink":"/public-networks/concepts/events-and-logs"},{"id":"public-networks/reference/evm-tool","title":"EVM tool options","description":"Besu EVM tool options reference","permalink":"/public-networks/reference/evm-tool"},{"id":"public-networks/concepts/genesis-file","title":"Genesis file","description":"Learn about configuring a network using the genesis file.","permalink":"/public-networks/concepts/genesis-file"},{"id":"public-networks/reference/genesis-items","title":"Genesis file items","description":"Genesis file configuration items reference","permalink":"/public-networks/reference/genesis-items"},{"id":"public-networks/how-to/configure-ha/index","title":"High availability of JSON-RPC and RPC Pub/Sub APIs","description":"Besu high availability","permalink":"/public-networks/how-to/configure-ha/"},{"id":"public-networks/how-to/configure-java/install-update-java","title":"Install and update Java","description":"Install or update Java for use with Besu","permalink":"/public-networks/how-to/configure-java/install-update-java"},{"id":"public-networks/get-started/install/binary-distribution","title":"Install binary distribution","description":"Install or upgrade Besu from binary distribution","permalink":"/public-networks/get-started/install/binary-distribution"},{"id":"public-networks/get-started/install/index","title":"Installation options","description":"Options for getting started with Besu","permalink":"/public-networks/get-started/install/"},{"id":"public-networks/how-to/configure-java/manage-memory","title":"Manage JVM memory","description":"Besu memory management","permalink":"/public-networks/how-to/configure-java/manage-memory"},{"id":"public-networks/how-to/connect/manage-peers","title":"Manage peers","description":"Managing Besu peers","permalink":"/public-networks/how-to/connect/manage-peers"},{"id":"public-networks/get-started/migrate-to-besu","title":"Migrate to Besu","description":"Migrate to Besu from a different Ethereum execution client.","permalink":"/public-networks/get-started/migrate-to-besu"},{"id":"public-networks/how-to/monitor/index","title":"Monitor Besu","description":"Monitoring using metrics and logging","permalink":"/public-networks/how-to/monitor/"},{"id":"public-networks/concepts/network-and-chain-id","title":"Network ID and chain ID","description":"Learn about network ID and chain ID in Besu.","permalink":"/public-networks/concepts/network-and-chain-id"},{"id":"public-networks/concepts/node-clients","title":"Node clients","description":"Learn about execution and consensus clients.","permalink":"/public-networks/concepts/node-clients"},{"id":"public-networks/concepts/node-keys","title":"Node keys","description":"Learn about node public and private keys, and the node address.","permalink":"/public-networks/concepts/node-keys"},{"id":"public-networks/concepts/node-sync","title":"Node synchronization","description":"Learn about node synchronization for public networks.","permalink":"/public-networks/concepts/node-sync"},{"id":"public-networks/reference/api/objects","title":"Objects","description":"Besu API objects reference","permalink":"/public-networks/reference/api/objects"},{"id":"public-networks/reference/engine-api/objects","title":"Objects","description":"Engine API objects reference","permalink":"/public-networks/reference/engine-api/objects"},{"id":"public-networks/reference/cli/options","title":"Options","description":"Besu command line interface reference","permalink":"/public-networks/reference/cli/options"},{"id":"public-networks/concepts/parallel-transaction-execution","title":"Parallel transaction execution","description":"Learn about parallel transaction execution.","permalink":"/public-networks/concepts/parallel-transaction-execution"},{"id":"public-networks/how-to/configure-java/pass-jvm-options","title":"Pass JVM options","description":"Passing Java virtual machine JVM options to Besu at runtime","permalink":"/public-networks/how-to/configure-java/pass-jvm-options"},{"id":"public-networks/reference/projects-using-besu","title":"Projects using Besu","description":"List of projects using Besu","permalink":"/public-networks/reference/projects-using-besu"},{"id":"public-networks/concepts/proof-of-stake/index","title":"Proof of stake consensus","description":"Ethereum proof of stake consensus","permalink":"/public-networks/concepts/proof-of-stake/"},{"id":"public-networks/index","title":"Public networks","description":"Public networks overview","permalink":"/public-networks/"},{"id":"public-networks/how-to/bonsai-limit-trie-logs","title":"Reduce storage for Bonsai Tries","description":"Reduce the size of your database when using Bonsai Tries","permalink":"/public-networks/how-to/bonsai-limit-trie-logs"},{"id":"public-networks/tutorials/besu-teku-testnet","title":"Run Besu and Teku on a testnet","description":"Run Besu and Teku on Holesky, Ephemery, or Sepolia testnet.","permalink":"/public-networks/tutorials/besu-teku-testnet"},{"id":"public-networks/tutorials/besu-teku-mainnet","title":"Run Besu and Teku on Mainnet","description":"Run Besu and Teku on Ethereum Mainnet.","permalink":"/public-networks/tutorials/besu-teku-mainnet"},{"id":"public-networks/get-started/install/run-docker-image","title":"Run Besu from Docker image","description":"Run Besu using the official docker image","permalink":"/public-networks/get-started/install/run-docker-image"},{"id":"public-networks/how-to/configure-ha/sample-configuration","title":"Sample load balancer configurations","description":"Sample load balancers","permalink":"/public-networks/how-to/configure-ha/sample-configuration"},{"id":"public-networks/reference/disclosure","title":"Security disclosure policy","description":"Besu responsible disclosure statement","permalink":"/public-networks/reference/disclosure"},{"id":"public-networks/how-to/connect/specify-nat","title":"Specify NAT method","description":"Configuring NAT with Besu","permalink":"/public-networks/how-to/connect/specify-nat"},{"id":"public-networks/get-started/start-node","title":"Start Besu","description":"Start Besu on a public Ethereum network.","permalink":"/public-networks/get-started/start-node"},{"id":"public-networks/reference/cli/subcommands","title":"Subcommands","description":"Besu command line interface subcommands","permalink":"/public-networks/reference/cli/subcommands"},{"id":"public-networks/get-started/system-requirements","title":"System requirements","description":"Ensure you meet the system requirements to sync and run Besu.","permalink":"/public-networks/get-started/system-requirements"},{"id":"public-networks/how-to/troubleshoot/trace-transactions","title":"Trace transactions","description":"How to trace transactions","permalink":"/public-networks/how-to/troubleshoot/trace-transactions"},{"id":"public-networks/concepts/transactions/pool","title":"Transaction pool","description":"Transaction pool overview","permalink":"/public-networks/concepts/transactions/pool"},{"id":"public-networks/reference/trace-types","title":"Transaction trace types","description":"Transaction trace types reference","permalink":"/public-networks/reference/trace-types"},{"id":"public-networks/concepts/transactions/types","title":"Transaction types","description":"Description of the different transaction types","permalink":"/public-networks/concepts/transactions/types"},{"id":"public-networks/concepts/transactions/validation","title":"Transaction validation","description":"What transaction validation and when","permalink":"/public-networks/concepts/transactions/validation"},{"id":"public-networks/how-to/troubleshoot/peering","title":"Troubleshoot peering","description":"How to troubleshoot peering","permalink":"/public-networks/how-to/troubleshoot/peering"},{"id":"public-networks/how-to/troubleshoot/performance","title":"Troubleshoot performance","description":"Troubleshoot poor performance and resource constraints.","permalink":"/public-networks/how-to/troubleshoot/performance"},{"id":"public-networks/how-to/monitor/understand-metrics","title":"Understand metrics","description":"Understand Besu performance metrics","permalink":"/public-networks/how-to/monitor/understand-metrics"},{"id":"public-networks/how-to/upgrade-node","title":"Upgrade Besu","description":"Upgrade your Besu node to a new version.","permalink":"/public-networks/how-to/upgrade-node"},{"id":"public-networks/how-to/configure-besu/profile","title":"Use a profile","description":"You can load a profile to extend Besu\'s default configuration, using the --profile option.","permalink":"/public-networks/how-to/configure-besu/profile"},{"id":"public-networks/how-to/develop/client-libraries","title":"Use client libraries","description":"Besu client libraries","permalink":"/public-networks/how-to/develop/client-libraries"},{"id":"public-networks/how-to/troubleshoot/evm-tool","title":"Use EVM tool","description":"Besu EVM tool","permalink":"/public-networks/how-to/troubleshoot/evm-tool"},{"id":"public-networks/how-to/use-besu-api/graphql","title":"Use GraphQL over HTTP","description":"How to access the Besu API using GraphQL","permalink":"/public-networks/how-to/use-besu-api/graphql"},{"id":"public-networks/how-to/develop/hardhat","title":"Use Hardhat","description":"Using Besu with Hardhat","permalink":"/public-networks/how-to/develop/hardhat"},{"id":"public-networks/how-to/configure-java/java-flight-recorder","title":"Use Java Flight Recorder","description":"Using Java Flight Recorder with Besu","permalink":"/public-networks/how-to/configure-java/java-flight-recorder"},{"id":"public-networks/how-to/use-besu-api/json-rpc","title":"Use JSON-RPC over HTTP, WS, and IPC","description":"How to access the Besu API using JSON-RPC","permalink":"/public-networks/how-to/use-besu-api/json-rpc"},{"id":"public-networks/how-to/monitor/metrics","title":"Use metrics","description":"Monitoring and metrics","permalink":"/public-networks/how-to/monitor/metrics"},{"id":"public-networks/how-to/use-besu-api/rpc-pubsub","title":"Use RPC Pub/Sub over WS","description":"Using RPC Pub/Sub with Besu WebSockets","permalink":"/public-networks/how-to/use-besu-api/rpc-pubsub"},{"id":"public-networks/how-to/use-engine-api","title":"Use the Engine API","description":"Use the Engine API to communicate with a consensus client.","permalink":"/public-networks/how-to/use-engine-api"}],"unlisted":false}}')}}]); \ No newline at end of file diff --git a/assets/js/c41908c3.df287b65.js b/assets/js/c41908c3.df287b65.js new file mode 100644 index 00000000000..ec16113e1d5 --- /dev/null +++ b/assets/js/c41908c3.df287b65.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4978],{43816:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>s,default:()=>h,frontMatter:()=>a,metadata:()=>o,toc:()=>d});var r=n(74848),i=n(28453);const a={title:"Create a multi-tenant network",sidebar_position:2,description:"Configure multi-tenancy",tags:["private networks"]},s="Configure a multi-tenant node (Deprecated)",o={id:"private-networks/tutorials/privacy/multi-tenancy",title:"Create a multi-tenant network",description:"Configure multi-tenancy",source:"@site/docs/private-networks/tutorials/privacy/multi-tenancy.md",sourceDirName:"private-networks/tutorials/privacy",slug:"/private-networks/tutorials/privacy/multi-tenancy",permalink:"/private-networks/tutorials/privacy/multi-tenancy",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/privacy/multi-tenancy.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Create a multi-tenant network",sidebar_position:2,description:"Configure multi-tenancy",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Create a privacy enabled network using the Quickstart",permalink:"/private-networks/tutorials/privacy/"},next:{title:"Use the web3js-quorum multi-node example",permalink:"/private-networks/tutorials/privacy/web3js-quorum"}},c={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Steps",id:"steps",level:2},{value:"1. Generate a private and public key pair",id:"1-generate-a-private-and-public-key-pair",level:3},{value:"2. Generate Tessera keys",id:"2-generate-tessera-keys",level:3},{value:"3. Update the Tessera configuration file",id:"3-update-the-tessera-configuration-file",level:3},{value:"4. Start Tessera",id:"4-start-tessera",level:3},{value:"5. Start Besu Node-1",id:"5-start-besu-node-1",level:3},{value:"6. Generate the tenant JWTs",id:"6-generate-the-tenant-jwts",level:3}];function l(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"configure-a-multi-tenant-node-deprecated",children:"Configure a multi-tenant node (Deprecated)"})}),"\n",(0,r.jsx)(t.admonition,{type:"caution",children:(0,r.jsxs)(t.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,r.jsx)(t.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,r.jsxs)(t.p,{children:["You can configure Besu and associated Tessera node in a privacy-enabled network to host ",(0,r.jsx)(t.a,{href:"/private-networks/concepts/privacy/multi-tenancy",children:"multiple tenants"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["In this tutorial we'll add tenants to the ",(0,r.jsx)(t.code,{children:"Node-1"})," Besu and Tessera node in a ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/privacy/",children:"privacy-enabled network"}),"."]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:"IBFT-Network/\n\u251c\u2500\u2500 Node-1\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2502 \u251c\u2500\u2500 Tessera\n\u251c\u2500\u2500 Node-2\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2502 \u251c\u2500\u2500 Tessera\n\u251c\u2500\u2500 Node-3\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2502 \u251c\u2500\u2500 Tessera\n\u2514\u2500\u2500 Node-4\n \u251c\u2500\u2500 data\n \u251c\u2500\u2500 Tessera\n"})}),"\n",(0,r.jsx)(t.admonition,{type:"info",children:(0,r.jsxs)(t.p,{children:["This tutorial uses ",(0,r.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/authenticate#jwt-public-key-authentication",children:"JWT public key authentication"})," to create the tenant's JWT, but you can also use ",(0,r.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/authenticate#username-and-password-authentication",children:"username and password authentication"}),"."]})}),"\n",(0,r.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["A ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/privacy/",children:"privacy-enabled network"}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"steps",children:"Steps"}),"\n",(0,r.jsx)(t.h3,{id:"1-generate-a-private-and-public-key-pair",children:"1. Generate a private and public key pair"}),"\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.code,{children:"Node-1"})," directory, ",(0,r.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/authenticate#1-generate-a-private-and-public-key-pair",children:"generate the private and public key pair"}),". The key pair, which must be in ",(0,r.jsx)(t.code,{children:".pem"})," format, belongs to the operator who uses the key pair to authenticate the ",(0,r.jsx)(t.a,{href:"#6-generate-the-tenant-jwts",children:"tenant JWTs"}),"."]}),"\n",(0,r.jsx)(t.admonition,{type:"info",children:(0,r.jsxs)(t.p,{children:["This step is not required when using ",(0,r.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/authenticate#username-and-password-authentication",children:"username and password authentication"})," to create the required JWTs."]})}),"\n",(0,r.jsx)(t.h3,{id:"2-generate-tessera-keys",children:"2. Generate Tessera keys"}),"\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.code,{children:"Node-1/Tessera"})," directory, ",(0,r.jsx)(t.a,{href:"/private-networks/tutorials/privacy/#2-generate-tessera-keys",children:"generate a public/private key pair for each tenant"}),"."]}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsx)(t.p,{children:"The instructions creates an unlocked private key, meaning you do not need a password to decrypt the private key file."})}),"\n",(0,r.jsxs)(t.p,{children:["Name the key pair ",(0,r.jsx)(t.code,{children:"nodeKey2"})," and ",(0,r.jsx)(t.code,{children:"nodeKey3"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"3-update-the-tessera-configuration-file",children:"3. Update the Tessera configuration file"}),"\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.code,{children:"Node-1/Tessera"})," directory, update the ",(0,r.jsx)(t.code,{children:"tessera.conf"})," file by adding the new key pairs:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-json",children:'{\n "mode": "orion",\n "useWhiteList": false,\n "jdbc": {\n "username": "sa",\n "password": "",\n "url": "jdbc:h2:./target/h2/tessera1",\n "autoCreateTables": true\n },\n "serverConfigs": [\n {\n "app": "ThirdParty",\n "serverAddress": "http://localhost:9101",\n "communicationType": "REST"\n },\n {\n "app": "Q2T",\n "serverAddress": "http://localhost:9102",\n "communicationType": "REST"\n },\n {\n "app": "P2P",\n "serverAddress": "http://localhost:9103",\n "sslConfig": {\n "tls": "OFF"\n },\n "communicationType": "REST"\n }\n ],\n "peer": [\n {\n "url": "http://localhost:9203"\n },\n {\n "url": "http://localhost:9303"\n },\n {\n "url": "http://localhost:9403"\n }\n ],\n "keys": {\n "passwords": [],\n "keyData": [\n {\n "privateKeyPath": "nodeKey.key",\n "publicKeyPath": "nodeKey.pub"\n },\n {\n "privateKeyPath": "nodeKey2.key",\n "publicKeyPath": "nodeKey2.pub"\n },\n {\n "privateKeyPath": "nodeKey3.key",\n "publicKeyPath": "nodeKey3.pub"\n }\n ]\n },\n "alwaysSendTo": []\n}\n'})}),"\n",(0,r.jsx)(t.admonition,{type:"info",children:(0,r.jsxs)(t.p,{children:["Besu requires ",(0,r.jsxs)(t.a,{href:"https://docs.tessera.consensys.net/HowTo/Configure/Orion-Mode",children:[(0,r.jsx)(t.code,{children:"orion"})," mode"]}),". Add the line ",(0,r.jsx)(t.code,{children:'"mode": "orion",'})," to the Tessera configuration file."]})}),"\n",(0,r.jsx)(t.h3,{id:"4-start-tessera",children:"4. Start Tessera"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"/private-networks/tutorials/privacy/#4-start-the-tessera-nodes",children:"Start the Tessera nodes"})," and specify the configuration file."]}),"\n",(0,r.jsx)(t.h3,{id:"5-start-besu-node-1",children:"5. Start Besu Node-1"}),"\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.code,{children:"Node-1"})," directory, start Besu Node-1:"]}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --rpc-http-authentication-enabled --rpc-http-authentication-jwt-public-key-file=publicKey.pem --rpc-http-enabled --rpc-http-api=ETH,NET,IBFT,EEA,PRIV --host-allowlist="*" --rpc-http-cors-origins="all" --privacy-enabled --privacy-url=http://127.0.0.1:9102 --privacy-multi-tenancy-enabled --profile=ENTERPRISE\n'})}),"\n",(0,r.jsx)(t.p,{children:"The command line specifies privacy options:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-authentication-enabled",children:(0,r.jsx)(t.code,{children:"--rpc-http-authentication-enabled"})})," enables authentication for JSON-RPC APIs."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-authentication-jwt-public-key-file",children:(0,r.jsx)(t.code,{children:"--rpc-http-authentication-jwt-public-key-file"})})," specifies the Operator's ",(0,r.jsx)(t.a,{href:"#1-generate-a-private-and-public-key-pair",children:"public key file"}),". Used to authenticate the ",(0,r.jsx)(t.a,{href:"#6-generate-the-tenant-jwts",children:"tenant JWTs"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/private-networks/reference/cli/options#privacy-enabled-deprecated",children:(0,r.jsx)(t.code,{children:"--privacy-enabled"})})," enables privacy."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/private-networks/reference/cli/options#privacy-url-deprecated",children:(0,r.jsx)(t.code,{children:"--privacy-url"})})," specifies the ",(0,r.jsx)(t.a,{href:"https://docs.tessera.consensys.net/Reference/TesseraAPI",children:"Quorum to Tessera (Q2T)"})," server address of the Tessera node (",(0,r.jsx)(t.code,{children:"Q2T"})," in ",(0,r.jsx)(t.code,{children:"tessera.conf"}),")."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.a,{href:"/private-networks/reference/cli/options#privacy-multi-tenancy-enabled-deprecated",children:(0,r.jsx)(t.code,{children:"--privacy-multi-tenancy-enabled"})})," enables multi-tenancy."]}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-authentication-jwt-public-key-file",children:(0,r.jsx)(t.code,{children:"--rpc-http-authentication-jwt-public-key-file"})})," is only required when using ",(0,r.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/authenticate#jwt-public-key-authentication",children:"JWT public key authentication"}),". If using ",(0,r.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/authenticate#username-and-password-authentication",children:"username and password authentication"}),", use ",(0,r.jsx)(t.a,{href:"/public-networks/reference/cli/options#rpc-http-authentication-credentials-file",children:(0,r.jsx)(t.code,{children:"--rpc-http-authentication-credentials-file"})})," instead."]})}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"/private-networks/tutorials/privacy/#6-start-besu-node-2",children:"Start the remaining Besu nodes"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"6-generate-the-tenant-jwts",children:"6. Generate the tenant JWTs"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/authenticate#2-create-the-jwt",children:"Generate the JWT"})," for each tenant and specify the ",(0,r.jsx)(t.a,{href:"#2-generate-tessera-keys",children:"tenant's Tessera public key"})," in the ",(0,r.jsx)(t.code,{children:"privacyPublicKey"})," field."]}),"\n",(0,r.jsxs)(t.p,{children:["Ensure you apply the appropriate ",(0,r.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/authenticate#json-rpc-permissions",children:"JSON-RPC API permissions"})," to the token. For example, ensure you enable the ",(0,r.jsx)(t.code,{children:"PRIV"})," and ",(0,r.jsx)(t.code,{children:"EEA"})," APIs for privacy."]}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsxs)(t.p,{children:["This step is not required when using ",(0,r.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/authenticate#username-and-password-authentication",children:"username and password authentication"})," to create the required JWTs."]})}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"/public-networks/how-to/use-besu-api/authenticate#using-an-authentication-token-to-make-requests",children:"Use the authentication token to make requests"}),"."]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>s,x:()=>o});var r=n(96540);const i={},a=r.createContext(i);function s(e){const t=r.useContext(a);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:s(e.components),r.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c48436f6.06cbe96b.js b/assets/js/c48436f6.06cbe96b.js new file mode 100644 index 00000000000..e38e0b74db4 --- /dev/null +++ b/assets/js/c48436f6.06cbe96b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2593],{99307:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>u,contentTitle:()=>o,default:()=>d,frontMatter:()=>r,metadata:()=>c,toc:()=>a});var s=n(74848),i=n(28453);const r={description:"Migrate to Besu from a different Ethereum execution client.",tags:["public networks"]},o="Migrate to Besu",c={id:"public-networks/get-started/migrate-to-besu",title:"Migrate to Besu",description:"Migrate to Besu from a different Ethereum execution client.",source:"@site/docs/public-networks/get-started/migrate-to-besu.md",sourceDirName:"public-networks/get-started",slug:"/public-networks/get-started/migrate-to-besu",permalink:"/public-networks/get-started/migrate-to-besu",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/get-started/migrate-to-besu.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{description:"Migrate to Besu from a different Ethereum execution client.",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Connect to a testnet",permalink:"/public-networks/get-started/connect/testnet"},next:{title:"How to",permalink:"/public-networks/how-to"}},u={},a=[];function l(e){const t={a:"a",h1:"h1",header:"header",p:"p",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"migrate-to-besu",children:"Migrate to Besu"})}),"\n",(0,s.jsxs)(t.p,{children:["Migrate from a different Ethereum ",(0,s.jsx)(t.a,{href:"/public-networks/concepts/node-clients#execution-clients",children:"execution client"})," to Besu to contribute to ",(0,s.jsx)(t.a,{href:"https://clientdiversity.org/",children:"client diversity"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["To migrate from a different client, ",(0,s.jsx)(t.a,{href:"/public-networks/get-started/connect/mainnet#2-start-besu",children:"configure Besu as an execution client"})," and connect your ",(0,s.jsx)(t.a,{href:"/public-networks/concepts/node-clients#consensus-clients",children:"consensus client"})," to Besu instead of your original execution client."]}),"\n",(0,s.jsxs)(t.p,{children:["To minimize downtime while ",(0,s.jsx)(t.a,{href:"/public-networks/concepts/node-sync",children:"Besu syncs"})," and avoid downtime penalties, you can sync Besu with a new consensus layer instance. Once Besu has fully synced you can connect it to your existing consensus client."]}),"\n",(0,s.jsxs)(t.p,{children:["Find guides to switch from specific clients on the ",(0,s.jsx)(t.a,{href:"https://clientdiversity.org/#switch",children:"client diversity website"}),"."]})]})}function d(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>o,x:()=>c});var s=n(96540);const i={},r=s.createContext(i);function o(e){const t=s.useContext(r);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),s.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c69ab138.94f9f036.js b/assets/js/c69ab138.94f9f036.js new file mode 100644 index 00000000000..4f7c1c56946 --- /dev/null +++ b/assets/js/c69ab138.94f9f036.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6048],{57425:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>p,frontMatter:()=>r,metadata:()=>l,toc:()=>a});var t=i(74848),s=i(28453);const r={title:"Plugins",sidebar_position:6,description:"Plugins overview",tags:["private networks"]},o="Plugins",l={id:"private-networks/concepts/plugins",title:"Plugins",description:"Plugins overview",source:"@site/docs/private-networks/concepts/plugins.md",sourceDirName:"private-networks/concepts",slug:"/private-networks/concepts/plugins",permalink:"/private-networks/concepts/plugins",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/concepts/plugins.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:6,frontMatter:{title:"Plugins",sidebar_position:6,description:"Plugins overview",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Node synchronization",permalink:"/private-networks/concepts/node-sync-private"},next:{title:"Tutorials",permalink:"/private-networks/tutorials"}},c={},a=[{value:"Install plugins",id:"install-plugins",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"plugins",children:"Plugins"})}),"\n",(0,t.jsx)(n.p,{children:"You can extend Besu functionality by building Java plugins or using existing open source Besu plugins. Use the Plugin API to take data from any Besu network, public or permissioned, and feed it into an application or system."}),"\n",(0,t.jsx)(n.p,{children:"For example, create a plugin to add more monitoring functionality or stream event data to a third-party application. The API exposes data about the following components:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Blocks"}),"\n",(0,t.jsx)(n.li,{children:"Balances"}),"\n",(0,t.jsx)(n.li,{children:"Transactions"}),"\n",(0,t.jsx)(n.li,{children:"Smart contracts"}),"\n",(0,t.jsx)(n.li,{children:"Execution results"}),"\n",(0,t.jsx)(n.li,{children:"Logs"}),"\n",(0,t.jsx)(n.li,{children:"Syncing state."}),"\n"]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Besu plugin API",src:i(42483).A+"",width:"1512",height:"944"})}),"\n",(0,t.jsxs)(n.p,{children:["The plugin API provides access to ",(0,t.jsx)(n.a,{href:"/private-networks/reference/plugin-api-interfaces",children:"interfaces"})," allowing you to build the plugin."]}),"\n",(0,t.jsxs)(n.admonition,{type:"info",children:[(0,t.jsxs)(n.p,{children:["View the ",(0,t.jsx)(n.a,{href:"https://youtu.be/78sa2WuA1rg",children:"plugin API webinar"})," for an example of how to build a plugin."]}),(0,t.jsxs)(n.p,{children:["For more information about the available interfaces, see the ",(0,t.jsx)(n.a,{href:"https://javadoc.io/doc/org.hyperledger.besu/plugin-api/latest/index.html",children:"Plugin API Javadoc"}),"."]})]}),"\n",(0,t.jsx)(n.h2,{id:"install-plugins",children:"Install plugins"}),"\n",(0,t.jsxs)(n.p,{children:["To allow Besu to access and use the plugin, copy the plugin (",(0,t.jsx)(n.code,{children:".jar"}),") to the ",(0,t.jsx)(n.code,{children:"plugins"})," directory."]}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsxs)(n.p,{children:["If not already present, you must create the ",(0,t.jsx)(n.code,{children:"plugins"})," directory one directory level below (",(0,t.jsx)(n.code,{children:"../"}),") the ",(0,t.jsx)(n.code,{children:"besu"})," executable."]})}),"\n",(0,t.jsx)(n.p,{children:"Each plugin in the directory has the following lifecycle events:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Register"})," - Executed when Besu starts. Besu checks plugin compatibility and registers plugins."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Start"})," - Plugins start after being successfully registered."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Stop"})," - Besu stops plugins."]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"The order in which Besu calls plugins during lifecycle events is not guaranteed."})})]})}function p(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},42483:(e,n,i)=>{i.d(n,{A:()=>t});const t=i.p+"assets/images/Hyperledger-Besu-Plugin-API-55b61f51dd27221eb8c9de3892b1fb2e.png"},28453:(e,n,i)=>{i.d(n,{R:()=>o,x:()=>l});var t=i(96540);const s={},r=t.createContext(s);function o(e){const n=t.useContext(r);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),t.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c6a4c9bf.5522a35f.js b/assets/js/c6a4c9bf.5522a35f.js new file mode 100644 index 00000000000..c5914b1a9ce --- /dev/null +++ b/assets/js/c6a4c9bf.5522a35f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7643],{60968:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>o,default:()=>p,frontMatter:()=>c,metadata:()=>l,toc:()=>d});var i=t(74848),a=t(28453),s=t(11470),r=t(19365);const c={title:"Authenticate over JSON-RPC requests",sidebar_position:4,description:"Besu authentication and authorization for JSON-RPC",tags:["public networks","private networks"]},o="Authenticate and authorize JSON-RPC",l={id:"public-networks/how-to/use-besu-api/authenticate",title:"Authenticate over JSON-RPC requests",description:"Besu authentication and authorization for JSON-RPC",source:"@site/docs/public-networks/how-to/use-besu-api/authenticate.md",sourceDirName:"public-networks/how-to/use-besu-api",slug:"/public-networks/how-to/use-besu-api/authenticate",permalink:"/public-networks/how-to/use-besu-api/authenticate",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/use-besu-api/authenticate.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Authenticate over JSON-RPC requests",sidebar_position:4,description:"Besu authentication and authorization for JSON-RPC",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Use GraphQL over HTTP",permalink:"/public-networks/how-to/use-besu-api/graphql"},next:{title:"Access logs using JSON-RPC",permalink:"/public-networks/how-to/use-besu-api/access-logs"}},h={},d=[{value:"Username and password authentication",id:"username-and-password-authentication",level:2},{value:"1. Create the credentials file",id:"1-create-the-credentials-file",level:3},{value:"2. Enable authentication",id:"2-enable-authentication",level:3},{value:"3. Generate an authentication token",id:"3-generate-an-authentication-token",level:3},{value:"JWT public key authentication",id:"jwt-public-key-authentication",level:2},{value:"1. Generate a private and public key pair",id:"1-generate-a-private-and-public-key-pair",level:3},{value:"2. Create the JWT",id:"2-create-the-jwt",level:3},{value:"3. Enable authentication",id:"3-enable-authentication",level:3},{value:"JSON-RPC permissions",id:"json-rpc-permissions",level:2},{value:"Use an authentication token to make requests",id:"use-an-authentication-token-to-make-requests",level:2},{value:"Postman",id:"postman",level:3},{value:"cURL",id:"curl",level:3}];function u(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",section:"section",strong:"strong",sup:"sup",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"authenticate-and-authorize-json-rpc",children:"Authenticate and authorize JSON-RPC"})}),"\n",(0,i.jsxs)(n.p,{children:["Authentication identifies a user, and authorization verifies user access to requested JSON-RPC methods. Besu verifies users using ",(0,i.jsx)(n.a,{href:"https://jwt.io/introduction/",children:"JSON Web Tokens (JWT)"}),". JWT is also used in ",(0,i.jsx)(n.a,{href:"/private-networks/concepts/privacy/multi-tenancy",children:"multi-tenancy"})," to verify tenant data access."]}),"\n",(0,i.jsx)(n.p,{children:"Besu supports two mutually exclusive authentication methods:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#username-and-password-authentication",children:"Username and password"})}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#jwt-public-key-authentication",children:"JWT public key"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Besu creates JWT internally with ",(0,i.jsx)(n.a,{href:"#username-and-password-authentication",children:"username and password authentication"}),", and externally with ",(0,i.jsx)(n.a,{href:"#jwt-public-key-authentication",children:"JWT public key authentication"}),"."]}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["Using JSON-RPC authentication and authorization with ",(0,i.jsx)(n.a,{href:"https://metamask.io/",children:"MetaMask"})," is not supported."]})}),"\n",(0,i.jsx)(n.admonition,{type:"caution",children:(0,i.jsx)(n.p,{children:"To prevent interception of authentication credentials and authenticated tokens, make authenticated requests over HTTPS. We recommend running production deployments behind a network layer that provides SSL termination. Besu does not provide a HTTPS connection natively."})}),"\n",(0,i.jsx)(n.h2,{id:"username-and-password-authentication",children:"Username and password authentication"}),"\n",(0,i.jsxs)(n.p,{children:["Enable authentication from the command line. Supply the credentials file and send a request to the ",(0,i.jsx)(n.code,{children:"/login"})," endpoint using the username and password. The ",(0,i.jsx)(n.code,{children:"/login"})," endpoint creates a JWT for making permitted JSON-RPC requests."]}),"\n",(0,i.jsxs)(n.p,{children:["Using ",(0,i.jsx)(n.a,{href:"#jwt-public-key-authentication",children:"public key authentication"})," disables the ",(0,i.jsx)(n.code,{children:"/login"})," endpoint."]}),"\n",(0,i.jsx)(n.h3,{id:"1-create-the-credentials-file",children:"1. Create the credentials file"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"toml"})," credentials file defines user details and the JSON-RPC methods they can access."]}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-toml",metastring:'title="auth.toml"',children:'[Users.username1]\npassword = "$2a$10$l3GA7K8g6rJ/Yv.YFSygCuI9byngpEzxgWS9qEg5emYDZomQW7fGC"\npermissions=["net:*","eth:blockNumber"]\nprivacyPublicKey="U7ANiOOd5L9Z/dMxRFjdbhA1Qragw6fLuYgmgCvLoX4="\n\n[Users.username2]\npassword = "$2b$10$6sHt1J0MVUGIoNKvJiK33uaZzUwNmMmJlaVLkIwinkPiS1UBnAnF2"\npermissions=["net:version","admin:*"]\nprivacyPublicKey="quhb1pQPGN1w8ZSZSyiIfncEAlVY/M/rauSyQ5wVMRE="\n'})}),"\n",(0,i.jsx)(n.p,{children:"Each user requiring JSON-RPC access the configuration file lists the:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Username. ",(0,i.jsx)(n.code,{children:"Users."})," is mandatory and followed by the username. That is, replace ",(0,i.jsx)(n.code,{children:""})," in ",(0,i.jsx)(n.code,{children:"[Users.]"})," with the username."]}),"\n",(0,i.jsxs)(n.li,{children:["Hash of the user password. Use the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/subcommands#password",children:(0,i.jsx)(n.code,{children:"password hash"})})," subcommand to generate the hash."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#json-rpc-permissions",children:"JSON-RPC permissions"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Optional. The tenant's Tessera public key using ",(0,i.jsx)(n.code,{children:"privacyPublicKey"}),". Only used for ",(0,i.jsx)(n.a,{href:"/private-networks/concepts/privacy/multi-tenancy",children:"multi-tenancy"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(r.A,{value:"Command",label:"Command",default:!0,children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"besu password hash --password=MyPassword\n"})})}),(0,i.jsx)(r.A,{value:"Hash output",label:"Hash output",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-text",children:"$2a$10$L3Xb5G/AJOsEK5SuOn9uzOhpCCfuVWTajc5hwWerY6N5xBM/xlrMK\n"})})})]}),"\n",(0,i.jsx)(n.h3,{id:"2-enable-authentication",children:"2. Enable authentication"}),"\n",(0,i.jsxs)(n.p,{children:["Enable authentication for the JSON-RPC API using the\n",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-authentication-enabled",children:(0,i.jsx)(n.code,{children:"--rpc-http-authentication-enabled"})}),"\nor ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-authentication-enabled",children:(0,i.jsx)(n.code,{children:"--rpc-ws-authentication-enabled"})})," option."]}),"\n",(0,i.jsxs)(n.p,{children:["Specify the ",(0,i.jsx)(n.a,{href:"#1-create-the-credentials-file",children:"credentials file"})," using the\n",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-authentication-credentials-file",children:(0,i.jsx)(n.code,{children:"--rpc-http-authentication-credentials-file"})}),"\nor ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-authentication-credentials-file",children:(0,i.jsx)(n.code,{children:"--rpc-ws-authentication-credentials-file"})})," option."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["With authentication enabled, you can specify methods that don't require authentication using\n",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api-methods-no-auth",children:(0,i.jsx)(n.code,{children:"--rpc-http-api-methods-no-auth"})})," or\n",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-api-methods-no-auth",children:(0,i.jsx)(n.code,{children:"--rpc-ws-api-methods-no-auth"})}),"."]})}),"\n",(0,i.jsx)(n.h3,{id:"3-generate-an-authentication-token",children:"3. Generate an authentication token"}),"\n",(0,i.jsxs)(n.p,{children:["To generate an authentication token, make a request to the ",(0,i.jsx)(n.code,{children:"/login"})," endpoint with your username and password. Specify the HTTP port or the WS port to generate a token to authenticate over HTTP or WS respectively. HTTP and WS requires a different token."]}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(r.A,{value:"Generate a token for HTTP",label:"Generate a token for HTTP",default:!0,children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"username":"username1","password":"MyPassword"}\' /login\n'})})}),(0,i.jsx)(r.A,{value:"Example for HTTP",label:"Example for HTTP",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"username":"username1","password":"MyPassword"}\' http://localhost:8545/login\n'})})}),(0,i.jsx)(r.A,{value:"Generate a token for WS",label:"Generate a token for WS",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"username":"username1","password":"MyPassword"}\' /login\n'})})}),(0,i.jsx)(r.A,{value:"Example for WS",label:"Example for WS",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"username":"username1","password":"MyPassword"}\' http://localhost:8546/login\n'})})}),(0,i.jsx)(r.A,{value:"JSON result",label:"JSON result",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwZXJtaXNzaW9ucyI6WyIqOioiXSwidXNlcm5hbWUiOiJ1c2VyMiIsImlhdCI6MTU1MDQ2MDYwNCwiZXhwIjoxNTUwNDYwOTA0fQ.l2Ycqzl_AyvReXBeUSayOlOMS_E8-DCuz3q0Db0DKD7mqyl6q-giWoEtfdWzUEvZbRRi2_ecKO3N6JkXq7zMKQAJbVAEzobfbaaXWcQEpHOjtnK4_Yz-UPyKiXtu7HGdcdl5Tfx3dKoksbqkBl3U3vFWxzmFnuu3dAISfVJYUNA"\n}\n'})})})]}),"\n",(0,i.jsx)(n.p,{children:"Authentication tokens expire five minutes after generation. If you require access after the token expires, you need to generate a new token."}),"\n",(0,i.jsx)(n.h2,{id:"jwt-public-key-authentication",children:"JWT public key authentication"}),"\n",(0,i.jsx)(n.p,{children:"Enable authentication from the command line and supply the external JWT provider's public key."}),"\n",(0,i.jsx)(n.admonition,{type:"caution",children:(0,i.jsxs)(n.p,{children:["JWT public authentication disables the Besu ",(0,i.jsx)(n.code,{children:"/login"})," endpoint, meaning ",(0,i.jsx)(n.a,{href:"#username-and-password-authentication",children:"username and password authentication"})," will not work."]})}),"\n",(0,i.jsx)(n.h3,{id:"1-generate-a-private-and-public-key-pair",children:"1. Generate a private and public key pair"}),"\n",(0,i.jsxs)(n.p,{children:["The private and accompanying public key files must be in ",(0,i.jsx)(n.code,{children:".pem"})," format."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.a,{href:"https://datatracker.ietf.org/doc/html/rfc7518#section-3.1",children:"key algorithm"})," can be:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["RSA with private key length of at least 2048 bits using algorithm ",(0,i.jsx)(n.code,{children:"RS256"}),", ",(0,i.jsx)(n.code,{children:"RS384"}),", or ",(0,i.jsx)(n.code,{children:"RS512"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["ECDSA private key, using ",(0,i.jsx)(n.code,{children:"ES256"})," (",(0,i.jsx)(n.code,{children:"secp256r1"})," or ",(0,i.jsx)(n.code,{children:"secp256k1"}),"), ",(0,i.jsx)(n.code,{children:"ES384"}),", or ",(0,i.jsx)(n.code,{children:"ES512"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The default value for Besu is ",(0,i.jsx)(n.code,{children:"RS256"}),".\nWhen you use a different key algorithm, you must specify the\n",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-authentication-jwt-algorithm",children:(0,i.jsx)(n.code,{children:"--rcp-http-authentication-jwt-algorithm"})}),"\noption and/or the\n",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-authentication-jwt-algorithm",children:(0,i.jsx)(n.code,{children:"--rcp-ws-authentication-jwt-algorithm"})}),"\noption depending on your needs."]}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(r.A,{value:"RS256 RSA Keys",label:"RS256 RSA Keys",default:!0,children:(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Generate the private key:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"openssl genrsa -out privateRSAKey.pem 2048\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Generate the public key:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"openssl rsa -pubout -in privateRSAKey.pem -pubout -out publicRSAKey.pem\n"})}),"\n"]}),"\n"]})}),(0,i.jsx)(r.A,{value:"ES256 secp256r1 ECDSA Keys",label:"ES256 secp256r1 ECDSA Keys",children:(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Generate the private key:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"openssl ecparam -name secp256r1 -genkey -out privateECDSAKey.pem\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Generate the public key:"}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"openssl ec -in privateECDSAKey.pem -pubout -out publicECDSAKey.pem\n"})}),"\n"]}),"\n"]})})]}),"\n",(0,i.jsxs)(n.admonition,{title:"Private key security",type:"danger",children:[(0,i.jsx)(n.p,{children:"The private key must be kept secret. Never share private keys publicly or on a Web site, even if advertised as secure."}),(0,i.jsxs)(n.p,{children:["Always keep your private keys safe -- ideally using ",(0,i.jsx)(n.a,{href:"https://connect2id.com/products/nimbus-jose-jwt/examples/pkcs11",children:"hardware"})," or ",(0,i.jsx)(n.a,{href:"https://www.vaultproject.io/docs/secrets/identity/identity-token",children:"vault"})," -- and define a strong security policy and ",(0,i.jsx)(n.a,{href:"https://auth0.com/docs/best-practices/token-best-practices",children:"best practices"}),"."]}),(0,i.jsx)(n.p,{children:"Compromised keys can provide attackers access to your node's RPC-API."})]}),"\n",(0,i.jsx)(n.h3,{id:"2-create-the-jwt",children:"2. Create the JWT"}),"\n",(0,i.jsxs)(n.p,{children:["Create the JWT using a trusted authentication provider",(0,i.jsx)(n.sup,{children:(0,i.jsx)(n.a,{href:"#user-content-fn-1",id:"user-content-fnref-1","data-footnote-ref":!0,"aria-describedby":"footnote-label",children:"1"})})," or ",(0,i.jsx)(n.a,{href:"https://jwt.io/libraries",children:"library"})," in your own code."]}),"\n",(0,i.jsxs)(n.p,{children:["See ",(0,i.jsx)(n.a,{href:"https://github.com/NicolasMassart/java-jwt-sample-generation/",children:"Java code sample to generate JWT using Vertx"})," for an example implementation."]}),"\n",(0,i.jsx)(n.admonition,{title:"Important",type:"caution",children:(0,i.jsxs)(n.p,{children:["The JWT must use one of the ",(0,i.jsx)(n.code,{children:"RS256"}),", ",(0,i.jsx)(n.code,{children:"RS384"}),", ",(0,i.jsx)(n.code,{children:"RS512"}),", ",(0,i.jsx)(n.code,{children:"ES256"}),", ",(0,i.jsx)(n.code,{children:"ES384"}),", or ",(0,i.jsx)(n.code,{children:"ES512"})," algorithms."]})}),"\n",(0,i.jsx)(n.p,{children:"Each payload for the JWT must contain:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"#json-rpc-permissions",children:"JSON-RPC permissions"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsxs)(n.a,{href:"https://tools.ietf.org/html/rfc7519#section-4.1.4",children:[(0,i.jsx)(n.code,{children:"exp"})," (Expiration Time) claim"]})}),"\n",(0,i.jsxs)(n.li,{children:["Optionally, the tenant's Tessera public key using ",(0,i.jsx)(n.code,{children:"privacyPublicKey"}),". Only used for ",(0,i.jsx)(n.a,{href:"/private-networks/concepts/privacy/multi-tenancy",children:"multi-tenancy"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(r.A,{value:"Example JSON Payload",label:"Example JSON Payload",default:!0,children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-json",children:'{\n "permissions": ["*:*"],\n "privacyPublicKey": "2UKH3VJThkOoKskrLFpwoxCnnRARyobV1bEdgseFHTs=",\n "exp": 1600899999002\n}\n'})})}),(0,i.jsx)(r.A,{value:"Example JWT result",label:"Example JWT result",children:(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Example result",src:t(42365).A+"",width:"493",height:"486"})})})]}),"\n",(0,i.jsx)(n.h3,{id:"3-enable-authentication",children:"3. Enable authentication"}),"\n",(0,i.jsxs)(n.p,{children:["Enable authentication for the JSON-RPC API using the\n",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-authentication-enabled",children:(0,i.jsx)(n.code,{children:"--rpc-http-authentication-enabled"})}),"\nor ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-authentication-enabled",children:(0,i.jsx)(n.code,{children:"--rpc-ws-authentication-enabled"})})," option."]}),"\n",(0,i.jsxs)(n.p,{children:["Specify the JWT provider's public key file to use with the externally created JWT, using the\n",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-authentication-jwt-public-key-file",children:(0,i.jsx)(n.code,{children:"--rpc-http-authentication-jwt-public-key-file"})}),"\nor ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-authentication-jwt-public-key-file",children:(0,i.jsx)(n.code,{children:"--rpc-ws-authentication-jwt-public-key-file"})})," option."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["With authentication enabled, you can specify methods that don't require authentication using\n",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api-methods-no-auth",children:(0,i.jsx)(n.code,{children:"--rpc-http-api-methods-no-auth"})})," or\n",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-api-methods-no-auth",children:(0,i.jsx)(n.code,{children:"--rpc-ws-api-methods-no-auth"})}),"."]})}),"\n",(0,i.jsx)(n.h2,{id:"json-rpc-permissions",children:"JSON-RPC permissions"}),"\n",(0,i.jsx)(n.p,{children:"Each user has a list of permissions strings defining the methods they can access. To give access to:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["All API methods, specify ",(0,i.jsx)(n.code,{children:'["*:*"]'}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["All API methods in an API group, specify ",(0,i.jsx)(n.code,{children:'[":*"]'}),". For example, ",(0,i.jsx)(n.code,{children:'["eth:*"]'}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Specific API methods, specify ",(0,i.jsx)(n.code,{children:'[":"]'}),". For example, ",(0,i.jsx)(n.code,{children:'["admin:peers"]'}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["With authentication enabled, to explicitly specify a user cannot access any methods, include the user with an empty permissions list (",(0,i.jsx)(n.code,{children:"[]"}),"). Users with an empty permissions list and users not included in the credentials file cannot access any JSON-RPC methods."]}),"\n",(0,i.jsx)(n.h2,{id:"use-an-authentication-token-to-make-requests",children:"Use an authentication token to make requests"}),"\n",(0,i.jsxs)(n.p,{children:["Specify the authentication token as a ",(0,i.jsx)(n.code,{children:"Bearer"})," token in the JSON-RPC request header."]}),"\n",(0,i.jsx)(n.h3,{id:"postman",children:"Postman"}),"\n",(0,i.jsxs)(n.p,{children:["In the ",(0,i.jsx)(n.strong,{children:"Authorization"})," tab in the ",(0,i.jsx)(n.strong,{children:"TYPE"})," drop-down list, select ",(0,i.jsx)(n.strong,{children:"Bearer Token"})," and specify the token (generated either ",(0,i.jsx)(n.a,{href:"#2-create-the-jwt",children:"externally"})," or by the ",(0,i.jsxs)(n.a,{href:"#3-generate-an-authentication-token",children:[(0,i.jsx)(n.code,{children:"login"})," request"]}),")."]}),"\n",(0,i.jsx)(n.h3,{id:"curl",children:"cURL"}),"\n",(0,i.jsxs)(n.p,{children:["Specify the ",(0,i.jsx)(n.code,{children:"Bearer"})," in the header."]}),"\n",(0,i.jsxs)(s.A,{children:[(0,i.jsx)(r.A,{value:"cURL Request with authentication placeholders",label:"cURL Request with authentication placeholders",default:!0,children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H \'Authorization: Bearer \' -d \'{"jsonrpc":"2.0","method":"","params":[],"id":1}\' \n'})})}),(0,i.jsx)(r.A,{value:"cURL Request with authentication",label:"cURL Request with authentication",children:(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:'curl -X POST -H \'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJwZXJtaXNzaW9ucyI6WyIqOioiXSwidXNlcm5hbWUiOiJ1c2VyMiIsImlhdCI6MTU1MDQ2MTQxNiwiZXhwIjoxNTUwNDYxNzE2fQ.WQ1mqpqzRLHaoL8gOSEZPvnRs_qf6j__7A3Sg8vf9RKvWdNTww_vRJF1gjcVy-FFh96AchVnQyXVx0aNUz9O0txt8VN3jqABVWbGMfSk2T_CFdSw5aDjuriCsves9BQpP70Vhj-tseaudg-XU5hCokX0tChbAqd9fB2138zYm5M\' -d \'{"jsonrpc":"2.0","method":"net_listening","params":[],"id":1}\' http://localhost:8545\n'})})})]}),"\n","\n",(0,i.jsxs)(n.section,{"data-footnotes":!0,className:"footnotes",children:[(0,i.jsx)(n.h2,{className:"sr-only",id:"footnote-label",children:"Footnotes"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{id:"user-content-fn-1",children:["\n",(0,i.jsxs)(n.p,{children:["for example ",(0,i.jsx)(n.a,{href:"https://auth0.com/",children:"Auth0"})," or ",(0,i.jsx)(n.a,{href:"https://www.keycloak.org/",children:"Keycloak"})," ",(0,i.jsx)(n.a,{href:"#user-content-fnref-1","data-footnote-backref":"","aria-label":"Back to reference 1",className:"data-footnote-backref",children:"\u21a9"})]}),"\n"]}),"\n"]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var i=t(18215);const a={tabItem:"tabItem_Ymn6"};var s=t(74848);function r(e){let{children:n,hidden:t,className:r}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,i.A)(a.tabItem,r),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>v});var i=t(96540),a=t(18215),s=t(23104),r=t(56347),c=t(205),o=t(57485),l=t(31682),h=t(70679);function d(e){return i.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,i.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function u(e){const{values:n,children:t}=e;return(0,i.useMemo)((()=>{const e=n??function(e){return d(e).map((e=>{let{props:{value:n,label:t,attributes:i,default:a}}=e;return{value:n,label:t,attributes:i,default:a}}))}(t);return function(e){const n=(0,l.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function x(e){let{queryString:n=!1,groupId:t}=e;const a=(0,r.W6)(),s=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,o.aZ)(s),(0,i.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(a.location.search);n.set(s,e),a.replace({...a.location,search:n.toString()})}),[s,a])]}function j(e){const{defaultValue:n,queryString:t=!1,groupId:a}=e,s=u(e),[r,o]=(0,i.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const i=t.find((e=>e.default))??t[0];if(!i)throw new Error("Unexpected error: 0 tabValues");return i.value}({defaultValue:n,tabValues:s}))),[l,d]=x({queryString:t,groupId:a}),[j,m]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,s]=(0,h.Dv)(t);return[a,(0,i.useCallback)((e=>{t&&s.set(e)}),[t,s])]}({groupId:a}),f=(()=>{const e=l??j;return p({value:e,tabValues:s})?e:null})();(0,c.A)((()=>{f&&o(f)}),[f]);return{selectedValue:r,selectValue:(0,i.useCallback)((e=>{if(!p({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);o(e),d(e),m(e)}),[d,m,s]),tabValues:s}}var m=t(92303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=t(74848);function y(e){let{className:n,block:t,selectedValue:i,selectValue:r,tabValues:c}=e;const o=[],{blockElementScrollPositionUntilNextRender:l}=(0,s.a_)(),h=e=>{const n=e.currentTarget,t=o.indexOf(n),a=c[t].value;a!==i&&(l(n),r(a))},d=e=>{let n=null;switch(e.key){case"Enter":h(e);break;case"ArrowRight":{const t=o.indexOf(e.currentTarget)+1;n=o[t]??o[0];break}case"ArrowLeft":{const t=o.indexOf(e.currentTarget)-1;n=o[t]??o[o.length-1];break}}n?.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":t},n),children:c.map((e=>{let{value:n,label:t,attributes:s}=e;return(0,b.jsx)("li",{role:"tab",tabIndex:i===n?0:-1,"aria-selected":i===n,ref:e=>o.push(e),onKeyDown:d,onClick:h,...s,className:(0,a.A)("tabs__item",f.tabItem,s?.className,{"tabs__item--active":i===n}),children:t??n},n)}))})}function w(e){let{lazy:n,children:t,selectedValue:s}=e;const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=r.find((e=>e.props.value===s));return e?(0,i.cloneElement)(e,{className:(0,a.A)("margin-top--md",e.props.className)}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:r.map(((e,n)=>(0,i.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function g(e){const n=j(e);return(0,b.jsxs)("div",{className:(0,a.A)("tabs-container",f.tabList),children:[(0,b.jsx)(y,{...n,...e}),(0,b.jsx)(w,{...n,...e})]})}function v(e){const n=(0,m.A)();return(0,b.jsx)(g,{...e,children:d(e.children)},String(n))}},42365:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/jwt-49a83901a587794e24b4684fc0a089b2.png"},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>c});var i=t(96540);const a={},s=i.createContext(a);function r(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c6c17076.325ef5bf.js b/assets/js/c6c17076.325ef5bf.js new file mode 100644 index 00000000000..b320e94a1d5 --- /dev/null +++ b/assets/js/c6c17076.325ef5bf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8546],{38057:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>p,frontMatter:()=>t,metadata:()=>c,toc:()=>l});var s=i(74848),o=i(28453);const t={title:"Onchain permissioning",description:"Onchain permissioning",sidebar_position:1,tags:["private networks"]},r="Onchain permissioning (Deprecated)",c={id:"private-networks/concepts/permissioning/onchain",title:"Onchain permissioning",description:"Onchain permissioning",source:"@site/docs/private-networks/concepts/permissioning/onchain.md",sourceDirName:"private-networks/concepts/permissioning",slug:"/private-networks/concepts/permissioning/onchain",permalink:"/private-networks/concepts/permissioning/onchain",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/concepts/permissioning/onchain.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Onchain permissioning",description:"Onchain permissioning",sidebar_position:1,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Permissioning",permalink:"/private-networks/concepts/permissioning/"},next:{title:"Permissioning plugin",permalink:"/private-networks/concepts/permissioning/plugin"}},a={},l=[{value:"Permissioning contracts",id:"permissioning-contracts",level:2},{value:"Allowlists",id:"allowlists",level:3},{value:"Bootnodes",id:"bootnodes",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"onchain-permissioning-deprecated",children:"Onchain permissioning (Deprecated)"})}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsxs)(n.p,{children:["Onchain permissioning is deprecated in Besu version 24.12.0 and later. Please read this ",(0,s.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,s.jsxs)(n.p,{children:["Onchain ",(0,s.jsx)(n.a,{href:"/private-networks/concepts/permissioning/",children:"permissioning"})," uses smart contracts to store and administer the node, account, and admin allowlists. Using onchain permissioning enables all nodes to read the allowlists from a single source, the blockchain."]}),"\n",(0,s.jsx)(n.admonition,{type:"danger",children:(0,s.jsx)(n.p,{children:"When using onchain account permissioning, a node checks permissions when importing blocks. Meaning, a node only imports blocks in which all transactions are from authorized senders. If you disable onchain account permissioning and your node accepts blocks without enforcing this rule, your node cannot re-synchronize with other nodes that enforce onchain account permissioning rules (your node goes into forked state)."})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsx)(n.p,{children:"Custom smart contracts and dapps can be implemented to work with onchain permissioning."})}),"\n",(0,s.jsx)(n.h2,{id:"permissioning-contracts",children:"Permissioning contracts"}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsxs)(n.p,{children:["The permissioning contract has multiple interfaces, and each interface maps to a specific version of the ",(0,s.jsx)(n.a,{href:"https://entethalliance.org/technical-specifications/",children:"Enterprise Ethereum Alliance Client Specification"}),". Ensure that you ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/use-permissioning/onchain#specify-the-permissioning-contract-interface-version",children:"specify the permissioning contract interface"})," being used when starting Besu."]})}),"\n",(0,s.jsx)(n.h3,{id:"allowlists",children:"Allowlists"}),"\n",(0,s.jsx)(n.p,{children:"Permissioning implements three allowlists:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Accounts, which can submit transactions to the network."}),"\n",(0,s.jsx)(n.li,{children:"Nodes, which can join the network."}),"\n",(0,s.jsx)(n.li,{children:"Admins, which are accounts able to update the accounts and nodes allowlists."}),"\n"]}),"\n",(0,s.jsxs)(n.admonition,{title:"Using account permissioning and privacy",type:"caution",children:[(0,s.jsxs)(n.p,{children:["Account permissioning is incompatible with ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/use-privacy/sign-pmts",children:"random key signing"})," for ",(0,s.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy marker transactions"}),"."]}),(0,s.jsxs)(n.p,{children:["If using account permissioning and privacy, a signing key must be specified using the ",(0,s.jsx)(n.a,{href:"/private-networks/reference/cli/options#privacy-marker-transaction-signing-key-file-deprecated",children:(0,s.jsx)(n.code,{children:"--privacy-marker-transaction-signing-key-file"})})," command line option and the corresponding public key included in the accounts allowlist."]})]}),"\n",(0,s.jsxs)(n.admonition,{type:"tip",children:[(0,s.jsxs)(n.p,{children:["If nodes are not connecting as expected, set the ",(0,s.jsxs)(n.a,{href:"/public-networks/reference/cli/options#logging",children:["log level to ",(0,s.jsx)(n.code,{children:"TRACE"})]})," and search for messages containing ",(0,s.jsx)(n.code,{children:"Node permissioning"})," to identify the issue."]}),(0,s.jsxs)(n.p,{children:["Ensure the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-host",children:(0,s.jsx)(n.code,{children:"--p2p-host"})})," command line option has been correctly configured for all nodes with the externally accessible address."]}),(0,s.jsx)(n.p,{children:"If you change your network configuration, you may need to update the node allowlist."})]}),"\n",(0,s.jsx)(n.h2,{id:"bootnodes",children:"Bootnodes"}),"\n",(0,s.jsxs)(n.p,{children:["When a node joins the network, the node connects to the ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/bootnodes",children:"bootnodes"})," until it synchronizes to the chain head, regardless of node permissions. After synchronization, the Account Rules and Node Rules smart contracts apply the permissioning rules."]}),"\n",(0,s.jsx)(n.p,{children:"If a synchronized node loses all peer connections (that is, it has zero peers), it reconnects to the bootnodes to rediscover peers."}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsx)(n.p,{children:"All bootnodes must be on the nodes allowlist."})})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>c});var s=i(96540);const o={},t=s.createContext(o);function r(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/c8cab34c.6ecffe1d.js b/assets/js/c8cab34c.6ecffe1d.js new file mode 100644 index 00000000000..e1ca43b9768 --- /dev/null +++ b/assets/js/c8cab34c.6ecffe1d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2180],{11070:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>h,frontMatter:()=>i,metadata:()=>d,toc:()=>a});var s=r(74848),n=r(28453);const i={title:"Private network API objects",sidebar_position:2,description:"Besu private network API objects reference",tags:["private networks"]},c="Private network API objects",d={id:"private-networks/reference/api/objects",title:"Private network API objects",description:"Besu private network API objects reference",source:"@site/docs/private-networks/reference/api/objects.md",sourceDirName:"private-networks/reference/api",slug:"/private-networks/reference/api/objects",permalink:"/private-networks/reference/api/objects",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/reference/api/objects.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Private network API objects",sidebar_position:2,description:"Besu private network API objects reference",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Private network API methods",permalink:"/private-networks/reference/api/"},next:{title:"Accounts for testing",permalink:"/private-networks/reference/accounts-for-testing"}},l={},a=[{value:"Private transaction object",id:"private-transaction-object",level:2},{value:"Private transaction receipt object",id:"private-transaction-receipt-object",level:2}];function o(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"private-network-api-objects",children:"Private network API objects"})}),"\n",(0,s.jsx)(t.p,{children:"The following objects are parameters for or returned by Besu private network API methods."}),"\n",(0,s.jsx)(t.admonition,{title:"Important",type:"caution",children:(0,s.jsxs)(t.p,{children:["This reference contains API objects that apply to only private networks. For API objects that apply to both private and public networks, see the ",(0,s.jsx)(t.a,{href:"/public-networks/reference/api/objects",children:"public network API objects reference"}),"."]})}),"\n",(0,s.jsx)(t.h2,{id:"private-transaction-object",children:"Private transaction object"}),"\n",(0,s.jsxs)(t.p,{children:["Returned by ",(0,s.jsx)(t.a,{href:"/private-networks/reference/api/#priv_getprivatetransaction",children:(0,s.jsx)(t.code,{children:"priv_getPrivateTransaction"})}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Key"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,s.jsx)(t.th,{children:"Value"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"from"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,s.jsx)(t.td,{children:"Address of the sender."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"gas"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,s.jsx)(t.td,{children:"Gas provided by the sender."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"gasPrice"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,s.jsx)(t.td,{children:"Gas price, in Wei, provided by the sender."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"input"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data"}),(0,s.jsx)(t.td,{children:"The data to create or invoke a contract."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"nonce"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,s.jsx)(t.td,{children:"Number of transactions made by the sender to the privacy group before this one."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"to"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,s.jsxs)(t.td,{children:[(0,s.jsx)(t.code,{children:"null"})," if a contract creation transaction, otherwise, the contract address."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"value"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,s.jsxs)(t.td,{children:[(0,s.jsx)(t.code,{children:"null"})," because private transactions cannot transfer Ether."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"v"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,s.jsx)(t.td,{children:"ECDSA Recovery ID."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"r"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,s.jsx)(t.td,{children:"ECDSA signature r."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"s"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,s.jsx)(t.td,{children:"ECDSA signature s."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"privateFrom"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,s.jsxs)(t.td,{children:[(0,s.jsx)(t.a,{href:"https://docs.tessera.consensys.net/",children:"Tessera"})," public key of the sender."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"privateFor"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Array of Data, 32\xa0bytes each"}),(0,s.jsxs)(t.td,{children:[(0,s.jsx)(t.a,{href:"https://docs.tessera.consensys.net/",children:"Tessera"})," public keys of recipients. Not returned if using ",(0,s.jsx)(t.code,{children:"privacyGroupId"})," to ",(0,s.jsx)(t.a,{href:"/private-networks/concepts/privacy/privacy-groups#privacy-types",children:"send the transaction"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"privacyGroupId"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,s.jsxs)(t.td,{children:[(0,s.jsx)(t.a,{href:"https://docs.tessera.consensys.net/",children:"Tessera"})," privacy group ID of recipients. Not returned if using ",(0,s.jsx)(t.code,{children:"privateFor"})," to ",(0,s.jsx)(t.a,{href:"/private-networks/concepts/privacy/privacy-groups#privacy-types",children:"send the transaction"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"restriction"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"String"}),(0,s.jsxs)(t.td,{children:["Must be ",(0,s.jsx)(t.a,{href:"/private-networks/concepts/privacy/private-transactions/",children:(0,s.jsx)(t.code,{children:"restricted"})}),"."]})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"private-transaction-receipt-object",children:"Private transaction receipt object"}),"\n",(0,s.jsxs)(t.p,{children:["Returned by ",(0,s.jsx)(t.a,{href:"/private-networks/reference/api/#priv_gettransactionreceipt",children:(0,s.jsx)(t.code,{children:"priv_getTransactionReceipt"})}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Key"}),(0,s.jsx)(t.th,{style:{textAlign:"center"},children:"Type"}),(0,s.jsx)(t.th,{children:"Value"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"blockHash"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,s.jsx)(t.td,{children:"Hash of block containing this transaction."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"blockNumber"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,s.jsx)(t.td,{children:"Block number of block containing this transaction."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"contractAddress"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,s.jsxs)(t.td,{children:["Contract address created if a contract creation transaction, otherwise, ",(0,s.jsx)(t.code,{children:"null"}),". A failed contract creation transaction still produces a contract address value."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"from"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,s.jsx)(t.td,{children:"Address of the sender."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"logs"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Array"}),(0,s.jsxs)(t.td,{children:["Array of ",(0,s.jsx)(t.a,{href:"/public-networks/reference/api/objects#log-object",children:"log objects"})," generated by this private transaction."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"to"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 20\xa0bytes"}),(0,s.jsx)(t.td,{children:"Address of the receiver, if sending ether, otherwise, null."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"transactionIndex"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity, Integer"}),(0,s.jsx)(t.td,{children:"Index position of transaction in the block."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"revertReason"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"String"}),(0,s.jsxs)(t.td,{children:["ABI-encoded string that displays the ",(0,s.jsx)(t.a,{href:"/private-networks/how-to/send-transactions/revert-reason",children:"reason for reverting the transaction"}),". Only available if revert reason is ",(0,s.jsx)(t.a,{href:"/private-networks/reference/cli/options#revert-reason-enabled",children:"enabled"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"output"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data"}),(0,s.jsxs)(t.td,{children:["RLP-encoded return value of a contract call if a value returns, otherwise, ",(0,s.jsx)(t.code,{children:"null"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"commitmentHash"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,s.jsx)(t.td,{children:"Hash of the privacy marker transaction."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"status"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Quantity"}),(0,s.jsxs)(t.td,{children:["Either ",(0,s.jsx)(t.code,{children:"0x1"})," (success) or ",(0,s.jsx)(t.code,{children:"0x0"})," (failure)."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"privateFrom"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 32\xa0bytes"}),(0,s.jsxs)(t.td,{children:[(0,s.jsx)(t.a,{href:"https://docs.tessera.consensys.net/",children:"Tessera"})," public key of the sender."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsxs)(t.td,{children:[(0,s.jsx)(t.code,{children:"privateFor"})," or ",(0,s.jsx)(t.code,{children:"privacyGroupId"})]}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Array or Data, 32\xa0bytes"}),(0,s.jsxs)(t.td,{children:[(0,s.jsx)(t.a,{href:"https://docs.tessera.consensys.net/",children:"Tessera"})," public keys or privacy group ID of the recipients."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:(0,s.jsx)(t.code,{children:"logsBloom"})}),(0,s.jsx)(t.td,{style:{textAlign:"center"},children:"Data, 256\xa0bytes"}),(0,s.jsx)(t.td,{children:"Bloom filter for light clients to quickly retrieve related logs."})]})]})]})]})}function h(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},28453:(e,t,r)=>{r.d(t,{R:()=>c,x:()=>d});var s=r(96540);const n={},i=s.createContext(n);function c(e){const t=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:c(e.components),s.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ca90dbf4.fd9387c2.js b/assets/js/ca90dbf4.fd9387c2.js new file mode 100644 index 00000000000..f5d6c240297 --- /dev/null +++ b/assets/js/ca90dbf4.fd9387c2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2080],{78769:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>h,frontMatter:()=>t,metadata:()=>c,toc:()=>d});var o=i(74848),s=i(28453);const t={title:"Configure Besu",description:"Specify options in the Besu configuration file.",sidebar_position:1,tags:["public networks","private networks"]},r="Configure Besu",c={id:"public-networks/how-to/configure-besu/index",title:"Configure Besu",description:"Specify options in the Besu configuration file.",source:"@site/docs/public-networks/how-to/configure-besu/index.md",sourceDirName:"public-networks/how-to/configure-besu",slug:"/public-networks/how-to/configure-besu/",permalink:"/public-networks/how-to/configure-besu/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/configure-besu/index.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Configure Besu",description:"Specify options in the Besu configuration file.",sidebar_position:1,tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"How to",permalink:"/public-networks/how-to"},next:{title:"Use a profile",permalink:"/public-networks/how-to/configure-besu/profile"}},l={},d=[{value:"Configuration order of precedence",id:"configuration-order-of-precedence",level:2},{value:"TOML configuration file",id:"toml-configuration-file",level:2},{value:"Default configuration",id:"default-configuration",level:2},{value:"Peering",id:"peering",level:3},{value:"Storage",id:"storage",level:3},{value:"Sync",id:"sync",level:3}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"configure-besu",children:"Configure Besu"})}),"\n",(0,o.jsxs)(n.p,{children:["Besu comes with a ",(0,o.jsx)(n.a,{href:"#default-configuration",children:"default configuration"})," that is suitable for staking."]}),"\n",(0,o.jsxs)(n.p,{children:["You can override the default values by specifying ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options",children:"configuration options"})," on the command line, as environment variables, or in a ",(0,o.jsx)(n.a,{href:"#toml-configuration-file",children:"TOML configuration file"})," that can be reused across node startups."]}),"\n",(0,o.jsxs)(n.p,{children:["You can also use a ",(0,o.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/profile",children:"pre-configured profile"})," for some common use cases or create and apply a ",(0,o.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/profile#load-external-profiles",children:"custom profile"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"configuration-order-of-precedence",children:"Configuration order of precedence"}),"\n",(0,o.jsx)(n.p,{children:"For options specified in multiple places, the order of precedence is as follows:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsx)(n.li,{children:"Command line"}),"\n",(0,o.jsx)(n.li,{children:"Environment variable"}),"\n",(0,o.jsxs)(n.li,{children:["Configuration file specified by ",(0,o.jsx)(n.code,{children:"--config-file"})]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/profile",children:"Pre-configured profile"})," specified by ",(0,o.jsx)(n.code,{children:"--profile"})]}),"\n",(0,o.jsx)(n.li,{children:"Default values (used if no other configuration source is available)"}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["For example, if you specify a ",(0,o.jsx)(n.code,{children:"config.toml"})," configuration file and ",(0,o.jsx)(n.code,{children:"staker"})," profile, and an option\nis not found in the environment variables, Besu looks for it in ",(0,o.jsx)(n.code,{children:"config.toml"}),".\nIf the option is not found in ",(0,o.jsx)(n.code,{children:"config.toml"}),", Besu looks for it in ",(0,o.jsx)(n.code,{children:"staker.toml"}),".\nIf the option is not found in ",(0,o.jsx)(n.code,{children:"staker.toml"}),", Besu uses the default value for that option."]}),"\n",(0,o.jsx)(n.h2,{id:"toml-configuration-file",children:"TOML configuration file"}),"\n",(0,o.jsx)(n.admonition,{type:"note",children:(0,o.jsxs)(n.p,{children:["The configuration file is used for node-level settings. You can specify network-wide settings in the ",(0,o.jsx)(n.a,{href:"/public-networks/concepts/genesis-file",children:"genesis file"}),"."]})}),"\n",(0,o.jsxs)(n.p,{children:["Specify the configuration file using the ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#config-file",children:(0,o.jsx)(n.code,{children:"--config-file"})})," option.\nThe configuration file must be a valid TOML file composed of key/value pairs. Each key is the same as the corresponding command line option name without the leading dashes (",(0,o.jsx)(n.code,{children:"--"}),")."]}),"\n",(0,o.jsx)(n.p,{children:"Values must conform to TOML specifications for string, numbers, arrays, and booleans. Specific differences between the command line and the TOML file format are:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Comma-separated lists on the command line are string arrays in the TOML file."}),"\n",(0,o.jsxs)(n.li,{children:["Enclose file paths, hexadecimal numbers, URLs, and values in quotes."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"Table headings are ignored in TOML files. If you specify a valid Besu option under a table heading in the configuration file, Besu ignores the table heading and reads the option in the same way it does for options not under table headings."}),"\n",(0,o.jsx)(n.admonition,{type:"tip",children:(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options",children:"command line reference"})," includes configuration file examples for each option."]})}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-toml",metastring:'title="Sample TOML configuration file"',children:'# Valid TOML config file\ndata-path="~/besudata" # Path\n\n# Network\nbootnodes=["enode://001@123:4567", "enode://002@123:4567", "enode://003@123:4567"]\n\np2p-host="1.2.3.4"\np2p-port=1234\nmax-peers=42\n\nrpc-http-host="5.6.7.8"\nrpc-http-port=5678\n\nrpc-ws-host="9.10.11.12"\nrpc-ws-port=9101\n\n# Chain\ngenesis-file="~/genesis.json" # Path to the custom genesis file\n\n# Mining\nminer-enabled=true\nminer-coinbase="0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"\n'})}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{className:"language-bash",metastring:'title="Starting Besu with a configuration file"',children:"besu --config-file=/home/me/me_node/config.toml\n"})}),"\n",(0,o.jsx)(n.h2,{id:"default-configuration",children:"Default configuration"}),"\n",(0,o.jsxs)(n.p,{children:["The following tables describe important default values of Besu's configuration.\nWhen using the default configuration, Besu is optimized for staking.\nYou can extend these defaults using a ",(0,o.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/profile",children:"profile"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["For example, extending the default configuration using the ",(0,o.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/profile#staker-profile",children:"staker profile"})," directs Besu to use Mainnet, creating a staking-optimized node ready to run with a ",(0,o.jsx)(n.a,{href:"/public-networks/concepts/node-clients#consensus-clients",children:"validator and consensus client"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"peering",children:"Peering"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Configuration option"}),(0,o.jsx)(n.th,{children:"Default"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#discovery-enabled",children:(0,o.jsx)(n.code,{children:"discovery-enabled"})})}),(0,o.jsx)(n.td,{children:(0,o.jsx)(n.code,{children:"true"})}),(0,o.jsx)(n.td,{children:"Besu assumes the node will automatically discover other Ethereum nodes using P2P."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-enabled",children:(0,o.jsx)(n.code,{children:"p2p-enabled"})})}),(0,o.jsx)(n.td,{children:(0,o.jsx)(n.code,{children:"true"})}),(0,o.jsx)(n.td,{children:"Besu assumes the node will connect P2P."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#engine-rpc-enabled",children:(0,o.jsx)(n.code,{children:"engine-rpc-enabled"})})}),(0,o.jsx)(n.td,{children:(0,o.jsx)(n.code,{children:"true"})}),(0,o.jsx)(n.td,{children:"Besu assumes the Engine API will be required to communicate with the consensus layer."})]})]})]}),"\n",(0,o.jsx)(n.h3,{id:"storage",children:"Storage"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Configuration option"}),(0,o.jsx)(n.th,{children:"Default"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-storage-format",children:(0,o.jsx)(n.code,{children:"data-storage-format"})})}),(0,o.jsx)(n.td,{children:(0,o.jsx)(n.code,{children:"BONSAI"})}),(0,o.jsxs)(n.td,{children:["Besu uses ",(0,o.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai Tries"}),", the most space-efficient data storage format."]})]})})]}),"\n",(0,o.jsx)(n.h3,{id:"sync",children:"Sync"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Configuration option"}),(0,o.jsx)(n.th,{children:"Default"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:(0,o.jsx)(n.code,{children:"sync-mode"})})}),(0,o.jsx)(n.td,{children:(0,o.jsx)(n.code,{children:"SNAP"})}),(0,o.jsxs)(n.td,{children:["Besu syncs using ",(0,o.jsx)(n.a,{href:"/public-networks/concepts/node-sync#snap-synchronization",children:"snap sync"}),", the most time-efficient sync method."]})]})})]}),"\n",(0,o.jsx)(n.admonition,{type:"note",children:(0,o.jsxs)(n.p,{children:["You can see all default configuration values in the ",(0,o.jsx)(n.a,{href:"/public-networks/reference/cli/options",children:"configuration options reference"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>r,x:()=>c});var o=i(96540);const s={},t=o.createContext(s);function r(e){const n=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cdbaa4c0.fac6c6a1.js b/assets/js/cdbaa4c0.fac6c6a1.js new file mode 100644 index 00000000000..985b57d76c8 --- /dev/null +++ b/assets/js/cdbaa4c0.fac6c6a1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1207],{43422:(e,o,t)=>{t.r(o),t.d(o,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>l,toc:()=>a});var n=t(74848),r=t(28453);const s={title:"Use EVM tool",sidebar_position:1,description:"Besu EVM tool",tags:["public networks","private networks"]},i="Use the EVM tool",l={id:"public-networks/how-to/troubleshoot/evm-tool",title:"Use EVM tool",description:"Besu EVM tool",source:"@site/docs/public-networks/how-to/troubleshoot/evm-tool.md",sourceDirName:"public-networks/how-to/troubleshoot",slug:"/public-networks/how-to/troubleshoot/evm-tool",permalink:"/public-networks/how-to/troubleshoot/evm-tool",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/troubleshoot/evm-tool.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Use EVM tool",sidebar_position:1,description:"Besu EVM tool",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Upgrade Besu",permalink:"/public-networks/how-to/upgrade-node"},next:{title:"Trace transactions",permalink:"/public-networks/how-to/troubleshoot/trace-transactions"}},c={},a=[{value:"Get the EVM tool",id:"get-the-evm-tool",level:2},{value:"Build from source",id:"build-from-source",level:3},{value:"Execute with Docker",id:"execute-with-docker",level:3},{value:"EVM tool options",id:"evm-tool-options",level:2}];function d(e){const o={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.header,{children:(0,n.jsx)(o.h1,{id:"use-the-evm-tool",children:"Use the EVM tool"})}),"\n",(0,n.jsx)(o.p,{children:"The Besu EVM tool is a CLI program that executes arbitrary EVM programs and Ethereum State Tests\noutside the context of an operating node.\nUse the EVM tool for benchmarking and fuzz testing."}),"\n",(0,n.jsx)(o.h2,{id:"get-the-evm-tool",children:"Get the EVM tool"}),"\n",(0,n.jsxs)(o.p,{children:["The EVM tool is part of the standard ",(0,n.jsx)(o.a,{href:"/public-networks/get-started/install/binary-distribution",children:"Besu binary distribution"}),"."]}),"\n",(0,n.jsx)(o.h3,{id:"build-from-source",children:"Build from source"}),"\n",(0,n.jsx)(o.p,{children:"To build from source, run the following from the root of the Besu repository:"}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-bash",children:"./gradlew :ethereum:evmTool:installDist\n"})}),"\n",(0,n.jsxs)(o.p,{children:["An extractable archive files is created in ",(0,n.jsx)(o.code,{children:"ethereum/evmtool/build/distributions"})," and an executable\ninstallation in ",(0,n.jsx)(o.code,{children:"ethereum/evmtool/build/install/evmtool"}),"."]}),"\n",(0,n.jsx)(o.p,{children:"Execute the EVM tool:"}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-bash",children:"ethereum/evmtool/build/install/evmtool/bin/evmtool \n"})}),"\n",(0,n.jsx)(o.h3,{id:"execute-with-docker",children:"Execute with Docker"}),"\n",(0,n.jsx)(o.p,{children:"To run the Besu EVM tool in a container:"}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-bash",children:"docker run -rm hyperledger/besu-evmtool:develop \n"})}),"\n",(0,n.jsxs)(o.ul,{children:["\n",(0,n.jsxs)(o.li,{children:["Because no data is stored in local directories we recommended using the ",(0,n.jsx)(o.code,{children:"-rm"})," docker option.\nThe ",(0,n.jsx)(o.code,{children:"-rm"})," option deletes the container at the end of execution."]}),"\n",(0,n.jsxs)(o.li,{children:["If you use an option that requires input from standard in, use the ",(0,n.jsx)(o.code,{children:"-i"})," docker option.\nThe ",(0,n.jsx)(o.code,{children:"-i"})," option pipes standard input to the EVM tool."]}),"\n",(0,n.jsxs)(o.li,{children:["If you need to reference files we recommend using a docker file binding, such as\n",(0,n.jsx)(o.code,{children:"-v ${PWD}:/opt/data"}),", which maps the current directory to the ",(0,n.jsx)(o.code,{children:"/opt/data"})," directory in the container."]}),"\n"]}),"\n",(0,n.jsx)(o.admonition,{type:"note",children:(0,n.jsxs)(o.p,{children:["The ",(0,n.jsx)(o.code,{children:"latest"})," tag is the latest released version of Besu.\nThe ",(0,n.jsx)(o.code,{children:"develop"})," tag is the current main branch code that will go into a future release version of Besu."]})}),"\n",(0,n.jsx)(o.h2,{id:"evm-tool-options",children:"EVM tool options"}),"\n",(0,n.jsxs)(o.p,{children:["The first mode of the EVM tool runs arbitrary EVM bytecode.\nUse ",(0,n.jsx)(o.a,{href:"/public-networks/reference/evm-tool#options",children:"command line options"})," to specify the code and other\ncontextual information.\nFor example:"]}),"\n",(0,n.jsx)(o.pre,{children:(0,n.jsx)(o.code,{className:"language-bash",children:"evmtool --code=5B600080808060045AFA50600056\n"})}),"\n",(0,n.jsxs)(o.p,{children:["The EVM tool also has ",(0,n.jsx)(o.a,{href:"/public-networks/reference/evm-tool#subcommands",children:"subcommands"})," used for testing code bases.\nThese subcommands are not meant for typical user interactions."]})]})}function h(e={}){const{wrapper:o}={...(0,r.R)(),...e.components};return o?(0,n.jsx)(o,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,o,t)=>{t.d(o,{R:()=>i,x:()=>l});var n=t(96540);const r={},s=n.createContext(r);function i(e){const o=n.useContext(s);return n.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function l(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(s.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ce4c8b54.7b1b2a99.js b/assets/js/ce4c8b54.7b1b2a99.js new file mode 100644 index 00000000000..1ea4b30dce6 --- /dev/null +++ b/assets/js/ce4c8b54.7b1b2a99.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8077],{54662:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>l});var n=r(74848),t=r(28453);const i={title:"Create a cluster",sidebar_position:2,description:"Create a cluster for deployment",tags:["private networks"]},a="Create a cluster",o={id:"private-networks/tutorials/kubernetes/cluster",title:"Create a cluster",description:"Create a cluster for deployment",source:"@site/docs/private-networks/tutorials/kubernetes/cluster.md",sourceDirName:"private-networks/tutorials/kubernetes",slug:"/private-networks/tutorials/kubernetes/cluster",permalink:"/private-networks/tutorials/kubernetes/cluster",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/kubernetes/cluster.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Create a cluster",sidebar_position:2,description:"Create a cluster for deployment",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Local playground",permalink:"/private-networks/tutorials/kubernetes/playground"},next:{title:"Deploy charts",permalink:"/private-networks/tutorials/kubernetes/charts"}},c={},l=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Local Clusters",id:"local-clusters",level:2},{value:"Minikube",id:"minikube",level:3},{value:"kind",id:"kind",level:3},{value:"Rancher",id:"rancher",level:3},{value:"Cloud clusters",id:"cloud-clusters",level:2},{value:"AWS EKS",id:"aws-eks",level:3},{value:"Azure Kubernetes Service",id:"azure-kubernetes-service",level:3}];function d(e){const s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"create-a-cluster",children:"Create a cluster"})}),"\n",(0,n.jsxs)(s.p,{children:["You can create a ",(0,n.jsx)(s.a,{href:"#local-clusters",children:"local"})," or ",(0,n.jsx)(s.a,{href:"#cloud-clusters",children:"cloud"})," cluster to deploy a Besu network using Kubernetes."]}),"\n",(0,n.jsx)(s.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Clone the ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes",children:"Quorum-Kubernetes"})," repository"]}),"\n",(0,n.jsxs)(s.li,{children:["Install ",(0,n.jsx)(s.a,{href:"https://kubernetes.io/docs/tasks/tools/",children:"Kubectl"})]}),"\n",(0,n.jsxs)(s.li,{children:["Install ",(0,n.jsx)(s.a,{href:"https://helm.sh/docs/intro/install/",children:"Helm3"})]}),"\n",(0,n.jsxs)(s.li,{children:["Install ",(0,n.jsx)(s.a,{href:"https://aws.amazon.com/cli/",children:"AWS CLI"})," and ",(0,n.jsx)(s.a,{href:"https://eksctl.io/",children:(0,n.jsx)(s.code,{children:"eksctl"})})," for AWS EKS clusters"]}),"\n",(0,n.jsxs)(s.li,{children:["Install ",(0,n.jsx)(s.a,{href:"https://docs.microsoft.com/en-us/cli/azure/install-azure-cli",children:"Azure CLI"})," for Azure AKS clusters"]}),"\n",(0,n.jsx)(s.li,{children:"Install the cloud-specific CLI"}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"local-clusters",children:"Local Clusters"}),"\n",(0,n.jsx)(s.p,{children:"Use one of several options to create a local cluster. Select one listed below, or another that you're comfortable with."}),"\n",(0,n.jsx)(s.h3,{id:"minikube",children:"Minikube"}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://minikube.sigs.k8s.io/docs/start/",children:"Minikube"})," is one of the most popular options to spin up a local Kubernetes cluster for development. You can ",(0,n.jsx)(s.a,{href:"https://minikube.sigs.k8s.io/docs/start/",children:"install a version"})," based on your architecture."]}),"\n",(0,n.jsx)(s.admonition,{type:"note",children:(0,n.jsx)(s.p,{children:"We recommend at least 2 CPUs and 16GB of RAM."})}),"\n",(0,n.jsx)(s.p,{children:"To start the cluster, run the following command:"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:"minikube start --cpus 2 --memory 16384 --cni auto\n"})}),"\n",(0,n.jsx)(s.h3,{id:"kind",children:"kind"}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://kind.sigs.k8s.io",children:"kind (Kubernetes in Docker)"})," is a lightweight tool for running local Kubernetes clusters. The ",(0,n.jsx)(s.a,{href:"https://kind.sigs.k8s.io/docs/user/quick-start#installation",children:"installation"})," is similar to ",(0,n.jsx)(s.a,{href:"#minikube",children:"Minikube"}),"."]}),"\n",(0,n.jsx)(s.p,{children:"To start the cluster, run the following command:"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:"kind create cluster\n"})}),"\n",(0,n.jsx)(s.h3,{id:"rancher",children:"Rancher"}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://github.com/rancher-sandbox/rancher-desktop/",children:"Rancher"})," is a lightweight open source desktop application for Mac, Windows, and Linux. It provides Kubernetes and container management, and allows you to choose the version of Kubernetes to run."]}),"\n",(0,n.jsx)(s.p,{children:"It can build, push, pull, and run container images. Built container images can be run without needing a registry."}),"\n",(0,n.jsx)(s.admonition,{type:"note",children:(0,n.jsxs)(s.p,{children:["The official Docker-CLI is not supported but rather uses ",(0,n.jsx)(s.a,{href:"https://github.com/containerd/nerdctl",children:"nerdctl"})," which is a Docker-CLI compatible tool for containerd, and is automatically installed with Rancher Desktop."]})}),"\n",(0,n.jsxs)(s.admonition,{type:"note",children:[(0,n.jsxs)(s.p,{children:["For Windows, you must ",(0,n.jsx)(s.a,{href:"https://docs.microsoft.com/en-us/windows/wsl/install",children:"install Windows Subsystem for Linux (WSL)"})," to install Rancher Desktop."]}),(0,n.jsxs)(s.p,{children:["Refer to the ",(0,n.jsx)(s.a,{href:"https://docs.rancherdesktop.io/",children:"official Rancher Desktop documentation"})," for system requirements and installation instructions."]})]}),"\n",(0,n.jsx)(s.h2,{id:"cloud-clusters",children:"Cloud clusters"}),"\n",(0,n.jsx)(s.h3,{id:"aws-eks",children:"AWS EKS"}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://aws.amazon.com/eks/",children:"AWS Elastic Kubernetes Service (AWS EKS)"})," is one of the most popular platforms to deploy Besu."]}),"\n",(0,n.jsxs)(s.p,{children:["To create a cluster in AWS, you must install the ",(0,n.jsx)(s.a,{href:"https://aws.amazon.com/cli/",children:"AWS CLI"})," and ",(0,n.jsx)(s.a,{href:"https://eksctl.io/",children:(0,n.jsx)(s.code,{children:"eksctl"})}),"."]}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/tree/master/aws",children:"template"})," comprises the base infrastructure used to build the cluster and other resources in AWS. We also use some native services with the cluster for performance and best practices, these include:"]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://github.com/aws/amazon-eks-pod-identity-webhook",children:"Pod identities"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://docs.aws.amazon.com/eks/latest/userguide/ebs-csi.html",children:"Secrets Store CSI drivers"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["Dynamic storage classes backed by AWS EBS. The ",(0,n.jsx)(s.a,{href:"https://kubernetes.io/docs/concepts/storage/persistent-volumes/#persistentvolumeclaims",children:"volume claims"})," are fixed sizes and can be updated as you grow via helm updates, and won't need to re-provision the underlying storage class."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://docs.aws.amazon.com/eks/latest/userguide/pod-networking.html",children:"CNI"})," networking mode for EKS. By default, EKS clusters use ",(0,n.jsx)(s.code,{children:"kubenet"}),' to create a virtual network and subnet. Nodes get an IP address from a virtual network subnet. Network address translation (NAT) is then configured on the nodes, and pods receive an IP address "hidden" behind the node IP.']}),"\n",(0,n.jsx)(s.admonition,{type:"note",children:(0,n.jsx)(s.p,{children:"This approach reduces the number of IP addresses that you must reserve in your network space for pods, but constrains what can connect to the nodes from outside the cluster (for example, on-premise nodes or those on another cloud provider)."})}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"AWS Container Networking Interface (CNI) provides each pod with an IP address from the subnet, and can be accessed directly. The IP addresses must be unique across your network space, and must be planned in advance. Each node has a configuration parameter for the maximum number of pods that it supports. The equivalent number of IP addresses per node are then reserved up front for that node. This approach requires more planning, and can lead to IP address exhaustion as your application demands grow, however makes it easier for external nodes to connect to your cluster."}),"\n",(0,n.jsx)(s.admonition,{type:"warning",children:(0,n.jsx)(s.p,{children:"EKS clusters must not use 169.254.0.0/16, 172.30.0.0/16, 172.31.0.0/16, or 192.0.2.0/24 for the Kubernetes service address range."})}),"\n",(0,n.jsx)(s.p,{children:"To provision the cluster:"}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["Update ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/aws/templates/cluster.yml",children:"cluster.yml"})]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsx)(s.p,{children:"Deploy the template:"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:"eksctl create cluster -f ./templates/cluster.yml\n"})}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["Your ",(0,n.jsx)(s.code,{children:".kube/config"})," should be connected to the cluster automatically, but if not, run the commands below and replace ",(0,n.jsx)(s.code,{children:"AWS_REGION"})," and ",(0,n.jsx)(s.code,{children:"CLUSTER_NAME"})," with details that are specific to your deployment."]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:"aws sts get-caller-identity\naws eks --region AWS_REGION update-kubeconfig --name CLUSTER_NAME\n"})}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["After the deployment completes, provision the EBS drivers for the volumes. While it is possible to use the in-tree ",(0,n.jsx)(s.code,{children:"aws-ebs"})," driver that's natively supported by Kubernetes, it is no longer being updated and does not support newer EBS features such as the ",(0,n.jsx)(s.a,{href:"https://stackoverflow.com/questions/68359043/whats-the-difference-between-ebs-csi-aws-com-vs-kubernetes-io-aws-ebs-for-provi",children:"cheaper and better gp3 volumes"}),". The ",(0,n.jsx)(s.code,{children:"cluster.yml"})," file (from the steps above) that is included in this folder automatically deploys the cluster with the EBS IAM policies, but you need to install the EBS CSI drivers. This can be done through the AWS Management Console for simplicity, or via a CLI command as below. Replace ",(0,n.jsx)(s.code,{children:"CLUSTER_NAME"}),", ",(0,n.jsx)(s.code,{children:"AWS_REGION"})," and ",(0,n.jsx)(s.code,{children:"AWS_ACCOUNT"})," with details that are specific to your deployment."]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:"eksctl create iamserviceaccount --name ebs-csi-controller-sa --namespace kube-system --cluster CLUSTER_NAME --region AWS_REGION --attach-policy-arn arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy --approve --role-only --role-name AmazonEKS_EBS_CSI_DriverRole\n\neksctl create addon --name aws-ebs-csi-driver --cluster CLUSTER_NAME --region AWS_REGION --service-account-role-arn arn:aws:iam::AWS_ACCOUNT:role/AmazonEKS_EBS_CSI_DriverRole --force\n"})}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["Once the deployment is completed, provision the Secrets Manager IAM and CSI driver. Use ",(0,n.jsx)(s.code,{children:"besu"})," (or equivalent) for ",(0,n.jsx)(s.code,{children:"NAMESPACE"})," and replace ",(0,n.jsx)(s.code,{children:"CLUSTER_NAME"}),", ",(0,n.jsx)(s.code,{children:"AWS_REGION"})," and ",(0,n.jsx)(s.code,{children:"AWS_ACCOUNT"})," with details that are specific to your deployment."]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:'helm repo add secrets-store-csi-driver https://kubernetes-sigs.github.io/secrets-store-csi-driver/charts\nhelm install --namespace kube-system --create-namespace csi-secrets-store secrets-store-csi-driver/secrets-store-csi-driver\nkubectl apply -f https://raw.githubusercontent.com/aws/secrets-store-csi-driver-provider-aws/main/deployment/aws-provider-installer.yaml\n\nPOLICY_ARN=$(aws --region AWS_REGION --query Policy.Arn --output text iam create-policy --policy-name quorum-node-secrets-mgr-policy --policy-document \'{\n "Version": "2012-10-17",\n "Statement": [ {\n "Effect": "Allow",\n "Action": ["secretsmanager:CreateSecret","secretsmanager:UpdateSecret","secretsmanager:DescribeSecret","secretsmanager:GetSecretValue","secretsmanager:PutSecretValue","secretsmanager:ReplicateSecretToRegions","secretsmanager:TagResource"],\n "Resource": ["arn:aws:secretsmanager:AWS_REGION:AWS_ACCOUNT:secret:besu-node-*"]\n } ]\n}\')\n\n# If you have deployed the above policy before, you can acquire its ARN:\nPOLICY_ARN=$(aws iam list-policies --scope Local \\\n--query \'Policies[?PolicyName==`quorum-node-secrets-mgr-policy`].Arn\' \\\n--output text)\n\neksctl create iamserviceaccount --name quorum-node-secrets-sa --namespace NAMESPACE --region=AWS_REGION --cluster CLUSTER_NAME --attach-policy-arn "$POLICY_ARN" --approve --override-existing-serviceaccounts\n'})}),"\n",(0,n.jsx)(s.admonition,{type:"warning",children:(0,n.jsxs)(s.p,{children:["The above command creates a service account called ",(0,n.jsx)(s.code,{children:"quorum-node-secrets-sa"})," and is preconfigured in the helm charts override ",(0,n.jsx)(s.code,{children:"values.yml"})," files, for ease of use."]})}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["Optionally, deploy the ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/tree/master/aws/templates/k8s-dashboard",children:"kubernetes dashboard"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["You can now use your cluster and you can deploy ",(0,n.jsx)(s.a,{href:"/private-networks/tutorials/kubernetes/charts",children:"Helm charts"})," to it."]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.h3,{id:"azure-kubernetes-service",children:"Azure Kubernetes Service"}),"\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://azure.microsoft.com/en-us/services/kubernetes-service/",children:"Azure Kubernetes Service (AKS)"})," is another popular cloud platform that you can use to deploy Besu. To create a cluster in Azure, you must install the ",(0,n.jsx)(s.a,{href:"https://docs.microsoft.com/en-us/cli/azure/install-azure-cli",children:"Azure CLI"})," and have admin rights on your Azure subscription to enable some preview features on AKS."]}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/tree/master/azure",children:"template"})," comprises the base infrastructure used to build the cluster and other resources in Azure. We also make use Azure native services and features after the cluster is created. These include:"]}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://docs.microsoft.com/en-us/azure/aks/use-azure-ad-pod-identity",children:"AAD pod identities"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://docs.microsoft.com/en-us/azure/key-vault/general/key-vault-integrate-kubernetes",children:"Secrets Store CSI drivers"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["Dynamic storage classes backed by Azure Files. The ",(0,n.jsx)(s.a,{href:"https://docs.microsoft.com/en-us/azure/aks/azure-disks-dynamic-pv",children:"volume claims"})," are fixed sizes and can be updated as you grow via helm updates, and won't need to re-provision the underlying storage class."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://docs.microsoft.com/en-us/azure/aks/configure-azure-cni",children:"CNI"})," networking mode for AKS. By default, AKS clusters use ",(0,n.jsx)(s.code,{children:"kubenet"}),', to create a virtual network and subnet. Nodes get an IP address from a virtual network subnet. Network address translation (NAT) is then configured on the nodes, and pods receive an IP address "hidden" behind the node IP.']}),"\n",(0,n.jsx)(s.admonition,{type:"note",children:(0,n.jsx)(s.p,{children:"This approach reduces the number of IP addresses you must reserve in your network space for pods to use, but constrains what can connect to the nodes from outside the cluster (for example, on-premise nodes or other cloud providers)."})}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(s.p,{children:"AKS Container Networking Interface (CNI) provides each pod with an IP address from the subnet, and can be accessed directly. These IP addresses must be unique across your network space, and must be planned in advance. Each node has a configuration parameter for the maximum number of pods that it supports. The equivalent number of IP addresses per node are then reserved up front for that node. This approach requires more planning, and can leads to IP address exhaustion as your application demands grow, however makes it easier for external nodes to connect to your cluster."}),"\n",(0,n.jsx)(s.admonition,{type:"warning",children:(0,n.jsxs)(s.p,{children:["Please do not create more than one AKS cluster in the same subnet. AKS clusters may not use ",(0,n.jsx)(s.code,{children:"169.254.0.0/16"}),", ",(0,n.jsx)(s.code,{children:"172.30.0.0/16"}),", ",(0,n.jsx)(s.code,{children:"172.31.0.0/16"}),", or ",(0,n.jsx)(s.code,{children:"192.0.2.0/24"})," for the Kubernetes service address range."]})}),"\n",(0,n.jsx)(s.p,{children:"To provision the cluster:"}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["Enable the preview features that allow you to use AKS with CNI, and a managed identity to authenticate and run cluster operations with other services. We also enable ",(0,n.jsx)(s.a,{href:"https://docs.microsoft.com/en-us/azure/aks/use-azure-ad-pod-identity",children:"AAD pod identities"})," which use the managed identity. This is in preview, so you must enable this feature by registering the ",(0,n.jsx)(s.code,{children:"EnablePodIdentityPreview"})," feature:"]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:"az feature register --name EnablePodIdentityPreview --namespace Microsoft.ContainerService\n"})}),"\n",(0,n.jsx)(s.p,{children:"This takes a little while and you can check on progress by running:"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:"az feature list --namespace Microsoft.ContainerService -o table\n"})}),"\n",(0,n.jsx)(s.p,{children:"Install or update your local Azure CLI with preview features:"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:"az extension add --name aks-preview\naz extension update --name aks-preview\n"})}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsx)(s.p,{children:"Create a resource group if you don't already have one:"}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:'az group create --name BesuGroup --location "East US"\n'})}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsx)(s.p,{children:"Deploy the template:"}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsxs)(s.li,{children:["Navigate to the ",(0,n.jsx)(s.a,{href:"https://portal.azure.com",children:"Azure portal"}),", select ",(0,n.jsx)(s.strong,{children:"+ Create a resource"})," in the upper left corner."]}),"\n",(0,n.jsxs)(s.li,{children:["Search for ",(0,n.jsx)(s.code,{children:"Template deployment (deploy using custom templates)"})," and select ",(0,n.jsx)(s.strong,{children:"Create"}),"."]}),"\n",(0,n.jsxs)(s.li,{children:["Select ",(0,n.jsx)(s.strong,{children:"Build your own template in the editor"}),"."]}),"\n",(0,n.jsxs)(s.li,{children:["Remove the contents (JSON) in the editor and paste in the contents of ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/azure/arm/azuredeploy.json",children:(0,n.jsx)(s.code,{children:"azuredeploy.json"})})]}),"\n",(0,n.jsxs)(s.li,{children:["Select ",(0,n.jsx)(s.strong,{children:"Save"}),"."]}),"\n",(0,n.jsx)(s.li,{children:"Input provisioning parameters in the displayed user interface."}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsx)(s.p,{children:"Provision the drivers:"}),"\n",(0,n.jsxs)(s.ol,{children:["\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["Run the ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/azure/scripts/bootstrap.sh",children:"bootstrap"})," script."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["Use ",(0,n.jsx)(s.code,{children:"besu"})," for ",(0,n.jsx)(s.code,{children:"AKS_NAMESPACE"}),", and update ",(0,n.jsx)(s.code,{children:"AKS_RESOURCE_GROUP"}),", ",(0,n.jsx)(s.code,{children:"AKS_CLUSTER_NAME"}),", and ",(0,n.jsx)(s.code,{children:"AKS_MANAGED_IDENTITY"})," in the commands below to match your settings and deployed resources from step 3."]}),"\n",(0,n.jsx)(s.pre,{children:(0,n.jsx)(s.code,{className:"language-bash",children:'./scripts/bootstrap.sh "AKS_RESOURCE_GROUP" "AKS_CLUSTER_NAME" "AKS_MANAGED_IDENTITY" "AKS_NAMESPACE"\n'})}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:["You can now use your cluster and you can deploy ",(0,n.jsx)(s.a,{href:"/private-networks/tutorials/kubernetes/charts",children:"Helm charts"})," to it."]}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:s}={...(0,t.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,s,r)=>{r.d(s,{R:()=>a,x:()=>o});var n=r(96540);const t={},i=n.createContext(t);function a(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ce515f1b.10faa8ee.js b/assets/js/ce515f1b.10faa8ee.js new file mode 100644 index 00000000000..5f1068360a4 --- /dev/null +++ b/assets/js/ce515f1b.10faa8ee.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[3677],{27791:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>l,contentTitle:()=>i,default:()=>h,frontMatter:()=>o,metadata:()=>a,toc:()=>c});var n=r(74848),s=r(28453);const o={title:"Use the Quorum Explorer",sidebar_position:4,description:"Using the Quorum Explorer on a Kubernetes cluster",tags:["private networks"]},i="Use the Quorum Explorer",a={id:"private-networks/tutorials/kubernetes/quorum-explorer",title:"Use the Quorum Explorer",description:"Using the Quorum Explorer on a Kubernetes cluster",source:"@site/docs/private-networks/tutorials/kubernetes/quorum-explorer.md",sourceDirName:"private-networks/tutorials/kubernetes",slug:"/private-networks/tutorials/kubernetes/quorum-explorer",permalink:"/private-networks/tutorials/kubernetes/quorum-explorer",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/kubernetes/quorum-explorer.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Use the Quorum Explorer",sidebar_position:4,description:"Using the Quorum Explorer on a Kubernetes cluster",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Deploy charts",permalink:"/private-networks/tutorials/kubernetes/charts"},next:{title:"Maintenance",permalink:"/private-networks/tutorials/kubernetes/maintenance"}},l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Deploy the Quorum Explorer helm chart",id:"deploy-the-quorum-explorer-helm-chart",level:2},{value:"Nodes",id:"nodes",level:2},{value:"Validators",id:"validators",level:2},{value:"Explorer",id:"explorer",level:2},{value:"Contracts",id:"contracts",level:2},{value:"Wallet",id:"wallet",level:2}];function d(e){const t={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"use-the-quorum-explorer",children:"Use the Quorum Explorer"})}),"\n",(0,n.jsx)(t.p,{children:"You can use the Quorum Explorer on a Kubernetes cluster."}),"\n",(0,n.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Clone the ",(0,n.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-kubernetes",children:"Quorum-Kubernetes"})," repository"]}),"\n",(0,n.jsxs)(t.li,{children:["A ",(0,n.jsx)(t.a,{href:"/private-networks/tutorials/kubernetes/cluster",children:"running Kubernetes cluster"})]}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://kubernetes.io/docs/tasks/tools/",children:"Kubectl"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://helm.sh/docs/intro/install/",children:"Helm3"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"/private-networks/tutorials/kubernetes/charts",children:"Existing network"})}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"deploy-the-quorum-explorer-helm-chart",children:"Deploy the Quorum Explorer helm chart"}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-explorer",children:"Quorum-Explorer"})," as a lightweight blockchain explorer. The Quorum Explorer is ",(0,n.jsx)(t.strong,{children:"not"})," recommended for use in production and is intended for demonstration or development purposes only."]}),"\n",(0,n.jsxs)(t.p,{children:["The explorer can provide an overview over the whole network, such as block information, voting or removing validators from the network, and demonstrates using the ",(0,n.jsx)(t.code,{children:"SimpleStorage"})," smart contract with privacy enabled, and sending transactions between wallets in one interface."]}),"\n",(0,n.jsxs)(t.p,{children:["To use the explorer, update the ",(0,n.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-kubernetes/blob/5920caff6dd15b4ca17f760ad9e4d7d2e43b41a1/helm/values/explorer-besu.yaml",children:"Quorum-Explorer values file"})," with your node details and endpoints, and then ",(0,n.jsx)(t.a,{href:"/private-networks/tutorials/kubernetes/charts",children:"deploy"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"nodes",children:"Nodes"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"Nodes"})," page provides an overview of the nodes on the network. Select the node you would like to interact with from the drop-down on the top right, and you'll get details of the node, block height, peers, queued transactions etc."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"k8s-explorer",src:r(88591).A+"",width:"1917",height:"944"})}),"\n",(0,n.jsx)(t.h2,{id:"validators",children:"Validators"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"Validators"})," page simulates a production environment or consortium where each node individually runs API calls to vote to add a validator or remove an existing validator."]}),"\n",(0,n.jsx)(t.p,{children:"When using the buttons to remove, discard pending validators, or proposing a validator, the app sends an API request to the selected node in the drop-down only. To add or remove a validator you need to select a majority of the existing validator pool individually, and perform the vote API call by clicking the button. Each node can call a discard on the voting process during or after the validator has been added."}),"\n",(0,n.jsx)(t.p,{children:"The vote calls made from non-validator nodes have no effect on overall consensus."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"k8s-explorer-validators",src:r(72119).A+"",width:"1896",height:"887"})}),"\n",(0,n.jsx)(t.h2,{id:"explorer",children:"Explorer"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"Explorer"})," page gives you the latest blocks from the chain and the latest transactions as they occur on the network. In addition, you can search by block number or transaction hash using the respective search bar."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"k8s-explorer-explorer",src:r(17079).A+"",width:"1901",height:"889"})}),"\n",(0,n.jsx)(t.h2,{id:"contracts",children:"Contracts"}),"\n",(0,n.jsxs)(t.p,{children:["Use the ",(0,n.jsx)(t.strong,{children:"Contracts"})," page to compile and deploy a smart contract. Currently, the only contract available for deployment through the app is the ",(0,n.jsx)(t.code,{children:"SimpleStorage"})," contract. However, in time, we plan to add more contracts to that view."]}),"\n",(0,n.jsxs)(t.p,{children:["In this example, we deploy from ",(0,n.jsx)(t.code,{children:"member-1"})," and select ",(0,n.jsx)(t.code,{children:"member-1"})," and ",(0,n.jsx)(t.code,{children:"member-3"})," in the ",(0,n.jsx)(t.strong,{children:"Private For"})," multi-select. Then click on ",(0,n.jsx)(t.code,{children:"Compile"})," and ",(0,n.jsx)(t.code,{children:"Deploy"})]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"k8s-explorer-contracts-1",src:r(34735).A+"",width:"1890",height:"891"})}),"\n",(0,n.jsxs)(t.p,{children:["Once deployed, you can interact with the contract. As this is a new transaction, select ",(0,n.jsx)(t.code,{children:"member-1"})," and ",(0,n.jsx)(t.code,{children:"member-3"})," in ",(0,n.jsx)(t.strong,{children:"Interact"})," multi-select, and then click on the appropriate method call to ",(0,n.jsx)(t.code,{children:"get"})," or ",(0,n.jsx)(t.code,{children:"set"})," the value at the deployed contract address."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"k8s-explorer-contracts-set",src:r(49898).A+"",width:"1899",height:"1042"})}),"\n",(0,n.jsxs)(t.p,{children:["To test the private transaction functionality, select ",(0,n.jsx)(t.code,{children:"member-2"})," from the drop-down on the top right, you'll notice that you are unable to interact with the contract because ",(0,n.jsx)(t.code,{children:"member-2"})," was not part of the transaction. Only ",(0,n.jsx)(t.code,{children:"members-1"})," and ",(0,n.jsx)(t.code,{children:"member-3"})," responds correctly."]}),"\n",(0,n.jsx)(t.h2,{id:"wallet",children:"Wallet"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"Wallet"})," page gives you the functionality to send simple ETH transactions between accounts by providing the account's private key, the recipient's address, and transfer amount in Wei."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"k8s-explorer-wallet",src:r(91401).A+"",width:"1918",height:"891"})})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},34735:(e,t,r)=>{r.d(t,{A:()=>n});const n=r.p+"assets/images/kubernetes-explorer-contracts-1-01181eb965e9c78057dc930f48fa2090.png"},49898:(e,t,r)=>{r.d(t,{A:()=>n});const n=r.p+"assets/images/kubernetes-explorer-contracts-set-dbfe4f65b418999410a999147d16df19.png"},17079:(e,t,r)=>{r.d(t,{A:()=>n});const n=r.p+"assets/images/kubernetes-explorer-explorer-443ae4a27618574d082103bcaa740065.png"},72119:(e,t,r)=>{r.d(t,{A:()=>n});const n=r.p+"assets/images/kubernetes-explorer-validators-5bd265d7bd401c159b2852dc84533ecf.png"},91401:(e,t,r)=>{r.d(t,{A:()=>n});const n=r.p+"assets/images/kubernetes-explorer-wallet-e14f1a64b75ae0b133d676ccee8f2ec0.png"},88591:(e,t,r)=>{r.d(t,{A:()=>n});const n=r.p+"assets/images/kubernetes-explorer-41af1feb005383ef1871e47d4792c3b5.png"},28453:(e,t,r)=>{r.d(t,{R:()=>i,x:()=>a});var n=r(96540);const s={},o=n.createContext(s);function i(e){const t=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),n.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/cf53573e.3a88b895.js b/assets/js/cf53573e.3a88b895.js new file mode 100644 index 00000000000..4f298b0ea20 --- /dev/null +++ b/assets/js/cf53573e.3a88b895.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7516],{80442:(t,e,o)=>{o.r(e),o.d(e,{assets:()=>a,contentTitle:()=>i,default:()=>u,frontMatter:()=>r,metadata:()=>c,toc:()=>b});var n=o(74848),s=o(28453);const r={title:"Chatbot",sidebar_position:10,sidebar_label:"Chatbot",description:"Chatbot",tags:["public networks"]},i="Chatbot",c={id:"public-networks/chatbot",title:"Chatbot",description:"Chatbot",source:"@site/docs/public-networks/chatbot.mdx",sourceDirName:"public-networks",slug:"/public-networks/chatbot",permalink:"/public-networks/chatbot",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/chatbot.mdx",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:10,frontMatter:{title:"Chatbot",sidebar_position:10,sidebar_label:"Chatbot",description:"Chatbot",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Security disclosure policy",permalink:"/public-networks/reference/disclosure"}},a={},b=[];function l(t){const e={h1:"h1",header:"header",...(0,s.R)(),...t.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e.header,{children:(0,n.jsx)(e.h1,{id:"chatbot",children:"Chatbot"})}),"\n",(0,n.jsx)("iframe",{src:"https://docsbot-besu.prd.ai.consensys.io/?embed=true",height:"800",width:"100%"})]})}function u(t={}){const{wrapper:e}={...(0,s.R)(),...t.components};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(l,{...t})}):l(t)}},28453:(t,e,o)=>{o.d(e,{R:()=>i,x:()=>c});var n=o(96540);const s={},r=n.createContext(s);function i(t){const e=n.useContext(r);return n.useMemo((function(){return"function"==typeof t?t(e):{...e,...t}}),[e,t])}function c(t){let e;return e=t.disableParentContext?"function"==typeof t.components?t.components(s):t.components||s:i(t.components),n.createElement(r.Provider,{value:e},t.children)}}}]); \ No newline at end of file diff --git a/assets/js/d13d7343.179934d0.js b/assets/js/d13d7343.179934d0.js new file mode 100644 index 00000000000..137b4ee684c --- /dev/null +++ b/assets/js/d13d7343.179934d0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[9222],{67296:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>d});var r=t(74848),a=t(28453);const s={title:"Send concurrent private transactions",description:"Creating and sending concurrent private transactions with Besu",sidebar_position:2,tags:["private networks"]},i="Send concurrent private transactions (Deprecated)",o={id:"private-networks/how-to/send-transactions/concurrent-private-transactions",title:"Send concurrent private transactions",description:"Creating and sending concurrent private transactions with Besu",source:"@site/docs/private-networks/how-to/send-transactions/concurrent-private-transactions.md",sourceDirName:"private-networks/how-to/send-transactions",slug:"/private-networks/how-to/send-transactions/concurrent-private-transactions",permalink:"/private-networks/how-to/send-transactions/concurrent-private-transactions",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/send-transactions/concurrent-private-transactions.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Send concurrent private transactions",description:"Creating and sending concurrent private transactions with Besu",sidebar_position:2,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Create and send private transactions",permalink:"/private-networks/how-to/send-transactions/private-transactions"},next:{title:"Include revert reason",permalink:"/private-networks/how-to/send-transactions/revert-reason"}},c={},d=[];function p(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",header:"header",p:"p",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"send-concurrent-private-transactions-deprecated",children:"Send concurrent private transactions (Deprecated)"})}),"\n",(0,r.jsx)(n.admonition,{type:"caution",children:(0,r.jsxs)(n.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,r.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,r.jsxs)(n.p,{children:["Private transaction processing involves two transactions, the private transaction and the ",(0,r.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy marker transaction (PMT)"}),". The private transaction and the PMT each have their own ",(0,r.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/#nonces",children:"nonce"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["If your private transaction rate requires sending private transactions without waiting for the previous private transaction to be mined, using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gettransactioncount",children:(0,r.jsx)(n.code,{children:"eth_getTransactionCount"})})," and ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,r.jsx)(n.code,{children:"eea_sendRawTransaction"})})," may result in ",(0,r.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/#private-nonce-management",children:"incorrect nonces"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["In this case, use ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/private-transactions#priv_distributerawtransaction",children:(0,r.jsx)(n.code,{children:"priv_distributeRawTransaction"})})," instead of ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,r.jsx)(n.code,{children:"eea_sendRawTransaction"})}),"."]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["You can use ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#priv_gettransactioncount",children:(0,r.jsx)(n.code,{children:"priv_getTransactionCount"})})," or ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#priv_geteeatransactioncount",children:(0,r.jsx)(n.code,{children:"priv_getEeaTransactionCount"})})," to get the nonce for an account for the specified privacy group or participants."]})}),"\n",(0,r.jsxs)(n.p,{children:["Send the corresponding PMT using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#eth_sendrawtransaction",children:(0,r.jsx)(n.code,{children:"eth_sendRawTransaction"})}),", specifying the public PMT nonce. This method allows you to create and send the PMT yourself rather than ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,r.jsx)(n.code,{children:"eea_sendRawTransaction"})})," handling the PMT."]}),"\n",(0,r.jsxs)(n.admonition,{type:"caution",children:[(0,r.jsxs)(n.p,{children:["When using ",(0,r.jsx)(n.code,{children:"priv_distributeRawTransaction"})," to distribute transactions with consecutive nonces for the same account, the corresponding PMTs must use one account with the nonces in the same order as the private transactions."]}),(0,r.jsx)(n.p,{children:"This is to ensure that the private transactions are executed in the correct order."})]}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.a,{href:"https://github.com/ConsenSys/web3js-quorum/tree/master/example/concurrentPrivateTransactions",children:"web3js-quorum library"})," includes an example of how to send concurrent private transactions. The example uses ",(0,r.jsx)(n.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"offchain privacy groups"}),". Use ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#priv_getprivacyprecompileaddress",children:(0,r.jsx)(n.code,{children:"priv_getPrivacyPrecompileAddress"})})," to get the precompile address to specify in the ",(0,r.jsx)(n.code,{children:"to"})," field when creating the PMT."]})})]})}function h(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var r=t(96540);const a={},s=r.createContext(a);function i(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d1f22a5a.52bd66a7.js b/assets/js/d1f22a5a.52bd66a7.js new file mode 100644 index 00000000000..c780e6de6f4 --- /dev/null +++ b/assets/js/d1f22a5a.52bd66a7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6271],{24270:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>o,metadata:()=>a,toc:()=>d});var i=t(74848),s=t(28453);const o={title:"Use onchain permissioning",sidebar_position:2,description:"Use onchain permissioning allowlists",tags:["private networks"]},r="Use onchain permissioning (Deprecated)",a={id:"private-networks/how-to/use-permissioning/onchain",title:"Use onchain permissioning",description:"Use onchain permissioning allowlists",source:"@site/docs/private-networks/how-to/use-permissioning/onchain.md",sourceDirName:"private-networks/how-to/use-permissioning",slug:"/private-networks/how-to/use-permissioning/onchain",permalink:"/private-networks/how-to/use-permissioning/onchain",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/use-permissioning/onchain.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Use onchain permissioning",sidebar_position:2,description:"Use onchain permissioning allowlists",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use local permissioning",permalink:"/private-networks/how-to/use-permissioning/local"},next:{title:"Deploy to the cloud",permalink:"/private-networks/how-to/deploy/cloud"}},c={},d=[{value:"Specify the permissioning contract interface version",id:"specify-the-permissioning-contract-interface-version",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"use-onchain-permissioning-deprecated",children:"Use onchain permissioning (Deprecated)"})}),"\n",(0,i.jsx)(n.admonition,{type:"caution",children:(0,i.jsxs)(n.p,{children:["Onchain permissioning is deprecated in Besu version 24.12.0 and later. Please read this ",(0,i.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,i.jsxs)(n.p,{children:["This page contains some extra info if you're using ",(0,i.jsx)(n.a,{href:"/private-networks/concepts/permissioning/onchain",children:"onchain permissioning"}),"."]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsx)(n.p,{children:"If your node has two different IP addresses for ingress and egress (for example, if you use Kubernetes implementing a load balancer for ingress and a NAT gateway IP address for egress), add both addresses to the allowlist, using the same public key for each IP address. This will allow the node to connect."})}),"\n",(0,i.jsxs)(n.admonition,{type:"important",children:[(0,i.jsxs)(n.p,{children:["Node allowlists ",(0,i.jsx)(n.a,{href:"/public-networks/concepts/node-keys#domain-name-support",children:"support domain names"})," in enode URLs as an early access feature. Use the ",(0,i.jsx)(n.code,{children:"--Xdns-enabled"})," option to enable domain name support."]}),(0,i.jsxs)(n.p,{children:["If using Kubernetes, enable domain name support and use the ",(0,i.jsx)(n.code,{children:"--Xdns-update-enabled"})," option to ensure that Besu can connect to a container after being restarted, even if the IP address of the container changes."]})]}),"\n",(0,i.jsxs)(n.admonition,{type:"tip",children:[(0,i.jsxs)(n.p,{children:["If you add a running node, the node does not attempt to reconnect to the bootnode and synchronize until peer discovery restarts. To add an allowlisted node as a peer without waiting for peer discovery to restart, use ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#admin_addpeer",children:(0,i.jsx)(n.code,{children:"admin_addPeer"})}),"."]}),(0,i.jsxs)(n.p,{children:["If you add the node to the allowlist before starting the node, using ",(0,i.jsx)(n.code,{children:"admin_addPeer"})," is not required because peer discovery is run on node startup."]})]}),"\n",(0,i.jsxs)(n.admonition,{type:"tip",children:[(0,i.jsxs)(n.p,{children:["If nodes are not connecting as expected, set the ",(0,i.jsxs)(n.a,{href:"/public-networks/reference/cli/options#logging",children:["log level to ",(0,i.jsx)(n.code,{children:"TRACE"})]})," and search for messages containing ",(0,i.jsx)(n.code,{children:"Node permissioning"})," to identify the issue."]}),(0,i.jsxs)(n.p,{children:["Ensure the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-host",children:(0,i.jsx)(n.code,{children:"--p2p-host"})})," command line option has been correctly configured for all nodes with the externally accessible address."]}),(0,i.jsx)(n.p,{children:"If you change your network configuration, you may need to update the node allowlist."})]}),"\n",(0,i.jsx)(n.h2,{id:"specify-the-permissioning-contract-interface-version",children:"Specify the permissioning contract interface version"}),"\n",(0,i.jsxs)(n.p,{children:["Use the ",(0,i.jsx)(n.a,{href:"/private-networks/reference/cli/options#permissions-nodes-contract-version-deprecated",children:(0,i.jsx)(n.code,{children:"--permissions-nodes-contract-version"})})," command line option to specify the version of the ",(0,i.jsx)(n.a,{href:"/private-networks/concepts/permissioning/onchain#permissioning-contracts",children:"permissioning contract interface"}),". The default is 1."]}),"\n",(0,i.jsxs)(n.p,{children:["Specify the contract interface version that maps to the version of the ",(0,i.jsx)(n.a,{href:"https://entethalliance.org/technical-specifications/",children:"Enterprise Ethereum Alliance Client Specification"})," the contract interface implements."]}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{style:{textAlign:"left"}}),(0,i.jsx)(n.th,{style:{textAlign:"left"},children:"EEA Client Specification"}),(0,i.jsx)(n.th,{style:{textAlign:"left"},children:"Contract interface"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:"Version"}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:"5"}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:"1"})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{style:{textAlign:"left"},children:"Version"}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:"6"}),(0,i.jsx)(n.td,{style:{textAlign:"left"},children:"2"})]})]})]}),"\n",(0,i.jsxs)(n.p,{children:["The permissioning contracts in the ",(0,i.jsx)(n.a,{href:"https://github.com/ConsenSys/permissioning-smart-contracts",children:(0,i.jsx)(n.code,{children:"ConsenSys/permissioning-smart-contracts"})})," repository implement the version 2 contract interface."]})]})}function h(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var i=t(96540);const s={},o=i.createContext(s);function r(e){const n=i.useContext(o);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),i.createElement(o.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d4c8fb26.e0b1fd46.js b/assets/js/d4c8fb26.e0b1fd46.js new file mode 100644 index 00000000000..360d2e766cb --- /dev/null +++ b/assets/js/d4c8fb26.e0b1fd46.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5058],{10319:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>l});var i=s(74848),n=s(28453);const a={title:"Use Elastic Stack",sidebar_position:3,description:"Using Elastic Stack (ELK) with Besu",tags:["private networks"]},o="Use Elastic Stack",r={id:"private-networks/how-to/monitor/elastic-stack",title:"Use Elastic Stack",description:"Using Elastic Stack (ELK) with Besu",source:"@site/docs/private-networks/how-to/monitor/elastic-stack.md",sourceDirName:"private-networks/how-to/monitor",slug:"/private-networks/how-to/monitor/elastic-stack",permalink:"/private-networks/how-to/monitor/elastic-stack",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/monitor/elastic-stack.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Use Elastic Stack",sidebar_position:3,description:"Using Elastic Stack (ELK) with Besu",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use Grafana Loki",permalink:"/private-networks/how-to/monitor/loki"},next:{title:"Use Quorum Hibernate",permalink:"/private-networks/how-to/monitor/quorum-hibernate"}},c={},l=[];function d(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",header:"header",img:"img",li:"li",ol:"ol",p:"p",...(0,n.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"use-elastic-stack",children:"Use Elastic Stack"})}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"https://www.elastic.co/what-is/elk-stack",children:"Elastic Stack"})," (ELK) is an open-source log management platform that is available when using the ",(0,i.jsx)(t.a,{href:"/private-networks/tutorials/quickstart",children:"Developer Quickstart"}),"."]}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart/blob/b72a0f64d685c851bf8be399a8e33bbdf0e09982/files/common/filebeat/filebeat.yml",children:"Filebeat"})," configuration ingests logs and the ",(0,i.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart/blob/b72a0f64d685c851bf8be399a8e33bbdf0e09982/files/common/metricbeat/metricbeat.yml",children:"Metricbeat"})," configuration collects metrics from the nodes at regular defined intervals and outputs them to Redis for storage. Redis provides a highly available mechanism enabling storage by any of the Elastic Beats and pulled by Logstash as required."]}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart/blob/b72a0f64d685c851bf8be399a8e33bbdf0e09982/files/common/logstash/pipeline/20_besu.conf",children:"pipeline configuration"})," defines the JSON format used for Besu logs and automatically picks up any new log fields."]}),"\n",(0,i.jsx)(t.admonition,{type:"note",children:(0,i.jsxs)(t.p,{children:["The pipeline configuration must match the your log format. If using the default log format, you can use the ",(0,i.jsx)(t.a,{href:"https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html",children:"grok plugin"})," to extract the log fields."]})}),"\n",(0,i.jsx)(t.p,{children:"To see the Besu Quickstart network logs in Kibana:"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"/private-networks/tutorials/quickstart",children:"Start the Developer Quickstart with Besu"}),", selecting ELK monitoring."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Open the ",(0,i.jsx)(t.a,{href:"http://localhost:5601/app/kibana#/discover",children:(0,i.jsx)(t.code,{children:"Kibana logs address"})})," listed by the sample networks ",(0,i.jsx)(t.code,{children:"list.sh"})," script. The logs display in Kibana."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"Kibana",src:s(33620).A+"",width:"1513",height:"737"})}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},33620:(e,t,s)=>{s.d(t,{A:()=>i});const i=s.p+"assets/images/KibanaQuickstart-6c27f6f292b9d10869daeddd552aeca0.png"},28453:(e,t,s)=>{s.d(t,{R:()=>o,x:()=>r});var i=s(96540);const n={},a=i.createContext(n);function o(e){const t=i.useContext(a);return i.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function r(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:o(e.components),i.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d78c9adf.6eb2b6bb.js b/assets/js/d78c9adf.6eb2b6bb.js new file mode 100644 index 00000000000..dc755a4e19c --- /dev/null +++ b/assets/js/d78c9adf.6eb2b6bb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6567],{98126:(e,r,s)=>{s.r(r),s.d(r,{assets:()=>o,contentTitle:()=>d,default:()=>u,frontMatter:()=>i,metadata:()=>t,toc:()=>h});var n=s(74848),a=s(28453),c=s(11470),l=s(19365);const i={description:"Besu private network JSON-RPC API methods reference",toc_max_heading_level:3,tags:["private networks"]},d="Private network API methods",t={id:"private-networks/reference/api/index",title:"Private network API methods",description:"Besu private network JSON-RPC API methods reference",source:"@site/docs/private-networks/reference/api/index.md",sourceDirName:"private-networks/reference/api",slug:"/private-networks/reference/api/",permalink:"/private-networks/reference/api/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/reference/api/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{description:"Besu private network JSON-RPC API methods reference",toc_max_heading_level:3,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Private network subcommands",permalink:"/private-networks/reference/cli/subcommands"},next:{title:"Private network API objects",permalink:"/private-networks/reference/api/objects"}},o={},h=[{value:"CLIQUE methods",id:"clique-methods",level:2},{value:"clique_discard",id:"clique_discard",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"clique_getSigners",id:"clique_getsigners",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"clique_getSignerMetrics",id:"clique_getsignermetrics",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"clique_getSignersAtHash",id:"clique_getsignersathash",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"clique_proposals",id:"clique_proposals",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-4",level:4},{value:"clique_propose",id:"clique_propose",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-5",level:4},{value:"EEA methods",id:"eea-methods",level:2},{value:"eea_sendRawTransaction",id:"eea_sendrawtransaction",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-6",level:4},{value:"IBFT 2.0 methods",id:"ibft-20-methods",level:2},{value:"ibft_discardValidatorVote",id:"ibft_discardvalidatorvote",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-7",level:4},{value:"ibft_getPendingVotes",id:"ibft_getpendingvotes",level:3},{value:"Parameters",id:"parameters-8",level:4},{value:"Returns",id:"returns-8",level:4},{value:"ibft_getSignerMetrics",id:"ibft_getsignermetrics",level:3},{value:"Parameters",id:"parameters-9",level:4},{value:"Returns",id:"returns-9",level:4},{value:"ibft_getValidatorsByBlockHash",id:"ibft_getvalidatorsbyblockhash",level:3},{value:"Parameters",id:"parameters-10",level:4},{value:"Returns",id:"returns-10",level:4},{value:"ibft_getValidatorsByBlockNumber",id:"ibft_getvalidatorsbyblocknumber",level:3},{value:"Parameters",id:"parameters-11",level:4},{value:"Returns",id:"returns-11",level:4},{value:"ibft_proposeValidatorVote",id:"ibft_proposevalidatorvote",level:3},{value:"Parameters",id:"parameters-12",level:4},{value:"Returns",id:"returns-12",level:4},{value:"PERM (Permissioning) methods",id:"perm-permissioning-methods",level:2},{value:"perm_addAccountsToAllowlist",id:"perm_addaccountstoallowlist",level:3},{value:"Parameters",id:"parameters-13",level:4},{value:"Returns",id:"returns-13",level:4},{value:"perm_addNodesToAllowlist",id:"perm_addnodestoallowlist",level:3},{value:"Parameters",id:"parameters-14",level:4},{value:"Returns",id:"returns-14",level:4},{value:"perm_getAccountsAllowlist",id:"perm_getaccountsallowlist",level:3},{value:"Parameters",id:"parameters-15",level:4},{value:"Returns",id:"returns-15",level:4},{value:"perm_getNodesAllowlist",id:"perm_getnodesallowlist",level:3},{value:"Parameters",id:"parameters-16",level:4},{value:"Returns",id:"returns-16",level:4},{value:"perm_reloadPermissionsFromFile",id:"perm_reloadpermissionsfromfile",level:3},{value:"Parameters",id:"parameters-17",level:4},{value:"Returns",id:"returns-17",level:4},{value:"perm_removeAccountsFromAllowlist",id:"perm_removeaccountsfromallowlist",level:3},{value:"Parameters",id:"parameters-18",level:4},{value:"Returns",id:"returns-18",level:4},{value:"perm_removeNodesFromAllowlist",id:"perm_removenodesfromallowlist",level:3},{value:"Parameters",id:"parameters-19",level:4},{value:"Returns",id:"returns-19",level:4},{value:"PRIV methods",id:"priv-methods",level:2},{value:"priv_call",id:"priv_call",level:3},{value:"Parameters",id:"parameters-20",level:4},{value:"Returns",id:"returns-20",level:4},{value:"priv_createPrivacyGroup",id:"priv_createprivacygroup",level:3},{value:"Parameters",id:"parameters-21",level:4},{value:"Returns",id:"returns-21",level:4},{value:"priv_debugGetStateRoot",id:"priv_debuggetstateroot",level:3},{value:"Parameters",id:"parameters-22",level:4},{value:"Returns",id:"returns-22",level:4},{value:"priv_deletePrivacyGroup",id:"priv_deleteprivacygroup",level:3},{value:"Parameters",id:"parameters-23",level:4},{value:"Returns",id:"returns-23",level:4},{value:"priv_distributeRawTransaction",id:"priv_distributerawtransaction",level:3},{value:"Parameters",id:"parameters-24",level:4},{value:"Returns",id:"returns-24",level:4},{value:"priv_findPrivacyGroup",id:"priv_findprivacygroup",level:3},{value:"Parameters",id:"parameters-25",level:4},{value:"Returns",id:"returns-25",level:4},{value:"priv_getCode",id:"priv_getcode",level:3},{value:"Parameters",id:"parameters-26",level:4},{value:"Returns",id:"returns-26",level:4},{value:"priv_getEeaTransactionCount",id:"priv_geteeatransactioncount",level:3},{value:"Parameters",id:"parameters-27",level:4},{value:"Returns",id:"returns-27",level:4},{value:"priv_getFilterChanges",id:"priv_getfilterchanges",level:3},{value:"Parameters",id:"parameters-28",level:4},{value:"Returns",id:"returns-28",level:4},{value:"priv_getFilterLogs",id:"priv_getfilterlogs",level:3},{value:"Parameters",id:"parameters-29",level:4},{value:"Returns",id:"returns-29",level:4},{value:"priv_getLogs",id:"priv_getlogs",level:3},{value:"Parameters",id:"parameters-30",level:4},{value:"Returns",id:"returns-30",level:4},{value:"priv_getPrivacyPrecompileAddress",id:"priv_getprivacyprecompileaddress",level:3},{value:"Parameters",id:"parameters-31",level:4},{value:"Returns",id:"returns-31",level:4},{value:"priv_getPrivateTransaction",id:"priv_getprivatetransaction",level:3},{value:"Parameters",id:"parameters-32",level:4},{value:"Returns",id:"returns-32",level:4},{value:"priv_getTransactionCount",id:"priv_gettransactioncount",level:3},{value:"Parameters",id:"parameters-33",level:4},{value:"Returns",id:"returns-33",level:4},{value:"priv_getTransactionReceipt",id:"priv_gettransactionreceipt",level:3},{value:"Parameters",id:"parameters-34",level:4},{value:"Returns",id:"returns-34",level:4},{value:"priv_newFilter",id:"priv_newfilter",level:3},{value:"Parameters",id:"parameters-35",level:4},{value:"Returns",id:"returns-35",level:4},{value:"priv_traceTransaction",id:"priv_tracetransaction",level:3},{value:"Parameters",id:"parameters-36",level:4},{value:"Returns",id:"returns-36",level:4},{value:"priv_uninstallFilter",id:"priv_uninstallfilter",level:3},{value:"Parameters",id:"parameters-37",level:4},{value:"Returns",id:"returns-37",level:4},{value:"QBFT methods",id:"qbft-methods",level:2},{value:"qbft_discardValidatorVote",id:"qbft_discardvalidatorvote",level:3},{value:"Parameters",id:"parameters-38",level:4},{value:"Returns",id:"returns-38",level:4},{value:"qbft_getPendingVotes",id:"qbft_getpendingvotes",level:3},{value:"Parameters",id:"parameters-39",level:4},{value:"Returns",id:"returns-39",level:4},{value:"qbft_getSignerMetrics",id:"qbft_getsignermetrics",level:3},{value:"Parameters",id:"parameters-40",level:4},{value:"Returns",id:"returns-40",level:4},{value:"qbft_getValidatorsByBlockHash",id:"qbft_getvalidatorsbyblockhash",level:3},{value:"Parameters",id:"parameters-41",level:4},{value:"Returns",id:"returns-41",level:4},{value:"qbft_getValidatorsByBlockNumber",id:"qbft_getvalidatorsbyblocknumber",level:3},{value:"Parameters",id:"parameters-42",level:4},{value:"Returns",id:"returns-42",level:4},{value:"qbft_proposeValidatorVote",id:"qbft_proposevalidatorvote",level:3},{value:"Parameters",id:"parameters-43",level:4},{value:"Returns",id:"returns-43",level:4}];function p(e){const r={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"private-network-api-methods",children:"Private network API methods"})}),"\n",(0,n.jsx)(r.admonition,{title:"Important",type:"caution",children:(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["This reference contains API methods that apply to only private networks. For API methods that apply to both private and public networks, see the ",(0,n.jsx)(r.a,{href:"/public-networks/reference/api/",children:"public network API reference"}),"."]}),"\n",(0,n.jsxs)(r.li,{children:["All JSON-RPC HTTP examples use the default host and port endpoint ",(0,n.jsx)(r.code,{children:"http://127.0.0.1:8545"}),". If using the ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-http-host",children:"--rpc-http-host"})," or ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:"--rpc-http-port"})," options, update the endpoint."]}),"\n"]})}),"\n",(0,n.jsxs)(r.h2,{id:"clique-methods",children:[(0,n.jsx)(r.code,{children:"CLIQUE"})," methods"]}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"CLIQUE"})," API methods provide access to the ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/clique",children:"Clique"})," consensus engine."]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"CLIQUE"})," API methods are not enabled by default for JSON-RPC. To enable the ",(0,n.jsx)(r.code,{children:"CLIQUE"})," API methods use the ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,n.jsx)(r.code,{children:"--rpc-http-api"})})," or ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,n.jsx)(r.code,{children:"--rpc-ws-api"})})," options."]})}),"\n",(0,n.jsx)(r.h3,{id:"clique_discard",children:(0,n.jsx)(r.code,{children:"clique_discard"})}),"\n",(0,n.jsxs)(r.p,{children:["Discards a proposal to ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/clique#add-and-remove-signers",children:"add or remove a signer with the specified address"}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"address"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 20-byte address of proposed signer"]}),"\n",(0,n.jsx)(r.h4,{id:"returns",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"boolean"})," - indicates if the proposal is discarded"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"clique_discard","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"clique_discard","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"clique_getsigners",children:(0,n.jsx)(r.code,{children:"clique_getSigners"})}),"\n",(0,n.jsxs)(r.p,{children:["Lists ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/clique#adding-and-removing-signers",children:"signers for the specified block"}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-1",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"blockNumber"}),": ",(0,n.jsx)(r.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the\nstring tags ",(0,n.jsx)(r.code,{children:"latest"}),", ",(0,n.jsx)(r.code,{children:"earliest"}),", ",(0,n.jsx)(r.code,{children:"pending"}),", ",(0,n.jsx)(r.code,{children:"finalized"}),", or ",(0,n.jsx)(r.code,{children:"safe"}),", as described in\n",(0,n.jsx)(r.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"pending"})," returns the same value as ",(0,n.jsx)(r.code,{children:"latest"}),"."]})}),"\n",(0,n.jsx)(r.h4,{id:"returns-1",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"string"})," - list of 20-byte addresses of signers"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"clique_getSigners","params":["latest"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"clique_getSigners","params":["latest"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc" : "2.0",\n "id" : 1,\n "result" : [ "0x42eb768f2244c8811c63729a21a3569731535f06", "0x7ffc57839b00206d1ad20c69a1981b489f772031", "0xb279182d99e65703f0076e4812653aab85fca0f0" ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"clique_getsignermetrics",children:(0,n.jsx)(r.code,{children:"clique_getSignerMetrics"})}),"\n",(0,n.jsx)(r.p,{children:"Provides the following validator metrics for the specified range:"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"Number of blocks from each validator"}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"Block number of the last block proposed by each validator (if any proposed in the specified range)"}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"All validators present in the last block"}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-2",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"fromBlockNumber"}),": ",(0,n.jsx)(r.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one\nof the string tags ",(0,n.jsx)(r.code,{children:"latest"}),", ",(0,n.jsx)(r.code,{children:"earliest"}),", ",(0,n.jsx)(r.code,{children:"pending"}),", ",(0,n.jsx)(r.code,{children:"finalized"}),", or ",(0,n.jsx)(r.code,{children:"safe"}),", as described in\n",(0,n.jsx)(r.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"toBlockNumber"}),": ",(0,n.jsx)(r.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,n.jsx)(r.code,{children:"latest"}),", ",(0,n.jsx)(r.code,{children:"earliest"}),", ",(0,n.jsx)(r.code,{children:"pending"}),", ",(0,n.jsx)(r.code,{children:"finalized"}),", or ",(0,n.jsx)(r.code,{children:"safe"}),", as described in\n",(0,n.jsx)(r.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"pending"})," returns the same value as ",(0,n.jsx)(r.code,{children:"latest"}),"."]})}),"\n",(0,n.jsx)(r.p,{children:"If you specify:"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"No parameters, the call provides metrics for the last 100 blocks, or all blocks if there are less than 100 blocks."}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"Only the first parameter, the call provides metrics for all blocks from the block specified to the latest block."}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-2",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"objects"})," - list of validator objects"]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:["The proposer of the genesis block has address ",(0,n.jsx)(r.code,{children:"0x0000000000000000000000000000000000000000"}),"."]})}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"clique_getSignerMetrics","params":["1", "100"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"clique_getSignerMetrics","params":["1", "100"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "address": "0x7ffc57839b00206d1ad20c69a1981b489f772031",\n "proposedBlockCount": "0x21",\n "lastProposedBlockNumber": "0x61"\n },\n {\n "address": "0x42eb768f2244c8811c63729a21a3569731535f06",\n "proposedBlockCount": "0x21",\n "lastProposedBlockNumber": "0x63"\n },\n {\n "address": "0xb279182d99e65703f0076e4812653aab85fca0f0",\n "proposedBlockCount": "0x21",\n "lastProposedBlockNumber": "0x62"\n }\n ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"clique_getsignersathash",children:(0,n.jsx)(r.code,{children:"clique_getSignersAtHash"})}),"\n",(0,n.jsx)(r.p,{children:"Lists signers for the specified block."}),"\n",(0,n.jsx)(r.h4,{id:"parameters-3",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"hash"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte block hash"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-3",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"string"})," - list of 20-byte addresses of signers"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"clique_getSignersAtHash","params":["0x98b2ddb5106b03649d2d337d42154702796438b3c74fd25a5782940e84237a48"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"clique_getSignersAtHash","params":["0x98b2ddb5106b03649d2d337d42154702796438b3c74fd25a5782940e84237a48"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "0x42eb768f2244c8811c63729a21a3569731535f06",\n "0x7ffc57839b00206d1ad20c69a1981b489f772031",\n "0xb279182d99e65703f0076e4812653aab85fca0f0"\n ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"clique_proposals",children:(0,n.jsx)(r.code,{children:"clique_proposals"})}),"\n",(0,n.jsxs)(r.p,{children:["Returns ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/clique#add-and-remove-signers",children:"current proposals"}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-4",children:"Parameters"}),"\n",(0,n.jsx)(r.p,{children:"None"}),"\n",(0,n.jsx)(r.h4,{id:"returns-4",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"map"})," of ",(0,n.jsx)(r.em,{children:"strings"})," to ",(0,n.jsx)(r.em,{children:"booleans"})," - map of account addresses to corresponding boolean values indicating the proposal for each account (if ",(0,n.jsx)(r.code,{children:"true"}),", the proposal is to add a signer; if ",(0,n.jsx)(r.code,{children:"false"}),", the proposal is to remove a signer.)"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"clique_proposals","params":[], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"clique_proposals","params":[], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "0x42eb768f2244c8811c63729a21a3569731535f07": false,\n "0x12eb759f2222d7711c63729a45c3585731521d01": true\n }\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"clique_propose",children:(0,n.jsx)(r.code,{children:"clique_propose"})}),"\n",(0,n.jsxs)(r.p,{children:["Proposes to ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/clique#add-and-remove-signers",children:"add or remove a signer with the specified address"}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-5",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"address"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 20-byte address"]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"proposal"}),": ",(0,n.jsx)(r.em,{children:"boolean"})," - ",(0,n.jsx)(r.code,{children:"true"})," to propose adding signer or ",(0,n.jsx)(r.code,{children:"false"})," to propose removing signer"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-5",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"boolean"})," - ",(0,n.jsx)(r.code,{children:"true"})]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"clique_propose","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73", true], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"clique_propose","params":["0xFE3B557E8Fb62b89F4916B721be55cEb828dBd73", true], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,n.jsxs)(r.h2,{id:"eea-methods",children:[(0,n.jsx)(r.code,{children:"EEA"})," methods"]}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"EEA"})," API methods provide functionality for ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/private-transactions/",children:"private transactions"})," and ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"privacy groups"}),"."]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"EEA"})," API methods are not enabled by default for JSON-RPC. To enable the ",(0,n.jsx)(r.code,{children:"EEA"})," API methods, use the ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,n.jsx)(r.code,{children:"--rpc-http-api"})})," or ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,n.jsx)(r.code,{children:"--rpc-ws-api"})})," options."]})}),"\n",(0,n.jsx)(r.h3,{id:"eea_sendrawtransaction",children:(0,n.jsx)(r.code,{children:"eea_sendRawTransaction"})}),"\n",(0,n.jsxs)(r.p,{children:["Distributes the ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/send-transactions/private-transactions",children:"private transaction"}),", generates the ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy marker transaction"})," and submits it to the transaction pool, and returns the transaction hash of the ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy marker transaction"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["The signed transaction passed as an input parameter includes the ",(0,n.jsx)(r.code,{children:"privateFrom"}),", ",(0,n.jsxs)(r.a,{href:"/private-networks/how-to/send-transactions/private-transactions#eea-compliant-or-besu-extended-privacy",children:[(0,n.jsx)(r.code,{children:"privateFor"})," or ",(0,n.jsx)(r.code,{children:"privacyGroupId"})]}),", and ",(0,n.jsx)(r.code,{children:"restriction"})," fields."]}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"gas"})," and ",(0,n.jsx)(r.code,{children:"gasPrice"})," are used by the ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy marker transaction"})," not the private transaction itself."]}),"\n",(0,n.jsxs)(r.p,{children:["To avoid exposing your private key, create signed transactions offline and send the signed transaction data using ",(0,n.jsx)(r.code,{children:"eea_sendRawTransaction"}),"."]}),"\n",(0,n.jsxs)(r.admonition,{type:"important",children:[(0,n.jsxs)(r.p,{children:["For production systems requiring private transactions, use a network with a consensus mechanism supporting transaction finality to make sure the private state does not become inconsistent with the chain. For example, ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/ibft",children:"IBFT 2.0"})," and ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/qbft",children:"QBFT"})," provide the required finality."]}),(0,n.jsxs)(r.p,{children:["Using private transactions with ",(0,n.jsx)(r.a,{href:"/public-networks/concepts/data-storage-formats#pruning",children:"pruning"})," or ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#sync-mode",children:"fast sync"})," isn't supported."]})]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-6",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"transaction"}),": ",(0,n.jsx)(r.em,{children:"string"})," - signed RLP-encoded private transaction"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-6",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte transaction hash of the ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy marker transaction"})]}),"\n",(0,n.jsx)(r.admonition,{type:"tip",children:(0,n.jsxs)(r.p,{children:["If creating a contract, use ",(0,n.jsx)(r.a,{href:"#priv_gettransactionreceipt",children:"priv_getTransactionReceipt"})," to retrieve the contract address after the transaction is finalized."]})}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"eea_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"eea_sendRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "id": 1,\n "jsonrpc": "2.0",\n "result": "0xe670ec64341771606e55d6b4ca35a1a6b75ee3d5145a99d05921026d1527331"\n}\n'})})})]}),"\n",(0,n.jsxs)(r.h2,{id:"ibft-20-methods",children:[(0,n.jsx)(r.code,{children:"IBFT"})," 2.0 methods"]}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"IBFT"})," API methods provide access to the ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/ibft",children:"IBFT 2.0"})," consensus engine."]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"IBFT"})," API methods are not enabled by default for JSON-RPC. To enable the ",(0,n.jsx)(r.code,{children:"IBFT"})," API methods, use the ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,n.jsx)(r.code,{children:"--rpc-http-api"})})," or ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,n.jsx)(r.code,{children:"--rpc-ws-api"})})," options."]})}),"\n",(0,n.jsx)(r.h3,{id:"ibft_discardvalidatorvote",children:(0,n.jsx)(r.code,{children:"ibft_discardValidatorVote"})}),"\n",(0,n.jsxs)(r.p,{children:["Discards a proposal to ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/ibft#add-and-remove-validators",children:"add or remove a validator"})," with the specified address."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-7",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"address"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 20-byte address of proposed validator"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-7",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"boolean"})," - indicates if the proposal is discarded"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"ibft_discardValidatorVote","params":["0xef1bfb6a12794615c9b0b5a21e6741f01e570185"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"ibft_discardValidatorVote","params":["0xef1bfb6a12794615c9b0b5a21e6741f01e570185"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"ibft_getpendingvotes",children:(0,n.jsx)(r.code,{children:"ibft_getPendingVotes"})}),"\n",(0,n.jsxs)(r.p,{children:["Returns ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/ibft#add-and-remove-validators",children:"votes"})," cast in the current ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/ibft#genesis-file",children:"epoch"}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-8",children:"Parameters"}),"\n",(0,n.jsx)(r.p,{children:"None"}),"\n",(0,n.jsx)(r.h4,{id:"returns-8",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"map"})," of ",(0,n.jsx)(r.em,{children:"strings"})," to ",(0,n.jsx)(r.em,{children:"booleans"})," - map of account addresses to corresponding boolean values indicating the vote for each account; if ",(0,n.jsx)(r.code,{children:"true"}),", the vote is to add a validator. If ",(0,n.jsx)(r.code,{children:"false"}),", the proposal is to remove a validator."]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"ibft_getPendingVotes","params":[], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"ibft_getPendingVotes","params":[], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "0xef1bfb6a12794615c9b0b5a21e6741f01e570185": true,\n "0x42d4287eac8078828cf5f3486cfe601a275a49a5": true\n }\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"ibft_getsignermetrics",children:(0,n.jsx)(r.code,{children:"ibft_getSignerMetrics"})}),"\n",(0,n.jsx)(r.p,{children:"Provides the following validator metrics for the specified range:"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"Number of blocks from each validator"}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"Block number of the last block proposed by each validator (if any proposed in the specified range)"}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"All validators present in the last block of the range"}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-9",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"fromBlockNumber"}),": ",(0,n.jsx)(r.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one\nof the string tags ",(0,n.jsx)(r.code,{children:"latest"}),", ",(0,n.jsx)(r.code,{children:"earliest"}),", ",(0,n.jsx)(r.code,{children:"pending"}),", ",(0,n.jsx)(r.code,{children:"finalized"}),", or ",(0,n.jsx)(r.code,{children:"safe"}),", as described in\n",(0,n.jsx)(r.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"toBlockNumber"}),": ",(0,n.jsx)(r.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,n.jsx)(r.code,{children:"latest"}),", ",(0,n.jsx)(r.code,{children:"earliest"}),", ",(0,n.jsx)(r.code,{children:"pending"}),", ",(0,n.jsx)(r.code,{children:"finalized"}),", or ",(0,n.jsx)(r.code,{children:"safe"}),", as described in\n",(0,n.jsx)(r.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"pending"})," returns the same value as ",(0,n.jsx)(r.code,{children:"latest"}),"."]})}),"\n",(0,n.jsx)(r.p,{children:"If you specify:"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"No parameters, the call provides metrics for the last 100 blocks, or all blocks if there are less than 100 blocks."}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"Only the first parameter, the call provides metrics for all blocks from the block specified to the latest block."}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-9",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"objects"})," - list of validator objects"]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:["The proposer of the genesis block has address ",(0,n.jsx)(r.code,{children:"0x0000000000000000000000000000000000000000"}),"."]})}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"ibft_getSignerMetrics","params":["1", "100"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"ibft_getSignerMetrics","params":["1", "100"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "address": "0x7ffc57839b00206d1ad20c69a1981b489f772031",\n "proposedBlockCount": "0x21",\n "lastProposedBlockNumber": "0x61"\n },\n {\n "address": "0x42eb768f2244c8811c63729a21a3569731535f06",\n "proposedBlockCount": "0x21",\n "lastProposedBlockNumber": "0x63"\n },\n {\n "address": "0xb279182d99e65703f0076e4812653aab85fca0f0",\n "proposedBlockCount": "0x21",\n "lastProposedBlockNumber": "0x62"\n }\n ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"ibft_getvalidatorsbyblockhash",children:(0,n.jsx)(r.code,{children:"ibft_getValidatorsByBlockHash"})}),"\n",(0,n.jsx)(r.p,{children:"Lists the validators defined in the specified block."}),"\n",(0,n.jsx)(r.h4,{id:"parameters-10",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"block"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte block hash"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-10",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"strings"})," - list of validator addresses"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"ibft_getValidatorsByBlockHash","params":["0xbae7d3feafd743343b9a4c578cab5e5d65eb735f6855fb845c00cab356331256"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"ibft_getValidatorsByBlockHash","params":["0xbae7d3feafd743343b9a4c578cab5e5d65eb735f6855fb845c00cab356331256"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "0x42d4287eac8078828cf5f3486cfe601a275a49a5",\n "0xb1b2bc9582d2901afdc579f528a35ca41403fa85",\n "0xef1bfb6a12794615c9b0b5a21e6741f01e570185"\n ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"ibft_getvalidatorsbyblocknumber",children:(0,n.jsx)(r.code,{children:"ibft_getValidatorsByBlockNumber"})}),"\n",(0,n.jsx)(r.p,{children:"Lists the validators defined in the specified block."}),"\n",(0,n.jsx)(r.h4,{id:"parameters-11",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"blockNumber"}),": ",(0,n.jsx)(r.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the\nstring tags ",(0,n.jsx)(r.code,{children:"latest"}),", ",(0,n.jsx)(r.code,{children:"earliest"}),", ",(0,n.jsx)(r.code,{children:"pending"}),", ",(0,n.jsx)(r.code,{children:"finalized"}),", or ",(0,n.jsx)(r.code,{children:"safe"}),", as described in\n",(0,n.jsx)(r.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"pending"})," returns the same value as ",(0,n.jsx)(r.code,{children:"latest"}),"."]})}),"\n",(0,n.jsx)(r.h4,{id:"returns-11",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"strings"})," - list of validator addresses"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"ibft_getValidatorsByBlockNumber","params":["latest"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"ibft_getValidatorsByBlockNumber","params":["latest"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "0x42d4287eac8078828cf5f3486cfe601a275a49a5",\n "0xb1b2bc9582d2901afdc579f528a35ca41403fa85",\n "0xef1bfb6a12794615c9b0b5a21e6741f01e570185"\n ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"ibft_proposevalidatorvote",children:(0,n.jsx)(r.code,{children:"ibft_proposeValidatorVote"})}),"\n",(0,n.jsxs)(r.p,{children:["Proposes to ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/ibft#add-and-remove-validators",children:"add or remove a validator"})," with the specified address."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-12",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"address"}),": ",(0,n.jsx)(r.em,{children:"string"})," - account address"]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"proposal"}),": ",(0,n.jsx)(r.em,{children:"boolean"})," - ",(0,n.jsx)(r.code,{children:"true"})," to propose adding validator or ",(0,n.jsx)(r.code,{children:"false"})," to propose removing validator"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-12",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"boolean"})," - ",(0,n.jsx)(r.code,{children:"true"})]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"ibft_proposeValidatorVote","params":["42d4287eac8078828cf5f3486cfe601a275a49a5",true], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"ibft_proposeValidatorVote","params":["42d4287eac8078828cf5f3486cfe601a275a49a5",true], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,n.jsxs)(r.h2,{id:"perm-permissioning-methods",children:[(0,n.jsx)(r.code,{children:"PERM"})," (Permissioning) methods"]}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"PERM"})," API methods provide permissioning functionality. Use these methods for ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/use-permissioning/local",children:"local permissioning"})," only."]}),"\n",(0,n.jsx)(r.admonition,{type:"important",children:(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"PERM"})," API methods are not enabled by default for JSON-RPC. To enable the ",(0,n.jsx)(r.code,{children:"PERM"})," API methods, use the ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,n.jsx)(r.code,{children:"--rpc-http-api"})})," or ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,n.jsx)(r.code,{children:"--rpc-ws-api"})})," CLI options."]})}),"\n",(0,n.jsx)(r.h3,{id:"perm_addaccountstoallowlist",children:(0,n.jsx)(r.code,{children:"perm_addAccountsToAllowlist"})}),"\n",(0,n.jsxs)(r.p,{children:["Adds accounts (participants) to the ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/use-permissioning/local#account-permissioning",children:"accounts permission list"}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-13",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"addresses"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"strings"})," - list of account addresses"]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsx)(r.p,{children:"The parameters list contains a list which is why the account addresses are enclosed by double square brackets."})}),"\n",(0,n.jsx)(r.h4,{id:"returns-13",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"string"})," - ",(0,n.jsx)(r.code,{children:"Success"})," or ",(0,n.jsx)(r.code,{children:"error"})," (errors include attempting to add accounts already on the allowlist and including invalid account addresses.)"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"perm_addAccountsToAllowlist","params":[["0xb9b81ee349c3807e46bc71aa2632203c5b462032", "0xb9b81ee349c3807e46bc71aa2632203c5b462034"]], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"perm_addAccountsToAllowlist","params":[["0xb9b81ee349c3807e46bc71aa2632203c5b462032", "0xb9b81ee349c3807e46bc71aa2632203c5b462034"]], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "Success"\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"perm_addnodestoallowlist",children:(0,n.jsx)(r.code,{children:"perm_addNodesToAllowlist"})}),"\n",(0,n.jsxs)(r.p,{children:["Adds nodes to the ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/use-permissioning/local#node-allowlisting",children:"nodes allowlist"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["To use domain names in enode URLs, ensure you ",(0,n.jsx)(r.a,{href:"/public-networks/concepts/node-keys#domain-name-support",children:"enable DNS support"})," to avoid receiving a ",(0,n.jsx)(r.code,{children:"request contains an invalid node"})," error."]}),"\n",(0,n.jsx)(r.admonition,{type:"warning",children:(0,n.jsx)(r.p,{children:"Enode URL domain name support is an early access feature."})}),"\n",(0,n.jsx)(r.h4,{id:"parameters-14",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"enodes"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"strings"})," - list of ",(0,n.jsx)(r.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URLs"})]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsx)(r.p,{children:"The parameters list contains a list which is why the enode URLs are enclosed by double square brackets."})}),"\n",(0,n.jsx)(r.h4,{id:"returns-14",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"string"})," - ",(0,n.jsx)(r.code,{children:"Success"})," or ",(0,n.jsx)(r.code,{children:"error"}),"; errors include attempting to add nodes already on the allowlist or including invalid enode URLs."]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"perm_addNodesToAllowlist","params":[["enode://7e4ef30e9ec683f26ad76ffca5b5148fa7a6575f4cfad4eb0f52f9c3d8335f4a9b6f9e66fcc73ef95ed7a2a52784d4f372e7750ac8ae0b544309a5b391a23dd7@127.0.0.1:30303","enode://2feb33b3c6c4a8f77d84a5ce44954e83e5f163e7a65f7f7a7fec499ceb0ddd76a46ef635408c513d64c076470eac86b7f2c8ae4fcd112cb28ce82c0d64ec2c94@127.0.0.1:30304"]], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"perm_addNodesToAllowlist","params":[["enode://7e4ef30e9ec683f26ad76ffca5b5148fa7a6575f4cfad4eb0f52f9c3d8335f4a9b6f9e66fcc73ef95ed7a2a52784d4f372e7750ac8ae0b544309a5b391a23dd7@127.0.0.1:30303","enode://2feb33b3c6c4a8f77d84a5ce44954e83e5f163e7a65f7f7a7fec499ceb0ddd76a46ef635408c513d64c076470eac86b7f2c8ae4fcd112cb28ce82c0d64ec2c94@127.0.0.1:30304"]], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "Success"\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"perm_getaccountsallowlist",children:(0,n.jsx)(r.code,{children:"perm_getAccountsAllowlist"})}),"\n",(0,n.jsxs)(r.p,{children:["Lists accounts (participants) in the ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/use-permissioning/local#account-permissioning",children:"accounts permissions list"}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-15",children:"Parameters"}),"\n",(0,n.jsx)(r.p,{children:"None"}),"\n",(0,n.jsx)(r.h4,{id:"returns-15",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"strings"})," - list of accounts (participants) in the accounts allowlist"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"perm_getAccountsAllowlist","params":[], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"perm_getAccountsAllowlist","params":[], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "0x0000000000000000000000000000000000000009",\n "0xb9b81ee349c3807e46bc71aa2632203c5b462033"\n ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"perm_getnodesallowlist",children:(0,n.jsx)(r.code,{children:"perm_getNodesAllowlist"})}),"\n",(0,n.jsxs)(r.p,{children:["Lists nodes in the ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/use-permissioning/local#node-allowlisting",children:"nodes allowlist"}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-16",children:"Parameters"}),"\n",(0,n.jsx)(r.p,{children:"None"}),"\n",(0,n.jsx)(r.h4,{id:"returns-16",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"strings"})," - ",(0,n.jsx)(r.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URLs"})," of nodes in the nodes allowlist"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"perm_getNodesAllowlist","params":[], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"perm_getNodesAllowlist","params":[], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "enode://7b61d5ee4b44335873e6912cb5dd3e3877c860ba21417c9b9ef1f7e500a82213737d4b269046d0669fb2299a234ca03443f25fe5f706b693b3669e5c92478ade@127.0.0.1:30305",\n "enode://2feb33b3c6c4a8f77d84a5ce44954e83e5f163e7a65f7f7a7fec499ceb0ddd76a46ef635408c513d64c076470eac86b7f2c8ae4fcd112cb28ce82c0d64ec2c94@127.0.0.1:30304"\n ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"perm_reloadpermissionsfromfile",children:(0,n.jsx)(r.code,{children:"perm_reloadPermissionsFromFile"})}),"\n",(0,n.jsxs)(r.p,{children:["Reloads the accounts and nodes allowlists from the ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/use-permissioning/local#permissions-configuration-file",children:"permissions configuration file"}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-17",children:"Parameters"}),"\n",(0,n.jsx)(r.p,{children:"None"}),"\n",(0,n.jsx)(r.h4,{id:"returns-17",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"string"})," - ",(0,n.jsx)(r.code,{children:"Success"}),", or ",(0,n.jsx)(r.code,{children:"error"})," if the permissions configuration file is not valid"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"perm_reloadPermissionsFromFile","params":[], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"perm_reloadPermissionsFromFile","params":[], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "Success"\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"perm_removeaccountsfromallowlist",children:(0,n.jsx)(r.code,{children:"perm_removeAccountsFromAllowlist"})}),"\n",(0,n.jsxs)(r.p,{children:["Removes accounts (participants) from the ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/use-permissioning/local#account-permissioning",children:"accounts permissions list"}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-18",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"addresses"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"strings"})," - list of account addresses"]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsx)(r.p,{children:"The parameters list contains a list which is why the account addresses are enclosed by double square brackets."})}),"\n",(0,n.jsx)(r.h4,{id:"returns-18",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"string"})," - ",(0,n.jsx)(r.code,{children:"Success"})," or ",(0,n.jsx)(r.code,{children:"error"})," (errors include attempting to remove accounts not on the allowlist and including invalid account addresses.)"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"perm_removeAccountsFromAllowlist","params":[["0xb9b81ee349c3807e46bc71aa2632203c5b462032", "0xb9b81ee349c3807e46bc71aa2632203c5b462034"]], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"perm_removeAccountsFromAllowlist","params":[["0xb9b81ee349c3807e46bc71aa2632203c5b462032", "0xb9b81ee349c3807e46bc71aa2632203c5b462034"]], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "Success"\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"perm_removenodesfromallowlist",children:(0,n.jsx)(r.code,{children:"perm_removeNodesFromAllowlist"})}),"\n",(0,n.jsxs)(r.p,{children:["Removes nodes from the ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/use-permissioning/local#node-allowlisting",children:"nodes allowlist"}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-19",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"enodes"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"strings"})," - list of ",(0,n.jsx)(r.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URLs"})]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsx)(r.p,{children:"The parameters list contains a list which is why the enode URLs are enclosed by double square brackets."})}),"\n",(0,n.jsx)(r.h4,{id:"returns-19",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"string"})," - ",(0,n.jsx)(r.code,{children:"Success"})," or ",(0,n.jsx)(r.code,{children:"error"})," (errors include attempting to remove nodes not on the allowlist and including invalid enode URLs.)"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"perm_removeNodesFromAllowlist","params":[["enode://7e4ef30e9ec683f26ad76ffca5b5148fa7a6575f4cfad4eb0f52f9c3d8335f4a9b6f9e66fcc73ef95ed7a2a52784d4f372e7750ac8ae0b544309a5b391a23dd7@127.0.0.1:30303","enode://2feb33b3c6c4a8f77d84a5ce44954e83e5f163e7a65f7f7a7fec499ceb0ddd76a46ef635408c513d64c076470eac86b7f2c8ae4fcd112cb28ce82c0d64ec2c94@127.0.0.1:30304"]], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"perm_removeNodesFromAllowlist","params":[["enode://7e4ef30e9ec683f26ad76ffca5b5148fa7a6575f4cfad4eb0f52f9c3d8335f4a9b6f9e66fcc73ef95ed7a2a52784d4f372e7750ac8ae0b544309a5b391a23dd7@127.0.0.1:30303","enode://2feb33b3c6c4a8f77d84a5ce44954e83e5f163e7a65f7f7a7fec499ceb0ddd76a46ef635408c513d64c076470eac86b7f2c8ae4fcd112cb28ce82c0d64ec2c94@127.0.0.1:30304"]], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "Success"\n}\n'})})})]}),"\n",(0,n.jsxs)(r.h2,{id:"priv-methods",children:[(0,n.jsx)(r.code,{children:"PRIV"})," methods"]}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"PRIV"})," API methods provide functionality for ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/private-transactions/",children:"private transactions"})," and ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"privacy groups"}),"."]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"PRIV"})," API methods are not enabled by default for JSON-RPC. To enable the ",(0,n.jsx)(r.code,{children:"PRIV"})," API methods, use the ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,n.jsx)(r.code,{children:"--rpc-http-api"})})," or ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,n.jsx)(r.code,{children:"--rpc-ws-api"})})," options."]})}),"\n",(0,n.jsx)(r.h3,{id:"priv_call",children:(0,n.jsx)(r.code,{children:"priv_call"})}),"\n",(0,n.jsx)(r.p,{children:"Invokes a private contract function locally and does not change the privacy group state."}),"\n",(0,n.jsxs)(r.p,{children:["For private contracts, ",(0,n.jsx)(r.code,{children:"priv_call"})," is the same as ",(0,n.jsx)(r.a,{href:"/public-networks/reference/api/#eth_call",children:(0,n.jsx)(r.code,{children:"eth_call"})})," for public contracts."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-20",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"privacyGroupId"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"privacy Group ID"})]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"call"}),": ",(0,n.jsx)(r.em,{children:"object"})," - ",(0,n.jsx)(r.a,{href:"/public-networks/reference/api/objects#transaction-call-object",children:"transaction call object"})]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"blockNumber"}),": ",(0,n.jsx)(r.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the\nstring tags ",(0,n.jsx)(r.code,{children:"latest"}),", ",(0,n.jsx)(r.code,{children:"earliest"}),", ",(0,n.jsx)(r.code,{children:"pending"}),", ",(0,n.jsx)(r.code,{children:"finalized"}),", or ",(0,n.jsx)(r.code,{children:"safe"}),", as described in\n",(0,n.jsx)(r.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"pending"})," returns the same value as ",(0,n.jsx)(r.code,{children:"latest"}),"."]})}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-20",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"data"})," - return value of the executed contract"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"priv_call","params":["tb8NVyQqZnHNegf/3mYsyB+HEud4SPWn90rz3GoskRw=", {"to":"0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13","data": "0x3fa4f245"}, "latest"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"priv_call","params":["tb8NVyQqZnHNegf/3mYsyB+HEud4SPWn90rz3GoskRw=", {"to":"0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13","data": "0x3fa4f245"}, "latest"],"id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x0000000000000000000000000000000000000000000000000000000000000001"\n}\n'})})}),(0,n.jsx)(l.A,{value:"curl GraphQL",label:"curl GraphQL",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST -H "Content-Type: application/json" --data \'{ "query": "{block {number call (data : {from : \\"0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b\\", to: \\"0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13\\", data :\\"0x12a7b914\\"}){data status}}}"}\' http://localhost:8547/graphql\n'})})}),(0,n.jsx)(l.A,{value:"GraphQL",label:"GraphQL",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{\n block {\n number\n call(data: {from: "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b", to: "0x69498dd54bd25aa0c886cf1f8b8ae0856d55ff13", data: "0x12a7b914"}) {\n data\n status\n }\n }\n}\n'})})}),(0,n.jsx)(l.A,{value:"GraphQL result",label:"GraphQL result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "data": {\n "block": {\n "number": 17449,\n "call": {\n "data": "0x",\n "status": 1\n }\n }\n }\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_createprivacygroup",children:(0,n.jsx)(r.code,{children:"priv_createPrivacyGroup"})}),"\n",(0,n.jsxs)(r.p,{children:["Creates a group of nodes, specified by their ",(0,n.jsx)(r.a,{href:"https://docs.tessera.consensys.net/",children:"Tessera"})," public key."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-21",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"options"}),": ",(0,n.jsx)(r.em,{children:"object"})," - request options object with the following fields:"]}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"addresses"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"strings"})," - list of nodes specified by ",(0,n.jsx)(r.a,{href:"https://docs.tessera.consensys.net/",children:"Tessera"})," public keys"]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"name"}),": ",(0,n.jsx)(r.em,{children:"string"})," - (optional) privacy group name"]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"description"}),": ",(0,n.jsx)(r.em,{children:"string"})," - (optional) privacy group description"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-21",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"string"})," - privacy group ID"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method": "priv_createPrivacyGroup", "params": [{"addresses":["sTZpbQhcOfd9ZaFDnC00e/N2Ofv9p4/ZTBbEeVtXJ3E=","quhb1pQPGN1w8ZSZSyiIfncEAlVY/M/rauSyQ5wVMRE="],"name":"Group A","description":"Description Group A"}],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method": "priv_createPrivacyGroup", "params": [{"addresses":["sTZpbQhcOfd9ZaFDnC00e/N2Ofv9p4/ZTBbEeVtXJ3E=","quhb1pQPGN1w8ZSZSyiIfncEAlVY/M/rauSyQ5wVMRE="],"name":"Group A","description":"Description Group A"}],"id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "ewuTVoc5nlvWMwTFdRRK/wvV0dcyQo/Pauvx5bNEbTk="\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_debuggetstateroot",children:(0,n.jsx)(r.code,{children:"priv_debugGetStateRoot"})}),"\n",(0,n.jsx)(r.p,{children:"Returns the state root of the specified privacy group at the specified block."}),"\n",(0,n.jsx)(r.h4,{id:"parameters-22",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"privacyGroupId"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"privacy Group ID"})]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"blockNumber"}),": ",(0,n.jsx)(r.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the\nstring tags ",(0,n.jsx)(r.code,{children:"latest"}),", ",(0,n.jsx)(r.code,{children:"earliest"}),", ",(0,n.jsx)(r.code,{children:"pending"}),", ",(0,n.jsx)(r.code,{children:"finalized"}),", or ",(0,n.jsx)(r.code,{children:"safe"}),", as described in\n",(0,n.jsx)(r.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"pending"})," returns the same value as ",(0,n.jsx)(r.code,{children:"latest"}),"."]})}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-22",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte state root"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"priv_debugGetStateRoot","params":["xJdxvWOEmrs2MCkKWlgArTzWIXFfU/tmVxI3EKssVTk=","latest"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"priv_debugGetStateRoot","params":["xJdxvWOEmrs2MCkKWlgArTzWIXFfU/tmVxI3EKssVTk=","latest"],"id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_deleteprivacygroup",children:(0,n.jsx)(r.code,{children:"priv_deletePrivacyGroup"})}),"\n",(0,n.jsx)(r.p,{children:"Deletes the specified privacy group."}),"\n",(0,n.jsx)(r.h4,{id:"parameters-23",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"privacyGroupId"}),": ",(0,n.jsx)(r.em,{children:"string"})," - privacy group ID"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-23",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"string"})," - deleted privacy group ID"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"priv_deletePrivacyGroup","params":["ewuTVoc5nlvWMwTFdRRK/wvV0dcyQo/Pauvx5bNEbTk="],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"priv_deletePrivacyGroup","params":["ewuTVoc5nlvWMwTFdRRK/wvV0dcyQo/Pauvx5bNEbTk="],"id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 53,\n "result": "ewuTVoc5nlvWMwTFdRRK/wvV0dcyQo/Pauvx5bNEbTk="\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_distributerawtransaction",children:(0,n.jsx)(r.code,{children:"priv_distributeRawTransaction"})}),"\n",(0,n.jsxs)(r.p,{children:["Distributes a signed, RLP encoded ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/send-transactions/private-transactions",children:"private transaction"}),"."]}),"\n",(0,n.jsx)(r.admonition,{type:"tip",children:(0,n.jsxs)(r.p,{children:["If you want to sign the ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/use-privacy/sign-pmts",children:"privacy marker transaction"})," outside of Besu, use ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/send-transactions/private-transactions#priv_distributerawtransaction",children:(0,n.jsx)(r.code,{children:"priv_distributeRawTransaction"})})," instead of ",(0,n.jsx)(r.a,{href:"#eea_sendrawtransaction",children:(0,n.jsx)(r.code,{children:"eea_sendRawTransaction"})}),"."]})}),"\n",(0,n.jsx)(r.h4,{id:"parameters-24",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"transaction"}),": ",(0,n.jsx)(r.em,{children:"string"})," - signed RLP-encoded private transaction"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-24",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte enclave key (the enclave key is a pointer to the private transaction in ",(0,n.jsx)(r.a,{href:"https://docs.tessera.consensys.net/",children:"Tessera"}),".)"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"priv_distributeRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"priv_distributeRawTransaction","params": ["0xf869018203e882520894f17f52151ebef6c7334fad080c5704d77216b732881bc16d674ec80000801ba02da1c48b670996dcb1f447ef9ef00b33033c48a4fe938f420bec3e56bfd24071a062e0aa78a81bf0290afbc3a9d8e9a068e6d74caa66c5e0fa8a46deaae96b0833"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0xfd0d90ab824574abc19c0776ca0210e764561d0ef6d621f2bbbea316eccfe56b"\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_findprivacygroup",children:(0,n.jsx)(r.code,{children:"priv_findPrivacyGroup"})}),"\n",(0,n.jsx)(r.p,{children:"Returns a list of privacy groups containing only the listed members. For example, if the listed members are A and B, a privacy group containing A, B, and C is not returned."}),"\n",(0,n.jsx)(r.h4,{id:"parameters-25",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"members"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"strings"})," - members specified by ",(0,n.jsx)(r.a,{href:"https://docs.tessera.consensys.net/",children:"Tessera"})," public keys"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-25",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"objects"})," - privacy group objects containing only the specified members; privacy groups are ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups#enterprise-ethereum-alliance-privacy",children:"EEA-compliant"})," or ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups#besu-extended-privacy",children:"Besu-extended"})," with types:"]}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"LEGACY"})," for EEA-compliant groups."]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"PANTHEON"})," for Besu-extended groups."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc": "2.0","method": "priv_findPrivacyGroup","params": [["negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=", "g59BmTeJIn7HIcnq8VQWgyh/pDbvbt2eyP0Ii60aDDw="]],"id": 1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc": "2.0","method": "priv_findPrivacyGroup","params": [["negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=", "g59BmTeJIn7HIcnq8VQWgyh/pDbvbt2eyP0Ii60aDDw="]],"id": 1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "privacyGroupId": "GpK3ErNO0xF27T0sevgkJ3+4qk9Z+E3HtXYxcKIBKX8=",\n "name": "Group B",\n "description": "Description of Group B",\n "type": "PANTHEON",\n "members": [\n "negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=",\n "g59BmTeJIn7HIcnq8VQWgyh/pDbvbt2eyP0Ii60aDDw="\n ]\n }\n ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_getcode",children:(0,n.jsx)(r.code,{children:"priv_getCode"})}),"\n",(0,n.jsx)(r.p,{children:"Returns the code of the private smart contract at the specified address. Compiled smart contract code is stored as a hexadecimal value."}),"\n",(0,n.jsx)(r.h4,{id:"parameters-26",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"privacyGroupId"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"privacy Group ID"})]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"address"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 20-byte contract address"]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"blockNumber"}),": ",(0,n.jsx)(r.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the\nstring tags ",(0,n.jsx)(r.code,{children:"latest"}),", ",(0,n.jsx)(r.code,{children:"earliest"}),", ",(0,n.jsx)(r.code,{children:"pending"}),", ",(0,n.jsx)(r.code,{children:"finalized"}),", or ",(0,n.jsx)(r.code,{children:"safe"}),", as described in\n",(0,n.jsx)(r.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"pending"})," returns the same value as ",(0,n.jsx)(r.code,{children:"latest"}),"."]})}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-26",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"data"})," - code stored at the specified address"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"priv_getCode","params":["1lJxSIP4JOp6uRn9wYsPeWwqoOP1c4nPQjylB4FExUA=", "0xeaf1c1bd00ef0bec5e39fba81740f1c5d05aa201", "latest"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"priv_getCode","params":["1lJxSIP4JOp6uRn9wYsPeWwqoOP1c4nPQjylB4FExUA=", "0xeaf1c1bd00ef0bec5e39fba81740f1c5d05aa201", "latest"],"id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x60806040526004361060485763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633fa4f2458114604d57806355241077146071575b600080fd5b348015605857600080fd5b50605f6088565b60408051918252519081900360200190f35b348015607c57600080fd5b506086600435608e565b005b60005481565b60008190556040805182815290517f199cd93e851e4c78c437891155e2112093f8f15394aa89dab09e38d6ca0727879181900360200190a1505600a165627a7a723058209d8929142720a69bde2ab3bfa2da6217674b984899b62753979743c0470a2ea70029"\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_geteeatransactioncount",children:(0,n.jsx)(r.code,{children:"priv_getEeaTransactionCount"})}),"\n",(0,n.jsxs)(r.p,{children:["Returns the private transaction count for the specified account and ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups#enterprise-ethereum-alliance-privacy",children:"group of sender and recipients"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["::caution important\nIf sending more than one transaction to be mined in the same block (that is, you are not\nwaiting for the transaction receipt), you must calculate the private transaction nonce outside\nBesu instead of using ",(0,n.jsx)(r.code,{children:"priv_getEeaTransactionCount"}),".\n:::"]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-27",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"address"}),": ",(0,n.jsx)(r.em,{children:"string"})," - account address"]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"sender"}),": ",(0,n.jsx)(r.em,{children:"string"})," - base64-encoded Tessera address of the sender"]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"recipients"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"strings"})," - base64-encoded Tessera addresses of recipients"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-27",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"string"})," - integer representing the number of private transactions sent from the address to the specified group of sender and recipients"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"priv_getEeaTransactionCount","params":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "GGilEkXLaQ9yhhtbpBT03Me9iYa7U/mWXxrJhnbl1XY=", ["KkOjNLmCI6r+mICrC6l+XuEDjFEzQllaMQMpWLl4y1s=","eLb69r4K8/9WviwlfDiZ4jf97P9czyS3DkKu0QYGLjg="]], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"priv_getEeaTransactionCount","params":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "GGilEkXLaQ9yhhtbpBT03Me9iYa7U/mWXxrJhnbl1XY=", ["KkOjNLmCI6r+mICrC6l+XuEDjFEzQllaMQMpWLl4y1s=","eLb69r4K8/9WviwlfDiZ4jf97P9czyS3DkKu0QYGLjg="]], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x1"\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_getfilterchanges",children:(0,n.jsx)(r.code,{children:"priv_getFilterChanges"})}),"\n",(0,n.jsx)(r.p,{children:"Polls the specified filter for a private contract and returns an array of changes that have occurred since the last poll."}),"\n",(0,n.jsxs)(r.p,{children:["Filters for private contracts can only be created by ",(0,n.jsx)(r.a,{href:"#priv_newfilter",children:(0,n.jsx)(r.code,{children:"priv_newFilter"})})," so unlike ",(0,n.jsx)(r.a,{href:"/public-networks/reference/api/#eth_getfilterchanges",children:(0,n.jsx)(r.code,{children:"eth_getFilterChanges"})}),", ",(0,n.jsx)(r.code,{children:"priv_getFilterChanges"})," always returns an array of log objects or an empty list."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-28",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"privacyGroupId"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"privacy Group ID"})]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"filterId"}),": ",(0,n.jsx)(r.em,{children:"string"})," - filter ID"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-28",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"objects"})," - list of ",(0,n.jsx)(r.a,{href:"/public-networks/reference/api/objects#log-object",children:"log objects"}),", or an empty list if nothing has changed since the last poll"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc": "2.0","method": "priv_getFilterChanges","params": ["4rFldHM792LeP/e2WPkTXZedjwKuTr/KwCFTt6mBbkI=","0x4a35b92809d73f4f53a2355d62125442"],"id": 1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc": "2.0","method": "priv_getFilterChanges","params": ["4rFldHM792LeP/e2WPkTXZedjwKuTr/KwCFTt6mBbkI=","0x4a35b92809d73f4f53a2355d62125442"],"id": 1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x4d0",\n "blockHash": "0x1c8200667a869e99b945374c37277b5ee7a7ae67943e13c82563381387553dbb",\n "transactionHash": "0xb1966b9b372ba68952f48f3a3e78f036f5ae82ceca2de972a782d07fb88f6d88",\n "transactionIndex": "0x0",\n "address": "0x991cc548c154b2953cc48c02f782e1314097dfbb",\n "data": "0x",\n "topics": [\n "0x85bea11d86cefb165374e0f727bacf21dc2f4ea816493981ecf72dcfb212a410",\n "0x0000000000000000000000000000000000000000000000000000000000000002"\n ]\n }\n ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_getfilterlogs",children:(0,n.jsx)(r.code,{children:"priv_getFilterLogs"})}),"\n",(0,n.jsxs)(r.p,{children:["Returns an array of ",(0,n.jsx)(r.a,{href:"/public-networks/concepts/events-and-logs",children:"logs"})," for the specified filter for a private contract."]}),"\n",(0,n.jsxs)(r.p,{children:["For private contracts, ",(0,n.jsx)(r.code,{children:"priv_getFilterLogs"})," is the same as ",(0,n.jsx)(r.a,{href:"/public-networks/reference/api/#eth_getfilterlogs",children:(0,n.jsx)(r.code,{children:"eth_getFilterLogs"})})," for public contracts except there's no ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#auto-log-bloom-caching-enabled",children:"automatic log bloom caching"})," for private contracts."]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"priv_getFilterLogs"})," is only used for filters created with ",(0,n.jsx)(r.a,{href:"#priv_newfilter",children:(0,n.jsx)(r.code,{children:"priv_newFilter"})}),". To specify a filter object and get logs without creating a filter, use ",(0,n.jsx)(r.a,{href:"#priv_getlogs",children:(0,n.jsx)(r.code,{children:"priv_getLogs"})}),"."]})}),"\n",(0,n.jsx)(r.h4,{id:"parameters-29",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"privacyGroupId"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"privacy Group ID"})]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"filterId"}),": ",(0,n.jsx)(r.em,{children:"string"})," - filter ID"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-29",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"objects"})," - list of ",(0,n.jsx)(r.a,{href:"/public-networks/reference/api/objects#log-object",children:"log objects"})]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc": "2.0","method": "priv_getFilterLogs","params":["4rFldHM792LeP/e2WPkTXZedjwKuTr/KwCFTt6mBbkI=","0x4a35b92809d73f4f53a2355d62125442"],"id": 1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc": "2.0","method": "priv_getFilterLogs","params":["4rFldHM792LeP/e2WPkTXZedjwKuTr/KwCFTt6mBbkI=","0x4a35b92809d73f4f53a2355d62125442"],"id": 1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x493",\n "blockHash": "0xd9cb3a852e1e02c95f035a2e32d57f82c10cab61faa3e8f5c010adf979bb4786",\n "transactionHash": "0x78866dc51fdf189d8cca74f6a8fe54f172348fbd2163bbe80fa8b106cfc7deb4",\n "transactionIndex": "0x0",\n "address": "0x991cc548c154b2953cc48c02f782e1314097dfbb",\n "data": "0x",\n "topics": [\n "0x85bea11d86cefb165374e0f727bacf21dc2f4ea816493981ecf72dcfb212a410",\n "0x0000000000000000000000000000000000000000000000000000000000000001"\n ]\n },\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x4d0",\n "blockHash": "0x1c8200667a869e99b945374c37277b5ee7a7ae67943e13c82563381387553dbb",\n "transactionHash": "0xb1966b9b372ba68952f48f3a3e78f036f5ae82ceca2de972a782d07fb88f6d88",\n "transactionIndex": "0x0",\n "address": "0x991cc548c154b2953cc48c02f782e1314097dfbb",\n "data": "0x",\n "topics": [\n "0x85bea11d86cefb165374e0f727bacf21dc2f4ea816493981ecf72dcfb212a410",\n "0x0000000000000000000000000000000000000000000000000000000000000002"\n ]\n }\n ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_getlogs",children:(0,n.jsx)(r.code,{children:"priv_getLogs"})}),"\n",(0,n.jsxs)(r.p,{children:["Returns an array of ",(0,n.jsx)(r.a,{href:"/public-networks/concepts/events-and-logs",children:"logs"})," matching a specified filter object."]}),"\n",(0,n.jsxs)(r.p,{children:["For private contracts, ",(0,n.jsx)(r.code,{children:"priv_getLogs"})," is the same as ",(0,n.jsx)(r.a,{href:"/public-networks/reference/api/#eth_getlogs",children:(0,n.jsx)(r.code,{children:"eth_getLogs"})})," for public contracts except there is no ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#auto-log-bloom-caching-enabled",children:"automatic log bloom caching"})," for private contracts."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-30",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"privacyGroupId"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"privacy Group ID"})]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"filterOptions"}),": ",(0,n.jsx)(r.em,{children:"object"})," - ",(0,n.jsx)(r.a,{href:"/public-networks/reference/api/objects#filter-options-object",children:"filter options object"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-30",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"objects"})," - list of ",(0,n.jsx)(r.a,{href:"/public-networks/reference/api/objects#log-object",children:"log objects"})]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc": "2.0","method": "priv_getLogs","params":["vGy/TZgO6y8VPMVeJAQ99MF1NaTf5ohA3TFfzoEF71k=",{"fromBlock": "earliest","toBlock": "latest","addresses": ["0x630c507ff633312087dc33c513b66276abcd2fc3"],"topics": ["0x85bea11d86cefb165374e0f727bacf21dc2f4ea816493981ecf72dcfb212a410"]}],"id": 1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc": "2.0","method": "priv_getLogs","params":["vGy/TZgO6y8VPMVeJAQ99MF1NaTf5ohA3TFfzoEF71k=",{"fromBlock": "earliest","toBlock": "latest","addresses": ["0x630c507ff633312087dc33c513b66276abcd2fc3"],"topics": ["0x85bea11d86cefb165374e0f727bacf21dc2f4ea816493981ecf72dcfb212a410"]}],"id": 1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x342",\n "blockHash": "0xf5954f068fa2f2f7741281e8c753a8e92047e27ab3c4971836d2c89fab86d92b",\n "transactionHash": "0xa9ba5cffde9d4ad8997c5c4352d5d49eeea0e9def8a4ea69991b8837c49d4e4f",\n "transactionIndex": "0x0",\n "address": "0x630c507ff633312087dc33c513b66276abcd2fc3",\n "data": "0x",\n "topics": [\n "0x85bea11d86cefb165374e0f727bacf21dc2f4ea816493981ecf72dcfb212a410",\n "0x0000000000000000000000000000000000000000000000000000000000000001"\n ]\n },\n {\n "logIndex": "0x0",\n "removed": false,\n "blockNumber": "0x383",\n "blockHash": "0x91b73a47d53e3a88d62ed091a89a4be7557ad91b552e7ff7d86bf78977d5d45d",\n "transactionHash": "0xc2a185faf00e87434e55b7f70cc4c38be354c2128b4b96b5f5def0b54a2173ec",\n "transactionIndex": "0x0",\n "address": "0x630c507ff633312087dc33c513b66276abcd2fc3",\n "data": "0x",\n "topics": [\n "0x85bea11d86cefb165374e0f727bacf21dc2f4ea816493981ecf72dcfb212a410",\n "0x0000000000000000000000000000000000000000000000000000000000000002"\n ]\n }\n ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_getprivacyprecompileaddress",children:(0,n.jsx)(r.code,{children:"priv_getPrivacyPrecompileAddress"})}),"\n",(0,n.jsxs)(r.p,{children:["Returns the address of the ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy precompiled contract"}),". The address is derived and based on the value of the ",(0,n.jsx)(r.a,{href:"/private-networks/reference/cli/options#privacy-flexible-groups-enabled-deprecated",children:(0,n.jsx)(r.code,{children:"privacy-flexible-groups-enabled"})})," option."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-31",children:"Parameters"}),"\n",(0,n.jsx)(r.p,{children:"None"}),"\n",(0,n.jsx)(r.h4,{id:"returns-31",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"string"})," - address of the privacy precompile"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"priv_getPrivacyPrecompileAddress","params":[], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"priv_getPrivacyPrecompileAddress","params":[], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x000000000000000000000000000000000000007e"\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_getprivatetransaction",children:(0,n.jsx)(r.code,{children:"priv_getPrivateTransaction"})}),"\n",(0,n.jsxs)(r.p,{children:["Returns the private transaction if you are a participant, otherwise, ",(0,n.jsx)(r.code,{children:"null"}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-32",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"transaction"}),": ",(0,n.jsx)(r.em,{children:"string"})," - transaction hash returned by ",(0,n.jsx)(r.a,{href:"#eea_sendrawtransaction",children:(0,n.jsx)(r.code,{children:"eea_sendRawTransaction"})}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"returns-32",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"object"})," - ",(0,n.jsx)(r.a,{href:"/private-networks/reference/api/objects#private-transaction-object",children:"private transaction object"}),", or ",(0,n.jsx)(r.code,{children:"null"})," if not a participant in the private transaction"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"priv_getPrivateTransaction","params":["0x623c4ce5275a87b91f4f1c521012d39ca19311c787bde405490f4c0426a71498"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"priv_getPrivateTransaction","params":["0x623c4ce5275a87b91f4f1c521012d39ca19311c787bde405490f4c0426a71498"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "gas": "0x2dc6c0",\n "gasPrice": "0x0",\n "hash": "0x623c4ce5275a87b91f4f1c521012d39ca19311c787bde405490f4c0426a71498",\n "input": "0x608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610221806100606000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680633fa4f2451461005c5780636057361d1461008757806367e404ce146100b4575b600080fd5b34801561006857600080fd5b5061007161010b565b6040518082815260200191505060405180910390f35b34801561009357600080fd5b506100b260048036038101908080359060200190929190505050610115565b005b3480156100c057600080fd5b506100c96101cb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000600254905090565b7fc9db20adedc6cf2b5d25252b101ab03e124902a73fcb12b753f3d1aaa2d8f9f53382604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a18060028190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050905600a165627a7a723058208efaf938851fb2d235f8bf9a9685f149129a30fe0f4b20a6c1885dc02f639eba0029",\n "nonce": "0x0",\n "to": null,\n "value": "0x0",\n "v": "0xfe8",\n "r": "0x654a6a9663ca70bb13e27cca14b3777cc92da184e19a151cdeef2ccbbd5c6405",\n "s": "0x5dd4667b020c8a5af7ae28d4c3126f8dcb1187f49dcf0de9d7a39b1651892eef",\n "privateFrom": "negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=",\n "privateFor": ["g59BmTeJIn7HIcnq8VQWgyh/pDbvbt2eyP0Ii60aDDw="],\n "restriction": "restricted"\n }\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_gettransactioncount",children:(0,n.jsx)(r.code,{children:"priv_getTransactionCount"})}),"\n",(0,n.jsx)(r.p,{children:"Returns the private transaction count for specified account and privacy group."}),"\n",(0,n.jsx)(r.admonition,{type:"important",children:(0,n.jsxs)(r.p,{children:["If sending more than one transaction to be mined in the same block (that is, you are not waiting for the transaction receipt), you must calculate the private transaction nonce outside Besu instead of using ",(0,n.jsx)(r.code,{children:"priv_getTransactionCount"}),"."]})}),"\n",(0,n.jsx)(r.h4,{id:"parameters-33",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"address"}),": ",(0,n.jsx)(r.em,{children:"string"})," - account address"]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"privacyGroupId"}),": ",(0,n.jsx)(r.em,{children:"string"})," - privacy group ID"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-33",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"string"})," - integer representing the number of private transactions sent from the address to the specified privacy group"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"priv_getTransactionCount","params":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "kAbelwaVW7okoEn1+okO+AbA4Hhz/7DaCOWVQz9nx5M="], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"priv_getTransactionCount","params":["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "kAbelwaVW7okoEn1+okO+AbA4Hhz/7DaCOWVQz9nx5M="], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x1"\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_gettransactionreceipt",children:(0,n.jsx)(r.code,{children:"priv_getTransactionReceipt"})}),"\n",(0,n.jsx)(r.p,{children:"Returns information about the private transaction after mining the transaction. Receipts for pending transactions are not available."}),"\n",(0,n.jsx)(r.h4,{id:"parameters-34",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"transaction"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte hash of a transaction"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-34",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"object"})," - ",(0,n.jsx)(r.a,{href:"/private-networks/reference/api/objects#private-transaction-receipt-object",children:"private Transaction receipt object"}),", or ",(0,n.jsx)(r.code,{children:"null"})," if no receipt found"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"priv_getTransactionReceipt","params":["0xf3ab9693ad92e277bf785e1772f29fb1864904bbbe87b0470455ddb082caab9d"],"id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"priv_getTransactionReceipt","params":["0xf3ab9693ad92e277bf785e1772f29fb1864904bbbe87b0470455ddb082caab9d"],"id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "blockHash": "0xe7212a92cfb9b06addc80dec2a0dfae9ea94fd344efeb157c41e12994fcad60a",\n "blockNumber": "0x50",\n "contractAddress": "0x493b76031593402e24e16faa81f677b58e2d53f3",\n "from": "0xfe3b557e8fb62b89f4916b721be55ceb828dbd73",\n "logs": [],\n "to": "0xf17f52151ebef6c7334fad080c5704d77216b732",\n "transactionHash": "0x36219e92b5f53d4150aa9ef7d2d793118cced523de6724100da5b534e3ceb4b8",\n "transactionIndex": "0x0",\n "output": "0x6080604052600436106049576000357c010000000000000000000000000000000000000000000\n 0000000000000900463ffffffff1680633fa4f24514604e57806355241077146076575b600080fd5b3480156059\n 57600080fd5b50606060a0565b6040518082815260200191505060405180910390f35b348015608157600080fd5b\n 50609e6004803603810190808035906020019092919050505060a6565b005b60005481565b8060008190555050560\n 0a165627a7a723058202bdbba2e694dba8fff33d9d0976df580f57bff0a40e25a46c398f8063b4c00360029",\n "commitmentHash": "0x79b9e6b0856db398ad7dc208f15b1d38c0c0b0c5f99e4a443a2c5a85510e96a5",\n "status": "0x1",\n "privateFrom": "negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=",\n "privacyGroupId": "cD636RZlcqVSpoxT/ExbkWQfBO7kPAZO0QlWHErNSL8=",\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"\n }\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_newfilter",children:(0,n.jsx)(r.code,{children:"priv_newFilter"})}),"\n",(0,n.jsxs)(r.p,{children:["Creates a ",(0,n.jsx)(r.a,{href:"/public-networks/concepts/events-and-logs",children:"log filter"})," for a private contract. To poll for logs associated with the created filter, use ",(0,n.jsx)(r.a,{href:"#priv_getfilterchanges",children:(0,n.jsx)(r.code,{children:"priv_getFilterChanges"})}),". To get all logs associated with the filter, use ",(0,n.jsx)(r.a,{href:"#priv_getfilterlogs",children:(0,n.jsx)(r.code,{children:"priv_getFilterLogs"})}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["For private contracts, ",(0,n.jsx)(r.code,{children:"priv_newFilter"})," is the same as ",(0,n.jsx)(r.a,{href:"/public-networks/reference/api/#eth_newfilter",children:(0,n.jsx)(r.code,{children:"eth_newFilter"})})," for public contracts."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-35",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"privacyGroupId"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"privacy Group ID"})]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"filterOptions"}),": ",(0,n.jsx)(r.em,{children:"object"})," - ",(0,n.jsx)(r.a,{href:"/public-networks/reference/api/objects#filter-options-object",children:"filter options object"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"fromBlock"})," and ",(0,n.jsx)(r.code,{children:"toBlock"})," in the filter options object default to ",(0,n.jsx)(r.code,{children:"latest"}),"."]})}),"\n",(0,n.jsx)(r.h4,{id:"returns-35",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"string"})," - filter ID"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc": "2.0","method": "priv_newFilter","params": ["4rFldHM792LeP/e2WPkTXZedjwKuTr/KwCFTt6mBbkI=",{"fromBlock": "earliest","toBlock": "latest","addresses": ["0x991cc548c154b2953cc48c02f782e1314097dfbb"],"topics": ["0x85bea11d86cefb165374e0f727bacf21dc2f4ea816493981ecf72dcfb212a410"]}],"id": 1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc": "2.0","method": "priv_newFilter","params": ["4rFldHM792LeP/e2WPkTXZedjwKuTr/KwCFTt6mBbkI=",{"fromBlock": "earliest","toBlock": "latest","addresses": ["0x991cc548c154b2953cc48c02f782e1314097dfbb"],"topics": ["0x85bea11d86cefb165374e0f727bacf21dc2f4ea816493981ecf72dcfb212a410"]}],"id": 1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x4a35b92809d73f4f53a2355d62125442"\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_tracetransaction",children:(0,n.jsx)(r.code,{children:"priv_traceTransaction"})}),"\n",(0,n.jsxs)(r.p,{children:["Provides a ",(0,n.jsx)(r.a,{href:"../../../public-networks/reference/api#trace_transaction",children:"transaction trace"})," for a private transaction."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-36",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"privacyGroupId"}),": ",(0,n.jsx)(r.em,{children:"string"})," - the privacy group ID associated with the transaction"]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"transactionHash"}),": ",(0,n.jsx)(r.em,{children:"string"})," - the hash of the private transaction to trace"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-36",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"objects"})," - list of ",(0,n.jsx)(r.a,{href:"/public-networks/reference/trace-types#trace",children:"calls to other contracts"})," containing one object per call, in the order called by the transaction.\nIf revert reason is enabled with ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#revert-reason-enabled",children:(0,n.jsx)(r.code,{children:"--revert-reason-enabled"})}),", the returned list items include the ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/send-transactions/revert-reason",children:"revert reason"}),"."]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc": "2.0", "method": "priv_traceTransaction","params": ["0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7", {"privacyGroupId": "Fhya8sZ1SKKH9jMNcZrE2I3i2RJSJIQtrOaZkF8WQcM="}],"id": 1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{\n "jsonrpc": "2.0",\n "method": "priv_traceTransaction",\n "params": [\n "0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7",\n {\n "privacyGroupId": "Fhya8sZ1SKKH9jMNcZrE2I3i2RJSJIQtrOaZkF8WQcM="\n }\n ],\n "id": 1\n}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "result": [\n {\n "action": {\n "creationMethod": "create",\n "from": "0x627306090abab3a6e1400e9345bc60c78a8bef57",\n "gas": "0xff2e26",\n "init": "0x60006000600060006000732c2b9c9a4a25e24b174f26114e8926a9f2128fe45af2600060006000600060007300a00000000000000000000000000000000000005af2",\n "value": "0x0"\n },\n "blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",\n "blockNumber": 19,\n "result": {\n "address": "0x30753e4a8aad7f8597332e813735def5dd395028",\n "code": "0x",\n "gasUsed": "0x1c39"\n },\n "subtraces": 2,\n "traceAddress": [],\n "transactionHash": "0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7",\n "transactionPosition": 3,\n "type": "create"\n },\n {\n "action": {\n "callType": "callcode",\n "from": "0x30753e4a8aad7f8597332e813735def5dd395028",\n "gas": "0xfb2ea9",\n "input": "0x",\n "to": "0x2c2b9c9a4a25e24b174f26114e8926a9f2128fe4",\n "value": "0x0"\n },\n "blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",\n "blockNumber": 19,\n "result": {\n "gasUsed": "0x138e",\n "output": "0x"\n },\n "subtraces": 1,\n "traceAddress": [0],\n "transactionHash": "0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7",\n "transactionPosition": 3,\n "type": "call"\n },\n {\n "action": {\n "address": "0x30753e4a8aad7f8597332e813735def5dd395028",\n "balance": "0x0",\n "refundAddress": "0x0000000000000000000000000000000000000000"\n },\n "blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",\n "blockNumber": 19,\n "result": null,\n "subtraces": 0,\n "traceAddress": [0, 0],\n "transactionHash": "0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7",\n "transactionPosition": 3,\n "type": "suicide"\n },\n {\n "action": {\n "callType": "callcode",\n "from": "0x30753e4a8aad7f8597332e813735def5dd395028",\n "gas": "0xfb18a5",\n "input": "0x",\n "to": "0x00a0000000000000000000000000000000000000",\n "value": "0x0"\n },\n "blockHash": "0x7e9a993adc6f043c0a9b6a385e6ed3fa370586c55823251b8fa7033cf89d414e",\n "blockNumber": 19,\n "result": {\n "gasUsed": "0x30b",\n "output": "0x"\n },\n "subtraces": 0,\n "traceAddress": [1],\n "transactionHash": "0x4c253746668dca6ac3f7b9bc18248b558a95b5fc881d140872c2dff984d344a7",\n "transactionPosition": 3,\n "type": "call"\n }\n ],\n "id": 1,\n "privacyGroupId": "Fhya8sZ1SKKH9jMNcZrE2I3i2RJSJIQtrOaZkF8WQcM="\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"priv_uninstallfilter",children:(0,n.jsx)(r.code,{children:"priv_uninstallFilter"})}),"\n",(0,n.jsx)(r.p,{children:"Uninstalls a filter for a private contract with the specified ID. When a filter is no longer required, call this method."}),"\n",(0,n.jsxs)(r.p,{children:["Filters time out when not requested by ",(0,n.jsx)(r.a,{href:"#priv_getfilterchanges",children:(0,n.jsx)(r.code,{children:"priv_getFilterChanges"})})," or ",(0,n.jsx)(r.a,{href:"#priv_getfilterlogs",children:(0,n.jsx)(r.code,{children:"priv_getFilterLogs"})})," for 10 minutes."]}),"\n",(0,n.jsxs)(r.p,{children:["For private contracts, ",(0,n.jsx)(r.code,{children:"priv_uninstallFilter"})," is the same as ",(0,n.jsx)(r.a,{href:"/public-networks/reference/api/#eth_uninstallfilter",children:(0,n.jsx)(r.code,{children:"eth_uninstallFilter"})})," for public contracts."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-37",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"privacyGroupId"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte ",(0,n.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"privacy group ID"})]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"filterId"}),": ",(0,n.jsx)(r.em,{children:"string"})," - filter ID"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-37",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"boolean"})," - indicates if the filter is successfully uninstalled"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc": "2.0","method": "priv_uninstallFilter","params":["4rFldHM792LeP/e2WPkTXZedjwKuTr/KwCFTt6mBbkI=","0x4a35b92809d73f4f53a2355d62125442"],"id": 1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc": "2.0","method": "priv_uninstallFilter","params":["4rFldHM792LeP/e2WPkTXZedjwKuTr/KwCFTt6mBbkI=","0x4a35b92809d73f4f53a2355d62125442"],"id": 1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,n.jsxs)(r.h2,{id:"qbft-methods",children:[(0,n.jsx)(r.code,{children:"QBFT"})," methods"]}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"QBFT"})," API methods provide access to the ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/qbft",children:"QBFT"})," consensus engine."]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.code,{children:"QBFT"})," API methods are not enabled by default for JSON-RPC. To enable the ",(0,n.jsx)(r.code,{children:"QBFT"})," API methods, use the ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,n.jsx)(r.code,{children:"--rpc-http-api"})})," or ",(0,n.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,n.jsx)(r.code,{children:"--rpc-ws-api"})})," options."]})}),"\n",(0,n.jsx)(r.h3,{id:"qbft_discardvalidatorvote",children:(0,n.jsx)(r.code,{children:"qbft_discardValidatorVote"})}),"\n",(0,n.jsxs)(r.p,{children:["Discards a proposal to ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/qbft#add-and-remove-validators",children:"add or remove a validator"})," with the specified address."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-38",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"address"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 20-byte address of proposed validator"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-38",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"boolean"})," - indicates if the proposal is discarded"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"qbft_discardValidatorVote","params":["0xef1bfb6a12794615c9b0b5a21e6741f01e570185"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"qbft_discardValidatorVote","params":["0xef1bfb6a12794615c9b0b5a21e6741f01e570185"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"qbft_getpendingvotes",children:(0,n.jsx)(r.code,{children:"qbft_getPendingVotes"})}),"\n",(0,n.jsxs)(r.p,{children:["Returns ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/qbft#add-and-remove-validators",children:"votes"})," cast in the current ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/qbft#genesis-file",children:"epoch"}),"."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-39",children:"Parameters"}),"\n",(0,n.jsx)(r.p,{children:"None"}),"\n",(0,n.jsx)(r.h4,{id:"returns-39",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"map"})," of ",(0,n.jsx)(r.em,{children:"strings"})," to ",(0,n.jsx)(r.em,{children:"booleans"})," - map of account addresses to corresponding boolean values indicating the vote for each account; if ",(0,n.jsx)(r.code,{children:"true"}),", the vote is to add a validator. If ",(0,n.jsx)(r.code,{children:"false"}),", the proposal is to remove a validator."]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"qbft_getPendingVotes","params":[], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"qbft_getPendingVotes","params":[], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "0xef1bfb6a12794615c9b0b5a21e6741f01e570185": true,\n "0x42d4287eac8078828cf5f3486cfe601a275a49a5": true\n }\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"qbft_getsignermetrics",children:(0,n.jsx)(r.code,{children:"qbft_getSignerMetrics"})}),"\n",(0,n.jsx)(r.p,{children:"Provides the following validator metrics for the specified range:"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"Number of blocks from each validator"}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"Block number of the last block proposed by each validator (if any proposed in the specified range)"}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"All validators present in the last block of the range"}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-40",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"fromBlockNumber"}),": ",(0,n.jsx)(r.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one\nof the string tags ",(0,n.jsx)(r.code,{children:"latest"}),", ",(0,n.jsx)(r.code,{children:"earliest"}),", ",(0,n.jsx)(r.code,{children:"pending"}),", ",(0,n.jsx)(r.code,{children:"finalized"}),", or ",(0,n.jsx)(r.code,{children:"safe"}),", as described in\n",(0,n.jsx)(r.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"toBlockNumber"}),": ",(0,n.jsx)(r.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of\nthe string tags ",(0,n.jsx)(r.code,{children:"latest"}),", ",(0,n.jsx)(r.code,{children:"earliest"}),", ",(0,n.jsx)(r.code,{children:"pending"}),", ",(0,n.jsx)(r.code,{children:"finalized"}),", or ",(0,n.jsx)(r.code,{children:"safe"}),", as described in\n",(0,n.jsx)(r.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"pending"})," returns the same value as ",(0,n.jsx)(r.code,{children:"latest"}),"."]})}),"\n",(0,n.jsx)(r.p,{children:"If you specify:"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"No parameters, the call provides metrics for the last 100 blocks, or all blocks if there are less than 100 blocks."}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsx)(r.p,{children:"Only the first parameter, the call provides metrics for all blocks from the block specified to the latest block."}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-40",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"objects"})," - list of validator objects"]}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:["The proposer of the genesis block has address ",(0,n.jsx)(r.code,{children:"0x0000000000000000000000000000000000000000"}),"."]})}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"qbft_getSignerMetrics","params":["1", "100"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS",label:"wscat WS",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"qbft_getSignerMetrics","params":["1", "100"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "address": "0x7ffc57839b00206d1ad20c69a1981b489f772031",\n "proposedBlockCount": "0x21",\n "lastProposedBlockNumber": "0x61"\n },\n {\n "address": "0x42eb768f2244c8811c63729a21a3569731535f06",\n "proposedBlockCount": "0x21",\n "lastProposedBlockNumber": "0x63"\n },\n {\n "address": "0xb279182d99e65703f0076e4812653aab85fca0f0",\n "proposedBlockCount": "0x21",\n "lastProposedBlockNumber": "0x62"\n }\n ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"qbft_getvalidatorsbyblockhash",children:(0,n.jsx)(r.code,{children:"qbft_getValidatorsByBlockHash"})}),"\n",(0,n.jsx)(r.p,{children:"Lists the validators defined in the specified block."}),"\n",(0,n.jsx)(r.h4,{id:"parameters-41",children:"Parameters"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"block"}),": ",(0,n.jsx)(r.em,{children:"string"})," - 32-byte block hash"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-41",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"strings"})," - list of validator addresses"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"qbft_getValidatorsByBlockHash","params":["0xbae7d3feafd743343b9a4c578cab5e5d65eb735f6855fb845c00cab356331256"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"qbft_getValidatorsByBlockHash","params":["0xbae7d3feafd743343b9a4c578cab5e5d65eb735f6855fb845c00cab356331256"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "0x42d4287eac8078828cf5f3486cfe601a275a49a5",\n "0xb1b2bc9582d2901afdc579f528a35ca41403fa85",\n "0xef1bfb6a12794615c9b0b5a21e6741f01e570185"\n ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"qbft_getvalidatorsbyblocknumber",children:(0,n.jsx)(r.code,{children:"qbft_getValidatorsByBlockNumber"})}),"\n",(0,n.jsx)(r.p,{children:"Lists the validators for the specified block."}),"\n",(0,n.jsx)(r.p,{children:"For all blocks up to the chain head block this method returns the validators that were used at the time the block was produced."}),"\n",(0,n.jsxs)(r.p,{children:["Use ",(0,n.jsx)(r.code,{children:"blockNumber"})," to get the list of validators for that block."]}),"\n",(0,n.jsx)(r.p,{children:"For the chain head block there are two validator lists associated with it:"}),"\n",(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["The validators that were used at the time the block was produced. This list is returned by passing ",(0,n.jsx)(r.code,{children:"latest"})," as the input parameter."]}),"\n",(0,n.jsxs)(r.li,{children:["The validators that will be used to produce the next block. This list is returned by passing ",(0,n.jsx)(r.code,{children:"pending"})," as the input parameter."]}),"\n"]}),"\n",(0,n.jsx)(r.p,{children:"In most instances the two lists for the chain head block are the same. However, when voting has completed to add or remove a validator, the validators that will be used to produce the next block are different. Comparing the two lists can be helpful when diagnosing a stalled chain."}),"\n",(0,n.jsx)(r.admonition,{type:"note",children:(0,n.jsxs)(r.p,{children:["When the validator list changes, an ",(0,n.jsx)(r.code,{children:"INFO"})," log message displays, showing the previous list of validators and the new list of validators."]})}),"\n",(0,n.jsx)(r.h4,{id:"parameters-42",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.code,{children:"blockNumber"}),": ",(0,n.jsx)(r.em,{children:"string"})," - hexadecimal or decimal integer representing a block number, or one of the string tags ",(0,n.jsx)(r.code,{children:"latest"}),", ",(0,n.jsx)(r.code,{children:"earliest"}),", ",(0,n.jsx)(r.code,{children:"pending"}),", ",(0,n.jsx)(r.code,{children:"finalized"}),", or ",(0,n.jsx)(r.code,{children:"safe"}),", as described in ",(0,n.jsx)(r.a,{href:"/public-networks/how-to/use-besu-api/json-rpc#block-parameter",children:"block parameter"})]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-42",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"array"})," of ",(0,n.jsx)(r.em,{children:"strings"})," - list of validator addresses"]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"qbft_getValidatorsByBlockNumber","params":["latest"], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"qbft_getValidatorsByBlockNumber","params":["latest"], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n "0x42d4287eac8078828cf5f3486cfe601a275a49a5",\n "0xb1b2bc9582d2901afdc579f528a35ca41403fa85",\n "0xef1bfb6a12794615c9b0b5a21e6741f01e570185"\n ]\n}\n'})})})]}),"\n",(0,n.jsx)(r.h3,{id:"qbft_proposevalidatorvote",children:(0,n.jsx)(r.code,{children:"qbft_proposeValidatorVote"})}),"\n",(0,n.jsxs)(r.p,{children:["Proposes to ",(0,n.jsx)(r.a,{href:"/private-networks/how-to/configure/consensus/qbft#add-and-remove-validators",children:"add or remove a validator"})," with the specified address."]}),"\n",(0,n.jsx)(r.h4,{id:"parameters-43",children:"Parameters"}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"address"}),": ",(0,n.jsx)(r.em,{children:"string"})," - account address"]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"proposal"}),": ",(0,n.jsx)(r.em,{children:"boolean"})," - ",(0,n.jsx)(r.code,{children:"true"})," to propose adding validator or ",(0,n.jsx)(r.code,{children:"false"})," to propose removing validator"]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.h4,{id:"returns-43",children:"Returns"}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.code,{children:"result"}),": ",(0,n.jsx)(r.em,{children:"boolean"})," - ",(0,n.jsx)(r.code,{children:"true"})]}),"\n",(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.A,{value:"curl HTTP request",label:"curl HTTP request",default:!0,children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"qbft_proposeValidatorVote","params":["42d4287eac8078828cf5f3486cfe601a275a49a5",true], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,n.jsx)(l.A,{value:"wscat WS request",label:"wscat WS request",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-bash",children:'{"jsonrpc":"2.0","method":"qbft_proposeValidatorVote","params":["42d4287eac8078828cf5f3486cfe601a275a49a5",true], "id":1}\n'})})}),(0,n.jsx)(l.A,{value:"JSON result",label:"JSON result",children:(0,n.jsx)(r.pre,{children:(0,n.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": true\n}\n'})})})]}),"\n",(0,n.jsx)(r.p,{children:"*[EEA]: Enterprise Ethereum Alliance"})]})}function u(e={}){const{wrapper:r}={...(0,a.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},19365:(e,r,s)=>{s.d(r,{A:()=>l});s(96540);var n=s(18215);const a={tabItem:"tabItem_Ymn6"};var c=s(74848);function l(e){let{children:r,hidden:s,className:l}=e;return(0,c.jsx)("div",{role:"tabpanel",className:(0,n.A)(a.tabItem,l),hidden:s,children:r})}},11470:(e,r,s)=>{s.d(r,{A:()=>k});var n=s(96540),a=s(18215),c=s(23104),l=s(56347),i=s(205),d=s(57485),t=s(31682),o=s(70679);function h(e){return n.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:r}=e;return!!r&&"object"==typeof r&&"value"in r}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:r,children:s}=e;return(0,n.useMemo)((()=>{const e=r??function(e){return h(e).map((e=>{let{props:{value:r,label:s,attributes:n,default:a}}=e;return{value:r,label:s,attributes:n,default:a}}))}(s);return function(e){const r=(0,t.XI)(e,((e,r)=>e.value===r.value));if(r.length>0)throw new Error(`Docusaurus error: Duplicate values "${r.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[r,s])}function u(e){let{value:r,tabValues:s}=e;return s.some((e=>e.value===r))}function x(e){let{queryString:r=!1,groupId:s}=e;const a=(0,l.W6)(),c=function(e){let{queryString:r=!1,groupId:s}=e;if("string"==typeof r)return r;if(!1===r)return null;if(!0===r&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return s??null}({queryString:r,groupId:s});return[(0,d.aZ)(c),(0,n.useCallback)((e=>{if(!c)return;const r=new URLSearchParams(a.location.search);r.set(c,e),a.replace({...a.location,search:r.toString()})}),[c,a])]}function f(e){const{defaultValue:r,queryString:s=!1,groupId:a}=e,c=p(e),[l,d]=(0,n.useState)((()=>function(e){let{defaultValue:r,tabValues:s}=e;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(r){if(!u({value:r,tabValues:s}))throw new Error(`Docusaurus error: The has a defaultValue "${r}" but none of its children has the corresponding value. Available values are: ${s.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return r}const n=s.find((e=>e.default))??s[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:r,tabValues:c}))),[t,h]=x({queryString:s,groupId:a}),[f,j]=function(e){let{groupId:r}=e;const s=function(e){return e?`docusaurus.tab.${e}`:null}(r),[a,c]=(0,o.Dv)(s);return[a,(0,n.useCallback)((e=>{s&&c.set(e)}),[s,c])]}({groupId:a}),b=(()=>{const e=t??f;return u({value:e,tabValues:c})?e:null})();(0,i.A)((()=>{b&&d(b)}),[b]);return{selectedValue:l,selectValue:(0,n.useCallback)((e=>{if(!u({value:e,tabValues:c}))throw new Error(`Can't select invalid tab value=${e}`);d(e),h(e),j(e)}),[h,j,c]),tabValues:c}}var j=s(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=s(74848);function v(e){let{className:r,block:s,selectedValue:n,selectValue:l,tabValues:i}=e;const d=[],{blockElementScrollPositionUntilNextRender:t}=(0,c.a_)(),o=e=>{const r=e.currentTarget,s=d.indexOf(r),a=i[s].value;a!==n&&(t(r),l(a))},h=e=>{let r=null;switch(e.key){case"Enter":o(e);break;case"ArrowRight":{const s=d.indexOf(e.currentTarget)+1;r=d[s]??d[0];break}case"ArrowLeft":{const s=d.indexOf(e.currentTarget)-1;r=d[s]??d[d.length-1];break}}r?.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":s},r),children:i.map((e=>{let{value:r,label:s,attributes:c}=e;return(0,m.jsx)("li",{role:"tab",tabIndex:n===r?0:-1,"aria-selected":n===r,ref:e=>d.push(e),onKeyDown:h,onClick:o,...c,className:(0,a.A)("tabs__item",b.tabItem,c?.className,{"tabs__item--active":n===r}),children:s??r},r)}))})}function g(e){let{lazy:r,children:s,selectedValue:c}=e;const l=(Array.isArray(s)?s:[s]).filter(Boolean);if(r){const e=l.find((e=>e.props.value===c));return e?(0,n.cloneElement)(e,{className:(0,a.A)("margin-top--md",e.props.className)}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:l.map(((e,r)=>(0,n.cloneElement)(e,{key:r,hidden:e.props.value!==c})))})}function w(e){const r=f(e);return(0,m.jsxs)("div",{className:(0,a.A)("tabs-container",b.tabList),children:[(0,m.jsx)(v,{...r,...e}),(0,m.jsx)(g,{...r,...e})]})}function k(e){const r=(0,j.A)();return(0,m.jsx)(w,{...e,children:h(e.children)},String(r))}},28453:(e,r,s)=>{s.d(r,{R:()=>l,x:()=>i});var n=s(96540);const a={},c=n.createContext(a);function l(e){const r=n.useContext(c);return n.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function i(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:l(e.components),n.createElement(c.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d7914a50.dcb45a45.js b/assets/js/d7914a50.dcb45a45.js new file mode 100644 index 00000000000..32b47415fd2 --- /dev/null +++ b/assets/js/d7914a50.dcb45a45.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2812],{18913:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>o,default:()=>u,frontMatter:()=>c,metadata:()=>r,toc:()=>d});var a=t(74848),s=t(28453);const c={title:"Transfer account funds",sidebar_position:1,description:"funds transfer transactions",tags:["private networks"]},o="Transfer funds between accounts in a transaction",r={id:"private-networks/tutorials/contracts/transfer-funds",title:"Transfer account funds",description:"funds transfer transactions",source:"@site/docs/private-networks/tutorials/contracts/transfer-funds.md",sourceDirName:"private-networks/tutorials/contracts",slug:"/private-networks/tutorials/contracts/transfer-funds",permalink:"/private-networks/tutorials/contracts/transfer-funds",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/contracts/transfer-funds.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Transfer account funds",sidebar_position:1,description:"funds transfer transactions",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Deploy a smart contract",permalink:"/private-networks/tutorials/contracts/"},next:{title:"Interact with a deployed contract",permalink:"/private-networks/tutorials/contracts/interact"}},i={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Use eth_sendSignedTransaction",id:"use-eth_sendsignedtransaction",level:2},{value:"Use eth_sendTransaction",id:"use-eth_sendtransaction",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"transfer-funds-between-accounts-in-a-transaction",children:"Transfer funds between accounts in a transaction"})}),"\n",(0,a.jsxs)(n.p,{children:["You can get started with the ",(0,a.jsx)(n.a,{href:"/private-networks/tutorials/quickstart",children:"Developer Quickstart"})," to rapidly generate local blockchain networks."]}),"\n",(0,a.jsx)(n.p,{children:"This tutorial shows you how to transfer funds (ETH) between accounts in a transaction."}),"\n",(0,a.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["A ",(0,a.jsx)(n.a,{href:"/private-networks/tutorials/quickstart",children:"private network"})]}),"\n"]}),"\n",(0,a.jsxs)(n.h2,{id:"use-eth_sendsignedtransaction",children:["Use ",(0,a.jsx)(n.code,{children:"eth_sendSignedTransaction"})]}),"\n",(0,a.jsxs)(n.p,{children:["The simplest way to transfer funds between externally-owned accounts is using ",(0,a.jsx)(n.a,{href:"https://web3js.readthedocs.io/en/v1.2.11/web3-eth.html#sendsignedtransaction",children:(0,a.jsx)(n.code,{children:"eth_sendSignedTransaction"})}),". This example uses ",(0,a.jsx)(n.code,{children:"eth_sendSignedTransaction"})," and one of the ",(0,a.jsx)(n.a,{href:"/private-networks/reference/accounts-for-testing",children:"test accounts"})," to transfer funds to a newly created account."]}),"\n",(0,a.jsx)(n.admonition,{title:"Do not use the test accounts on Ethereum Mainnet or any production network",type:"danger",children:(0,a.jsx)(n.p,{children:"The private key is publicly displayed, which means the account is not secure."})}),"\n",(0,a.jsx)(n.p,{children:"Before making the transaction, check the balances of both accounts to verify the funds transfer after the transaction."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-js",children:'const web3 = new Web3(host);\n// Pre-seeded account with 90000 ETH\nconst privateKeyA =\n "0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3";\nconst accountA = web3.eth.accounts.privateKeyToAccount(privateKeyA);\nvar accountABalance = web3.utils.fromWei(\n await web3.eth.getBalance(accountA.address),\n);\nconsole.log("Account A has balance of: " + accountABalance);\n\n// Create a new account to transfer ETH to\nvar accountB = web3.eth.accounts.create();\nvar accountBBalance = web3.utils.fromWei(\n await web3.eth.getBalance(accountB.address),\n);\nconsole.log("Account B has balance of: " + accountBBalance);\n'})}),"\n",(0,a.jsxs)(n.p,{children:["Use the test account address (Account A) for the ",(0,a.jsx)(n.code,{children:"from"})," parameter, the recipient account address (Account B) for the ",(0,a.jsx)(n.code,{children:"to"})," parameter, and the amount of ETH to transfer between accounts for the ",(0,a.jsx)(n.code,{children:"value"})," parameter. Sign the transaction with Account A's private key and send it using ",(0,a.jsx)(n.code,{children:"eth_sendSignedTransaction"}),"."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-js",children:'// Send some ETH from A to B\nconst rawTxOptions = {\n nonce: web3.utils.numberToHex(\n await web3.eth.getTransactionCount(accountA.address),\n ),\n from: accountA.address,\n to: accountB.address,\n value: "0x100", // Amount of ETH to transfer\n gasPrice: "0x0", // ETH per unit of gas\n gasLimit: "0x24A22", // Max number of gas units the tx is allowed to use\n};\nconsole.log("Creating transaction...");\nconst tx = new Tx(rawTxOptions);\nconsole.log("Signing transaction...");\ntx.sign(Buffer.from(accountA.privateKey.substring(2), "hex"));\nconsole.log("Sending transaction...");\nvar serializedTx = tx.serialize();\nconst pTx = await web3.eth.sendSignedTransaction(\n "0x" + serializedTx.toString("hex").toString("hex"),\n);\nconsole.log("tx transactionHash: " + pTx.transactionHash);\n'})}),"\n",(0,a.jsx)(n.p,{children:"Once it completes, you can see the updated balances."}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-js",children:'// After the transaction, there should be some ETH transferred\nvar accountABalance = await getAccountBalance(host, accountA);\nconsole.log("Account A has an updated balance of: " + accountABalance);\nvar accountBBalance = await getAccountBalance(host, accountB);\nconsole.log("Account B has an updatedbalance of: " + accountBBalance);\n}\n'})}),"\n",(0,a.jsxs)(n.p,{children:["A ",(0,a.jsx)(n.a,{href:"https://github.com/ConsenSys/quorum-dev-quickstart/blob/1e8cc281098923802845cd829ec20c88513c2e1c/files/besu/smart_contracts/privacy/scripts/eth_tx.js",children:"full example"})," can be found in the Developer Quickstart."]}),"\n",(0,a.jsxs)(n.h2,{id:"use-eth_sendtransaction",children:["Use ",(0,a.jsx)(n.code,{children:"eth_sendTransaction"})]}),"\n",(0,a.jsxs)(n.p,{children:["An alternative to using ",(0,a.jsx)(n.code,{children:"eth_sendSignedTransaction"})," is ",(0,a.jsx)(n.a,{href:"https://web3js.readthedocs.io/en/v1.2.11/web3-eth.html#sendtransaction",children:(0,a.jsx)(n.code,{children:"eth_sendTransaction"})}),". However, Besu does not support the ",(0,a.jsx)(n.code,{children:"eth_sendTransaction"})," API call and keeps account management separate for stronger security. Instead, Besu uses ",(0,a.jsx)(n.a,{href:"https://docs.web3signer.consensys.net/",children:"Web3Signer"})," to make the ",(0,a.jsx)(n.code,{children:"eth_sendTransaction"})," API call."]}),"\n",(0,a.jsxs)(n.p,{children:["Use ",(0,a.jsx)(n.code,{children:"eth_sendTransaction"})," similarly to ",(0,a.jsxs)(n.a,{href:"#use-eth_sendsignedtransaction",children:["using ",(0,a.jsx)(n.code,{children:"eth_sendSignedTransaction"})]})," (without the signing step which is done by Web3Signer):"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-js",children:'const web3 = new Web3(host);\n// Pre-seeded account with 90000 ETH\nconst privateKeyA = "0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3";\nconst accountA = web3.eth.accounts.privateKeyToAccount(privateKeyA);\nvar accountABalance = web3.utils.fromWei(await web3.eth.getBalance(accountA.address));\nconsole.log("Account A has balance of: " + accountABalance);\n\n// Create a new account to transfer ETH to\nvar accountB = web3.eth.accounts.create();\nvar accountBBalance = web3.utils.fromWei(await web3.eth.getBalance(accountB.address));\nconsole.log("Account B has balance of: " + accountBBalance);\n\n// Send some ETH from A to B\nconst txOptions = {\n from: accountA.address,\n to: accountB.address,\n value: "0x100", // Amount of ETH to transfer\n gasPrice: "0x0", // ETH per unit of gas\n gasLimit: "0x24A22" // Max number of gas units the tx is allowed to use\n};\nconsole.log("Creating transaction...");\nconst pTx = await web3.eth.sendTransaction(txOptions);\nconsole.log("tx transactionHash: " + pTx.transactionHash);\n\n// After the transaction, there should be some ETH transferred\nvar accountABalance = await getAccountBalance(host, accountA);\nconsole.log("Account A has an updated balance of: " + accountABalance);\nvar accountBBalance = await getAccountBalance(host, accountB);\nconsole.log("Account B has an updatedbalance of: " + accountBBalance);\n}\n'})})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>r});var a=t(96540);const s={},c=a.createContext(s);function o(e){const n=a.useContext(c);return a.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),a.createElement(c.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d7b72fb9.e4864d29.js b/assets/js/d7b72fb9.e4864d29.js new file mode 100644 index 00000000000..4c9441a3aa4 --- /dev/null +++ b/assets/js/d7b72fb9.e4864d29.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6162],{13628:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>l,contentTitle:()=>i,default:()=>a,frontMatter:()=>o,metadata:()=>c,toc:()=>u});var n=t(74848),r=t(28453);const o={title:"Projects using Besu",sidebar_position:7,description:"List of projects using Besu",tags:["public networks","private networks"]},i="Projects using Besu",c={id:"public-networks/reference/projects-using-besu",title:"Projects using Besu",description:"List of projects using Besu",source:"@site/docs/public-networks/reference/projects-using-besu.md",sourceDirName:"public-networks/reference",slug:"/public-networks/reference/projects-using-besu",permalink:"/public-networks/reference/projects-using-besu",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/reference/projects-using-besu.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:7,frontMatter:{title:"Projects using Besu",sidebar_position:7,description:"List of projects using Besu",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Transaction trace types",permalink:"/public-networks/reference/trace-types"},next:{title:"Security disclosure policy",permalink:"/public-networks/reference/disclosure"}},l={},u=[{value:"Block explorers",id:"block-explorers",level:2}];function p(e){const s={a:"a",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"projects-using-besu",children:"Projects using Besu"})}),"\n",(0,n.jsx)(s.h2,{id:"block-explorers",children:"Block explorers"}),"\n",(0,n.jsx)(s.p,{children:"The following block explorers are compatible with Besu:"}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://github.com/blockscout/blockscout#readme",children:"BlockScout"})," - See the ",(0,n.jsx)(s.a,{href:"https://docs.blockscout.com/",children:"project documentation"})," for setup instructions."]}),"\n"]}),"\n",(0,n.jsxs)(s.li,{children:["\n",(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"https://www.web3labs.com/chainlens",children:"Chainlens Blockchain Explorer"})," - See how to ",(0,n.jsx)(s.a,{href:"/private-networks/how-to/monitor/chainlens",children:"use Chainlens with privacy-enabled networks"}),"."]}),"\n"]}),"\n"]})]})}function a(e={}){const{wrapper:s}={...(0,r.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>i,x:()=>c});var n=t(96540);const r={},o=n.createContext(r);function i(e){const s=n.useContext(o);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function c(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),n.createElement(o.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d86228ad.2c26466a.js b/assets/js/d86228ad.2c26466a.js new file mode 100644 index 00000000000..5be7aab387a --- /dev/null +++ b/assets/js/d86228ad.2c26466a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[198],{38116:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>l});var n=s(74848),o=s(28453);const i={title:"Attestations",sidebar_position:1,description:"Proof of stake attestations",tags:["public networks"]},r="Attestations",a={id:"public-networks/concepts/proof-of-stake/attestations",title:"Attestations",description:"Proof of stake attestations",source:"@site/docs/public-networks/concepts/proof-of-stake/attestations.md",sourceDirName:"public-networks/concepts/proof-of-stake",slug:"/public-networks/concepts/proof-of-stake/attestations",permalink:"/public-networks/concepts/proof-of-stake/attestations",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/concepts/proof-of-stake/attestations.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Attestations",sidebar_position:1,description:"Proof of stake attestations",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Proof of stake consensus",permalink:"/public-networks/concepts/proof-of-stake/"},next:{title:"Data storage formats",permalink:"/public-networks/concepts/data-storage-formats"}},c={},l=[{value:"What are attestations?",id:"what-are-attestations",level:2},{value:"Attestation rewards",id:"attestation-rewards",level:2},{value:"Incorrect attestations",id:"incorrect-attestations",level:2},{value:"Conclusion",id:"conclusion",level:2},{value:"References",id:"references",level:2}];function d(e){const t={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"attestations",children:"Attestations"})}),"\n",(0,n.jsxs)(t.p,{children:["Ethereum's move to ",(0,n.jsx)(t.a,{href:"/public-networks/concepts/proof-of-stake/",children:"proof of stake consensus"})," has brought many changes to the way the network operates. An important aspect of proof of stake is the need for validators to provide attestations in a timely and accurate manner. However, missed attestations have become a common occurrence among validators, leading to a loss of rewards and earnings. This page explores the context behind missing attestations."]}),"\n",(0,n.jsx)(t.h2,{id:"what-are-attestations",children:"What are attestations?"}),"\n",(0,n.jsxs)(t.p,{children:["Every epoch (6.4 minutes), a validator proposes an attestation to the network. The attestation is for a specific slot (every 12 seconds) in the epoch. The attestation votes in favor of the validator's view of the chain, in particular, the most recent justified block and the first block in the current epoch (known as ",(0,n.jsx)(t.em,{children:"source"})," and ",(0,n.jsx)(t.em,{children:"target"})," checkpoints). This information is collected for all participating validators, enabling the network to reach consensus about the state of the blockchain."]}),"\n",(0,n.jsxs)(t.p,{children:["Honest nodes have 1/3 * ",(0,n.jsx)(t.code,{children:"SECONDS_PER_SLOT"})," (4 seconds) from the start of the slot to either receive the block or decide there was no block produced and attest to an \u201cempty\u201d or \u201cskip\u201d slot. Once this time has elapsed, attesters should broadcast their attestation reflecting their local view of the chain."]}),"\n",(0,n.jsxs)(t.p,{children:["See the ",(0,n.jsx)(t.a,{href:"https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/validator.md#attesting",children:"official specification"})," for more information about attestations."]}),"\n",(0,n.jsx)(t.h2,{id:"attestation-rewards",children:"Attestation rewards"}),"\n",(0,n.jsx)(t.p,{children:"Around 85% of validators' rewards come from making attestations. Although committee and slot assignments for attesting are randomized, every active validator will be selected to make exactly one attestation each epoch."}),"\n",(0,n.jsx)(t.p,{children:"Attestations receive rewards only if they're included in Beacon Chain blocks. An attestation contains three votes. Each vote is eligible for a reward, subject to the following conditions:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"Getting attestations included with the correct source checkpoint within 5 slots"}),"\n",(0,n.jsx)(t.li,{children:"Getting attestations included with the correct target checkpoint within 32 slots"}),"\n",(0,n.jsx)(t.li,{children:"Getting attestations included with the correct head within 1 slot immediately"}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:['Each of these duties carries a reward rate, a portion of the entire "weight denominator," or the sum of weighted rewards for each attestation. The remaining weights relate to participating in sync committees and proposing blocks (excluding any tips/MEV, the bulk of block rewards). The following table (from ',(0,n.jsx)(t.a,{href:"https://eth2book.info/bellatrix/part2/incentives/rewards/",children:"Upgrading Ethereum"}),") breaks down these weights for cumulative rewards:"]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Percentage"}),(0,n.jsx)(t.th,{children:"Value"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"TIMELY_SOURCE_WEIGHT"})}),(0,n.jsx)(t.td,{children:"21.9%"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"uint64(14)"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"TIMELY_TARGET_WEIGHT"})}),(0,n.jsx)(t.td,{children:"40.6%"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"uint64(26)"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"TIMELY_HEAD_WEIGHT"})}),(0,n.jsx)(t.td,{children:"21.9%"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"uint64(14)"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"SYNC_REWARD_WEIGHT"})}),(0,n.jsx)(t.td,{children:"3.1%"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"uint64(2)"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"PROPOSER_WEIGHT"})}),(0,n.jsx)(t.td,{children:"12.5%"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"uint64(8)"})})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"WEIGHT_DENOMINATOR"})}),(0,n.jsx)(t.td,{children:"100%"}),(0,n.jsx)(t.td,{children:(0,n.jsx)(t.code,{children:"uint64(64)"})})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"incorrect-attestations",children:"Incorrect attestations"}),"\n",(0,n.jsx)(t.p,{children:"If you have attestations with incorrect head votes, your node might be experiencing slow block imports. However, block producers can also be slow to publish blocks, resulting in a majority of validators getting the head vote wrong. A <100% head vote doesn't necessarily imply a problem with your node."}),"\n",(0,n.jsx)(t.p,{children:"In case of a slowdown, identify whether the issue is with the beacon node or the execution client. Block timing logs can be helpful in determining this."}),"\n",(0,n.jsxs)(t.p,{children:["If you're using ",(0,n.jsx)(t.a,{href:"https://docs.teku.consensys.net/",children:"Teku"})," as a consensus layer client, identify late blocks (the block didn't get to Teku in time) with the following kind of log:"]}),"\n",(0,n.jsx)(t.pre,{children:(0,n.jsx)(t.code,{className:"language-bash",children:"Late Block Import *** Block: c2b911533a8f8d5e699d1a334e0576d2b9aa4caa726bde8b827548b579b47c68 (4765916) proposer 6230 arrival 3475ms, pre-state_retrieved +5ms, processed +185ms, execution_payload_result_received +1436ms, begin_importing +0ms, transaction_prepared +0ms, transaction_committed +0ms, completed +21ms\n"})}),"\n",(0,n.jsx)(t.p,{children:"The time of arrival indicates how much time elapsed after the start of the slot before your node received the block. In this example, the block arrived after 3475ms, which is slower than optimal, but still enough time for Teku to create an attestation 4 seconds into the slot."}),"\n",(0,n.jsx)(t.p,{children:"Typically, delayed arrivals occur when the block producer is slow in generating the block. It's also possible that the block was published on time but took longer to propagate to your node through peer-to-peer gossip. If delayed arrivals are a recurring issue, it might be a problem with your node, such as an incorrect system clock, network issues, or a reduction in the number of peers."}),"\n",(0,n.jsx)(t.h2,{id:"conclusion",children:"Conclusion"}),"\n",(0,n.jsx)(t.p,{children:"Attestations are complicated. Rewards can be impacted by:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:"The contents of a block (how long it takes to compute)."}),"\n",(0,n.jsx)(t.li,{children:"The hardware processing that block (execution speed)."}),"\n",(0,n.jsx)(t.li,{children:"How long it takes for the block to arrive to Besu from the consensus layer."}),"\n",(0,n.jsx)(t.li,{children:"The arrival time of the block from other consensus layer peers. Besu and your consensus layer client have no control over how late into a slot they receive blocks."}),"\n",(0,n.jsx)(t.li,{children:"General network latency."}),"\n",(0,n.jsx)(t.li,{children:"The status of either Besu or the consensus layer client."}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:[(0,n.jsx)(t.a,{href:"/public-networks/how-to/monitor/",children:"Monitoring"})," your validator carefully for uptime, execution speed, and a valid consensus layer connection will help you explore attestation performance for your node."]}),"\n",(0,n.jsx)(t.h2,{id:"references",children:"References"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://eth2book.info/bellatrix/part2/incentives/rewards/",children:"Upgrading Ethereum"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://www.symphonious.net/2022/09/25/understanding-attestation-misses/",children:"Understanding Attestation Misses"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://notes.ethereum.org/DaWh-02HQ4qftum1xdphkg?view#Broadcast-attestation",children:"Block production in Ethereum after the Merge"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"https://github.com/ethereum/consensus-specs/blob/dev/specs/phase0/validator.md#attesting",children:"Ethereum Consensus Specs"})}),"\n"]})]})}function h(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>r,x:()=>a});var n=s(96540);const o={},i=n.createContext(o);function r(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/d94d9a73.9d3a7ebc.js b/assets/js/d94d9a73.9d3a7ebc.js new file mode 100644 index 00000000000..030ef071c00 --- /dev/null +++ b/assets/js/d94d9a73.9d3a7ebc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[3522],{92552:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>s,default:()=>p,frontMatter:()=>r,metadata:()=>c,toc:()=>d});var i=t(74848),a=t(28453);const r={description:"Private transaction overview"},s="Private transactions (Deprecated)",c={id:"private-networks/concepts/privacy/private-transactions/index",title:"Private transactions (Deprecated)",description:"Private transaction overview",source:"@site/docs/private-networks/concepts/privacy/private-transactions/index.md",sourceDirName:"private-networks/concepts/privacy/private-transactions",slug:"/private-networks/concepts/privacy/private-transactions/",permalink:"/private-networks/concepts/privacy/private-transactions/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/concepts/privacy/private-transactions/index.md",tags:[],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{description:"Private transaction overview"},sidebar:"privateDocSidebar",previous:{title:"Privacy",permalink:"/private-networks/concepts/privacy/"},next:{title:"Private transaction processing",permalink:"/private-networks/concepts/privacy/private-transactions/processing"}},o={},d=[{value:"Besu and Tessera keys",id:"besu-and-tessera-keys",level:2},{value:"Nonces",id:"nonces",level:2},{value:"Private transaction nonce",id:"private-transaction-nonce",level:3},{value:"Private nonce validation",id:"private-nonce-validation",level:3},{value:"Private nonce management",id:"private-nonce-management",level:3}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"private-transactions-deprecated",children:"Private transactions (Deprecated)"})}),"\n",(0,i.jsx)(n.admonition,{type:"caution",children:(0,i.jsxs)(n.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,i.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,i.jsx)(n.p,{children:"Private transactions have the same parameters as public Ethereum transactions, with the following additions:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"privateFrom"})," - The Tessera public key of the transaction sender."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"One of the following:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"privateFor"})," - The Tessera public keys of the transaction recipients."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"privacyGroupId"})," - ",(0,i.jsx)(n.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"The privacy group to receive the transaction"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"restriction"})," - Whether the private transaction is ",(0,i.jsx)(n.code,{children:"restricted"})," or ",(0,i.jsx)(n.code,{children:"unrestricted"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"restricted"})," - Only the nodes participating in the transaction receive and store the payload of the private transaction."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"unrestricted"})," - All nodes in the network receive the payload of the private transaction, but only the nodes participating in the transaction can read the transaction."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["Besu implements ",(0,i.jsx)(n.code,{children:"restricted"})," private transactions only."]})}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"gas"})," and ",(0,i.jsx)(n.code,{children:"gasPrice"})," are used by the ",(0,i.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy marker transaction (PMT)"}),", not the private transaction itself."]}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["Because gas isn't required in private transactions, inefficient contracts deployed accidentally or deliberately can cause performance issues in privacy-enabled networks. Ensure your network has a mechanism to ",(0,i.jsx)(n.a,{href:"/private-networks/concepts/privacy/#privacy-enabled-networks",children:"establish trust offchain"}),"."]})}),"\n",(0,i.jsxs)(n.p,{children:["You can ",(0,i.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/private-transactions",children:"create and send private transactions"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"besu-and-tessera-keys",children:"Besu and Tessera keys"}),"\n",(0,i.jsxs)(n.p,{children:["Besu and Tessera nodes both have public/private key pairs identifying them. A Besu node sending a private transaction to a Tessera node signs the transaction with the Besu node private key. The ",(0,i.jsx)(n.code,{children:"privateFrom"})," and ",(0,i.jsx)(n.code,{children:"privateFor"})," parameters specified in the RLP-encoded transaction string for ",(0,i.jsx)(n.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,i.jsx)(n.code,{children:"eea_sendRawTransaction"})})," are the public keys of the Tessera nodes sending and receiving the transaction."]}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsx)(n.p,{children:"The mapping of Besu node addresses to Tessera node public keys is offchain. That is, the sender of a private transaction must know the Tessera node public key of the recipient."})}),"\n",(0,i.jsx)(n.h2,{id:"nonces",children:"Nonces"}),"\n",(0,i.jsx)(n.p,{children:"A nonce is the number of previous transactions made by the sender."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"Private transaction processing"})," involves two transactions: the private transaction distributed to involved participants, and the privacy marker transaction (PMT) included on the public blockchain. Each of these transactions has its own nonce. Since the PMT is a public transaction, the PMT nonce is the public nonce for the account."]}),"\n",(0,i.jsx)(n.h3,{id:"private-transaction-nonce",children:"Private transaction nonce"}),"\n",(0,i.jsxs)(n.p,{children:["Besu maintains separate private states for each ",(0,i.jsx)(n.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"privacy group"}),". The private transaction nonce for an account is specific to the privacy group. That is, the nonce for account A for privacy group ABC is different to the nonce for account A for privacy group AB."]}),"\n",(0,i.jsx)(n.h3,{id:"private-nonce-validation",children:"Private nonce validation"}),"\n",(0,i.jsxs)(n.p,{children:["Unlike public transactions, private transactions are not submitted to the ",(0,i.jsx)(n.a,{href:"/public-networks/concepts/transactions/pool",children:"transaction pool"}),". The private transaction is distributed directly to the participants in the transaction, and the PMT is submitted to the transaction pool."]}),"\n",(0,i.jsxs)(n.p,{children:["Unlike ",(0,i.jsx)(n.a,{href:"/public-networks/concepts/transactions/validation",children:"public transaction nonces"}),", private transaction nonces aren't validated when the private transaction is submitted. If a private transaction has an incorrect nonce, the PMT is still valid and is added to a block. However, in this scenario, the private transaction execution fails when ",(0,i.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"processing the PMT"})," for the private transaction with the incorrect nonce."]}),"\n",(0,i.jsx)(n.p,{children:"The following private transaction flow illustrates when nonce validation occurs:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Submit a private transaction with a ",(0,i.jsx)(n.a,{href:"#private-transaction-nonce",children:"nonce value"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"The private transaction is distributed to all participants in the privacy group."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["The PMT is created and submitted to the transaction pool with a nonce of ",(0,i.jsx)(n.code,{children:"0"})," if using one-time accounts. If using a specific account with ",(0,i.jsx)(n.a,{href:"/private-networks/reference/cli/options#privacy-marker-transaction-signing-key-file-deprecated",children:(0,i.jsx)(n.code,{children:"--privacy-marker-transaction-signing-key-file"})}),", the public nonce for that account is obtained and used for the PMT."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"The PMT is mined and included in the block."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"After the block containing the PMT is imported, and the PMT is processed, the private transaction is retrieved from the private transaction manager and executed."}),"\n",(0,i.jsx)(n.p,{children:"If the private transaction was submitted with a correct nonce in step 1, the nonce is validated as correct. If an incorrect nonce was submitted, the private transaction execution fails."}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"private-nonce-management",children:"Private nonce management"}),"\n",(0,i.jsxs)(n.p,{children:["In Besu, you call ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#eth_gettransactioncount",children:(0,i.jsx)(n.code,{children:"eth_getTransactionCount"})})," to get a nonce, then use that nonce with ",(0,i.jsx)(n.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,i.jsx)(n.code,{children:"eea_sendRawTransaction"})})," to send a private transaction."]}),"\n",(0,i.jsxs)(n.p,{children:["However, when you send multiple transactions in row, if a subsequent call to ",(0,i.jsx)(n.code,{children:"getTransactionCount"})," happens before a previous transaction is processed, you can get the same nonce again."]}),"\n",(0,i.jsx)(n.p,{children:"You can manage private nonces in multiple ways:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Let Besu handle it. You just need to wait long enough between calls to ",(0,i.jsx)(n.code,{children:"sendRawTransaction"})," for the transactions to process. The current window is around 1.5 seconds, depending on block time."]}),"\n",(0,i.jsxs)(n.p,{children:["Public transactions deal with this issue, but the window is shorter, since you can use the transaction pool to take into account pending transactions (by using ",(0,i.jsx)(n.code,{children:'eth_getTransactionCount("pending")'}),")."]}),"\n",(0,i.jsx)(n.p,{children:"For private transactions, the window is longer because private transactions aren't submitted to the transaction pool. You must wait until the private transaction's corresponding PMT is included in a block."}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Manage the nonce yourself, by keeping track of and providing the nonce at each call. We recommend this if you're ",(0,i.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/concurrent-private-transactions",children:"sending many transactions that are independent of each other"}),"."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["You can use ",(0,i.jsx)(n.a,{href:"/private-networks/reference/api/#priv_gettransactioncount",children:(0,i.jsx)(n.code,{children:"priv_getTransactionCount"})})," or ",(0,i.jsx)(n.a,{href:"/private-networks/reference/api/#priv_geteeatransactioncount",children:(0,i.jsx)(n.code,{children:"priv_getEeaTransactionCount"})})," to get the nonce for an account for the specified privacy group or participants."]})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.a,{href:"https://github.com/ConsenSys/web3js-quorum/blob/9a0f9eb1b91a4a0d93801f77782b509ae2e7314c/example/concurrentPrivateTransactions/concurrentPrivateTransactions.js",children:"web3js-quorum library includes an example"})," of nonce management when ",(0,i.jsx)(n.a,{href:"/private-networks/how-to/send-transactions/concurrent-private-transactions",children:"sending concurrent private transactions"}),". The example calculates the correct nonces for the private transactions and PMTs outside of Besu."]})})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>c});var i=t(96540);const a={},r=i.createContext(a);function s(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),i.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dbf86eb1.d639f11a.js b/assets/js/dbf86eb1.d639f11a.js new file mode 100644 index 00000000000..05c5b3cd4d0 --- /dev/null +++ b/assets/js/dbf86eb1.d639f11a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[9291],{26036:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>i,default:()=>f,frontMatter:()=>o,metadata:()=>s,toc:()=>d});var c=n(74848),r=n(28453);const o={title:"Pre-deploy a contract",description:"Pre-deploying contracts in the genesis file",sidebar_position:5,tags:["private networks"]},i="Pre-deploy contracts in the genesis file",s={id:"private-networks/how-to/configure/contracts",title:"Pre-deploy a contract",description:"Pre-deploying contracts in the genesis file",source:"@site/docs/private-networks/how-to/configure/contracts.md",sourceDirName:"private-networks/how-to/configure",slug:"/private-networks/how-to/configure/contracts",permalink:"/private-networks/how-to/configure/contracts",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/configure/contracts.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:5,frontMatter:{title:"Pre-deploy a contract",description:"Pre-deploying contracts in the genesis file",sidebar_position:5,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Validators",permalink:"/private-networks/how-to/configure/validators"},next:{title:"Client and server TLS",permalink:"/private-networks/how-to/configure/tls/client-and-server"}},a={},d=[];function l(e){const t={a:"a",code:"code",h1:"h1",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(t.header,{children:(0,c.jsx)(t.h1,{id:"pre-deploy-contracts-in-the-genesis-file",children:"Pre-deploy contracts in the genesis file"})}),"\n",(0,c.jsxs)(t.p,{children:["To pre-deploy contracts when starting Besu, specify the contract code in the ",(0,c.jsx)(t.a,{href:"/public-networks/concepts/genesis-file",children:"genesis file"}),"."]}),"\n",(0,c.jsx)(t.pre,{children:(0,c.jsx)(t.code,{className:"language-json",metastring:'title="Contract code in the genesis file"',children:'{\n ...\n "alloc": {\n "0x0ffd23af8eebc60b3cfdeed6f814988757237314": {\n "balance": "0x100000000000000000000000000000000000000000000000000",\n "code": "0x6080604052600436106043576000357c010000000000000000000000000000000000000000000000000000000090048063010fc84214604857806355241077146070575b600080fd5b348015605357600080fd5b50605a60a7565b6040518082815260200191505060405180910390f35b348015607b57600080fd5b5060a560048036036020811015609057600080fd5b810190808035906020019092919050505060ad565b005b60005481565b80600081905550807f04474795f5b996ff80cb47c148d4c5ccdbe09ef27551820caa9c2f8ed149cce360405160405180910390a25056fea165627a7a7230582038cb7ea327af8f73feabcfbff64498f1e74831e67f7c75286760d3845c6747c70029",\n "storage": {\n "7aa07e0c924147697605046b7c2c32645b7bbfb41e0ac5d0a84ac93cbb759798": "0000000000000000000000000000000000000000000000000000000000000001",\n "cea2b0602db61f92b76ec4402875cc38eedc9fc425cb1b697fc2265d50fc20fb": "0000000000000000000000000000000000000000000000000000000000000001",\n }\n }\n },\n ...\n}\n'})}),"\n",(0,c.jsx)(t.p,{children:"The contract code in the genesis file defines the:"}),"\n",(0,c.jsxs)(t.ul,{children:["\n",(0,c.jsx)(t.li,{children:"Address."}),"\n",(0,c.jsx)(t.li,{children:"Balance."}),"\n",(0,c.jsx)(t.li,{children:"Bytecode."}),"\n",(0,c.jsx)(t.li,{children:"Key value pairs for contract storage."}),"\n"]})]})}function f(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,c.jsx)(t,{...e,children:(0,c.jsx)(l,{...e})}):l(e)}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>s});var c=n(96540);const r={},o=c.createContext(r);function i(e){const t=c.useContext(o);return c.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),c.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dd3e5b84.b9ec0db0.js b/assets/js/dd3e5b84.b9ec0db0.js new file mode 100644 index 00000000000..0bf90ff1863 --- /dev/null +++ b/assets/js/dd3e5b84.b9ec0db0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7806],{37473:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>u,frontMatter:()=>a,metadata:()=>l,toc:()=>h});var r=s(74848),i=s(28453),t=s(11470),o=s(19365);const a={title:"Create a permissioned network",sidebar_position:1,description:"Besu create a permissioned network",toc_max_heading_level:3,tags:["private networks"]},d="Create a permissioned network",l={id:"private-networks/tutorials/permissioning/index",title:"Create a permissioned network",description:"Besu create a permissioned network",source:"@site/docs/private-networks/tutorials/permissioning/index.md",sourceDirName:"private-networks/tutorials/permissioning",slug:"/private-networks/tutorials/permissioning/",permalink:"/private-networks/tutorials/permissioning/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/permissioning/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Create a permissioned network",sidebar_position:1,description:"Besu create a permissioned network",toc_max_heading_level:3,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Create a privacy-enabled network using the Quorum Developer Quickstart (Deprecated)",permalink:"/private-networks/tutorials/privacy/quickstart"},next:{title:"Deploy a smart contract",permalink:"/private-networks/tutorials/contracts/"}},c={},h=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Steps",id:"steps",level:2},{value:"1. Create folders",id:"1-create-folders",level:3},{value:"2. Create the configuration file",id:"2-create-the-configuration-file",level:3},{value:"3. Generate node keys and a genesis file",id:"3-generate-node-keys-and-a-genesis-file",level:3},{value:"4. Copy the genesis file to the Permissioned-Network directory",id:"4-copy-the-genesis-file-to-the-permissioned-network-directory",level:3},{value:"5. Copy the node private keys to the node directories",id:"5-copy-the-node-private-keys-to-the-node-directories",level:3},{value:"6. Create the permissions configuration file",id:"6-create-the-permissions-configuration-file",level:3},{value:"7. Start Node-1",id:"7-start-node-1",level:3},{value:"8. Start Node-2",id:"8-start-node-2",level:3},{value:"9. Start Node-3",id:"9-start-node-3",level:3},{value:"10. Start Node-4",id:"10-start-node-4",level:3},{value:"11. Add enode URLs for nodes to permissions configuration file",id:"11-add-enode-urls-for-nodes-to-permissions-configuration-file",level:3},{value:"12. Add nodes as peers",id:"12-add-nodes-as-peers",level:3},{value:"13. Confirm permissioned network is working",id:"13-confirm-permissioned-network-is-working",level:3},{value:"Check peer count",id:"check-peer-count",level:4},{value:"Send a transaction from an account in the allowlist",id:"send-a-transaction-from-an-account-in-the-allowlist",level:4},{value:"Try sending a transaction from an account not in the accounts allowlist",id:"try-sending-a-transaction-from-an-account-not-in-the-accounts-allowlist",level:4},{value:"Start a node not on the nodes allowlist",id:"start-a-node-not-on-the-nodes-allowlist",level:4},{value:"Stop nodes",id:"stop-nodes",level:2}];function p(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"create-a-permissioned-network",children:"Create a permissioned network"})}),"\n",(0,r.jsxs)(n.p,{children:["The following steps set up a permissioned network with local node and account permissions. The network uses the ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft",children:"IBFT 2.0 proof of authority consensus protocol"}),"."]}),"\n",(0,r.jsx)(n.admonition,{type:"danger",children:(0,r.jsx)(n.p,{children:"A permissioned Ethereum network as described here is not protected against all attack vectors. We recommend applying defense in depth to protect your infrastructure."})}),"\n",(0,r.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/private-networks/get-started/install/binary-distribution",children:"Besu"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://curl.haxx.se/download.html",children:"curl (or similar Web service client)"})}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"steps",children:"Steps"}),"\n",(0,r.jsx)(n.h3,{id:"1-create-folders",children:"1. Create folders"}),"\n",(0,r.jsx)(n.p,{children:"Each node requires a data directory for the blockchain data."}),"\n",(0,r.jsx)(n.p,{children:"Create directories for your permissioned network and each of the three nodes, and a data directory for each node:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"Permissioned-Network/\n\u251c\u2500\u2500 Node-1\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u251c\u2500\u2500 Node-2\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2514\u2500\u2500 Node-3\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2514\u2500\u2500 Node-4\n \u251c\u2500\u2500 data\n"})}),"\n",(0,r.jsx)(n.h3,{id:"2-create-the-configuration-file",children:"2. Create the configuration file"}),"\n",(0,r.jsxs)(n.p,{children:["The configuration file defines the ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft#genesis-file",children:"IBFT 2.0 genesis file"})," and the number of node key pairs to generate."]}),"\n",(0,r.jsxs)(n.p,{children:["The configuration file has two nested JSON nodes. The first is the ",(0,r.jsx)(n.code,{children:"genesis"})," property defining the IBFT 2.0 genesis file, except for the ",(0,r.jsx)(n.code,{children:"extraData"})," string, which Besu generates automatically in the resulting genesis file. The second is the ",(0,r.jsx)(n.code,{children:"blockchain"})," property defining the number of key pairs to generate."]}),"\n",(0,r.jsxs)(n.p,{children:["Copy the following configuration file definition to a file called ",(0,r.jsx)(n.code,{children:"ibftConfigFile.json"})," and save it in the ",(0,r.jsx)(n.code,{children:"Permissioned-Network"})," directory:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "genesis": {\n "config": {\n "chainId": 1337,\n "berlinBlock": 0,\n "ibft2": {\n "blockperiodseconds": 2,\n "epochlength": 30000,\n "requesttimeoutseconds": 4\n }\n },\n "nonce": "0x0",\n "timestamp": "0x58ee40ba",\n "gasLimit": "0x47b760",\n "difficulty": "0x1",\n "mixHash": "0x63746963616c2062797a616e74696e65206661756c7420746f6c6572616e6365",\n "coinbase": "0x0000000000000000000000000000000000000000",\n "alloc": {\n "fe3b557e8fb62b89f4916b721be55ceb828dbd73": {\n "privateKey": "8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63",\n "comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",\n "balance": "0xad78ebc5ac6200000"\n },\n "627306090abaB3A6e1400e9345bC60c78a8BEf57": {\n "privateKey": "c87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3",\n "comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",\n "balance": "90000000000000000000000"\n },\n "f17f52151EbEF6C7334FAD080c5704D77216b732": {\n "privateKey": "ae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f",\n "comment": "private key and this comment are ignored. In a real chain, the private key should NOT be stored",\n "balance": "90000000000000000000000"\n }\n }\n },\n "blockchain": {\n "nodes": {\n "generate": true,\n "count": 4\n }\n }\n}\n'})}),"\n",(0,r.jsx)(n.admonition,{title:"Security warning",type:"danger",children:(0,r.jsx)(n.p,{children:"Don't use the accounts in the genesis file on Mainnet or any public network except for testing. The private keys display, which means the accounts are not secure."})}),"\n",(0,r.jsx)(n.h3,{id:"3-generate-node-keys-and-a-genesis-file",children:"3. Generate node keys and a genesis file"}),"\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.code,{children:"Permissioned-Network"})," directory, generate the node key and genesis file:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"besu operator generate-blockchain-config --config-file=ibftConfigFile.json --to=networkFiles --private-key-file-name=key\n"})}),"\n",(0,r.jsxs)(n.p,{children:["Besu creates the following in the ",(0,r.jsx)(n.code,{children:"networkFiles"})," directory:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:"genesis.json"})," - The genesis file including the ",(0,r.jsx)(n.code,{children:"extraData"})," property specifying the four nodes are validators."]}),"\n",(0,r.jsx)(n.li,{children:"A directory for each node named using the node address and containing the public and private key for each node."}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"networkFiles/\n\u251c\u2500\u2500 genesis.json\n\u2514\u2500\u2500 keys\n \u251c\u2500\u2500 0x438821c42b812fecdcea7fe8235806a412712fc0\n \u2502\xa0\xa0 \u251c\u2500\u2500 key\n \u2502\xa0\xa0 \u2514\u2500\u2500 key.pub\n \u251c\u2500\u2500 0xca9c2dfa62f4589827c0dd7dcf48259aa29f22f5\n \u2502\xa0\xa0 \u251c\u2500\u2500 key\n \u2502\xa0\xa0 \u2514\u2500\u2500 key.pub\n \u251c\u2500\u2500 0xcd5629bd37155608a0c9b28c4fd19310d53b3184\n \u2502\xa0\xa0 \u251c\u2500\u2500 key\n \u2502\xa0\xa0 \u2514\u2500\u2500 key.pub\n \u2514\u2500\u2500 0xe96825c5ab8d145b9eeca1aba7ea3695e034911a\n \u251c\u2500\u2500 key\n \u2514\u2500\u2500 key.pub\n"})}),"\n",(0,r.jsx)(n.h3,{id:"4-copy-the-genesis-file-to-the-permissioned-network-directory",children:"4. Copy the genesis file to the Permissioned-Network directory"}),"\n",(0,r.jsxs)(n.p,{children:["Copy the ",(0,r.jsx)(n.code,{children:"genesis.json"})," file to the ",(0,r.jsx)(n.code,{children:"Permissioned-Network"})," directory."]}),"\n",(0,r.jsx)(n.h3,{id:"5-copy-the-node-private-keys-to-the-node-directories",children:"5. Copy the node private keys to the node directories"}),"\n",(0,r.jsxs)(n.p,{children:["For each node, copy the key files to the ",(0,r.jsx)(n.code,{children:"data"})," directory for that node"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"Permissioned-Network/\n\u251c\u2500\u2500 genesis.json\n\u251c\u2500\u2500 Node-1\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key.pub\n\u251c\u2500\u2500 Node-2\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key.pub\n\u251c\u2500\u2500 Node-3\n\u2502\xa0\xa0 \u251c\u2500\u2500 data\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key.pub\n\u251c\u2500\u2500 Node-4\n\u2502 \u251c\u2500\u2500 data\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key\n\u2502 \u2502 \xa0\xa0 \u251c\u2500\u2500 key.pub\n"})}),"\n",(0,r.jsx)(n.h3,{id:"6-create-the-permissions-configuration-file",children:"6. Create the permissions configuration file"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/use-permissioning/local#permissions-configuration-file",children:"permissions configuration file"})," defines the nodes and accounts allowlists."]}),"\n",(0,r.jsxs)(n.p,{children:["Copy the following permissions configuration to a file called ",(0,r.jsx)(n.code,{children:"permissions_config.toml"})," and save a copy in the ",(0,r.jsx)(n.code,{children:"Node-1/data"}),", ",(0,r.jsx)(n.code,{children:"Node-2/data"}),", ",(0,r.jsx)(n.code,{children:"Node-3/data"}),", and ",(0,r.jsx)(n.code,{children:"Node-4/data"})," directories:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-toml",metastring:'title="permissions_config.toml"',children:'accounts-allowlist=["0xfe3b557e8fb62b89f4916b721be55ceb828dbd73", "0x627306090abaB3A6e1400e9345bC60c78a8BEf57"]\n\nnodes-allowlist=[]\n'})}),"\n",(0,r.jsx)(n.p,{children:"The permissions configuration file includes the first two accounts from the genesis file."}),"\n",(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#perm_addnodestoallowlist",children:(0,r.jsx)(n.code,{children:"perm_addNodesToAllowlist"})})," JSON-RPC API method to add permissioned nodes after starting the nodes."]}),"\n",(0,r.jsx)(n.h3,{id:"7-start-node-1",children:"7. Start Node-1"}),"\n",(0,r.jsx)(n.p,{children:"Use the following command:"}),"\n",(0,r.jsxs)(t.A,{children:[(0,r.jsx)(o.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --permissions-nodes-config-file-enabled --permissions-accounts-config-file-enabled --rpc-http-enabled --rpc-http-api=ADMIN,ETH,NET,PERM,IBFT --host-allowlist="*" --rpc-http-cors-origins="*" --profile=ENTERPRISE\n'})})}),(0,r.jsx)(o.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\genesis.json --permissions-nodes-config-file-enabled --permissions-accounts-config-file-enabled --rpc-http-enabled --rpc-http-api=ADMIN,ETH,NET,PERM,IBFT --host-allowlist="*" --rpc-http-cors-origins="*" --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:"The command line enables:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Nodes and accounts permissions using ",(0,r.jsx)(n.a,{href:"/private-networks/reference/cli/options#permissions-nodes-config-file-enabled",children:(0,r.jsx)(n.code,{children:"--permissions-nodes-config-file-enabled"})})," and ",(0,r.jsx)(n.a,{href:"/private-networks/reference/cli/options#permissions-accounts-config-file-enabled",children:(0,r.jsx)(n.code,{children:"--permissions-accounts-config-file-enabled"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["The JSON-RPC API using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-enabled",children:(0,r.jsx)(n.code,{children:"--rpc-http-enabled"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["The ",(0,r.jsx)(n.code,{children:"ADMIN"}),", ",(0,r.jsx)(n.code,{children:"ETH"}),", ",(0,r.jsx)(n.code,{children:"NET"}),", ",(0,r.jsx)(n.code,{children:"PERM"}),", and ",(0,r.jsx)(n.code,{children:"IBFT"})," APIs using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,r.jsx)(n.code,{children:"--rpc-http-api"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["All-host access to the HTTP JSON-RPC API using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#host-allowlist",children:(0,r.jsx)(n.code,{children:"--host-allowlist"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["All-domain access to the node through the HTTP JSON-RPC API using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-cors-origins",children:(0,r.jsx)(n.code,{children:"--rpc-http-cors-origins"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["The ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/profile#enterpriseprivate-profile",children:"enterprise/private profile"}),"\nusing the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#profile",children:(0,r.jsx)(n.code,{children:"--profile"})})," option."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["When the node starts, the ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," displays. You need the enode URL to specify Node-1 as a peer and update the permissions configuration file in the following steps."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Node 1 Enode URL",src:s(14739).A+"",width:"988",height:"126"})}),"\n",(0,r.jsx)(n.h3,{id:"8-start-node-2",children:"8. Start Node-2"}),"\n",(0,r.jsxs)(n.p,{children:["Start another terminal, change to the ",(0,r.jsx)(n.code,{children:"Node-2"})," directory, and start Node-2:"]}),"\n",(0,r.jsxs)(t.A,{children:[(0,r.jsx)(o.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --permissions-nodes-config-file-enabled --permissions-accounts-config-file-enabled --rpc-http-enabled --rpc-http-api=ADMIN,ETH,NET,PERM,IBFT --host-allowlist="*" --rpc-http-cors-origins="*" --p2p-port=30304 --rpc-http-port=8546 --profile=ENTERPRISE\n'})})}),(0,r.jsx)(o.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\genesis.json --permissions-nodes-config-file-enabled --permissions-accounts-config-file-enabled --rpc-http-enabled --rpc-http-api=ADMIN,ETH,NET,PERM,IBFT --host-allowlist="*" --rpc-http-cors-origins="*" --p2p-port=30304 --rpc-http-port=8546 --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:"The command line specifies:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["A different port to Node-1 for P2P discovery using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,r.jsx)(n.code,{children:"--p2p-port"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["A different port to Node-1 for HTTP JSON-RPC using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,r.jsx)(n.code,{children:"--rpc-http-port"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["A data directory for Node-2 using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(n.code,{children:"--data-path"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Other options as for ",(0,r.jsx)(n.a,{href:"#7-start-node-1",children:"Node-1"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["When the node starts, the ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," displays. You need the enode URL to update the permissions configuration file in the following steps."]}),"\n",(0,r.jsx)(n.h3,{id:"9-start-node-3",children:"9. Start Node-3"}),"\n",(0,r.jsxs)(n.p,{children:["Start another terminal, change to the ",(0,r.jsx)(n.code,{children:"Node-3"})," directory, and start Node-3:"]}),"\n",(0,r.jsxs)(t.A,{children:[(0,r.jsx)(o.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --permissions-nodes-config-file-enabled --permissions-accounts-config-file-enabled --rpc-http-enabled --rpc-http-api=ADMIN,ETH,NET,PERM,IBFT --host-allowlist="*" --rpc-http-cors-origins="*" --p2p-port=30305 --rpc-http-port=8547 --profile=ENTERPRISE\n'})})}),(0,r.jsx)(o.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\genesis.json --permissions-nodes-config-file-enabled --permissions-accounts-config-file-enabled --rpc-http-enabled --rpc-http-api=ADMIN,ETH,NET,PERM,IBFT --host-allowlist="*" --rpc-http-cors-origins="*" --p2p-port=30305 --rpc-http-port=8547 --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:"The command line specifies:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["A different port to Node-1 and Node-2 for P2P discovery using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,r.jsx)(n.code,{children:"--p2p-port"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["A different port to Node-1 and Node-2 for HTTP JSON-RPC using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,r.jsx)(n.code,{children:"--rpc-http-port"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["A data directory for Node-3 using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(n.code,{children:"--data-path"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Other options as for ",(0,r.jsx)(n.a,{href:"#7-start-node-1",children:"Node-1"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["When the node starts, the ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," displays. You need the enode URL to update the permissions configuration file in the following steps."]}),"\n",(0,r.jsx)(n.h3,{id:"10-start-node-4",children:"10. Start Node-4"}),"\n",(0,r.jsxs)(n.p,{children:["Start another terminal, change to the ",(0,r.jsx)(n.code,{children:"Node-4"})," directory, and start Node-4:"]}),"\n",(0,r.jsxs)(t.A,{children:[(0,r.jsx)(o.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=../genesis.json --permissions-nodes-config-file-enabled --permissions-accounts-config-file-enabled --rpc-http-enabled --rpc-http-api=ADMIN,ETH,NET,PERM,IBFT --host-allowlist="*" --rpc-http-cors-origins="*" --p2p-port=30306 --rpc-http-port=8548 --profile=ENTERPRISE\n'})})}),(0,r.jsx)(o.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --genesis-file=..\\genesis.json --permissions-nodes-config-file-enabled --permissions-accounts-config-file-enabled --rpc-http-enabled --rpc-http-api=ADMIN,ETH,NET,PERM,IBFT --host-allowlist="*" --rpc-http-cors-origins="*" --p2p-port=30306 --rpc-http-port=8548 --profile=ENTERPRISE\n'})})})]}),"\n",(0,r.jsx)(n.p,{children:"The command line specifies:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["A different port to Node-1, Node-2, and Node-3 for P2P discovery using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,r.jsx)(n.code,{children:"--p2p-port"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["A different port to Node-1, Node-2, and Node-3 for HTTP JSON-RPC using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,r.jsx)(n.code,{children:"--rpc-http-port"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["A data directory for Node-4 using ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(n.code,{children:"--data-path"})}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Other options as for ",(0,r.jsx)(n.a,{href:"#7-start-node-1",children:"Node-1"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["When the node starts, the ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode URL"})," displays. You need the enode URL to update the permissions configuration file in the following steps."]}),"\n",(0,r.jsx)(n.h3,{id:"11-add-enode-urls-for-nodes-to-permissions-configuration-file",children:"11. Add enode URLs for nodes to permissions configuration file"}),"\n",(0,r.jsxs)(n.p,{children:["Start another terminal and use the ",(0,r.jsx)(n.a,{href:"/private-networks/reference/api/#perm_addnodestoallowlist",children:(0,r.jsx)(n.code,{children:"perm_addNodesToAllowlist"})})," JSON-RPC API method to add the nodes to the permissions configuration file for each node."]}),"\n",(0,r.jsxs)(n.p,{children:["Replace ",(0,r.jsx)(n.code,{children:""}),", ",(0,r.jsx)(n.code,{children:""}),", ",(0,r.jsx)(n.code,{children:""}),", and ",(0,r.jsx)(n.code,{children:""})," with the enode URL displayed when starting each node."]}),"\n",(0,r.jsxs)(t.A,{children:[(0,r.jsx)(o.A,{value:"Node-1",label:"Node-1",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"perm_addNodesToAllowlist","params":[["","","","EnodeNode4"]], "id":1}\' http://127.0.0.1:8545\n'})})}),(0,r.jsx)(o.A,{value:"Node-2",label:"Node-2",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"perm_addNodesToAllowlist","params":[["","","","EnodeNode4"]], "id":1}\' http://127.0.0.1:8546\n'})})}),(0,r.jsx)(o.A,{value:"Node-3",label:"Node-3",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"perm_addNodesToAllowlist","params":[["","","","EnodeNode4"]], "id":1}\' http://127.0.0.1:8547\n'})})}),(0,r.jsx)(o.A,{value:"Node-4",label:"Node-4",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"perm_addNodesToAllowlist","params":[["","","","EnodeNode4"]], "id":1}\' http://127.0.0.1:8548\n'})})})]}),"\n",(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsx)(n.p,{children:"The curl call is the same for each node except for the JSON-RPC endpoint."})}),"\n",(0,r.jsx)(n.h3,{id:"12-add-nodes-as-peers",children:"12. Add nodes as peers"}),"\n",(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#admin_addpeer",children:(0,r.jsx)(n.code,{children:"admin_addPeer"})})," JSON-RPC API method to add Node-1 as a peer for Node-2, Node-3, and Node-4."]}),"\n",(0,r.jsxs)(n.p,{children:["Replace ",(0,r.jsx)(n.code,{children:""})," with the enode URL displayed when starting Node-1."]}),"\n",(0,r.jsxs)(t.A,{children:[(0,r.jsx)(o.A,{value:"Node-2",label:"Node-2",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"admin_addPeer","params":[""],"id":1}\' http://127.0.0.1:8546\n'})})}),(0,r.jsx)(o.A,{value:"Node-3",label:"Node-3",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"admin_addPeer","params":[""],"id":1}\' http://127.0.0.1:8547\n'})})}),(0,r.jsx)(o.A,{value:"Node-4",label:"Node-4",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"admin_addPeer","params":[""],"id":1}\' http://127.0.0.1:8548\n'})})})]}),"\n",(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsx)(n.p,{children:"The curl call is the same for each node except for the JSON-RPC endpoint."})}),"\n",(0,r.jsxs)(n.p,{children:["Replace ",(0,r.jsx)(n.code,{children:""})," with the enode URL displayed when starting Node-2."]}),"\n",(0,r.jsxs)(t.A,{children:[(0,r.jsx)(o.A,{value:"Node-3",label:"Node-3",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"admin_addPeer","params":[""],"id":1}\' http://127.0.0.1:8547\n'})})}),(0,r.jsx)(o.A,{value:"Node-4",label:"Node-4",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"admin_addPeer","params":[""],"id":1}\' http://127.0.0.1:8548\n'})})})]}),"\n",(0,r.jsxs)(n.p,{children:["Replace ",(0,r.jsx)(n.code,{children:""})," with the enode URL displayed when starting Node-3."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"admin_addPeer","params":[""],"id":1}\' http://127.0.0.1:8548\n'})}),"\n",(0,r.jsx)(n.h3,{id:"13-confirm-permissioned-network-is-working",children:"13. Confirm permissioned network is working"}),"\n",(0,r.jsx)(n.h4,{id:"check-peer-count",children:"Check peer count"}),"\n",(0,r.jsxs)(n.p,{children:["Use curl to call the JSON-RPC API ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#net_peercount",children:(0,r.jsx)(n.code,{children:"net_peerCount"})})," method and confirm the nodes are functioning as peers:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}\' localhost:8545\n'})}),"\n",(0,r.jsx)(n.p,{children:"The result confirms Node-1 (the node running the JSON-RPC service) has three peers (Node-2, Node-3 and Node-4):"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x3"\n}\n'})}),"\n",(0,r.jsx)(n.h4,{id:"send-a-transaction-from-an-account-in-the-allowlist",children:"Send a transaction from an account in the allowlist"}),"\n",(0,r.jsxs)(n.p,{children:["Import the first account from the genesis file into MetaMask and send transactions, as described in the ",(0,r.jsx)(n.a,{href:"/private-networks/tutorials/quickstart#create-a-transaction-using-metamask",children:"Quickstart tutorial"}),":"]}),"\n",(0,r.jsx)(n.admonition,{title:"Account 1",type:"info",children:(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Address: ",(0,r.jsx)(n.code,{children:"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"})]}),"\n",(0,r.jsxs)(n.li,{children:["Private key : ",(0,r.jsx)(n.code,{children:"0x8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63"})]}),"\n",(0,r.jsxs)(n.li,{children:["Initial balance : ",(0,r.jsx)(n.code,{children:"0xad78ebc5ac6200000"})," (200000000000000000000 in decimal)"]}),"\n"]})}),"\n",(0,r.jsx)(n.admonition,{type:"info",children:(0,r.jsxs)(n.p,{children:["Besu doesn't support ",(0,r.jsx)(n.a,{href:"/public-networks/how-to/send-transactions",children:"private key management"}),"."]})}),"\n",(0,r.jsx)(n.h4,{id:"try-sending-a-transaction-from-an-account-not-in-the-accounts-allowlist",children:"Try sending a transaction from an account not in the accounts allowlist"}),"\n",(0,r.jsxs)(n.p,{children:["Import the third account from the genesis file into MetaMask and try to send a transaction, as described in the ",(0,r.jsx)(n.a,{href:"/private-networks/tutorials/quickstart#create-a-transaction-using-metamask",children:"Quickstart tutorial"}),":"]}),"\n",(0,r.jsx)(n.admonition,{title:"Account 3",type:"info",children:(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Address: ",(0,r.jsx)(n.code,{children:"0xf17f52151EbEF6C7334FAD080c5704D77216b732"})]}),"\n",(0,r.jsxs)(n.li,{children:["Private key: ",(0,r.jsx)(n.code,{children:"0xae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f"})]}),"\n",(0,r.jsxs)(n.li,{children:["Initial balance: ",(0,r.jsx)(n.code,{children:"0x90000000000000000000000"})," (2785365088392105618523029504 in decimal)"]}),"\n"]})}),"\n",(0,r.jsx)(n.h4,{id:"start-a-node-not-on-the-nodes-allowlist",children:"Start a node not on the nodes allowlist"}),"\n",(0,r.jsxs)(n.p,{children:["In your ",(0,r.jsx)(n.code,{children:"Permissioned-Network"})," directory, create a ",(0,r.jsx)(n.code,{children:"Node-5"})," directory and ",(0,r.jsx)(n.code,{children:"data"})," directory inside it."]}),"\n",(0,r.jsxs)(n.p,{children:["Change to the ",(0,r.jsx)(n.code,{children:"Node-5"})," directory and start Node-5 specifying the Node-1 enode URL as the bootnode:"]}),"\n",(0,r.jsxs)(t.A,{children:[(0,r.jsx)(o.A,{value:"MacOS",label:"MacOS",default:!0,children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --bootnodes="" --genesis-file=../genesis.json --rpc-http-enabled --rpc-http-api=ADMIN,ETH,NET,PERM,IBFT --host-allowlist="*" --rpc-http-cors-origins="*" --p2p-port=30307 --rpc-http-port=8549\n'})})}),(0,r.jsx)(o.A,{value:"Windows",label:"Windows",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'besu --data-path=data --bootnodes="" --genesis-file=..\\genesis.json --rpc-http-enabled --rpc-http-api=ADMIN,ETH,NET,PERM,IBFT --host-allowlist="*" --rpc-http-cors-origins="*" --p2p-port=30307 --rpc-http-port=8549\n'})})})]}),"\n",(0,r.jsxs)(n.p,{children:["Start another terminal and use curl to call the JSON-RPC API ",(0,r.jsx)(n.a,{href:"/public-networks/reference/api/#net_peercount",children:(0,r.jsx)(n.code,{children:"net_peerCount"})})," method:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}\' localhost:8549\n'})}),"\n",(0,r.jsx)(n.p,{children:"The result confirms Node-5 has no peers even though it specifies Node-1 as a bootnode:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": "0x0"\n}\n'})}),"\n",(0,r.jsx)(n.h2,{id:"stop-nodes",children:"Stop nodes"}),"\n",(0,r.jsx)(n.p,{children:"When finished using the permissioned network, stop all nodes using Ctrl+C in each terminal window."}),"\n",(0,r.jsx)(n.admonition,{type:"tip",children:(0,r.jsxs)(n.p,{children:["To restart the permissioned network in the future, start from ",(0,r.jsx)(n.a,{href:"#7-start-node-1",children:"step 7"}),"."]})})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},19365:(e,n,s)=>{s.d(n,{A:()=>o});s(96540);var r=s(18215);const i={tabItem:"tabItem_Ymn6"};var t=s(74848);function o(e){let{children:n,hidden:s,className:o}=e;return(0,t.jsx)("div",{role:"tabpanel",className:(0,r.A)(i.tabItem,o),hidden:s,children:n})}},11470:(e,n,s)=>{s.d(n,{A:()=>k});var r=s(96540),i=s(18215),t=s(23104),o=s(56347),a=s(205),d=s(57485),l=s(31682),c=s(70679);function h(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function p(e){const{values:n,children:s}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return h(e).map((e=>{let{props:{value:n,label:s,attributes:r,default:i}}=e;return{value:n,label:s,attributes:r,default:i}}))}(s);return function(e){const n=(0,l.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,s])}function u(e){let{value:n,tabValues:s}=e;return s.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:s}=e;const i=(0,o.W6)(),t=function(e){let{queryString:n=!1,groupId:s}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!s)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return s??null}({queryString:n,groupId:s});return[(0,d.aZ)(t),(0,r.useCallback)((e=>{if(!t)return;const n=new URLSearchParams(i.location.search);n.set(t,e),i.replace({...i.location,search:n.toString()})}),[t,i])]}function x(e){const{defaultValue:n,queryString:s=!1,groupId:i}=e,t=p(e),[o,d]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:s}=e;if(0===s.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!u({value:n,tabValues:s}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${s.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=s.find((e=>e.default))??s[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:t}))),[l,h]=f({queryString:s,groupId:i}),[x,j]=function(e){let{groupId:n}=e;const s=function(e){return e?`docusaurus.tab.${e}`:null}(n),[i,t]=(0,c.Dv)(s);return[i,(0,r.useCallback)((e=>{s&&t.set(e)}),[s,t])]}({groupId:i}),m=(()=>{const e=l??x;return u({value:e,tabValues:t})?e:null})();(0,a.A)((()=>{m&&d(m)}),[m]);return{selectedValue:o,selectValue:(0,r.useCallback)((e=>{if(!u({value:e,tabValues:t}))throw new Error(`Can't select invalid tab value=${e}`);d(e),h(e),j(e)}),[h,j,t]),tabValues:t}}var j=s(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=s(74848);function b(e){let{className:n,block:s,selectedValue:r,selectValue:o,tabValues:a}=e;const d=[],{blockElementScrollPositionUntilNextRender:l}=(0,t.a_)(),c=e=>{const n=e.currentTarget,s=d.indexOf(n),i=a[s].value;i!==r&&(l(n),o(i))},h=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const s=d.indexOf(e.currentTarget)+1;n=d[s]??d[0];break}case"ArrowLeft":{const s=d.indexOf(e.currentTarget)-1;n=d[s]??d[d.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,i.A)("tabs",{"tabs--block":s},n),children:a.map((e=>{let{value:n,label:s,attributes:t}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>d.push(e),onKeyDown:h,onClick:c,...t,className:(0,i.A)("tabs__item",m.tabItem,t?.className,{"tabs__item--active":r===n}),children:s??n},n)}))})}function N(e){let{lazy:n,children:s,selectedValue:t}=e;const o=(Array.isArray(s)?s:[s]).filter(Boolean);if(n){const e=o.find((e=>e.props.value===t));return e?(0,r.cloneElement)(e,{className:(0,i.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:o.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==t})))})}function w(e){const n=x(e);return(0,g.jsxs)("div",{className:(0,i.A)("tabs-container",m.tabList),children:[(0,g.jsx)(b,{...n,...e}),(0,g.jsx)(N,{...n,...e})]})}function k(e){const n=(0,j.A)();return(0,g.jsx)(w,{...e,children:h(e.children)},String(n))}},14739:(e,n,s)=>{s.d(n,{A:()=>r});const r=s.p+"assets/images/EnodeStartup-145939e1c789c28e464db82faa0fb3ca.png"},28453:(e,n,s)=>{s.d(n,{R:()=>o,x:()=>a});var r=s(96540);const i={},t=r.createContext(i);function o(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dd5955a1.58dbde9c.js b/assets/js/dd5955a1.58dbde9c.js new file mode 100644 index 00000000000..947e5019960 --- /dev/null +++ b/assets/js/dd5955a1.58dbde9c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6493],{13571:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>b,frontMatter:()=>i,metadata:()=>t,toc:()=>u});var c=a(74848),s=a(28453),r=a(11470),d=a(19365);const i={title:"Engine API",description:"Engine API methods reference",toc_max_heading_level:3,tags:["public networks"]},l="Engine API methods",t={id:"public-networks/reference/engine-api/index",title:"Engine API",description:"Engine API methods reference",source:"@site/docs/public-networks/reference/engine-api/index.md",sourceDirName:"public-networks/reference/engine-api",slug:"/public-networks/reference/engine-api/",permalink:"/public-networks/reference/engine-api/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/reference/engine-api/index.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{title:"Engine API",description:"Engine API methods reference",toc_max_heading_level:3,tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Objects",permalink:"/public-networks/reference/api/objects"},next:{title:"Objects",permalink:"/public-networks/reference/engine-api/objects"}},o={},u=[{value:"Methods",id:"methods",level:2},{value:"engine_exchangeCapabilities",id:"engine_exchangecapabilities",level:3},{value:"Parameters",id:"parameters",level:4},{value:"Returns",id:"returns",level:4},{value:"engine_exchangeTransitionConfigurationV1",id:"engine_exchangetransitionconfigurationv1",level:3},{value:"Parameters",id:"parameters-1",level:4},{value:"Returns",id:"returns-1",level:4},{value:"engine_forkchoiceUpdatedV1",id:"engine_forkchoiceupdatedv1",level:3},{value:"Parameters",id:"parameters-2",level:4},{value:"Returns",id:"returns-2",level:4},{value:"engine_getBlobsV1",id:"engine_getblobsv1",level:3},{value:"Parameters",id:"parameters-3",level:4},{value:"Returns",id:"returns-3",level:4},{value:"engine_getPayloadBodiesByHashV1",id:"engine_getpayloadbodiesbyhashv1",level:3},{value:"Parameters",id:"parameters-4",level:4},{value:"Returns",id:"returns-4",level:4},{value:"engine_getPayloadBodiesByRangeV1",id:"engine_getpayloadbodiesbyrangev1",level:3},{value:"Parameters",id:"parameters-5",level:4},{value:"Returns",id:"returns-5",level:4},{value:"engine_getPayloadV1",id:"engine_getpayloadv1",level:3},{value:"Parameters",id:"parameters-6",level:4},{value:"Returns",id:"returns-6",level:4},{value:"engine_newPayloadV1",id:"engine_newpayloadv1",level:3},{value:"Parameters",id:"parameters-7",level:4},{value:"Returns",id:"returns-7",level:4}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,s.R)(),...e.components};return(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(n.header,{children:(0,c.jsx)(n.h1,{id:"engine-api-methods",children:"Engine API methods"})}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.a,{href:"/public-networks/concepts/node-clients#execution-and-consensus-clients",children:"Consensus and execution clients"})," communicate with each other using the Engine API. When running Besu as an execution client, ",(0,c.jsx)(n.a,{href:"/public-networks/how-to/use-engine-api",children:"use these API calls"})," to communicate with a consensus client."]}),"\n",(0,c.jsx)(n.admonition,{type:"info",children:(0,c.jsx)(n.p,{children:"The engine API is enabled by default."})}),"\n",(0,c.jsxs)(n.p,{children:["See the ",(0,c.jsx)(n.a,{href:"https://github.com/ethereum/execution-apis/blob/0b965fb714ccd3faa3c939fdce1726e56679cdec/src/engine/specification.md",children:"Ethereum Engine API specification"})," for more information. Not all changes to the Engine API are documented on this page."]}),"\n",(0,c.jsx)(n.h2,{id:"methods",children:"Methods"}),"\n",(0,c.jsx)(n.h3,{id:"engine_exchangecapabilities",children:(0,c.jsx)(n.code,{children:"engine_exchangeCapabilities"})}),"\n",(0,c.jsx)(n.p,{children:"Exchanges a list of supported Engine API methods between the consensus client and Besu."}),"\n",(0,c.jsx)(n.h4,{id:"parameters",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"remoteCapabilities"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," - Engine API method names that the consensus client supports"]}),"\n",(0,c.jsx)(n.h4,{id:"returns",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"localCapabilities"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," - Engine API method names that Besu supports"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(d.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"engine_exchangeCapabilities","params":[["engine_exchangeTransitionConfigurationV1","engine_forkchoiceUpdatedV1","engine_getPayloadBodiesByHash","engine_getPayloadBodiesByRangeV1","engine_getPayloadV1","engine_newPayloadV1"]],"id":67}\' http://127.0.0.1:8550\n'})})}),(0,c.jsx)(d.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "engine_exchangeCapabilities",\n "params": [\n [\n "engine_exchangeTransitionConfigurationV1",\n "engine_forkchoiceUpdatedV1",\n "engine_getPayloadBodiesByHash",\n "engine_getPayloadBodiesByRangeV1",\n "engine_getPayloadV1",\n "engine_newPayloadV1"\n ]\n ],\n "id": 67\n}\n'})})}),(0,c.jsx)(d.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 67,\n "result": [\n "engine_getPayloadV1",\n "engine_getPayloadV2",\n "engine_executePayloadV1",\n "engine_newPayloadV1",\n "engine_newPayloadV2",\n "engine_forkchoiceUpdatedV1",\n "engine_forkchoiceUpdatedV2",\n "engine_exchangeTransitionConfigurationV1",\n "engine_getPayloadBodiesByHashV1",\n "engine_getPayloadBodiesByRangeV1"\n ]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"engine_exchangetransitionconfigurationv1",children:(0,c.jsx)(n.code,{children:"engine_exchangeTransitionConfigurationV1"})}),"\n",(0,c.jsx)(n.p,{children:"Sends the transition configuration to the consensus client to verify the configuration between both clients."}),"\n",(0,c.jsx)(n.admonition,{type:"note",children:(0,c.jsx)(n.p,{children:"The execution client runs this call every 60 seconds in the background. The log displays a warning message if the call hasn't been sent in 120 seconds."})}),"\n",(0,c.jsx)(n.h4,{id:"parameters-1",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"transitionConfiguration"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/engine-api/objects#transition-configuration-object",children:"Transition configuration object"})]}),"\n",(0,c.jsx)(n.h4,{id:"returns-1",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"transitionConfiguration"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/engine-api/objects#transition-configuration-object",children:"Transition configuration object"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(d.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"engine_exchangeTransitionConfigurationV1","params":[{"terminalTotalDifficulty": 0, "terminalBlockHash": "0x0000000000000000000000000000000000000000000000000000000000000000", "terminalBlockNumber": "0x1"}],"id":67}\' http://127.0.0.1:8550\n'})})}),(0,c.jsx)(d.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "engine_exchangeTransitionConfigurationV1",\n "params": [\n {\n "terminalTotalDifficulty": 0,\n "terminalBlockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "terminalBlockNumber": "0x1"\n }\n ],\n "id": 67\n}\n'})})}),(0,c.jsx)(d.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 67,\n "result": {\n "terminalTotalDifficulty": 0,\n "terminalBlockHash": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "terminalBlockNumber": "0x1"\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"engine_forkchoiceupdatedv1",children:(0,c.jsx)(n.code,{children:"engine_forkchoiceUpdatedV1"})}),"\n",(0,c.jsx)(n.p,{children:"Updates the fork choice with the consensus client."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-2",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"forkchoiceState"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/engine-api/objects#fork-choice-state-object",children:"Fork choice state object"})]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"payloadAttributes"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/engine-api/objects#payload-attributes-object",children:"Payload attribute object"}),". Can be ",(0,c.jsx)(n.code,{children:"null"}),"."]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-2",children:"Returns"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"payloadStatus"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/engine-api/objects#payload-status-object",children:"Payload status object"})]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"payloadId"}),": ",(0,c.jsx)(n.em,{children:"data"})," - identifier of the payload build process or ",(0,c.jsx)(n.code,{children:"null"})]}),"\n"]}),"\n"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(d.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"engine_forkchoiceUpdatedV1","params":[{"headBlockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858", "safeBlockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858", "finalizedBlockHash": "0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a"},null],"id":67}\' http://127.0.0.1:8550\n'})})}),(0,c.jsx)(d.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "engine_forkchoiceUpdatedV1",\n "params": [\n {\n "headBlockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",\n "safeBlockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",\n "finalizedBlockHash": "0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a"\n },\n null\n ],\n "id": 67\n}\n'})})}),(0,c.jsx)(d.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 67,\n "result": {\n "payloadStatus": {\n "status": "VALID",\n "latestValidHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",\n "validationError": null\n },\n "payloadId": null\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"engine_getblobsv1",children:(0,c.jsx)(n.code,{children:"engine_getBlobsV1"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the blobs corresponding to the specified blob versioned hashes."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-3",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"versionedHashes"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," - Array of blob versioned hashes"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-3",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"engineGetBlobsResultV1"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - Array of ",(0,c.jsx)(n.a,{href:"/public-networks/reference/engine-api/objects#blob-and-proof-object",children:"blob and proof objects"}),",\nitems of which can be ",(0,c.jsx)(n.code,{children:"null"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(d.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"engine_getBlobsV1","params":[["0x010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014","0x01f3a5c9d8e7b6a4c2d1e0f9b8a7c6d5e4f3a2b1c0d9e8f7b6a5c4d3e2f1a0b9"]],"id":1}\' http://127.0.0.1:8550\n'})})}),(0,c.jsx)(d.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "engine_getBlobsV1",\n "params": [\n [\n "0x010657f37554c781402a22917dee2f75def7ab966d7b770905398eba3c444014",\n "0x01f3a5c9d8e7b6a4c2d1e0f9b8a7c6d5e4f3a2b1c0d9e8f7b6a5c4d3e2f1a0b9"\n ]\n ],\n "id": 67\n}\n'})})}),(0,c.jsx)(d.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 67,\n "result": [\n {\n "blob": "0x722662154e6d76b2b2b92e70c0cac3ccf534f9b74eb5b89819ec509083d00a503ae5c198d17634e79059c2cd735491...",\n "proof": "0x80c5f2e1eb23939cf3600f61872e3e9964d0acafb440634e530d6139a193b889c56a0c07d737729dbe0626706fc9f25f"\n },\n null\n ]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"engine_getpayloadbodiesbyhashv1",children:(0,c.jsx)(n.code,{children:"engine_getPayloadBodiesByHashV1"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the bodies of the execution payloads corresponding to the specified block hashes."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-4",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"blockHashes"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"strings"})," - Block hashes"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-4",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"engineGetPayloadBodiesResultV1"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - Execution payload body objects"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(d.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"engine_getPayloadBodiesByHashV1","params":[["0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c","0xfe88c94d860f01a17f961bf4bdfb6e0c6cd10d3fda5cc861e805ca1240c58553"]],"id":1}\' http://127.0.0.1:8550\n'})})}),(0,c.jsx)(d.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "engine_getPayloadBodiesByHashV1",\n "params": [\n [\n "0xd5f1812548be429cbdc6376b29611fc49e06f1359758c4ceaaa3b393e2239f9c",\n "0xfe88c94d860f01a17f961bf4bdfb6e0c6cd10d3fda5cc861e805ca1240c58553"\n ]\n ],\n "id": 67\n}\n'})})}),(0,c.jsx)(d.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 67,\n "result": [{\n "transactions": ["0xf865808506fc23ac00830124f8940101010101010101010101010101010101010101018031a02c4d88bfdc2f6dbf82c33d235c4e785e9fc23b2d0fc7b9d20fc5e9674f1f9d15a016d6d69b925cf26128683ab4a096e196fbb1142d6c6d4e8d3481b9bef1bd0f65", "0x02f86c0701843b9aca008506fc23ac00830124f89402020202020202020202020202020202020202020180c080a039409b4e5603dd8c3cf38232348661a8e99ac518396eeaa128ec9ec2a3eb8127a06b21ab956f5f138cb44fda1a9055bd08980ea4f8040d877c00dac025608d0d95", ...],\n "withdrawals": [{\n "index" : "0xf0",\n "validatorIndex" : "0xf0",\n "address" : "0x00000000000000000000000000000000000010f0",\n "amount" : "0x1"\n }, {\n "index" : "0xf1",\n "validatorIndex" : "0xf1",\n "address" : "0x00000000000000000000000000000000000010f1",\n "amount" : "0x1"\n }]\n }, {\n "transactions": ["0xf865108506fc23ac00830124f8940101010101010101010101010101010101010101018031a0d9712a3c40ae85aea4ad1bd95a0b7cc7bd805189a9e2517403b11a00a1530f81a053b53b0267a6dcfe9f9a1652307b396b3e8a65e65707a450e60c92baefdbcfbe", "0x02f86c0711843b9aca008506fc23ac00830124f89402020202020202020202020202020202020202020180c080a071d36bc93c7ae8cc5c01501e51e5e97a51aa541d1a89c809a2af7eb40e9bc2cba071644230e21c075c1da08916aff5efe9f95a6f6a4f94dc217f6c1bb4a3240b29", ...],\n "withdrawals": [{\n "index" : "0xf2",\n "validatorIndex" : "0xf2",\n "address" : "0x00000000000000000000000000000000000010f2",\n "amount" : "0x1"\n }, {\n "index" : "0xf3",\n "validatorIndex" : "0xf3",\n "address" : "0x00000000000000000000000000000000000010f3",\n "amount" : "0x1"\n }]\n }]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"engine_getpayloadbodiesbyrangev1",children:(0,c.jsx)(n.code,{children:"engine_getPayloadBodiesByRangeV1"})}),"\n",(0,c.jsx)(n.p,{children:"Returns the bodies of the execution payloads corresponding to the specified range of block numbers."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-5",children:"Parameters"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"startBlockNumber"}),": ",(0,c.jsx)(n.em,{children:"string"})," - Number of the starting block of the range, as a hexadecimal string"]}),"\n"]}),"\n",(0,c.jsxs)(n.li,{children:["\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"count"}),": ",(0,c.jsx)(n.em,{children:"string"})," - Number of blocks in the range (including the starting block), as a hexadecimal string"]}),"\n"]}),"\n"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-5",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"engineGetPayloadBodiesResultV1"}),": ",(0,c.jsx)(n.em,{children:"array"})," of ",(0,c.jsx)(n.em,{children:"objects"})," - Execution payload body objects"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(d.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"engine_getPayloadBodiesByRangeV1","params":["0x20", "0x2"],"id":1}\' http://127.0.0.1:8550\n'})})}),(0,c.jsx)(d.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "engine_getPayloadBodiesByRangeV1",\n "params": ["0x20", "0x2"],\n "id": 67\n}\n'})})}),(0,c.jsx)(d.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 67,\n "result": [{\n "transactions": ["0xf865808506fc23ac00830124f8940101010101010101010101010101010101010101018031a02c4d88bfdc2f6dbf82c33d235c4e785e9fc23b2d0fc7b9d20fc5e9674f1f9d15a016d6d69b925cf26128683ab4a096e196fbb1142d6c6d4e8d3481b9bef1bd0f65", "0x02f86c0701843b9aca008506fc23ac00830124f89402020202020202020202020202020202020202020180c080a039409b4e5603dd8c3cf38232348661a8e99ac518396eeaa128ec9ec2a3eb8127a06b21ab956f5f138cb44fda1a9055bd08980ea4f8040d877c00dac025608d0d95", ...],\n "withdrawals": [{\n "index" : "0xf0",\n "validatorIndex" : "0xf0",\n "address" : "0x00000000000000000000000000000000000010f0",\n "amount" : "0x1"\n }, {\n "index" : "0xf1",\n "validatorIndex" : "0xf1",\n "address" : "0x00000000000000000000000000000000000010f1",\n "amount" : "0x1"\n }]\n }, {\n "transactions": ["0xf865108506fc23ac00830124f8940101010101010101010101010101010101010101018031a0d9712a3c40ae85aea4ad1bd95a0b7cc7bd805189a9e2517403b11a00a1530f81a053b53b0267a6dcfe9f9a1652307b396b3e8a65e65707a450e60c92baefdbcfbe", "0x02f86c0711843b9aca008506fc23ac00830124f89402020202020202020202020202020202020202020180c080a071d36bc93c7ae8cc5c01501e51e5e97a51aa541d1a89c809a2af7eb40e9bc2cba071644230e21c075c1da08916aff5efe9f95a6f6a4f94dc217f6c1bb4a3240b29", ...],\n "withdrawals": [{\n "index" : "0xf2",\n "validatorIndex" : "0xf2",\n "address" : "0x00000000000000000000000000000000000010f2",\n "amount" : "0x1"\n }, {\n "index" : "0xf3",\n "validatorIndex" : "0xf3",\n "address" : "0x00000000000000000000000000000000000010f3",\n "amount" : "0x1"\n }]\n }]\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"engine_getpayloadv1",children:(0,c.jsx)(n.code,{children:"engine_getPayloadV1"})}),"\n",(0,c.jsx)(n.p,{children:"Prepares the payload to send to the consensus client."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-6",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"payloadId"}),": ",(0,c.jsx)(n.em,{children:"data"})," - Identifier of the payload build process"]}),"\n",(0,c.jsx)(n.h4,{id:"returns-6",children:"Returns"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"executionPayload"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/engine-api/objects#execution-payload-object",children:"Execution payload object"})]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(d.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"engine_getPayloadV1","params":["0x0000000021f32cc1"],"id":1}\' http://127.0.0.1:8550\n'})})}),(0,c.jsx)(d.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "engine_getPayloadV1",\n "params": ["0x0000000021f32cc1"],\n "id": 67\n}\n'})})}),(0,c.jsx)(d.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 67,\n "result": {\n "parentHash": "0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a",\n "feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",\n "stateRoot": "0xca3149fa9e37db08d1cd49c9061db1002ef1cd58db2210f2115c8c989b2bdf45",\n "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "blockNumber": "0x1",\n "gasLimit": "0x1c9c380",\n "gasUsed": "0x0",\n "timestamp": "0x5",\n "extraData": "0x",\n "baseFeePerGas": "0x7",\n "blockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",\n "transactions": []\n }\n}\n'})})})]}),"\n",(0,c.jsx)(n.h3,{id:"engine_newpayloadv1",children:(0,c.jsx)(n.code,{children:"engine_newPayloadV1"})}),"\n",(0,c.jsx)(n.p,{children:"Executes the payload with the consensus client."}),"\n",(0,c.jsx)(n.h4,{id:"parameters-7",children:"Parameters"}),"\n",(0,c.jsxs)(n.p,{children:[(0,c.jsx)(n.code,{children:"executionPayload"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/engine-api/objects#execution-payload-object",children:"Execution payload object"})]}),"\n",(0,c.jsx)(n.h4,{id:"returns-7",children:"Returns"}),"\n",(0,c.jsxs)(n.ul,{children:["\n",(0,c.jsxs)(n.li,{children:[(0,c.jsx)(n.code,{children:"payloadStatus"}),": ",(0,c.jsx)(n.em,{children:"object"})," - ",(0,c.jsx)(n.a,{href:"/public-networks/reference/engine-api/objects#payload-status-object",children:"Payload status object"})]}),"\n"]}),"\n",(0,c.jsxs)(r.A,{children:[(0,c.jsx)(d.A,{value:"curl HTTP",label:"curl HTTP",default:!0,children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-bash",children:'curl -X POST --data \'{"jsonrpc":"2.0","method":"engine_newPayloadV1","params":[\n {\n "parentHash": "0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a",\n "feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",\n "stateRoot": "0xca3149fa9e37db08d1cd49c9061db1002ef1cd58db2210f2115c8c989b2bdf45",\n "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "blockNumber": "0x1",\n "gasLimit": "0x1c9c380",\n "gasUsed": "0x0",\n "timestamp": "0x5",\n "extraData": "0x",\n "baseFeePerGas": "0x7",\n "blockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",\n "transactions": []\n }\n],"id":67}\' http://127.0.0.1:8550\n'})})}),(0,c.jsx)(d.A,{value:"wscat WS",label:"wscat WS",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "method": "engine_newPayloadV1",\n "params": [\n {\n "parentHash": "0x3b8fb240d288781d4aac94d3fd16809ee413bc99294a085798a589dae51ddd4a",\n "feeRecipient": "0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b",\n "stateRoot": "0xca3149fa9e37db08d1cd49c9061db1002ef1cd58db2210f2115c8c989b2bdf45",\n "receiptsRoot": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",\n "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",\n "prevRandao": "0x0000000000000000000000000000000000000000000000000000000000000000",\n "blockNumber": "0x1",\n "gasLimit": "0x1c9c380",\n "gasUsed": "0x0",\n "timestamp": "0x5",\n "extraData": "0x",\n "baseFeePerGas": "0x7",\n "blockHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",\n "transactions": []\n }\n ],\n "id": 67\n}\n'})})}),(0,c.jsx)(d.A,{value:"JSON result",label:"JSON result",children:(0,c.jsx)(n.pre,{children:(0,c.jsx)(n.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": {\n "status": "VALID",\n "latestValidHash": "0x3559e851470f6e7bbed1db474980683e8c315bfce99b2a6ef47c057c04de7858",\n "validationError": null\n }\n}\n'})})})]})]})}function b(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,c.jsx)(n,{...e,children:(0,c.jsx)(h,{...e})}):h(e)}},19365:(e,n,a)=>{a.d(n,{A:()=>d});a(96540);var c=a(18215);const s={tabItem:"tabItem_Ymn6"};var r=a(74848);function d(e){let{children:n,hidden:a,className:d}=e;return(0,r.jsx)("div",{role:"tabpanel",className:(0,c.A)(s.tabItem,d),hidden:a,children:n})}},11470:(e,n,a)=>{a.d(n,{A:()=>P});var c=a(96540),s=a(18215),r=a(23104),d=a(56347),i=a(205),l=a(57485),t=a(31682),o=a(70679);function u(e){return c.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,c.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:a}=e;return(0,c.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:a,attributes:c,default:s}}=e;return{value:n,label:a,attributes:c,default:s}}))}(a);return function(e){const n=(0,t.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,a])}function b(e){let{value:n,tabValues:a}=e;return a.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:a}=e;const s=(0,d.W6)(),r=function(e){let{queryString:n=!1,groupId:a}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:n,groupId:a});return[(0,l.aZ)(r),(0,c.useCallback)((e=>{if(!r)return;const n=new URLSearchParams(s.location.search);n.set(r,e),s.replace({...s.location,search:n.toString()})}),[r,s])]}function x(e){const{defaultValue:n,queryString:a=!1,groupId:s}=e,r=h(e),[d,l]=(0,c.useState)((()=>function(e){let{defaultValue:n,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!b({value:n,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const c=a.find((e=>e.default))??a[0];if(!c)throw new Error("Unexpected error: 0 tabValues");return c.value}({defaultValue:n,tabValues:r}))),[t,u]=f({queryString:a,groupId:s}),[x,p]=function(e){let{groupId:n}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(n),[s,r]=(0,o.Dv)(a);return[s,(0,c.useCallback)((e=>{a&&r.set(e)}),[a,r])]}({groupId:s}),j=(()=>{const e=t??x;return b({value:e,tabValues:r})?e:null})();(0,i.A)((()=>{j&&l(j)}),[j]);return{selectedValue:d,selectValue:(0,c.useCallback)((e=>{if(!b({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);l(e),u(e),p(e)}),[u,p,r]),tabValues:r}}var p=a(92303);const j={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=a(74848);function m(e){let{className:n,block:a,selectedValue:c,selectValue:d,tabValues:i}=e;const l=[],{blockElementScrollPositionUntilNextRender:t}=(0,r.a_)(),o=e=>{const n=e.currentTarget,a=l.indexOf(n),s=i[a].value;s!==c&&(t(n),d(s))},u=e=>{let n=null;switch(e.key){case"Enter":o(e);break;case"ArrowRight":{const a=l.indexOf(e.currentTarget)+1;n=l[a]??l[0];break}case"ArrowLeft":{const a=l.indexOf(e.currentTarget)-1;n=l[a]??l[l.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":a},n),children:i.map((e=>{let{value:n,label:a,attributes:r}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:c===n?0:-1,"aria-selected":c===n,ref:e=>l.push(e),onKeyDown:u,onClick:o,...r,className:(0,s.A)("tabs__item",j.tabItem,r?.className,{"tabs__item--active":c===n}),children:a??n},n)}))})}function v(e){let{lazy:n,children:a,selectedValue:r}=e;const d=(Array.isArray(a)?a:[a]).filter(Boolean);if(n){const e=d.find((e=>e.props.value===r));return e?(0,c.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:d.map(((e,n)=>(0,c.cloneElement)(e,{key:n,hidden:e.props.value!==r})))})}function y(e){const n=x(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",j.tabList),children:[(0,g.jsx)(m,{...n,...e}),(0,g.jsx)(v,{...n,...e})]})}function P(e){const n=(0,p.A)();return(0,g.jsx)(y,{...e,children:u(e.children)},String(n))}},28453:(e,n,a)=>{a.d(n,{R:()=>d,x:()=>i});var c=a(96540);const s={},r=c.createContext(s);function d(e){const n=c.useContext(r);return c.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:d(e.components),c.createElement(r.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dd900a84.4da1521c.js b/assets/js/dd900a84.4da1521c.js new file mode 100644 index 00000000000..df77bdb2c87 --- /dev/null +++ b/assets/js/dd900a84.4da1521c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2953],{94112:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>i,metadata:()=>o,toc:()=>l});var n=t(74848),a=t(28453);const i={title:"Run Tessera with Besu",description:"Running ConsenSys Quorum Tessera with Besu",sidebar_position:3,tags:["private networks"]},r="Run Tessera with Besu (Deprecated)",o={id:"private-networks/how-to/use-privacy/tessera",title:"Run Tessera with Besu",description:"Running ConsenSys Quorum Tessera with Besu",source:"@site/docs/private-networks/how-to/use-privacy/tessera.md",sourceDirName:"private-networks/how-to/use-privacy",slug:"/private-networks/how-to/use-privacy/tessera",permalink:"/private-networks/how-to/use-privacy/tessera",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/use-privacy/tessera.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Run Tessera with Besu",description:"Running ConsenSys Quorum Tessera with Besu",sidebar_position:3,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use Besu-extended privacy",permalink:"/private-networks/how-to/use-privacy/besu-extended"},next:{title:"Create and manage privacy groups",permalink:"/private-networks/how-to/use-privacy/privacy-groups"}},c={},l=[{value:"High availability",id:"high-availability",level:2},{value:"Separate instances",id:"separate-instances",level:2}];function u(e){const s={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",img:"img",p:"p",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"run-tessera-with-besu-deprecated",children:"Run Tessera with Besu (Deprecated)"})}),"\n",(0,n.jsx)(s.admonition,{type:"caution",children:(0,n.jsxs)(s.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,n.jsx)(s.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,n.jsxs)(s.p,{children:["To enable ",(0,n.jsx)(s.a,{href:"/private-networks/concepts/privacy/",children:"privacy functionality"})," in production systems, ",(0,n.jsx)(s.a,{href:"https://docs.tessera.consensys.net/",children:"Tessera"})," must be ",(0,n.jsx)(s.a,{href:"#high-availability",children:"highly available"})," and ",(0,n.jsx)(s.a,{href:"#separate-instances",children:"run in a separate instance"})," to Besu."]}),"\n",(0,n.jsx)(s.p,{children:(0,n.jsx)(s.img,{alt:"Besu-Tessera-High-Availability",src:t(38775).A+"",width:"1512",height:"648"})}),"\n",(0,n.jsx)(s.admonition,{type:"note",children:(0,n.jsx)(s.p,{children:"You can also configure Besu for high availability using load balancers."})}),"\n",(0,n.jsx)(s.h2,{id:"high-availability",children:"High availability"}),"\n",(0,n.jsxs)(s.p,{children:["Privacy requires you to ",(0,n.jsx)(s.a,{href:"https://consensys.net/docs/goquorum//en/stable/configure-and-manage/configure/high-availability/",children:"configure Tessera for high availability"}),". Besu also requires ",(0,n.jsxs)(s.a,{href:"https://docs.tessera.consensys.net/HowTo/Configure/Orion-Mode",children:[(0,n.jsx)(s.code,{children:"orion"})," mode"]})," to be enabled in Tessera."]}),"\n",(0,n.jsx)(s.p,{children:"To successfully distribute a private transaction, all private transaction participants must be online. If any participants are offline when submitting the private transaction, the transaction is not attempted and you need to resubmit the transaction."}),"\n",(0,n.jsx)(s.p,{children:"If a Tessera node is unavailable when Besu attempts to process a privacy marker transaction, the Besu node stops processing all new blocks until Tessera is available. The Besu node continually attempts to process the privacy marker transaction until Tessera is available again."}),"\n",(0,n.jsx)(s.admonition,{type:"caution",children:(0,n.jsx)(s.p,{children:"If Tessera becomes available but has lost data, Besu resumes processing blocks and the private states in the Besu nodes might become inconsistent."})}),"\n",(0,n.jsx)(s.h2,{id:"separate-instances",children:"Separate instances"}),"\n",(0,n.jsx)(s.p,{children:"For production systems, we recommend running Besu and Tessera in separate instances. If running Besu and Tessera in the same instance, restrict the amount of memory used by each JVM to ensure each has enough memory."})]})}function d(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(u,{...e})}):u(e)}},38775:(e,s,t)=>{t.d(s,{A:()=>n});const n=t.p+"assets/images/Besu-Tessera-High-Availability-452df28ed69ccdc9a06250a617e5a477.png"},28453:(e,s,t)=>{t.d(s,{R:()=>r,x:()=>o});var n=t(96540);const a={},i=n.createContext(a);function r(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/dfe7f568.acb49715.js b/assets/js/dfe7f568.acb49715.js new file mode 100644 index 00000000000..73006850369 --- /dev/null +++ b/assets/js/dfe7f568.acb49715.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1816],{56847:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>p,frontMatter:()=>s,metadata:()=>c,toc:()=>l});var i=t(74848),o=t(28453);const s={title:"Transaction pool",sidebar_position:2,description:"Transaction pool overview",tags:["public networks","private networks"]},r="Transaction pool",c={id:"public-networks/concepts/transactions/pool",title:"Transaction pool",description:"Transaction pool overview",source:"@site/docs/public-networks/concepts/transactions/pool.md",sourceDirName:"public-networks/concepts/transactions",slug:"/public-networks/concepts/transactions/pool",permalink:"/public-networks/concepts/transactions/pool",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/concepts/transactions/pool.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Transaction pool",sidebar_position:2,description:"Transaction pool overview",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Transaction types",permalink:"/public-networks/concepts/transactions/types"},next:{title:"Transaction validation",permalink:"/public-networks/concepts/transactions/validation"}},a={},l=[{value:"Layered transaction pool",id:"layered-transaction-pool",level:2},{value:"Penalize transient invalid pending transactions",id:"penalize-transient-invalid-pending-transactions",level:3},{value:"Sequenced transaction pool",id:"sequenced-transaction-pool",level:2},{value:"Drop transactions when the layered transaction pool is full",id:"drop-transactions-when-the-layered-transaction-pool-is-full",level:2},{value:"Replace transactions with the same sender and nonce",id:"replace-transactions-with-the-same-sender-and-nonce",level:2},{value:"In networks with a base fee and priced gas",id:"in-networks-with-a-base-fee-and-priced-gas",level:3},{value:"In networks with zero base base or free gas",id:"in-networks-with-zero-base-base-or-free-gas",level:3},{value:"Transaction pool methods and options",id:"transaction-pool-methods-and-options",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"transaction-pool",children:"Transaction pool"})}),"\n",(0,i.jsx)(n.p,{children:"All nodes maintain a transaction pool to store pending transactions before processing."}),"\n",(0,i.jsx)(n.p,{children:"Transaction pools are categorized into the following two types:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#layered-transaction-pool",children:"Layered"})," - Recommended for public blockchain networks."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#sequenced-transaction-pool",children:"Sequenced"})," - Recommended for private blockchain networks."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["You can use specific options and methods to ",(0,i.jsx)(n.a,{href:"#transaction-pool-methods-and-options",children:"configure and monitor the transaction pool"}),"."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["When submitting ",(0,i.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/#nonce-validation",children:"private transactions"}),",\nthe ",(0,i.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy marker transaction"}),"\nis submitted to the transaction pool, not the private transaction itself."]})}),"\n",(0,i.jsx)(n.h2,{id:"layered-transaction-pool",children:"Layered transaction pool"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.a,{href:"https://github.com/hyperledger/besu/pull/5290",children:"layered transaction pool"})," is the default\ntransaction pool implementation.\nThe implementation separates the pool into layers according to value and executability of the transactions.\nThe first layer keeps only the highest-value transactions that can feasibly go into the next block.\nThe other two layers ensure Besu always has a backlog of transactions to fill blocks, maximizing the amount of fees."]}),"\n",(0,i.jsx)(n.p,{children:"Layered pools have additional parameters that allow you to limit and configure the number of transactions\nin different layers, enabling them to handle high volumes and sort transactions at a faster speed."}),"\n",(0,i.jsx)(n.p,{children:"With the layered transaction pool, Besu produces more profitable blocks more quickly, with more\ndenial-of-service protection, and using less CPU than with the legacy transaction pool."}),"\n",(0,i.jsx)(n.p,{children:"If you previously configured transaction pool behavior, upgrade to the layered transaction pool by:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Removing the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-retention-hours",children:(0,i.jsx)(n.code,{children:"--tx-pool-retention-hours"})}),"\noption, which is not applicable because old transactions will expire when the memory cache is full."]}),"\n",(0,i.jsxs)(n.li,{children:["Replacing the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-limit-by-account-percentage",children:(0,i.jsx)(n.code,{children:"--tx-pool-limit-by-account-percentage"})}),"\noption with ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-max-future-by-sender",children:(0,i.jsx)(n.code,{children:"--tx-pool-max-future-by-sender"})}),"\nto limit the number of sequential transactions, instead of percentage of transactions, from a single\nsender kept in the pool."]}),"\n",(0,i.jsxs)(n.li,{children:["Removing the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-max-size",children:(0,i.jsx)(n.code,{children:"--tx-pool-max-size"})})," option,\nwhich is not applicable because the layered pool is limited by memory size instead of the number\nof transactions.\nTo configure the maximum memory capacity, use ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-layer-max-capacity",children:(0,i.jsx)(n.code,{children:"--tx-pool-layer-max-capacity"})}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["You can opt out of the layered transaction pool implementation by setting the\n",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool",children:(0,i.jsx)(n.code,{children:"--tx-pool"})})," option to ",(0,i.jsx)(n.code,{children:"sequenced"}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"penalize-transient-invalid-pending-transactions",children:"Penalize transient invalid pending transactions"}),"\n",(0,i.jsx)(n.p,{children:"Transient invalid pending transactions cannot be included in the current block but might be included in a future one.\nThis can happen due to issues like insufficient balance in the sender's wallet or a gas price below the minimum.\nThese conditions could resolve in the future."}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsx)(n.p,{children:"Invalid pending transactions where conditions can't be resolved in the future (for example, invalid nonce)\nare immediately dropped from the transaction pool."})}),"\n",(0,i.jsxs)(n.p,{children:["The layered transaction pool uses a scoring system to avoid repeatedly evaluating transient invalid pending\ntransactions, which can block the evaluation of valid ones. Each pending transaction starts with a score of\n",(0,i.jsx)(n.code,{children:"127"})," and is penalized over time, with the score decreasing to a minimum of -128.\nThis score determines the transaction's rank in the pool, pushing invalid transactions lower so they are\nevaluated only after non-penalized or less penalized ones."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-min-score",children:(0,i.jsx)(n.code,{children:"--tx-pool-min-score"})})," option, which accepts a value\nbetween ",(0,i.jsx)(n.code,{children:"-128"})," and ",(0,i.jsx)(n.code,{children:"127"}),", instructs the transaction pool to remove pending transactions when their score falls\nbelow the specified value. By default, the value is ",(0,i.jsx)(n.code,{children:"-128"}),", meaning the pending transaction will remain in the\npool with the lowest score and will only be selected after all other pending transactions have been processed."]}),"\n",(0,i.jsx)(n.h2,{id:"sequenced-transaction-pool",children:"Sequenced transaction pool"}),"\n",(0,i.jsx)(n.p,{children:"In the sequenced transaction pool, transactions are processed strictly in the order they are received.\nAlthough sequenced transaction pools lack the flexibility of layered pools, they help maintain a\nconsistent and transparent transaction order, which is often useful in private blockchains."}),"\n",(0,i.jsxs)(n.p,{children:["You can select the sequenced transaction pool by setting ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool",children:(0,i.jsx)(n.code,{children:"--tx-pool=sequenced"})}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["If you set the enterprise configuration profile using ",(0,i.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/profile#enterpriseprivate-profile",children:(0,i.jsx)(n.code,{children:"--profile=enterprise"})})," or ",(0,i.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/profile#enterpriseprivate-profile",children:(0,i.jsx)(n.code,{children:"--profile=private"})}),", the ",(0,i.jsx)(n.code,{children:"sequenced"})," transaction pool is set by default."]}),"\n",(0,i.jsx)(n.p,{children:"The sequenced transaction pool suits enterprise environments because it functions like a first-in-first-out (FIFO) queue and processes transactions in the order of submission, regardless of the sender.\nWhen the pool reaches capacity, the newer transactions are evicted first, reducing the likelihood of a nonce gap and avoiding the need to resubmit older transactions."}),"\n",(0,i.jsx)(n.h2,{id:"drop-transactions-when-the-layered-transaction-pool-is-full",children:"Drop transactions when the layered transaction pool is full"}),"\n",(0,i.jsx)(n.p,{children:"When the transaction pool is full, it accepts and retains local transactions in preference to remote transactions.\nIf the transaction pool is full of local transactions, Besu drops the oldest local transactions first.\nThat is, a full transaction pool continues to accept new local transactions by first dropping remote transactions and then by dropping the oldest local transactions."}),"\n",(0,i.jsx)(n.h2,{id:"replace-transactions-with-the-same-sender-and-nonce",children:"Replace transactions with the same sender and nonce"}),"\n",(0,i.jsx)(n.h3,{id:"in-networks-with-a-base-fee-and-priced-gas",children:"In networks with a base fee and priced gas"}),"\n",(0,i.jsx)(n.p,{children:"You can replace a pending transaction with a transaction that has the same sender and nonce but a higher gas price."}),"\n",(0,i.jsxs)(n.p,{children:["If sending a ",(0,i.jsx)(n.a,{href:"/public-networks/concepts/transactions/types#frontier-transactions",children:"legacy transaction"}),", the old transaction is replaced if the new transaction has a gas price higher than the existing gas price by the percentage specified by ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-price-bump",children:(0,i.jsx)(n.code,{children:"--tx-pool-price-bump"})}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["If sending an ",(0,i.jsxs)(n.a,{href:"/public-networks/concepts/transactions/types#eip1559-transactions",children:[(0,i.jsx)(n.code,{children:"EIP1559"})," transaction"]}),", the old transaction is replaced if one of the following is true:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["The new transaction's effective gas price is higher than the existing gas price by the percentage specified by ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-price-bump",children:(0,i.jsx)(n.code,{children:"--tx-pool-price-bump"})})," AND the new effective priority fee is greater than or equal to the existing priority fee."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["The new transaction's effective gas price is the equal to the existing gas price AND the new effective priority fee is higher than the existing priority fee by the percentage specified by ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-price-bump",children:(0,i.jsx)(n.code,{children:"--tx-pool-price-bump"})}),"."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The default value for ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-price-bump",children:(0,i.jsx)(n.code,{children:"--tx-pool-price-bump"})})," is 10%."]}),"\n",(0,i.jsx)(n.h3,{id:"in-networks-with-zero-base-base-or-free-gas",children:"In networks with zero base base or free gas"}),"\n",(0,i.jsx)(n.p,{children:"To enable replacing transactions in the transaction pool for zero base fee networks,\nor free gas networks:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["If you set ",(0,i.jsx)(n.a,{href:"/public-networks/reference/genesis-items",children:(0,i.jsx)(n.code,{children:"zeroBaseFee"})})," to ",(0,i.jsx)(n.code,{children:"true"})," in the genesis file,\nthe transaction pool price bump is set to ",(0,i.jsx)(n.code,{children:"0"}),". Specifying a value for transaction pool price bump using ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-price-bump",children:(0,i.jsx)(n.code,{children:"--tx-pool-price-bump"})}),"\nwill cause an error."]}),"\n",(0,i.jsxs)(n.li,{children:["If the ",(0,i.jsx)(n.a,{href:"/private-networks/how-to/configure/free-gas",children:"minimum gas price is zero"}),", the transaction pool price bump is set to ",(0,i.jsx)(n.code,{children:"0"}),", unless you specify a different value using ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-price-bump",children:(0,i.jsx)(n.code,{children:"--tx-pool-price-bump"})}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"transaction-pool-methods-and-options",children:"Transaction pool methods and options"}),"\n",(0,i.jsx)(n.p,{children:"You can configure and monitor the transaction pool using the following methods, subscriptions, and options:"}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{}),(0,i.jsx)(n.th,{children:"Name"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Method"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#txpool_besutransactions",children:(0,i.jsx)(n.code,{children:"txpool_besuTransactions"})})}),(0,i.jsx)(n.td,{children:"API method to list transactions in the transaction pool."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Method"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#txpool_besustatistics",children:(0,i.jsx)(n.code,{children:"txpool_besuStatistics"})})}),(0,i.jsx)(n.td,{children:"API method to list statistics of the transaction pool."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Method"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#txpool_besupendingtransactions",children:(0,i.jsx)(n.code,{children:"txpool_besuPendingTransactions"})})}),(0,i.jsx)(n.td,{children:"API method to list pending transactions in the transaction pool."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Subscription"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/rpc-pubsub#pending-transactions",children:(0,i.jsx)(n.code,{children:"newPendingTransactions"})})}),(0,i.jsx)(n.td,{children:"RPC subscription to notify of transactions added to the transaction pool."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Subscription"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/rpc-pubsub#dropped-transactions",children:(0,i.jsx)(n.code,{children:"droppedPendingTransactions"})})}),(0,i.jsx)(n.td,{children:"RPC subscription to notify of transactions dropped from the transaction pool."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool",children:(0,i.jsx)(n.code,{children:"--tx-pool"})})}),(0,i.jsx)(n.td,{children:"Option to specify the type of transaction pool to use."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-enable-save-restore",children:(0,i.jsx)(n.code,{children:"--tx-pool-enable-save-restore"})})}),(0,i.jsx)(n.td,{children:"Option to enable save and restore functionality for the transaction pool."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-layer-max-capacity",children:(0,i.jsx)(n.code,{children:"--tx-pool-layer-max-capacity"})})}),(0,i.jsx)(n.td,{children:"Option to specify the maximum memory capacity of the layered transaction pool."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-limit-by-account-percentage",children:(0,i.jsx)(n.code,{children:"--tx-pool-limit-by-account-percentage"})})}),(0,i.jsx)(n.td,{children:"Option to limit the transaction pool by account percentage."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-max-future-by-sender",children:(0,i.jsx)(n.code,{children:"--tx-pool-max-future-by-sender"})})}),(0,i.jsx)(n.td,{children:"Option to specify the maximum number of future transactions by sender."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-max-prioritized",children:(0,i.jsx)(n.code,{children:"--tx-pool-max-prioritized"})})}),(0,i.jsx)(n.td,{children:"Option to specify the maximum number of prioritized transactions."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-max-prioritized-by-type",children:(0,i.jsx)(n.code,{children:"--tx-pool-max-prioritized-by-type"})})}),(0,i.jsx)(n.td,{children:"Option to specify the maximum number of prioritized transactions by type."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-max-size",children:(0,i.jsx)(n.code,{children:"--tx-pool-max-size"})})}),(0,i.jsx)(n.td,{children:"Option to specify the maximum size of the transaction pool."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-min-gas-price",children:(0,i.jsx)(n.code,{children:"--tx-pool-min-gas-price"})})}),(0,i.jsx)(n.td,{children:"Option to specify the minimum gas price for transactions in the pool."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-min-score",children:(0,i.jsx)(n.code,{children:"--tx-pool-min-score"})})}),(0,i.jsx)(n.td,{children:"Option to remove a pending transaction from the layered transaction pool when its score is below a specified value."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-no-local-priority",children:(0,i.jsx)(n.code,{children:"--tx-pool-no-local-priority"})})}),(0,i.jsx)(n.td,{children:"Option to disable local priority for transactions."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-price-bump",children:(0,i.jsx)(n.code,{children:"--tx-pool-price-bump"})})}),(0,i.jsx)(n.td,{children:"Option to specify the price bump percentage to replace an existing transaction."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-priority-senders",children:(0,i.jsx)(n.code,{children:"--tx-pool-priority-senders"})})}),(0,i.jsx)(n.td,{children:"Option to specify sender addresses to prioritize in the transaction pool."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-retention-hours",children:(0,i.jsx)(n.code,{children:"--tx-pool-retention-hours"})})}),(0,i.jsx)(n.td,{children:"Option to specify the number of hours to retain transactions in the pool."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"Option"}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-save-file",children:(0,i.jsx)(n.code,{children:"--tx-pool-save-file"})})}),(0,i.jsx)(n.td,{children:"Option to specify the file for saving the transaction pool state."})]})]})]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["The option ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#tx-pool-layer-max-capacity",children:(0,i.jsx)(n.code,{children:"--tx-pool-layer-max-capacity"})})," is applicable only for ",(0,i.jsx)(n.a,{href:"#layered-transaction-pool",children:"layered transaction pools"}),"."]})})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>c});var i=t(96540);const o={},s=i.createContext(o);function r(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e0a6c7d4.6ef4ed23.js b/assets/js/e0a6c7d4.6ef4ed23.js new file mode 100644 index 00000000000..aa2e1be3324 --- /dev/null +++ b/assets/js/e0a6c7d4.6ef4ed23.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8139,4852],{93120:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>c,toc:()=>d});var s=t(74848),o=t(28453);const i={},r=void 0,c={id:"global/test_accounts",title:"test_accounts",description:"The following accounts are test accounts and their private keys are publicly visible in this documentation and in publicly available source code.",source:"@site/docs/global/test_accounts.md",sourceDirName:"global",slug:"/global/test_accounts",permalink:"/global/test_accounts",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/global/test_accounts.md",tags:[],version:"current",lastUpdatedAt:1733724395e3,frontMatter:{}},a={},d=[];function l(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",pre:"pre",strong:"strong",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.admonition,{type:"danger",children:[(0,s.jsx)(n.mdxAdmonitionTitle,{children:(0,s.jsx)(n.strong,{children:"Do not use the test accounts on Ethereum Mainnet or any production network."})}),(0,s.jsx)(n.p,{children:"The following accounts are test accounts and their private keys are publicly visible in this documentation and in publicly available source code."}),(0,s.jsx)(n.p,{children:"They are not secure and everyone can use them."}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Using test accounts on Ethereum Mainnet and production networks can lead to loss of funds and identity fraud."})}),(0,s.jsx)(n.p,{children:"In this documentation, we only provide test accounts for ease of testing and learning purposes; never use them for other purposes."}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Always secure your Ethereum Mainnet and any production account properly."})}),(0,s.jsxs)(n.p,{children:["See for instance ",(0,s.jsx)(n.a,{href:"https://support.mycrypto.com/staying-safe/protecting-yourself-and-your-funds",children:'MyCrypto "Protecting Yourself and Your Funds" guide'}),"."]})]}),"\n",(0,s.jsxs)(n.admonition,{type:"info",children:[(0,s.jsxs)(n.mdxAdmonitionTitle,{children:['"Test Account 1 (address ',(0,s.jsx)(n.code,{children:"0xfe3b557e8fb62b89f4916b721be55ceb828dbd73"}),')"']}),(0,s.jsx)(n.p,{children:"Private key to copy :"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"0x8f2a55949038a9610f50fb23b5883af3b4ecb3c3bb792cbcefbd1542c692be63\n"})}),(0,s.jsxs)(n.p,{children:["Initial balance : 200 Eth ",(0,s.jsx)(n.em,{children:"(200000000000000000000 Wei)"})]})]}),"\n",(0,s.jsxs)(n.admonition,{type:"info",children:[(0,s.jsxs)(n.mdxAdmonitionTitle,{children:['"Test Account 2 (address ',(0,s.jsx)(n.code,{children:"0x627306090abaB3A6e1400e9345bC60c78a8BEf57"}),')"']}),(0,s.jsx)(n.p,{children:"Private key to copy :"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"0xc87509a1c067bbde78beb793e6fa76530b6382a4c0241e5e4a9ec0a0f44dc0d3\n"})}),(0,s.jsxs)(n.p,{children:["Initial balance : 90000 Eth ",(0,s.jsx)(n.em,{children:"(90000000000000000000000 Wei)"})]})]}),"\n",(0,s.jsxs)(n.admonition,{type:"info",children:[(0,s.jsxs)(n.mdxAdmonitionTitle,{children:['"Test Account 3 (address ',(0,s.jsx)(n.code,{children:"0xf17f52151EbEF6C7334FAD080c5704D77216b732"}),')"']}),(0,s.jsx)(n.p,{children:"Private key to copy :"}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",children:"0xae6ae8e5ccbfb04590405997ee2d52d2b330726137b875053c36d94e974d162f\n"})}),(0,s.jsxs)(n.p,{children:["Initial balance : 90000 Eth ",(0,s.jsx)(n.em,{children:"(90000000000000000000000 Wei)"})]})]})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},83426:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>r,metadata:()=>a,toc:()=>l});var s=t(74848),o=t(28453),i=t(93120);const r={title:"Accounts for testing",sidebar_position:3,description:"Ethereum accounts used for Besu testing only on private networks",tags:["private networks"]},c="Accounts for testing",a={id:"private-networks/reference/accounts-for-testing",title:"Accounts for testing",description:"Ethereum accounts used for Besu testing only on private networks",source:"@site/docs/private-networks/reference/accounts-for-testing.md",sourceDirName:"private-networks/reference",slug:"/private-networks/reference/accounts-for-testing",permalink:"/private-networks/reference/accounts-for-testing",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/reference/accounts-for-testing.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Accounts for testing",sidebar_position:3,description:"Ethereum accounts used for Besu testing only on private networks",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Private network API objects",permalink:"/private-networks/reference/api/objects"},next:{title:"Plugin API interfaces",permalink:"/private-networks/reference/plugin-api-interfaces"}},d={},l=[{value:"Development mode",id:"development-mode",level:2},...i.toc,{value:"Genesis file",id:"genesis-file",level:2}];function u(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"accounts-for-testing",children:"Accounts for testing"})}),"\n",(0,s.jsx)(n.p,{children:"You can use existing accounts for testing by including them in the genesis file for a private network. Besu also provides predefined accounts for use in development mode."}),"\n",(0,s.jsx)(n.h2,{id:"development-mode",children:"Development mode"}),"\n",(0,s.jsxs)(n.p,{children:["When you start Besu with the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#network",children:(0,s.jsx)(n.code,{children:"--network=dev"})})," command line option, Besu uses the ",(0,s.jsx)(n.code,{children:"dev.json"})," genesis file by default."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"dev.json"})," genesis file defines the following accounts used for testing."]}),"\n",(0,s.jsx)(i.default,{}),"\n",(0,s.jsx)(n.h2,{id:"genesis-file",children:"Genesis file"}),"\n",(0,s.jsxs)(n.p,{children:["To use existing test accounts, specify the accounts and balances in a genesis file for your test network. For an example of how to define accounts in the genesis file, see ",(0,s.jsx)(n.a,{href:"https://github.com/hyperledger/besu/blob/750580dcca349d22d024cc14a8171b2fa74b505a/config/src/main/resources/dev.json",children:(0,s.jsx)(n.code,{children:"dev.json"})}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["To start Besu with the genesis file defining the existing accounts, use the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#genesis-file",children:(0,s.jsx)(n.code,{children:"--genesis-file"})})," command line option ."]})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>c});var s=t(96540);const o={},i=s.createContext(o);function r(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:r(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e12df8e0.420072b0.js b/assets/js/e12df8e0.420072b0.js new file mode 100644 index 00000000000..d166f984708 --- /dev/null +++ b/assets/js/e12df8e0.420072b0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8882],{42130:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>l,contentTitle:()=>n,default:()=>a,frontMatter:()=>o,metadata:()=>c,toc:()=>u});var r=s(74848),i=s(28453);const o={title:"Security disclosure policy",sidebar_position:8,description:"Besu responsible disclosure statement",tags:["public networks","private networks"]},n="Security disclosure policy",c={id:"public-networks/reference/disclosure",title:"Security disclosure policy",description:"Besu responsible disclosure statement",source:"@site/docs/public-networks/reference/disclosure.md",sourceDirName:"public-networks/reference",slug:"/public-networks/reference/disclosure",permalink:"/public-networks/reference/disclosure",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/reference/disclosure.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:8,frontMatter:{title:"Security disclosure policy",sidebar_position:8,description:"Besu responsible disclosure statement",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Projects using Besu",permalink:"/public-networks/reference/projects-using-besu"},next:{title:"Chatbot",permalink:"/public-networks/chatbot"}},l={},u=[];function p(e){const t={a:"a",h1:"h1",header:"header",p:"p",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(t.header,{children:(0,r.jsx)(t.h1,{id:"security-disclosure-policy",children:"Security disclosure policy"})}),"\n",(0,r.jsx)(t.p,{children:"At Besu, security is a priority. But regardless of how much effort we put into system security, there might still be vulnerabilities present. If you discover a vulnerability, we need to know about it so we can take steps to address it as quickly as possible. We would like you to help us better protect our clients and our systems."}),"\n",(0,r.jsxs)(t.p,{children:["Please follow the process explained on ",(0,r.jsx)(t.a,{href:"https://wiki.hyperledger.org/display/SEC/Defect+Response",children:"defect response wiki page"}),"."]})]})}function a(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},28453:(e,t,s)=>{s.d(t,{R:()=>n,x:()=>c});var r=s(96540);const i={},o=r.createContext(i);function n(e){const t=r.useContext(o);return r.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:n(e.components),r.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e1c9c46b.fadb9bc2.js b/assets/js/e1c9c46b.fadb9bc2.js new file mode 100644 index 00000000000..fa0988374c9 --- /dev/null +++ b/assets/js/e1c9c46b.fadb9bc2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[4567],{78242:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var s=t(74848),r=t(28453);const i={title:"Create and send transactions",sidebar_position:4,description:"Send transactions using eth_call or eth_sendRawTransaction.",tags:["public networks"]},o="Create and send transactions",a={id:"public-networks/how-to/send-transactions",title:"Create and send transactions",description:"Send transactions using eth_call or eth_sendRawTransaction.",source:"@site/docs/public-networks/how-to/send-transactions.md",sourceDirName:"public-networks/how-to",slug:"/public-networks/how-to/send-transactions",permalink:"/public-networks/how-to/send-transactions",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/send-transactions.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Create and send transactions",sidebar_position:4,description:"Send transactions using eth_call or eth_sendRawTransaction.",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Use the Engine API",permalink:"/public-networks/how-to/use-engine-api"},next:{title:"Configure static nodes",permalink:"/public-networks/how-to/connect/static-nodes"}},c={},d=[{value:"eth_call vs eth_sendRawTransaction",id:"eth_call-vs-eth_sendrawtransaction",level:2},{value:"Use wallets for key management",id:"use-wallets-for-key-management",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"create-and-send-transactions",children:"Create and send transactions"})}),"\n",(0,s.jsxs)(n.p,{children:["You can send signed transactions using the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/api/#eth_sendrawtransaction",children:(0,s.jsx)(n.code,{children:"eth_sendRawTransaction"})})," JSON-RPC API method."]}),"\n",(0,s.jsxs)(n.p,{children:["Signed transactions can be simple value transfers, contract creation, or contract invocation. Set the maximum transaction fee for transactions using the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-tx-feecap",children:(0,s.jsx)(n.code,{children:"--rpc-tx-feecap"})})," CLI option."]}),"\n",(0,s.jsxs)(n.p,{children:["To accept signed transactions from remote connections, set the ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/#service-hosts",children:"API listening host"})," to ",(0,s.jsx)(n.code,{children:"0.0.0.0"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/public-networks/how-to/develop/client-libraries",children:"Use client libraries"})," to create and send a signed raw transaction to transfer Ether and create a smart contract."]}),"\n",(0,s.jsxs)(n.admonition,{title:"Private keys",type:"danger",children:[(0,s.jsx)(n.p,{children:"Don't use the accounts from the examples on Mainnet or any public network except for testing. The private keys are displayed which means the accounts are not secure."}),(0,s.jsxs)(n.p,{children:["All accounts and private keys in the examples are from the ",(0,s.jsx)(n.code,{children:"dev.json"})," genesis file in the ",(0,s.jsx)(n.a,{href:"https://github.com/hyperledger/besu/tree/master/config/src/main/resources",children:(0,s.jsx)(n.code,{children:"/besu/config/src/main/resources"})})," directory."]}),(0,s.jsxs)(n.p,{children:["In production environments avoid exposing your private keys by creating signed transactions offline, or use ",(0,s.jsx)(n.a,{href:"https://docs.web3signer.consensys.net/",children:"Web3Signer"})," to isolate your private keys and sign transactions with ",(0,s.jsx)(n.a,{href:"https://docs.web3signer.consensys.net/reference/api/json-rpc#eth_sendtransaction",children:(0,s.jsx)(n.code,{children:"eth_sendTransaction"})}),"."]})]}),"\n",(0,s.jsx)(n.admonition,{type:"caution",children:(0,s.jsxs)(n.p,{children:["Setting the ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-besu-api/#service-hosts",children:"listening host"})," to ",(0,s.jsx)(n.code,{children:"0.0.0.0"})," exposes the API service connection on your node to any remote connection. In a production environment, ensure you are using a firewall to avoid exposing your node to the internet."]})}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["Libraries such as ",(0,s.jsx)(n.a,{href:"https://github.com/web3j/web3j",children:"web3j"})," or ",(0,s.jsx)(n.a,{href:"https://github.com/ethereum/ethereumj",children:"ethereumj"})," and tools such as ",(0,s.jsx)(n.a,{href:"https://mycrypto.com/",children:"MyCrypto"})," can also create signed transactions."]})}),"\n",(0,s.jsxs)(n.h2,{id:"eth_call-vs-eth_sendrawtransaction",children:[(0,s.jsx)(n.code,{children:"eth_call"})," vs ",(0,s.jsx)(n.code,{children:"eth_sendRawTransaction"})]}),"\n",(0,s.jsxs)(n.p,{children:["You can interact with contracts using ",(0,s.jsx)(n.a,{href:"/public-networks/reference/api/#eth_call",children:(0,s.jsx)(n.code,{children:"eth_call"})})," or ",(0,s.jsx)(n.a,{href:"/public-networks/reference/api/#eth_sendrawtransaction",children:(0,s.jsx)(n.code,{children:"eth_sendRawTransaction"})}),". The table below compares the characteristics of both calls."]}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:(0,s.jsx)(n.code,{children:"eth_call"})}),(0,s.jsx)(n.th,{children:(0,s.jsx)(n.code,{children:"eth_sendRawTransaction"})})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Read-only"}),(0,s.jsx)(n.td,{children:"Write"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Invokes contract function locally"}),(0,s.jsx)(n.td,{children:"Broadcasts to the network"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Does not change state of blockchain"}),(0,s.jsx)(n.td,{children:"Updates the blockchain (for example, transfers ether between accounts)"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Does not consume gas"}),(0,s.jsx)(n.td,{children:"Requires gas"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Synchronous"}),(0,s.jsx)(n.td,{children:"Asynchronous"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Returns the value of a contract function available immediately"}),(0,s.jsx)(n.td,{children:"Returns transaction hash only. A block might not include all possible transactions (for example, if the gas price is too low)."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"use-wallets-for-key-management",children:"Use wallets for key management"}),"\n",(0,s.jsx)(n.p,{children:"Besu doesn't support key management inside the client. Use:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"https://docs.web3signer.consensys.net/",children:"Web3Signer"})," with Besu to provide access to your key store and sign transactions."]}),"\n",(0,s.jsxs)(n.li,{children:["Third-party tools (for example, ",(0,s.jsx)(n.a,{href:"https://metamask.io/",children:"MetaMask"})," and ",(0,s.jsx)(n.a,{href:"https://web3j.io/",children:"web3j"}),") for creating accounts."]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var s=t(96540);const r={},i=s.createContext(r);function o(e){const n=s.useContext(i);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e6ca27ec.6615161a.js b/assets/js/e6ca27ec.6615161a.js new file mode 100644 index 00000000000..5ad1b1ac1fb --- /dev/null +++ b/assets/js/e6ca27ec.6615161a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[231],{6345:(e,s,t)=>{t.r(s),t.d(s,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>o,toc:()=>l});var n=t(74848),a=t(28453);const i={title:"Privacy best practices",description:"Privacy best practices",sidebar_position:9,tags:["private networks"]},r="Privacy best practices (Deprecated)",o={id:"private-networks/how-to/use-privacy/performance-best-practices",title:"Privacy best practices",description:"Privacy best practices",source:"@site/docs/private-networks/how-to/use-privacy/performance-best-practices.md",sourceDirName:"private-networks/how-to/use-privacy",slug:"/private-networks/how-to/use-privacy/performance-best-practices",permalink:"/private-networks/how-to/use-privacy/performance-best-practices",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/use-privacy/performance-best-practices.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:9,frontMatter:{title:"Privacy best practices",description:"Privacy best practices",sidebar_position:9,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use the web3js-quorum library",permalink:"/private-networks/how-to/use-privacy/web3js-quorum"},next:{title:"Use local permissioning",permalink:"/private-networks/how-to/use-permissioning/local"}},c={},l=[{value:"General performance",id:"general-performance",level:2},{value:"Use fast, local, solid state storage",id:"use-fast-local-solid-state-storage",level:3},{value:"Private transaction performance",id:"private-transaction-performance",level:2},{value:"Use concurrent submission",id:"use-concurrent-submission",level:3},{value:"Co-locate Besu and Tessera",id:"co-locate-besu-and-tessera",level:3},{value:"Optimize worst-case latency between Tessera nodes",id:"optimize-worst-case-latency-between-tessera-nodes",level:3},{value:"Use stateful nonce management",id:"use-stateful-nonce-management",level:3},{value:"Use random senders for privacy marker transactions",id:"use-random-senders-for-privacy-marker-transactions",level:3},{value:"Avoid queuing transactions in Tessera",id:"avoid-queuing-transactions-in-tessera",level:3},{value:"Limit the group size to reduce communication overhead",id:"limit-the-group-size-to-reduce-communication-overhead",level:3},{value:"Limit group membership changes and make them quick",id:"limit-group-membership-changes-and-make-them-quick",level:3}];function d(e){const s={a:"a",admonition:"admonition",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(s.header,{children:(0,n.jsx)(s.h1,{id:"privacy-best-practices-deprecated",children:"Privacy best practices (Deprecated)"})}),"\n",(0,n.jsx)(s.admonition,{type:"caution",children:(0,n.jsxs)(s.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,n.jsx)(s.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,n.jsx)(s.p,{children:"This document collects deployment and usage tips to help you achieve high performance for private transactions. If transaction throughput or latency is not meeting your expectations, please consider the following before raising an issue."}),"\n",(0,n.jsx)(s.h2,{id:"general-performance",children:"General performance"}),"\n",(0,n.jsx)(s.p,{children:"Private transactions use the same facilities as public ones. General Besu performance tunings apply. Specific approaches are out of scope of this document, except for the following, which strongly impacts performance:"}),"\n",(0,n.jsx)(s.h3,{id:"use-fast-local-solid-state-storage",children:"Use fast, local, solid state storage"}),"\n",(0,n.jsx)(s.p,{children:"Running EVM transactions creates a lot of random reads that are executed sequentially. The Besu data folder for high throughput nodes should be located on the fastest possible storage media."}),"\n",(0,n.jsxs)(s.ul,{children:["\n",(0,n.jsxs)(s.li,{children:["Prefer ",(0,n.jsx)(s.a,{href:"https://cloud.google.com/compute/docs/disks/local-ssd#performance",children:"NVMe"})," attached SLC flash or Intel Optane."]}),"\n",(0,n.jsx)(s.li,{children:"Avoid network attached SSDs or cloud storage with limited input/output operations per second."}),"\n",(0,n.jsx)(s.li,{children:"Do not use spinning disks under any circumstances."}),"\n"]}),"\n",(0,n.jsx)(s.h2,{id:"private-transaction-performance",children:"Private transaction performance"}),"\n",(0,n.jsx)(s.h3,{id:"use-concurrent-submission",children:"Use concurrent submission"}),"\n",(0,n.jsxs)(s.p,{children:["When submitting a private transaction using ",(0,n.jsx)(s.a,{href:"https://github.com/ConsenSys/web3js-quorum",children:"web3js-quorum"}),", the submit call will only return once the privacy marker transaction has been included in a block. This limits the throughput to at most one private transaction per block when submitting from a single thread. To increase throughput, use web3js-quorum from multiple concurrent threads or processes."]}),"\n",(0,n.jsx)(s.h3,{id:"co-locate-besu-and-tessera",children:"Co-locate Besu and Tessera"}),"\n",(0,n.jsx)(s.p,{children:"Besu has to talk to its local Tessera node frequently while handling a block. While we do not recommend running them on the same node, minimizing the latency between Besu and Tessera will improve block processing times. Besu and Tessera should not be hosted in geographically distributed locations."}),"\n",(0,n.jsx)(s.h3,{id:"optimize-worst-case-latency-between-tessera-nodes",children:"Optimize worst-case latency between Tessera nodes"}),"\n",(0,n.jsx)(s.p,{children:"When distributing a new private transaction between Tessera nodes, the overall throughput is determined by the slowest Tessera nodes. Try to minimize network latency between Tessera nodes and do not mix different machine types when hosting Tessera."}),"\n",(0,n.jsx)(s.h3,{id:"use-stateful-nonce-management",children:"Use stateful nonce management"}),"\n",(0,n.jsx)(s.p,{children:"Management of public and private nonces in web3js-quorum is stateless: before a transaction is sent, web3js-quorum has to query for those nonces. This is increasing latency, the node's load, and is a source of fragility due to nonce collision when multiple senders try to use the same account concurrently."}),"\n",(0,n.jsx)(s.p,{children:"For performance and reliability it is advantageous to manage nonces in a stateful manner on the client side instead of querying them for every transaction."}),"\n",(0,n.jsx)(s.h3,{id:"use-random-senders-for-privacy-marker-transactions",children:"Use random senders for privacy marker transactions"}),"\n",(0,n.jsxs)(s.p,{children:["To avoid public nonce management, privacy marker transactions can be sent using a ",(0,n.jsx)(s.a,{href:"/private-networks/reference/cli/options#privacy-marker-transaction-signing-key-file-deprecated",children:"random account per transaction"}),". This option is only available for zero gas networks."]}),"\n",(0,n.jsx)(s.h3,{id:"avoid-queuing-transactions-in-tessera",children:"Avoid queuing transactions in Tessera"}),"\n",(0,n.jsx)(s.p,{children:"When Tessera is overloaded with transactions, the performance breaks down catastrophically due to unbounded growth of the request queue. Avoid sending more transactions to Tessera than it can handle. Sudden jumps in submission latency and submission failure rate should be answered with a load reduction on the client side, for example using a back-off scheme."}),"\n",(0,n.jsx)(s.p,{children:"Please note that this is not Tessera specific but a general issue in distributed systems. It just happens that if queueing discipline is not maintained, Tessera tends to be the first component to fail."}),"\n",(0,n.jsx)(s.h3,{id:"limit-the-group-size-to-reduce-communication-overhead",children:"Limit the group size to reduce communication overhead"}),"\n",(0,n.jsx)(s.p,{children:"Smaller groups need fewer communication for transaction propagation. If reducing the number of Tessera nodes involved in a transaction is an option, it will lead to slightly better tail latencies. Multi-tenancy Tessera can be used to have large groups with a small number of Tessera nodes (possibly only one)."}),"\n",(0,n.jsx)(s.h3,{id:"limit-group-membership-changes-and-make-them-quick",children:"Limit group membership changes and make them quick"}),"\n",(0,n.jsx)(s.p,{children:"Groups are locked (prevented from executing transactions) during membership changes. Try to minimize the number of times the membership changes. When possible, spread load across multiple groups to always have some groups available while others are locked. Consider batching group membership changes if possible. Note however that this does not work with the default management contract, yet."})]})}function u(e={}){const{wrapper:s}={...(0,a.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}},28453:(e,s,t)=>{t.d(s,{R:()=>r,x:()=>o});var n=t(96540);const a={},i=n.createContext(a);function r(e){const s=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(s):{...s,...e}}),[s,e])}function o(e){let s;return s=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:r(e.components),n.createElement(i.Provider,{value:s},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e8e619e2.f1de5c95.js b/assets/js/e8e619e2.f1de5c95.js new file mode 100644 index 00000000000..c89d739cb8e --- /dev/null +++ b/assets/js/e8e619e2.f1de5c95.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1178],{1788:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>a,default:()=>u,frontMatter:()=>s,metadata:()=>o,toc:()=>p});var t=n(74848),i=n(28453);const s={title:"Use Besu-extended privacy",description:"Besu-extended privacy",sidebar_position:2,tags:["private networks"]},a="Use Besu-extended privacy (Deprecated)",o={id:"private-networks/how-to/use-privacy/besu-extended",title:"Use Besu-extended privacy",description:"Besu-extended privacy",source:"@site/docs/private-networks/how-to/use-privacy/besu-extended.md",sourceDirName:"private-networks/how-to/use-privacy",slug:"/private-networks/how-to/use-privacy/besu-extended",permalink:"/private-networks/how-to/use-privacy/besu-extended",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/use-privacy/besu-extended.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Use Besu-extended privacy",description:"Besu-extended privacy",sidebar_position:2,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use EEA-compliant privacy",permalink:"/private-networks/how-to/use-privacy/eea-compliant"},next:{title:"Run Tessera with Besu",permalink:"/private-networks/how-to/use-privacy/tessera"}},c={},p=[{value:"Privacy group type",id:"privacy-group-type",level:2}];function d(e){const r={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"use-besu-extended-privacy-deprecated",children:"Use Besu-extended privacy (Deprecated)"})}),"\n",(0,t.jsx)(r.admonition,{type:"caution",children:(0,t.jsxs)(r.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,t.jsx)(r.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,t.jsxs)(r.p,{children:["Besu provides an extended implementation of privacy allowing you to ",(0,t.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"create a privacy group for a set of participants"}),". You must specify the privacy group ID when sending private transactions."]}),"\n",(0,t.jsxs)(r.p,{children:["To enable the ",(0,t.jsxs)(r.a,{href:"/private-networks/reference/api/#priv-methods",children:[(0,t.jsx)(r.code,{children:"PRIV"})," API methods"]}),", use the ",(0,t.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,t.jsx)(r.code,{children:"--rpc-http-api"})})," or ",(0,t.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,t.jsx)(r.code,{children:"--rpc-ws-api"})})," command line options."]}),"\n",(0,t.jsxs)(r.p,{children:["To create the privacy group containing the recipients of a private transaction, use ",(0,t.jsx)(r.a,{href:"/private-networks/reference/api/#priv_createprivacygroup",children:(0,t.jsx)(r.code,{children:"priv_createPrivacyGroup"})}),"."]}),"\n",(0,t.jsxs)(r.p,{children:["To create an EEA-compliant private transaction, specify ",(0,t.jsx)(r.code,{children:"privacyGroupId"})," when creating the signed transaction passed as an input parameter to ",(0,t.jsx)(r.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,t.jsx)(r.code,{children:"eea_sendRawTransaction"})}),"."]}),"\n",(0,t.jsx)(r.h2,{id:"privacy-group-type",children:"Privacy group type"}),"\n",(0,t.jsxs)(r.p,{children:["Privacy groups created using ",(0,t.jsx)(r.a,{href:"/private-networks/reference/api/#priv_createprivacygroup",children:(0,t.jsx)(r.code,{children:"priv_createPrivacyGroup"})})," have a ",(0,t.jsx)(r.code,{children:"BESU"})," privacy group type when returned by ",(0,t.jsx)(r.a,{href:"/private-networks/reference/api/#priv_findprivacygroup",children:(0,t.jsx)(r.code,{children:"priv_findPrivacyGroup"})}),"."]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "privacyGroupId": "GpK3ErNO0xF27T0sevgkJ3+4qk9Z+E3HtXYxcKIBKX8=",\n "name": "Group B",\n "description": "Description of Group B",\n "type": "BESU",\n "members": [\n "negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk=",\n "g59BmTeJIn7HIcnq8VQWgyh/pDbvbt2eyP0Ii60aDDw="\n ]\n }\n ]\n}\n'})})]})}function u(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453:(e,r,n)=>{n.d(r,{R:()=>a,x:()=>o});var t=n(96540);const i={},s=t.createContext(i);function a(e){const r=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),t.createElement(s.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ebb34ddb.3c997c0e.js b/assets/js/ebb34ddb.3c997c0e.js new file mode 100644 index 00000000000..f41bce074ac --- /dev/null +++ b/assets/js/ebb34ddb.3c997c0e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[9729],{54479:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>c,contentTitle:()=>o,default:()=>h,frontMatter:()=>i,metadata:()=>a,toc:()=>d});var n=r(74848),s=r(28453);const i={title:"Private networks",sidebar_position:1,sidebar_label:"Introduction",id:"index",description:"Private networks overview",tags:["private networks"]},o="Besu for private (permissioned) networks",a={id:"private-networks/index",title:"Private networks",description:"Private networks overview",source:"@site/docs/private-networks/index.md",sourceDirName:"private-networks",slug:"/private-networks/",permalink:"/private-networks/",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/index.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Private networks",sidebar_position:1,sidebar_label:"Introduction",id:"index",description:"Private networks overview",tags:["private networks"]},sidebar:"privateDocSidebar",next:{title:"Get started",permalink:"/private-networks/get-started"}},c={},d=[{value:"Architecture",id:"architecture",level:2}];function p(e){const t={a:"a",h1:"h1",h2:"h2",header:"header",img:"img",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(t.header,{children:(0,n.jsx)(t.h1,{id:"besu-for-private-permissioned-networks",children:"Besu for private (permissioned) networks"})}),"\n",(0,n.jsx)(t.p,{children:"You can use Besu to develop enterprise applications requiring secure, high-performance transaction processing in a private network."}),"\n",(0,n.jsxs)(t.p,{children:["A private (also known as permissioned) network is a network not connected to Ethereum Mainnet or an Ethereum testnet. Private networks typically use a different ",(0,n.jsx)(t.a,{href:"/public-networks/concepts/network-and-chain-id",children:"chain ID"})," and proof of authority (PoA) consensus (",(0,n.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/qbft",children:"QBFT"}),", ",(0,n.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/ibft",children:"IBFT 2.0"}),", or ",(0,n.jsx)(t.a,{href:"/private-networks/how-to/configure/consensus/clique",children:"Clique"}),")."]}),"\n",(0,n.jsxs)(t.p,{children:["You can also ",(0,n.jsx)(t.a,{href:"/private-networks/tutorials/ethash",children:"create a local development network using proof of work (PoW) (Deprecated)"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["Besu supports enterprise features including ",(0,n.jsx)(t.a,{href:"/private-networks/concepts/privacy/",children:"privacy (Deprecated)"})," and ",(0,n.jsx)(t.a,{href:"/private-networks/concepts/permissioning/",children:"permissioning"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["Get started with the ",(0,n.jsx)(t.a,{href:"/private-networks/tutorials/quickstart",children:"Developer Quickstart"})," to rapidly generate local blockchain networks."]}),"\n",(0,n.jsxs)(t.p,{children:["If you have any questions about Besu for private (permissioned) networks, ask on the ",(0,n.jsx)(t.strong,{children:"besu-enterprise"})," channel on\n",(0,n.jsx)(t.a,{href:"https://discord.com/channels/905194001349627914/1172617318845657199",children:"Discord"}),"."]}),"\n",(0,n.jsx)(t.h2,{id:"architecture",children:"Architecture"}),"\n",(0,n.jsx)(t.p,{children:"The following diagram outlines the high-level architecture of Besu for private networks."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Private architecture",src:r(15929).A+"",width:"828",height:"527"})})]})}function h(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(p,{...e})}):p(e)}},15929:(e,t,r)=>{r.d(t,{A:()=>n});const n=r.p+"assets/images/private-architecture-59c51f89aeec2e5bc07bcd4be2f8a679.jpeg"},28453:(e,t,r)=>{r.d(t,{R:()=>o,x:()=>a});var n=r(96540);const s={},i=n.createContext(s);function o(e){const t=n.useContext(i);return n.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ec4f4180.2a0994b4.js b/assets/js/ec4f4180.2a0994b4.js new file mode 100644 index 00000000000..09cf746021c --- /dev/null +++ b/assets/js/ec4f4180.2a0994b4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7372],{88764:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>i,metadata:()=>c,toc:()=>u});var s=t(74848),r=t(28453),a=t(11470),o=t(19365);const i={title:"Run Besu and Teku on a testnet",sidebar_position:2,description:"Run Besu and Teku on Holesky, Ephemery, or Sepolia testnet.",tags:["public networks"]},l="Run Besu and Teku on a testnet",c={id:"public-networks/tutorials/besu-teku-testnet",title:"Run Besu and Teku on a testnet",description:"Run Besu and Teku on Holesky, Ephemery, or Sepolia testnet.",source:"@site/docs/public-networks/tutorials/besu-teku-testnet.md",sourceDirName:"public-networks/tutorials",slug:"/public-networks/tutorials/besu-teku-testnet",permalink:"/public-networks/tutorials/besu-teku-testnet",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/tutorials/besu-teku-testnet.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Run Besu and Teku on a testnet",sidebar_position:2,description:"Run Besu and Teku on Holesky, Ephemery, or Sepolia testnet.",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Run Besu and Teku on Mainnet",permalink:"/public-networks/tutorials/besu-teku-mainnet"},next:{title:"Deploy Besu using Kubernetes",permalink:"/public-networks/tutorials/kubernetes"}},d={},u=[{value:"1. Install Besu and Teku",id:"1-install-besu-and-teku",level:2},{value:"2. Generate the shared secret",id:"2-generate-the-shared-secret",level:2},{value:"3. Generate validator keys",id:"3-generate-validator-keys",level:2},{value:"4. Start Besu",id:"4-start-besu",level:2},{value:"5. Start Teku",id:"5-start-teku",level:2},{value:"Beacon node only",id:"beacon-node-only",level:3},{value:"Beacon node and validator client",id:"beacon-node-and-validator-client",level:3},{value:"6. Wait for Besu and Teku to sync",id:"6-wait-for-besu-and-teku-to-sync",level:2},{value:"7. Stake ETH",id:"7-stake-eth",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"run-besu-and-teku-on-a-testnet",children:"Run Besu and Teku on a testnet"})}),"\n",(0,s.jsxs)(n.p,{children:["Run Besu as an ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-clients#execution-clients",children:"execution client"})," and ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/",children:"Teku"})," as a ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-clients#consensus-clients",children:"consensus client"})," on the ",(0,s.jsx)(n.a,{href:"https://github.com/eth-clients/holesky",children:"Holesky"}),", ",(0,s.jsx)(n.a,{href:"https://github.com/ephemery-testnet/ephemery-resources",children:"Ephemery"}),", and ",(0,s.jsx)(n.a,{href:"https://github.com/eth-clients/sepolia",children:"Sepolia"})," Ethereum testnets."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["Sepolia is a permissioned network and you can't run a validator client on it without ",(0,s.jsx)(n.a,{href:"https://notes.ethereum.org/zvkfSmYnT0-uxwwEegbCqg",children:"requesting to become a validator"})," first. You can connect your consensus client using the beacon node only, without any validator duties."]})}),"\n",(0,s.jsx)(n.h2,{id:"1-install-besu-and-teku",children:"1. Install Besu and Teku"}),"\n",(0,s.jsxs)(n.p,{children:["Install ",(0,s.jsx)(n.a,{href:"/public-networks/get-started/install/binary-distribution",children:"Besu"})," and ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/HowTo/Get-Started/Installation-Options/Install-Binaries/",children:"Teku"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"Ensure you meet the prerequisites for the installation option you use. For example, you must have Java 21+ if using the Besu and Teku binary distributions."}),"\n",(0,s.jsxs)(n.p,{children:["Ensure you meet the ",(0,s.jsx)(n.a,{href:"/public-networks/get-started/system-requirements",children:"system requirements for Besu on public networks"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"2-generate-the-shared-secret",children:"2. Generate the shared secret"}),"\n",(0,s.jsx)(n.p,{children:"Run the following command:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'openssl rand -hex 32 | tr -d "\\n" > jwtsecret.hex\n'})}),"\n",(0,s.jsxs)(n.p,{children:["You will specify ",(0,s.jsx)(n.code,{children:"jwtsecret.hex"})," when starting Besu and Teku. This is a shared JWT secret the clients use to authenticate each other when using the ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/use-engine-api",children:"Engine API"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"3-generate-validator-keys",children:"3. Generate validator keys"}),"\n",(0,s.jsxs)(n.p,{children:["If you're running Teku as a beacon node only, skip to the ",(0,s.jsx)(n.a,{href:"#4-start-besu",children:"next step"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If you're also running Teku as a validator client, create a test Ethereum address (you can do this in ",(0,s.jsx)(n.a,{href:"https://metamask.zendesk.com/hc/en-us/articles/360015289452-How-to-create-an-additional-account-in-your-wallet",children:"MetaMask"}),"). Fund this address with testnet ETH (32 ETH and gas fees for each validator) using a faucet. See the list of ",(0,s.jsx)(n.a,{href:"https://github.com/eth-clients/holesky",children:"Holesky faucets"}),", ",(0,s.jsx)(n.a,{href:"https://ephemery-faucet.pk910.de/",children:"Ephemery faucets"}),", and ",(0,s.jsx)(n.a,{href:"https://github.com/eth-clients/sepolia#meta-data-sepolia",children:"Sepolia faucets"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["If you can't get ETH using the faucet, you can ask for help on the ",(0,s.jsx)(n.a,{href:"https://discord.com/invite/ethstaker",children:"EthStaker Discord"}),"."]})}),"\n",(0,s.jsxs)(n.p,{children:["Generate validator keys for one or more validators using the ",(0,s.jsx)(n.a,{href:"https://holesky.launchpad.ethereum.org/",children:"Holesky Staking Launchpad"}),", ",(0,s.jsx)(n.a,{href:"https://launchpad.ephemery.dev/",children:"Ephemery Staking Launchpad"})," (or ",(0,s.jsx)(n.a,{href:"https://notes.ethereum.org/zvkfSmYnT0-uxwwEegbCqg",children:"request to become validator on Sepolia"}),")."]}),"\n",(0,s.jsx)(n.admonition,{type:"info",children:(0,s.jsxs)(n.p,{children:["Save the password you use to generate each key pair in a ",(0,s.jsx)(n.code,{children:".txt"})," file. You should also have a ",(0,s.jsx)(n.code,{children:".json"})," file for each validator key pair."]})}),"\n",(0,s.jsx)(n.h2,{id:"4-start-besu",children:"4. Start Besu"}),"\n",(0,s.jsxs)(n.p,{children:["Run the following command or specify the options in a ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/configure-besu/",children:"configuration file"}),":"]}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(o.A,{value:"Holesky",label:"Holesky",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'besu \\\n --network=holesky \\\n --rpc-http-enabled=true \\\n --rpc-http-cors-origins="*" \\\n --rpc-ws-enabled=true \\\n --p2p-host= \\\n --host-allowlist="*" \\\n --engine-host-allowlist="*" \\\n --engine-rpc-enabled \\\n --engine-jwt-secret=\n'})})}),(0,s.jsx)(o.A,{value:"Sepolia",label:"Sepolia",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'besu \\\n --network=sepolia \\\n --rpc-http-enabled=true \\\n --rpc-http-cors-origins="*" \\\n --rpc-ws-enabled=true \\\n --p2p-host= \\ \n --host-allowlist="*" \\\n --engine-host-allowlist="*" \\\n --engine-rpc-enabled \\\n --engine-jwt-secret=\n'})})}),(0,s.jsx)(o.A,{value:"Ephemery",label:"Ephemery",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'besu \\\n --network=ephemery \\\n --rpc-http-enabled=true \\\n --rpc-http-cors-origins="*" \\\n --rpc-ws-enabled=true \\\n --p2p-host= \\\n --host-allowlist="*" \\\n --engine-host-allowlist="*" \\\n --engine-rpc-enabled \\\n --engine-jwt-secret=\n'})})})]}),"\n",(0,s.jsxs)(n.p,{children:["Specify the path to the ",(0,s.jsx)(n.code,{children:"jwtsecret.hex"})," file generated in ",(0,s.jsx)(n.a,{href:"#2-generate-the-shared-secret",children:"step 2"})," using the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#engine-jwt-secret",children:(0,s.jsx)(n.code,{children:"--engine-jwt-secret"})})," option."]}),"\n",(0,s.jsxs)(n.p,{children:["You can modify the option values and add other ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options",children:"command line options"})," as needed."]}),"\n",(0,s.jsx)(n.h2,{id:"5-start-teku",children:"5. Start Teku"}),"\n",(0,s.jsx)(n.p,{children:"Open a new terminal window."}),"\n",(0,s.jsx)(n.h3,{id:"beacon-node-only",children:"Beacon node only"}),"\n",(0,s.jsxs)(n.p,{children:["To run Teku as a beacon node only (without validator duties), run the following command or specify the options in the ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/HowTo/Configure/Use-Configuration-File/",children:"Teku configuration file"}),":"]}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(o.A,{value:"Holesky",label:"Holesky",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"teku \\\n --network=holesky \\\n --ee-endpoint=http://localhost:8551 \\\n --ee-jwt-secret-file= \\\n --metrics-enabled=true \\\n --rest-api-enabled=true \\\n --p2p-advertised-ip= \\ \n --checkpoint-sync-url=\n"})})}),(0,s.jsx)(o.A,{value:"Sepolia",label:"Sepolia",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"teku \\\n --network=sepolia \\\n --ee-endpoint=http://localhost:8551 \\\n --ee-jwt-secret-file= \\\n --metrics-enabled=true \\\n --rest-api-enabled=true \\\n --p2p-advertised-ip= \\ \n --checkpoint-sync-url=\n"})})}),(0,s.jsx)(o.A,{value:"Ephemery",label:"Ephemery",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"teku \\\n --network=ephemery \\\n --ee-endpoint=http://localhost:8551 \\\n --ee-jwt-secret-file= \\\n --metrics-enabled=true \\\n --rest-api-enabled=true \\\n --p2p-advertised-ip= \\ \n --checkpoint-sync-url=\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"Specify:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The path to the ",(0,s.jsx)(n.code,{children:"jwtsecret.hex"})," file generated in ",(0,s.jsx)(n.a,{href:"#2-generate-the-shared-secret",children:"step 2"})," using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#ee-jwt-secret-file",children:(0,s.jsx)(n.code,{children:"--ee-jwt-secret-file"})})," option."]}),"\n",(0,s.jsxs)(n.li,{children:["The public IP address of your Teku node using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#p2p-advertised-ip",children:(0,s.jsx)(n.code,{children:"--p2p-advertised-ip"})})," option."]}),"\n",(0,s.jsxs)(n.li,{children:["The URL of a checkpoint sync endpoint using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#checkpoint-sync-url",children:(0,s.jsx)(n.code,{children:"--checkpoint-sync-url"})})," option."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["You can modify the option values and add other ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/Reference/CLI/CLI-Syntax/",children:"Teku command line options"})," as needed."]}),"\n",(0,s.jsx)(n.h3,{id:"beacon-node-and-validator-client",children:"Beacon node and validator client"}),"\n",(0,s.jsxs)(n.p,{children:["To run Teku as a beacon node and validator in a single process, run the following command or specify the options in the ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/HowTo/Configure/Use-Configuration-File/",children:"Teku configuration file"}),":"]}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(o.A,{value:"Holesky",label:"Holesky",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"teku \\\n --network=holesky \\\n --ee-endpoint=http://localhost:8551 \\\n --ee-jwt-secret-file= \\\n --metrics-enabled=true \\\n --rest-api-enabled=true \\\n --p2p-advertised-ip= \\ \n --checkpoint-sync-url= \\\n --validators-proposer-default-fee-recipient= \\\n --validator-keys=:[,:,...]\n"})})}),(0,s.jsx)(o.A,{value:"Sepolia",label:"Sepolia",children:(0,s.jsxs)(n.p,{children:["Sepolia is a permissioned network and you can't run a validator client on it without ",(0,s.jsx)(n.a,{href:"https://notes.ethereum.org/zvkfSmYnT0-uxwwEegbCqg",children:"requesting to become a validator"})," first."]})})]}),"\n",(0,s.jsx)(n.p,{children:"Specify:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The path to the ",(0,s.jsx)(n.code,{children:"jwtsecret.hex"})," file generated in ",(0,s.jsx)(n.a,{href:"#2-generate-the-shared-secret",children:"step 2"})," using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#ee-jwt-secret-file",children:(0,s.jsx)(n.code,{children:"--ee-jwt-secret-file"})})," option."]}),"\n",(0,s.jsxs)(n.li,{children:["The public IP address of your Teku node using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#p2p-advertised-ip",children:(0,s.jsx)(n.code,{children:"--p2p-advertised-ip"})})," option."]}),"\n",(0,s.jsxs)(n.li,{children:["The URL of a checkpoint sync endpoint using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#checkpoint-sync-url",children:(0,s.jsx)(n.code,{children:"--checkpoint-sync-url"})})," option."]}),"\n",(0,s.jsxs)(n.li,{children:["The test Ethereum address created in ",(0,s.jsx)(n.a,{href:"#3-generate-validator-keys",children:"step 3"})," as the default fee\nrecipient using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#validators-proposer-default-fee-recipient",children:(0,s.jsx)(n.code,{children:"--validators-proposer-default-fee-recipient"})}),"\noption."]}),"\n",(0,s.jsxs)(n.li,{children:["The paths to the keystore ",(0,s.jsx)(n.code,{children:".json"})," file and password ",(0,s.jsx)(n.code,{children:".txt"})," file created in\n",(0,s.jsx)(n.a,{href:"#3-generate-validator-keys",children:"step 3"})," for each validator using the\n",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.io/reference/cli#validator-keys",children:(0,s.jsx)(n.code,{children:"--validator-keys"})})," option.\nSeparate the ",(0,s.jsx)(n.code,{children:".json"})," and ",(0,s.jsx)(n.code,{children:".txt"})," files with a colon, and separate entries for multiple validators with commas."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["You can modify the option values and add other ",(0,s.jsx)(n.a,{href:"https://docs.teku.consensys.net/Reference/CLI/CLI-Syntax/",children:"Teku command line options"})," as needed."]}),"\n",(0,s.jsx)(n.h2,{id:"6-wait-for-besu-and-teku-to-sync",children:"6. Wait for Besu and Teku to sync"}),"\n",(0,s.jsx)(n.p,{children:"After starting Besu and Teku, your node starts syncing and connecting to peers."}),"\n",(0,s.jsxs)(a.A,{children:[(0,s.jsx)(o.A,{value:"Besu logs",label:"Besu logs",default:!0,children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-json",children:'{"@timestamp":"2023-02-03T04:43:49,555","level":"INFO","thread":"main","class":"DefaultSynchronizer","message":"Starting synchronizer.","throwable":""}\n{"@timestamp":"2023-02-03T04:43:49,556","level":"INFO","thread":"main","class":"FastSyncDownloader","message":"Starting sync","throwable":""}\n{"@timestamp":"2023-02-03T04:43:49,559","level":"INFO","thread":"main","class":"Runner","message":"Ethereum main loop is up.","throwable":""}\n{"@timestamp":"2023-02-03T04:43:53,106","level":"INFO","thread":"Timer-0","class":"DNSResolver","message":"Resolved 2409 nodes","throwable":""}\n{"@timestamp":"2023-02-03T04:45:04,803","level":"INFO","thread":"nioEventLoopGroup-3-10","class":"SnapWorldStateDownloader","message":"Downloading world state from peers for pivot block 16545859 (0x616ae3c4cf85f95a9bce2814a7282d75dc2eac36\ncb9f0fcc6f16386df70da3c5). State root 0xa7114541f42c62a72c8b6bb9901c2ccf4b424cd7f76570a67b82a183b02f25dc pending requests 0","throwable":""}\n{"@timestamp":"2023-02-03T04:46:04,834","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.08%, Peer count: 8","throwable":""}\n{"@timestamp":"2023-02-03T04:48:01,840","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.23%, Peer count: 8","throwable":""}\n{"@timestamp":"2023-02-03T04:49:09,931","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.41%, Peer count: 11","throwable":""}\n{"@timestamp":"2023-02-03T04:50:12,466","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.61%, Peer count: 10","throwable":""}\n{"@timestamp":"2023-02-03T04:51:20,977","level":"INFO","thread":"EthScheduler-Services-3 (batchPersistAccountData)","class":"SnapsyncMetricsManager","message":"Worldstate download progress: 0.75%, Peer count: 10","throwable":""}\n{"@timestamp":"2023-02-03T04:51:28,985","level":"INFO","thread":"EthScheduler-Services-29 (importBlock)","class":"FastImportBlocksStep","message":"Block import progress: 180400 of 16545859 (1%)","throwable":""}\n'})})}),(0,s.jsx)(o.A,{value:"Teku logs",label:"Teku logs",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"2022-03-21 20:43:24.355 INFO - Syncing *** Target slot: 76092, Head slot: 2680, Remaining slots: 73412, Connected peers: 8\n2022-03-21 20:43:36.363 INFO - Syncing *** Target slot: 76093, Head slot: 2879, Remaining slots: 73214, Connected peers: 10\n2022-03-21 20:43:48.327 INFO - Syncing *** Target slot: 76094, Head slot: 3080, Remaining slots: 73014, Connected peers: 8\n2022-03-21 20:44:00.339 INFO - Syncing *** Target slot: 76095, Head slot: 3317, Remaining slots: 72778, Connected peers: 6\n2022-03-21 20:44:12.353 INFO - Syncing *** Target slot: 76096, Head slot: 3519, Remaining slots: 72577, Connected peers: 9\n"})})})]}),"\n",(0,s.jsx)(n.p,{children:"If you're running Teku as a beacon node only, you're all set. If you're also running Teku as a validator client, ensure Besu and Teku are fully synced before submitting your staking deposit in the next step. Syncing Besu can take several days."}),"\n",(0,s.jsx)(n.h2,{id:"7-stake-eth",children:"7. Stake ETH"}),"\n",(0,s.jsxs)(n.p,{children:["Stake your testnet ETH for one or more validators using the ",(0,s.jsx)(n.a,{href:"https://holesky.launchpad.ethereum.org/",children:"Holesky Staking Launchpad"})," or ",(0,s.jsx)(n.a,{href:"https://launchpad.ephemery.dev/",children:"Ephemery Staking Launchpad"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["You can check your validator status by searching your Ethereum address on the ",(0,s.jsx)(n.a,{href:"https://holesky.beaconcha.in/",children:"Holesky Beacon Chain explorer"})," or ",(0,s.jsx)(n.a,{href:"https://beaconchain.ephemery.dev/",children:"Ephemery Beacon Chain explorer"}),". It may take up to multiple days for your validator to be activated and start proposing blocks."]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},19365:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var s=t(18215);const r={tabItem:"tabItem_Ymn6"};var a=t(74848);function o(e){let{children:n,hidden:t,className:o}=e;return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,o),hidden:t,children:n})}},11470:(e,n,t)=>{t.d(n,{A:()=>v});var s=t(96540),r=t(18215),a=t(23104),o=t(56347),i=t(205),l=t(57485),c=t(31682),d=t(70679);function u(e){return s.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:t}=e;return(0,s.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:t,attributes:s,default:r}}=e;return{value:n,label:t,attributes:s,default:r}}))}(t);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,t])}function p(e){let{value:n,tabValues:t}=e;return t.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:t}=e;const r=(0,o.W6)(),a=function(e){let{queryString:n=!1,groupId:t}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:n,groupId:t});return[(0,l.aZ)(a),(0,s.useCallback)((e=>{if(!a)return;const n=new URLSearchParams(r.location.search);n.set(a,e),r.replace({...r.location,search:n.toString()})}),[a,r])]}function b(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,a=h(e),[o,l]=(0,s.useState)((()=>function(e){let{defaultValue:n,tabValues:t}=e;if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${t.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const s=t.find((e=>e.default))??t[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:a}))),[c,u]=f({queryString:t,groupId:r}),[b,m]=function(e){let{groupId:n}=e;const t=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,a]=(0,d.Dv)(t);return[r,(0,s.useCallback)((e=>{t&&a.set(e)}),[t,a])]}({groupId:r}),x=(()=>{const e=c??b;return p({value:e,tabValues:a})?e:null})();(0,i.A)((()=>{x&&l(x)}),[x]);return{selectedValue:o,selectValue:(0,s.useCallback)((e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);l(e),u(e),m(e)}),[u,m,a]),tabValues:a}}var m=t(92303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function y(e){let{className:n,block:t,selectedValue:s,selectValue:o,tabValues:i}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,a.a_)(),d=e=>{const n=e.currentTarget,t=l.indexOf(n),r=i[t].value;r!==s&&(c(n),o(r))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},n),children:i.map((e=>{let{value:n,label:t,attributes:a}=e;return(0,g.jsx)("li",{role:"tab",tabIndex:s===n?0:-1,"aria-selected":s===n,ref:e=>l.push(e),onKeyDown:u,onClick:d,...a,className:(0,r.A)("tabs__item",x.tabItem,a?.className,{"tabs__item--active":s===n}),children:t??n},n)}))})}function k(e){let{lazy:n,children:t,selectedValue:a}=e;const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(n){const e=o.find((e=>e.props.value===a));return e?(0,s.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:o.map(((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==a})))})}function j(e){const n=b(e);return(0,g.jsxs)("div",{className:(0,r.A)("tabs-container",x.tabList),children:[(0,g.jsx)(y,{...n,...e}),(0,g.jsx)(k,{...n,...e})]})}function v(e){const n=(0,m.A)();return(0,g.jsx)(j,{...e,children:u(e.children)},String(n))}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>i});var s=t(96540);const r={},a=s.createContext(r);function o(e){const n=s.useContext(a);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ecc00064.0f6a64b8.js b/assets/js/ecc00064.0f6a64b8.js new file mode 100644 index 00000000000..663a2256e05 --- /dev/null +++ b/assets/js/ecc00064.0f6a64b8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[6384],{68060:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>d,frontMatter:()=>o,metadata:()=>a,toc:()=>p});var s=r(74848),n=r(28453);const o={sidebar_position:3,title:"Use Kubernetes",description:"Deploying Besu with Kubernetes",tags:["private networks"]},i="Deploy Besu with Kubernetes",a={id:"private-networks/how-to/deploy/kubernetes",title:"Use Kubernetes",description:"Deploying Besu with Kubernetes",source:"@site/docs/private-networks/how-to/deploy/kubernetes.md",sourceDirName:"private-networks/how-to/deploy",slug:"/private-networks/how-to/deploy/kubernetes",permalink:"/private-networks/how-to/deploy/kubernetes",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/deploy/kubernetes.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{sidebar_position:3,title:"Use Kubernetes",description:"Deploying Besu with Kubernetes",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use Ansible",permalink:"/private-networks/how-to/deploy/ansible"},next:{title:"Use Ethstats network monitor",permalink:"/private-networks/how-to/deploy/ethstats"}},u={},p=[];function l(e){const t={a:"a",h1:"h1",header:"header",p:"p",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"deploy-besu-with-kubernetes",children:"Deploy Besu with Kubernetes"})}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.a,{href:"https://github.com/ConsenSys/quorum-kubernetes",children:"reference implementations"})," to install private networks using Kubernetes (K8s). The repository has full support for cloud providers like AWS, Azure, GCP, and IBM, and has production setups that use of identities and cloud-native secret storage services like Azure KeyVault and AWS Secrets Manager."]}),"\n",(0,s.jsxs)(t.p,{children:["Refer to the ",(0,s.jsx)(t.a,{href:"/private-networks/tutorials/kubernetes/",children:"tutorial"})," and familiarize yourself with the reference implementations, and customize them to your requirements."]})]})}function d(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453:(e,t,r)=>{r.d(t,{R:()=>i,x:()=>a});var s=r(96540);const n={},o=s.createContext(n);function i(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:i(e.components),s.createElement(o.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/edcc188d.fda8c4a6.js b/assets/js/edcc188d.fda8c4a6.js new file mode 100644 index 00000000000..6a3a93715a5 --- /dev/null +++ b/assets/js/edcc188d.fda8c4a6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[389],{47096:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>d,contentTitle:()=>s,default:()=>l,frontMatter:()=>i,metadata:()=>a,toc:()=>p});var o=r(74848),n=r(28453);const i={title:"Upgrade",description:"Upgrading protocol versions",sidebar_position:8,tags:["private networks"]},s="Network and protocol upgrades",a={id:"private-networks/how-to/upgrade",title:"Upgrade",description:"Upgrading protocol versions",source:"@site/docs/private-networks/how-to/upgrade.md",sourceDirName:"private-networks/how-to",slug:"/private-networks/how-to/upgrade",permalink:"/private-networks/how-to/upgrade",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/upgrade.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:8,frontMatter:{title:"Upgrade",description:"Upgrading protocol versions",sidebar_position:8,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Backup and restore",permalink:"/private-networks/how-to/backup"},next:{title:"Concepts",permalink:"/private-networks/concepts/"}},d={},p=[{value:"Upgrade the protocol",id:"upgrade-the-protocol",level:2}];function c(e){const t={a:"a",admonition:"admonition",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"network-and-protocol-upgrades",children:"Network and protocol upgrades"})}),"\n",(0,o.jsx)(t.admonition,{type:"info",children:(0,o.jsxs)(t.p,{children:["Node upgrades upgrade your Besu client to a later version. In private networks, you can ",(0,o.jsx)(t.a,{href:"/public-networks/how-to/upgrade-node",children:"upgrade your node"})," as in public networks."]})}),"\n",(0,o.jsx)(t.p,{children:"Network upgrades are the mechanism for upgrading the Ethereum protocol. Protocol upgrades occur during the network upgrades."}),"\n",(0,o.jsx)(t.p,{children:"For Ethereum Mainnet and public testnets, the milestone block definitions are included in Besu. Upgrading your Besu client applies the network upgrade."}),"\n",(0,o.jsx)(t.p,{children:"For private networks, all network participants must agree on the protocol upgrades and coordinate the network upgrades. The genesis file specifies the milestone block at which to apply the protocol upgrade."}),"\n",(0,o.jsx)(t.h2,{id:"upgrade-the-protocol",children:"Upgrade the protocol"}),"\n",(0,o.jsx)(t.p,{children:"To upgrade the protocol in a private network:"}),"\n",(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsxs)(t.li,{children:["Review included EIPs for breaking changes. A ",(0,o.jsx)(t.a,{href:"https://eips.ethereum.org/meta",children:"meta EIP"})," for each protocol upgrade lists included EIPs. For example, ",(0,o.jsx)(t.a,{href:"https://eips.ethereum.org/EIPS/eip-1679",children:"Istanbul"}),"."]}),"\n",(0,o.jsx)(t.li,{children:"Network participants agree on the block number at which to upgrade."}),"\n",(0,o.jsxs)(t.li,{children:["For each node in the network:","\n",(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsxs)(t.li,{children:["Add the ",(0,o.jsx)(t.a,{href:"/public-networks/reference/genesis-items#milestone-blocks",children:"milestone block number"})," to the genesis file."]}),"\n",(0,o.jsx)(t.li,{children:"Restart the node before reaching milestone block."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(t.admonition,{type:"caution",children:(0,o.jsx)(t.p,{children:"To avoid a forked network, all network participants must update their genesis file to include the agreed on milestone block and restart their node before reaching the milestone block."})}),"\n",(0,o.jsx)(t.admonition,{type:"tip",children:(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:"For compatibility with future protocol upgrades, don't hardcode any gas price assumptions."}),"\n",(0,o.jsx)(t.li,{children:"Implementing upgradeable contracts enables contracts to be upgraded if a protocol upgrade does include breaking changes."}),"\n"]})})]})}function l(e={}){const{wrapper:t}={...(0,n.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},28453:(e,t,r)=>{r.d(t,{R:()=>s,x:()=>a});var o=r(96540);const n={},i=o.createContext(n);function s(e){const t=o.useContext(i);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function a(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),o.createElement(i.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ee08513e.cbccea58.js b/assets/js/ee08513e.cbccea58.js new file mode 100644 index 00000000000..93844cd80a0 --- /dev/null +++ b/assets/js/ee08513e.cbccea58.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1639],{80870:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>o,default:()=>h,frontMatter:()=>s,metadata:()=>c,toc:()=>l});var i=t(74848),r=t(28453);const s={title:"Specify NAT method",sidebar_position:4,description:"Configuring NAT with Besu",tags:["public networks","private networks"]},o="Specify the NAT method",c={id:"public-networks/how-to/connect/specify-nat",title:"Specify NAT method",description:"Configuring NAT with Besu",source:"@site/docs/public-networks/how-to/connect/specify-nat.md",sourceDirName:"public-networks/how-to/connect",slug:"/public-networks/how-to/connect/specify-nat",permalink:"/public-networks/how-to/connect/specify-nat",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/connect/specify-nat.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Specify NAT method",sidebar_position:4,description:"Configuring NAT with Besu",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Manage peers",permalink:"/public-networks/how-to/connect/manage-peers"},next:{title:"Monitor Besu",permalink:"/public-networks/how-to/monitor/"}},d={},l=[{value:"Auto",id:"auto",level:2},{value:"UPnP",id:"upnp",level:2},{value:"Kubernetes",id:"kubernetes",level:2},{value:"Docker",id:"docker",level:2},{value:"None",id:"none",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.header,{children:(0,i.jsx)(n.h1,{id:"specify-the-nat-method",children:"Specify the NAT method"})}),"\n",(0,i.jsxs)(n.p,{children:["Use the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#nat-method",children:(0,i.jsx)(n.code,{children:"--nat-method"})})," option to specify the NAT method. Options are: ",(0,i.jsx)(n.a,{href:"#upnp",children:(0,i.jsx)(n.code,{children:"UPNP"})}),", ",(0,i.jsx)(n.a,{href:"#kubernetes",children:(0,i.jsx)(n.code,{children:"KUBERNETES"})}),", ",(0,i.jsx)(n.a,{href:"#docker",children:(0,i.jsx)(n.code,{children:"DOCKER"})}),", ",(0,i.jsx)(n.a,{href:"#auto",children:(0,i.jsx)(n.code,{children:"AUTO"})}),", and ",(0,i.jsx)(n.a,{href:"#none",children:(0,i.jsx)(n.code,{children:"NONE"})}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.a,{href:"/public-networks/concepts/node-keys#enode-url",children:"enode"})," advertised to other nodes during discovery is the external IP address and port. The ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#admin_nodeinfo",children:(0,i.jsx)(n.code,{children:"admin_nodeInfo"})})," JSON-RPC API method returns the external address and port for the ",(0,i.jsx)(n.code,{children:"enode"})," and ",(0,i.jsx)(n.code,{children:"listenAddr"})," properties."]}),"\n",(0,i.jsx)(n.p,{children:"While Besu is running, the following are not supported:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"IP address changes"}),"\n",(0,i.jsxs)(n.li,{children:["Changing NAT methods. To change the NAT method, restart the node with the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#nat-method",children:(0,i.jsx)(n.code,{children:"--nat-method"})})," option set."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"auto",children:"Auto"}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"AUTO"})," detects if Besu is running inside a Kubernetes cluster or a Docker container."]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["If Besu is running in a Kubernetes cluster, ",(0,i.jsx)(n.code,{children:"AUTO"})," sets to ",(0,i.jsx)(n.a,{href:"#kubernetes",children:(0,i.jsx)(n.code,{children:"KUBERNETES"})}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["If Besu is running in a Docker container, ",(0,i.jsx)(n.code,{children:"AUTO"})," sets to ",(0,i.jsx)(n.a,{href:"#docker",children:(0,i.jsx)(n.code,{children:"DOCKER"})}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["If Besu is not running in Kubernetes or Docker container, ",(0,i.jsx)(n.code,{children:"AUTO"})," sets to ",(0,i.jsx)(n.a,{href:"#none",children:(0,i.jsx)(n.code,{children:"NONE"})}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"AUTO"})," is the default NAT method."]}),"\n",(0,i.jsx)(n.p,{children:"The following log shows an automatic detection failure."}),"\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-log",metastring:'title="The following log shows an automatic detection failure"',children:"INFO | KubernetesNatManager | Starting kubernetes NAT manager.\nDEBUG | KubernetesNatManager | Trying to update information using Kubernetes client SDK.\nDEBUG | NatService | Nat manager failed to configure itself automatically due to the following reason Service not found. NONE mode will be used\nINFO | NetworkRunner | Starting Network.\n"})}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["If automatic detection fails, set the IP and ports in ",(0,i.jsx)(n.a,{href:"#none",children:(0,i.jsx)(n.code,{children:"NONE"})})," mode."]})}),"\n",(0,i.jsx)(n.h2,{id:"upnp",children:"UPnP"}),"\n",(0,i.jsxs)(n.p,{children:["Specify ",(0,i.jsx)(n.code,{children:"UPNP"})," to quickly allow inbound peer connections without manual router configuration. Use UPnP in home or small office environments where a wireless router or modem provides NAT isolation."]}),"\n",(0,i.jsx)(n.p,{children:"UPnP automatically detects if a node is running in a UPnP environment and provides port forwarding. UPnP might introduce delays during node startup, especially on networks without a UPnP gateway device."}),"\n",(0,i.jsxs)(n.p,{children:["Use ",(0,i.jsx)(n.code,{children:"UPNPP2PONLY"})," if you wish to enable UPnP only for p2p traffic."]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsx)(n.p,{children:"UPnP support is often disabled by default in networking firmware. If disabled by default, you must explicitly enable UPnP support."})}),"\n",(0,i.jsx)(n.admonition,{type:"info",children:(0,i.jsxs)(n.p,{children:["When the NAT method is set to ",(0,i.jsx)(n.code,{children:"UPNP"}),", the advertised port is the same as the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:"listening port"}),"."]})}),"\n",(0,i.jsx)(n.h2,{id:"kubernetes",children:"Kubernetes"}),"\n",(0,i.jsxs)(n.p,{children:["Specify ",(0,i.jsx)(n.code,{children:"KUBERNETES"})," to explicitly specify Besu is running inside a Kubernetes cluster. Besu automatically detects if it's running inside of a Kubernetes cluster and interacts with Kubernetes APIs as required to determine external IP addresses and exposed ports."]}),"\n",(0,i.jsx)(n.p,{children:"In Kubernetes, the Ingress IP of the load balancer will be used as the external IP for Besu. A load balancer service can map any incoming port to a target port. These mapping rules will be the one retrieved by Besu."}),"\n",(0,i.jsxs)(n.p,{children:["A tutorial to ",(0,i.jsx)(n.a,{href:"/private-networks/tutorials/kubernetes/nat-manager",children:"Configure the Nat Manager for Kubernetes"})," is available."]}),"\n",(0,i.jsx)(n.h2,{id:"docker",children:"Docker"}),"\n",(0,i.jsxs)(n.p,{children:["Specify ",(0,i.jsx)(n.code,{children:"DOCKER"})," to explicitly specify Besu is running inside a Docker container. If you specify ",(0,i.jsx)(n.code,{children:"DOCKER"}),", you advertise the host IP address not the container IP address."]}),"\n",(0,i.jsxs)(n.p,{children:["The host IP address is the advertised host specified in the ",(0,i.jsxs)(n.a,{href:"https://docs.docker.com/engine/reference/commandline/run/#add-entries-to-container-hosts-file---add-host",children:[(0,i.jsx)(n.code,{children:"docker run"})," command"]}),". If not specified in the ",(0,i.jsx)(n.code,{children:"docker run"})," command, the advertised host defaults to the values for ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-host",children:(0,i.jsx)(n.code,{children:"--p2p-host"})})," and ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,i.jsx)(n.code,{children:"--p2p-port"})}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"none",children:"None"}),"\n",(0,i.jsxs)(n.p,{children:["Specify ",(0,i.jsx)(n.code,{children:"NONE"})," to explicitly configure the external IP address and ports advertised using:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-host",children:(0,i.jsx)(n.code,{children:"--p2p-host"})})," and ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:(0,i.jsx)(n.code,{children:"--p2p-port"})})," for the P2P service."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-host",children:(0,i.jsx)(n.code,{children:"--rpc-http-host"})})," and ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-port",children:(0,i.jsx)(n.code,{children:"--rpc-http-port"})})," for the JSON-RPC HTTP service."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The P2P and JSON-RPC HTTP hosts and ports are advertised in the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/api/#net_services",children:(0,i.jsx)(n.code,{children:"net_services"})})," method."]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsxs)(n.p,{children:["When the NAT method is set to ",(0,i.jsx)(n.code,{children:"NONE"}),", the advertised port is the same as the ",(0,i.jsx)(n.a,{href:"/public-networks/reference/cli/options#p2p-port",children:"listening port"}),"."]})})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(a,{...e})}):a(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>c});var i=t(96540);const r={},s=i.createContext(r);function o(e){const n=i.useContext(s);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),i.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/ee5d8003.ec6e3a50.js b/assets/js/ee5d8003.ec6e3a50.js new file mode 100644 index 00000000000..4c915c35637 --- /dev/null +++ b/assets/js/ee5d8003.ec6e3a50.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5193],{68952:(e,n,a)=>{a.r(n),a.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>c,toc:()=>u});var t=a(74848),r=a(28453),s=a(11470),i=a(19365);const o={title:"Private network subcommands",sidebar_position:2,description:"Besu command line interface subcommands",tags:["private networks"]},l="Private network subcommands",c={id:"private-networks/reference/cli/subcommands",title:"Private network subcommands",description:"Besu command line interface subcommands",source:"@site/docs/private-networks/reference/cli/subcommands.md",sourceDirName:"private-networks/reference/cli",slug:"/private-networks/reference/cli/subcommands",permalink:"/private-networks/reference/cli/subcommands",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/reference/cli/subcommands.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:2,frontMatter:{title:"Private network subcommands",sidebar_position:2,description:"Besu command line interface subcommands",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Private network options",permalink:"/private-networks/reference/cli/options"},next:{title:"Private network API methods",permalink:"/private-networks/reference/api/"}},d={},u=[{value:"operator",id:"operator",level:2},{value:"generate-blockchain-config",id:"generate-blockchain-config",level:3},{value:"rlp",id:"rlp",level:2},{value:"decode",id:"decode",level:3},{value:"encode",id:"encode",level:3},{value:"IBFT 2.0 extra data",id:"ibft-20-extra-data",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",mdxAdmonitionTitle:"mdxAdmonitionTitle",p:"p",pre:"pre",ul:"ul",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"private-network-subcommands",children:"Private network subcommands"})}),"\n",(0,t.jsx)(n.p,{children:"This reference describes the syntax of the Besu private network command line interface (CLI) subcommands."}),"\n",(0,t.jsx)(n.admonition,{title:"Important",type:"caution",children:(0,t.jsxs)(n.p,{children:["This reference contains subcommands that apply to only private networks. For subcommands that apply to both private and public networks, see the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/cli/subcommands",children:"public network subcommands reference"}),"."]})}),"\n",(0,t.jsx)(n.p,{children:"To start a Besu node using subcommands, run:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"besu [OPTIONS] [SUBCOMMAND] [SUBCOMMAND OPTIONS]\n"})}),"\n",(0,t.jsx)(n.p,{children:"If using Bash or Z shell, you can view subcommand suggestions by pressing the Tab key twice."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"besu Tab+Tab\n"})}),"\n",(0,t.jsx)(n.h2,{id:"operator",children:(0,t.jsx)(n.code,{children:"operator"})}),"\n",(0,t.jsx)(n.p,{children:"Provides operator actions."}),"\n",(0,t.jsx)(n.h3,{id:"generate-blockchain-config",children:(0,t.jsx)(n.code,{children:"generate-blockchain-config"})}),"\n",(0,t.jsxs)(s.A,{children:[(0,t.jsx)(i.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"besu operator generate-blockchain-config --config-file= --to= [--genesis-file-name=] [--private-key-file-name=] [--public-key-file-name=]\n"})})}),(0,t.jsx)(i.A,{value:"Example",label:"Example",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"besu operator generate-blockchain-config --config-file=config.json --to=myNetworkFiles\n"})})})]}),"\n",(0,t.jsxs)(n.p,{children:["Generates an ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft#genesis-file",children:"IBFT 2.0"})," or ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft#genesis-file",children:"QBFT"})," genesis file."]}),"\n",(0,t.jsxs)(n.p,{children:["The configuration file has two nested JSON nodes. The first is the ",(0,t.jsx)(n.code,{children:"genesis"})," property defining the IBFT 2.0 or QBFT genesis file, except for the ",(0,t.jsx)(n.code,{children:"extraData"})," string. The second is the ",(0,t.jsx)(n.code,{children:"blockchain"})," property defining the number of key pairs to generate."]}),"\n",(0,t.jsx)(n.h2,{id:"rlp",children:(0,t.jsx)(n.code,{children:"rlp"})}),"\n",(0,t.jsx)(n.p,{children:"Provides RLP related actions."}),"\n",(0,t.jsx)(n.h3,{id:"decode",children:(0,t.jsx)(n.code,{children:"decode"})}),"\n",(0,t.jsxs)(s.A,{children:[(0,t.jsx)(i.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"besu rlp decode [--from=] [--to=] [--type=]\n"})})}),(0,t.jsx)(i.A,{value:"File example",label:"File example",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"besu rlp decode --from=ibft_extra_data.txt --to=decoded_ibft_extra_data.txt --type=IBFT_EXTRA_DATA\n"})})}),(0,t.jsx)(i.A,{value:"Standard input/output example",label:"Standard input/output example",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"cat ibft_extra_data.txt | besu rlp decode > decoded_ibft_extra_data.txt\n"})})})]}),"\n",(0,t.jsxs)(n.p,{children:["Decodes the RLP hexadecimal string used as ",(0,t.jsx)(n.code,{children:"extraData"})," in an\n",(0,t.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft#extra-data",children:"IBFT 2.0"})," or\n",(0,t.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft#extra-data",children:"QBFT"})," genesis file into a validator list."]}),"\n",(0,t.jsx)(n.p,{children:"This subcommand takes the following options:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"from"})," - The file containing the RLP hexadecimal string to decode.\nThe default is standard input."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"to"})," - The file to write the decoded validator list to.\nThe default is standard output."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"type"})," - ",(0,t.jsx)(n.code,{children:"IBFT_EXTRA_DATA"})," for an IBFT 2.0 ",(0,t.jsx)(n.code,{children:"extraData"})," string, or ",(0,t.jsx)(n.code,{children:"QBFT_EXTRA_DATA"})," for a QBFT\n",(0,t.jsx)(n.code,{children:"extraData"})," string.\nThe default is ",(0,t.jsx)(n.code,{children:"IBFT_EXTRA_DATA"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"encode",children:(0,t.jsx)(n.code,{children:"encode"})}),"\n",(0,t.jsxs)(s.A,{children:[(0,t.jsx)(i.A,{value:"Syntax",label:"Syntax",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"besu rlp encode [--from=] [--to=] [--type=]\n"})})}),(0,t.jsx)(i.A,{value:"File example",label:"File example",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"besu rlp encode --from=ibft_extra_data.json --to=extra_data_for_ibft_genesis.txt --type=IBFT_EXTRA_DATA\n"})})}),(0,t.jsx)(i.A,{value:"Standard input/output example",label:"Standard input/output example",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"cat extra_data.json | besu rlp encode > rlp.txt\n"})})})]}),"\n",(0,t.jsxs)(n.p,{children:["Encodes a validator list into an RLP hexadecimal string to use as ",(0,t.jsx)(n.code,{children:"extraData"})," in an\n",(0,t.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/ibft#extra-data",children:"IBFT 2.0"})," or\n",(0,t.jsx)(n.a,{href:"/private-networks/how-to/configure/consensus/qbft#extra-data",children:"QBFT"})," genesis file."]}),"\n",(0,t.jsx)(n.p,{children:"This subcommand takes the following options:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"from"})," - The file containing the validator list to encode.\nThe default is standard input."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"to"})," - The file to write the RLP-encoded hexadecimal string to.\nThe default is standard output."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.code,{children:"type"})," - ",(0,t.jsx)(n.code,{children:"IBFT_EXTRA_DATA"})," for an IBFT 2.0 ",(0,t.jsx)(n.code,{children:"extraData"})," string, or ",(0,t.jsx)(n.code,{children:"QBFT_EXTRA_DATA"})," for a QBFT\n",(0,t.jsx)(n.code,{children:"extraData"})," string.\nThe default is ",(0,t.jsx)(n.code,{children:"IBFT_EXTRA_DATA"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"ibft-20-extra-data",children:"IBFT 2.0 extra data"}),"\n",(0,t.jsxs)(n.p,{children:["To generate the RLP encoded ",(0,t.jsx)(n.code,{children:"extraData"})," string, specify a JSON input that is an array of validator addresses in ascending order."]}),"\n",(0,t.jsxs)(n.admonition,{type:"tip",children:[(0,t.jsxs)(n.mdxAdmonitionTitle,{children:["JSON schema for ",(0,t.jsx)(n.code,{children:"IBFT_EXTRA_DATA"})]}),(0,t.jsxs)(n.p,{children:["Use the following JSON schema to validate that your JSON data is well-formatted. To validate your JSON content, use an online validation tool, such as ",(0,t.jsx)(n.a,{href:"https://www.jsonschemavalidator.net/",children:"JSON Schema Validator"}),"."]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'{\n "$schema": "http://json-schema.org/draft-07/schema#",\n "$id": "http://org.hyperledger.besu/cli_rlp_ibft_extra_data.json",\n "type": "array",\n "definitions": {},\n "title": "IBFT extra data",\n "description": "JSON format used as input to generate an IBFT extra data RLP string",\n "items": {\n "$id": "#/address",\n "type": "string",\n "title": "Validator address",\n "description": "The validator node address",\n "default": "",\n "examples": [\n "be068f726a13c8d46c44be6ce9d275600e1735a4",\n "5ff6f4b66a46a2b2310a6f3a93aaddc0d9a1c193"\n ],\n "pattern": "^([0-9a-f]{40})$"\n }\n}\n'})}),(0,t.jsxs)(n.p,{children:["Example ",(0,t.jsx)(n.code,{children:"IBFT_EXTRA_DATA"})," encoding:"]}),(0,t.jsxs)(s.A,{children:[(0,t.jsx)(i.A,{value:"JSON input",label:"JSON input",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-json",children:'[\n "be068f726a13c8d46c44be6ce9d275600e1735a4",\n "5ff6f4b66a46a2b2310a6f3a93aaddc0d9a1c193"\n]\n'})})}),(0,t.jsx)(i.A,{value:"RLP output",label:"RLP output",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"0xf853a00000000000000000000000000000000000000000000000000000000000000000ea94be068f726a13c8d46c44be6ce9d275600e1735a4945ff6f4b66a46a2b2310a6f3a93aaddc0d9a1c193808400000000c0\n"})})})]})]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},19365:(e,n,a)=>{a.d(n,{A:()=>i});a(96540);var t=a(18215);const r={tabItem:"tabItem_Ymn6"};var s=a(74848);function i(e){let{children:n,hidden:a,className:i}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,t.A)(r.tabItem,i),hidden:a,children:n})}},11470:(e,n,a)=>{a.d(n,{A:()=>w});var t=a(96540),r=a(18215),s=a(23104),i=a(56347),o=a(205),l=a(57485),c=a(31682),d=a(70679);function u(e){return t.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,t.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:a}=e;return(0,t.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:a,attributes:t,default:r}}=e;return{value:n,label:a,attributes:t,default:r}}))}(a);return function(e){const n=(0,c.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,a])}function p(e){let{value:n,tabValues:a}=e;return a.some((e=>e.value===n))}function f(e){let{queryString:n=!1,groupId:a}=e;const r=(0,i.W6)(),s=function(e){let{queryString:n=!1,groupId:a}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!a)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return a??null}({queryString:n,groupId:a});return[(0,l.aZ)(s),(0,t.useCallback)((e=>{if(!s)return;const n=new URLSearchParams(r.location.search);n.set(s,e),r.replace({...r.location,search:n.toString()})}),[s,r])]}function x(e){const{defaultValue:n,queryString:a=!1,groupId:r}=e,s=h(e),[i,l]=(0,t.useState)((()=>function(e){let{defaultValue:n,tabValues:a}=e;if(0===a.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!p({value:n,tabValues:a}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${a.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const t=a.find((e=>e.default))??a[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:n,tabValues:s}))),[c,u]=f({queryString:a,groupId:r}),[x,m]=function(e){let{groupId:n}=e;const a=function(e){return e?`docusaurus.tab.${e}`:null}(n),[r,s]=(0,d.Dv)(a);return[r,(0,t.useCallback)((e=>{a&&s.set(e)}),[a,s])]}({groupId:r}),b=(()=>{const e=c??x;return p({value:e,tabValues:s})?e:null})();(0,o.A)((()=>{b&&l(b)}),[b]);return{selectedValue:i,selectValue:(0,t.useCallback)((e=>{if(!p({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);l(e),u(e),m(e)}),[u,m,s]),tabValues:s}}var m=a(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=a(74848);function g(e){let{className:n,block:a,selectedValue:t,selectValue:i,tabValues:o}=e;const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.a_)(),d=e=>{const n=e.currentTarget,a=l.indexOf(n),r=o[a].value;r!==t&&(c(n),i(r))},u=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=l.indexOf(e.currentTarget)+1;n=l[a]??l[0];break}case"ArrowLeft":{const a=l.indexOf(e.currentTarget)-1;n=l[a]??l[l.length-1];break}}n?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":a},n),children:o.map((e=>{let{value:n,label:a,attributes:s}=e;return(0,j.jsx)("li",{role:"tab",tabIndex:t===n?0:-1,"aria-selected":t===n,ref:e=>l.push(e),onKeyDown:u,onClick:d,...s,className:(0,r.A)("tabs__item",b.tabItem,s?.className,{"tabs__item--active":t===n}),children:a??n},n)}))})}function v(e){let{lazy:n,children:a,selectedValue:s}=e;const i=(Array.isArray(a)?a:[a]).filter(Boolean);if(n){const e=i.find((e=>e.props.value===s));return e?(0,t.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,j.jsx)("div",{className:"margin-top--md",children:i.map(((e,n)=>(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==s})))})}function T(e){const n=x(e);return(0,j.jsxs)("div",{className:(0,r.A)("tabs-container",b.tabList),children:[(0,j.jsx)(g,{...n,...e}),(0,j.jsx)(v,{...n,...e})]})}function w(e){const n=(0,m.A)();return(0,j.jsx)(T,{...e,children:u(e.children)},String(n))}},28453:(e,n,a)=>{a.d(n,{R:()=>i,x:()=>o});var t=a(96540);const r={},s=t.createContext(r);function i(e){const n=t.useContext(s);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),t.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/eeceef6b.f0a4738b.js b/assets/js/eeceef6b.f0a4738b.js new file mode 100644 index 00000000000..2e8e76d953a --- /dev/null +++ b/assets/js/eeceef6b.f0a4738b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[3164],{66181:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>t,metadata:()=>s,toc:()=>d});var r=o(74848),a=o(28453);o(11470),o(19365);const t={title:"Reduce storage for Bonsai Tries",sidebar_position:9,description:"Reduce the size of your database when using Bonsai Tries",tags:["public networks"]},i="Reduce storage for Bonsai Tries",s={id:"public-networks/how-to/bonsai-limit-trie-logs",title:"Reduce storage for Bonsai Tries",description:"Reduce the size of your database when using Bonsai Tries",source:"@site/docs/public-networks/how-to/bonsai-limit-trie-logs.md",sourceDirName:"public-networks/how-to",slug:"/public-networks/how-to/bonsai-limit-trie-logs",permalink:"/public-networks/how-to/bonsai-limit-trie-logs",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/bonsai-limit-trie-logs.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:9,frontMatter:{title:"Reduce storage for Bonsai Tries",sidebar_position:9,description:"Reduce the size of your database when using Bonsai Tries",tags:["public networks"]},sidebar:"publicDocSidebar",previous:{title:"Use Java Flight Recorder",permalink:"/public-networks/how-to/configure-java/java-flight-recorder"},next:{title:"Use Hardhat",permalink:"/public-networks/how-to/develop/hardhat"}},l={},d=[{value:"Limit and prune trie logs",id:"limit-and-prune-trie-logs",level:2},{value:"Prune outdated trie logs",id:"prune-outdated-trie-logs",level:3},{value:"Troubleshoot",id:"troubleshoot",level:2},{value:"Prune command for Mainnet",id:"prune-command-for-mainnet",level:3},{value:"Subcommand not working",id:"subcommand-not-working",level:3},{value:"Column handle not found for segment TRIE_BRANCH_STORAGE",id:"column-handle-not-found-for-segment-trie_branch_storage",level:3},{value:"Database not detected",id:"database-not-detected",level:3},{value:"Cannot store generated private key",id:"cannot-store-generated-private-key",level:3},{value:"Valid keypair not provided",id:"valid-keypair-not-provided",level:3},{value:"Column handle not found for segment WORLD_STATE",id:"column-handle-not-found-for-segment-world_state",level:3},{value:"Resource temporarily unavailable",id:"resource-temporarily-unavailable",level:3},{value:"Unable to change the sync mode",id:"unable-to-change-the-sync-mode",level:3},{value:"Cannot run trie log prune",id:"cannot-run-trie-log-prune",level:3},{value:"Block does not match stored chain data",id:"block-does-not-match-stored-chain-data",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"reduce-storage-for-bonsai-tries",children:"Reduce storage for Bonsai Tries"})}),"\n",(0,r.jsxs)(n.p,{children:["When using the ",(0,r.jsx)(n.a,{href:"/public-networks/concepts/data-storage-formats#bonsai-tries",children:"Bonsai Tries"})," data storage format,\n",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#bonsai-limit-trie-logs-enabled",children:(0,r.jsx)(n.code,{children:"--bonsai-limit-trie-logs-enabled"})})," is\nenabled by default.\nWhen enabled, this feature can reduce database growth by more than 3 GB each week on Mainnet."]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["If ",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:(0,r.jsx)(n.code,{children:"--sync-mode=FULL"})})," is set, the\n",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#bonsai-limit-trie-logs-enabled",children:(0,r.jsx)(n.code,{children:"--bonsai-limit-trie-logs-enabled"})}),"\noption is disallowed and must be set to ",(0,r.jsx)(n.code,{children:"false"}),"."]})}),"\n",(0,r.jsx)(n.h2,{id:"limit-and-prune-trie-logs",children:"Limit and prune trie logs"}),"\n",(0,r.jsxs)(n.p,{children:["If you're running Besu without\n",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#bonsai-limit-trie-logs-enabled",children:(0,r.jsx)(n.code,{children:"--bonsai-limit-trie-logs-enabled"})}),",\nyou might have a backlog of redundant trie logs.\nYou can prune these using the following instructions."]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsx)(n.p,{children:"Ensure you are using Besu version 24.6.0 or later.\nIf you are using an older version, upgrade Besu or refer to the older version of the documentation."})}),"\n",(0,r.jsx)(n.admonition,{type:"caution",children:(0,r.jsx)(n.p,{children:"The following commands are examples.\nBefore executing these example commands on your node, modify them to apply to your node's configuration."})}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:"Stop Besu."}),"\n",(0,r.jsxs)(n.li,{children:["(Optional) Run the Besu trie log prune command. Specify the Bonsai Trie data storage format and the data directory for your Besu database:","\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo /usr/local/bin/besu/bin/besu --data-storage-format=BONSAI --data-path=/var/lib/besu --sync-mode=SNAP storage trie-log prune\n"})}),"\n"]}),"\n",(0,r.jsx)(n.li,{children:"Start Besu."}),"\n",(0,r.jsxs)(n.li,{children:["Look for ",(0,r.jsx)(n.code,{children:"Limit trie logs enabled: retention: 512; prune window: 30000"})," in your Besu configuration printout at startup."]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"prune-outdated-trie-logs",children:"Prune outdated trie logs"}),"\n",(0,r.jsxs)(n.p,{children:["When you start Besu with\n",(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#bonsai-limit-trie-logs-enabled",children:(0,r.jsx)(n.code,{children:"--bonsai-limit-trie-logs-enabled"})}),", it\ncontinuously prunes the unnecessary trie log data, removing it one block at a time.\nThis process begins after an initial reduction in the database size during startup."]}),"\n",(0,r.jsxs)(n.p,{children:["Enabling ",(0,r.jsx)(n.code,{children:"--bonsai-limit-trie-logs-enabled"})," on a long-running node does not immediately clear your backlog of trie logs in the same way resyncing does.\nInstead of resyncing, you can run an offline command to immediately prune old trie logs.\nTo run the offline command, you must shut down Besu for a minimal period.\nIf the ",(0,r.jsx)(n.code,{children:"--bonsai-limit-trie-logs-enabled"})," option is enabled, you do not need to run the offline command again after initially running it."]}),"\n",(0,r.jsxs)(n.p,{children:["For minimal downtime, we recommend running the offline command before restarting Besu with ",(0,r.jsx)(n.code,{children:"--bonsai-limit-trie-logs-enabled"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["If you are following the guides by ",(0,r.jsx)(n.a,{href:"https://someresat.medium.com/guide-to-staking-on-ethereum-ubuntu-teku-f09ecd9ef2ee",children:"Somer Esat"})," or ",(0,r.jsx)(n.a,{href:"https://www.coincashew.com/coins/overview-eth/guide-or-how-to-setup-a-validator-on-eth2-mainnet/part-i-installation/step-3-installing-execution-client/besu",children:"CoinCashew"}),", you have set the following options in your ",(0,r.jsx)(n.code,{children:"besu.service"})," or ",(0,r.jsx)(n.code,{children:"execution.service"})," systemd file:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'...\nExecStart=/usr/local/bin/besu/bin/besu \\\n...\n --sync-mode=SNAP \\\n --data-path="/var/lib/besu" \\\n --data-storage-format=BONSAI \\\n...\n'})}),"\n",(0,r.jsx)(n.p,{children:"To prune trie logs, the command should look similar to the following:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo /usr/local/bin/besu/bin/besu --data-storage-format=BONSAI --data-path=/var/lib/besu --sync-mode=SNAP storage trie-log prune\n"})}),"\n",(0,r.jsx)(n.p,{children:"The logs should look similar to the following:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"2024-02-02 05:45:41.162+00:00 | main | INFO | KeyPairUtil | Attempting to load public key from /data/besu/key\n ...\n2024-02-02 05:45:43.433+00:00 | main | INFO | TrieLogSubCommand | Estimating trie logs size before pruning...\n2024-02-02 05:45:43.837+00:00 | main | INFO | TrieLogSubCommand | Estimated trie logs size before pruning: 9 GiB\n2024-02-02 05:46:09.863+00:00 | main | INFO | TrieLogHelper | Starting pruning: retain 512 trie logs, processing in 1 batches...\n2024-02-02 05:46:09.918+00:00 | main | INFO | TrieLogHelper | Saving trie logs to retain in file /data/besu/database/trieLogsToRetain-1 (batch 1)...\n2024-02-02 05:46:09.926+00:00 | main | INFO | TrieLogHelper | Obtaining trielogs from db, this may take a few minutes...\n2024-02-02 05:46:10.100+00:00 | main | INFO | TrieLogHelper | Clear trie logs...\n2024-02-02 05:46:10.155+00:00 | main | INFO | TrieLogHelper | Restoring trie logs retained from batch 1...\n2024-02-02 05:46:10.222+00:00 | main | INFO | TrieLogHelper | Key(0): 0xcd50706da7f6f2db7f9d54f3589122760900d9ab2508c20a4ca40b496d930368\n... \n2024-02-02 05:46:10.336+00:00 | main | INFO | TrieLogHelper | Key(511): 0x238f9649b59616430ad7e43b8f3cf65bc97cac4aa54a3eddf3ad6ee666ce733e\n2024-02-02 05:46:10.441+00:00 | main | INFO | TrieLogHelper | Deleting files...\n2024-02-02 05:46:10.446+00:00 | main | INFO | TrieLogSubCommand | Finished pruning. Re-estimating trie logs size...\n2024-02-02 05:46:11.023+00:00 | main | INFO | TrieLogSubCommand | Estimated trie logs size after pruning: 0 B (0 B estimate is normal when using default settings)\n2024-02-02 05:46:11.023+00:00 | main | INFO | TrieLogSubCommand | Prune ran successfully. We estimate you freed up 9 GiB!\nPrune ran successfully. We estimate you freed up 9 GiB!\n"})}),"\n",(0,r.jsx)(n.p,{children:"If you are using a TOML configuration file, you can run a command similar to the following:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo /usr/local/bin/besu/bin/besu --config-file=besu-config.toml storage trie-log prune\n"})}),"\n",(0,r.jsx)(n.h2,{id:"troubleshoot",children:"Troubleshoot"}),"\n",(0,r.jsx)(n.p,{children:"Troubleshoot common errors that can occur when using the trie log prune command to reduce your database size for Bonsai Tries.\nTo minimize errors, ensure your command specifies the following:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-storage-format",children:(0,r.jsx)(n.code,{children:"--data-storage-format"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:(0,r.jsx)(n.code,{children:"--data-path"})})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/public-networks/reference/cli/options#sync-mode",children:(0,r.jsx)(n.code,{children:"--sync-mode"})})}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"prune-command-for-mainnet",children:"Prune command for Mainnet"}),"\n",(0,r.jsx)(n.p,{children:"The prune command should look similar to the following:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo /usr/local/bin/besu/bin/besu --data-path=/var/lib/besu --data-storage-format=BONSAI --sync-mode=SNAP storage trie-log prune\n"})}),"\n",(0,r.jsx)(n.p,{children:"Ensure you stop Besu before running the command."}),"\n",(0,r.jsx)(n.h3,{id:"subcommand-not-working",children:"Subcommand not working"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"java.lang.IllegalArgumentException: Subcommand only works with data-storage-format=BONSAI"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.code,{children:"--data-storage-format=BONSAI"})," might be missing.\nTo resolve, add the storage format.\nThe command should look similar to the following:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo /usr/local/bin/besu/bin/besu --data-storage-format=BONSAI --data-path=/var/lib/besu --sync-mode=SNAP storage trie-log prune\n"})}),"\n",(0,r.jsxs)(n.h3,{id:"column-handle-not-found-for-segment-trie_branch_storage",children:["Column handle not found for segment ",(0,r.jsx)(n.code,{children:"TRIE_BRANCH_STORAGE"})]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"java.lang.RuntimeException: Column handle not found for segment TRIE_BRANCH_STORAGE"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Ensure you specify ",(0,r.jsx)(n.code,{children:"--data-path"}),".\nYour command should look similar to the following:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo /usr/local/bin/besu/bin/besu --data-path=/var/lib/besu --data-storage-format=BONSAI --sync-mode=SNAP storage trie-log prune\n"})}),"\n",(0,r.jsx)(n.h3,{id:"database-not-detected",children:"Database not detected"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"java.lang.IllegalArgumentException: Trying to retain more trie logs than chain length (0), skipping pruning"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Ensure you specify the correct ",(0,r.jsx)(n.code,{children:"--data-path"})," for your node.\nYour command should look similar to the following:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo /usr/local/bin/besu/bin/besu --data-path=/var/lib/besu --data-storage-format=BONSAI --sync-mode=SNAP storage trie-log prune\n"})}),"\n",(0,r.jsx)(n.h3,{id:"cannot-store-generated-private-key",children:"Cannot store generated private key"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"java.lang.IllegalArgumentException: Cannot store generated private key"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Ensure you specify the correct ",(0,r.jsx)(n.code,{children:"--data-path"})," for your node.\nYour command should look similar to the following:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo /usr/local/bin/besu/bin/besu --data-path=/var/lib/besu --data-storage-format=BONSAI --sync-mode=SNAP storage trie-log prune\n"})}),"\n",(0,r.jsx)(n.h3,{id:"valid-keypair-not-provided",children:"Valid keypair not provided"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"java.lang.IllegalArgumentException: Supplied file does not contain valid keyPair pair."})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Check your file permissions and try running a ",(0,r.jsx)(n.code,{children:"sudo"})," command to resolve the issue:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo /usr/local/bin/besu/bin/besu --data-storage-format=BONSAI --data-path=/var/lib/besu storage --sync-mode=SNAP trie-log prune\n"})}),"\n",(0,r.jsxs)(n.h3,{id:"column-handle-not-found-for-segment-world_state",children:["Column handle not found for segment ",(0,r.jsx)(n.code,{children:"WORLD_STATE"})]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"java.lang.RuntimeException: Column handle not found for segment WORLD_STATE"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Ensure you are using ",(0,r.jsx)(n.code,{children:"--data-storage-format=BONSAI"})," instead of ",(0,r.jsx)(n.code,{children:"--data-storage-format=FOREST"})," on an existing Bonsai database."]}),"\n",(0,r.jsx)(n.h3,{id:"resource-temporarily-unavailable",children:"Resource temporarily unavailable"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"org.hyperledger.besu.plugin.services.exception.StorageException: org.rocksdb.RocksDBException: While lock file: /data/besu/database/LOCK: Resource temporarily unavailable"})}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Check if Besu is already running.\nYou must shut down the Besu client before running the subcommand."}),"\n",(0,r.jsx)(n.h3,{id:"unable-to-change-the-sync-mode",children:"Unable to change the sync mode"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"java.lang.IllegalStateException: Unable to change the sync mode when snap sync is incomplete, please restart with snap sync mode"})}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Check that you have specified ",(0,r.jsx)(n.code,{children:"--sync-mode"}),".\nThe default is ",(0,r.jsx)(n.code,{children:"--sync-mode=SNAP"}),".\nMost Mainnet users use ",(0,r.jsx)(n.code,{children:"SNAP"})," or ",(0,r.jsx)(n.code,{children:"CHECKPOINT"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"cannot-run-trie-log-prune",children:"Cannot run trie log prune"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"java.lang.RuntimeException: No finalized block present, can't safely run trie log prune"})}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"This message might appear if your node is relatively new or recently resynced.\nTo resolve this error, ensure that your node is fully synced and correctly configured to recognize finalized blocks."}),"\n",(0,r.jsx)(n.h3,{id:"block-does-not-match-stored-chain-data",children:"Block does not match stored chain data"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:"org.hyperledger.besu.util.InvalidConfigurationException: Supplied genesis block does not match chain data stored in /data/besu."})}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Check if you are running the command for a network other than Mainnet.\nTo specify a network, run a command that looks similar to the following:"}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"sudo /usr/local/bin/besu/bin/besu --network=holesky --sync-mode=SNAP --data-storage-format=BONSAI --data-path=/var/lib/besu storage trie-log prune\n"})})]})}function u(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},19365:(e,n,o)=>{o.d(n,{A:()=>i});o(96540);var r=o(18215);const a={tabItem:"tabItem_Ymn6"};var t=o(74848);function i(e){let{children:n,hidden:o,className:i}=e;return(0,t.jsx)("div",{role:"tabpanel",className:(0,r.A)(a.tabItem,i),hidden:o,children:n})}},11470:(e,n,o)=>{o.d(n,{A:()=>w});var r=o(96540),a=o(18215),t=o(23104),i=o(56347),s=o(205),l=o(57485),d=o(31682),c=o(70679);function u(e){return r.Children.toArray(e).filter((e=>"\n"!==e)).map((e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)}))?.filter(Boolean)??[]}function h(e){const{values:n,children:o}=e;return(0,r.useMemo)((()=>{const e=n??function(e){return u(e).map((e=>{let{props:{value:n,label:o,attributes:r,default:a}}=e;return{value:n,label:o,attributes:r,default:a}}))}(o);return function(e){const n=(0,d.XI)(e,((e,n)=>e.value===n.value));if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map((e=>e.value)).join(", ")}" found in . Every value needs to be unique.`)}(e),e}),[n,o])}function m(e){let{value:n,tabValues:o}=e;return o.some((e=>e.value===n))}function g(e){let{queryString:n=!1,groupId:o}=e;const a=(0,i.W6)(),t=function(e){let{queryString:n=!1,groupId:o}=e;if("string"==typeof n)return n;if(!1===n)return null;if(!0===n&&!o)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return o??null}({queryString:n,groupId:o});return[(0,l.aZ)(t),(0,r.useCallback)((e=>{if(!t)return;const n=new URLSearchParams(a.location.search);n.set(t,e),a.replace({...a.location,search:n.toString()})}),[t,a])]}function p(e){const{defaultValue:n,queryString:o=!1,groupId:a}=e,t=h(e),[i,l]=(0,r.useState)((()=>function(e){let{defaultValue:n,tabValues:o}=e;if(0===o.length)throw new Error("Docusaurus error: the component requires at least one children component");if(n){if(!m({value:n,tabValues:o}))throw new Error(`Docusaurus error: The has a defaultValue "${n}" but none of its children has the corresponding value. Available values are: ${o.map((e=>e.value)).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return n}const r=o.find((e=>e.default))??o[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:t}))),[d,u]=g({queryString:o,groupId:a}),[p,b]=function(e){let{groupId:n}=e;const o=function(e){return e?`docusaurus.tab.${e}`:null}(n),[a,t]=(0,c.Dv)(o);return[a,(0,r.useCallback)((e=>{o&&t.set(e)}),[o,t])]}({groupId:a}),f=(()=>{const e=d??p;return m({value:e,tabValues:t})?e:null})();(0,s.A)((()=>{f&&l(f)}),[f]);return{selectedValue:i,selectValue:(0,r.useCallback)((e=>{if(!m({value:e,tabValues:t}))throw new Error(`Can't select invalid tab value=${e}`);l(e),u(e),b(e)}),[u,b,t]),tabValues:t}}var b=o(92303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=o(74848);function j(e){let{className:n,block:o,selectedValue:r,selectValue:i,tabValues:s}=e;const l=[],{blockElementScrollPositionUntilNextRender:d}=(0,t.a_)(),c=e=>{const n=e.currentTarget,o=l.indexOf(n),a=s[o].value;a!==r&&(d(n),i(a))},u=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const o=l.indexOf(e.currentTarget)+1;n=l[o]??l[0];break}case"ArrowLeft":{const o=l.indexOf(e.currentTarget)-1;n=l[o]??l[l.length-1];break}}n?.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,a.A)("tabs",{"tabs--block":o},n),children:s.map((e=>{let{value:n,label:o,attributes:t}=e;return(0,x.jsx)("li",{role:"tab",tabIndex:r===n?0:-1,"aria-selected":r===n,ref:e=>l.push(e),onKeyDown:u,onClick:c,...t,className:(0,a.A)("tabs__item",f.tabItem,t?.className,{"tabs__item--active":r===n}),children:o??n},n)}))})}function y(e){let{lazy:n,children:o,selectedValue:t}=e;const i=(Array.isArray(o)?o:[o]).filter(Boolean);if(n){const e=i.find((e=>e.props.value===t));return e?(0,r.cloneElement)(e,{className:(0,a.A)("margin-top--md",e.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:i.map(((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==t})))})}function v(e){const n=p(e);return(0,x.jsxs)("div",{className:(0,a.A)("tabs-container",f.tabList),children:[(0,x.jsx)(j,{...n,...e}),(0,x.jsx)(y,{...n,...e})]})}function w(e){const n=(0,b.A)();return(0,x.jsx)(v,{...e,children:u(e.children)},String(n))}},28453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>s});var r=o(96540);const a={},t=r.createContext(a);function i(e){const n=r.useContext(t);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:i(e.components),r.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f0bf0af8.7a068dd8.js b/assets/js/f0bf0af8.7a068dd8.js new file mode 100644 index 00000000000..ec71a257394 --- /dev/null +++ b/assets/js/f0bf0af8.7a068dd8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[1942],{77292:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>d,contentTitle:()=>a,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>l});var r=n(74848),t=n(28453);const i={title:"Validators",description:"Configuring validators in production networks",sidebar_position:4,tags:["private networks"]},a="Configure validators in a production network",s={id:"private-networks/how-to/configure/validators",title:"Validators",description:"Configuring validators in production networks",source:"@site/docs/private-networks/how-to/configure/validators.md",sourceDirName:"private-networks/how-to/configure",slug:"/private-networks/how-to/configure/validators",permalink:"/private-networks/how-to/configure/validators",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/configure/validators.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:4,frontMatter:{title:"Validators",description:"Configuring validators in production networks",sidebar_position:4,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Bootnodes",permalink:"/private-networks/how-to/configure/bootnodes"},next:{title:"Pre-deploy a contract",permalink:"/private-networks/how-to/configure/contracts"}},d={},l=[{value:"Number of validators required",id:"number-of-validators-required",level:2},{value:"Adding and removing validators",id:"adding-and-removing-validators",level:2},{value:"Validators as bootnodes",id:"validators-as-bootnodes",level:2}];function c(e){const o={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",ol:"ol",p:"p",ul:"ul",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(o.header,{children:(0,r.jsx)(o.h1,{id:"configure-validators-in-a-production-network",children:"Configure validators in a production network"})}),"\n",(0,r.jsxs)(o.p,{children:["As when ",(0,r.jsx)(o.a,{href:"/private-networks/how-to/configure/bootnodes",children:"configuring bootnodes"}),":"]}),"\n",(0,r.jsxs)(o.ol,{children:["\n",(0,r.jsxs)(o.li,{children:["\n",(0,r.jsxs)(o.p,{children:["Create the ",(0,r.jsx)(o.a,{href:"/public-networks/concepts/node-keys",children:"node key pair"})," (that is, the private and public key) before starting the validator."]}),"\n"]}),"\n",(0,r.jsxs)(o.li,{children:["\n",(0,r.jsx)(o.p,{children:"When creating validators in the cloud (for example, AWS or Azure), attempt to assign static IP addresses to them. If your network is:"}),"\n",(0,r.jsxs)(o.ul,{children:["\n",(0,r.jsx)(o.li,{children:"Publicly accessible, assign an elastic IP address."}),"\n",(0,r.jsx)(o.li,{children:"Internal only, specify a private IP address when you create the instance and record this IP address."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(o.p,{children:"We recommend storing validator configuration under source control."}),"\n",(0,r.jsx)(o.h2,{id:"number-of-validators-required",children:"Number of validators required"}),"\n",(0,r.jsxs)(o.p,{children:["Ensure you configure enough validators to allow for redundancy. IBFT 2.0 tolerates ",(0,r.jsx)(o.code,{children:"f = (n-1)/3"})," faulty validators, where:"]}),"\n",(0,r.jsxs)(o.ul,{children:["\n",(0,r.jsxs)(o.li,{children:[(0,r.jsx)(o.code,{children:"f"})," is the number of faulty validators"]}),"\n",(0,r.jsxs)(o.li,{children:[(0,r.jsx)(o.code,{children:"n"})," is the number of validators."]}),"\n"]}),"\n",(0,r.jsx)(o.h2,{id:"adding-and-removing-validators",children:"Adding and removing validators"}),"\n",(0,r.jsxs)(o.p,{children:["You can ",(0,r.jsx)(o.a,{href:"/private-networks/how-to/configure/consensus/ibft#add-and-remove-validators",children:"vote validators in or out of the validator pool"}),"."]}),"\n",(0,r.jsx)(o.h2,{id:"validators-as-bootnodes",children:"Validators as bootnodes"}),"\n",(0,r.jsxs)(o.p,{children:["Validators can also be bootnodes. Other than the ",(0,r.jsx)(o.a,{href:"/private-networks/how-to/configure/bootnodes",children:"usual configuration for bootnodes"}),", you do not need to specify any extra configuration when a validator is also a bootnode."]}),"\n",(0,r.jsx)(o.p,{children:"If you remove a validator that is also a bootnode, ensure there are enough remaining bootnodes on the network."})]})}function u(e={}){const{wrapper:o}={...(0,t.R)(),...e.components};return o?(0,r.jsx)(o,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},28453:(e,o,n)=>{n.d(o,{R:()=>a,x:()=>s});var r=n(96540);const t={},i=r.createContext(t);function a(e){const o=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(o):{...o,...e}}),[o,e])}function s(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),r.createElement(i.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f2142509.e4fbfb94.js b/assets/js/f2142509.e4fbfb94.js new file mode 100644 index 00000000000..a8961f0d049 --- /dev/null +++ b/assets/js/f2142509.e4fbfb94.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8862],{30401:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>u,frontMatter:()=>t,metadata:()=>i,toc:()=>d});var s=r(74848),o=r(28453);const t={title:"Configure Kubernetes mode in NAT manager",sidebar_position:9,description:"Tutorial to configure Kubernetes mode for Besu Nat Manager",tags:["private networks"]},a="Configure Kubernetes mode in NAT Manager",i={id:"private-networks/tutorials/kubernetes/nat-manager",title:"Configure Kubernetes mode in NAT manager",description:"Tutorial to configure Kubernetes mode for Besu Nat Manager",source:"@site/docs/private-networks/tutorials/kubernetes/nat-manager.md",sourceDirName:"private-networks/tutorials/kubernetes",slug:"/private-networks/tutorials/kubernetes/nat-manager",permalink:"/private-networks/tutorials/kubernetes/nat-manager",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/tutorials/kubernetes/nat-manager.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:9,frontMatter:{title:"Configure Kubernetes mode in NAT manager",sidebar_position:9,description:"Tutorial to configure Kubernetes mode for Besu Nat Manager",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Production",permalink:"/private-networks/tutorials/kubernetes/production"},next:{title:"Deploy using Microsoft Azure",permalink:"/private-networks/tutorials/azure"}},l={},d=[{value:"Automatic configuration",id:"automatic-configuration",level:2},{value:"1. Create a load balancer",id:"1-create-a-load-balancer",level:3},{value:"2. Check if the load balancer is properly deployed",id:"2-check-if-the-load-balancer-is-properly-deployed",level:3},{value:"3. Deploy Besu",id:"3-deploy-besu",level:3},{value:"Automatic detection errors",id:"automatic-detection-errors",level:2},{value:"Service not found error message",id:"service-not-found-error-message",level:3},{value:"Forbidden error message",id:"forbidden-error-message",level:3},{value:"Ingress not found error message",id:"ingress-not-found-error-message",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"configure-kubernetes-mode-in-nat-manager",children:"Configure Kubernetes mode in NAT Manager"})}),"\n",(0,s.jsxs)(n.p,{children:["Use ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat#auto",children:(0,s.jsx)(n.code,{children:"--nat-method=AUTO"})})," or ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat#kubernetes",children:(0,s.jsx)(n.code,{children:"--nat-method=KUBERNETES"})})," CLI options to let the Besu node automatically configure its IP address and ports."]}),"\n",(0,s.jsxs)(n.p,{children:["Use mode ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat#none",children:(0,s.jsx)(n.code,{children:"--nat-method=NONE"})})," to be able to set your Besu ports and IP address manually."]}),"\n",(0,s.jsxs)(n.p,{children:["Default mode is ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat#auto",children:(0,s.jsx)(n.code,{children:"AUTO"})})," but Besu will fallback to ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat#none",children:(0,s.jsx)(n.code,{children:"NONE"})})," mode if automatic configuration fails."]}),"\n",(0,s.jsxs)(n.admonition,{type:"info",children:[(0,s.jsxs)(n.p,{children:["The following log shows fallback to ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat#none",children:(0,s.jsx)(n.code,{children:"NONE"})})," mode after an automatic detection failure."]}),(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"INFO | KubernetesNatManager | Starting kubernetes NAT manager.\nDEBUG | KubernetesNatManager | Trying to update information using Kubernetes client SDK.\nDEBUG | NatService | Nat manager failed to configure itself automatically due to the following reason Service not found. NONE mode will be used\nINFO | NetworkRunner | Starting Network.\n"})})]}),"\n",(0,s.jsx)(n.h2,{id:"automatic-configuration",children:"Automatic configuration"}),"\n",(0,s.jsx)(n.p,{children:"Follow 3 steps to configure Besu for automatic IP address and ports detection on Kubernetes:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"#1-create-a-load-balancer",children:"Create a load balancer"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"#2-check-if-the-load-balancer-is-properly-deployed",children:"Check if the load balancer is properly deployed"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"#3-deploy-besu",children:"Deploy Besu"})}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"1-create-a-load-balancer",children:"1. Create a load balancer"}),"\n",(0,s.jsxs)(n.p,{children:["Deploy a ",(0,s.jsx)(n.code,{children:"LoadBalancer"})," service for Besu to recover IP address and ports."]}),"\n",(0,s.jsx)(n.p,{children:"Here is an example that you can customize with your own ports and routing rules."}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'---\napiVersion: v1\nkind: Service\nmetadata:\n labels:\n app.kubernetes.io/name: besu\n app.kubernetes.io/release: "1.0.0"\n name: besu\nspec:\n ports:\n - name: "json-rpc"\n port: 8545\n targetPort: 8545\n - name: "rlpx"\n port: 30303\n targetPort: 30303\n selector:\n app.kubernetes.io/name: besu\n app.kubernetes.io/release: "1.0.0"\n type: LoadBalancer\n'})}),"\n",(0,s.jsxs)(n.p,{children:["This service example lists the rules for the different ports used by Besu (",(0,s.jsx)(n.code,{children:"json-rpc"})," and",(0,s.jsx)(n.code,{children:" rlpx"}),"). The default value is used for ",(0,s.jsx)(n.code,{children:"discovery"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"2-check-if-the-load-balancer-is-properly-deployed",children:"2. Check if the load balancer is properly deployed"}),"\n",(0,s.jsx)(n.p,{children:"Verify the load balancer readiness before launching Besu."}),"\n",(0,s.jsxs)(n.p,{children:["Run ",(0,s.jsx)(n.code,{children:"kubectl describe services besu"})," to check the service status."]}),"\n",(0,s.jsx)(n.p,{children:"The command should display the following information:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'Name: besu\nNamespace: default\nLabels: app.kubernetes.io/name=besu\n app.kubernetes.io/release=1.0.0\nAnnotations: kubectl.kubernetes.io/last-applied-configuration:\n {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"app.kubernetes.io/name":"besu","app.kubernetes.io/release":"1....\nSelector: app.kubernetes.io/name=besu,app.kubernetes.io/release=1.0.0\nType: LoadBalancer\nIP: --------\nLoadBalancer Ingress: ******\n'})}),"\n",(0,s.jsxs)(n.p,{children:["The load balancer must have an IP address displayed in place of ",(0,s.jsx)(n.code,{children:"******"})," on the ",(0,s.jsx)(n.code,{children:"LoadBalancer Ingress"})," line to be ready."]}),"\n",(0,s.jsxs)(n.p,{children:["Run the ",(0,s.jsx)(n.code,{children:"kubectl describe services besu"})," command again until the load balancer IP address appears in the output."]}),"\n",(0,s.jsx)(n.h3,{id:"3-deploy-besu",children:"3. Deploy Besu"}),"\n",(0,s.jsx)(n.p,{children:"When steps 1 and 2 are completed, deploy Besu using the following YAML example:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'---\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: besu-config\n labels:\n app.kubernetes.io/name: besu\n app.kubernetes.io/release: 1.0.0\ndata:\n BESU_LOGGING: "INFO"\n BESU_NETWORK: "dev"\n BESU_P2P_ENABLED: "true"\n BESU_RPC_HTTP_ENABLED: "true"\n BESU_RPC_HTTP_APIS: "eth,net,web3,debug,admin"\n KUBE_CONFIG_PATH: "/opt/besu/shared/kube-config"\n---\napiVersion: extensions/v1beta1\nkind: Deployment\nmetadata:\n name: besu\n labels:\n app.kubernetes.io/name: besu\n app.kubernetes.io/release: "1.0.0"\nspec:\n replicas: 1\n strategy: {}\n template:\n metadata:\n creationTimestamp: null\n labels:\n app.kubernetes.io/name: besu\n app.kubernetes.io/release: "1.0.0"\n spec:\n containers:\n - name: besu\n image: "hyperledger/besu:latest"\n imagePullPolicy: Always\n ports:\n - containerPort: 8545\n - containerPort: 30303\n envFrom:\n - configMapRef:\n name: besu-config\n restartPolicy: Always\nstatus: {}\n'})}),"\n",(0,s.jsx)(n.h2,{id:"automatic-detection-errors",children:"Automatic detection errors"}),"\n",(0,s.jsxs)(n.admonition,{type:"danger",children:[(0,s.jsx)(n.p,{children:"Automatic detection error messages do not prevent you to use Besu."}),(0,s.jsxs)(n.p,{children:["Try the fix indicated for each error or use ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat#kubernetes",children:(0,s.jsx)(n.code,{children:"--nat-method=KUBERNETES"})})," CLI option and ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/configure-ports",children:"set IP address and port manually"}),"."]})]}),"\n",(0,s.jsx)(n.p,{children:"Possible errors messages for Kubernetes automatic detection failure:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"#service-not-found-error-message",children:(0,s.jsx)(n.code,{children:"Service not found"})})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"#forbidden-error-message",children:(0,s.jsx)(n.code,{children:"Forbidden"})})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"#ingress-not-found-error-message",children:(0,s.jsx)(n.code,{children:"Ingress not found"})})}),"\n"]}),"\n",(0,s.jsxs)(n.h3,{id:"service-not-found-error-message",children:[(0,s.jsx)(n.code,{children:"Service not found"})," error message"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Error message:"})," ",(0,s.jsx)(n.code,{children:"Nat manager failed to configure itself automatically due to the following reason Service not found. NONE mode will be used"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Cause:"})," load balancer did start correctly or has the incorrect name."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Fix:"})," check and modify load balancer YAML configuration and restart service."]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{title:"Example error log",type:"info",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"INFO | KubernetesNatManager | Starting kubernetes NAT manager.\nDEBUG | KubernetesNatManager | Trying to update information using Kubernetes client SDK.\nDEBUG | NatService | Nat manager failed to configure itself automatically due to the following reason Service not found. NONE mode will be used\nINFO | NetworkRunner | Starting Network.\n"})})}),"\n",(0,s.jsxs)(n.h3,{id:"forbidden-error-message",children:[(0,s.jsx)(n.code,{children:"Forbidden"})," error message"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Error message:"})," ",(0,s.jsx)(n.code,{children:"Nat manager failed to configure itself automatically due to the following reason Forbidden. NONE mode will be used"})]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Cause:"})," Besu don't have permission to list the services via the Kubernetes API to retrieve IP address and ports from the load balancer."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Fix:"})," Give it the required permissions using ",(0,s.jsx)(n.a,{href:"https://kubernetes.io/docs/reference/access-authn-authz/rbac/",children:"Role-based access control"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If you can't manage permissions, define the IP address and ports manually with ",(0,s.jsx)(n.a,{href:"/public-networks/how-to/connect/specify-nat#none",children:(0,s.jsx)(n.code,{children:"NONE"})})," mode"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{title:"Example error log",type:"info",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"INFO | KubernetesNatManager | Starting kubernetes NAT manager.\nDEBUG | KubernetesNatManager | Trying to update information using Kubernetes client SDK.\nDEBUG | NatService | Nat manager failed to configure itself automatically due to the following reason Forbidden. NONE mode will be used\nINFO | NetworkRunner | Starting Network.\n"})})}),"\n",(0,s.jsxs)(n.admonition,{type:"tip",children:[(0,s.jsxs)(n.p,{children:["For development environment, the permission issue can be fixed by running ",(0,s.jsx)(n.code,{children:"kubectl create clusterrolebinding myapp-view-binding --clusterrole=admin --serviceaccount=default:default"})]}),(0,s.jsx)(n.p,{children:"This command should only be used on development environment and not in production environment."}),(0,s.jsxs)(n.p,{children:["In production environment, require a finer management of permissions using Kubernetes ",(0,s.jsx)(n.a,{href:"https://kubernetes.io/docs/reference/access-authn-authz/rbac/",children:"Role-based access control"}),"."]})]}),"\n",(0,s.jsxs)(n.h3,{id:"ingress-not-found-error-message",children:[(0,s.jsx)(n.code,{children:"Ingress not found"})," error message"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Error message:"})," ",(0,s.jsx)(n.code,{children:"Nat manager failed to configure itself automatically due to the following reason Ingress not found. NONE mode will be used"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Cause:"})," Load balancer did not finish to recover an IP address."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Fix:"})," ",(0,s.jsx)(n.a,{href:"#2-check-if-the-load-balancer-is-properly-deployed",children:"Check that the load balancer is properly deployed"})," before launching Besu."]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{title:"Example error log",type:"info",children:(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{children:"INFO | KubernetesNatManager | Starting kubernetes NAT manager.\nDEBUG | KubernetesNatManager | Trying to update information using Kubernetes client SDK.\nDEBUG | NatService | Nat manager failed to configure itself automatically due to the following reason Ingress not found. NONE mode will be used\nINFO | NetworkRunner | Starting Network.\n"})})})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},28453:(e,n,r)=>{r.d(n,{R:()=>a,x:()=>i});var s=r(96540);const o={},t=s.createContext(o);function a(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f3adc880.ba567182.js b/assets/js/f3adc880.ba567182.js new file mode 100644 index 00000000000..30c549d226a --- /dev/null +++ b/assets/js/f3adc880.ba567182.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[7448],{87891:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>t,metadata:()=>l,toc:()=>r});var s=i(74848),o=i(28453);const t={title:"Use local permissioning",sidebar_position:1,description:"Besu local permissioning",tags:["private networks"]},a="Use local permissioning",l={id:"private-networks/how-to/use-permissioning/local",title:"Use local permissioning",description:"Besu local permissioning",source:"@site/docs/private-networks/how-to/use-permissioning/local.md",sourceDirName:"private-networks/how-to/use-permissioning",slug:"/private-networks/how-to/use-permissioning/local",permalink:"/private-networks/how-to/use-permissioning/local",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/use-permissioning/local.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Use local permissioning",sidebar_position:1,description:"Besu local permissioning",tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Privacy best practices",permalink:"/private-networks/how-to/use-privacy/performance-best-practices"},next:{title:"Use onchain permissioning",permalink:"/private-networks/how-to/use-permissioning/onchain"}},c={},r=[{value:"Node allowlisting",id:"node-allowlisting",level:2},{value:"Specify bootnodes in the allowlist",id:"specify-bootnodes-in-the-allowlist",level:3},{value:"Enable node allowlisting",id:"enable-node-allowlisting",level:3},{value:"Update the node allowlist",id:"update-the-node-allowlist",level:3},{value:"View the node allowlist",id:"view-the-node-allowlist",level:3},{value:"Account allowlisting",id:"account-allowlisting",level:2},{value:"Enable account allowlisting",id:"enable-account-allowlisting",level:3},{value:"Update the account allowlist",id:"update-the-account-allowlist",level:3},{value:"View the account allowlist",id:"view-the-account-allowlist",level:3},{value:"Permissions configuration file",id:"permissions-configuration-file",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"use-local-permissioning",children:"Use local permissioning"})}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/private-networks/concepts/permissioning/#local",children:"Local permissioning"})," supports node and account allowlisting."]}),"\n",(0,s.jsx)(n.h2,{id:"node-allowlisting",children:"Node allowlisting"}),"\n",(0,s.jsxs)(n.p,{children:["You can allow access to specified nodes in the ",(0,s.jsx)(n.a,{href:"#permissions-configuration-file",children:"permissions configuration file"}),". With node allowlisting enabled, communication is only between nodes in the allowlist."]}),"\n",(0,s.jsxs)(n.admonition,{type:"info",children:[(0,s.jsxs)(n.p,{children:["Node allowlists ",(0,s.jsx)(n.a,{href:"/public-networks/concepts/node-keys#domain-name-support",children:"support domain names"})," in enode URLs as an early access feature. Use the ",(0,s.jsx)(n.code,{children:"--Xdns-enabled"})," option to enable domain name support."]}),(0,s.jsxs)(n.p,{children:["If using Kubernetes, enable domain name support and use the ",(0,s.jsx)(n.code,{children:"--Xdns-update-enabled"})," option to ensure that Besu can connect to a container after being restarted, even if the IP address of the container changes."]})]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",metastring:'title="Nodes allowlist in the permissions configuration file"',children:'nodes-allowlist=["enode://6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0@192.168.0.9:4567","enode://6f8a80d14311c39f35f516fa664deaaaa13e85b2f7493f37f6144d86991ec012937307647bd3b9a82abe2974e1407241d54947bbb39763a4cac9f77166ad92a0@192.169.0.9:4568"]\n'})}),"\n",(0,s.jsxs)(n.p,{children:["Node allowlisting is at the node level. That is, each node in the network has a ",(0,s.jsx)(n.a,{href:"#permissions-configuration-file",children:"permissions configuration file"})," file in the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:"data directory"})," for the node."]}),"\n",(0,s.jsxs)(n.p,{children:["Local permissioning doesn't check that the node using the permissions configuration file is listed in the allowlist, it only checks that the remote end of the connection is in the allowlist. Use ",(0,s.jsx)(n.a,{href:"/private-networks/concepts/permissioning/onchain",children:"onchain permissioning"})," if you need to check both ends of the connection."]}),"\n",(0,s.jsx)(n.h3,{id:"specify-bootnodes-in-the-allowlist",children:"Specify bootnodes in the allowlist"}),"\n",(0,s.jsxs)(n.p,{children:["The nodes permissions list must include the ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/configure/bootnodes",children:"bootnodes"})," or Besu doesn't start with node permissions enabled."]}),"\n",(0,s.jsx)(n.p,{children:"If you start Besu with specified bootnodes and have node permissioning enabled:"}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:'--bootnodes="enode://7e4ef30e9ec683f26ad76ffca5b5148fa7a6575f4cfad4eb0f52f9c3d8335f4a9b6f9e66fcc73ef95ed7a2a52784d4f372e7750ac8ae0b544309a5b391a23dd7@127.0.0.1:30303","enode://2feb33b3c6c4a8f77d84a5ce44954e83e5f163e7a65f7f7a7fec499ceb0ddd76a46ef635408c513d64c076470eac86b7f2c8ae4fcd112cb28ce82c0d64ec2c94@127.0.0.1:30304","enode://7b61d5ee4b44335873e6912cb5dd3e3877c860ba21417c9b9ef1f7e500a82213737d4b269046d0669fb2299a234ca03443f25fe5f706b693b3669e5c92478ade@127.0.0.1:30305"\n'})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"nodes-allowlist"})," in the ",(0,s.jsx)(n.a,{href:"#permissions-configuration-file",children:"permissions configuration file"})," must contain the specified bootnodes."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(n.p,{children:"If your node has two different IP addresses for ingress and egress (for example, if you use Kubernetes implementing a load balancer for ingress and a NAT gateway IP address for egress), add both addresses to the allowlist, using the same public key for each IP address. This will allow the node to connect."})}),"\n",(0,s.jsx)(n.h3,{id:"enable-node-allowlisting",children:"Enable node allowlisting"}),"\n",(0,s.jsxs)(n.p,{children:["To enable node allowlisting, specify the ",(0,s.jsx)(n.a,{href:"/private-networks/reference/cli/options#permissions-nodes-config-file-enabled",children:(0,s.jsx)(n.code,{children:"--permissions-nodes-config-file-enabled"})})," option when starting Besu."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"PERM"})," API methods are not enabled by default. To enable the ",(0,s.jsx)(n.code,{children:"PERM"})," API methods, use the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,s.jsx)(n.code,{children:"--rpc-http-api"})})," or ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,s.jsx)(n.code,{children:"--rpc-ws-api"})})," options."]}),"\n",(0,s.jsx)(n.h3,{id:"update-the-node-allowlist",children:"Update the node allowlist"}),"\n",(0,s.jsx)(n.p,{children:"To update the nodes allowlist while the node is running, use the following JSON-RPC API methods:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#perm_addnodestoallowlist",children:(0,s.jsx)(n.code,{children:"perm_addNodesToAllowlist"})})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#perm_removenodesfromallowlist",children:(0,s.jsx)(n.code,{children:"perm_removeNodesFromAllowlist"})})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["You can also update the ",(0,s.jsx)(n.a,{href:"#permissions-configuration-file",children:(0,s.jsx)(n.code,{children:"permissions_config.toml"})})," file directly and then update the allowlist using the ",(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#perm_reloadpermissionsfromfile",children:(0,s.jsx)(n.code,{children:"perm_reloadPermissionsFromFile"})})," method."]}),"\n",(0,s.jsx)(n.p,{children:"Updates to the permissions configuration file persist across node restarts."}),"\n",(0,s.jsx)(n.h3,{id:"view-the-node-allowlist",children:"View the node allowlist"}),"\n",(0,s.jsxs)(n.p,{children:["To view the nodes allowlist, use the ",(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#perm_getnodesallowlist",children:(0,s.jsx)(n.code,{children:"perm_getNodesAllowlist"})})," method."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["Each node has a ",(0,s.jsx)(n.a,{href:"#permissions-configuration-file",children:"permissions configuration file"}),", which means nodes can have different nodes allowlists. This means nodes might be participating in the network that are not on the allowlist of other nodes in the network. We recommend each node in the network has the same nodes allowlist."]})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",metastring:'title="Example of different node allowlists"',children:"Node 1 Allowlist = [Node 2, Node 3]\n\nNode 2 Allowlist = [Node 3, Node 5]\n\nNode 5 is participating in the same network as Node 1 even though Node 1 does not have Node 5\non their allowlist.\n"})}),"\n",(0,s.jsx)(n.h2,{id:"account-allowlisting",children:"Account allowlisting"}),"\n",(0,s.jsxs)(n.p,{children:["You can specify accounts in the accounts allowlist in the ",(0,s.jsx)(n.a,{href:"#permissions-configuration-file",children:"permissions configuration file"}),". A node with account permissioning accepts transactions only from accounts in the accounts allowlist."]}),"\n",(0,s.jsx)(n.admonition,{title:"Accounts allowlist in the permissions configuration file",type:"info",children:(0,s.jsx)(n.p,{children:(0,s.jsx)(n.code,{children:'accounts-allowlist=["0x0000000000000000000000000000000000000009"]'})})}),"\n",(0,s.jsxs)(n.p,{children:["Account allowlisting is at the node level. That is, each node in the network has a ",(0,s.jsx)(n.a,{href:"#permissions-configuration-file",children:"permissions configuration file"})," in the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:"data directory"})," for the node."]}),"\n",(0,s.jsxs)(n.admonition,{title:"Using account permissioning and privacy",type:"caution",children:[(0,s.jsxs)(n.p,{children:["Account permissioning is incompatible with ",(0,s.jsx)(n.a,{href:"/private-networks/how-to/use-privacy/sign-pmts",children:"random key signing"})," for ",(0,s.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy marker transactions"}),"."]}),(0,s.jsxs)(n.p,{children:["If using account permissioning and privacy, a signing key must be specified using the ",(0,s.jsx)(n.a,{href:"/private-networks/reference/cli/options#privacy-marker-transaction-signing-key-file-deprecated",children:(0,s.jsx)(n.code,{children:"--privacy-marker-transaction-signing-key-file"})})," command line option and the corresponding public key included in the accounts allowlist."]})]}),"\n",(0,s.jsx)(n.p,{children:"Transaction validation against the accounts allowlist occurs at the following points:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Submitted by JSON-RPC API method ",(0,s.jsx)(n.a,{href:"/public-networks/reference/api/#eth_sendrawtransaction",children:(0,s.jsx)(n.code,{children:"eth_sendRawTransaction"})})]}),"\n",(0,s.jsx)(n.li,{children:"Received via propagation from another node"}),"\n",(0,s.jsx)(n.li,{children:"Added to a block by a mining node"}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"After adding transactions to a block, the transactions are not validated against the allowlist when received by another node. That is, a node can synchronize and add blocks containing transactions from accounts that are not on the accounts allowlist of that node."}),"\n",(0,s.jsxs)(n.p,{children:["The following diagram illustrates applying local and ",(0,s.jsx)(n.a,{href:"/private-networks/concepts/permissioning/onchain",children:"onchain permissioning"})," rules."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Permissioning Flow",src:i(36920).A+"",width:"1656",height:"1134"})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-text",metastring:'title="Example of different account allowlists"',children:"Node 1 Allowlist = [Account A, Account B]\n\nNode 2 Allowlist = [Account B, Account C]\n\nMining Node Allowlist = [Account A, Account B]\n\nAccount A submits a transaction on Node 1. Node 1 validates and propagates the transaction. The\nMining Node receives the transaction, validates it is from an account in the Mining Node\naccounts allowlist, and includes the transaction in the block. Node 2 receives and adds\nthe block created by the Mining Node.\n\nNode 2 now has a transaction in the blockchain from Account A, which is not on the accounts\nallowlist for Node 2.\n"})}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["Each node has a ",(0,s.jsx)(n.a,{href:"#permissions-configuration-file",children:"permissions configuration file"})," which means nodes in the network can have different accounts allowlists. This means a transaction can be successfully submitted by Node A from an account in the Node A allowlist but rejected by Node B to which it's propagated if the account is not in the Node B allowlist. We recommend each node in the network has the same accounts allowlist."]})}),"\n",(0,s.jsx)(n.h3,{id:"enable-account-allowlisting",children:"Enable account allowlisting"}),"\n",(0,s.jsxs)(n.p,{children:["To enable account allowlisting, specify the ",(0,s.jsx)(n.a,{href:"/private-networks/reference/cli/options#permissions-accounts-config-file-enabled",children:(0,s.jsx)(n.code,{children:"--permissions-accounts-config-file-enabled"})})," option when starting Besu."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"PERM"})," API methods are not enabled by default. To enable the ",(0,s.jsx)(n.code,{children:"PERM"})," API methods, use the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,s.jsx)(n.code,{children:"--rpc-http-api"})})," or ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,s.jsx)(n.code,{children:"--rpc-ws-api"})})," options."]}),"\n",(0,s.jsx)(n.h3,{id:"update-the-account-allowlist",children:"Update the account allowlist"}),"\n",(0,s.jsx)(n.p,{children:"To update the accounts allowlist when the node is running, use the JSON-RPC API methods:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#perm_addaccountstoallowlist",children:(0,s.jsx)(n.code,{children:"perm_addAccountsToAllowlist"})})}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#perm_removeaccountsfromallowlist",children:(0,s.jsx)(n.code,{children:"perm_removeAccountsFromAllowlist"})}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["You can also update the ",(0,s.jsx)(n.a,{href:"#permissions-configuration-file",children:(0,s.jsx)(n.code,{children:"permissions_config.toml"})})," file directly and use the ",(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#perm_reloadpermissionsfromfile",children:(0,s.jsx)(n.code,{children:"perm_reloadPermissionsFromFile"})})," method to update the allowlists."]}),"\n",(0,s.jsx)(n.p,{children:"Updates to the permissions configuration file persist across node restarts."}),"\n",(0,s.jsx)(n.h3,{id:"view-the-account-allowlist",children:"View the account allowlist"}),"\n",(0,s.jsxs)(n.p,{children:["To view the accounts allowlist, use the ",(0,s.jsx)(n.a,{href:"/private-networks/reference/api/#perm_getaccountsallowlist",children:(0,s.jsx)(n.code,{children:"perm_getAccountsAllowlist"})})," method."]}),"\n",(0,s.jsx)(n.h2,{id:"permissions-configuration-file",children:"Permissions configuration file"}),"\n",(0,s.jsxs)(n.p,{children:["The permissions configuration file contains the nodes and accounts allowlists. If the ",(0,s.jsx)(n.a,{href:"/private-networks/reference/cli/options#permissions-accounts-config-file",children:(0,s.jsx)(n.code,{children:"--permissions-accounts-config-file"})})," and ",(0,s.jsx)(n.a,{href:"/private-networks/reference/cli/options#permissions-nodes-config-file",children:(0,s.jsx)(n.code,{children:"--permissions-nodes-config-file"})})," options are not specified, the name of the permissions configuration file must be ",(0,s.jsx)(n.a,{href:"#permissions-configuration-file",children:(0,s.jsx)(n.code,{children:"permissions_config.toml"})})," and must be in the ",(0,s.jsx)(n.a,{href:"/public-networks/reference/cli/options#data-path",children:"data directory"})," for the node."]}),"\n",(0,s.jsx)(n.p,{children:"You can specify the accounts and nodes allowlists in the same file or in separate files for accounts and nodes."}),"\n",(0,s.jsxs)(n.p,{children:["To specify a permissions configuration file (or separate files for accounts and nodes) in any location, use the ",(0,s.jsx)(n.a,{href:"/private-networks/reference/cli/options#permissions-accounts-config-file",children:(0,s.jsx)(n.code,{children:"--permissions-accounts-config-file"})})," and ",(0,s.jsx)(n.a,{href:"/private-networks/reference/cli/options#permissions-nodes-config-file",children:(0,s.jsx)(n.code,{children:"--permissions-nodes-config-file"})})," options."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.a,{href:"/private-networks/reference/cli/options#permissions-accounts-config-file",children:(0,s.jsx)(n.code,{children:"--permissions-accounts-config-file"})})," and ",(0,s.jsx)(n.a,{href:"/private-networks/reference/cli/options#permissions-nodes-config-file",children:(0,s.jsx)(n.code,{children:"permissions-nodes-config-file"})})," options are not used when running Besu from the ",(0,s.jsx)(n.a,{href:"/private-networks/get-started/install/run-docker-image",children:"Docker image"}),". Use a bind mount to ",(0,s.jsx)(n.a,{href:"/private-networks/get-started/install/run-docker-image",children:"specify a permissions configuration file with Docker"}),"."]})}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-toml",metastring:'title="Sample permissions configuration file"',children:'accounts-allowlist=["0xb9b81ee349c3807e46bc71aa2632203c5b462032", "0xb9b81ee349c3807e46bc71aa2632203c5b462034"]\n\nnodes-allowlist=["enode://7e4ef30e9ec683f26ad76ffca5b5148fa7a6575f4cfad4eb0f52f9c3d8335f4a9b6f9e66fcc73ef95ed7a2a52784d4f372e7750ac8ae0b544309a5b391a23dd7@127.0.0.1:30303","enode://2feb33b3c6c4a8f77d84a5ce44954e83e5f163e7a65f7f7a7fec499ceb0ddd76a46ef635408c513d64c076470eac86b7f2c8ae4fcd112cb28ce82c0d64ec2c94@127.0.0.1:30304","enode://7b61d5ee4b44335873e6912cb5dd3e3877c860ba21417c9b9ef1f7e500a82213737d4b269046d0669fb2299a234ca03443f25fe5f706b693b3669e5c92478ade@127.0.0.1:30305"]\n'})})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},36920:(e,n,i)=>{i.d(n,{A:()=>s});const s=i.p+"assets/images/PermissioningFlow-083dd4871a10fb66a7bf7a0e7de03a1d.png"},28453:(e,n,i)=>{i.d(n,{R:()=>a,x:()=>l});var s=i(96540);const o={},t=s.createContext(o);function a(e){const n=s.useContext(t);return s.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:a(e.components),s.createElement(t.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f46f4beb.2132984a.js b/assets/js/f46f4beb.2132984a.js new file mode 100644 index 00000000000..3a01aa99709 --- /dev/null +++ b/assets/js/f46f4beb.2132984a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8182],{22229:e=>{e.exports=JSON.parse('{"tag":{"label":"private networks","permalink":"/tags/private-networks","allTagsPath":"/tags","count":126,"items":[{"id":"public-networks/how-to/use-besu-api/access-logs","title":"Access logs using JSON-RPC","description":"Accessing logs using the Besu API","permalink":"/public-networks/how-to/use-besu-api/access-logs"},{"id":"private-networks/how-to/use-privacy/access-private-transactions","title":"Access private and privacy marker transactions","description":"Methods for accessing and managing private transactions and privacy groups in Besu","permalink":"/private-networks/how-to/use-privacy/access-private-transactions"},{"id":"public-networks/how-to/use-besu-api/index","title":"Access the Besu API","description":"Besu API","permalink":"/public-networks/how-to/use-besu-api/"},{"id":"private-networks/reference/accounts-for-testing","title":"Accounts for testing","description":"Ethereum accounts used for Besu testing only on private networks","permalink":"/private-networks/reference/accounts-for-testing"},{"id":"private-networks/how-to/configure/consensus/add-validators-without-voting","title":"Add and remove validators without voting","description":"How to add or remove validators without voting","permalink":"/private-networks/how-to/configure/consensus/add-validators-without-voting"},{"id":"private-networks/tutorials/ibft/validators","title":"Add and removing IBFT 2.0 validators","description":"Adding and removing IBFT 2.0 validators","permalink":"/private-networks/tutorials/ibft/validators"},{"id":"private-networks/how-to/configure/curves","title":"Alternative elliptic curves","description":"Using alternative elliptic curves in Besu","permalink":"/private-networks/how-to/configure/curves"},{"id":"public-networks/how-to/use-besu-api/authenticate","title":"Authenticate over JSON-RPC requests","description":"Besu authentication and authorization for JSON-RPC","permalink":"/public-networks/how-to/use-besu-api/authenticate"},{"id":"private-networks/how-to/backup","title":"Backup and restore","description":"Backing up and restoring Besu","permalink":"/private-networks/how-to/backup"},{"id":"public-networks/reference/api/index","title":"Besu API","description":"Besu JSON-RPC API methods reference","permalink":"/public-networks/reference/api/"},{"id":"private-networks/how-to/configure/bootnodes","title":"Bootnodes","description":"Configuring bootnodes","permalink":"/private-networks/how-to/configure/bootnodes"},{"id":"private-networks/chatbot","title":"Chatbot","description":"Chatbot","permalink":"/private-networks/chatbot"},{"id":"private-networks/how-to/configure/tls/client-and-server","title":"Client and server TLS","description":"Besu supports TLS for client and server communication. For example, you can configure TLS for communication between Web3Signer and Besu, and Besu and Tessera.","permalink":"/private-networks/how-to/configure/tls/client-and-server"},{"id":"private-networks/how-to/configure/consensus/clique","title":"Clique","description":"Besu Clique Proof-of-Authority (PoA) consensus protocol implementation","permalink":"/private-networks/how-to/configure/consensus/clique"},{"id":"private-networks/concepts/index","title":"Concepts","description":"private networks concepts overview","permalink":"/private-networks/concepts/"},{"id":"public-networks/how-to/configure-besu/index","title":"Configure Besu","description":"Specify options in the Besu configuration file.","permalink":"/public-networks/how-to/configure-besu/"},{"id":"private-networks/tutorials/kubernetes/nat-manager","title":"Configure Kubernetes mode in NAT manager","description":"Tutorial to configure Kubernetes mode for Besu Nat Manager","permalink":"/private-networks/tutorials/kubernetes/nat-manager"},{"id":"public-networks/how-to/monitor/logging","title":"Configure logging","description":"Besu log level setting and log formatting","permalink":"/public-networks/how-to/monitor/logging"},{"id":"public-networks/how-to/use-pow/mining","title":"Configure mining","description":"Using Besu for PoW CPU mining","permalink":"/public-networks/how-to/use-pow/mining"},{"id":"public-networks/how-to/connect/configure-ports","title":"Configure ports","description":"To enable communication you must expose Besu ports appropriately","permalink":"/public-networks/how-to/connect/configure-ports"},{"id":"public-networks/how-to/connect/static-nodes","title":"Configure static nodes","description":"Configuring static nodes","permalink":"/public-networks/how-to/connect/static-nodes"},{"id":"private-networks/how-to/configure/consensus/index","title":"Consensus protocols","description":"Besu consensus protocols","permalink":"/private-networks/how-to/configure/consensus/"},{"id":"private-networks/tutorials/clique","title":"Create a Clique network","description":"Create a private network using the Clique consensus protocol.","permalink":"/private-networks/tutorials/clique"},{"id":"private-networks/tutorials/kubernetes/cluster","title":"Create a cluster","description":"Create a cluster for deployment","permalink":"/private-networks/tutorials/kubernetes/cluster"},{"id":"private-networks/tutorials/privacy/multi-tenancy","title":"Create a multi-tenant network","description":"Configure multi-tenancy","permalink":"/private-networks/tutorials/privacy/multi-tenancy"},{"id":"private-networks/tutorials/permissioning/index","title":"Create a permissioned network","description":"Besu create a permissioned network","permalink":"/private-networks/tutorials/permissioning/"},{"id":"private-networks/tutorials/privacy/index","title":"Create a privacy enabled network using the Quickstart","description":"Configure Besu privacy","permalink":"/private-networks/tutorials/privacy/"},{"id":"private-networks/tutorials/privacy/quickstart","title":"Create a privacy-enabled network using the Quorum Developer Quickstart (Deprecated)","description":"Besu privacy-enabled private network tutorial","permalink":"/private-networks/tutorials/privacy/quickstart"},{"id":"private-networks/tutorials/ibft/index","title":"Create a private network using IBFT 2.0","description":"Besu private network using the IBFT 2.0 (Proof of Authority) consensus protocol","permalink":"/private-networks/tutorials/ibft/"},{"id":"private-networks/tutorials/qbft","title":"Create a QBFT network","description":"Create a private network using the QBFT consensus protocol.","permalink":"/private-networks/tutorials/qbft"},{"id":"private-networks/tutorials/ethash","title":"Create an Ethash network","description":"Create a private network using the Ethash consensus protocol.","permalink":"/private-networks/tutorials/ethash"},{"id":"private-networks/how-to/use-privacy/privacy-groups","title":"Create and manage privacy groups","description":"Create and manage privacy groups with Besu","permalink":"/private-networks/how-to/use-privacy/privacy-groups"},{"id":"private-networks/how-to/send-transactions/private-transactions","title":"Create and send private transactions","description":"Creating and sending private transactions with Besu","permalink":"/private-networks/how-to/send-transactions/private-transactions"},{"id":"private-networks/how-to/send-transactions/index","title":"Create and send transactions","description":"private networks send transactions overview","permalink":"/private-networks/how-to/send-transactions/"},{"id":"private-networks/tutorials/kubernetes/index","title":"Deploy a Besu private network with Kubernetes","description":"Deploying Besu with Kubernetes","permalink":"/private-networks/tutorials/kubernetes/"},{"id":"private-networks/tutorials/contracts/index","title":"Deploy a smart contract","description":"deploying smart contracts","permalink":"/private-networks/tutorials/contracts/"},{"id":"private-networks/tutorials/kubernetes/charts","title":"Deploy charts","description":"Deploying Besu Helm Charts for a Kubernetes cluster","permalink":"/private-networks/tutorials/kubernetes/charts"},{"id":"private-networks/how-to/deploy/cloud","title":"Deploy to the cloud","description":"Deploying Besu to the cloud","permalink":"/private-networks/how-to/deploy/cloud"},{"id":"private-networks/tutorials/azure","title":"Deploy using Microsoft Azure","description":"Deploy a private IBFT 2.0 network using Microsoft Azure.","permalink":"/private-networks/tutorials/azure"},{"id":"public-networks/concepts/events-and-logs","title":"Events and logs","description":"Learn about events and logs in Besu.","permalink":"/public-networks/concepts/events-and-logs"},{"id":"public-networks/reference/evm-tool","title":"EVM tool options","description":"Besu EVM tool options reference","permalink":"/public-networks/reference/evm-tool"},{"id":"private-networks/how-to/configure/free-gas","title":"Free gas network","description":"Configuring free gas networks","permalink":"/private-networks/how-to/configure/free-gas"},{"id":"public-networks/concepts/genesis-file","title":"Genesis file","description":"Learn about configuring a network using the genesis file.","permalink":"/public-networks/concepts/genesis-file"},{"id":"public-networks/reference/genesis-items","title":"Genesis file items","description":"Genesis file configuration items reference","permalink":"/public-networks/reference/genesis-items"},{"id":"public-networks/how-to/configure-ha/index","title":"High availability of JSON-RPC and RPC Pub/Sub APIs","description":"Besu high availability","permalink":"/public-networks/how-to/configure-ha/"},{"id":"private-networks/how-to/index","title":"How to","description":"Private networks how to overview","permalink":"/private-networks/how-to/"},{"id":"private-networks/how-to/configure/consensus/ibft","title":"IBFT 2.0","description":"Besu IBFT 2.0 proof of authority (PoA) consensus protocol implementation","permalink":"/private-networks/how-to/configure/consensus/ibft"},{"id":"private-networks/how-to/send-transactions/revert-reason","title":"Include revert reason","description":"Including revert reason in transactions with Besu","permalink":"/private-networks/how-to/send-transactions/revert-reason"},{"id":"public-networks/how-to/configure-java/install-update-java","title":"Install and update Java","description":"Install or update Java for use with Besu","permalink":"/public-networks/how-to/configure-java/install-update-java"},{"id":"private-networks/get-started/install/binary-distribution","title":"Install binary distribution","description":"Install or upgrade Besu from binary distribution","permalink":"/private-networks/get-started/install/binary-distribution"},{"id":"private-networks/get-started/install/index","title":"Installation options","description":"Options for getting started with Besu","permalink":"/private-networks/get-started/install/"},{"id":"private-networks/tutorials/contracts/interact","title":"Interact with a deployed contract","description":"calling smart contracts functions","permalink":"/private-networks/tutorials/contracts/interact"},{"id":"private-networks/tutorials/kubernetes/playground","title":"Local playground","description":"Deploying a Besu private network locally with Kubernetes","permalink":"/private-networks/tutorials/kubernetes/playground"},{"id":"private-networks/tutorials/kubernetes/maintenance","title":"Maintenance","description":"Maintenance for Besu on a Kubernetes cluster","permalink":"/private-networks/tutorials/kubernetes/maintenance"},{"id":"public-networks/how-to/configure-java/manage-memory","title":"Manage JVM memory","description":"Besu memory management","permalink":"/public-networks/how-to/configure-java/manage-memory"},{"id":"public-networks/how-to/connect/manage-peers","title":"Manage peers","description":"Managing Besu peers","permalink":"/public-networks/how-to/connect/manage-peers"},{"id":"public-networks/how-to/monitor/index","title":"Monitor Besu","description":"Monitoring using metrics and logging","permalink":"/public-networks/how-to/monitor/"},{"id":"private-networks/how-to/monitor/index","title":"Monitoring","description":"Monitoring using metrics and logging","permalink":"/private-networks/how-to/monitor/"},{"id":"public-networks/concepts/network-and-chain-id","title":"Network ID and chain ID","description":"Learn about network ID and chain ID in Besu.","permalink":"/public-networks/concepts/network-and-chain-id"},{"id":"public-networks/concepts/node-keys","title":"Node keys","description":"Learn about node public and private keys, and the node address.","permalink":"/public-networks/concepts/node-keys"},{"id":"private-networks/concepts/node-sync-private","title":"Node synchronization for private networks","description":"Learn about node synchronization for private networks.","permalink":"/private-networks/concepts/node-sync-private"},{"id":"public-networks/reference/api/objects","title":"Objects","description":"Besu API objects reference","permalink":"/public-networks/reference/api/objects"},{"id":"private-networks/concepts/permissioning/onchain","title":"Onchain permissioning","description":"Onchain permissioning","permalink":"/private-networks/concepts/permissioning/onchain"},{"id":"public-networks/reference/cli/options","title":"Options","description":"Besu command line interface reference","permalink":"/public-networks/reference/cli/options"},{"id":"public-networks/how-to/configure-java/pass-jvm-options","title":"Pass JVM options","description":"Passing Java virtual machine JVM options to Besu at runtime","permalink":"/public-networks/how-to/configure-java/pass-jvm-options"},{"id":"private-networks/concepts/permissioning/index","title":"Permissioning","description":"Besu permissioning feature","permalink":"/private-networks/concepts/permissioning/"},{"id":"private-networks/concepts/permissioning/plugin","title":"Permissioning plugin","description":"Plugin based permissioning","permalink":"/private-networks/concepts/permissioning/plugin"},{"id":"private-networks/reference/plugin-api-interfaces","title":"Plugin API interfaces","description":"Plugin interfaces","permalink":"/private-networks/reference/plugin-api-interfaces"},{"id":"private-networks/concepts/plugins","title":"Plugins","description":"Plugins overview","permalink":"/private-networks/concepts/plugins"},{"id":"private-networks/how-to/configure/contracts","title":"Pre-deploy a contract","description":"Pre-deploying contracts in the genesis file","permalink":"/private-networks/how-to/configure/contracts"},{"id":"private-networks/how-to/use-privacy/performance-best-practices","title":"Privacy best practices","description":"Privacy best practices","permalink":"/private-networks/how-to/use-privacy/performance-best-practices"},{"id":"private-networks/reference/api/index","title":"Private network API methods","description":"Besu private network JSON-RPC API methods reference","permalink":"/private-networks/reference/api/"},{"id":"private-networks/reference/api/objects","title":"Private network API objects","description":"Besu private network API objects reference","permalink":"/private-networks/reference/api/objects"},{"id":"private-networks/reference/cli/options","title":"Private network options","description":"Besu private networks CLI reference","permalink":"/private-networks/reference/cli/options"},{"id":"private-networks/reference/cli/subcommands","title":"Private network subcommands","description":"Besu command line interface subcommands","permalink":"/private-networks/reference/cli/subcommands"},{"id":"private-networks/index","title":"Private networks","description":"Private networks overview","permalink":"/private-networks/"},{"id":"private-networks/tutorials/kubernetes/production","title":"Production","description":"Deploying Besu Helm Charts for production on a Kubernetes cluster","permalink":"/private-networks/tutorials/kubernetes/production"},{"id":"public-networks/reference/projects-using-besu","title":"Projects using Besu","description":"List of projects using Besu","permalink":"/public-networks/reference/projects-using-besu"},{"id":"private-networks/concepts/poa","title":"Proof of authority consensus","description":"Besu proof of authority consensus protocols comparison","permalink":"/private-networks/concepts/poa"},{"id":"private-networks/how-to/configure/consensus/qbft","title":"QBFT","description":"Besu QBFT proof of authority (PoA) consensus protocol implementation","permalink":"/private-networks/how-to/configure/consensus/qbft"},{"id":"private-networks/tutorials/quickstart","title":"Quorum Developer Quickstart","description":"Rapidly generate a local blockchain network using the Quickstart.","permalink":"/private-networks/tutorials/quickstart"},{"id":"private-networks/reference/index","title":"Reference","description":"private networks reference overview","permalink":"/private-networks/reference/"},{"id":"private-networks/get-started/install/run-docker-image","title":"Run Besu from Docker image","description":"Run Besu using the official docker image","permalink":"/private-networks/get-started/install/run-docker-image"},{"id":"private-networks/how-to/use-privacy/tessera","title":"Run Tessera with Besu","description":"Running ConsenSys Quorum Tessera with Besu","permalink":"/private-networks/how-to/use-privacy/tessera"},{"id":"public-networks/how-to/configure-ha/sample-configuration","title":"Sample load balancer configurations","description":"Sample load balancers","permalink":"/public-networks/how-to/configure-ha/sample-configuration"},{"id":"public-networks/reference/disclosure","title":"Security disclosure policy","description":"Besu responsible disclosure statement","permalink":"/public-networks/reference/disclosure"},{"id":"private-networks/how-to/send-transactions/concurrent-private-transactions","title":"Send concurrent private transactions","description":"Creating and sending concurrent private transactions with Besu","permalink":"/private-networks/how-to/send-transactions/concurrent-private-transactions"},{"id":"private-networks/how-to/use-privacy/sign-pmts","title":"Sign privacy marker transactions","description":"How to sign a privacy marker transaction with Besu","permalink":"/private-networks/how-to/use-privacy/sign-pmts"},{"id":"public-networks/how-to/connect/specify-nat","title":"Specify NAT method","description":"Configuring NAT with Besu","permalink":"/public-networks/how-to/connect/specify-nat"},{"id":"private-networks/get-started/start-node","title":"Start Besu","description":"Start Besu on a private Ethereum network.","permalink":"/private-networks/get-started/start-node"},{"id":"public-networks/reference/cli/subcommands","title":"Subcommands","description":"Besu command line interface subcommands","permalink":"/public-networks/reference/cli/subcommands"},{"id":"private-networks/get-started/system-requirements","title":"System requirements","description":"Ensure you meet the system requirements to sync and run Besu.","permalink":"/private-networks/get-started/system-requirements"},{"id":"public-networks/how-to/troubleshoot/trace-transactions","title":"Trace transactions","description":"How to trace transactions","permalink":"/public-networks/how-to/troubleshoot/trace-transactions"},{"id":"public-networks/concepts/transactions/pool","title":"Transaction pool","description":"Transaction pool overview","permalink":"/public-networks/concepts/transactions/pool"},{"id":"public-networks/reference/trace-types","title":"Transaction trace types","description":"Transaction trace types reference","permalink":"/public-networks/reference/trace-types"},{"id":"public-networks/concepts/transactions/types","title":"Transaction types","description":"Description of the different transaction types","permalink":"/public-networks/concepts/transactions/types"},{"id":"public-networks/concepts/transactions/validation","title":"Transaction validation","description":"What transaction validation and when","permalink":"/public-networks/concepts/transactions/validation"},{"id":"private-networks/tutorials/contracts/transfer-funds","title":"Transfer account funds","description":"funds transfer transactions","permalink":"/private-networks/tutorials/contracts/transfer-funds"},{"id":"private-networks/how-to/upgrade","title":"Upgrade","description":"Upgrading protocol versions","permalink":"/private-networks/how-to/upgrade"},{"id":"public-networks/how-to/configure-besu/profile","title":"Use a profile","description":"You can load a profile to extend Besu\'s default configuration, using the --profile option.","permalink":"/public-networks/how-to/configure-besu/profile"},{"id":"private-networks/how-to/deploy/ansible","title":"Use Ansible","description":"Deploying Besu with Ansible role on Galaxy","permalink":"/private-networks/how-to/deploy/ansible"},{"id":"private-networks/how-to/use-privacy/besu-extended","title":"Use Besu-extended privacy","description":"Besu-extended privacy","permalink":"/private-networks/how-to/use-privacy/besu-extended"},{"id":"private-networks/how-to/monitor/chainlens","title":"Use Chainlens Explorer","description":"Use Chainlens Explorer on a privacy-enabled Besu network","permalink":"/private-networks/how-to/monitor/chainlens"},{"id":"public-networks/how-to/develop/client-libraries","title":"Use client libraries","description":"Besu client libraries","permalink":"/public-networks/how-to/develop/client-libraries"},{"id":"private-networks/how-to/use-privacy/eea-compliant","title":"Use EEA-compliant privacy","description":"Besu JSON-RPC methods to use for EEA-compliant privacy","permalink":"/private-networks/how-to/use-privacy/eea-compliant"},{"id":"private-networks/how-to/monitor/elastic-stack","title":"Use Elastic Stack","description":"Using Elastic Stack (ELK) with Besu","permalink":"/private-networks/how-to/monitor/elastic-stack"},{"id":"private-networks/how-to/deploy/ethstats","title":"Use Ethstats network monitor","description":"Ethstats network monitor","permalink":"/private-networks/how-to/deploy/ethstats"},{"id":"public-networks/how-to/troubleshoot/evm-tool","title":"Use EVM tool","description":"Besu EVM tool","permalink":"/public-networks/how-to/troubleshoot/evm-tool"},{"id":"private-networks/how-to/use-privacy/flexible","title":"Use flexible privacy groups","description":"Use flexible privacy groups","permalink":"/private-networks/how-to/use-privacy/flexible"},{"id":"private-networks/how-to/monitor/loki","title":"Use Grafana Loki","description":"Using Grafana Loki log management platform with Besu","permalink":"/private-networks/how-to/monitor/loki"},{"id":"public-networks/how-to/use-besu-api/graphql","title":"Use GraphQL over HTTP","description":"How to access the Besu API using GraphQL","permalink":"/public-networks/how-to/use-besu-api/graphql"},{"id":"public-networks/how-to/develop/hardhat","title":"Use Hardhat","description":"Using Besu with Hardhat","permalink":"/public-networks/how-to/develop/hardhat"},{"id":"public-networks/how-to/configure-java/java-flight-recorder","title":"Use Java Flight Recorder","description":"Using Java Flight Recorder with Besu","permalink":"/public-networks/how-to/configure-java/java-flight-recorder"},{"id":"public-networks/how-to/use-besu-api/json-rpc","title":"Use JSON-RPC over HTTP, WS, and IPC","description":"How to access the Besu API using JSON-RPC","permalink":"/public-networks/how-to/use-besu-api/json-rpc"},{"id":"private-networks/how-to/deploy/kubernetes","title":"Use Kubernetes","description":"Deploying Besu with Kubernetes","permalink":"/private-networks/how-to/deploy/kubernetes"},{"id":"private-networks/how-to/use-permissioning/local","title":"Use local permissioning","description":"Besu local permissioning","permalink":"/private-networks/how-to/use-permissioning/local"},{"id":"public-networks/how-to/monitor/metrics","title":"Use metrics","description":"Monitoring and metrics","permalink":"/public-networks/how-to/monitor/metrics"},{"id":"private-networks/how-to/use-permissioning/onchain","title":"Use onchain permissioning","description":"Use onchain permissioning allowlists","permalink":"/private-networks/how-to/use-permissioning/onchain"},{"id":"private-networks/how-to/monitor/opentelemetry","title":"Use OpenTelemetry","description":"Collect Besu information with the OpenTelemetry Collector","permalink":"/private-networks/how-to/monitor/opentelemetry"},{"id":"private-networks/how-to/monitor/quorum-hibernate","title":"Use Quorum Hibernate","description":"Use Quorum Hibernate with Besu","permalink":"/private-networks/how-to/monitor/quorum-hibernate"},{"id":"public-networks/how-to/use-besu-api/rpc-pubsub","title":"Use RPC Pub/Sub over WS","description":"Using RPC Pub/Sub with Besu WebSockets","permalink":"/public-networks/how-to/use-besu-api/rpc-pubsub"},{"id":"private-networks/how-to/monitor/splunk","title":"Use Splunk","description":"Send Besu logs to Splunk","permalink":"/private-networks/how-to/monitor/splunk"},{"id":"private-networks/tutorials/kubernetes/quorum-explorer","title":"Use the Quorum Explorer","description":"Using the Quorum Explorer on a Kubernetes cluster","permalink":"/private-networks/tutorials/kubernetes/quorum-explorer"},{"id":"private-networks/how-to/use-privacy/web3js-quorum","title":"Use the web3js-quorum library","description":"web3js-quorum client library","permalink":"/private-networks/how-to/use-privacy/web3js-quorum"},{"id":"private-networks/tutorials/privacy/web3js-quorum","title":"Use the web3js-quorum multi-node example","description":"web3js-quorum client library multi-node example","permalink":"/private-networks/tutorials/privacy/web3js-quorum"},{"id":"private-networks/how-to/configure/validators","title":"Validators","description":"Configuring validators in production networks","permalink":"/private-networks/how-to/configure/validators"}],"unlisted":false}}')}}]); \ No newline at end of file diff --git a/assets/js/f606b5b5.4724fc0f.js b/assets/js/f606b5b5.4724fc0f.js new file mode 100644 index 00000000000..4b38de71029 --- /dev/null +++ b/assets/js/f606b5b5.4724fc0f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2077],{75583:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>s,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>l});var t=i(74848),r=i(28453);const a={title:"Privacy plugin",description:"Privacy plugin",sidebar_position:5},s="Privacy plugin (Deprecated)",o={id:"private-networks/concepts/privacy/plugin",title:"Privacy plugin",description:"Privacy plugin",source:"@site/docs/private-networks/concepts/privacy/plugin.md",sourceDirName:"private-networks/concepts/privacy",slug:"/private-networks/concepts/privacy/plugin",permalink:"/private-networks/concepts/privacy/plugin",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/concepts/privacy/plugin.md",tags:[],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:5,frontMatter:{title:"Privacy plugin",description:"Privacy plugin",sidebar_position:5},sidebar:"privateDocSidebar",previous:{title:"Multi-tenancy",permalink:"/private-networks/concepts/privacy/multi-tenancy"},next:{title:"Permissioning",permalink:"/private-networks/concepts/permissioning/"}},c={},l=[{value:"Configuration",id:"configuration",level:2},{value:"Use the payload provider interface",id:"use-the-payload-provider-interface",level:2},{value:"Send transactions",id:"send-transactions",level:3},{value:"Mine transactions",id:"mine-transactions",level:3},{value:"Transaction factory",id:"transaction-factory",level:2},{value:"Register your plugin",id:"register-your-plugin",level:2}];function p(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"privacy-plugin-deprecated",children:"Privacy plugin (Deprecated)"})}),"\n",(0,t.jsx)(n.admonition,{type:"caution",children:(0,t.jsxs)(n.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,t.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,t.jsx)(n.p,{children:"You can define your own strategy for private transactions by building a plugin that extends Besu functionality."}),"\n",(0,t.jsx)(n.p,{children:"The plugin can take many forms, but it must provide Besu with a private transaction when required."}),"\n",(0,t.jsx)(n.admonition,{type:"danger",children:(0,t.jsx)(n.p,{children:"The privacy plugin is an early access feature and plugin interfaces are subject to change between releases."})}),"\n",(0,t.jsx)(n.h2,{id:"configuration",children:"Configuration"}),"\n",(0,t.jsxs)(n.p,{children:["Enable the privacy plugin by starting Besu and including the ",(0,t.jsx)(n.code,{children:"--Xprivacy-plugin-enabled"})," command line option. The registered plugin must implement the ",(0,t.jsx)(n.code,{children:"PrivacyPluginPayloadProvider"})," interface."]}),"\n",(0,t.jsx)(n.h2,{id:"use-the-payload-provider-interface",children:"Use the payload provider interface"}),"\n",(0,t.jsxs)(n.p,{children:["The privacy plugin must define the ",(0,t.jsx)(n.a,{href:"/private-networks/how-to/use-privacy/access-private-transactions",children:"privacy marker transaction (PMT)"})," payload. Use the payload to retrieve the contents of the private transaction which could be a link to a location in an enclave, or an encrypted form of the private payload itself."]}),"\n",(0,t.jsx)(n.p,{children:"Besu doesn't need to know how the private transaction is distributed, it just needs to know what the private transaction for the PMT is."}),"\n",(0,t.jsx)(n.h3,{id:"send-transactions",children:"Send transactions"}),"\n",(0,t.jsxs)(n.p,{children:["When submitting a private transaction using ",(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#eea_sendrawtransaction",children:(0,t.jsx)(n.code,{children:"eea_sendRawTransaction"})}),", the signed transaction must be sent to ",(0,t.jsx)(n.code,{children:"0x000000000000000000000000000000000000007a"})," to indicate which ",(0,t.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy precompiled contract"})," is being used."]}),"\n",(0,t.jsx)(n.p,{children:"The transaction flow is as follows:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"The JSON-RPC endpoint passes the private transaction to the private transaction manager (for example Tessera)."}),"\n",(0,t.jsx)(n.li,{children:"The private transaction manager sends the private transaction to the privacy plugin."}),"\n",(0,t.jsx)(n.li,{children:"The plugin decides what data to store onchain in the payload, for example the encrypted and serialized private transaction."}),"\n",(0,t.jsx)(n.li,{children:"The plugin returns what needs to be stored in the payload for the PMT."}),"\n",(0,t.jsx)(n.li,{children:"The private transaction handler creates a PMT for the private transaction, and propagates the PMT using devP2P in the same way as a public Ethereum transaction."}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"mine-transactions",children:"Mine transactions"}),"\n",(0,t.jsx)(n.p,{children:"The process of mining transactions happens in reverse to sending transactions."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["The Mainnet transaction processor processes the PMT in the same way as any other public transaction. On nodes containing the ",(0,t.jsx)(n.a,{href:"/public-networks/reference/api/#priv_getprivacyprecompileaddress",children:"privacy precompile contract"})," specified in the ",(0,t.jsx)(n.code,{children:"to"})," attribute of the PMT, the Mainnet transaction processor passes the PMT to the privacy precompile contract."]}),"\n",(0,t.jsx)(n.admonition,{type:"note",children:(0,t.jsx)(n.p,{children:"Nodes receiving the PMT that do not contain the specified privacy precompile contract will ignore the PMT."})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"The privacy precompile contract queries the plugin for the private transaction using the PMT."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"The privacy precompile contract passes the private transaction to the private transaction manager. The privacy group ID specifies the private world state to use."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"The private transaction manager executes the transaction. The private transaction manager can read and write to the private world state, and read from the public world state."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"transaction-factory",children:"Transaction factory"}),"\n",(0,t.jsx)(n.p,{children:"An additional extension is available to help you define how PMTs are signed. Currently, Besu supports fixed or random key signing for PMTs."}),"\n",(0,t.jsx)(n.p,{children:"The extension allows you to use a more dynamic approach, for example different keys for different groups."}),"\n",(0,t.jsxs)(n.p,{children:["Your plugin needs to register the ",(0,t.jsx)(n.code,{children:"PrivateMarkerTransactionFactory"})," interface which is called before submitting a PMT to the transaction pool. The responsibility then lies with the plugin to sign and serialize the PMT."]}),"\n",(0,t.jsx)(n.h2,{id:"register-your-plugin",children:"Register your plugin"}),"\n",(0,t.jsxs)(n.p,{children:["To enable Besu to use your privacy plugin, implement the ",(0,t.jsx)(n.code,{children:"PrivacyPluginService"})," interface and call ",(0,t.jsx)(n.code,{children:"setPayloadProvider"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-java",children:"@AutoService(BesuPlugin.class)\npublic class TestPrivacyPlugin implements BesuPlugin {\n private PrivacyPluginService service;\n @Override\n public void register(BesuContext context) {\n service = context.getService(PrivacyPluginService.class).get();\n }\n @Override\n public void start() {\n service.setPayloadProvider(new PrivacyPluginPayloadProvider() {\n @Override\n public Bytes generateMarkerPayload(PrivateTransaction privateTransaction, String privacyUserId) {\n // perform logic to serialize the payload of the marker transaction\n // in this example we are serialising the private transaction using rlp https://ethereum.org/en/developers/docs/data-structures-and-encoding/rlp/\n return org.hyperledger.besu.ethereum.privacy.PrivateTransaction.serialize(privateTransaction).encoded();\n }\n @Override\n public Optional getPrivateTransactionFromPayload(Transaction transaction) {\n // perform logic to deserialize payload from the marker transaction\n final BytesValueRLPInput bytesValueRLPInput =\n new BytesValueRLPInput(transaction.getPayload(), false);\n return Optional.of(org.hyperledger.besu.ethereum.privacy.PrivateTransaction.readFrom(bytesValueRLPInput));\n }\n });\n }\n @Override\n public void stop() {}\n}\n"})})]})}function d(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>s,x:()=>o});var t=i(96540);const r={},a=t.createContext(r);function s(e){const n=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:s(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/f834d930.2d6e5625.js b/assets/js/f834d930.2d6e5625.js new file mode 100644 index 00000000000..a0bbe761b17 --- /dev/null +++ b/assets/js/f834d930.2d6e5625.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8096],{71496:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>c,contentTitle:()=>o,default:()=>l,frontMatter:()=>a,metadata:()=>s,toc:()=>p});var t=n(74848),i=n(28453);const a={title:"Use EEA-compliant privacy",description:"Besu JSON-RPC methods to use for EEA-compliant privacy",sidebar_position:1,tags:["private networks"]},o="Use EEA-compliant privacy (Deprecated)",s={id:"private-networks/how-to/use-privacy/eea-compliant",title:"Use EEA-compliant privacy",description:"Besu JSON-RPC methods to use for EEA-compliant privacy",source:"@site/docs/private-networks/how-to/use-privacy/eea-compliant.md",sourceDirName:"private-networks/how-to/use-privacy",slug:"/private-networks/how-to/use-privacy/eea-compliant",permalink:"/private-networks/how-to/use-privacy/eea-compliant",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/use-privacy/eea-compliant.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Use EEA-compliant privacy",description:"Besu JSON-RPC methods to use for EEA-compliant privacy",sidebar_position:1,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Use Chainlens Explorer",permalink:"/private-networks/how-to/monitor/chainlens"},next:{title:"Use Besu-extended privacy",permalink:"/private-networks/how-to/use-privacy/besu-extended"}},c={},p=[{value:"Privacy group type",id:"privacy-group-type",level:2}];function d(e){const r={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"use-eea-compliant-privacy-deprecated",children:"Use EEA-compliant privacy (Deprecated)"})}),"\n",(0,t.jsx)(r.admonition,{type:"caution",children:(0,t.jsxs)(r.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,t.jsx)(r.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,t.jsxs)(r.p,{children:["When using Besu ",(0,t.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"EEA-compliant privacy"}),", the group of nodes specified by ",(0,t.jsx)(r.code,{children:"privateFrom"})," and ",(0,t.jsx)(r.code,{children:"privateFor"})," form a privacy group, to which Tessera assigns a unique privacy group ID."]}),"\n",(0,t.jsxs)(r.p,{children:["To enable the ",(0,t.jsxs)(r.a,{href:"/private-networks/reference/api/#eea-methods",children:[(0,t.jsx)(r.code,{children:"EEA"})," API methods"]}),", use the ",(0,t.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-http-api",children:(0,t.jsx)(r.code,{children:"--rpc-http-api"})})," or ",(0,t.jsx)(r.a,{href:"/public-networks/reference/cli/options#rpc-ws-api",children:(0,t.jsx)(r.code,{children:"--rpc-ws-api"})})," command line options."]}),"\n",(0,t.jsxs)(r.p,{children:["To create an EEA-compliant private transaction, specify ",(0,t.jsx)(r.code,{children:"privateFor"})," when creating the signed transaction passed as an input parameter to ",(0,t.jsx)(r.a,{href:"/private-networks/reference/api/#eea_sendrawtransaction",children:(0,t.jsx)(r.code,{children:"eea_sendRawTransaction"})}),"."]}),"\n",(0,t.jsx)(r.h2,{id:"privacy-group-type",children:"Privacy group type"}),"\n",(0,t.jsxs)(r.p,{children:["Privacy groups created when specifying ",(0,t.jsx)(r.code,{children:"privateFrom"})," and ",(0,t.jsx)(r.code,{children:"privateFor"})," have a ",(0,t.jsx)(r.code,{children:"LEGACY"})," privacy group type when returned by ",(0,t.jsx)(r.a,{href:"/private-networks/reference/api/#priv_findprivacygroup",children:(0,t.jsx)(r.code,{children:"priv_findPrivacyGroup"})}),"."]}),"\n",(0,t.jsx)(r.pre,{children:(0,t.jsx)(r.code,{className:"language-json",children:'{\n "jsonrpc": "2.0",\n "id": 1,\n "result": [\n {\n "privacyGroupId": "68/Cq0mVjB8FbXDLE1tbDRAvD/srluIok137uFOaClM=",\n "name": "legacy",\n "description": "Privacy groups to support the creation of groups by privateFor and privateFrom",\n "type": "LEGACY",\n "members": [\n "g59BmTeJIn7HIcnq8VQWgyh/pDbvbt2eyP0Ii60aDDw=",\n "negmDcN2P4ODpqn/6WkJ02zT/0w0bjhGpkZ8UP6vARk="\n ]\n }\n ]\n}\n'})})]})}function l(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453:(e,r,n)=>{n.d(r,{R:()=>o,x:()=>s});var t=n(96540);const i={},a=t.createContext(i);function o(e){const r=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function s(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:o(e.components),t.createElement(a.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fb537116.87597f37.js b/assets/js/fb537116.87597f37.js new file mode 100644 index 00000000000..9df53e9eb62 --- /dev/null +++ b/assets/js/fb537116.87597f37.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[5954],{27660:(e,r,i)=>{i.r(r),i.d(r,{assets:()=>a,contentTitle:()=>s,default:()=>d,frontMatter:()=>t,metadata:()=>l,toc:()=>c});var o=i(74848),n=i(28453);const t={title:"Use a profile",sidebar_position:1,tags:["public networks","private networks"]},s="Use a profile",l={id:"public-networks/how-to/configure-besu/profile",title:"Use a profile",description:"You can load a profile to extend Besu's default configuration, using the --profile option.",source:"@site/docs/public-networks/how-to/configure-besu/profile.md",sourceDirName:"public-networks/how-to/configure-besu",slug:"/public-networks/how-to/configure-besu/profile",permalink:"/public-networks/how-to/configure-besu/profile",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/public-networks/how-to/configure-besu/profile.md",tags:[{inline:!0,label:"public networks",permalink:"/tags/public-networks"},{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:1,frontMatter:{title:"Use a profile",sidebar_position:1,tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Configure Besu",permalink:"/public-networks/how-to/configure-besu/"},next:{title:"Access the Besu API",permalink:"/public-networks/how-to/use-besu-api/"}},a={},c=[{value:"Minimalist staker profile",id:"minimalist-staker-profile",level:2},{value:"Staker profile",id:"staker-profile",level:2},{value:"Enterprise/Private profile",id:"enterpriseprivate-profile",level:2},{value:"Load external profiles",id:"load-external-profiles",level:2}];function p(e){const r={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,n.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(r.header,{children:(0,o.jsx)(r.h1,{id:"use-a-profile",children:"Use a profile"})}),"\n",(0,o.jsxs)(r.p,{children:["You can load a profile to extend Besu's ",(0,o.jsx)(r.a,{href:"/public-networks/how-to/configure-besu/#default-configuration",children:"default configuration"}),", using the ",(0,o.jsx)(r.a,{href:"/public-networks/reference/cli/options#profile",children:(0,o.jsx)(r.code,{children:"--profile"})})," option."]}),"\n",(0,o.jsx)(r.p,{children:"Profiles simplify the process of configuring Besu for common use cases. Besu provides the following pre-configured profiles:"}),"\n",(0,o.jsxs)(r.ul,{children:["\n",(0,o.jsx)(r.li,{children:(0,o.jsx)(r.a,{href:"#minimalist-staker-profile",children:"Minimalist staker profile"})}),"\n",(0,o.jsx)(r.li,{children:(0,o.jsx)(r.a,{href:"#staker-profile",children:"Staker profile"})}),"\n",(0,o.jsx)(r.li,{children:(0,o.jsx)(r.a,{href:"#enterpriseprivate-profile",children:"Enterprise/Private profile"})}),"\n"]}),"\n",(0,o.jsxs)(r.p,{children:["Alternatively, you can customize and ",(0,o.jsx)(r.a,{href:"#load-external-profiles",children:"load external profiles"}),"."]}),"\n",(0,o.jsx)(r.admonition,{type:"note",children:(0,o.jsxs)(r.p,{children:["Run ",(0,o.jsx)(r.code,{children:"./besu --help"})," to view all available profiles."]})}),"\n",(0,o.jsx)(r.admonition,{type:"note",children:(0,o.jsxs)(r.p,{children:["A configuration option specified in the configuration file or on the command line\n",(0,o.jsx)(r.a,{href:"/public-networks/how-to/configure-besu/#configuration-order-of-precedence",children:"overrides the same option"})," set in the profile."]})}),"\n",(0,o.jsx)(r.h2,{id:"minimalist-staker-profile",children:"Minimalist staker profile"}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.a,{href:"/public-networks/reference/cli/options#profile",children:(0,o.jsx)(r.code,{children:"--profile=MINIMALIST_STAKER"})})," is optimized for stakers who\nwant to maximize their hardware value but don't want to serve full sets of data to their peers, See the\n",(0,o.jsx)(r.a,{href:"https://github.com/hyperledger/besu/blob/main/config/src/main/resources/profiles/minimalist-staker.toml",children:"minimalist staker profile on GitHub"}),"\nfor the custom settings."]}),"\n",(0,o.jsx)(r.h2,{id:"staker-profile",children:"Staker profile"}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.a,{href:"/public-networks/reference/cli/options#profile",children:(0,o.jsx)(r.code,{children:"--profile=STAKER"})})," is optimized for stakers who want to\nmaximize their hardware value while also serving full sets of data to their peers. See the\n",(0,o.jsx)(r.a,{href:"https://github.com/hyperledger/besu/blob/main/config/src/main/resources/profiles/staker.toml",children:"staker profile on GitHub"}),"\nfor the custom settings."]}),"\n",(0,o.jsx)(r.h2,{id:"enterpriseprivate-profile",children:"Enterprise/Private profile"}),"\n",(0,o.jsxs)(r.p,{children:[(0,o.jsx)(r.code,{children:"ENTERPRISE"})," and ",(0,o.jsx)(r.code,{children:"PRIVATE"})," are aliases for the same profile. ",(0,o.jsxs)(r.a,{href:"/public-networks/reference/cli/options#profile",children:[(0,o.jsx)(r.code,{children:"--profile=PRIVATE"})," / ",(0,o.jsx)(r.code,{children:"--profile=ENTERPRISE"})]}),"\nsupports private network operators and enterprises by handling specific use cases that apply to\nprivate network operators. See the ",(0,o.jsx)(r.a,{href:"https://github.com/hyperledger/besu/blob/main/config/src/main/resources/profiles/enterprise-private.toml",children:"enterprise/private profile on\nGitHub"}),"\nfor the custom settings."]}),"\n",(0,o.jsxs)(r.p,{children:["When using this profile, set ",(0,o.jsx)(r.a,{href:"/public-networks/reference/cli/options#sync-mode",children:(0,o.jsx)(r.code,{children:"--sync-mode=FULL"})}),"\nand ",(0,o.jsx)(r.a,{href:"/public-networks/reference/cli/options#data-storage-format",children:(0,o.jsx)(r.code,{children:"--data-storage-format=FOREST"})}),"."]}),"\n",(0,o.jsx)(r.h2,{id:"load-external-profiles",children:"Load external profiles"}),"\n",(0,o.jsx)(r.p,{children:"You can use external profiles to create custom Besu bundles with various plugins and their default options."}),"\n",(0,o.jsxs)(r.p,{children:["Add external profiles to a ",(0,o.jsx)(r.code,{children:"profiles"})," directory under the root Besu directory.\nRun Besu with ",(0,o.jsx)(r.a,{href:"/public-networks/reference/cli/options#profile",children:(0,o.jsx)(r.code,{children:"--profile"})})," set to the external profile\nfile name, without the ",(0,o.jsx)(r.code,{children:".toml"})," extension.\nFor example, to load the ",(0,o.jsx)(r.code,{children:"profiles/custom_profile.toml"})," profile, run:"]}),"\n",(0,o.jsx)(r.pre,{children:(0,o.jsx)(r.code,{className:"language-bash",children:"besu --profile=custom_profile\n"})}),"\n",(0,o.jsx)(r.admonition,{type:"note",children:(0,o.jsxs)(r.p,{children:["You can overwrite the directory in which to place external profiles using the ",(0,o.jsx)(r.code,{children:"besu.profiles.dir"}),"\nsystem property."]})})]})}function d(e={}){const{wrapper:r}={...(0,n.R)(),...e.components};return r?(0,o.jsx)(r,{...e,children:(0,o.jsx)(p,{...e})}):p(e)}},28453:(e,r,i)=>{i.d(r,{R:()=>s,x:()=>l});var o=i(96540);const n={},t=o.createContext(n);function s(e){const r=o.useContext(t);return o.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function l(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),o.createElement(t.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fb8ebc35.84f05a53.js b/assets/js/fb8ebc35.84f05a53.js new file mode 100644 index 00000000000..9672fda61b1 --- /dev/null +++ b/assets/js/fb8ebc35.84f05a53.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[2587],{43538:(e,r,i)=>{i.r(r),i.d(r,{assets:()=>c,contentTitle:()=>s,default:()=>d,frontMatter:()=>a,metadata:()=>o,toc:()=>p});var t=i(74848),n=i(28453);const a={title:"Flexible privacy groups",sidebar_position:3,description:"Flexible privacy groups"},s="Flexible privacy groups (Deprecated)",o={id:"private-networks/concepts/privacy/flexible-privacy",title:"Flexible privacy groups",description:"Flexible privacy groups",source:"@site/docs/private-networks/concepts/privacy/flexible-privacy.md",sourceDirName:"private-networks/concepts/privacy",slug:"/private-networks/concepts/privacy/flexible-privacy",permalink:"/private-networks/concepts/privacy/flexible-privacy",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/concepts/privacy/flexible-privacy.md",tags:[],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:3,frontMatter:{title:"Flexible privacy groups",sidebar_position:3,description:"Flexible privacy groups"},sidebar:"privateDocSidebar",previous:{title:"Privacy groups",permalink:"/private-networks/concepts/privacy/privacy-groups"},next:{title:"Multi-tenancy",permalink:"/private-networks/concepts/privacy/multi-tenancy"}},c={},p=[{value:"Group management contracts",id:"group-management-contracts",level:2},{value:"Flexible privacy group IDs",id:"flexible-privacy-group-ids",level:2},{value:"Multi-tenancy",id:"multi-tenancy",level:2}];function l(e){const r={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",ul:"ul",...(0,n.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.header,{children:(0,t.jsx)(r.h1,{id:"flexible-privacy-groups-deprecated",children:"Flexible privacy groups (Deprecated)"})}),"\n",(0,t.jsx)(r.admonition,{type:"caution",children:(0,t.jsxs)(r.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,t.jsx)(r.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,t.jsxs)(r.p,{children:["Flexible ",(0,t.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"privacy groups"})," use smart contracts to store and maintain the group membership. You can ",(0,t.jsx)(r.a,{href:"/private-networks/how-to/use-privacy/flexible",children:"add and remove members to and from flexible privacy groups"}),"."]}),"\n",(0,t.jsx)(r.admonition,{type:"tip",children:(0,t.jsx)(r.p,{children:"Because group membership for flexible privacy groups is stored in a smart contract, flexible privacy groups are also known as onchain privacy groups."})}),"\n",(0,t.jsxs)(r.admonition,{type:"danger",children:[(0,t.jsx)(r.p,{children:"Flexible privacy groups are an early access feature. Don't use in production networks."}),(0,t.jsx)(r.p,{children:"The flexible privacy group interfaces might change between releases. There might not be an upgrade path from flexible privacy groups created using v1.5 or earlier to enable use of flexible privacy group functionality in future versions."}),(0,t.jsxs)(r.p,{children:["We don't recommend creating flexible privacy groups in a chain with existing ",(0,t.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"offchain privacy groups"}),"."]})]}),"\n",(0,t.jsx)(r.h2,{id:"group-management-contracts",children:"Group management contracts"}),"\n",(0,t.jsx)(r.p,{children:"The privacy group management contract bytecode is hard-coded into Besu and when you create a privacy group, the contract bytecode is part of the genesis state of the privacy group."}),"\n",(0,t.jsx)(r.admonition,{type:"caution",children:(0,t.jsx)(r.p,{children:"All members of a flexible privacy group must be using the same version of Besu. If using different versions, the private state within the privacy group may become inconsistent."})}),"\n",(0,t.jsx)(r.p,{children:"In the default implementation of the group management contract, the signer of the private transaction that creates the privacy group is also the owner of the group. Only the owner can add and remove participants, and upgrade the management contract."}),"\n",(0,t.jsx)(r.p,{children:"The owner is identified by the signing key. Transactions to add and remove participants, or upgrade the management contract, must be signed by the same key that signed the group creation transaction."}),"\n",(0,t.jsx)(r.h2,{id:"flexible-privacy-group-ids",children:"Flexible privacy group IDs"}),"\n",(0,t.jsx)(r.p,{children:"When creating a flexible privacy group, generate the privacy group ID for the group outside of Besu and pass the ID as a parameter."}),"\n",(0,t.jsxs)(r.p,{children:["The ",(0,t.jsx)(r.a,{href:"/private-networks/how-to/use-privacy/flexible",children:"web3js-quorum library"})," generates a unique privacy group ID and passes the ID to Besu when creating a privacy group."]}),"\n",(0,t.jsxs)(r.admonition,{type:"caution",children:[(0,t.jsx)(r.p,{children:"When generating a privacy group ID, you must ensure the ID is unique across all network participants. If you create a privacy group with an existing privacy group ID, the existing privacy group is overwritten."}),(0,t.jsx)(r.p,{children:"To ensure unique privacy group IDs, we recommend using 256-bit SecureRandom."})]}),"\n",(0,t.jsx)(r.h2,{id:"multi-tenancy",children:"Multi-tenancy"}),"\n",(0,t.jsxs)(r.p,{children:["When using ",(0,t.jsx)(r.a,{href:"/private-networks/concepts/privacy/multi-tenancy",children:"multi-tenancy"})," with flexible privacy groups, each user provides a JSON Web Token (JWT) which allows Besu to check that the user has access to functionality and data associated with a privacy group."]}),"\n",(0,t.jsxs)(r.p,{children:["Using multi-tenancy with flexible privacy groups is more complex than with ",(0,t.jsx)(r.a,{href:"/private-networks/concepts/privacy/privacy-groups",children:"offchain privacy groups"})," because users may be added and removed from flexible privacy groups. When a user is added to a privacy group, they get access to all existing data in the privacy group. After being removed from a privacy group, a user retains access to already existing data in the privacy group, up to the block containing the ",(0,t.jsx)(r.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"privacy marker transaction (PMT)"})," that removed them (the removal block). A removed user doesn't have access to data in the privacy group that happens after they were removed."]}),"\n",(0,t.jsx)(r.p,{children:"In particular, when multi-tenancy is enabled and a user requests access to a privacy group they were once a member of but later removed from, Besu allows the user access to the following functionality and data associated with the privacy group:"}),"\n",(0,t.jsxs)(r.ul,{children:["\n",(0,t.jsxs)(r.li,{children:["\n",(0,t.jsxs)(r.p,{children:["Private transactions using ",(0,t.jsx)(r.code,{children:"priv_getTransaction"})," and private transaction receipts using ",(0,t.jsx)(r.a,{href:"/public-networks/reference/api/#priv_gettransactionreceipt",children:(0,t.jsx)(r.code,{children:"priv_getTransactionReceipt"})})," from blocks up to (and including) the removal block."]}),"\n",(0,t.jsx)(r.admonition,{type:"note",children:(0,t.jsx)(r.p,{children:"A removed group member may have access to some private transactions after the removal PMT in the same block."})}),"\n"]}),"\n",(0,t.jsxs)(r.li,{children:["\n",(0,t.jsxs)(r.p,{children:["Using ",(0,t.jsx)(r.a,{href:"/public-networks/reference/api/#priv_call",children:(0,t.jsx)(r.code,{children:"priv_call"})})," on blocks up to (and including) the removal block."]}),"\n"]}),"\n",(0,t.jsxs)(r.li,{children:["\n",(0,t.jsxs)(r.p,{children:["Private logs using ",(0,t.jsx)(r.a,{href:"/public-networks/reference/api/#priv_getlogs",children:(0,t.jsx)(r.code,{children:"priv_getLogs"})})," for blocks up to (and including) the removal block. When the ",(0,t.jsx)(r.code,{children:"toBlock"})," is greater than the removal block, ",(0,t.jsx)(r.code,{children:"priv_getLogs"})," still returns logs up to the removal block."]}),"\n",(0,t.jsx)(r.admonition,{type:"note",children:(0,t.jsx)(r.p,{children:"When a user is removed from a privacy group, any log filters they've created are also removed and can't be accessed. A user can only create and access filters for a privacy group they are currently a member of."})}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(r.p,{children:["All other ",(0,t.jsxs)(r.a,{href:"/public-networks/reference/api/#priv-methods",children:[(0,t.jsx)(r.code,{children:"PRIV"})," API methods"]})," fail for the removed group member."]})]})}function d(e={}){const{wrapper:r}={...(0,n.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},28453:(e,r,i)=>{i.d(r,{R:()=>s,x:()=>o});var t=i(96540);const n={},a=t.createContext(n);function s(e){const r=t.useContext(a);return t.useMemo((function(){return"function"==typeof e?e(r):{...r,...e}}),[r,e])}function o(e){let r;return r=e.disableParentContext?"function"==typeof e.components?e.components(n):e.components||n:s(e.components),t.createElement(a.Provider,{value:r},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/fe1d21e1.50dc7bef.js b/assets/js/fe1d21e1.50dc7bef.js new file mode 100644 index 00000000000..4a6a5b37fd8 --- /dev/null +++ b/assets/js/fe1d21e1.50dc7bef.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[3078],{30579:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>l,frontMatter:()=>s,metadata:()=>o,toc:()=>p});var r=i(74848),t=i(28453);const s={title:"Sign privacy marker transactions",description:"How to sign a privacy marker transaction with Besu",sidebar_position:7,tags:["private networks"]},a="Sign privacy marker transactions (Deprecated)",o={id:"private-networks/how-to/use-privacy/sign-pmts",title:"Sign privacy marker transactions",description:"How to sign a privacy marker transaction with Besu",source:"@site/docs/private-networks/how-to/use-privacy/sign-pmts.md",sourceDirName:"private-networks/how-to/use-privacy",slug:"/private-networks/how-to/use-privacy/sign-pmts",permalink:"/private-networks/how-to/use-privacy/sign-pmts",draft:!1,unlisted:!1,editUrl:"https://github.com/hyperledger/besu-docs/tree/main/docs/private-networks/how-to/use-privacy/sign-pmts.md",tags:[{inline:!0,label:"private networks",permalink:"/tags/private-networks"}],version:"current",lastUpdatedAt:1733724395e3,sidebarPosition:7,frontMatter:{title:"Sign privacy marker transactions",description:"How to sign a privacy marker transaction with Besu",sidebar_position:7,tags:["private networks"]},sidebar:"privateDocSidebar",previous:{title:"Access private and privacy marker transactions",permalink:"/private-networks/how-to/use-privacy/access-private-transactions"},next:{title:"Use the web3js-quorum library",permalink:"/private-networks/how-to/use-privacy/web3js-quorum"}},c={},p=[];function d(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",header:"header",p:"p",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"sign-privacy-marker-transactions-deprecated",children:"Sign privacy marker transactions (Deprecated)"})}),"\n",(0,r.jsx)(n.admonition,{type:"caution",children:(0,r.jsxs)(n.p,{children:["Tessera-based privacy is deprecated in Besu version 24.12.0 and later. Please read this ",(0,r.jsx)(n.a,{href:"https://www.lfdecentralizedtrust.org/blog/sunsetting-tessera-and-simplifying-hyperledger-besu",children:"blog post"})," for more context on the rationale behind this decision as well as alternative options."]})}),"\n",(0,r.jsxs)(n.p,{children:["You can sign privacy marker transactions (PMTs) with either a random key or a specified key. To sign privacy marker transactions with a specified private key, use ",(0,r.jsx)(n.a,{href:"/private-networks/reference/cli/options#privacy-marker-transaction-signing-key-file-deprecated",children:(0,r.jsx)(n.code,{children:"--privacy-marker-transaction-signing-key-file"})})," when starting Besu."]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["The private key file can be the same file used by ",(0,r.jsx)(n.a,{href:"#node-private-key-file",children:(0,r.jsx)(n.code,{children:"--node-private-key-file"})}),", or a different key file to identify who signed the privacy marker transaction."]})}),"\n",(0,r.jsx)(n.p,{children:"In networks where you pay gas, you must specify a key and the associated account must contain adequate funds."}),"\n",(0,r.jsxs)(n.p,{children:["In ",(0,r.jsx)(n.a,{href:"/private-networks/how-to/configure/free-gas",children:"free gas networks"}),", to provide further anonymity by signing each privacy marker transaction with a different random key, exclude the ",(0,r.jsx)(n.a,{href:"/private-networks/reference/cli/options#privacy-marker-transaction-signing-key-file-deprecated",children:(0,r.jsx)(n.code,{children:"--privacy-marker-transaction-signing-key-file"})})," command line option when starting Besu."]}),"\n",(0,r.jsxs)(n.admonition,{title:'"Using account permissioning and privacy"',type:"caution",children:[(0,r.jsxs)(n.p,{children:["You can't use ",(0,r.jsx)(n.a,{href:"/private-networks/concepts/permissioning/#account-permissioning",children:"account permissioning"})," with random key signing."]}),(0,r.jsxs)(n.p,{children:["If using account permissioning and privacy, a signing key must be specified using the ",(0,r.jsx)(n.a,{href:"/private-networks/reference/cli/options#privacy-marker-transaction-signing-key-file-deprecated",children:(0,r.jsx)(n.code,{children:"--privacy-marker-transaction-signing-key-file"})})," command line option and the corresponding public key included in the accounts allowlist."]})]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsxs)(n.p,{children:["Besu signs privacy marker transactions during the ",(0,r.jsx)(n.a,{href:"/private-networks/concepts/privacy/private-transactions/processing",children:"private transaction process"}),"."]})})]})}function l(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}},28453:(e,n,i)=>{i.d(n,{R:()=>a,x:()=>o});var r=i(96540);const t={},s=r.createContext(t);function a(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/main.8f31c7f6.js b/assets/js/main.8f31c7f6.js new file mode 100644 index 00000000000..4e0ce117a5b --- /dev/null +++ b/assets/js/main.8f31c7f6.js @@ -0,0 +1,2 @@ +/*! For license information please see main.8f31c7f6.js.LICENSE.txt */ +(self.webpackChunkdoc_besu=self.webpackChunkdoc_besu||[]).push([[8792],{35947:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});n(96540);var r=n(53259),o=n.n(r),a=n(84054);const i={"0145acbf":[()=>n.e(8235).then(n.bind(n,90090)),"@site/docs/public-networks/concepts/data-storage-formats.md",90090],"01562474":[()=>n.e(9812).then(n.bind(n,49922)),"@site/docs/public-networks/how-to/develop/hardhat.md",49922],"02fd2e39":[()=>n.e(7936).then(n.bind(n,11210)),"@site/docs/private-networks/concepts/privacy/multi-tenancy.md",11210],"030f9ebf":[()=>Promise.all([n.e(1869),n.e(4656)]).then(n.bind(n,71920)),"@site/docs/private-networks/tutorials/privacy/index.md",71920],"06aa37f3":[()=>Promise.all([n.e(1869),n.e(3824)]).then(n.bind(n,35134)),"@site/docs/private-networks/reference/cli/options.md",35134],"0821166d":[()=>n.e(6627).then(n.bind(n,11575)),"@site/docs/public-networks/get-started/start-node.md",11575],"083d4b51":[()=>n.e(2622).then(n.bind(n,77384)),"@site/docs/public-networks/concepts/transactions/types.md",77384],"0c3b97c4":[()=>n.e(2682).then(n.bind(n,30604)),"@site/docs/private-networks/get-started/system-requirements.md",30604],"0ea635c0":[()=>n.e(6126).then(n.bind(n,54036)),"@site/docs/public-networks/concepts/genesis-file.md",54036],"0f663201":[()=>n.e(2331).then(n.bind(n,94007)),"@site/docs/public-networks/concepts/node-sync.md",94007],"12718c4a":[()=>n.e(8472).then(n.bind(n,39418)),"@site/docs/public-networks/concepts/parallel-transaction-execution.md",39418],"13034d1e":[()=>Promise.all([n.e(1869),n.e(5946)]).then(n.bind(n,61801)),"@site/docs/public-networks/how-to/configure-java/manage-memory.md",61801],"138e0e15":[()=>n.e(4921).then(n.t.bind(n,41597,19)),"@generated/@easyops-cn/docusaurus-search-local/default/__plugin.json",41597],13912882:[()=>n.e(3005).then(n.bind(n,25319)),"@site/docs/public-networks/how-to/upgrade-node.md",25319],"14eb3368":[()=>Promise.all([n.e(1869),n.e(6969)]).then(n.bind(n,79196)),"@theme/DocCategoryGeneratedIndexPage",79196],16350423:[()=>n.e(8251).then(n.bind(n,7302)),"@site/docs/public-networks/how-to/connect/configure-ports.md",7302],"166cf840":[()=>Promise.all([n.e(1869),n.e(609)]).then(n.bind(n,53798)),"@site/docs/private-networks/how-to/configure/consensus/ibft.md",53798],"1719a32c":[()=>n.e(2668).then(n.bind(n,81525)),"@site/docs/public-networks/how-to/monitor/understand-metrics.md",81525],17896441:[()=>Promise.all([n.e(1869),n.e(1721),n.e(8401)]).then(n.bind(n,29158)),"@theme/DocItem",29158],"1a4e3797":[()=>Promise.all([n.e(1869),n.e(2138)]).then(n.bind(n,41283)),"@theme/SearchPage",41283],"1a78f042":[()=>n.e(2460).then(n.bind(n,22556)),"@site/docs/public-networks/how-to/connect/manage-peers.md",22556],"1b2e0ee9":[()=>n.e(5430).then(n.bind(n,58087)),"@site/docs/public-networks/how-to/develop/client-libraries.md",58087],"1b5bfdea":[()=>n.e(903).then(n.bind(n,96349)),"@site/docs/public-networks/how-to/use-besu-api/index.md",96349],"1b73c7ba":[()=>n.e(973).then(n.bind(n,10512)),"@site/docs/private-networks/how-to/index.md",10512],"1df93b7f":[()=>n.e(4583).then(n.bind(n,52989)),"@site/src/pages/index.tsx",52989],"1f29a5e5":[()=>Promise.all([n.e(1869),n.e(2093)]).then(n.bind(n,76658)),"@site/docs/private-networks/tutorials/ibft/validators.md",76658],"2039806a":[()=>n.e(7698).then(n.bind(n,23207)),"@site/docs/public-networks/how-to/configure-ha/index.md",23207],"22dd74f7":[()=>n.e(1567).then(n.t.bind(n,55226,19)),"@generated/docusaurus-plugin-content-docs/default/p/index-466.json",55226],"248beabf":[()=>n.e(5305).then(n.bind(n,49444)),"@site/docs/public-networks/concepts/events-and-logs.md",49444],25537021:[()=>n.e(2618).then(n.bind(n,89040)),"@site/docs/public-networks/get-started/install/binary-distribution.md",89040],"2712d2e6":[()=>n.e(6948).then(n.bind(n,53800)),"@site/docs/private-networks/chatbot.mdx",53800],"27b89368":[()=>n.e(9022).then(n.bind(n,70298)),"@site/docs/private-networks/get-started/install/binary-distribution.md",70298],28249022:[()=>n.e(76).then(n.bind(n,75125)),"@site/docs/private-networks/concepts/index.md",75125],"297e0bb4":[()=>Promise.all([n.e(1869),n.e(2764)]).then(n.bind(n,13742)),"@site/docs/private-networks/tutorials/quickstart.md",13742],"2ce131d7":[()=>n.e(1023).then(n.bind(n,45021)),"@site/docs/public-networks/index.md",45021],"2de980e5":[()=>Promise.all([n.e(1869),n.e(5953)]).then(n.bind(n,61878)),"@site/docs/private-networks/how-to/monitor/opentelemetry.md",61878],"306048a3":[()=>n.e(1524).then(n.bind(n,2556)),"@site/docs/private-networks/how-to/monitor/chainlens.md",2556],"3234314a":[()=>n.e(8088).then(n.bind(n,58971)),"@site/docs/private-networks/how-to/use-privacy/access-private-transactions.md",58971],"356faa2b":[()=>n.e(7773).then(n.bind(n,72027)),"@site/docs/private-networks/concepts/node-sync-private.md",72027],"3624528b":[()=>n.e(1701).then(n.bind(n,95751)),"@site/docs/private-networks/how-to/send-transactions/index.md",95751],"3720c009":[()=>Promise.all([n.e(1869),n.e(4787)]).then(n.bind(n,30876)),"@theme/DocTagsListPage",30876],37906014:[()=>Promise.all([n.e(1869),n.e(5407)]).then(n.bind(n,92586)),"@site/docs/private-networks/get-started/install/run-docker-image.md",92586],"3868ebe2":[()=>n.e(6116).then(n.bind(n,10739)),"@site/docs/public-networks/concepts/proof-of-stake/index.md",10739],"3917f523":[()=>n.e(5769).then(n.bind(n,45988)),"@site/docs/public-networks/reference/genesis-items.md",45988],"3a4520c6":[()=>n.e(1275).then(n.bind(n,12317)),"@site/docs/private-networks/concepts/poa.md",12317],"3aaf4567":[()=>n.e(5398).then(n.bind(n,62629)),"@site/docs/public-networks/how-to/troubleshoot/peering.md",62629],"3b05cdc2":[()=>n.e(6563).then(n.bind(n,42260)),"@site/docs/private-networks/how-to/send-transactions/private-transactions.md",42260],"3e86fe35":[()=>n.e(1874).then(n.bind(n,81090)),"@site/docs/public-networks/how-to/monitor/logging.md",81090],"3f04f830":[()=>Promise.all([n.e(1869),n.e(1903)]).then(n.bind(n,49857)),"@site/docs/private-networks/tutorials/ibft/index.md",49857],"43d83ec4":[()=>n.e(4029).then(n.bind(n,95402)),"@site/docs/private-networks/how-to/deploy/ethstats.md",95402],"46ff6f7b":[()=>n.e(7738).then(n.bind(n,82557)),"@site/docs/public-networks/how-to/use-pow/mining.md",82557],"4a41aaaf":[()=>n.e(6436).then(n.bind(n,59043)),"@site/docs/private-networks/tutorials/contracts/index.md",59043],"4b21c0d5":[()=>n.e(6414).then(n.t.bind(n,913,19)),"@generated/docusaurus-plugin-content-docs/default/p/public-networks-concepts-f26.json",913],"4ba08559":[()=>Promise.all([n.e(1869),n.e(6410)]).then(n.bind(n,74060)),"@site/docs/public-networks/how-to/use-besu-api/rpc-pubsub.md",74060],"4d94bde1":[()=>Promise.all([n.e(1869),n.e(7208)]).then(n.bind(n,72935)),"@site/docs/private-networks/how-to/use-privacy/web3js-quorum.md",72935],"4f63be9c":[()=>n.e(9779).then(n.bind(n,74318)),"@site/docs/private-networks/how-to/use-privacy/flexible.md",74318],"5576e3f0":[()=>n.e(68).then(n.bind(n,88240)),"@site/docs/private-networks/get-started/install/index.md",88240],"55b6f436":[()=>n.e(6944).then(n.bind(n,32912)),"@site/docs/private-networks/how-to/configure/tls/client-and-server.md",32912],"563e4b8b":[()=>Promise.all([n.e(1869),n.e(2554)]).then(n.bind(n,64745)),"@site/docs/public-networks/how-to/use-engine-api.md",64745],"59af61a6":[()=>n.e(9174).then(n.t.bind(n,5332,19)),"@generated/docusaurus-plugin-content-docs/default/p/tags-b9f.json",5332],"5af5c663":[()=>n.e(8620).then(n.bind(n,1888)),"@site/docs/public-networks/reference/api/objects.md",1888],"5b178458":[()=>n.e(4717).then(n.bind(n,47122)),"@site/docs/private-networks/how-to/configure/bootnodes.md",47122],"5c820069":[()=>n.e(510).then(n.bind(n,41266)),"@site/docs/private-networks/tutorials/privacy/web3js-quorum.md",41266],"5e95c892":[()=>n.e(9647).then(n.bind(n,7121)),"@theme/DocsRoot",7121],"5e9f5e1a":[()=>Promise.resolve().then(n.bind(n,4784)),"@generated/docusaurus.config",4784],"5ec0198e":[()=>n.e(8715).then(n.bind(n,24211)),"@site/docs/private-networks/concepts/permissioning/index.md",24211],"608f60e4":[()=>n.e(9558).then(n.t.bind(n,62455,19)),"@generated/docusaurus-plugin-content-docs/default/p/public-networks-get-started-71a.json",62455],"66bba352":[()=>n.e(4546).then(n.bind(n,41830)),"@site/docs/public-networks/how-to/configure-java/pass-jvm-options.md",41830],"67359d90":[()=>n.e(5434).then(n.bind(n,53147)),"@site/docs/public-networks/how-to/use-besu-api/access-logs.md",53147],"680b46ee":[()=>n.e(9399).then(n.bind(n,5387)),"@site/docs/public-networks/how-to/monitor/index.md",5387],"6c6be066":[()=>n.e(4417).then(n.bind(n,98938)),"@site/docs/private-networks/how-to/send-transactions/revert-reason.md",98938],"6cafcc6f":[()=>n.e(1941).then(n.bind(n,6417)),"@site/docs/public-networks/tutorials/kubernetes.md",6417],"6d0a1147":[()=>Promise.all([n.e(1869),n.e(8573)]).then(n.bind(n,78368)),"@site/docs/public-networks/get-started/connect/testnet.md",78368],"6e493491":[()=>n.e(9670).then(n.bind(n,22876)),"@site/docs/private-networks/reference/plugin-api-interfaces.md",22876],"6ea682ce":[()=>Promise.all([n.e(1869),n.e(7019)]).then(n.bind(n,48296)),"@site/docs/private-networks/how-to/configure/consensus/clique.md",48296],"6ec2af53":[()=>n.e(6626).then(n.t.bind(n,29329,19)),"@generated/docusaurus-plugin-content-docs/default/p/private-networks-tutorials-fbb.json",29329],"6f6d3344":[()=>Promise.all([n.e(1869),n.e(1055)]).then(n.bind(n,44303)),"@site/docs/public-networks/tutorials/aws-node-runners.md",44303],"714c5be8":[()=>n.e(8814).then(n.bind(n,86670)),"@site/docs/private-networks/how-to/deploy/ansible.md",86670],"715197f0":[()=>n.e(5487).then(n.bind(n,16677)),"@site/docs/private-networks/concepts/privacy/private-transactions/processing.md",16677],"71635f7b":[()=>n.e(3108).then(n.bind(n,74449)),"@site/docs/private-networks/tutorials/kubernetes/production.md",74449],"71e3c29d":[()=>Promise.all([n.e(1869),n.e(4107)]).then(n.bind(n,95672)),"@site/docs/public-networks/reference/cli/options.md",95672],"76a5e22a":[()=>Promise.all([n.e(1869),n.e(132)]).then(n.bind(n,38456)),"@site/docs/public-networks/reference/api/index.md",38456],"79bb8117":[()=>n.e(8230).then(n.bind(n,78747)),"@site/docs/private-networks/tutorials/kubernetes/playground.md",78747],"7a44c711":[()=>n.e(1283).then(n.bind(n,48739)),"@site/docs/private-networks/concepts/privacy/privacy-groups.md",48739],"7b0f9452":[()=>Promise.all([n.e(1869),n.e(8344)]).then(n.bind(n,26985)),"@site/docs/private-networks/how-to/configure/free-gas.md",26985],"7b4961ca":[()=>n.e(3034).then(n.bind(n,56042)),"@site/docs/private-networks/how-to/monitor/splunk.md",56042],"7bb2e71b":[()=>Promise.all([n.e(1869),n.e(841)]).then(n.bind(n,42491)),"@site/docs/public-networks/get-started/connect/mainnet.md",42491],"7e9c70a7":[()=>n.e(8090).then(n.bind(n,47239)),"@site/docs/public-networks/concepts/network-and-chain-id.md",47239],"7ea61495":[()=>n.e(5327).then(n.bind(n,14311)),"@site/docs/global/postman.md",14311],"810074cd":[()=>n.e(3474).then(n.bind(n,60277)),"@site/docs/public-networks/how-to/connect/static-nodes.md",60277],"8161613e":[()=>n.e(7882).then(n.bind(n,38253)),"@site/docs/private-networks/how-to/monitor/index.md",38253],"84b35613":[()=>n.e(2559).then(n.bind(n,49475)),"@site/docs/public-networks/how-to/troubleshoot/performance.md",49475],87114070:[()=>n.e(1975).then(n.bind(n,16528)),"@site/docs/public-networks/concepts/node-keys.md",16528],"88771ea1":[()=>n.e(4265).then(n.bind(n,73703)),"@site/docs/private-networks/how-to/monitor/quorum-hibernate.md",73703],"887b6037":[()=>Promise.all([n.e(1869),n.e(4068)]).then(n.bind(n,22751)),"@site/docs/private-networks/how-to/configure/consensus/add-validators-without-voting.md",22751],"88996aea":[()=>n.e(7952).then(n.bind(n,77410)),"@site/docs/public-networks/how-to/configure-ha/sample-configuration.md",77410],"89f1fe89":[()=>Promise.all([n.e(1869),n.e(3623)]).then(n.bind(n,37971)),"@site/docs/private-networks/tutorials/kubernetes/charts.md",37971],"8a886138":[()=>n.e(4852).then(n.bind(n,93120)),"@site/docs/global/test_accounts.md",93120],"8b137bfa":[()=>Promise.all([n.e(1869),n.e(7045)]).then(n.bind(n,69261)),"@site/docs/public-networks/how-to/use-besu-api/json-rpc.md",69261],"8b8c93ab":[()=>n.e(2735).then(n.bind(n,25119)),"@site/docs/private-networks/how-to/configure/curves.md",25119],"8c0ee333":[()=>n.e(379).then(n.bind(n,45462)),"@site/docs/public-networks/how-to/configure-java/install-update-java.md",45462],"8d677f34":[()=>Promise.all([n.e(1869),n.e(2056)]).then(n.bind(n,70316)),"@site/docs/private-networks/tutorials/clique.md",70316],"8ef40281":[()=>Promise.all([n.e(1869),n.e(1703)]).then(n.bind(n,70682)),"@site/docs/private-networks/tutorials/qbft.md",70682],"91cde904":[()=>n.e(7650).then(n.bind(n,18538)),"@site/docs/public-networks/get-started/install/index.md",18538],"91f929bc":[()=>n.e(4340).then(n.bind(n,58088)),"@site/docs/public-networks/how-to/configure-java/java-flight-recorder.md",58088],"9213a1f9":[()=>n.e(5303).then(n.bind(n,87514)),"@site/docs/private-networks/how-to/use-privacy/privacy-groups.md",87514],"93e76459":[()=>n.e(23).then(n.bind(n,57695)),"@site/docs/private-networks/tutorials/privacy/quickstart.md",57695],"981fdc44":[()=>Promise.all([n.e(1869),n.e(4990)]).then(n.bind(n,1142)),"@site/docs/public-networks/get-started/system-requirements.md",1142],"99a5eb2e":[()=>n.e(4353).then(n.bind(n,52491)),"@site/docs/public-networks/reference/engine-api/objects.md",52491],"9a50decc":[()=>Promise.all([n.e(1869),n.e(8721)]).then(n.bind(n,1770)),"@site/docs/private-networks/tutorials/ethash.md",1770],"9bb932b9":[()=>n.e(1589).then(n.bind(n,65463)),"@site/docs/private-networks/how-to/deploy/cloud.md",65463],"9ffeb22a":[()=>Promise.all([n.e(1869),n.e(9334)]).then(n.bind(n,55847)),"@site/docs/private-networks/how-to/configure/consensus/index.md",55847],a0520cc7:[()=>n.e(5936).then(n.t.bind(n,24450,19)),"@generated/docusaurus-plugin-content-docs/default/p/public-networks-how-to-e7d.json",24450],a0f949fc:[()=>Promise.all([n.e(1869),n.e(8587)]).then(n.bind(n,48098)),"@site/docs/public-networks/reference/cli/subcommands.md",48098],a2bd30e6:[()=>n.e(6792).then(n.bind(n,37416)),"@site/docs/private-networks/concepts/permissioning/plugin.md",37416],a626427b:[()=>n.e(779).then(n.bind(n,70459)),"@site/docs/private-networks/tutorials/kubernetes/maintenance.md",70459],a7456010:[()=>n.e(1235).then(n.t.bind(n,88552,19)),"@generated/docusaurus-plugin-content-pages/default/__plugin.json",88552],a7bd4aaa:[()=>n.e(7098).then(n.bind(n,74532)),"@theme/DocVersionRoot",74532],a94703ab:[()=>Promise.all([n.e(1869),n.e(9048)]).then(n.bind(n,11377)),"@theme/DocRoot",11377],a99a03ac:[()=>n.e(9624).then(n.bind(n,95062)),"@site/docs/public-networks/concepts/transactions/validation.md",95062],aa0c6744:[()=>Promise.all([n.e(1869),n.e(6867)]).then(n.bind(n,44207)),"@site/docs/public-networks/tutorials/besu-teku-mainnet.md",44207],aa612600:[()=>Promise.all([n.e(1869),n.e(2778)]).then(n.bind(n,31204)),"@site/docs/public-networks/reference/evm-tool.md",31204],aba21aa0:[()=>n.e(5742).then(n.t.bind(n,27093,19)),"@generated/docusaurus-plugin-content-docs/default/__plugin.json",27093],af3555a6:[()=>Promise.all([n.e(1869),n.e(849)]).then(n.bind(n,14396)),"@site/docs/public-networks/how-to/use-besu-api/graphql.md",14396],b0eb7c42:[()=>n.e(5580).then(n.bind(n,2414)),"@site/docs/public-networks/concepts/node-clients.md",2414],b2d12fc2:[()=>n.e(7949).then(n.bind(n,37680)),"@site/docs/private-networks/how-to/monitor/loki.md",37680],b4b83649:[()=>n.e(4397).then(n.bind(n,4881)),"@site/docs/private-networks/get-started/start-node.md",4881],b5388cc7:[()=>Promise.all([n.e(1869),n.e(4872)]).then(n.bind(n,78814)),"@site/docs/private-networks/how-to/configure/consensus/qbft.md",78814],b5e9b728:[()=>n.e(4597).then(n.bind(n,61312)),"@site/docs/public-networks/how-to/troubleshoot/trace-transactions.md",61312],b658262b:[()=>n.e(1384).then(n.bind(n,93440)),"@site/docs/public-networks/get-started/install/run-docker-image.md",93440],b6b2f0db:[()=>n.e(499).then(n.bind(n,4522)),"@site/docs/public-networks/reference/trace-types.md",4522],b7759d8d:[()=>n.e(1625).then(n.bind(n,76552)),"@site/docs/private-networks/tutorials/kubernetes/index.md",76552],bbdbb161:[()=>n.e(8521).then(n.bind(n,95129)),"@site/docs/private-networks/reference/index.md",95129],bc60af12:[()=>n.e(9084).then(n.bind(n,29827)),"@site/docs/public-networks/get-started/connect/index.md",29827],bc69a950:[()=>Promise.all([n.e(1869),n.e(7044)]).then(n.bind(n,74198)),"@site/docs/public-networks/how-to/monitor/metrics.md",74198],bd3642f6:[()=>n.e(2868).then(n.bind(n,1634)),"@site/docs/private-networks/concepts/privacy/index.md",1634],bd4880eb:[()=>n.e(1572).then(n.bind(n,43573)),"@site/docs/private-networks/tutorials/contracts/interact.md",43573],bea70e21:[()=>n.e(7618).then(n.bind(n,57760)),"@site/docs/private-networks/tutorials/azure.md",57760],c029b5c7:[()=>n.e(7800).then(n.bind(n,9424)),"@site/docs/private-networks/how-to/backup.md",9424],c14ba340:[()=>n.e(1157).then(n.t.bind(n,63905,19)),"@generated/docusaurus-plugin-content-docs/default/p/tags-public-networks-947.json",63905],c41908c3:[()=>n.e(4978).then(n.bind(n,43816)),"@site/docs/private-networks/tutorials/privacy/multi-tenancy.md",43816],c48436f6:[()=>n.e(2593).then(n.bind(n,99307)),"@site/docs/public-networks/get-started/migrate-to-besu.md",99307],c69ab138:[()=>n.e(6048).then(n.bind(n,57425)),"@site/docs/private-networks/concepts/plugins.md",57425],c6a4c9bf:[()=>Promise.all([n.e(1869),n.e(7643)]).then(n.bind(n,60968)),"@site/docs/public-networks/how-to/use-besu-api/authenticate.md",60968],c6c17076:[()=>n.e(8546).then(n.bind(n,38057)),"@site/docs/private-networks/concepts/permissioning/onchain.md",38057],c8cab34c:[()=>n.e(2180).then(n.bind(n,11070)),"@site/docs/private-networks/reference/api/objects.md",11070],ca90dbf4:[()=>n.e(2080).then(n.bind(n,78769)),"@site/docs/public-networks/how-to/configure-besu/index.md",78769],cdbaa4c0:[()=>n.e(1207).then(n.bind(n,43422)),"@site/docs/public-networks/how-to/troubleshoot/evm-tool.md",43422],ce4c8b54:[()=>n.e(8077).then(n.bind(n,54662)),"@site/docs/private-networks/tutorials/kubernetes/cluster.md",54662],ce515f1b:[()=>n.e(3677).then(n.bind(n,27791)),"@site/docs/private-networks/tutorials/kubernetes/quorum-explorer.md",27791],cf53573e:[()=>n.e(7516).then(n.bind(n,80442)),"@site/docs/public-networks/chatbot.mdx",80442],d13d7343:[()=>n.e(9222).then(n.bind(n,67296)),"@site/docs/private-networks/how-to/send-transactions/concurrent-private-transactions.md",67296],d1f22a5a:[()=>n.e(6271).then(n.bind(n,24270)),"@site/docs/private-networks/how-to/use-permissioning/onchain.md",24270],d333d0b1:[()=>n.e(9489).then(n.t.bind(n,28504,19)),"@generated/docusaurus-plugin-content-docs/default/p/public-networks-reference-f0a.json",28504],d4c8fb26:[()=>n.e(5058).then(n.bind(n,10319)),"@site/docs/private-networks/how-to/monitor/elastic-stack.md",10319],d78c9adf:[()=>Promise.all([n.e(1869),n.e(6567)]).then(n.bind(n,98126)),"@site/docs/private-networks/reference/api/index.md",98126],d7914a50:[()=>n.e(2812).then(n.bind(n,18913)),"@site/docs/private-networks/tutorials/contracts/transfer-funds.md",18913],d7b72fb9:[()=>n.e(6162).then(n.bind(n,13628)),"@site/docs/public-networks/reference/projects-using-besu.md",13628],d86228ad:[()=>n.e(198).then(n.bind(n,38116)),"@site/docs/public-networks/concepts/proof-of-stake/attestations.md",38116],d94d9a73:[()=>n.e(3522).then(n.bind(n,92552)),"@site/docs/private-networks/concepts/privacy/private-transactions/index.md",92552],d97c1e1b:[()=>n.e(3691).then(n.t.bind(n,23485,19)),"@generated/docusaurus-plugin-content-docs/default/p/public-networks-tutorials-f66.json",23485],dbf86eb1:[()=>n.e(9291).then(n.bind(n,26036)),"@site/docs/private-networks/how-to/configure/contracts.md",26036],dd3e5b84:[()=>Promise.all([n.e(1869),n.e(7806)]).then(n.bind(n,37473)),"@site/docs/private-networks/tutorials/permissioning/index.md",37473],dd5955a1:[()=>Promise.all([n.e(1869),n.e(6493)]).then(n.bind(n,13571)),"@site/docs/public-networks/reference/engine-api/index.md",13571],dd900a84:[()=>n.e(2953).then(n.bind(n,94112)),"@site/docs/private-networks/how-to/use-privacy/tessera.md",94112],df203c0f:[()=>Promise.all([n.e(1869),n.e(4279)]).then(n.bind(n,30128)),"@theme/DocTagDocListPage",30128],dfe7f568:[()=>n.e(1816).then(n.bind(n,56847)),"@site/docs/public-networks/concepts/transactions/pool.md",56847],e0a6c7d4:[()=>n.e(8139).then(n.bind(n,83426)),"@site/docs/private-networks/reference/accounts-for-testing.md",83426],e12df8e0:[()=>n.e(8882).then(n.bind(n,42130)),"@site/docs/public-networks/reference/disclosure.md",42130],e1c9c46b:[()=>n.e(4567).then(n.bind(n,78242)),"@site/docs/public-networks/how-to/send-transactions.md",78242],e6ca27ec:[()=>n.e(231).then(n.bind(n,6345)),"@site/docs/private-networks/how-to/use-privacy/performance-best-practices.md",6345],e8e619e2:[()=>n.e(1178).then(n.bind(n,1788)),"@site/docs/private-networks/how-to/use-privacy/besu-extended.md",1788],ebb34ddb:[()=>n.e(9729).then(n.bind(n,54479)),"@site/docs/private-networks/index.md",54479],ec4f4180:[()=>Promise.all([n.e(1869),n.e(7372)]).then(n.bind(n,88764)),"@site/docs/public-networks/tutorials/besu-teku-testnet.md",88764],ecc00064:[()=>n.e(6384).then(n.bind(n,68060)),"@site/docs/private-networks/how-to/deploy/kubernetes.md",68060],edcc188d:[()=>n.e(389).then(n.bind(n,47096)),"@site/docs/private-networks/how-to/upgrade.md",47096],ee08513e:[()=>n.e(1639).then(n.bind(n,80870)),"@site/docs/public-networks/how-to/connect/specify-nat.md",80870],ee5d8003:[()=>Promise.all([n.e(1869),n.e(5193)]).then(n.bind(n,68952)),"@site/docs/private-networks/reference/cli/subcommands.md",68952],eeceef6b:[()=>Promise.all([n.e(1869),n.e(3164)]).then(n.bind(n,66181)),"@site/docs/public-networks/how-to/bonsai-limit-trie-logs.md",66181],f0bf0af8:[()=>n.e(1942).then(n.bind(n,77292)),"@site/docs/private-networks/how-to/configure/validators.md",77292],f2142509:[()=>n.e(8862).then(n.bind(n,30401)),"@site/docs/private-networks/tutorials/kubernetes/nat-manager.md",30401],f3adc880:[()=>n.e(7448).then(n.bind(n,87891)),"@site/docs/private-networks/how-to/use-permissioning/local.md",87891],f46f4beb:[()=>n.e(8182).then(n.t.bind(n,22229,19)),"@generated/docusaurus-plugin-content-docs/default/p/tags-private-networks-7cd.json",22229],f606b5b5:[()=>n.e(2077).then(n.bind(n,75583)),"@site/docs/private-networks/concepts/privacy/plugin.md",75583],f7a0d716:[()=>n.e(5003).then(n.t.bind(n,27215,19)),"@generated/docusaurus-plugin-content-docs/default/p/private-networks-get-started-bf1.json",27215],f834d930:[()=>n.e(8096).then(n.bind(n,71496)),"@site/docs/private-networks/how-to/use-privacy/eea-compliant.md",71496],fb537116:[()=>n.e(5954).then(n.bind(n,27660)),"@site/docs/public-networks/how-to/configure-besu/profile.md",27660],fb8ebc35:[()=>n.e(2587).then(n.bind(n,43538)),"@site/docs/private-networks/concepts/privacy/flexible-privacy.md",43538],fe1d21e1:[()=>n.e(3078).then(n.bind(n,30579)),"@site/docs/private-networks/how-to/use-privacy/sign-pmts.md",30579]};var s=n(74848);function l(e){let{error:t,retry:n,pastDelay:r}=e;return t?(0,s.jsxs)("div",{style:{textAlign:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"},children:[(0,s.jsx)("p",{children:String(t)}),(0,s.jsx)("div",{children:(0,s.jsx)("button",{type:"button",onClick:n,children:"Retry"})})]}):r?(0,s.jsx)("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"},children:(0,s.jsx)("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb",children:(0,s.jsxs)("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2",children:[(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsxs)("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0",children:[(0,s.jsx)("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),(0,s.jsx)("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})]}),(0,s.jsx)("circle",{cx:"22",cy:"22",r:"8",children:(0,s.jsx)("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"})})]})})}):null}var c=n(86921),u=n(53102);function d(e,t){if("*"===e)return o()({loading:l,loader:()=>n.e(2237).then(n.bind(n,82237)),modules:["@theme/NotFound"],webpack:()=>[82237],render(e,t){const n=e.default;return(0,s.jsx)(u.W,{value:{plugin:{name:"native",id:"default"}},children:(0,s.jsx)(n,{...t})})}});const r=a[`${e}-${t}`],d={},p=[],f=[],h=(0,c.A)(r);return Object.entries(h).forEach((e=>{let[t,n]=e;const r=i[n];r&&(d[t]=r[0],p.push(r[1]),f.push(r[2]))})),o().Map({loading:l,loader:d,modules:p,webpack:()=>f,render(t,n){const o=JSON.parse(JSON.stringify(r));Object.entries(t).forEach((t=>{let[n,r]=t;const a=r.default;if(!a)throw new Error(`The page component at ${e} doesn't have a default export. This makes it impossible to render anything. Consider default-exporting a React component.`);"object"!=typeof a&&"function"!=typeof a||Object.keys(r).filter((e=>"default"!==e)).forEach((e=>{a[e]=r[e]}));let i=o;const s=n.split(".");s.slice(0,-1).forEach((e=>{i=i[e]})),i[s[s.length-1]]=a}));const a=o.__comp;delete o.__comp;const i=o.__context;delete o.__context;const l=o.__props;return delete o.__props,(0,s.jsx)(u.W,{value:i,children:(0,s.jsx)(a,{...o,...l,...n})})}})}const p=[{path:"/search",component:d("/search","822"),exact:!0},{path:"/",component:d("/","e5f"),exact:!0},{path:"/",component:d("/","229"),routes:[{path:"/",component:d("/","959"),routes:[{path:"/tags",component:d("/tags","ce1"),exact:!0},{path:"/tags/private-networks",component:d("/tags/private-networks","e59"),exact:!0},{path:"/tags/public-networks",component:d("/tags/public-networks","41a"),exact:!0},{path:"/",component:d("/","e2a"),routes:[{path:"/global/postman",component:d("/global/postman","cdc"),exact:!0},{path:"/global/test_accounts",component:d("/global/test_accounts","192"),exact:!0},{path:"/private-networks",component:d("/private-networks","c9d"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/chatbot",component:d("/private-networks/chatbot","982"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/concepts",component:d("/private-networks/concepts","425"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/concepts/node-sync-private",component:d("/private-networks/concepts/node-sync-private","49a"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/concepts/permissioning",component:d("/private-networks/concepts/permissioning","56d"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/concepts/permissioning/onchain",component:d("/private-networks/concepts/permissioning/onchain","802"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/concepts/permissioning/plugin",component:d("/private-networks/concepts/permissioning/plugin","76b"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/concepts/plugins",component:d("/private-networks/concepts/plugins","611"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/concepts/poa",component:d("/private-networks/concepts/poa","ed3"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/concepts/privacy",component:d("/private-networks/concepts/privacy","3bc"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/concepts/privacy/flexible-privacy",component:d("/private-networks/concepts/privacy/flexible-privacy","08c"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/concepts/privacy/multi-tenancy",component:d("/private-networks/concepts/privacy/multi-tenancy","b24"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/concepts/privacy/plugin",component:d("/private-networks/concepts/privacy/plugin","e2d"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/concepts/privacy/privacy-groups",component:d("/private-networks/concepts/privacy/privacy-groups","714"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/concepts/privacy/private-transactions",component:d("/private-networks/concepts/privacy/private-transactions","615"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/concepts/privacy/private-transactions/processing",component:d("/private-networks/concepts/privacy/private-transactions/processing","cd9"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/get-started",component:d("/private-networks/get-started","ea9"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/get-started/install",component:d("/private-networks/get-started/install","934"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/get-started/install/binary-distribution",component:d("/private-networks/get-started/install/binary-distribution","7ce"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/get-started/install/run-docker-image",component:d("/private-networks/get-started/install/run-docker-image","d55"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/get-started/start-node",component:d("/private-networks/get-started/start-node","49d"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/get-started/system-requirements",component:d("/private-networks/get-started/system-requirements","fef"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to",component:d("/private-networks/how-to","751"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/backup",component:d("/private-networks/how-to/backup","870"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/configure/bootnodes",component:d("/private-networks/how-to/configure/bootnodes","3f9"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/configure/consensus",component:d("/private-networks/how-to/configure/consensus","797"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/configure/consensus/add-validators-without-voting",component:d("/private-networks/how-to/configure/consensus/add-validators-without-voting","ad6"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/configure/consensus/clique",component:d("/private-networks/how-to/configure/consensus/clique","e0b"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/configure/consensus/ibft",component:d("/private-networks/how-to/configure/consensus/ibft","0b8"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/configure/consensus/qbft",component:d("/private-networks/how-to/configure/consensus/qbft","6d9"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/configure/contracts",component:d("/private-networks/how-to/configure/contracts","4be"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/configure/curves",component:d("/private-networks/how-to/configure/curves","f90"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/configure/free-gas",component:d("/private-networks/how-to/configure/free-gas","1a4"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/configure/tls/client-and-server",component:d("/private-networks/how-to/configure/tls/client-and-server","334"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/configure/validators",component:d("/private-networks/how-to/configure/validators","63a"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/deploy/ansible",component:d("/private-networks/how-to/deploy/ansible","4be"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/deploy/cloud",component:d("/private-networks/how-to/deploy/cloud","4ba"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/deploy/ethstats",component:d("/private-networks/how-to/deploy/ethstats","0f3"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/deploy/kubernetes",component:d("/private-networks/how-to/deploy/kubernetes","d2a"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/monitor",component:d("/private-networks/how-to/monitor","29f"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/monitor/chainlens",component:d("/private-networks/how-to/monitor/chainlens","187"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/monitor/elastic-stack",component:d("/private-networks/how-to/monitor/elastic-stack","958"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/monitor/loki",component:d("/private-networks/how-to/monitor/loki","7a4"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/monitor/opentelemetry",component:d("/private-networks/how-to/monitor/opentelemetry","933"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/monitor/quorum-hibernate",component:d("/private-networks/how-to/monitor/quorum-hibernate","b39"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/monitor/splunk",component:d("/private-networks/how-to/monitor/splunk","681"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/send-transactions",component:d("/private-networks/how-to/send-transactions","b03"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/send-transactions/concurrent-private-transactions",component:d("/private-networks/how-to/send-transactions/concurrent-private-transactions","11d"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/send-transactions/private-transactions",component:d("/private-networks/how-to/send-transactions/private-transactions","0a9"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/send-transactions/revert-reason",component:d("/private-networks/how-to/send-transactions/revert-reason","09e"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/upgrade",component:d("/private-networks/how-to/upgrade","102"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/use-permissioning/local",component:d("/private-networks/how-to/use-permissioning/local","51a"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/use-permissioning/onchain",component:d("/private-networks/how-to/use-permissioning/onchain","247"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/use-privacy/access-private-transactions",component:d("/private-networks/how-to/use-privacy/access-private-transactions","ccd"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/use-privacy/besu-extended",component:d("/private-networks/how-to/use-privacy/besu-extended","8e5"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/use-privacy/eea-compliant",component:d("/private-networks/how-to/use-privacy/eea-compliant","302"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/use-privacy/flexible",component:d("/private-networks/how-to/use-privacy/flexible","8ad"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/use-privacy/performance-best-practices",component:d("/private-networks/how-to/use-privacy/performance-best-practices","326"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/use-privacy/privacy-groups",component:d("/private-networks/how-to/use-privacy/privacy-groups","9b3"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/use-privacy/sign-pmts",component:d("/private-networks/how-to/use-privacy/sign-pmts","ad1"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/use-privacy/tessera",component:d("/private-networks/how-to/use-privacy/tessera","b2f"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/how-to/use-privacy/web3js-quorum",component:d("/private-networks/how-to/use-privacy/web3js-quorum","101"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/reference",component:d("/private-networks/reference","50e"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/reference/accounts-for-testing",component:d("/private-networks/reference/accounts-for-testing","594"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/reference/api",component:d("/private-networks/reference/api","b00"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/reference/api/objects",component:d("/private-networks/reference/api/objects","5db"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/reference/cli/options",component:d("/private-networks/reference/cli/options","f3d"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/reference/cli/subcommands",component:d("/private-networks/reference/cli/subcommands","d4f"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/reference/plugin-api-interfaces",component:d("/private-networks/reference/plugin-api-interfaces","e4d"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials",component:d("/private-networks/tutorials","ec3"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/azure",component:d("/private-networks/tutorials/azure","8ee"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/clique",component:d("/private-networks/tutorials/clique","5a7"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/contracts",component:d("/private-networks/tutorials/contracts","01b"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/contracts/interact",component:d("/private-networks/tutorials/contracts/interact","a40"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/contracts/transfer-funds",component:d("/private-networks/tutorials/contracts/transfer-funds","473"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/ethash",component:d("/private-networks/tutorials/ethash","b53"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/ibft",component:d("/private-networks/tutorials/ibft","a3f"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/ibft/validators",component:d("/private-networks/tutorials/ibft/validators","305"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/kubernetes",component:d("/private-networks/tutorials/kubernetes","c6f"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/kubernetes/charts",component:d("/private-networks/tutorials/kubernetes/charts","ca1"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/kubernetes/cluster",component:d("/private-networks/tutorials/kubernetes/cluster","524"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/kubernetes/maintenance",component:d("/private-networks/tutorials/kubernetes/maintenance","3c7"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/kubernetes/nat-manager",component:d("/private-networks/tutorials/kubernetes/nat-manager","6a5"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/kubernetes/playground",component:d("/private-networks/tutorials/kubernetes/playground","f83"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/kubernetes/production",component:d("/private-networks/tutorials/kubernetes/production","fb0"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/kubernetes/quorum-explorer",component:d("/private-networks/tutorials/kubernetes/quorum-explorer","270"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/permissioning",component:d("/private-networks/tutorials/permissioning","a74"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/privacy",component:d("/private-networks/tutorials/privacy","bd4"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/privacy/multi-tenancy",component:d("/private-networks/tutorials/privacy/multi-tenancy","848"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/privacy/quickstart",component:d("/private-networks/tutorials/privacy/quickstart","f06"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/privacy/web3js-quorum",component:d("/private-networks/tutorials/privacy/web3js-quorum","9d6"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/qbft",component:d("/private-networks/tutorials/qbft","1b8"),exact:!0,sidebar:"privateDocSidebar"},{path:"/private-networks/tutorials/quickstart",component:d("/private-networks/tutorials/quickstart","4b8"),exact:!0,sidebar:"privateDocSidebar"},{path:"/public-networks",component:d("/public-networks","fed"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/chatbot",component:d("/public-networks/chatbot","75b"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/concepts",component:d("/public-networks/concepts","66b"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/concepts/data-storage-formats",component:d("/public-networks/concepts/data-storage-formats","4c8"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/concepts/events-and-logs",component:d("/public-networks/concepts/events-and-logs","25d"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/concepts/genesis-file",component:d("/public-networks/concepts/genesis-file","403"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/concepts/network-and-chain-id",component:d("/public-networks/concepts/network-and-chain-id","dbd"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/concepts/node-clients",component:d("/public-networks/concepts/node-clients","97a"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/concepts/node-keys",component:d("/public-networks/concepts/node-keys","068"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/concepts/node-sync",component:d("/public-networks/concepts/node-sync","2b3"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/concepts/parallel-transaction-execution",component:d("/public-networks/concepts/parallel-transaction-execution","09b"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/concepts/proof-of-stake",component:d("/public-networks/concepts/proof-of-stake","771"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/concepts/proof-of-stake/attestations",component:d("/public-networks/concepts/proof-of-stake/attestations","e62"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/concepts/transactions/pool",component:d("/public-networks/concepts/transactions/pool","21f"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/concepts/transactions/types",component:d("/public-networks/concepts/transactions/types","907"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/concepts/transactions/validation",component:d("/public-networks/concepts/transactions/validation","a12"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/get-started",component:d("/public-networks/get-started","bcb"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/get-started/connect",component:d("/public-networks/get-started/connect","26d"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/get-started/connect/mainnet",component:d("/public-networks/get-started/connect/mainnet","012"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/get-started/connect/testnet",component:d("/public-networks/get-started/connect/testnet","412"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/get-started/install",component:d("/public-networks/get-started/install","fb1"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/get-started/install/binary-distribution",component:d("/public-networks/get-started/install/binary-distribution","444"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/get-started/install/run-docker-image",component:d("/public-networks/get-started/install/run-docker-image","0f8"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/get-started/migrate-to-besu",component:d("/public-networks/get-started/migrate-to-besu","a8e"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/get-started/start-node",component:d("/public-networks/get-started/start-node","173"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/get-started/system-requirements",component:d("/public-networks/get-started/system-requirements","b28"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to",component:d("/public-networks/how-to","daf"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/bonsai-limit-trie-logs",component:d("/public-networks/how-to/bonsai-limit-trie-logs","ee5"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/configure-besu",component:d("/public-networks/how-to/configure-besu","8ba"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/configure-besu/profile",component:d("/public-networks/how-to/configure-besu/profile","8a9"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/configure-ha",component:d("/public-networks/how-to/configure-ha","700"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/configure-ha/sample-configuration",component:d("/public-networks/how-to/configure-ha/sample-configuration","d12"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/configure-java/install-update-java",component:d("/public-networks/how-to/configure-java/install-update-java","c5f"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/configure-java/java-flight-recorder",component:d("/public-networks/how-to/configure-java/java-flight-recorder","636"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/configure-java/manage-memory",component:d("/public-networks/how-to/configure-java/manage-memory","6d8"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/configure-java/pass-jvm-options",component:d("/public-networks/how-to/configure-java/pass-jvm-options","880"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/connect/configure-ports",component:d("/public-networks/how-to/connect/configure-ports","90f"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/connect/manage-peers",component:d("/public-networks/how-to/connect/manage-peers","d1b"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/connect/specify-nat",component:d("/public-networks/how-to/connect/specify-nat","e53"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/connect/static-nodes",component:d("/public-networks/how-to/connect/static-nodes","34e"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/develop/client-libraries",component:d("/public-networks/how-to/develop/client-libraries","7c6"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/develop/hardhat",component:d("/public-networks/how-to/develop/hardhat","bdf"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/monitor",component:d("/public-networks/how-to/monitor","021"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/monitor/logging",component:d("/public-networks/how-to/monitor/logging","f51"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/monitor/metrics",component:d("/public-networks/how-to/monitor/metrics","f08"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/monitor/understand-metrics",component:d("/public-networks/how-to/monitor/understand-metrics","e35"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/send-transactions",component:d("/public-networks/how-to/send-transactions","9d5"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/troubleshoot/evm-tool",component:d("/public-networks/how-to/troubleshoot/evm-tool","812"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/troubleshoot/peering",component:d("/public-networks/how-to/troubleshoot/peering","553"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/troubleshoot/performance",component:d("/public-networks/how-to/troubleshoot/performance","cb5"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/troubleshoot/trace-transactions",component:d("/public-networks/how-to/troubleshoot/trace-transactions","0f9"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/upgrade-node",component:d("/public-networks/how-to/upgrade-node","bfc"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/use-besu-api",component:d("/public-networks/how-to/use-besu-api","a5c"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/use-besu-api/access-logs",component:d("/public-networks/how-to/use-besu-api/access-logs","263"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/use-besu-api/authenticate",component:d("/public-networks/how-to/use-besu-api/authenticate","9e1"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/use-besu-api/graphql",component:d("/public-networks/how-to/use-besu-api/graphql","c3c"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/use-besu-api/json-rpc",component:d("/public-networks/how-to/use-besu-api/json-rpc","670"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/use-besu-api/rpc-pubsub",component:d("/public-networks/how-to/use-besu-api/rpc-pubsub","f53"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/use-engine-api",component:d("/public-networks/how-to/use-engine-api","682"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/how-to/use-pow/mining",component:d("/public-networks/how-to/use-pow/mining","afd"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/reference",component:d("/public-networks/reference","236"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/reference/api",component:d("/public-networks/reference/api","40f"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/reference/api/objects",component:d("/public-networks/reference/api/objects","97b"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/reference/cli/options",component:d("/public-networks/reference/cli/options","81d"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/reference/cli/subcommands",component:d("/public-networks/reference/cli/subcommands","068"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/reference/disclosure",component:d("/public-networks/reference/disclosure","0f5"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/reference/engine-api",component:d("/public-networks/reference/engine-api","6e9"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/reference/engine-api/objects",component:d("/public-networks/reference/engine-api/objects","cbb"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/reference/evm-tool",component:d("/public-networks/reference/evm-tool","93a"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/reference/genesis-items",component:d("/public-networks/reference/genesis-items","b74"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/reference/projects-using-besu",component:d("/public-networks/reference/projects-using-besu","9a4"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/reference/trace-types",component:d("/public-networks/reference/trace-types","fb0"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/tutorials",component:d("/public-networks/tutorials","bf7"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/tutorials/aws-node-runners",component:d("/public-networks/tutorials/aws-node-runners","c99"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/tutorials/besu-teku-mainnet",component:d("/public-networks/tutorials/besu-teku-mainnet","190"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/tutorials/besu-teku-testnet",component:d("/public-networks/tutorials/besu-teku-testnet","dcd"),exact:!0,sidebar:"publicDocSidebar"},{path:"/public-networks/tutorials/kubernetes",component:d("/public-networks/tutorials/kubernetes","711"),exact:!0,sidebar:"publicDocSidebar"}]}]}]},{path:"*",component:d("*")}]},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>a,x:()=>i});var r=n(96540),o=n(74848);const a=r.createContext(!1);function i(e){let{children:t}=e;const[n,i]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{i(!0)}),[]),(0,o.jsx)(a.Provider,{value:n,children:t})}},77815:(e,t,n)=>{"use strict";var r=n(96540),o=n(5338),a=n(80545),i=n(54625),s=n(4784),l=n(38193);const c=[n(10119),n(26134),n(76294),n(51043),n(31911)];var u=n(35947),d=n(56347),p=n(22831),f=n(74848);function h(e){let{children:t}=e;return(0,f.jsx)(f.Fragment,{children:t})}var b=n(5260),m=n(44586),g=n(86025),v=n(6342),y=n(1003),w=n(32131),k=n(14090);const x="default";var S=n(70440),_=n(41463);function E(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,m.A)(),r=(0,w.o)(),o=n[e].htmlLang,a=e=>e.replace("-","_");return(0,f.jsxs)(b.A,{children:[Object.entries(n).map((e=>{let[t,{htmlLang:n}]=e;return(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:n},t)})),(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,f.jsx)("meta",{property:"og:locale",content:a(o)}),Object.values(n).filter((e=>o!==e.htmlLang)).map((e=>(0,f.jsx)("meta",{property:"og:locale:alternate",content:a(e.htmlLang)},`meta-og-${e.htmlLang}`)))]})}function C(e){let{permalink:t}=e;const{siteConfig:{url:n}}=(0,m.A)(),r=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,m.A)(),{pathname:r}=(0,d.zy)();return e+(0,S.Ks)((0,g.Ay)(r),{trailingSlash:n,baseUrl:t})}(),o=t?`${n}${t}`:r;return(0,f.jsxs)(b.A,{children:[(0,f.jsx)("meta",{property:"og:url",content:o}),(0,f.jsx)("link",{rel:"canonical",href:o})]})}function T(){const{i18n:{currentLocale:e}}=(0,m.A)(),{metadata:t,image:n}=(0,v.p)();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(b.A,{children:[(0,f.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,f.jsx)("body",{className:k.w})]}),n&&(0,f.jsx)(y.be,{image:n}),(0,f.jsx)(C,{}),(0,f.jsx)(E,{}),(0,f.jsx)(_.A,{tag:x,locale:e}),(0,f.jsx)(b.A,{children:t.map(((e,t)=>(0,f.jsx)("meta",{...e},t)))})]})}const A=new Map;var D=n(6125),j=n(26988),P=n(205);function L(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r=t.default?.[e]??t[e];return r?.(...n)}));return()=>o.forEach((e=>e?.()))}const O=function(e){let{children:t,location:n,previousLocation:r}=e;return(0,P.A)((()=>{r!==n&&(!function(e){let{location:t,previousLocation:n}=e;if(!n)return;const r=t.pathname===n.pathname,o=t.hash===n.hash,a=t.search===n.search;if(r&&o&&!a)return;const{hash:i}=t;if(i){const e=decodeURIComponent(i.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:n,previousLocation:r}),L("onRouteDidUpdate",{previousLocation:r,location:n}))}),[r,n]),t};function N(e){const t=Array.from(new Set([e,decodeURI(e)])).map((e=>(0,p.u)(u.A,e))).flat();return Promise.all(t.map((e=>e.route.component.preload?.())))}class R extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=l.A.canUseDOM?L("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=L("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),N(n.pathname).then((()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})})).catch((e=>{console.warn(e),window.location.reload()})),!1}render(){const{children:e,location:t}=this.props;return(0,f.jsx)(O,{previousLocation:this.previousLocation,location:t,children:(0,f.jsx)(d.qh,{location:t,render:()=>e})})}}const I=R,F="__docusaurus-base-url-issue-banner-container",M="__docusaurus-base-url-issue-banner",B="__docusaurus-base-url-issue-banner-suggestion-container";function z(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '${F}';\n var bannerHtml = ${JSON.stringify(function(e){return`\n
\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = ${e} ${"/"===e?" (default value)":""}

\n

We suggest trying baseUrl =

\n
\n`}(e)).replace(/{let{route:t}=e;return!0===t.exact})))return A.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return A.set(e.pathname,t),{...e,pathname:t}}((0,d.zy)());return(0,f.jsx)(I,{location:e,children:W})}function K(){return(0,f.jsx)(V.A,{children:(0,f.jsx)(j.l,{children:(0,f.jsxs)(D.x,{children:[(0,f.jsxs)(h,{children:[(0,f.jsx)(H,{}),(0,f.jsx)(T,{}),(0,f.jsx)(U,{}),(0,f.jsx)(G,{})]}),(0,f.jsx)(q,{})]})})})}var Y=n(84054);const Z=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise(((t,n)=>{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const o=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;o?.appendChild(r)}))}:function(e){return new Promise(((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)}))};var X=n(86921);const J=new Set,ee=new Set,te=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,ne={prefetch:e=>{if(!(e=>!te()&&!ee.has(e)&&!J.has(e))(e))return!1;J.add(e);const t=(0,p.u)(u.A,e).flatMap((e=>{return t=e.route.path,Object.entries(Y).filter((e=>{let[n]=e;return n.replace(/-[^-]+$/,"")===t})).flatMap((e=>{let[,t]=e;return Object.values((0,X.A)(t))}));var t}));return Promise.all(t.map((e=>{const t=n.gca(e);return t&&!t.includes("undefined")?Z(t).catch((()=>{})):Promise.resolve()})))},preload:e=>!!(e=>!te()&&!ee.has(e))(e)&&(ee.add(e),N(e))},re=Object.freeze(ne);function oe(e){let{children:t}=e;return"hash"===s.default.future.experimental_router?(0,f.jsx)(i.I9,{children:t}):(0,f.jsx)(i.Kd,{children:t})}const ae=Boolean(!0);if(l.A.canUseDOM){window.docusaurus=re;const e=document.getElementById("__docusaurus"),t=(0,f.jsx)(a.vd,{children:(0,f.jsx)(oe,{children:(0,f.jsx)(K,{})})}),n=(e,t)=>{console.error("Docusaurus React Root onRecoverableError:",e,t)},i=()=>{if(window.docusaurusRoot)window.docusaurusRoot.render(t);else if(ae)window.docusaurusRoot=o.hydrateRoot(e,t,{onRecoverableError:n});else{const r=o.createRoot(e,{onRecoverableError:n});r.render(t),window.docusaurusRoot=r}};N(window.location.pathname).then((()=>{(0,r.startTransition)(i)}))}},26988:(e,t,n)=>{"use strict";n.d(t,{o:()=>d,l:()=>p});var r=n(96540),o=n(4784);const a=JSON.parse('{"docusaurus-plugin-content-docs":{"default":{"path":"/","versions":[{"name":"current","label":"Next","isLast":true,"path":"/","mainDocId":"public-networks/index","docs":[{"id":"global/postman","path":"/global/postman"},{"id":"global/test_accounts","path":"/global/test_accounts"},{"id":"private-networks/chatbot","path":"/private-networks/chatbot","sidebar":"privateDocSidebar"},{"id":"private-networks/concepts/index","path":"/private-networks/concepts/","sidebar":"privateDocSidebar"},{"id":"private-networks/concepts/node-sync-private","path":"/private-networks/concepts/node-sync-private","sidebar":"privateDocSidebar"},{"id":"private-networks/concepts/permissioning/index","path":"/private-networks/concepts/permissioning/","sidebar":"privateDocSidebar"},{"id":"private-networks/concepts/permissioning/onchain","path":"/private-networks/concepts/permissioning/onchain","sidebar":"privateDocSidebar"},{"id":"private-networks/concepts/permissioning/plugin","path":"/private-networks/concepts/permissioning/plugin","sidebar":"privateDocSidebar"},{"id":"private-networks/concepts/plugins","path":"/private-networks/concepts/plugins","sidebar":"privateDocSidebar"},{"id":"private-networks/concepts/poa","path":"/private-networks/concepts/poa","sidebar":"privateDocSidebar"},{"id":"private-networks/concepts/privacy/flexible-privacy","path":"/private-networks/concepts/privacy/flexible-privacy","sidebar":"privateDocSidebar"},{"id":"private-networks/concepts/privacy/index","path":"/private-networks/concepts/privacy/","sidebar":"privateDocSidebar"},{"id":"private-networks/concepts/privacy/multi-tenancy","path":"/private-networks/concepts/privacy/multi-tenancy","sidebar":"privateDocSidebar"},{"id":"private-networks/concepts/privacy/plugin","path":"/private-networks/concepts/privacy/plugin","sidebar":"privateDocSidebar"},{"id":"private-networks/concepts/privacy/privacy-groups","path":"/private-networks/concepts/privacy/privacy-groups","sidebar":"privateDocSidebar"},{"id":"private-networks/concepts/privacy/private-transactions/index","path":"/private-networks/concepts/privacy/private-transactions/","sidebar":"privateDocSidebar"},{"id":"private-networks/concepts/privacy/private-transactions/processing","path":"/private-networks/concepts/privacy/private-transactions/processing","sidebar":"privateDocSidebar"},{"id":"private-networks/get-started/install/binary-distribution","path":"/private-networks/get-started/install/binary-distribution","sidebar":"privateDocSidebar"},{"id":"private-networks/get-started/install/index","path":"/private-networks/get-started/install/","sidebar":"privateDocSidebar"},{"id":"private-networks/get-started/install/run-docker-image","path":"/private-networks/get-started/install/run-docker-image","sidebar":"privateDocSidebar"},{"id":"private-networks/get-started/start-node","path":"/private-networks/get-started/start-node","sidebar":"privateDocSidebar"},{"id":"private-networks/get-started/system-requirements","path":"/private-networks/get-started/system-requirements","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/backup","path":"/private-networks/how-to/backup","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/configure/bootnodes","path":"/private-networks/how-to/configure/bootnodes","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/configure/consensus/add-validators-without-voting","path":"/private-networks/how-to/configure/consensus/add-validators-without-voting","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/configure/consensus/clique","path":"/private-networks/how-to/configure/consensus/clique","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/configure/consensus/ibft","path":"/private-networks/how-to/configure/consensus/ibft","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/configure/consensus/index","path":"/private-networks/how-to/configure/consensus/","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/configure/consensus/qbft","path":"/private-networks/how-to/configure/consensus/qbft","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/configure/contracts","path":"/private-networks/how-to/configure/contracts","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/configure/curves","path":"/private-networks/how-to/configure/curves","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/configure/free-gas","path":"/private-networks/how-to/configure/free-gas","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/configure/tls/client-and-server","path":"/private-networks/how-to/configure/tls/client-and-server","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/configure/validators","path":"/private-networks/how-to/configure/validators","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/deploy/ansible","path":"/private-networks/how-to/deploy/ansible","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/deploy/cloud","path":"/private-networks/how-to/deploy/cloud","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/deploy/ethstats","path":"/private-networks/how-to/deploy/ethstats","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/deploy/kubernetes","path":"/private-networks/how-to/deploy/kubernetes","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/index","path":"/private-networks/how-to/","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/monitor/chainlens","path":"/private-networks/how-to/monitor/chainlens","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/monitor/elastic-stack","path":"/private-networks/how-to/monitor/elastic-stack","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/monitor/index","path":"/private-networks/how-to/monitor/","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/monitor/loki","path":"/private-networks/how-to/monitor/loki","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/monitor/opentelemetry","path":"/private-networks/how-to/monitor/opentelemetry","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/monitor/quorum-hibernate","path":"/private-networks/how-to/monitor/quorum-hibernate","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/monitor/splunk","path":"/private-networks/how-to/monitor/splunk","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/send-transactions/concurrent-private-transactions","path":"/private-networks/how-to/send-transactions/concurrent-private-transactions","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/send-transactions/index","path":"/private-networks/how-to/send-transactions/","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/send-transactions/private-transactions","path":"/private-networks/how-to/send-transactions/private-transactions","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/send-transactions/revert-reason","path":"/private-networks/how-to/send-transactions/revert-reason","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/upgrade","path":"/private-networks/how-to/upgrade","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/use-permissioning/local","path":"/private-networks/how-to/use-permissioning/local","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/use-permissioning/onchain","path":"/private-networks/how-to/use-permissioning/onchain","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/use-privacy/access-private-transactions","path":"/private-networks/how-to/use-privacy/access-private-transactions","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/use-privacy/besu-extended","path":"/private-networks/how-to/use-privacy/besu-extended","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/use-privacy/eea-compliant","path":"/private-networks/how-to/use-privacy/eea-compliant","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/use-privacy/flexible","path":"/private-networks/how-to/use-privacy/flexible","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/use-privacy/performance-best-practices","path":"/private-networks/how-to/use-privacy/performance-best-practices","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/use-privacy/privacy-groups","path":"/private-networks/how-to/use-privacy/privacy-groups","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/use-privacy/sign-pmts","path":"/private-networks/how-to/use-privacy/sign-pmts","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/use-privacy/tessera","path":"/private-networks/how-to/use-privacy/tessera","sidebar":"privateDocSidebar"},{"id":"private-networks/how-to/use-privacy/web3js-quorum","path":"/private-networks/how-to/use-privacy/web3js-quorum","sidebar":"privateDocSidebar"},{"id":"private-networks/index","path":"/private-networks/","sidebar":"privateDocSidebar"},{"id":"private-networks/reference/accounts-for-testing","path":"/private-networks/reference/accounts-for-testing","sidebar":"privateDocSidebar"},{"id":"private-networks/reference/api/index","path":"/private-networks/reference/api/","sidebar":"privateDocSidebar"},{"id":"private-networks/reference/api/objects","path":"/private-networks/reference/api/objects","sidebar":"privateDocSidebar"},{"id":"private-networks/reference/cli/options","path":"/private-networks/reference/cli/options","sidebar":"privateDocSidebar"},{"id":"private-networks/reference/cli/subcommands","path":"/private-networks/reference/cli/subcommands","sidebar":"privateDocSidebar"},{"id":"private-networks/reference/index","path":"/private-networks/reference/","sidebar":"privateDocSidebar"},{"id":"private-networks/reference/plugin-api-interfaces","path":"/private-networks/reference/plugin-api-interfaces","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/azure","path":"/private-networks/tutorials/azure","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/clique","path":"/private-networks/tutorials/clique","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/contracts/index","path":"/private-networks/tutorials/contracts/","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/contracts/interact","path":"/private-networks/tutorials/contracts/interact","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/contracts/transfer-funds","path":"/private-networks/tutorials/contracts/transfer-funds","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/ethash","path":"/private-networks/tutorials/ethash","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/ibft/index","path":"/private-networks/tutorials/ibft/","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/ibft/validators","path":"/private-networks/tutorials/ibft/validators","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/kubernetes/charts","path":"/private-networks/tutorials/kubernetes/charts","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/kubernetes/cluster","path":"/private-networks/tutorials/kubernetes/cluster","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/kubernetes/index","path":"/private-networks/tutorials/kubernetes/","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/kubernetes/maintenance","path":"/private-networks/tutorials/kubernetes/maintenance","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/kubernetes/nat-manager","path":"/private-networks/tutorials/kubernetes/nat-manager","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/kubernetes/playground","path":"/private-networks/tutorials/kubernetes/playground","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/kubernetes/production","path":"/private-networks/tutorials/kubernetes/production","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/kubernetes/quorum-explorer","path":"/private-networks/tutorials/kubernetes/quorum-explorer","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/permissioning/index","path":"/private-networks/tutorials/permissioning/","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/privacy/index","path":"/private-networks/tutorials/privacy/","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/privacy/multi-tenancy","path":"/private-networks/tutorials/privacy/multi-tenancy","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/privacy/quickstart","path":"/private-networks/tutorials/privacy/quickstart","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/privacy/web3js-quorum","path":"/private-networks/tutorials/privacy/web3js-quorum","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/qbft","path":"/private-networks/tutorials/qbft","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials/quickstart","path":"/private-networks/tutorials/quickstart","sidebar":"privateDocSidebar"},{"id":"public-networks/chatbot","path":"/public-networks/chatbot","sidebar":"publicDocSidebar"},{"id":"public-networks/concepts/data-storage-formats","path":"/public-networks/concepts/data-storage-formats","sidebar":"publicDocSidebar"},{"id":"public-networks/concepts/events-and-logs","path":"/public-networks/concepts/events-and-logs","sidebar":"publicDocSidebar"},{"id":"public-networks/concepts/genesis-file","path":"/public-networks/concepts/genesis-file","sidebar":"publicDocSidebar"},{"id":"public-networks/concepts/network-and-chain-id","path":"/public-networks/concepts/network-and-chain-id","sidebar":"publicDocSidebar"},{"id":"public-networks/concepts/node-clients","path":"/public-networks/concepts/node-clients","sidebar":"publicDocSidebar"},{"id":"public-networks/concepts/node-keys","path":"/public-networks/concepts/node-keys","sidebar":"publicDocSidebar"},{"id":"public-networks/concepts/node-sync","path":"/public-networks/concepts/node-sync","sidebar":"publicDocSidebar"},{"id":"public-networks/concepts/parallel-transaction-execution","path":"/public-networks/concepts/parallel-transaction-execution","sidebar":"publicDocSidebar"},{"id":"public-networks/concepts/proof-of-stake/attestations","path":"/public-networks/concepts/proof-of-stake/attestations","sidebar":"publicDocSidebar"},{"id":"public-networks/concepts/proof-of-stake/index","path":"/public-networks/concepts/proof-of-stake/","sidebar":"publicDocSidebar"},{"id":"public-networks/concepts/transactions/pool","path":"/public-networks/concepts/transactions/pool","sidebar":"publicDocSidebar"},{"id":"public-networks/concepts/transactions/types","path":"/public-networks/concepts/transactions/types","sidebar":"publicDocSidebar"},{"id":"public-networks/concepts/transactions/validation","path":"/public-networks/concepts/transactions/validation","sidebar":"publicDocSidebar"},{"id":"public-networks/get-started/connect/index","path":"/public-networks/get-started/connect/","sidebar":"publicDocSidebar"},{"id":"public-networks/get-started/connect/mainnet","path":"/public-networks/get-started/connect/mainnet","sidebar":"publicDocSidebar"},{"id":"public-networks/get-started/connect/testnet","path":"/public-networks/get-started/connect/testnet","sidebar":"publicDocSidebar"},{"id":"public-networks/get-started/install/binary-distribution","path":"/public-networks/get-started/install/binary-distribution","sidebar":"publicDocSidebar"},{"id":"public-networks/get-started/install/index","path":"/public-networks/get-started/install/","sidebar":"publicDocSidebar"},{"id":"public-networks/get-started/install/run-docker-image","path":"/public-networks/get-started/install/run-docker-image","sidebar":"publicDocSidebar"},{"id":"public-networks/get-started/migrate-to-besu","path":"/public-networks/get-started/migrate-to-besu","sidebar":"publicDocSidebar"},{"id":"public-networks/get-started/start-node","path":"/public-networks/get-started/start-node","sidebar":"publicDocSidebar"},{"id":"public-networks/get-started/system-requirements","path":"/public-networks/get-started/system-requirements","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/bonsai-limit-trie-logs","path":"/public-networks/how-to/bonsai-limit-trie-logs","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/configure-besu/index","path":"/public-networks/how-to/configure-besu/","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/configure-besu/profile","path":"/public-networks/how-to/configure-besu/profile","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/configure-ha/index","path":"/public-networks/how-to/configure-ha/","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/configure-ha/sample-configuration","path":"/public-networks/how-to/configure-ha/sample-configuration","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/configure-java/install-update-java","path":"/public-networks/how-to/configure-java/install-update-java","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/configure-java/java-flight-recorder","path":"/public-networks/how-to/configure-java/java-flight-recorder","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/configure-java/manage-memory","path":"/public-networks/how-to/configure-java/manage-memory","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/configure-java/pass-jvm-options","path":"/public-networks/how-to/configure-java/pass-jvm-options","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/connect/configure-ports","path":"/public-networks/how-to/connect/configure-ports","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/connect/manage-peers","path":"/public-networks/how-to/connect/manage-peers","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/connect/specify-nat","path":"/public-networks/how-to/connect/specify-nat","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/connect/static-nodes","path":"/public-networks/how-to/connect/static-nodes","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/develop/client-libraries","path":"/public-networks/how-to/develop/client-libraries","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/develop/hardhat","path":"/public-networks/how-to/develop/hardhat","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/monitor/index","path":"/public-networks/how-to/monitor/","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/monitor/logging","path":"/public-networks/how-to/monitor/logging","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/monitor/metrics","path":"/public-networks/how-to/monitor/metrics","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/monitor/understand-metrics","path":"/public-networks/how-to/monitor/understand-metrics","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/send-transactions","path":"/public-networks/how-to/send-transactions","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/troubleshoot/evm-tool","path":"/public-networks/how-to/troubleshoot/evm-tool","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/troubleshoot/peering","path":"/public-networks/how-to/troubleshoot/peering","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/troubleshoot/performance","path":"/public-networks/how-to/troubleshoot/performance","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/troubleshoot/trace-transactions","path":"/public-networks/how-to/troubleshoot/trace-transactions","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/upgrade-node","path":"/public-networks/how-to/upgrade-node","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/use-besu-api/access-logs","path":"/public-networks/how-to/use-besu-api/access-logs","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/use-besu-api/authenticate","path":"/public-networks/how-to/use-besu-api/authenticate","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/use-besu-api/graphql","path":"/public-networks/how-to/use-besu-api/graphql","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/use-besu-api/index","path":"/public-networks/how-to/use-besu-api/","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/use-besu-api/json-rpc","path":"/public-networks/how-to/use-besu-api/json-rpc","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/use-besu-api/rpc-pubsub","path":"/public-networks/how-to/use-besu-api/rpc-pubsub","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/use-engine-api","path":"/public-networks/how-to/use-engine-api","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to/use-pow/mining","path":"/public-networks/how-to/use-pow/mining","sidebar":"publicDocSidebar"},{"id":"public-networks/index","path":"/public-networks/","sidebar":"publicDocSidebar"},{"id":"public-networks/reference/api/index","path":"/public-networks/reference/api/","sidebar":"publicDocSidebar"},{"id":"public-networks/reference/api/objects","path":"/public-networks/reference/api/objects","sidebar":"publicDocSidebar"},{"id":"public-networks/reference/cli/options","path":"/public-networks/reference/cli/options","sidebar":"publicDocSidebar"},{"id":"public-networks/reference/cli/subcommands","path":"/public-networks/reference/cli/subcommands","sidebar":"publicDocSidebar"},{"id":"public-networks/reference/disclosure","path":"/public-networks/reference/disclosure","sidebar":"publicDocSidebar"},{"id":"public-networks/reference/engine-api/index","path":"/public-networks/reference/engine-api/","sidebar":"publicDocSidebar"},{"id":"public-networks/reference/engine-api/objects","path":"/public-networks/reference/engine-api/objects","sidebar":"publicDocSidebar"},{"id":"public-networks/reference/evm-tool","path":"/public-networks/reference/evm-tool","sidebar":"publicDocSidebar"},{"id":"public-networks/reference/genesis-items","path":"/public-networks/reference/genesis-items","sidebar":"publicDocSidebar"},{"id":"public-networks/reference/projects-using-besu","path":"/public-networks/reference/projects-using-besu","sidebar":"publicDocSidebar"},{"id":"public-networks/reference/trace-types","path":"/public-networks/reference/trace-types","sidebar":"publicDocSidebar"},{"id":"public-networks/tutorials/aws-node-runners","path":"/public-networks/tutorials/aws-node-runners","sidebar":"publicDocSidebar"},{"id":"public-networks/tutorials/besu-teku-mainnet","path":"/public-networks/tutorials/besu-teku-mainnet","sidebar":"publicDocSidebar"},{"id":"public-networks/tutorials/besu-teku-testnet","path":"/public-networks/tutorials/besu-teku-testnet","sidebar":"publicDocSidebar"},{"id":"public-networks/tutorials/kubernetes","path":"/public-networks/tutorials/kubernetes","sidebar":"publicDocSidebar"},{"id":"/public-networks/get-started","path":"/public-networks/get-started","sidebar":"publicDocSidebar"},{"id":"public-networks/how-to","path":"/public-networks/how-to","sidebar":"publicDocSidebar"},{"id":"public-networks/concepts","path":"/public-networks/concepts","sidebar":"publicDocSidebar"},{"id":"public-networks/tutorials","path":"/public-networks/tutorials","sidebar":"publicDocSidebar"},{"id":"public-networks/reference","path":"/public-networks/reference","sidebar":"publicDocSidebar"},{"id":"/private-networks/get-started","path":"/private-networks/get-started","sidebar":"privateDocSidebar"},{"id":"private-networks/tutorials","path":"/private-networks/tutorials","sidebar":"privateDocSidebar"}],"draftIds":[],"sidebars":{"publicDocSidebar":{"link":{"path":"/public-networks/","label":"Introduction"}},"privateDocSidebar":{"link":{"path":"/private-networks/","label":"Introduction"}}}}],"breadcrumbs":false}},"docusaurus-plugin-google-gtag":{"default":{"trackingID":["G-KD07N5GM2B"],"anonymizeIP":true,"id":"default"}},"docusaurus-plugin-google-tag-manager":{"default":{"containerId":"GTM-THG37T4","id":"default"}}}'),i=JSON.parse('{"defaultLocale":"en","locales":["en"],"path":"i18n","currentLocale":"en","localeConfigs":{"en":{"label":"English","direction":"ltr","htmlLang":"en","calendar":"gregory","path":"en"}}}');var s=n(22654);const l=JSON.parse('{"docusaurusVersion":"3.5.2","siteVersion":"0.0.0","pluginVersions":{"docusaurus-plugin-content-docs":{"type":"package","name":"@docusaurus/plugin-content-docs","version":"3.5.2"},"docusaurus-plugin-content-blog":{"type":"package","name":"@docusaurus/plugin-content-blog","version":"3.5.2"},"docusaurus-plugin-content-pages":{"type":"package","name":"@docusaurus/plugin-content-pages","version":"3.5.2"},"docusaurus-plugin-sitemap":{"type":"package","name":"@docusaurus/plugin-sitemap","version":"3.5.2"},"docusaurus-theme-classic":{"type":"package","name":"@docusaurus/theme-classic","version":"3.5.2"},"docusaurus-plugin-google-gtag":{"type":"package","name":"@docusaurus/plugin-google-gtag","version":"3.5.2"},"docusaurus-plugin-google-tag-manager":{"type":"package","name":"@docusaurus/plugin-google-tag-manager","version":"3.5.2"},"docusaurus-plugin-client-redirects":{"type":"package","name":"@docusaurus/plugin-client-redirects","version":"3.5.2"},"@easyops-cn/docusaurus-search-local":{"type":"package","name":"@easyops-cn/docusaurus-search-local","version":"0.44.5"},"docusaurus-theme-mermaid":{"type":"package","name":"@docusaurus/theme-mermaid","version":"3.5.2"}}}');var c=n(74848);const u={siteConfig:o.default,siteMetadata:l,globalData:a,i18n:i,codeTranslations:s},d=r.createContext(u);function p(e){let{children:t}=e;return(0,c.jsx)(d.Provider,{value:u,children:t})}},67489:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(96540),o=n(38193),a=n(5260),i=n(70440),s=n(59504),l=n(53102),c=n(74848);function u(e){let{error:t,tryAgain:n}=e;return(0,c.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"flex-start",minHeight:"100vh",width:"100%",maxWidth:"80ch",fontSize:"20px",margin:"0 auto",padding:"1rem"},children:[(0,c.jsx)("h1",{style:{fontSize:"3rem"},children:"This page crashed"}),(0,c.jsx)("button",{type:"button",onClick:n,style:{margin:"1rem 0",fontSize:"2rem",cursor:"pointer",borderRadius:20,padding:"1rem"},children:"Try again"}),(0,c.jsx)(d,{error:t})]})}function d(e){let{error:t}=e;const n=(0,i.rA)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,c.jsx)("p",{style:{whiteSpace:"pre-wrap"},children:n})}function p(e){let{children:t}=e;return(0,c.jsx)(l.W,{value:{plugin:{name:"docusaurus-core-error-boundary",id:"default"}},children:t})}function f(e){let{error:t,tryAgain:n}=e;return(0,c.jsx)(p,{children:(0,c.jsxs)(b,{fallback:()=>(0,c.jsx)(u,{error:t,tryAgain:n}),children:[(0,c.jsx)(a.A,{children:(0,c.jsx)("title",{children:"Page Error"})}),(0,c.jsx)(s.A,{children:(0,c.jsx)(u,{error:t,tryAgain:n})})]})})}const h=e=>(0,c.jsx)(f,{...e});class b extends r.Component{constructor(e){super(e),this.state={error:null}}componentDidCatch(e){o.A.canUseDOM&&this.setState({error:e})}render(){const{children:e}=this.props,{error:t}=this.state;if(t){const e={error:t,tryAgain:()=>this.setState({error:null})};return(this.props.fallback??h)(e)}return e??null}}},38193:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r="undefined"!=typeof window&&"document"in window&&"createElement"in window.document,o={canUseDOM:r,canUseEventListeners:r&&("addEventListener"in window||"attachEvent"in window),canUseIntersectionObserver:r&&"IntersectionObserver"in window,canUseViewport:r&&"screen"in window}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(96540);var r=n(80545),o=n(74848);function a(e){return(0,o.jsx)(r.mg,{...e})}},28774:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(96540),o=n(54625),a=n(70440),i=n(44586),s=n(16654),l=n(38193),c=n(63427),u=n(86025),d=n(74848);function p(e,t){let{isNavLink:n,to:p,href:f,activeClassName:h,isActive:b,"data-noBrokenLinkCheck":m,autoAddBaseUrl:g=!0,...v}=e;const{siteConfig:y}=(0,i.A)(),{trailingSlash:w,baseUrl:k}=y,x=y.future.experimental_router,{withBaseUrl:S}=(0,u.hH)(),_=(0,c.A)(),E=(0,r.useRef)(null);(0,r.useImperativeHandle)(t,(()=>E.current));const C=p||f;const T=(0,s.A)(C),A=C?.replace("pathname://","");let D=void 0!==A?(j=A,g&&(e=>e.startsWith("/"))(j)?S(j):j):void 0;var j;"hash"===x&&D?.startsWith("./")&&(D=D?.slice(1)),D&&T&&(D=(0,a.Ks)(D,{trailingSlash:w,baseUrl:k}));const P=(0,r.useRef)(!1),L=n?o.k2:o.N_,O=l.A.canUseIntersectionObserver,N=(0,r.useRef)(),R=()=>{P.current||null==D||(window.docusaurus.preload(D),P.current=!0)};(0,r.useEffect)((()=>(!O&&T&&l.A.canUseDOM&&null!=D&&window.docusaurus.prefetch(D),()=>{O&&N.current&&N.current.disconnect()})),[N,D,O,T]);const I=D?.startsWith("#")??!1,F=!v.target||"_self"===v.target,M=!D||!T||!F||I&&"hash"!==x;m||!I&&M||_.collectLink(D),v.id&&_.collectAnchor(v.id);const B={};return M?(0,d.jsx)("a",{ref:E,href:D,...C&&!T&&{target:"_blank",rel:"noopener noreferrer"},...v,...B}):(0,d.jsx)(L,{...v,onMouseEnter:R,onTouchStart:R,innerRef:e=>{E.current=e,O&&e&&T&&(N.current=new window.IntersectionObserver((t=>{t.forEach((t=>{e===t.target&&(t.isIntersecting||t.intersectionRatio>0)&&(N.current.unobserve(e),N.current.disconnect(),null!=D&&window.docusaurus.prefetch(D))}))})),N.current.observe(e))},to:D,...n&&{isActive:b,activeClassName:h},...B})}const f=r.forwardRef(p)},21312:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,T:()=>l});var r=n(96540),o=n(74848);function a(e,t){const n=e.split(/(\{\w+\})/).map(((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e}));return n.some((e=>(0,r.isValidElement)(e)))?n.map(((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e)).filter((e=>""!==e)):n.join("")}var i=n(22654);function s(e){let{id:t,message:n}=e;if(void 0===t&&void 0===n)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return i[t??n]??n??t}function l(e,t){let{message:n,id:r}=e;return a(s({message:n,id:r}),t)}function c(e){let{children:t,id:n,values:r}=e;if(t&&"string"!=typeof t)throw console.warn("Illegal children",t),new Error("The Docusaurus component only accept simple string values");const i=s({message:t,id:n});return(0,o.jsx)(o.Fragment,{children:a(i,r)})}},17065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},16654:(e,t,n)=>{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>o,z:()=>r})},86025:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>s,hH:()=>i});var r=n(96540),o=n(44586),a=n(16654);function i(){const{siteConfig:e}=(0,o.A)(),{baseUrl:t,url:n}=e,i=e.future.experimental_router,s=(0,r.useCallback)(((e,r)=>function(e){let{siteUrl:t,baseUrl:n,url:r,options:{forcePrependBaseUrl:o=!1,absolute:i=!1}={},router:s}=e;if(!r||r.startsWith("#")||(0,a.z)(r))return r;if("hash"===s)return r.startsWith("/")?`.${r}`:`./${r}`;if(o)return n+r.replace(/^\//,"");if(r===n.replace(/\/$/,""))return n;const l=r.startsWith(n)?r:n+r.replace(/^\//,"");return i?t+l:l}({siteUrl:n,baseUrl:t,url:e,options:r,router:i})),[n,t,i]);return{withBaseUrl:s}}function s(e,t){void 0===t&&(t={});const{withBaseUrl:n}=i();return n(e,t)}},63427:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(96540);n(74848);const o=r.createContext({collectAnchor:()=>{},collectLink:()=>{}}),a=()=>(0,r.useContext)(o);function i(){return a()}},44586:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540),o=n(26988);function a(){return(0,r.useContext)(o.o)}},92303:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(96540),o=n(6125);function a(){return(0,r.useContext)(o.o)}},205:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96540);const o=n(38193).A.canUseDOM?r.useLayoutEffect:r.useEffect},86921:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=e=>"object"==typeof e&&!!e&&Object.keys(e).length>0;function o(e){const t={};return function e(n,o){Object.entries(n).forEach((n=>{let[a,i]=n;const s=o?`${o}.${a}`:a;r(i)?e(i,s):t[s]=i}))}(e),t}},53102:(e,t,n)=>{"use strict";n.d(t,{W:()=>i,o:()=>a});var r=n(96540),o=n(74848);const a=r.createContext(null);function i(e){let{children:t,value:n}=e;const i=r.useContext(a),s=(0,r.useMemo)((()=>function(e){let{parent:t,value:n}=e;if(!t){if(!n)throw new Error("Unexpected: no Docusaurus route context found");if(!("plugin"in n))throw new Error("Unexpected: Docusaurus topmost route context has no `plugin` attribute");return n}const r={...t.data,...n?.data};return{plugin:t.plugin,data:r}}({parent:i,value:n})),[i,n]);return(0,o.jsx)(a.Provider,{value:s,children:t})}},53886:(e,t,n)=>{"use strict";n.d(t,{VQ:()=>m,XK:()=>y,g1:()=>v});var r=n(96540),o=n(44070),a=n(17065),i=n(6342),s=n(70679),l=n(89532),c=n(74848);const u=e=>`docs-preferred-version-${e}`,d={save:(e,t,n)=>{(0,s.Wf)(u(e),{persistence:t}).set(n)},read:(e,t)=>(0,s.Wf)(u(e),{persistence:t}).get(),clear:(e,t)=>{(0,s.Wf)(u(e),{persistence:t}).del()}},p=e=>Object.fromEntries(e.map((e=>[e,{preferredVersionName:null}])));const f=r.createContext(null);function h(){const e=(0,o.Gy)(),t=(0,i.p)().docs.versionPersistence,n=(0,r.useMemo)((()=>Object.keys(e)),[e]),[a,s]=(0,r.useState)((()=>p(n)));(0,r.useEffect)((()=>{s(function(e){let{pluginIds:t,versionPersistence:n,allDocsData:r}=e;function o(e){const t=d.read(e,n);return r[e].versions.some((e=>e.name===t))?{preferredVersionName:t}:(d.clear(e,n),{preferredVersionName:null})}return Object.fromEntries(t.map((e=>[e,o(e)])))}({allDocsData:e,versionPersistence:t,pluginIds:n}))}),[e,t,n]);return[a,(0,r.useMemo)((()=>({savePreferredVersion:function(e,n){d.save(e,t,n),s((t=>({...t,[e]:{preferredVersionName:n}})))}})),[t])]}function b(e){let{children:t}=e;const n=h();return(0,c.jsx)(f.Provider,{value:n,children:t})}function m(e){let{children:t}=e;return(0,c.jsx)(b,{children:t})}function g(){const e=(0,r.useContext)(f);if(!e)throw new l.dV("DocsPreferredVersionContextProvider");return e}function v(e){void 0===e&&(e=a.W);const t=(0,o.ht)(e),[n,i]=g(),{preferredVersionName:s}=n[e];return{preferredVersion:t.versions.find((e=>e.name===s))??null,savePreferredVersionName:(0,r.useCallback)((t=>{i.savePreferredVersion(e,t)}),[i,e])}}function y(){const e=(0,o.Gy)(),[t]=g();function n(n){const r=e[n],{preferredVersionName:o}=t[n];return r.versions.find((e=>e.name===o))??null}const r=Object.keys(e);return Object.fromEntries(r.map((e=>[e,n(e)])))}},82565:(e,t,n)=>{"use strict";n.d(t,{k:()=>a,v:()=>i});var r=n(44070),o=n(53886);function a(e,t){return`docs-${e}-${t}`}function i(){const e=(0,r.Gy)(),t=(0,r.gk)(),n=(0,o.XK)();return[...Object.keys(e).map((function(r){const o=t?.activePlugin.pluginId===r?t.activeVersion:void 0,i=n[r],s=e[r].versions.find((e=>e.isLast));return a(r,(o??i??s).name)}))]}},60609:(e,t,n)=>{"use strict";n.d(t,{V:()=>l,t:()=>c});var r=n(96540),o=n(89532),a=n(74848);const i=Symbol("EmptyContext"),s=r.createContext(i);function l(e){let{children:t,name:n,items:o}=e;const i=(0,r.useMemo)((()=>n&&o?{name:n,items:o}:null),[n,o]);return(0,a.jsx)(s.Provider,{value:i,children:t})}function c(){const e=(0,r.useContext)(s);if(e===i)throw new o.dV("DocsSidebarProvider");return e}},26972:(e,t,n)=>{"use strict";n.d(t,{$S:()=>h,B5:()=>E,Nr:()=>f,OF:()=>k,QB:()=>_,Vd:()=>x,Y:()=>y,cC:()=>p,d1:()=>C,fW:()=>S,w8:()=>g});var r=n(96540),o=n(56347),a=n(22831),i=n(44070),s=n(99169),l=n(31682),c=n(53886),u=n(23025),d=n(60609);function p(e){const t=(0,u.r)();if(!e)return;const n=t.docs[e];if(!n)throw new Error(`no version doc found by id=${e}`);return n}function f(e){return"link"!==e.type||e.unlisted?"category"===e.type?function(e){if(e.href&&!e.linkUnlisted)return e.href;for(const t of e.items){const e=f(t);if(e)return e}}(e):void 0:e.href}function h(){const{pathname:e}=(0,o.zy)(),t=(0,d.t)();if(!t)throw new Error("Unexpected: cant find current sidebar in context");const n=w({sidebarItems:t.items,pathname:e,onlyCategories:!0}).slice(-1)[0];if(!n)throw new Error(`${e} is not associated with a category. useCurrentSidebarCategory() should only be used on category index pages.`);return n}const b=(e,t)=>void 0!==e&&(0,s.ys)(e,t),m=(e,t)=>e.some((e=>g(e,t)));function g(e,t){return"link"===e.type?b(e.href,t):"category"===e.type&&(b(e.href,t)||m(e.items,t))}function v(e,t){switch(e.type){case"category":return g(e,t)||e.items.some((e=>v(e,t)));case"link":return!e.unlisted||g(e,t);default:return!0}}function y(e,t){return(0,r.useMemo)((()=>e.filter((e=>v(e,t)))),[e,t])}function w(e){let{sidebarItems:t,pathname:n,onlyCategories:r=!1}=e;const o=[];return function e(t){for(const a of t)if("category"===a.type&&((0,s.ys)(a.href,n)||e(a.items))||"link"===a.type&&(0,s.ys)(a.href,n)){return r&&"category"!==a.type||o.unshift(a),!0}return!1}(t),o}function k(){const e=(0,d.t)(),{pathname:t}=(0,o.zy)(),n=(0,i.vT)()?.pluginData.breadcrumbs;return!1!==n&&e?w({sidebarItems:e.items,pathname:t}):null}function x(e){const{activeVersion:t}=(0,i.zK)(e),{preferredVersion:n}=(0,c.g1)(e),o=(0,i.r7)(e);return(0,r.useMemo)((()=>(0,l.sb)([t,n,o].filter(Boolean))),[t,n,o])}function S(e,t){const n=x(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.sidebars?Object.entries(e.sidebars):[])),r=t.find((t=>t[0]===e));if(!r)throw new Error(`Can't find any sidebar with id "${e}" in version${n.length>1?"s":""} ${n.map((e=>e.name)).join(", ")}".\nAvailable sidebar ids are:\n- ${t.map((e=>e[0])).join("\n- ")}`);return r[1]}),[e,n])}function _(e,t){const n=x(t);return(0,r.useMemo)((()=>{const t=n.flatMap((e=>e.docs)),r=t.find((t=>t.id===e));if(!r){if(n.flatMap((e=>e.draftIds)).includes(e))return null;throw new Error(`Couldn't find any doc with id "${e}" in version${n.length>1?"s":""} "${n.map((e=>e.name)).join(", ")}".\nAvailable doc ids are:\n- ${(0,l.sb)(t.map((e=>e.id))).join("\n- ")}`)}return r}),[e,n])}function E(e){let{route:t}=e;const n=(0,o.zy)(),r=(0,u.r)(),i=t.routes,s=i.find((e=>(0,o.B6)(n.pathname,e)));if(!s)return null;const l=s.sidebar,c=l?r.docsSidebars[l]:void 0;return{docElement:(0,a.v)(i),sidebarName:l,sidebarItems:c}}function C(e){return e.filter((e=>!("category"===e.type||"link"===e.type)||!!f(e)))}},23025:(e,t,n)=>{"use strict";n.d(t,{n:()=>s,r:()=>l});var r=n(96540),o=n(89532),a=n(74848);const i=r.createContext(null);function s(e){let{children:t,version:n}=e;return(0,a.jsx)(i.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(i);if(null===e)throw new o.dV("DocsVersionProvider");return e}},44070:(e,t,n)=>{"use strict";n.d(t,{d1:()=>u.d1,zK:()=>w,vT:()=>m,gk:()=>g,Gy:()=>h,$S:()=>u.$S,HW:()=>k,vF:()=>p.v,ht:()=>b,g1:()=>d.g1,r7:()=>y,jh:()=>v});var r=n(56347),o=n(44586),a=n(17065);function i(e,t){void 0===t&&(t={});const n=function(){const{globalData:e}=(0,o.A)();return e}()[e];if(!n&&t.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin.`);return n}const s=e=>e.versions.find((e=>e.isLast));function l(e,t){return[...e.versions].sort(((e,t)=>e.path===t.path?0:e.path.includes(t.path)?-1:t.path.includes(e.path)?1:0)).find((e=>!!(0,r.B6)(t,{path:e.path,exact:!1,strict:!1})))}function c(e,t){const n=l(e,t),o=n?.docs.find((e=>!!(0,r.B6)(t,{path:e.path,exact:!0,strict:!1})));return{activeVersion:n,activeDoc:o,alternateDocVersions:o?function(t){const n={};return e.versions.forEach((e=>{e.docs.forEach((r=>{r.id===t&&(n[e.name]=r)}))})),n}(o.id):{}}}var u=n(26972),d=n(53886),p=n(82565);const f={},h=()=>i("docusaurus-plugin-content-docs")??f,b=e=>{try{return function(e,t,n){void 0===t&&(t=a.W),void 0===n&&(n={});const r=i(e),o=r?.[t];if(!o&&n.failfast)throw new Error(`Docusaurus plugin global data not found for "${e}" plugin with id "${t}".`);return o}("docusaurus-plugin-content-docs",e,{failfast:!0})}catch(t){throw new Error("You are using a feature of the Docusaurus docs plugin, but this plugin does not seem to be enabled"+("Default"===e?"":` (pluginId=${e}`),{cause:t})}};function m(e){void 0===e&&(e={});const t=h(),{pathname:n}=(0,r.zy)();return function(e,t,n){void 0===n&&(n={});const o=Object.entries(e).sort(((e,t)=>t[1].path.localeCompare(e[1].path))).find((e=>{let[,n]=e;return!!(0,r.B6)(t,{path:n.path,exact:!1,strict:!1})})),a=o?{pluginId:o[0],pluginData:o[1]}:void 0;if(!a&&n.failfast)throw new Error(`Can't find active docs plugin for "${t}" pathname, while it was expected to be found. Maybe you tried to use a docs feature that can only be used on a docs-related page? Existing docs plugin paths are: ${Object.values(e).map((e=>e.path)).join(", ")}`);return a}(t,n,e)}function g(e){void 0===e&&(e={});const t=m(e),{pathname:n}=(0,r.zy)();if(!t)return;return{activePlugin:t,activeVersion:l(t.pluginData,n)}}function v(e){return b(e).versions}function y(e){const t=b(e);return s(t)}function w(e){const t=b(e),{pathname:n}=(0,r.zy)();return c(t,n)}function k(e){const t=b(e),{pathname:n}=(0,r.zy)();return function(e,t){const n=s(e);return{latestDocSuggestion:c(e,t).alternateDocVersions[n.name],latestVersionSuggestion:n}}(t,n)}},31911:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r});const r={onRouteDidUpdate(e){let{location:t,previousLocation:n}=e;!n||t.pathname===n.pathname&&t.search===n.search&&t.hash===n.hash||setTimeout((()=>{window.gtag("set","page_path",t.pathname+t.search+t.hash),window.gtag("event","page_view")}))}}},76294:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=n(5947),o=n.n(r);o().configure({showSpinner:!1});const a={onRouteUpdate(e){let{location:t,previousLocation:n}=e;if(n&&t.pathname!==n.pathname){const e=window.setTimeout((()=>{o().start()}),200);return()=>window.clearTimeout(e)}},onRouteDidUpdate(){o().done()}}},26134:(e,t,n)=>{"use strict";var r=n(78181),o=n(4784);!function(e){const{themeConfig:{prism:t}}=o.default,{additionalLanguages:r}=t;globalThis.Prism=e,r.forEach((e=>{"php"===e&&n(19700),n(73518)(`./prism-${e}`)})),delete globalThis.Prism}(r.My)},51107:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(96540);var r=n(18215),o=n(21312),a=n(6342),i=n(28774),s=n(63427);const l={anchorWithStickyNavbar:"anchorWithStickyNavbar_LWe7",anchorWithHideOnScrollNavbar:"anchorWithHideOnScrollNavbar_WYt5"};var c=n(74848);function u(e){let{as:t,id:n,...u}=e;const d=(0,s.A)(),{navbar:{hideOnScroll:p}}=(0,a.p)();if("h1"===t||!n)return(0,c.jsx)(t,{...u,id:void 0});d.collectAnchor(n);const f=(0,o.T)({id:"theme.common.headingLinkTitle",message:"Direct link to {heading}",description:"Title for link to heading"},{heading:"string"==typeof u.children?u.children:n});return(0,c.jsxs)(t,{...u,className:(0,r.A)("anchor",p?l.anchorWithHideOnScrollNavbar:l.anchorWithStickyNavbar,u.className),id:n,children:[u.children,(0,c.jsx)(i.A,{className:"hash-link",to:`#${n}`,"aria-label":f,title:f,children:"\u200b"})]})}},43186:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(96540);const r={iconExternalLink:"iconExternalLink_nPIU"};var o=n(74848);function a(e){let{width:t=13.5,height:n=13.5}=e;return(0,o.jsx)("svg",{width:t,height:n,"aria-hidden":"true",viewBox:"0 0 24 24",className:r.iconExternalLink,children:(0,o.jsx)("path",{fill:"currentColor",d:"M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"})})}},59504:(e,t,n)=>{"use strict";n.d(t,{A:()=>Lt});var r=n(96540),o=n(18215),a=n(67489),i=n(1003),s=n(56347),l=n(21312),c=n(75062),u=n(74848);const d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){const e=(0,r.useRef)(null),{action:t}=(0,s.W6)(),n=(0,r.useCallback)((e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&p(t)}),[]);return(0,c.$)((n=>{let{location:r}=n;e.current&&!r.hash&&"PUSH"===t&&p(e.current)})),{containerRef:e,onClick:n}}const h=(0,l.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function b(e){const t=e.children??h,{containerRef:n,onClick:r}=f();return(0,u.jsx)("div",{ref:n,role:"region","aria-label":h,children:(0,u.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var m=n(17559),g=n(14090);const v={skipToContent:"skipToContent_fXgn"};function y(){return(0,u.jsx)(b,{className:v.skipToContent})}var w=n(6342),k=n(65041);function x(e){let{width:t=21,height:n=21,color:r="currentColor",strokeWidth:o=1.2,className:a,...i}=e;return(0,u.jsx)("svg",{viewBox:"0 0 15 15",width:t,height:n,...i,children:(0,u.jsx)("g",{stroke:r,strokeWidth:o,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const S={closeButton:"closeButton_CVFx"};function _(e){return(0,u.jsx)("button",{type:"button","aria-label":(0,l.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,o.A)("clean-btn close",S.closeButton,e.className),children:(0,u.jsx)(x,{width:14,height:14,strokeWidth:3.1})})}const E={content:"content_knG7"};function C(e){const{announcementBar:t}=(0,w.p)(),{content:n}=t;return(0,u.jsx)("div",{...e,className:(0,o.A)(E.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const T={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function A(){const{announcementBar:e}=(0,w.p)(),{isActive:t,close:n}=(0,k.M)();if(!t)return null;const{backgroundColor:r,textColor:o,isCloseable:a}=e;return(0,u.jsxs)("div",{className:T.announcementBar,style:{backgroundColor:r,color:o},role:"banner",children:[a&&(0,u.jsx)("div",{className:T.announcementBarPlaceholder}),(0,u.jsx)(C,{className:T.announcementBarContent}),a&&(0,u.jsx)(_,{onClick:n,className:T.announcementBarClose})]})}var D=n(22069),j=n(23104);var P=n(89532),L=n(75600);const O=r.createContext(null);function N(e){let{children:t}=e;const n=function(){const e=(0,D.M)(),t=(0,L.YL)(),[n,o]=(0,r.useState)(!1),a=null!==t.component,i=(0,P.ZC)(a);return(0,r.useEffect)((()=>{a&&!i&&o(!0)}),[a,i]),(0,r.useEffect)((()=>{a?e.shown||o(!0):o(!1)}),[e.shown,a]),(0,r.useMemo)((()=>[n,o]),[n])}();return(0,u.jsx)(O.Provider,{value:n,children:t})}function R(e){if(e.component){const t=e.component;return(0,u.jsx)(t,{...e.props})}}function I(){const e=(0,r.useContext)(O);if(!e)throw new P.dV("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,o=(0,r.useCallback)((()=>n(!1)),[n]),a=(0,L.YL)();return(0,r.useMemo)((()=>({shown:t,hide:o,content:R(a)})),[o,a,t])}function F(e){let{header:t,primaryMenu:n,secondaryMenu:r}=e;const{shown:a}=I();return(0,u.jsxs)("div",{className:"navbar-sidebar",children:[t,(0,u.jsxs)("div",{className:(0,o.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":a}),children:[(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:n}),(0,u.jsx)("div",{className:"navbar-sidebar__item menu",children:r})]})]})}var M=n(95293),B=n(92303);function z(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function $(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}const U={toggle:"toggle_vylO",toggleButton:"toggleButton_gllP",darkToggleIcon:"darkToggleIcon_wfgR",lightToggleIcon:"lightToggleIcon_pyhR",toggleButtonDisabled:"toggleButtonDisabled_aARS"};function H(e){let{className:t,buttonClassName:n,value:r,onChange:a}=e;const i=(0,B.A)(),s=(0,l.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the navbar color mode toggle"},{mode:"dark"===r?(0,l.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"}):(0,l.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"})});return(0,u.jsx)("div",{className:(0,o.A)(U.toggle,t),children:(0,u.jsxs)("button",{className:(0,o.A)("clean-btn",U.toggleButton,!i&&U.toggleButtonDisabled,n),type:"button",onClick:()=>a("dark"===r?"light":"dark"),disabled:!i,title:s,"aria-label":s,"aria-live":"polite",children:[(0,u.jsx)(z,{className:(0,o.A)(U.toggleIcon,U.lightToggleIcon)}),(0,u.jsx)($,{className:(0,o.A)(U.toggleIcon,U.darkToggleIcon)})]})})}const V=r.memo(H),Q={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function q(e){let{className:t}=e;const n=(0,w.p)().navbar.style,r=(0,w.p)().colorMode.disableSwitch,{colorMode:o,setColorMode:a}=(0,M.G)();return r?null:(0,u.jsx)(V,{className:t,buttonClassName:"dark"===n?Q.darkNavbarColorModeToggle:void 0,value:o,onChange:a})}var W=n(23465);function G(){return(0,u.jsx)(W.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function K(){const e=(0,D.M)();return(0,u.jsx)("button",{type:"button","aria-label":(0,l.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,u.jsx)(x,{color:"var(--ifm-color-emphasis-600)"})})}function Y(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(G,{}),(0,u.jsx)(q,{className:"margin-right--md"}),(0,u.jsx)(K,{})]})}var Z=n(28774),X=n(86025),J=n(16654);function ee(e,t){return void 0!==e&&void 0!==t&&new RegExp(e,"gi").test(t)}var te=n(43186);function ne(e){let{activeBasePath:t,activeBaseRegex:n,to:r,href:o,label:a,html:i,isDropdownLink:s,prependBaseUrlToHref:l,...c}=e;const d=(0,X.Ay)(r),p=(0,X.Ay)(t),f=(0,X.Ay)(o,{forcePrependBaseUrl:!0}),h=a&&o&&!(0,J.A)(o),b=i?{dangerouslySetInnerHTML:{__html:i}}:{children:(0,u.jsxs)(u.Fragment,{children:[a,h&&(0,u.jsx)(te.A,{...s&&{width:12,height:12}})]})};return o?(0,u.jsx)(Z.A,{href:l?f:o,...c,...b}):(0,u.jsx)(Z.A,{to:d,isNavLink:!0,...(t||n)&&{isActive:(e,t)=>n?ee(n,t.pathname):t.pathname.startsWith(p)},...c,...b})}function re(e){let{className:t,isDropdownItem:n=!1,...r}=e;const a=(0,u.jsx)(ne,{className:(0,o.A)(n?"dropdown__link":"navbar__item navbar__link",t),isDropdownLink:n,...r});return n?(0,u.jsx)("li",{children:a}):a}function oe(e){let{className:t,isDropdownItem:n,...r}=e;return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(ne,{className:(0,o.A)("menu__link",t),...r})})}function ae(e){let{mobile:t=!1,position:n,...r}=e;const o=t?oe:re;return(0,u.jsx)(o,{...r,activeClassName:r.activeClassName??(t?"menu__link--active":"navbar__link--active")})}var ie=n(41422),se=n(99169),le=n(44586);const ce={dropdownNavbarItemMobile:"dropdownNavbarItemMobile_S0Fm"};function ue(e,t){return e.some((e=>function(e,t){return!!(0,se.ys)(e.to,t)||!!ee(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t)))}function de(e){let{items:t,position:n,className:a,onClick:i,...s}=e;const l=(0,r.useRef)(null),[c,d]=(0,r.useState)(!1);return(0,r.useEffect)((()=>{const e=e=>{l.current&&!l.current.contains(e.target)&&d(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}}),[l]),(0,u.jsxs)("div",{ref:l,className:(0,o.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===n,"dropdown--show":c}),children:[(0,u.jsx)(ne,{"aria-haspopup":"true","aria-expanded":c,role:"button",href:s.to?void 0:"#",className:(0,o.A)("navbar__link",a),...s,onClick:s.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),d(!c))},children:s.children??s.label}),(0,u.jsx)("ul",{className:"dropdown__menu",children:t.map(((e,t)=>(0,r.createElement)(Ge,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t})))})]})}function pe(e){let{items:t,className:n,position:a,onClick:i,...l}=e;const c=function(){const{siteConfig:{baseUrl:e}}=(0,le.A)(),{pathname:t}=(0,s.zy)();return t.replace(e,"/")}(),d=ue(t,c),{collapsed:p,toggleCollapsed:f,setCollapsed:h}=(0,ie.u)({initialState:()=>!d});return(0,r.useEffect)((()=>{d&&h(!d)}),[c,d,h]),(0,u.jsxs)("li",{className:(0,o.A)("menu__list-item",{"menu__list-item--collapsed":p}),children:[(0,u.jsx)(ne,{role:"button",className:(0,o.A)(ce.dropdownNavbarItemMobile,"menu__link menu__link--sublist menu__link--sublist-caret",n),...l,onClick:e=>{e.preventDefault(),f()},children:l.children??l.label}),(0,u.jsx)(ie.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:p,children:t.map(((e,t)=>(0,r.createElement)(Ge,{mobile:!0,isDropdownItem:!0,onClick:i,activeClassName:"menu__link--active",...e,key:t})))})]})}function fe(e){let{mobile:t=!1,...n}=e;const r=t?pe:de;return(0,u.jsx)(r,{...n})}var he=n(32131);function be(e){let{width:t=20,height:n=20,...r}=e;return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:t,height:n,"aria-hidden":!0,...r,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const me="iconLanguage_nlXk";var ge=n(11088),ve=n(20053);var ye=n(44070),we=n(5891),ke=n(32384),xe=n(69913),Se=n(4471),_e=n(27674),Ee=n(86841),Ce=n(43810);const Te='',Ae='',De='',je='',Pe='',Le='',Oe='',Ne={searchBar:"searchBar_RVTs",dropdownMenu:"dropdownMenu_qbY6",searchBarLeft:"searchBarLeft_MXDe",suggestion:"suggestion_fB_2",cursor:"cursor_eG29",hitTree:"hitTree_kk6K",hitIcon:"hitIcon_a7Zy",hitPath:"hitPath_ieM4",noResultsIcon:"noResultsIcon_EBY5",hitFooter:"hitFooter_E9YW",hitWrapper:"hitWrapper_sAK8",hitTitle:"hitTitle_vyVt",hitAction:"hitAction_NqkB",hideAction:"hideAction_vcyE",noResults:"noResults_l6Q3",searchBarContainer:"searchBarContainer_NW3z",searchBarLoadingRing:"searchBarLoadingRing_YnHq",searchClearButton:"searchClearButton_qk4g",searchIndexLoading:"searchIndexLoading_EJ1f",searchHintContainer:"searchHintContainer_Pkmr",searchHint:"searchHint_iIMx",focused:"focused_OWtg",input:"input_FOTf",hint:"hint_URu1",suggestions:"suggestions_X8XU",dataset:"dataset_QiCy",empty:"empty_eITn"};function Re(e){let{document:t,type:n,page:r,metadata:o,tokens:a,isInterOfTree:i,isLastOfTree:s}=e;const l=n===xe.i.Title,c=n===xe.i.Keywords,u=l||c,d=n===xe.i.Heading,p=[];i?p.push(Le):s&&p.push(Oe);const f=p.map((e=>`${e}`)),h=`${u?Te:d?Ae:De}`,b=[`${c?(0,Ee.Z)(t.s,a):(0,Ce.C)(t.t,(0,_e.g)(o,"t"),a)}`];if(!i&&!s&&ge.tb){const e=r?r.b?.concat(r.t).concat(t.s&&t.s!==r.t?t.s:[]):t.b;b.push(`${(0,Se.$)(e??[])}`)}else u||b.push(`${(0,Ee.Z)(r.t||(t.u.startsWith("/docs/api-reference/")?"API Reference":""),a)}`);const m=`${je}`;return[...f,h,``,...b,"",m].join("")}function Ie(){return`${Pe}${(0,l.T)({id:"theme.SearchBar.noResultsText",message:"No results"})}`}var Fe=n(2849),Me=n(43385);async function Be(){const e=await Promise.all([n.e(489),n.e(5741)]).then(n.t.bind(n,90489,23)),t=e.default;return t.noConflict?t.noConflict():e.noConflict&&e.noConflict(),t}const ze="_highlight";const $e=function(e){let{handleSearchBarToggle:t}=e;const o=(0,B.A)(),{siteConfig:{baseUrl:a},i18n:{currentLocale:i}}=(0,le.A)(),c=(0,ye.vT)();let d=a;try{const{preferredVersion:e}=function(){return n(44070).g1(...arguments)}(c?.pluginId??ge.UB);e&&!e.isLast&&(d=e.path+"/")}catch(M){if(ge.I$&&!(M instanceof P.dV))throw M}const p=(0,s.W6)(),f=(0,s.zy)(),h=(0,r.useRef)(null),b=(0,r.useRef)(new Map),m=(0,r.useRef)(!1),[g,v]=(0,r.useState)(!1),[y,w]=(0,r.useState)(!1),[k,x]=(0,r.useState)(""),S=(0,r.useRef)(null),_=(0,r.useRef)(""),[E,C]=(0,r.useState)("");(0,r.useEffect)((()=>{if(!Array.isArray(ge.Hg))return;let e="";if(f.pathname.startsWith(d)){const t=f.pathname.substring(d.length);let n;for(const e of ge.Hg){const r="string"==typeof e?e:e.path;if(t===r||t.startsWith(`${r}/`)){n=r;break}}n&&(e=n)}_.current!==e&&(b.current.delete(e),_.current=e),C(e)}),[f.pathname,d]);const T=!!ge.O6&&Array.isArray(ge.Hg)&&""===E,A=(0,r.useCallback)((async()=>{if(T||b.current.get(E))return;b.current.set(E,"loading"),S.current?.autocomplete.destroy(),v(!0);const[{wrappedIndexes:e,zhDictionary:t},n]=await Promise.all([(0,we.Z)(d,E),Be()]);if(S.current=n(h.current,{hint:!1,autoselect:!0,openOnFocus:!0,cssClasses:{root:(0,ve.A)(Ne.searchBar,{[Ne.searchBarLeft]:"left"===ge.ZG}),noPrefix:!0,dropdownMenu:Ne.dropdownMenu,input:Ne.input,hint:Ne.hint,suggestions:Ne.suggestions,suggestion:Ne.suggestion,cursor:Ne.cursor,dataset:Ne.dataset,empty:Ne.empty}},[{source:(0,ke.m)(e,t,ge.AT),templates:{suggestion:Re,empty:Ie,footer:e=>{let{query:t,isEmpty:n}=e;if(n&&(!E||!ge.dz))return;const r=(e=>{let{query:t,isEmpty:n}=e;const r=document.createElement("a"),o=new URLSearchParams;let s;if(o.set("q",t),E){const e=E&&Array.isArray(ge.Hg)?ge.Hg.find((e=>"string"==typeof e?e===E:e.path===E)):E,t=e?(0,Me.p)(e,i).label:E;s=ge.dz&&n?(0,l.T)({id:"theme.SearchBar.seeAllOutsideContext",message:'See all results outside "{context}"'},{context:t}):(0,l.T)({id:"theme.SearchBar.searchInContext",message:'See all results within "{context}"'},{context:t})}else s=(0,l.T)({id:"theme.SearchBar.seeAll",message:"See all results"});if(!E||!Array.isArray(ge.Hg)||ge.dz&&n||o.set("ctx",E),d!==a){if(!d.startsWith(a))throw new Error(`Version url '${d}' does not start with base url '${a}', this is a bug of \`@easyops-cn/docusaurus-search-local\`, please report it.`);o.set("version",d.substring(a.length))}const c=`${a}search/?${o.toString()}`;return r.href=c,r.textContent=s,r.addEventListener("click",(e=>{e.ctrlKey||e.metaKey||(e.preventDefault(),S.current?.autocomplete.close(),p.push(c))})),r})({query:t,isEmpty:n}),o=document.createElement("div");return o.className=Ne.hitFooter,o.appendChild(r),o}}}]).on("autocomplete:selected",(function(e,t){let{document:{u:n,h:r},tokens:o}=t;h.current?.blur();let a=n;if(ge.CU&&o.length>0){const e=new URLSearchParams;for(const t of o)e.append(ze,t);a+=`?${e.toString()}`}r&&(a+=r),p.push(a)})).on("autocomplete:closed",(()=>{h.current?.blur()})),b.current.set(E,"done"),v(!1),m.current){const e=h.current;e.value&&S.current?.autocomplete.open(),e.focus()}}),[T,E,d,a,p]);(0,r.useEffect)((()=>{if(!ge.CU)return;const e=o?new URLSearchParams(f.search).getAll(ze):[];setTimeout((()=>{const t=document.querySelector("article");if(!t)return;const n=new ge.CU(t);n.unmark(),0!==e.length&&n.mark(e),x(e.join(" ")),S.current?.autocomplete.setVal(e.join(" "))}))}),[o,f.search,f.pathname]);const[D,j]=(0,r.useState)(!1),L=(0,r.useCallback)((()=>{m.current=!0,A(),j(!0),t?.(!0)}),[t,A]),O=(0,r.useCallback)((()=>{j(!1),t?.(!1)}),[t]),N=(0,r.useCallback)((()=>{A()}),[A]),R=(0,r.useCallback)((e=>{x(e.target.value),e.target.value&&w(!0)}),[]),I=!!o&&/mac/i.test(navigator.userAgentData?.platform??navigator.platform);(0,r.useEffect)((()=>{if(!ge.WW)return;const e=e=>{!(I?e.metaKey:e.ctrlKey)||"k"!==e.key&&"K"!==e.key||(e.preventDefault(),h.current?.focus(),L())};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}}),[I,L]);const F=(0,r.useCallback)((()=>{const e=new URLSearchParams(f.search);e.delete(ze);const t=e.toString(),n=f.pathname+(""!=t?`?${t}`:"")+f.hash;n!=f.pathname+f.search+f.hash&&p.push(n),x(""),S.current?.autocomplete.setVal("")}),[f.pathname,f.search,f.hash,p]);return(0,u.jsxs)("div",{className:(0,ve.A)("navbar__search",Ne.searchBarContainer,{[Ne.searchIndexLoading]:g&&y,[Ne.focused]:D}),hidden:T,dir:"ltr",children:[(0,u.jsx)("input",{placeholder:(0,l.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),"aria-label":"Search",className:"navbar__search-input",onMouseEnter:N,onFocus:L,onBlur:O,onChange:R,ref:h,value:k}),(0,u.jsx)(Fe.A,{className:Ne.searchBarLoadingRing}),ge.WW&&ge.pk&&(""!==k?(0,u.jsx)("button",{className:Ne.searchClearButton,onClick:F,children:"\u2715"}):o&&(0,u.jsxs)("div",{className:Ne.searchHintContainer,children:[(0,u.jsx)("kbd",{className:Ne.searchHint,children:I?"\u2318":"ctrl"}),(0,u.jsx)("kbd",{className:Ne.searchHint,children:"K"})]}))]})},Ue={navbarSearchContainer:"navbarSearchContainer_Bca1"};function He(e){let{children:t,className:n}=e;return(0,u.jsx)("div",{className:(0,o.A)(n,Ue.navbarSearchContainer),children:t})}var Ve=n(26972);var Qe=n(53886);function qe(e,t){return t.alternateDocVersions[e.name]??function(e){return e.docs.find((t=>t.id===e.mainDocId))}(e)}const We={default:ae,localeDropdown:function(e){let{mobile:t,dropdownItemsBefore:n,dropdownItemsAfter:r,queryString:o="",...a}=e;const{i18n:{currentLocale:i,locales:c,localeConfigs:d}}=(0,le.A)(),p=(0,he.o)(),{search:f,hash:h}=(0,s.zy)(),b=[...n,...c.map((e=>{const n=`${`pathname://${p.createUrl({locale:e,fullyQualified:!1})}`}${f}${h}${o}`;return{label:d[e].label,lang:d[e].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:e===i?t?"menu__link--active":"dropdown__link--active":""}})),...r],m=t?(0,l.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):d[i].label;return(0,u.jsx)(fe,{...a,mobile:t,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(be,{className:me}),m]}),items:b})},search:function(e){let{mobile:t,className:n}=e;return t?null:(0,u.jsx)(He,{className:n,children:(0,u.jsx)($e,{})})},dropdown:fe,html:function(e){let{value:t,className:n,mobile:r=!1,isDropdownItem:a=!1}=e;const i=a?"li":"div";return(0,u.jsx)(i,{className:(0,o.A)({navbar__item:!r&&!a,"menu__list-item":r},n),dangerouslySetInnerHTML:{__html:t}})},doc:function(e){let{docId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,ye.zK)(r),i=(0,Ve.QB)(t,r),s=a?.path===i?.path;return null===i||i.unlisted&&!s?null:(0,u.jsx)(ae,{exact:!0,...o,isActive:()=>s||!!a?.sidebar&&a.sidebar===i.sidebar,label:n??i.id,to:i.path})},docSidebar:function(e){let{sidebarId:t,label:n,docsPluginId:r,...o}=e;const{activeDoc:a}=(0,ye.zK)(r),i=(0,Ve.fW)(t,r).link;if(!i)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${t}" doesn't have anything to be linked to.`);return(0,u.jsx)(ae,{exact:!0,...o,isActive:()=>a?.sidebar===t,label:n??i.label,to:i.path})},docsVersion:function(e){let{label:t,to:n,docsPluginId:r,...o}=e;const a=(0,Ve.Vd)(r)[0],i=t??a.label,s=n??(e=>e.docs.find((t=>t.id===e.mainDocId)))(a).path;return(0,u.jsx)(ae,{...o,label:i,to:s})},docsVersionDropdown:function(e){let{mobile:t,docsPluginId:n,dropdownActiveClassDisabled:r,dropdownItemsBefore:o,dropdownItemsAfter:a,...i}=e;const{search:c,hash:d}=(0,s.zy)(),p=(0,ye.zK)(n),f=(0,ye.jh)(n),{savePreferredVersionName:h}=(0,Qe.g1)(n),b=[...o,...f.map((function(e){const t=qe(e,p);return{label:e.label,to:`${t.path}${c}${d}`,isActive:()=>e===p.activeVersion,onClick:()=>h(e.name)}})),...a],m=(0,Ve.Vd)(n)[0],g=t&&b.length>1?(0,l.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):m.label,v=t&&b.length>1?void 0:qe(m,p).path;return b.length<=1?(0,u.jsx)(ae,{...i,mobile:t,label:g,to:v,isActive:r?()=>!1:void 0}):(0,u.jsx)(fe,{...i,mobile:t,label:g,to:v,items:b,isActive:r?()=>!1:void 0})}};function Ge(e){let{type:t,...n}=e;const r=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(t,n),o=We[r];if(!o)throw new Error(`No NavbarItem component found for type "${t}".`);return(0,u.jsx)(o,{...n})}function Ke(){const e=(0,D.M)(),t=(0,w.p)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map(((t,n)=>(0,r.createElement)(Ge,{mobile:!0,...t,onClick:()=>e.toggle(),key:n})))})}function Ye(e){return(0,u.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(l.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function Ze(){const e=0===(0,w.p)().navbar.items.length,t=I();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(Ye,{onClick:()=>t.hide()}),t.content]})}function Xe(){const e=(0,D.M)();var t;return void 0===(t=e.shown)&&(t=!0),(0,r.useEffect)((()=>(document.body.style.overflow=t?"hidden":"visible",()=>{document.body.style.overflow="visible"})),[t]),e.shouldRender?(0,u.jsx)(F,{header:(0,u.jsx)(Y,{}),primaryMenu:(0,u.jsx)(Ke,{}),secondaryMenu:(0,u.jsx)(Ze,{})}):null}const Je={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function et(e){return(0,u.jsx)("div",{role:"presentation",...e,className:(0,o.A)("navbar-sidebar__backdrop",e.className)})}function tt(e){let{children:t}=e;const{navbar:{hideOnScroll:n,style:a}}=(0,w.p)(),i=(0,D.M)(),{navbarRef:s,isNavbarVisible:d}=function(e){const[t,n]=(0,r.useState)(e),o=(0,r.useRef)(!1),a=(0,r.useRef)(0),i=(0,r.useCallback)((e=>{null!==e&&(a.current=e.getBoundingClientRect().height)}),[]);return(0,j.Mq)(((t,r)=>{let{scrollY:i}=t;if(!e)return;if(i=s?n(!1):i+c{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return o.current=!0,void n(!1);n(!0)})),{navbarRef:i,isNavbarVisible:t}}(n);return(0,u.jsxs)("nav",{ref:s,"aria-label":(0,l.T)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,o.A)("navbar","navbar--fixed-top",n&&[Je.navbarHideable,!d&&Je.navbarHidden],{"navbar--dark":"dark"===a,"navbar--primary":"primary"===a,"navbar-sidebar--show":i.shown}),children:[t,(0,u.jsx)(et,{onClick:i.toggle}),(0,u.jsx)(Xe,{})]})}var nt=n(12181);const rt="right";function ot(e){let{width:t=30,height:n=30,className:r,...o}=e;return(0,u.jsx)("svg",{className:r,width:t,height:n,viewBox:"0 0 30 30","aria-hidden":"true",...o,children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function at(){const{toggle:e,shown:t}=(0,D.M)();return(0,u.jsx)("button",{onClick:e,"aria-label":(0,l.T)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,u.jsx)(ot,{})})}const it={colorModeToggle:"colorModeToggle_DEke"};function st(e){let{items:t}=e;return(0,u.jsx)(u.Fragment,{children:t.map(((e,t)=>(0,u.jsx)(nt.k2,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,u.jsx)(Ge,{...e})},t)))})}function lt(e){let{left:t,right:n}=e;return(0,u.jsxs)("div",{className:"navbar__inner",children:[(0,u.jsx)("div",{className:"navbar__items",children:t}),(0,u.jsx)("div",{className:"navbar__items navbar__items--right",children:n})]})}function ct(){const e=(0,D.M)(),t=(0,w.p)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??rt)}return[e.filter(t),e.filter((e=>!t(e)))]}(t),o=t.find((e=>"search"===e.type));return(0,u.jsx)(lt,{left:(0,u.jsxs)(u.Fragment,{children:[!e.disabled&&(0,u.jsx)(at,{}),(0,u.jsx)(G,{}),(0,u.jsx)(st,{items:n})]}),right:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(st,{items:r}),(0,u.jsx)(q,{className:it.colorModeToggle}),!o&&(0,u.jsx)(He,{children:(0,u.jsx)($e,{})})]})})}function ut(){return(0,u.jsx)(tt,{children:(0,u.jsx)(ct,{})})}function dt(e){let{item:t}=e;const{to:n,href:r,label:o,prependBaseUrlToHref:a,...i}=t,s=(0,X.Ay)(n),l=(0,X.Ay)(r,{forcePrependBaseUrl:!0});return(0,u.jsxs)(Z.A,{className:"footer__link-item",...r?{href:a?l:r}:{to:s},...i,children:[o,r&&!(0,J.A)(r)&&(0,u.jsx)(te.A,{})]})}function pt(e){let{item:t}=e;return t.html?(0,u.jsx)("li",{className:"footer__item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)("li",{className:"footer__item",children:(0,u.jsx)(dt,{item:t})},t.href??t.to)}function ft(e){let{column:t}=e;return(0,u.jsxs)("div",{className:"col footer__col",children:[(0,u.jsx)("div",{className:"footer__title",children:t.title}),(0,u.jsx)("ul",{className:"footer__items clean-list",children:t.items.map(((e,t)=>(0,u.jsx)(pt,{item:e},t)))})]})}function ht(e){let{columns:t}=e;return(0,u.jsx)("div",{className:"row footer__links",children:t.map(((e,t)=>(0,u.jsx)(ft,{column:e},t)))})}function bt(){return(0,u.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function mt(e){let{item:t}=e;return t.html?(0,u.jsx)("span",{className:"footer__link-item",dangerouslySetInnerHTML:{__html:t.html}}):(0,u.jsx)(dt,{item:t})}function gt(e){let{links:t}=e;return(0,u.jsx)("div",{className:"footer__links text--center",children:(0,u.jsx)("div",{className:"footer__links",children:t.map(((e,n)=>(0,u.jsxs)(r.Fragment,{children:[(0,u.jsx)(mt,{item:e}),t.length!==n+1&&(0,u.jsx)(bt,{})]},n)))})})}function vt(e){let{links:t}=e;return function(e){return"title"in e[0]}(t)?(0,u.jsx)(ht,{columns:t}):(0,u.jsx)(gt,{links:t})}var yt=n(21122);const wt={footerLogoLink:"footerLogoLink_BH7S"};function kt(e){let{logo:t}=e;const{withBaseUrl:n}=(0,X.hH)(),r={light:n(t.src),dark:n(t.srcDark??t.src)};return(0,u.jsx)(yt.A,{className:(0,o.A)("footer__logo",t.className),alt:t.alt,sources:r,width:t.width,height:t.height,style:t.style})}function xt(e){let{logo:t}=e;return t.href?(0,u.jsx)(Z.A,{href:t.href,className:wt.footerLogoLink,target:t.target,children:(0,u.jsx)(kt,{logo:t})}):(0,u.jsx)(kt,{logo:t})}function St(e){let{copyright:t}=e;return(0,u.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:t}})}function _t(e){let{style:t,links:n,logo:r,copyright:a}=e;return(0,u.jsx)("footer",{className:(0,o.A)("footer",{"footer--dark":"dark"===t}),children:(0,u.jsxs)("div",{className:"container container-fluid",children:[n,(r||a)&&(0,u.jsxs)("div",{className:"footer__bottom text--center",children:[r&&(0,u.jsx)("div",{className:"margin-bottom--sm",children:r}),a]})]})})}function Et(){const{footer:e}=(0,w.p)();if(!e)return null;const{copyright:t,links:n,logo:r,style:o}=e;return(0,u.jsx)(_t,{style:o,links:n&&n.length>0&&(0,u.jsx)(vt,{links:n}),logo:r&&(0,u.jsx)(xt,{logo:r}),copyright:t&&(0,u.jsx)(St,{copyright:t})})}const Ct=r.memo(Et),Tt=(0,P.fM)([M.a,k.o,j.Tv,Qe.VQ,i.Jx,function(e){let{children:t}=e;return(0,u.jsx)(L.y_,{children:(0,u.jsx)(D.e,{children:(0,u.jsx)(N,{children:t})})})}]);function At(e){let{children:t}=e;return(0,u.jsx)(Tt,{children:t})}var Dt=n(51107);function jt(e){let{error:t,tryAgain:n}=e;return(0,u.jsx)("main",{className:"container margin-vert--xl",children:(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,u.jsx)(Dt.A,{as:"h1",className:"hero__title",children:(0,u.jsx)(l.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,u.jsx)("div",{className:"margin-vert--lg",children:(0,u.jsx)(nt.a2,{onClick:n,className:"button button--primary shadow--lw"})}),(0,u.jsx)("hr",{}),(0,u.jsx)("div",{className:"margin-vert--md",children:(0,u.jsx)(nt.bq,{error:t})})]})})})}const Pt={mainWrapper:"mainWrapper_z2l0"};function Lt(e){const{children:t,noFooter:n,wrapperClassName:r,title:s,description:l}=e;return(0,g.J)(),(0,u.jsxs)(At,{children:[(0,u.jsx)(i.be,{title:s,description:l}),(0,u.jsx)(y,{}),(0,u.jsx)(A,{}),(0,u.jsx)(ut,{}),(0,u.jsx)("div",{id:d,className:(0,o.A)(m.G.wrapper.main,Pt.mainWrapper,r),children:(0,u.jsx)(a.A,{fallback:e=>(0,u.jsx)(jt,{...e}),children:t})}),!n&&(0,u.jsx)(Ct,{})]})}},23465:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});n(96540);var r=n(28774),o=n(86025),a=n(44586),i=n(6342),s=n(21122),l=n(74848);function c(e){let{logo:t,alt:n,imageClassName:r}=e;const a={light:(0,o.Ay)(t.src),dark:(0,o.Ay)(t.srcDark||t.src)},i=(0,l.jsx)(s.A,{className:t.className,sources:a,height:t.height,width:t.width,alt:n,style:t.style});return r?(0,l.jsx)("div",{className:r,children:i}):i}function u(e){const{siteConfig:{title:t}}=(0,a.A)(),{navbar:{title:n,logo:s}}=(0,i.p)(),{imageClassName:u,titleClassName:d,...p}=e,f=(0,o.Ay)(s?.href||"/"),h=n?"":t,b=s?.alt??h;return(0,l.jsxs)(r.A,{to:f,...p,...s?.target&&{target:s.target},children:[s&&(0,l.jsx)(c,{logo:s,alt:b,imageClassName:u}),null!=n&&(0,l.jsx)("b",{className:d,children:n})]})}},41463:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(96540);var r=n(5260),o=n(74848);function a(e){let{locale:t,version:n,tag:a}=e;const i=t;return(0,o.jsxs)(r.A,{children:[t&&(0,o.jsx)("meta",{name:"docusaurus_locale",content:t}),n&&(0,o.jsx)("meta",{name:"docusaurus_version",content:n}),a&&(0,o.jsx)("meta",{name:"docusaurus_tag",content:a}),i&&(0,o.jsx)("meta",{name:"docsearch:language",content:i}),n&&(0,o.jsx)("meta",{name:"docsearch:version",content:n}),a&&(0,o.jsx)("meta",{name:"docsearch:docusaurus_tag",content:a})]})}},21122:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(96540),o=n(15066),a=n(92303),i=n(95293);const s={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var l=n(74848);function c(e){let{className:t,children:n}=e;const c=(0,a.A)(),{colorMode:u}=(0,i.G)();return(0,l.jsx)(l.Fragment,{children:(c?"dark"===u?["dark"]:["light"]:["light","dark"]).map((e=>{const a=n({theme:e,className:(0,o.A)(t,s.themedComponent,s[`themedComponent--${e}`])});return(0,l.jsx)(r.Fragment,{children:a},e)}))})}function u(e){const{sources:t,className:n,alt:r,...o}=e;return(0,l.jsx)(c,{className:n,children:e=>{let{theme:n,className:a}=e;return(0,l.jsx)("img",{src:t[n],alt:r,className:a,...o})}})}},41422:(e,t,n)=>{"use strict";n.d(t,{N:()=>g,u:()=>c});var r=n(96540),o=n(38193),a=n(205),i=n(53109),s=n(74848);const l="ease-in-out";function c(e){let{initialState:t}=e;const[n,o]=(0,r.useState)(t??!1),a=(0,r.useCallback)((()=>{o((e=>!e))}),[]);return{collapsed:n,setCollapsed:o,toggleCollapsed:a}}const u={display:"none",overflow:"hidden",height:"0px"},d={display:"block",overflow:"visible",height:"auto"};function p(e,t){const n=t?u:d;e.style.display=n.display,e.style.overflow=n.overflow,e.style.height=n.height}function f(e){let{collapsibleRef:t,collapsed:n,animation:o}=e;const a=(0,r.useRef)(!1);(0,r.useEffect)((()=>{const e=t.current;function r(){const t=e.scrollHeight,n=o?.duration??function(e){if((0,i.O)())return 1;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}(t);return{transition:`height ${n}ms ${o?.easing??l}`,height:`${t}px`}}function s(){const t=r();e.style.transition=t.transition,e.style.height=t.height}if(!a.current)return p(e,n),void(a.current=!0);return e.style.willChange="height",function(){const t=requestAnimationFrame((()=>{n?(s(),requestAnimationFrame((()=>{e.style.height=u.height,e.style.overflow=u.overflow}))):(e.style.display="block",requestAnimationFrame((()=>{s()})))}));return()=>cancelAnimationFrame(t)}()}),[t,n,o])}function h(e){if(!o.A.canUseDOM)return e?u:d}function b(e){let{as:t="div",collapsed:n,children:o,animation:a,onCollapseTransitionEnd:i,className:l,disableSSRStyle:c}=e;const u=(0,r.useRef)(null);return f({collapsibleRef:u,collapsed:n,animation:a}),(0,s.jsx)(t,{ref:u,style:c?void 0:h(n),onTransitionEnd:e=>{"height"===e.propertyName&&(p(u.current,n),i?.(n))},className:l,children:o})}function m(e){let{collapsed:t,...n}=e;const[o,i]=(0,r.useState)(!t),[l,c]=(0,r.useState)(t);return(0,a.A)((()=>{t||i(!0)}),[t]),(0,a.A)((()=>{o&&c(t)}),[o,t]),o?(0,s.jsx)(b,{...n,collapsed:l}):null}function g(e){let{lazy:t,...n}=e;const r=t?m:b;return(0,s.jsx)(r,{...n})}},65041:(e,t,n)=>{"use strict";n.d(t,{M:()=>b,o:()=>h});var r=n(96540),o=n(92303),a=n(70679),i=n(89532),s=n(6342),l=n(74848);const c=(0,a.Wf)("docusaurus.announcement.dismiss"),u=(0,a.Wf)("docusaurus.announcement.id"),d=()=>"true"===c.get(),p=e=>c.set(String(e)),f=r.createContext(null);function h(e){let{children:t}=e;const n=function(){const{announcementBar:e}=(0,s.p)(),t=(0,o.A)(),[n,a]=(0,r.useState)((()=>!!t&&d()));(0,r.useEffect)((()=>{a(d())}),[]);const i=(0,r.useCallback)((()=>{p(!0),a(!0)}),[]);return(0,r.useEffect)((()=>{if(!e)return;const{id:t}=e;let n=u.get();"annoucement-bar"===n&&(n="announcement-bar");const r=t!==n;u.set(t),r&&p(!1),!r&&d()||a(!1)}),[e]),(0,r.useMemo)((()=>({isActive:!!e&&!n,close:i})),[e,n,i])}();return(0,l.jsx)(f.Provider,{value:n,children:t})}function b(){const e=(0,r.useContext)(f);if(!e)throw new i.dV("AnnouncementBarProvider");return e}},95293:(e,t,n)=>{"use strict";n.d(t,{G:()=>g,a:()=>m});var r=n(96540),o=n(38193),a=n(89532),i=n(70679),s=n(6342),l=n(74848);const c=r.createContext(void 0),u="theme",d=(0,i.Wf)(u),p={light:"light",dark:"dark"},f=e=>e===p.dark?p.dark:p.light,h=e=>o.A.canUseDOM?f(document.documentElement.getAttribute("data-theme")):f(e),b=e=>{d.set(f(e))};function m(e){let{children:t}=e;const n=function(){const{colorMode:{defaultMode:e,disableSwitch:t,respectPrefersColorScheme:n}}=(0,s.p)(),[o,a]=(0,r.useState)(h(e));(0,r.useEffect)((()=>{t&&d.del()}),[t]);const i=(0,r.useCallback)((function(t,r){void 0===r&&(r={});const{persist:o=!0}=r;t?(a(t),o&&b(t)):(a(n?window.matchMedia("(prefers-color-scheme: dark)").matches?p.dark:p.light:e),d.del())}),[n,e]);(0,r.useEffect)((()=>{document.documentElement.setAttribute("data-theme",f(o))}),[o]),(0,r.useEffect)((()=>{if(t)return;const e=e=>{if(e.key!==u)return;const t=d.get();null!==t&&i(f(t))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)}),[t,i]);const l=(0,r.useRef)(!1);return(0,r.useEffect)((()=>{if(t&&!n)return;const e=window.matchMedia("(prefers-color-scheme: dark)"),r=()=>{window.matchMedia("print").matches||l.current?l.current=window.matchMedia("print").matches:i(null)};return e.addListener(r),()=>e.removeListener(r)}),[i,t,n]),(0,r.useMemo)((()=>({colorMode:o,setColorMode:i,get isDarkTheme(){return o===p.dark},setLightTheme(){i(p.light)},setDarkTheme(){i(p.dark)}})),[o,i])}();return(0,l.jsx)(c.Provider,{value:n,children:t})}function g(){const e=(0,r.useContext)(c);if(null==e)throw new a.dV("ColorModeProvider","Please see https://docusaurus.io/docs/api/themes/configuration#use-color-mode.");return e}},22069:(e,t,n)=>{"use strict";n.d(t,{M:()=>f,e:()=>p});var r=n(96540),o=n(75600),a=n(24581),i=n(57485),s=n(6342),l=n(89532),c=n(74848);const u=r.createContext(void 0);function d(){const e=function(){const e=(0,o.YL)(),{items:t}=(0,s.p)().navbar;return 0===t.length&&!e.component}(),t=(0,a.l)(),n=!e&&"mobile"===t,[l,c]=(0,r.useState)(!1);(0,i.$Z)((()=>{if(l)return c(!1),!1}));const u=(0,r.useCallback)((()=>{c((e=>!e))}),[]);return(0,r.useEffect)((()=>{"desktop"===t&&c(!1)}),[t]),(0,r.useMemo)((()=>({disabled:e,shouldRender:n,toggle:u,shown:l})),[e,n,u,l])}function p(e){let{children:t}=e;const n=d();return(0,c.jsx)(u.Provider,{value:n,children:t})}function f(){const e=r.useContext(u);if(void 0===e)throw new l.dV("NavbarMobileSidebarProvider");return e}},75600:(e,t,n)=>{"use strict";n.d(t,{GX:()=>c,YL:()=>l,y_:()=>s});var r=n(96540),o=n(89532),a=n(74848);const i=r.createContext(null);function s(e){let{children:t}=e;const n=(0,r.useState)({component:null,props:null});return(0,a.jsx)(i.Provider,{value:n,children:t})}function l(){const e=(0,r.useContext)(i);if(!e)throw new o.dV("NavbarSecondaryMenuContentProvider");return e[0]}function c(e){let{component:t,props:n}=e;const a=(0,r.useContext)(i);if(!a)throw new o.dV("NavbarSecondaryMenuContentProvider");const[,s]=a,l=(0,o.Be)(n);return(0,r.useEffect)((()=>{s({component:t,props:l})}),[s,t,l]),(0,r.useEffect)((()=>()=>s({component:null,props:null})),[s]),null}},14090:(e,t,n)=>{"use strict";n.d(t,{w:()=>o,J:()=>a});var r=n(96540);const o="navigation-with-keyboard";function a(){(0,r.useEffect)((()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(o),"mousedown"===e.type&&document.body.classList.remove(o)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}}),[])}},24581:(e,t,n)=>{"use strict";n.d(t,{l:()=>s});var r=n(96540),o=n(38193);const a={desktop:"desktop",mobile:"mobile",ssr:"ssr"},i=996;function s(e){let{desktopBreakpoint:t=i}=void 0===e?{}:e;const[n,s]=(0,r.useState)((()=>"ssr"));return(0,r.useEffect)((()=>{function e(){s(function(e){if(!o.A.canUseDOM)throw new Error("getWindowSize() should only be called after React hydration");return window.innerWidth>e?a.desktop:a.mobile}(t))}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[t]),n}},17559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:e=>`theme-admonition-${e}`},layout:{},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},53109:(e,t,n)=>{"use strict";function r(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}n.d(t,{O:()=>r})},12181:(e,t,n)=>{"use strict";n.d(t,{bq:()=>u,MN:()=>c,a2:()=>l,k2:()=>d});var r=n(96540),o=n(21312),a=n(70440);const i={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};var s=n(74848);function l(e){return(0,s.jsx)("button",{type:"button",...e,children:(0,s.jsx)(o.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function c(e){let{error:t,tryAgain:n}=e;return(0,s.jsxs)("div",{className:i.errorBoundaryFallback,children:[(0,s.jsx)("p",{children:t.message}),(0,s.jsx)(l,{onClick:n})]})}function u(e){let{error:t}=e;const n=(0,a.rA)(t).map((e=>e.message)).join("\n\nCause:\n");return(0,s.jsx)("p",{className:i.errorBoundaryError,children:n})}class d extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}},57485:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>i,aZ:()=>l});var r=n(96540),o=n(56347),a=n(89532);function i(e){!function(e){const t=(0,o.W6)(),n=(0,a._q)(e);(0,r.useEffect)((()=>t.block(((e,t)=>n(e,t)))),[t,n])}(((t,n)=>{if("POP"===n)return e(t,n)}))}function s(e){const t=(0,o.W6)();return(0,r.useSyncExternalStore)(t.listen,(()=>e(t)),(()=>e(t)))}function l(e){return s((t=>null===e?null:new URLSearchParams(t.location.search).get(e)))}},31682:(e,t,n)=>{"use strict";function r(e,t){return void 0===t&&(t=(e,t)=>e===t),e.filter(((n,r)=>e.findIndex((e=>t(e,n)))!==r))}function o(e){return Array.from(new Set(e))}n.d(t,{XI:()=>r,sb:()=>o})},1003:(e,t,n)=>{"use strict";n.d(t,{e3:()=>f,be:()=>d,Jx:()=>h});var r=n(96540),o=n(15066),a=n(5260),i=n(53102);function s(){const e=r.useContext(i.o);if(!e)throw new Error("Unexpected: no Docusaurus route context found");return e}var l=n(86025),c=n(44586);var u=n(74848);function d(e){let{title:t,description:n,keywords:r,image:o,children:i}=e;const s=function(e){const{siteConfig:t}=(0,c.A)(),{title:n,titleDelimiter:r}=t;return e?.trim().length?`${e.trim()} ${r} ${n}`:n}(t),{withBaseUrl:d}=(0,l.hH)(),p=o?d(o,{absolute:!0}):void 0;return(0,u.jsxs)(a.A,{children:[t&&(0,u.jsx)("title",{children:s}),t&&(0,u.jsx)("meta",{property:"og:title",content:s}),n&&(0,u.jsx)("meta",{name:"description",content:n}),n&&(0,u.jsx)("meta",{property:"og:description",content:n}),r&&(0,u.jsx)("meta",{name:"keywords",content:Array.isArray(r)?r.join(","):r}),p&&(0,u.jsx)("meta",{property:"og:image",content:p}),p&&(0,u.jsx)("meta",{name:"twitter:image",content:p}),i]})}const p=r.createContext(void 0);function f(e){let{className:t,children:n}=e;const i=r.useContext(p),s=(0,o.A)(i,t);return(0,u.jsxs)(p.Provider,{value:s,children:[(0,u.jsx)(a.A,{children:(0,u.jsx)("html",{className:s})}),n]})}function h(e){let{children:t}=e;const n=s(),r=`plugin-${n.plugin.name.replace(/docusaurus-(?:plugin|theme)-(?:content-)?/gi,"")}`;const a=`plugin-id-${n.plugin.id}`;return(0,u.jsx)(f,{className:(0,o.A)(r,a),children:t})}},89532:(e,t,n)=>{"use strict";n.d(t,{Be:()=>c,ZC:()=>s,_q:()=>i,dV:()=>l,fM:()=>u});var r=n(96540),o=n(205),a=n(74848);function i(e){const t=(0,r.useRef)(e);return(0,o.A)((()=>{t.current=e}),[e]),(0,r.useCallback)((function(){return t.current(...arguments)}),[])}function s(e){const t=(0,r.useRef)();return(0,o.A)((()=>{t.current=e})),t.current}class l extends Error{constructor(e,t){super(),this.name="ReactContextError",this.message=`Hook ${this.stack?.split("\n")[1]?.match(/at (?:\w+\.)?(?\w+)/)?.groups.name??""} is called outside the <${e}>. ${t??""}`}}function c(e){const t=Object.entries(e);return t.sort(((e,t)=>e[0].localeCompare(t[0]))),(0,r.useMemo)((()=>e),t.flat())}function u(e){return t=>{let{children:n}=t;return(0,a.jsx)(a.Fragment,{children:e.reduceRight(((e,t)=>(0,a.jsx)(t,{children:e})),n)})}}},99169:(e,t,n)=>{"use strict";n.d(t,{Dt:()=>s,ys:()=>i});var r=n(96540),o=n(35947),a=n(44586);function i(e,t){const n=e=>(!e||e.endsWith("/")?e:`${e}/`)?.toLowerCase();return n(e)===n(t)}function s(){const{baseUrl:e}=(0,a.A)().siteConfig;return(0,r.useMemo)((()=>function(e){let{baseUrl:t,routes:n}=e;function r(e){return e.path===t&&!0===e.exact}function o(e){return e.path===t&&!e.exact}return function e(t){if(0===t.length)return;return t.find(r)||e(t.filter(o).flatMap((e=>e.routes??[])))}(n)}({routes:o.A,baseUrl:e})),[e])}},23104:(e,t,n)=>{"use strict";n.d(t,{Mq:()=>f,Tv:()=>u,a_:()=>h,gk:()=>b});var r=n(96540),o=n(38193),a=n(92303),i=n(205),s=n(89532),l=n(74848);const c=r.createContext(void 0);function u(e){let{children:t}=e;const n=function(){const e=(0,r.useRef)(!0);return(0,r.useMemo)((()=>({scrollEventsEnabledRef:e,enableScrollEvents:()=>{e.current=!0},disableScrollEvents:()=>{e.current=!1}})),[])}();return(0,l.jsx)(c.Provider,{value:n,children:t})}function d(){const e=(0,r.useContext)(c);if(null==e)throw new s.dV("ScrollControllerProvider");return e}const p=()=>o.A.canUseDOM?{scrollX:window.pageXOffset,scrollY:window.pageYOffset}:null;function f(e,t){void 0===t&&(t=[]);const{scrollEventsEnabledRef:n}=d(),o=(0,r.useRef)(p()),a=(0,s._q)(e);(0,r.useEffect)((()=>{const e=()=>{if(!n.current)return;const e=p();a(e,o.current),o.current=e},t={passive:!0};return e(),window.addEventListener("scroll",e,t),()=>window.removeEventListener("scroll",e,t)}),[a,n,...t])}function h(){const e=d(),t=function(){const e=(0,r.useRef)({elem:null,top:0}),t=(0,r.useCallback)((t=>{e.current={elem:t,top:t.getBoundingClientRect().top}}),[]),n=(0,r.useCallback)((()=>{const{current:{elem:t,top:n}}=e;if(!t)return{restored:!1};const r=t.getBoundingClientRect().top-n;return r&&window.scrollBy({left:0,top:r}),e.current={elem:null,top:0},{restored:0!==r}}),[]);return(0,r.useMemo)((()=>({save:t,restore:n})),[n,t])}(),n=(0,r.useRef)(void 0),o=(0,r.useCallback)((r=>{t.save(r),e.disableScrollEvents(),n.current=()=>{const{restored:r}=t.restore();if(n.current=void 0,r){const t=()=>{e.enableScrollEvents(),window.removeEventListener("scroll",t)};window.addEventListener("scroll",t)}else e.enableScrollEvents()}}),[e,t]);return(0,i.A)((()=>{queueMicrotask((()=>n.current?.()))})),{blockElementScrollPositionUntilNextRender:o}}function b(){const e=(0,r.useRef)(null),t=(0,a.A)()&&"smooth"===getComputedStyle(document.documentElement).scrollBehavior;return{startScroll:n=>{e.current=t?function(e){return window.scrollTo({top:e,behavior:"smooth"}),()=>{}}(n):function(e){let t=null;const n=document.documentElement.scrollTop>e;return function r(){const o=document.documentElement.scrollTop;(n&&o>e||!n&&ot&&cancelAnimationFrame(t)}(n)},cancelScroll:()=>e.current?.()}}},70679:(e,t,n)=>{"use strict";n.d(t,{Wf:()=>u,Dv:()=>d});var r=n(96540);const o=JSON.parse('{"N":"localStorage","M":""}'),a=o.N;function i(e){let{key:t,oldValue:n,newValue:r,storage:o}=e;if(n===r)return;const a=document.createEvent("StorageEvent");a.initStorageEvent("storage",!1,!1,t,n,r,window.location.href,o),window.dispatchEvent(a)}function s(e){if(void 0===e&&(e=a),"undefined"==typeof window)throw new Error("Browser storage is not available on Node.js/Docusaurus SSR process.");if("none"===e)return null;try{return window[e]}catch(n){return t=n,l||(console.warn("Docusaurus browser storage is not available.\nPossible reasons: running Docusaurus in an iframe, in an incognito browser session, or using too strict browser privacy settings.",t),l=!0),null}var t}let l=!1;const c={get:()=>null,set:()=>{},del:()=>{},listen:()=>()=>{}};function u(e,t){const n=`${e}${o.M}`;if("undefined"==typeof window)return function(e){function t(){throw new Error(`Illegal storage API usage for storage key "${e}".\nDocusaurus storage APIs are not supposed to be called on the server-rendering process.\nPlease only call storage APIs in effects and event handlers.`)}return{get:t,set:t,del:t,listen:t}}(n);const r=s(t?.persistence);return null===r?c:{get:()=>{try{return r.getItem(n)}catch(e){return console.error(`Docusaurus storage error, can't get key=${n}`,e),null}},set:e=>{try{const t=r.getItem(n);r.setItem(n,e),i({key:n,oldValue:t,newValue:e,storage:r})}catch(t){console.error(`Docusaurus storage error, can't set ${n}=${e}`,t)}},del:()=>{try{const e=r.getItem(n);r.removeItem(n),i({key:n,oldValue:e,newValue:null,storage:r})}catch(e){console.error(`Docusaurus storage error, can't delete key=${n}`,e)}},listen:e=>{try{const t=t=>{t.storageArea===r&&t.key===n&&e(t)};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}catch(t){return console.error(`Docusaurus storage error, can't listen for changes of key=${n}`,t),()=>{}}}}}function d(e,t){const n=(0,r.useRef)((()=>null===e?c:u(e,t))).current(),o=(0,r.useCallback)((e=>"undefined"==typeof window?()=>{}:n.listen(e)),[n]);return[(0,r.useSyncExternalStore)(o,(()=>"undefined"==typeof window?null:n.get()),(()=>null)),n]}},32131:(e,t,n)=>{"use strict";n.d(t,{o:()=>i});var r=n(44586),o=n(56347),a=n(70440);function i(){const{siteConfig:{baseUrl:e,url:t,trailingSlash:n},i18n:{defaultLocale:i,currentLocale:s}}=(0,r.A)(),{pathname:l}=(0,o.zy)(),c=(0,a.Ks)(l,{trailingSlash:n,baseUrl:e}),u=s===i?e:e.replace(`/${s}/`,"/"),d=c.replace(e,"");return{createUrl:function(e){let{locale:n,fullyQualified:r}=e;return`${r?t:""}${function(e){return e===i?`${u}`:`${u}${e}/`}(n)}${d}`}}}},75062:(e,t,n)=>{"use strict";n.d(t,{$:()=>i});var r=n(96540),o=n(56347),a=n(89532);function i(e){const t=(0,o.zy)(),n=(0,a.ZC)(t),i=(0,a._q)(e);(0,r.useEffect)((()=>{n&&t!==n&&i({location:t,previousLocation:n})}),[i,t,n])}},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>o});var r=n(44586);function o(){return(0,r.A)().siteConfig.themeConfig}},12983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=o,t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[i]=e.split(/[#?]/),s="/"===i||i===r?i:(l=i,c=n,c?o(l):a(l));var l,c;return e.replace(i,s)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=a;const r=n(42566);function o(e){return e.endsWith("/")?e:`${e}/`}function a(e){return(0,r.removeSuffix)(e,"/")}},80253:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorCausalChain=function e(t){if(t.cause)return[t,...e(t.cause)];return[t]}},70440:(e,t,n)=>{"use strict";t.rA=t.Ks=void 0;const r=n(31635);var o=n(12983);Object.defineProperty(t,"Ks",{enumerable:!0,get:function(){return r.__importDefault(o).default}});var a=n(42566);var i=n(80253);Object.defineProperty(t,"rA",{enumerable:!0,get:function(){return i.getErrorCausalChain}})},42566:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPrefix=function(e,t){return e.startsWith(t)?e:`${t}${e}`},t.removeSuffix=function(e,t){if(""===t)return e;return e.endsWith(t)?e.slice(0,-t.length):e},t.addSuffix=function(e,t){return e.endsWith(t)?e:`${e}${t}`},t.removePrefix=function(e,t){return e.startsWith(t)?e.slice(t.length):e}},2849:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(96540);var r=n(20053);const o={loadingRing:"loadingRing_RJI3","loading-ring":"loading-ring_FB5o"};var a=n(74848);function i(e){let{className:t}=e;return(0,a.jsxs)("div",{className:(0,r.A)(o.loadingRing,t),children:[(0,a.jsx)("div",{}),(0,a.jsx)("div",{}),(0,a.jsx)("div",{}),(0,a.jsx)("div",{})]})}},5891:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(58291),o=n.n(r),a=n(11088);const i=new Map;function s(e,t){const n=`${e}${t}`;let r=i.get(n);return r||(r=async function(e,t){{const n=`${e}${a.IH.replace("{dir}",t?`-${t.replace(/\//g,"-")}`:"")}`;if(new URL(n,location.origin).origin!==location.origin)throw new Error("Unexpected version url");const r=await(await fetch(n)).json(),i=r.map(((e,t)=>{let{documents:n,index:r}=e;return{type:t,documents:n,index:o().Index.load(r)}})),s=r.reduce(((e,t)=>{for(const n of t.index.invertedIndex)/\p{Unified_Ideograph}/u.test(n[0][0])&&e.add(n[0]);return e}),new Set);return{wrappedIndexes:i,zhDictionary:Array.from(s)}}return{wrappedIndexes:[],zhDictionary:[]}}(e,t),i.set(n,r)),r}},32384:(e,t,n)=>{"use strict";n.d(t,{m:()=>c});var r=n(58291),o=n.n(r);var a=n(11088);function i(e){return s(e).concat(s(e.filter((e=>{const t=e[e.length-1];return!t.trailing&&t.maybeTyping})),!0))}function s(e,t){return e.map((e=>({tokens:e.map((e=>e.value)),term:e.map((e=>({value:e.value,presence:o().Query.presence.REQUIRED,wildcard:(t?e.trailing||e.maybeTyping:e.trailing)?o().Query.wildcard.TRAILING:o().Query.wildcard.NONE})))})))}var l=n(69913);function c(e,t,n){return function(r,s){const c=function(e,t){if(1===t.length&&["ja","jp","th"].includes(t[0]))return o()[t[0]].tokenizer(e).map((e=>e.toString()));let n=/[^-\s]+/g;return t.includes("zh")&&(n=/\w+|\p{Unified_Ideograph}+/gu),e.toLowerCase().match(n)||[]}(r,a.BH);if(0===c.length)return void s([]);const u=function(e,t){const n=function(e,t){const n=[];return function e(r,o){if(0===r.length)return void n.push(o);const a=r[0];if(/\p{Unified_Ideograph}/u.test(a)){const n=function(e,t){const n=[];return function e(r,o){let a=0,i=!1;for(const s of t)if(r.substr(0,s.length)===s){const t={missed:o.missed,term:o.term.concat({value:s})};r.length>s.length?e(r.substr(s.length),t):n.push(t),i=!0}else for(let t=s.length-1;t>a;t-=1){const l=s.substr(0,t);if(r.substr(0,t)===l){a=t;const s={missed:o.missed,term:o.term.concat({value:l,trailing:!0})};r.length>t?e(r.substr(t),s):n.push(s),i=!0;break}}i||(r.length>0?e(r.substr(1),{missed:o.missed+1,term:o.term}):o.term.length>0&&n.push(o))}(e,{missed:0,term:[]}),n.sort(((e,t)=>{const n=e.missed>0?1:0,r=t.missed>0?1:0;return n!==r?n-r:e.term.length-t.term.length})).map((e=>e.term))}(a,t);for(const t of n){const n=o.concat(...t);e(r.slice(1),n)}}else{const t=o.concat({value:a});e(r.slice(1),t)}}(e,[]),n}(e,t);if(0===n.length)return[{tokens:e,term:e.map((e=>({value:e,presence:o().Query.presence.REQUIRED,wildcard:o().Query.wildcard.LEADING|o().Query.wildcard.TRAILING})))}];for(const o of n)o[o.length-1].maybeTyping=!0;const r=[];for(const i of a.BH)if("en"===i)a.sx||r.unshift(o().stopWordFilter);else{const e=o()[i];e.stopWordFilter&&r.unshift(e.stopWordFilter)}let s;if(r.length>0){const e=e=>r.reduce(((e,t)=>e.filter((e=>t(e.value)))),e);s=[];const t=[];for(const r of n){const n=e(r);s.push(n),n.length0&&t.push(n)}n.push(...t)}else s=n.slice();const l=[];for(const o of s)if(o.length>2)for(let e=o.length-1;e>=0;e-=1)l.push(o.slice(0,e).concat(o.slice(e+1)));return i(n).concat(i(l))}(c,t),d=[];e:for(const{term:t,tokens:o}of u)for(const{documents:r,index:a,type:i}of e)if(d.push(...a.query((e=>{for(const n of t)e.term(n.value,{wildcard:n.wildcard,presence:n.presence})})).slice(0,n).filter((e=>!d.some((t=>t.document.i.toString()===e.ref)))).slice(0,n-d.length).map((t=>{const n=r.find((e=>e.i.toString()===t.ref));return{document:n,type:i,page:i!==l.i.Title&&e[0].documents.find((e=>e.i===n.p)),metadata:t.matchData.metadata,tokens:o,score:t.score}}))),d.length>=n)break e;!function(e){e.forEach(((e,t)=>{e.index=t})),e.sort(((t,n)=>{let r=t.type!==l.i.Heading&&t.type!==l.i.Content&&t.type!==l.i.Description||!t.page?t.index:e.findIndex((e=>e.document===t.page)),o=n.type!==l.i.Heading&&n.type!==l.i.Content&&n.type!==l.i.Description||!n.page?n.index:e.findIndex((e=>e.document===n.page));if(-1===r&&(r=t.index),-1===o&&(o=n.index),r===o){const e=(0===n.type?1:0)-(0===t.type?1:0);return 0===e?t.index-n.index:e}return r-o}))}(d),function(e){e.forEach(((t,n)=>{n>0&&t.page&&e.slice(0,n).some((e=>(e.type===l.i.Keywords?e.page:e.document)===t.page))&&(n{"use strict";function r(e){return e.join(" \u203a ")}n.d(t,{$:()=>r})},53103:(e,t,n)=>{"use strict";function r(e){return e.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}n.d(t,{Z:()=>r})},27674:(e,t,n)=>{"use strict";function r(e,t){const n=[];for(const r of Object.values(e))r[t]&&n.push(...r[t].position);return n.sort(((e,t)=>e[0]-t[0]||t[1]-e[1]))}n.d(t,{g:()=>r})},86841:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(53103);function o(e,t,n){const a=[];for(const i of t){const n=e.toLowerCase().indexOf(i);if(n>=0){n>0&&a.push(o(e.substr(0,n),t)),a.push(`${(0,r.Z)(e.substr(n,i.length))}`);const s=n+i.length;s${(0,r.Z)(e)}`:(0,r.Z)(e):a.join("")}},43810:(e,t,n)=>{"use strict";n.d(t,{C:()=>l});var r=n(53103),o=n(86841);const a=/\w+|\p{Unified_Ideograph}/u;function i(e){const t=[];let n=0,r=e;for(;r.length>0;){const o=r.match(a);if(!o){t.push(r);break}o.index>0&&t.push(r.substring(0,o.index)),t.push(o[0]),n+=o.index+o[0].length,r=e.substring(n)}return t}var s=n(11088);function l(e,t,n,a){void 0===a&&(a=s.rG);const{chunkIndex:l,chunks:c}=function(e,t,n){const a=[];let s=0,l=0,c=-1;for(;sl){const t=i(e.substring(l,u)).map((e=>({html:(0,r.Z)(e),textLength:e.length})));for(const e of t)a.push(e)}-1===c&&(c=a.length),l=u+d,a.push({html:(0,o.Z)(e.substring(u,l),n,!0),textLength:d})}}if(l({html:(0,r.Z)(e),textLength:e.length})));for(const e of t)a.push(e)}return{chunkIndex:c,chunks:a}}(e,t,n),u=c.slice(0,l),d=c[l],p=[d.html],f=c.slice(l+1);let h=d.textLength,b=0,m=0,g=!1,v=!1;for(;h0){const e=u.pop();h+e.textLength<=a?(p.unshift(e.html),b+=e.textLength,h+=e.textLength):(g=!0,u.length=0)}else{if(!(f.length>0))break;{const e=f.shift();h+e.textLength<=a?(p.push(e.html),m+=e.textLength,h+=e.textLength):(v=!0,f.length=0)}}return(g||u.length>0)&&p.unshift("\u2026"),(v||f.length>0)&&p.push("\u2026"),p.join("")}},43385:(e,t,n)=>{"use strict";function r(e,t){if("string"==typeof e)return{label:e,path:e};{const{label:n,path:r}=e;return"string"==typeof n?{label:n,path:r}:Object.prototype.hasOwnProperty.call(n,t)?{label:n[t],path:r}:{label:r,path:r}}}n.d(t,{p:()=>r})},11088:(e,t,n)=>{"use strict";n.d(t,{CU:()=>a,UB:()=>f,tb:()=>c,O6:()=>m,I$:()=>h,BH:()=>r,sx:()=>o,ZG:()=>p,WW:()=>u,pk:()=>d,Hg:()=>b,IH:()=>i,rG:()=>l,AT:()=>s,dz:()=>g});n(58291);const r=["en"],o=!1,a=null,i="search-index{dir}.json?_=ef178721",s=8,l=50,c=!1,u=!0,d=!0,p="right",f=void 0,h=!0,b=null,m=!1,g=!1},69913:(e,t,n)=>{"use strict";var r;n.d(t,{i:()=>r}),function(e){e[e.Title=0]="Title",e[e.Heading=1]="Heading",e[e.Description=2]="Description",e[e.Keywords=3]="Keywords",e[e.Content=4]="Content"}(r||(r={}))},20053:(e,t,n)=>{"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;to});const o=function(){for(var e,t,n=0,o="";n{"use strict";n.d(t,{zR:()=>w,TM:()=>C,yJ:()=>f,sC:()=>A,AO:()=>p});var r=n(58168);function o(e){return"/"===e.charAt(0)}function a(e,t){for(var n=t,r=n+1,o=e.length;r=0;p--){var f=i[p];"."===f?a(i,p):".."===f?(a(i,p),d++):d&&(a(i,p),d--)}if(!c)for(;d--;d)i.unshift("..");!c||""===i[0]||i[0]&&o(i[0])||i.unshift("");var h=i.join("/");return n&&"/"!==h.substr(-1)&&(h+="/"),h};var s=n(11561);function l(e){return"/"===e.charAt(0)?e:"/"+e}function c(e){return"/"===e.charAt(0)?e.substr(1):e}function u(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function p(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function f(e,t,n,o){var a;"string"==typeof e?(a=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var a=t.indexOf("?");return-1!==a&&(n=t.substr(a),t=t.substr(0,a)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e),a.state=t):(void 0===(a=(0,r.A)({},e)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(s){throw s instanceof URIError?new URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):s}return n&&(a.key=n),o?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=i(a.pathname,o.pathname)):a.pathname=o.pathname:a.pathname||(a.pathname="/"),a}function h(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var a="function"==typeof e?e(t,n):e;"string"==typeof a?"function"==typeof r?r(a,o):o(!0):o(!1!==a)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;rt?n.splice(t,n.length-t,o):n.push(o),d({action:r,location:o,index:t,entries:n})}}))},replace:function(e,t){var r="REPLACE",o=f(e,t,b(),w.location);u.confirmTransitionTo(o,r,n,(function(e){e&&(w.entries[w.index]=o,d({action:r,location:o}))}))},go:y,goBack:function(){y(-1)},goForward:function(){y(1)},canGo:function(e){var t=w.index+e;return t>=0&&t{"use strict";var r=n(44363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(h){var o=f(n);o&&o!==h&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var s=l(t),b=l(n),m=0;m{"use strict";e.exports=function(e,t,n,r,o,a,i,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,s],u=0;(l=new Error(t.replace(/%s/g,(function(){return c[u++]})))).name="Invariant Violation"}throw l.framesToPop=1,l}}},64634:e=>{e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},58291:(e,t,n)=>{var r,o;!function(){var a,i,s,l,c,u,d,p,f,h,b,m,g,v,y,w,k,x,S,_,E,C,T,A,D,j,P,L,O,N,R=function(e){var t=new R.Builder;return t.pipeline.add(R.trimmer,R.stopWordFilter,R.stemmer),t.searchPipeline.add(R.stemmer),e.call(t,t),t.build()};R.version="2.3.9",R.utils={},R.utils.warn=(a=this,function(e){a.console&&console.warn&&console.warn(e)}),R.utils.asString=function(e){return null==e?"":e.toString()},R.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),n=Object.keys(e),r=0;r0){var l=R.utils.clone(t)||{};l.position=[i,s],l.index=o.length,o.push(new R.Token(n.slice(i,a),l))}i=a+1}}return o},R.tokenizer.separator=/[\s\-]+/,R.Pipeline=function(){this._stack=[]},R.Pipeline.registeredFunctions=Object.create(null),R.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&R.utils.warn("Overwriting existing registered function: "+t),e.label=t,R.Pipeline.registeredFunctions[e.label]=e},R.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||R.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},R.Pipeline.load=function(e){var t=new R.Pipeline;return e.forEach((function(e){var n=R.Pipeline.registeredFunctions[e];if(!n)throw new Error("Cannot load unregistered function: "+e);t.add(n)})),t},R.Pipeline.prototype.add=function(){Array.prototype.slice.call(arguments).forEach((function(e){R.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},R.Pipeline.prototype.after=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");n+=1,this._stack.splice(n,0,t)},R.Pipeline.prototype.before=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var n=this._stack.indexOf(e);if(-1==n)throw new Error("Cannot find existingFn");this._stack.splice(n,0,t)},R.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},R.Pipeline.prototype.run=function(e){for(var t=this._stack.length,n=0;n1&&(ae&&(n=o),a!=e);)r=n-t,o=t+Math.floor(r/2),a=this.elements[2*o];return a==e||a>e?2*o:as?c+=2:i==s&&(t+=n[l+1]*r[c+1],l+=2,c+=2);return t},R.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},R.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,n=0;t0){var a,i=o.str.charAt(0);i in o.node.edges?a=o.node.edges[i]:(a=new R.TokenSet,o.node.edges[i]=a),1==o.str.length&&(a.final=!0),r.push({node:a,editsRemaining:o.editsRemaining,str:o.str.slice(1)})}if(0!=o.editsRemaining){if("*"in o.node.edges)var s=o.node.edges["*"];else{s=new R.TokenSet;o.node.edges["*"]=s}if(0==o.str.length&&(s.final=!0),r.push({node:s,editsRemaining:o.editsRemaining-1,str:o.str}),o.str.length>1&&r.push({node:o.node,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)}),1==o.str.length&&(o.node.final=!0),o.str.length>=1){if("*"in o.node.edges)var l=o.node.edges["*"];else{l=new R.TokenSet;o.node.edges["*"]=l}1==o.str.length&&(l.final=!0),r.push({node:l,editsRemaining:o.editsRemaining-1,str:o.str.slice(1)})}if(o.str.length>1){var c,u=o.str.charAt(0),d=o.str.charAt(1);d in o.node.edges?c=o.node.edges[d]:(c=new R.TokenSet,o.node.edges[d]=c),1==o.str.length&&(c.final=!0),r.push({node:c,editsRemaining:o.editsRemaining-1,str:u+o.str.slice(2)})}}}return n},R.TokenSet.fromString=function(e){for(var t=new R.TokenSet,n=t,r=0,o=e.length;r=e;t--){var n=this.uncheckedNodes[t],r=n.child.toString();r in this.minimizedNodes?n.parent.edges[n.char]=this.minimizedNodes[r]:(n.child._str=r,this.minimizedNodes[r]=n.child),this.uncheckedNodes.pop()}},R.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},R.Index.prototype.search=function(e){return this.query((function(t){new R.QueryParser(e,t).parse()}))},R.Index.prototype.query=function(e){for(var t=new R.Query(this.fields),n=Object.create(null),r=Object.create(null),o=Object.create(null),a=Object.create(null),i=Object.create(null),s=0;s1?1:e},R.Builder.prototype.k1=function(e){this._k1=e},R.Builder.prototype.add=function(e,t){var n=e[this._ref],r=Object.keys(this._fields);this._documents[n]=t||{},this.documentCount+=1;for(var o=0;o=this.length)return R.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},R.QueryLexer.prototype.width=function(){return this.pos-this.start},R.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},R.QueryLexer.prototype.backup=function(){this.pos-=1},R.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=R.QueryLexer.EOS&&this.backup()},R.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(R.QueryLexer.TERM)),e.ignore(),e.more())return R.QueryLexer.lexText},R.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.EDIT_DISTANCE),R.QueryLexer.lexText},R.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.BOOST),R.QueryLexer.lexText},R.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(R.QueryLexer.TERM)},R.QueryLexer.termSeparator=R.tokenizer.separator,R.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==R.QueryLexer.EOS)return R.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return R.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if(t.match(R.QueryLexer.termSeparator))return R.QueryLexer.lexTerm}else e.escapeCharacter()}},R.QueryParser=function(e,t){this.lexer=new R.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},R.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=R.QueryParser.parseClause;e;)e=e(this);return this.query},R.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},R.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},R.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},R.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case R.QueryLexer.PRESENCE:return R.QueryParser.parsePresence;case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:var n="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(n+=" with value '"+t.str+"'"),new R.QueryParseError(n,t.start,t.end)}},R.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=R.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=R.Query.presence.REQUIRED;break;default:var n="unrecognised presence operator'"+t.str+"'";throw new R.QueryParseError(n,t.start,t.end)}var r=e.peekLexeme();if(null==r){n="expecting term or field, found nothing";throw new R.QueryParseError(n,t.start,t.end)}switch(r.type){case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:n="expecting term or field, found '"+r.type+"'";throw new R.QueryParseError(n,r.start,r.end)}}},R.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var n=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),r="unrecognised field '"+t.str+"', possible fields: "+n;throw new R.QueryParseError(r,t.start,t.end)}e.currentClause.fields=[t.str];var o=e.peekLexeme();if(null==o){r="expecting term, found nothing";throw new R.QueryParseError(r,t.start,t.end)}if(o.type===R.QueryLexer.TERM)return R.QueryParser.parseTerm;r="expecting term, found '"+o.type+"'";throw new R.QueryParseError(r,o.start,o.end)}},R.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var n=e.peekLexeme();if(null!=n)switch(n.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:var r="Unexpected lexeme type '"+n.type+"'";throw new R.QueryParseError(r,n.start,n.end)}else e.nextClause()}},R.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="edit distance must be numeric";throw new R.QueryParseError(r,t.start,t.end)}e.currentClause.editDistance=n;var o=e.peekLexeme();if(null!=o)switch(o.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+o.type+"'";throw new R.QueryParseError(r,o.start,o.end)}else e.nextClause()}},R.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var n=parseInt(t.str,10);if(isNaN(n)){var r="boost must be numeric";throw new R.QueryParseError(r,t.start,t.end)}e.currentClause.boost=n;var o=e.peekLexeme();if(null!=o)switch(o.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:r="Unexpected lexeme type '"+o.type+"'";throw new R.QueryParseError(r,o.start,o.end)}else e.nextClause()}},void 0===(o="function"==typeof(r=function(){return R})?r.call(t,n,t,e):r)||(e.exports=o)}()},10119:(e,t,n)=>{"use strict";n.r(t)},51043:(e,t,n)=>{"use strict";n.r(t)},5947:function(e,t,n){var r,o;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function o(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}function i(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var a=n.render(!t),c=a.querySelector(r.barSelector),u=r.speed,d=r.easing;return a.offsetWidth,s((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(c,i(e,u,d)),1===e?(l(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout((function(){l(a,{transition:"all "+u+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),u)}),u)):setTimeout(t,u)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),s=e?"-100":a(n.status||0),c=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&f(o),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}function o(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=o(t),e.style[t]=n}return function(e,t){var n,r,o=arguments;if(2==o.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,o[1],o[2])}}();function c(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(o="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=o)},35302:(e,t,n)=>{var r=n(64634);e.exports=h,e.exports.parse=a,e.exports.compile=function(e,t){return l(a(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=f;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,r=[],a=0,s=0,l="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var d=n[0],p=n[1],f=n.index;if(l+=e.slice(s,f),s=f+d.length,p)l+=p[1];else{var h=e[s],b=n[2],m=n[3],g=n[4],v=n[5],y=n[6],w=n[7];l&&(r.push(l),l="");var k=null!=b&&null!=h&&h!==b,x="+"===y||"*"===y,S="?"===y||"*"===y,_=b||c,E=g||v,C=b||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:m||a++,prefix:b||"",delimiter:_,optional:S,repeat:x,partial:k,asterisk:!!w,pattern:E?u(E):w?".*":i(_,C)})}}return s-1?"[^"+c(e)+"]+?":c(t)+"|(?:(?!"+c(t)+")[^"+c(e)+"])+?"}function s(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function l(e,t){for(var n=new Array(e.length),o=0;o{!function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={pattern:/(^(["']?)\w+\2)[ \t]+\S.*/,lookbehind:!0,alias:"punctuation",inside:null},r={bash:n,environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--|\+\+|\*\*=?|<<=?|>>=?|&&|\|\||[=!+\-*/%<>^&|]=?|[?~:]/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)[\w-]+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b[\w-]+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},parameter:{pattern:/(^|\s)-{1,2}(?:\w+:[+-]?)?\w+(?:\.\w+)*(?=[=\s]|$)/,alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:r},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0,inside:{bash:n}},{pattern:/(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,lookbehind:!0,greedy:!0,inside:r},{pattern:/(^|[^$\\])'[^']*'/,lookbehind:!0,greedy:!0},{pattern:/\$'(?:[^'\\]|\\[\s\S])*'/,greedy:!0,inside:{entity:r.entity}}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:r.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:case|do|done|elif|else|esac|fi|for|function|if|in|select|then|until|while)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|alias|bind|break|builtin|caller|cd|command|continue|declare|echo|enable|eval|exec|exit|export|getopts|hash|help|let|local|logout|mapfile|printf|pwd|read|readarray|readonly|return|set|shift|shopt|source|test|times|trap|type|typeset|ulimit|umask|unalias|unset)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:false|true)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|=[=~]?|!=?|<<[<-]?|[&\d]?>>|\d[<>]&?|[<>][&=]?|&[>&]?|\|[&|]?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}},n.inside=e.languages.bash;for(var o=["comment","function-name","for-or-select","assign-left","parameter","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],a=r.variable[1].inside,i=0;i{!function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(//g,(function(){return t.source}))),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism)},19700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof a&&!a(e))return e;for(var o,s=i.length;-1!==n.code.indexOf(o=t(r,s));)++s;return i[s]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(s){for(var l=0;l=a.length);l++){var c=s[l];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=a[o],d=n.tokenStack[u],p="string"==typeof c?c:c.content,f=t(r,u),h=p.indexOf(f);if(h>-1){++o;var b=p.substring(0,h),m=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),g=p.substring(h+f.length),v=[];b&&v.push.apply(v,i([b])),v.push(m),g&&v.push.apply(v,i([g])),"string"==typeof c?s.splice.apply(s,[l,1].concat(v)):c.content=v}}else c.content&&i(c.content)}return s}(n.tokens)}}}})}(Prism)},43537:()=>{Prism.languages.solidity=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,lookbehind:!0},keyword:/\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|from|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,operator:/=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/}),Prism.languages.insertBefore("solidity","keyword",{builtin:/\b(?:address|bool|byte|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|string|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/}),Prism.languages.insertBefore("solidity","number",{version:{pattern:/([<>]=?|\^)\d+\.\d+\.\d+\b/,lookbehind:!0,alias:"number"}}),Prism.languages.sol=Prism.languages.solidity},70132:()=>{!function(e){var t=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function n(e){return e.replace(/__/g,(function(){return t}))}e.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(n(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(n(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}}(Prism)},73518:(e,t,n)=>{var r={"./prism-bash":57022,"./prism-java":96976,"./prism-solidity":43537,"./prism-toml":70132};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=73518},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},5556:(e,t,n)=>{e.exports=n(2694)()},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},22551:(e,t,n)=>{"use strict";var r=n(96540),o=n(69982);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n

prune512.

validate-config

besu validate-config --config-file <PATH-TO-CONFIG-FILE>
-

Performs basic syntax validation of the specified configuration file. Checks TOML syntax (for example, valid format and unmatched quotes) and flags unknown options. Doesn't check data types, and doesn't check dependencies between options (this is done at Besu startup).

+

Performs basic syntax validation of the specified configuration file. Checks TOML syntax (for example, valid format and unmatched quotes) and flags unknown options. Doesn't check data types, and doesn't check dependencies between options (this is done at Besu startup).

\ No newline at end of file diff --git a/public-networks/reference/disclosure.html b/public-networks/reference/disclosure.html index e5c63b62894..fd007e44bf6 100644 --- a/public-networks/reference/disclosure.html +++ b/public-networks/reference/disclosure.html @@ -10,14 +10,14 @@ - - + +

Security disclosure policy

At Besu, security is a priority. But regardless of how much effort we put into system security, there might still be vulnerabilities present. If you discover a vulnerability, we need to know about it so we can take steps to address it as quickly as possible. We would like you to help us better protect our clients and our systems.

-

Please follow the process explained on defect response wiki page.

+

Please follow the process explained on defect response wiki page.

\ No newline at end of file diff --git a/public-networks/reference/engine-api.html b/public-networks/reference/engine-api.html index 6350aeef441..ded29c62d94 100644 --- a/public-networks/reference/engine-api.html +++ b/public-networks/reference/engine-api.html @@ -10,8 +10,8 @@ - - + + @@ -101,6 +101,6 @@