diff --git a/assets/js/0145acbf.a74761bd.js b/assets/js/0145acbf.a74761bd.js
new file mode 100644
index 0000000000..8adc8c49ef
--- /dev/null
+++ b/assets/js/0145acbf.a74761bd.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:1732835441e3,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.1e8981c2.js b/assets/js/01562474.1e8981c2.js
new file mode 100644
index 0000000000..db81e03754
--- /dev/null
+++ b/assets/js/01562474.1e8981c2.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:1732835441e3,sidebarPosition:1,frontMatter:{title:"Use Hardhat",sidebar_position:1,description:"Using Besu with Hardhat",tags:["public networks","private networks"]},sidebar:"publicDocSidebar",previous:{title:"Use Java Flight Recorder",permalink:"/public-networks/how-to/configure-java/java-flight-recorder"},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.6201ec7d.js b/assets/js/02fd2e39.6201ec7d.js
new file mode 100644
index 0000000000..60bf193957
--- /dev/null
+++ b/assets/js/02fd2e39.6201ec7d.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:1732835441e3,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.c8d79967.js b/assets/js/030f9ebf.c8d79967.js
new file mode 100644
index 0000000000..bb73058b48
--- /dev/null
+++ b/assets/js/030f9ebf.c8d79967.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:1732835441e3,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.5a4a58c2.js b/assets/js/06aa37f3.5a4a58c2.js
new file mode 100644
index 0000000000..521c88ebb9
--- /dev/null
+++ b/assets/js/06aa37f3.5a4a58c2.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:1732835441e3,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.8a4a6fb9.js b/assets/js/0821166d.8a4a6fb9.js
new file mode 100644
index 0000000000..4c4efbc890
--- /dev/null
+++ b/assets/js/0821166d.8a4a6fb9.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:1732835441e3,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.8cfc4bf0.js b/assets/js/083d4b51.8cfc4bf0.js
new file mode 100644
index 0000000000..ef874d3d90
--- /dev/null
+++ b/assets/js/083d4b51.8cfc4bf0.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:1732835441e3,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.4ecabb42.js b/assets/js/0c3b97c4.4ecabb42.js
new file mode 100644
index 0000000000..e06cef4a1b
--- /dev/null
+++ b/assets/js/0c3b97c4.4ecabb42.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:1732835441e3,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.2c4e6b65.js b/assets/js/0ea635c0.2c4e6b65.js
new file mode 100644
index 0000000000..8751073e06
--- /dev/null
+++ b/assets/js/0ea635c0.2c4e6b65.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:1732835441e3,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.b296ca30.js b/assets/js/0f663201.b296ca30.js
new file mode 100644
index 0000000000..893dad3fba
--- /dev/null
+++ b/assets/js/0f663201.b296ca30.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:1732835441e3,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.6384e760.js b/assets/js/12718c4a.6384e760.js
new file mode 100644
index 0000000000..7304933b0f
--- /dev/null
+++ b/assets/js/12718c4a.6384e760.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:1732835441e3,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.f5c50b60.js b/assets/js/13034d1e.f5c50b60.js
new file mode 100644
index 0000000000..f07c13f013
--- /dev/null
+++ b/assets/js/13034d1e.f5c50b60.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:1732835441e3,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.aefbb20e.js b/assets/js/13912882.aefbb20e.js
new file mode 100644
index 0000000000..0849410a08
--- /dev/null
+++ b/assets/js/13912882.aefbb20e.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 r=o(74848),t=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:1732835441e3,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:"Reduce storage for Bonsai Tries",permalink:"/public-networks/how-to/bonsai-limit-trie-logs"}},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,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"upgrade-your-besu-node",children:"Upgrade your Besu node"})}),"\n",(0,r.jsx)(n.p,{children:"When upgrading your Besu node, we recommend:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.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,r.jsx)(n.li,{children:"Storing your configuration under version control."}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"ansible",children:"Ansible"}),"\n",(0,r.jsxs)(n.p,{children:["You can use the ",(0,r.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,r.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,r.jsx)(n.strong,{children:"Read Me"})," on the ",(0,r.jsx)(n.a,{href:"https://galaxy.ansible.com/consensys/hyperledger_besu",children:"Ansible Galaxy Besu page"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"The playbook:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsx)(n.li,{children:"Stops Besu."}),"\n",(0,r.jsx)(n.li,{children:"Downloads the updated version."}),"\n",(0,r.jsx)(n.li,{children:"Applies any new configuration."}),"\n",(0,r.jsx)(n.li,{children:"Starts Besu."}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"find-peers-on-restarting",children:"Find peers on restarting"}),"\n",(0,r.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,r.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,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},28453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>d});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 d(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/16350423.d3f292cf.js b/assets/js/16350423.d3f292cf.js
new file mode 100644
index 0000000000..7bed8fc149
--- /dev/null
+++ b/assets/js/16350423.d3f292cf.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:1732835441e3,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.7e090993.js b/assets/js/166cf840.7e090993.js
new file mode 100644
index 0000000000..cfe85fdc6d
--- /dev/null
+++ b/assets/js/166cf840.7e090993.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:1732835441e3,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.404442d7.js b/assets/js/1719a32c.404442d7.js
new file mode 100644
index 0000000000..8642096430
--- /dev/null
+++ b/assets/js/1719a32c.404442d7.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:1732835441e3,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.a2918c92.js b/assets/js/1a78f042.a2918c92.js
new file mode 100644
index 0000000000..5dc5164976
--- /dev/null
+++ b/assets/js/1a78f042.a2918c92.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:1732835441e3,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.a93815ed.js b/assets/js/1b2e0ee9.a93815ed.js
new file mode 100644
index 0000000000..9c489f15f7
--- /dev/null
+++ b/assets/js/1b2e0ee9.a93815ed.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:1732835441e3,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.bc2da7b6.js b/assets/js/1b5bfdea.bc2da7b6.js
new file mode 100644
index 0000000000..4f9795b97c
--- /dev/null
+++ b/assets/js/1b5bfdea.bc2da7b6.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:1732835441e3,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.e922c7db.js b/assets/js/1b73c7ba.e922c7db.js
new file mode 100644
index 0000000000..6a585a3a0f
--- /dev/null
+++ b/assets/js/1b73c7ba.e922c7db.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:1732835441e3,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.bfcbdba1.js b/assets/js/1f29a5e5.bfcbdba1.js
new file mode 100644
index 0000000000..7c9f191ed1
--- /dev/null
+++ b/assets/js/1f29a5e5.bfcbdba1.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:1732835441e3,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.96dd03fa.js b/assets/js/2039806a.96dd03fa.js
new file mode 100644
index 0000000000..4d6d400ea9
--- /dev/null
+++ b/assets/js/2039806a.96dd03fa.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:1732835441e3,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/248beabf.92d8c07d.js b/assets/js/248beabf.92d8c07d.js
new file mode 100644
index 0000000000..f448cbe875
--- /dev/null
+++ b/assets/js/248beabf.92d8c07d.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:1732835441e3,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.50773be3.js b/assets/js/25537021.50773be3.js
new file mode 100644
index 0000000000..62b79453c5
--- /dev/null
+++ b/assets/js/25537021.50773be3.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:1732835441e3,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.80f41b03.js b/assets/js/2712d2e6.80f41b03.js
new file mode 100644
index 0000000000..1ad5076e7f
--- /dev/null
+++ b/assets/js/2712d2e6.80f41b03.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:1732835441e3,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.b3ced2eb.js b/assets/js/27b89368.b3ced2eb.js
new file mode 100644
index 0000000000..1110fab124
--- /dev/null
+++ b/assets/js/27b89368.b3ced2eb.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:1732835441e3,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.d3f94cb4.js b/assets/js/28249022.d3f94cb4.js
new file mode 100644
index 0000000000..28e6327c39
--- /dev/null
+++ b/assets/js/28249022.d3f94cb4.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:1732835441e3,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.11974108.js b/assets/js/297e0bb4.11974108.js
new file mode 100644
index 0000000000..c361ac1f5e
--- /dev/null
+++ b/assets/js/297e0bb4.11974108.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:1732835441e3,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:1732835441e3,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:1732835441e3,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.72f6b4b5.js b/assets/js/2ce131d7.72f6b4b5.js
new file mode 100644
index 0000000000..042ed2dbe7
--- /dev/null
+++ b/assets/js/2ce131d7.72f6b4b5.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:1732835441e3,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.cfad46cd.js b/assets/js/2de980e5.cfad46cd.js
new file mode 100644
index 0000000000..b8a3bb6dba
--- /dev/null
+++ b/assets/js/2de980e5.cfad46cd.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:1732835441e3,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.89e041c6.js b/assets/js/306048a3.89e041c6.js
new file mode 100644
index 0000000000..09bc16565e
--- /dev/null
+++ b/assets/js/306048a3.89e041c6.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:1732835441e3,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.3aaeaf27.js b/assets/js/3234314a.3aaeaf27.js
new file mode 100644
index 0000000000..f780cc4356
--- /dev/null
+++ b/assets/js/3234314a.3aaeaf27.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:1732835441e3,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.4570a5b7.js b/assets/js/356faa2b.4570a5b7.js
new file mode 100644
index 0000000000..c4856a896a
--- /dev/null
+++ b/assets/js/356faa2b.4570a5b7.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:1732835441e3,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.faa92730.js b/assets/js/3624528b.faa92730.js
new file mode 100644
index 0000000000..5bff6a0073
--- /dev/null
+++ b/assets/js/3624528b.faa92730.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:1732835441e3,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.d326efa7.js b/assets/js/37906014.d326efa7.js
new file mode 100644
index 0000000000..8adda3d925
--- /dev/null
+++ b/assets/js/37906014.d326efa7.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:1732835441e3,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.efbb51ed.js b/assets/js/3868ebe2.efbb51ed.js
new file mode 100644
index 0000000000..100f362d72
--- /dev/null
+++ b/assets/js/3868ebe2.efbb51ed.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:1732835441e3,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.83b921c0.js b/assets/js/3917f523.83b921c0.js
new file mode 100644
index 0000000000..0f76da50c6
--- /dev/null
+++ b/assets/js/3917f523.83b921c0.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:1732835441e3,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.292a63cf.js b/assets/js/3a4520c6.292a63cf.js
new file mode 100644
index 0000000000..7efee2227c
--- /dev/null
+++ b/assets/js/3a4520c6.292a63cf.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:1732835441e3,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.844ad898.js b/assets/js/3aaf4567.844ad898.js
new file mode 100644
index 0000000000..20099c90b5
--- /dev/null
+++ b/assets/js/3aaf4567.844ad898.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:1732835441e3,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.53981762.js b/assets/js/3b05cdc2.53981762.js
new file mode 100644
index 0000000000..96bd37ae92
--- /dev/null
+++ b/assets/js/3b05cdc2.53981762.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:1732835441e3,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.39292055.js b/assets/js/3e86fe35.39292055.js
new file mode 100644
index 0000000000..250f8a3405
--- /dev/null
+++ b/assets/js/3e86fe35.39292055.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:1732835441e3,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.03c5567c.js b/assets/js/3f04f830.03c5567c.js
new file mode 100644
index 0000000000..b5443ba139
--- /dev/null
+++ b/assets/js/3f04f830.03c5567c.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:1732835441e3,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.9b781441.js b/assets/js/43d83ec4.9b781441.js
new file mode 100644
index 0000000000..5ac6cfbe50
--- /dev/null
+++ b/assets/js/43d83ec4.9b781441.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:1732835441e3,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.8729effb.js b/assets/js/46ff6f7b.8729effb.js
new file mode 100644
index 0000000000..092ea80342
--- /dev/null
+++ b/assets/js/46ff6f7b.8729effb.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:1732835441e3,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.dd186d6e.js b/assets/js/4a41aaaf.dd186d6e.js
new file mode 100644
index 0000000000..b5636b9259
--- /dev/null
+++ b/assets/js/4a41aaaf.dd186d6e.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:1732835441e3,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.e9adc43e.js b/assets/js/4ba08559.e9adc43e.js
new file mode 100644
index 0000000000..c3e24c1066
--- /dev/null
+++ b/assets/js/4ba08559.e9adc43e.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:1732835441e3,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.14c42baa.js b/assets/js/4d94bde1.14c42baa.js
new file mode 100644
index 0000000000..116eabcfed
--- /dev/null
+++ b/assets/js/4d94bde1.14c42baa.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:()=>i,metadata:()=>l,toc:()=>d});var n=r(74848),a=r(28453),s=r(11470),o=r(19365);const i={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:1732835441e3,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:"Performance 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)(o.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)(o.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:()=>o});r(96540);var n=r(18215);const a={tabItem:"tabItem_Ymn6"};var s=r(74848);function o(e){let{children:t,hidden:r,className:o}=e;return(0,s.jsx)("div",{role:"tabpanel",className:(0,n.A)(a.tabItem,o),hidden:r,children:t})}},11470:(e,t,r)=>{r.d(t,{A:()=>g});var n=r(96540),a=r(18215),s=r(23104),o=r(56347),i=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,o.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),[o,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,i.A)((()=>{w&&u(w)}),[w]);return{selectedValue:o,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:o,tabValues:i}=e;const u=[],{blockElementScrollPositionUntilNextRender:l}=(0,s.a_)(),c=e=>{const t=e.currentTarget,r=u.indexOf(t),a=i[r].value;a!==n&&(l(t),o(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:i.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 o=(Array.isArray(r)?r:[r]).filter(Boolean);if(t){const e=o.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:o.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:()=>o,x:()=>i});var n=r(96540);const a={},s=n.createContext(a);function o(e){const t=n.useContext(s);return n.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(a):e.components||a:o(e.components),n.createElement(s.Provider,{value:t},e.children)}}}]);
\ No newline at end of file
diff --git a/assets/js/4f63be9c.e1d80112.js b/assets/js/4f63be9c.e1d80112.js
new file mode 100644
index 0000000000..445bda93b9
--- /dev/null
+++ b/assets/js/4f63be9c.e1d80112.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:1732835441e3,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.d448862c.js b/assets/js/5576e3f0.d448862c.js
new file mode 100644
index 0000000000..f4863b7623
--- /dev/null
+++ b/assets/js/5576e3f0.d448862c.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:1732835441e3,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.760dfecd.js b/assets/js/55b6f436.760dfecd.js
new file mode 100644
index 0000000000..2bb5baec71
--- /dev/null
+++ b/assets/js/55b6f436.760dfecd.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:1732835441e3,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.70498e35.js b/assets/js/563e4b8b.70498e35.js
new file mode 100644
index 0000000000..bfefcaa9aa
--- /dev/null
+++ b/assets/js/563e4b8b.70498e35.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:1732835441e3,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.18a07e0c.js b/assets/js/5af5c663.18a07e0c.js
new file mode 100644
index 0000000000..dfb8f2989c
--- /dev/null
+++ b/assets/js/5af5c663.18a07e0c.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:1732835441e3,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.434dff30.js b/assets/js/5b178458.434dff30.js
new file mode 100644
index 0000000000..9c3a7dc60b
--- /dev/null
+++ b/assets/js/5b178458.434dff30.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:1732835441e3,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.06284505.js b/assets/js/5c820069.06284505.js
new file mode 100644
index 0000000000..d94c4e9ea7
--- /dev/null
+++ b/assets/js/5c820069.06284505.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:1732835441e3,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.f72a71c4.js b/assets/js/5ec0198e.f72a71c4.js
new file mode 100644
index 0000000000..6e870c32ba
--- /dev/null
+++ b/assets/js/5ec0198e.f72a71c4.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:1732835441e3,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.053e2651.js b/assets/js/66bba352.053e2651.js
new file mode 100644
index 0000000000..0d6e6292ae
--- /dev/null
+++ b/assets/js/66bba352.053e2651.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:1732835441e3,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.78898e78.js b/assets/js/67359d90.78898e78.js
new file mode 100644
index 0000000000..f39fc2b3da
--- /dev/null
+++ b/assets/js/67359d90.78898e78.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:1732835441e3,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.ecd6094c.js b/assets/js/680b46ee.ecd6094c.js
new file mode 100644
index 0000000000..4f7a420676
--- /dev/null
+++ b/assets/js/680b46ee.ecd6094c.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:1732835441e3,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.06756908.js b/assets/js/6c6be066.06756908.js
new file mode 100644
index 0000000000..df111c88bf
--- /dev/null
+++ b/assets/js/6c6be066.06756908.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:1732835441e3,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.72709543.js b/assets/js/6cafcc6f.72709543.js
new file mode 100644
index 0000000000..423aff369d
--- /dev/null
+++ b/assets/js/6cafcc6f.72709543.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.",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:1732835441e3,frontMatter:{title:"Deploy Besu using Kubernetes",description:"Deploy a Besu node using Kubernetes.",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:"Reference",permalink:"/public-networks/reference"}},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.4ccbd05a.js b/assets/js/6d0a1147.4ccbd05a.js
new file mode 100644
index 0000000000..d039c3f815
--- /dev/null
+++ b/assets/js/6d0a1147.4ccbd05a.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:1732835441e3,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.7782cae6.js b/assets/js/6e493491.7782cae6.js
new file mode 100644
index 0000000000..7d5515d8d6
--- /dev/null
+++ b/assets/js/6e493491.7782cae6.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:1732835441e3,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.3dbeef0f.js b/assets/js/6ea682ce.3dbeef0f.js
new file mode 100644
index 0000000000..4137451f32
--- /dev/null
+++ b/assets/js/6ea682ce.3dbeef0f.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:1732835441e3,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