1"use strict";(globalThis.webpackChunkpublic_docs=globalThis.webpackChunkpublic_docs||[]).push([[6279],{11470(e,t,a){a.d(t,{A:()=>N});var n=a(96540),r=a(34164),s=a(17559),o=a(23104),i=a(56347),l=a(205),d=a(57485),c=a(31682),h=a(70679);function p(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 <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)})?.filter(Boolean)??[]}function u(e){const{values:t,children:a}=e;return(0,n.useMemo)(()=>{const e=t??function(e){return p(e).map(({props:{value:e,label:t,attributes:a,default:n}})=>({value:e,label:t,attributes:a,default:n}))}(a);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 <Tabs>. Every value needs to be unique.`)}(e),e},[t,a])}function m({value:e,tabValues:t}){return t.some(t=>t.value===e)}function g({queryString:e=!1,groupId:t}){const a=(0,i.W6)(),r=function({queryString:e=!1,groupId:t}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!t)throw new Error('Docusaurus error: The <Tabs> 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:e,groupId:t});return[(0,d.aZ)(r),(0,n.useCallback)(e=>{if(!r)return;const t=new URLSearchParams(a.location.search);t.set(r,e),a.replace({...a.location,search:t.toString()})},[r,a])]}function f(e){const{defaultValue:t,queryString:a=!1,groupId:r}=e,s=u(e),[o,i]=(0,n.useState)(()=>function({defaultValue:e,tabValues:t}){if(0===t.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(e){if(!m({value:e,tabValues:t}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${e}" 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 e}const a=t.find(e=>e.default)??t[0];if(!a)throw new Error("Unexpected error: 0 tabValues");return a.value}({defaultValue:t,tabValues:s})),[d,c]=g({queryString:a,groupId:r}),[p,f]=function({groupId:e}){const t=function(e){return e?`docusaurus.tab.${e}`:null}(e),[a,r]=(0,h.Dv)(t);return[a,(0,n.useCallback)(e=>{t&&r.set(e)},[t,r])]}({groupId:r}),x=(()=>{const e=d??p;return m({value:e,tabValues:s})?e:null})();(0,l.A)(()=>{x&&i(x)},[x]);return{selectedValue:o,selectValue:(0,n.useCallback)(e=>{if(!m({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);i(e),c(e),f(e)},[c,f,s]),tabValues:s}}var x=a(92303);const b="tabList__CuJ",v="tabItem_LNqP";var y=a(74848);function k({className:e,block:t,selectedValue:a,selectValue:n,tabValues:s}){const i=[],{blockElementScrollPositionUntilNextRender:l}=(0,o.a_)(),d=e=>{const t=e.currentTarget,r=i.indexOf(t),o=s[r].value;o!==a&&(l(t),n(o))},c=e=>{let t=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const a=i.indexOf(e.currentTarget)+1;t=i[a]??i[0];break}case"ArrowLeft":{const a=i.indexOf(e.currentTarget)-1;t=i[a]??i[i.length-1];break}}t?.focus()};return(0,y.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},e),children:s.map(({value:e,label:t,attributes:n})=>(0,y.jsx)("li",{role:"tab",tabIndex:a===e?0:-1,"aria-selected":a===e,ref:e=>{i.push(e)},onKeyDown:c,onClick:d,...n,className:(0,r.A)("tabs__item",v,n?.className,{"tabs__item--active":a===e}),children:t??e},e))})}function w({lazy:e,children:t,selectedValue:a}){const s=(Array.isArray(t)?t:[t]).filter(Boolean);if(e){const e=s.find(e=>e.props.value===a);return e?(0,n.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,y.jsx)("div",{className:"margin-top--md",children:s.map((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==a}))})}function j(e){const t=f(e);return(0,y.jsxs)("div",{className:(0,r.A)(s.G.tabs.container,"tabs-container",b),children:[(0,y.jsx)(k,{...t,...e}),(0,y.jsx)(w,{...t,...e})]})}function N(e){const t=(0,x.A)();return(0,y.jsx)(j,{...e,children:p(e.children)},String(t))}},19365(e,t,a){a.d(t,{A:()=>
1o});a(96540);var n=a(34164);const r="tabItem_Ymn6";var s=a(74848);function o({children:e,hidden:t,className:a}){return(0,s.jsx)("div",{role:"tabpanel",className:(0,n.A)(r,a),hidden:t,children:e})}},27756(e){e.exports=JSON.parse('{"permalink":"/data/snapshots","source":"@site/data/snapshots/index.mdx","title":"Ethereum Client Snapshots","description":"Node data directory snapshots for clients across different Ethereum networks. Regularly updated snapshots help you quickly sync nodes for testing environments.","date":"2026-08-17T04:05:48.000Z","tags":[{"inline":true,"label":"execution-client","permalink":"/data/tags/execution-client"},{"inline":true,"label":"ethereum-node","permalink":"/data/tags/ethereum-node"},{"inline":true,"label":"snapshots","permalink":"/data/tags/snapshots"}],"hasTruncateMarker":false,"authors":[],"frontMatter":{"slug":"snapshots","title":"Ethereum Client Snapshots","description":"Node data directory snapshots for clients across different Ethereum networks. Regularly updated snapshots help you quickly sync nodes for testing environments.","image":"/img/blog/snapshots.jpg","tags":["execution-client","ethereum-node","snapshots"]},"unlisted":false,"prevItem":{"title":"Xatu - Table explorer","permalink":"/data/xatu/tables"},"nextItem":{"title":"Xatu - Fusaka experimental data","permalink":"/data/xatu/forks/fusaka"}}')},28453(e,t,a){a.d(t,{R:()=>o,x:()=>i});var n=a(96540);const r={},s=n.createContext(r);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(r):e.components||r:o(e.components),n.createElement(s.Provider,{value:t},e.children)}},36628(e,t,a){a.r(t),a.d(t,{assets:()=>u,contentTitle:()=>p,default:()=>f,frontMatter:()=>h,metadata:()=>n,toc:()=>m});var n=a(27756),r=a(74848),s=a(28453),o=a(80571),i=a(56067),l=a(11470),d=a(19365),c=a(66362);const h={slug:"snapshots",title:"Ethereum Client Snapshots",description:"Node data directory snapshots for clients across different Ethereum networks. Regularly updated snapshots help you quickly sync nodes for testing environments.",image:"/img/blog/snapshots.jpg",tags:["execution-client","ethereum-node","snapshots"]},p="Ethereum Client Snapshots",u={authorsImageUrls:[]},m=[{value:"Recent snapshots",id:"recent-snapshots",level:2},{value:"Quickstart",id:"quickstart",level:2},{value:"TLDR: Just use Docker to download and untar the snapshot",id:"tldr-just-use-docker-to-download-and-untar-the-snapshot",level:3},{value:"Detailed example: Getting a Hoodi Geth data dir snapshot",id:"detailed-example-getting-a-hoodi-geth-data-dir-snapshot",level:3},{value:"Snapshot generation status",id:"snapshot-generation-status",level:2}];function g(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.A,{children:(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Disclaimer:"}),"\nThe snapshots provided are intended solely for testing and development purposes. They are not guaranteed\nto reflect the current state, data, or functionality of the canonical Ethereum Network. Use of these\nsnapshots is at your own risk, and no representations or warranties, either express or implied, are made\nregarding their accuracy, completeness, or reliability in comparison to the Ethereum Network. These\nsnapshots should not be used in production or as a substitute for interacting with the canonical Ethereum Network.\nAlways manually verify the state against the Ethereum Network to ensure consistency and accuracy."]})}),"\n",(0,r.jsx)(t.h2,{id:"recent-snapshots",children:"Recent snapshots"}),"\n",(0,r.jsxs)(t.p,{children:["These snapshots are ",(0,r.jsx)(t.a,{href:"#snapshot-generation-status",children:"regularly updated"})," and at the same block height. They can help you quickly sync your node."]}),"\n",(0,r.jsx)("div",{className:"snapshot-module",children:(0,r.jsxs)(l.A,{className:"data-tabs",queryString:"snapshot-network",children:[(0,r.jsx)(d.A,{value:"mainnet",label:"\ud83c\udf10 Mainnet",children:(0,r.jsx)(o.A,{network:"mainnet"})}),(0,r.jsx)(d.A,{value:"sepolia",label:"\ud83d\udc2c Sepolia",children:(0,r.jsx)(o.A,{network:"sepolia"})}),(0,r.jsx)(d.A,{value:"hoodi",label:"\ud83e\udd9a Hoodi",children:(0,r.jsx)(o.A,{network:"hoodi"})}),(0,r.jsx)(d.A,{value:"more",label:"\ud83d\udccb More...",children:(0,r.jsxs)(l.A,{className:"data-tabs",queryString:"more-snapsh
1ot-network",children:[(0,r.jsx)(d.A,{value:"holesky",label:"\ud83d\udc31 Holesky",children:(0,r.jsx)(o.A,{network:"holesky"})}),(0,r.jsx)(d.A,{value:"perf-devnet-2",label:"\ud83d\udd27 Perf Devnet-2",children:(0,r.jsx)(o.A,{network:"perf-devnet-2"})}),(0,r.jsx)(d.A,{value:"perf-devnet-3",label:"\ud83d\udd27 Perf Devnet-3",children:(0,r.jsx)(o.A,{network:"perf-devnet-3"})})]})})]})}),"\n",(0,r.jsx)(t.h2,{id:"quickstart",children:"Quickstart"}),"\n",(0,r.jsx)(t.h3,{id:"tldr-just-use-docker-to-download-and-untar-the-snapshot",children:"TLDR: Just use Docker to download and untar the snapshot"}),"\n",(0,r.jsx)(t.p,{children:"If you have docker installed, this is the easiest way to download and untar a snapshot, without having to install any other dependencies:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'docker run --rm -it \\\n -e ETH_NETWORK=hoodi \\\n -e ETH_CLIENT=geth \\\n -e YOUR_USER=$UID \\\n -v $PWD:/data \\\n --entrypoint "/bin/sh" \\\n alpine -c \\\n \'apk add --no-cache wget curl tar zstd && \\\n export BLOCK_NUMBER=$(curl -s https://snapshots.ethpandaops.io/$ETH_NETWORK/$ETH_CLIENT/latest) && \\\n echo \\"Downloading snapshot for block number: $BLOCK_NUMBER\\" && \\\n wget --tries=0 --retry-connrefused -O - https://snapshots.ethpandaops.io/$ETH_NETWORK/$ETH_CLIENT/$BLOCK_NUMBER/snapshot.tar.zst | \\\n tar -I zstd -xvf - -C /data && \\\n chown -R $YOUR_USER:$YOUR_USER /data\'\n'})}),"\n",(0,r.jsx)(t.h3,{id:"detailed-example-getting-a-hoodi-geth-data-dir-snapshot",children:"Detailed example: Getting a Hoodi Geth data dir snapshot"}),"\n",(0,r.jsx)(t.p,{children:"Verify when the latest snapshot was taken:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"# Get the most recent block number for a snapshot\nexport BLOCK_NUMBER=$(curl -s https://snapshots.ethpandaops.io/hoodi/geth/latest)\necho $BLOCK_NUMBER\n\n# Check information about the latest block:\ncurl -s https://snapshots.ethpandaops.io/hoodi/geth/$BLOCK_NUMBER/_snapshot_eth_getBlockByNumber.json\n\n# Or just get the block number:\nprintf '%d\\n' $(\n curl -s https://snapshots.ethpandaops.io/hoodi/geth/$BLOCK_NUMBER/_snapshot_eth_getBlockByNumber.json |\n jq -r '.result.number'\n)\n\n# Or just the time when it was taken\nprintf '%d\\n' $(\n curl -s https://snapshots.ethpandaops.io/hoodi/geth/$BLOCK_NUMBER/_snapshot_eth_getBlockByNumber.json |\n jq -r '.result.timestamp'\n)\n"})}),"\n",(0,r.jsx)(t.p,{children:"Then, also check which client version was used during the snapshot:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:"# Get client version. Can be important, depending on the version that you want to run.\ncurl -s https://snapshots.ethpandaops.io/hoodi/geth/$BLOCK_NUMBER/_snapshot_web3_clientVersion.json | jq -r '.result'\n"})}),"\n",(0,r.jsx)(t.p,{children:"If you're happy with the version and the timestamp of the most recent snapshot, you can download it like:"}),"\n",(0,r.jsx)(t.pre,{children:(0,r.jsx)(t.code,{className:"language-sh",children:'# Download the whole snapshot\nwget --tries=0 --retry-connrefused https://snapshots.ethpandaops.io/hoodi/geth/$BLOCK_NUMBER/snapshot.tar.zst\n\n# Or .. use range requests to be able to resume a download if it fails due to network connectivity issues.\n# This is very useful when downloading big snapshots, e.g. the mainnet ones.\n# Alternatively you can also use tools like `aria2`.\ncurl --continue-at - https://snapshots.ethpandaops.io/hoodi/geth/$BLOCK_NUMBER/snapshot.tar.zst -O\n\n# Or... download and untar at the same time. Safes you disk space, so you don\'t have to store the full compressed file.\nwget --tries=0 --retry-connrefused -O - https://snapshots.ethpandaops.io/hoodi/geth/$BLOCK_NUMBER/snapshot.tar.zst \\\n| tar -I zstd -xvf - -C $PATH_TO_YOUR_GETH_DATA_DIR\n\n# Or.. use a docker container with all the tools you need (curl, zstd, tar) and untar it on the fly\ndocker run --rm -it \\\n -e ETH_NETWORK=hoodi \\\n -e ETH_CLIENT=geth \\\n -v $PWD:/data \\\n --entrypoint "/bin/sh" \\\n alpine -c \\\n \'apk add --no-cache wget curl tar zstd && \\\n export BLOCK_NUMBER=$(curl -s https://snapshots.ethpandaops.io/$ETH_NETWORK/$ETH_CLIENT/latest) && \\\n echo \\"Downloading snapshot for block number: $BLOCK_NUMBER\\" && \\\n wget --tries=0 --retry-connrefused -O - https://snapshots.ethpandaops.io/$ETH_NETWORK/$ETH_CLIENT/$BLOCK_NUMBER/snapshot.tar.zst | \\\n tar -I zstd -xvf - -C /data\'\n'})}),"\n",(0,r.jsx)(t.h2,{id:"snapshot-generation-status",children:"Snapshot generation status"}),"\n",(0,r.jsx)(t.p,{children:"The following shows the current status of snapshot generation for each network.\nYou'll also be able to see when the next snapshot is going to happen.\nIf snapshots are being created, this section will display their progress in real-time."}),"\n",(0,r.jsx)("div",{className:"snapshot-module",children:(0,r.jsxs)(l.A,{className:"data-tabs",queryString:"status-network",children:[(0,r.jsx)(d.A,{value:"mainnet",label:"\ud83c\udf10 Mainnet",children:(0,r.jsx)(i.A,{network:"mainnet"})}),(0,r.jsx)(d.A,{value:"sepolia",label:"\ud83d\udc2c Sepolia",children:(0,r.jsx)(i.A,{network:"sepolia"})}),(0,r.jsx)(d.A,{value:"hoodi",label:"\ud83e\udd9a Hoodi",children:(0,r.jsx)(i.A,{network:"hoodi"})})]})})]})}function f(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(g,{...e})}):g(e)}},56067(e,t,a){a.d(t,{A:()=>
1o});var n=a(96540),r=(a(11470),a(19365),a(74848));const s={loadingContainer:{textAlign:"center",padding:"20px"},loadingSpinner:{display:"inline-block",width:"50px",height:"50px",border:"5px solid rgba(0, 0, 0, 0.1)",borderRadius:"50%",borderTopColor:"var(--ifm-color-primary)",animation:"spin 1s linear infinite",margin:"20px auto"},statusSummary:{backgroundColor:"var(--ifm-card-background-color)",borderRadius:"6px",padding:"15px",marginBottom:"20px",border:"1px solid var(--ifm-color-emphasis-200)"},statusRow:{marginBottom:"10px",display:"flex",gap:"10px",flexWrap:"wrap"},statusItem:{fontWeight:"bold",color:"var(--ifm-color-emphasis-900)"},statusValue:{fontFamily:"monospace",color:"var(--ifm-color-emphasis-800)"},statusCard:{padding:"15px",borderRadius:"6px",marginBottom:"15px",border:"1px solid var(--ifm-color-emphasis-200)",backgroundColor:"var(--ifm-background-color)"},targetGrid:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(250px, 1fr))",gap:"15px",marginTop:"20px"},targetCard:{backgroundColor:"var(--ifm-card-background-color)",borderRadius:"6px",padding:"15px",border:"1px solid var(--ifm-color-emphasis-200)"},running:{color:"var(--ifm-color-primary)",fontWeight:"bold"},success:{color:"var(--ifm-color-success)",fontWeight:"bold"},error:{color:"var(--ifm-color-danger)",fontWeight:"bold"},progressBar:{height:"8px",backgroundColor:"var(--ifm-color-emphasis-200)",borderRadius:"4px",overflow:"hidden",marginTop:"10px"},progressFill:{height:"100%",backgroundColor:"var(--ifm-color-primary)",width:"0%",transition:"width 0.5s ease-in-out",animation:"pulse 2s infinite"},errorMessage:{fontSize:"0.85rem",marginTop:"10px",padding:"5px",backgroundColor:"var(--ifm-color-danger-lightest)",borderRadius:"4px",color:"var(--ifm-color-danger)",border:"1px solid var(--ifm-color-danger-lighter)"},heading:{margin:"0 0 15px 0",color:"var(--ifm-heading-color)"},clientLogo:{width:"30px",height:"30px",marginRight:"8px",objectFit:"contain",borderRadius:"50%",border:"1px solid var(--ifm-color-emphasis-300)",padding:"2px",backgroundColor:"#000"},refreshNote:{textAlign:"center",color:"var(--ifm-color-emphasis-700)",fontSize:"0.9rem",marginTop:"10px"},progressText:{display:"flex",justifyContent:"space-between",marginBottom:"5px",color:"var(--ifm-color-emphasis-800)"},nextRunSection:{marginTop:"15px",padding:"10px 15px",backgroundColor:"var(--ifm-color-emphasis-100)",borderRadius:"6px",border:"1px solid var(--ifm-color-emphasis-200)"},nextRunHeading:{fontSize:"1rem",fontWeight:"bold",marginBottom:"8px",color:"var(--ifm-color-emphasis-900)"}};function o({network:e}){const[t,a]=(0,n.useState)(!0),[o,i]=(0,n.useState)(null),[l,d]=(0,n.useState)(null),[c,h]=(0,n.useState)(0),p={besu:{src:"/img/clients/besu.png",alt:"Besu Logo"},erigon:{src:"/img/clients/erigon.png",alt:"Erigon Logo"},geth:{src:"/img/clients/geth.png",alt:"Geth Logo"},nethermind:{src:"/img/clients/nethermind.png",alt:"Nethermind Logo"},reth:{src:"/img/clients/reth.png",alt:"Reth Logo"}},u=e&&["mainnet","sepolia","hoodi","holesky"].includes(e)?e:"mainnet";function m(e){if(!e||"string"!=typeof e||"0001-01-01T00:00:00Z"===e)return"N/A";try{const t=new Date(e);return isNaN(t.getTime())?"N/A":t.toLocaleDateString()+" "+t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch(o){return console.error("Error formatting date:",o),"N/A"}}function g(e,t){if(!e||"string"!=typeof e||"0001-01-01T00:00:00Z"===e)return"N/A";try{const a=new Date(e);if(isNaN(a.getTime()))return"N/A";let n;t&&"string"==typeof t&&"0001-01-01T00:00:00Z"!==t?(n=new Date(t),isNaN(n.getTime())&&(n=new Date)):n=new Date;const r=n-a,s=Math.floor(r/6e4),o=Math.floor(s/60),i=s%60;return o>0?`${o}h ${i}m`:`${i}m`}catch(o){return console.error("Error calculating elapsed time:",o),"N/A"}}function f(e){if(!e||"string"!=typeof e)return{};switch(e.toLowerCase()){case"running":return s.running;case"success":return s.success;case"error":return s.error;default:return{}}}if((0,n.useEffect)(()=>(()=>{if("undefined"!=typeof document){const e=document.createElement("style");return e.textContent="\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n @keyframes pulse {\n 0% { opacity: 0.6; }\n 50% { opacity: 1; }\n 100% { opacity: 0.6; }\n }\n ",document.head.appendChild(e),()=>{document.head.removeChild(e)}}return()=>{}})(),[]),(0,n.useEffect)(()=>{let e=null;return l?.status?.snapshotInProgress&&(e=setInterval(()=>{h(e=>e+1)},3e4)),()=>{e&&clearInterval(e)}},[l]),(0,n.useEffect)(()=>{!async function(){try{a(!0);const e=await fetch(`https://snapshotter.${u}.ethpandaops.io/api/v1/status`,{cache:"no-store",headers:{"Cache-Control":"no-cache",Pragma:"no-cache"}});if(!e.ok)throw new Error(`HTTP error! status: ${e.status}`);const t=await e.json();console.log(`Status data for ${u}:`,t),d(t),i(null)}catch(o){console.error(`Error fetching status data for ${u}:`,o),i(o.message)}finally{a(!1)}}()},[u,c]),t)return(0,r.jsxs)("div",{style:s.loadingContainer,children:[(0,r.jsx)("div",{style:s.loadingSpinner}),(0,r.jsx)("p",{children:"Loading snapshot status..."})]});if(o)return(0,r.jsxs)("div",{style:{color:"var(--ifm-color-danger)",textAlign:"center",padding:"20px"},children:["Error loading status data: ",o,". Please try again later."]});if(!l)return(0,r.jsx)("div",{style:{textAlign:"center",padding:"20px",color:"var(--ifm-color-emphasis-700)"},children:"No status data available for this network."});const{latestRun:x,status:b}=l,v=x?.targets?.reduce((e,t)=>
1{if(!t||!t.status)return e;const a=t.status.toLowerCase();return e[a]=(e[a]||0)+1,e},{}),y=x?.targets?.length||0,k=(v?.success||0)+(v?.error||0),w=y>0?k/y*100:0,j=b?.nextPeriodSnapshotBlockHeight,N=b?.processedBlockHeight;console.log(`Next snapshot block: ${j}, current processed block: ${N}`);const S=function(e,t){if(null==e)return null;try{const a="number"==typeof e?e:parseInt(e,10),n=null!=t?"number"==typeof t?t:parseInt(t,10):a;if(isNaN(a)||isNaN(n))return null;const r=12*(a-n),s=new Date,o=new Date(s.getTime()+1e3*r);return isNaN(o.getTime())?null:(console.log(`Calculated next snapshot time: ${o.toString()} based on ${a-n} blocks remaining \xd7 12 seconds per block`),o)}catch(o){return console.error("Error calculating next snapshot time:",o),null}}(j,N),C=S?m(S.toISOString()):"Unknown",$=S?function(e){if(!e||!(e instanceof Date)||isNaN(e.getTime()))return"Unknown";try{const t=new Date,a=e-t;if(console.log(`Time until next: ${a}ms, date: ${e.toString()}, now: ${t.toString()}`),a<6e4)return"Soon";const n=Math.floor(a/6e4),r=Math.floor(n/60),s=Math.floor(r/24);return s>0?`in ~${s} day${s>1?"s":""}`:r>0?`in ~${r} hour${r>1?"s":""}`:`in ~${n} minute${n>1?"s":""}`}catch(o){return console.error("Error formatting time until:",o),"Unknown"}}(S):"Unknown";return(0,r.jsxs)("div",{className:"snapshot-status-content",children:[x&&(0,r.jsxs)("div",{style:s.statusCard,children:[(0,r.jsxs)("h3",{style:s.heading,children:["Snapshot Status: ",b?.snapshotInProgress?(0,r.jsx)("span",{style:s.running,children:"In Progress"}):(0,r.jsx)("span",{style:s.success,children:"Complete"})]}),(0,r.jsxs)("div",{style:s.statusSummary,children:[(0,r.jsxs)("div",{style:s.statusRow,children:[(0,r.jsx)("div",{style:s.statusItem,children:"Block Height:"}),(0,r.jsx)("div",{style:s.statusValue,children:x.blockHeight})]}),(0,r.jsxs)("div",{style:s.statusRow,children:[(0,r.jsx)("div",{style:s.statusItem,children:"Started:"}),(0,r.jsx)("div",{style:s.statusValue,children:m(x.startTime)})]}),(0,r.jsxs)("div",{style:s.statusRow,children:[(0,r.jsx)("div",{style:s.statusItem,children:"Duration:"}),(0,r.jsx)("div",{style:s.statusValue,children:g(x.startTime,x.endTime)})]}),b?.snapshotInProgress?(0,r.jsxs)("div",{style:{marginTop:"15px"},children:[(0,r.jsxs)("div",{style:s.progressText,children:[(0,r.jsx)("div",{children:"Progress"}),(0,r.jsxs)("div",{children:[k," of ",y," clients completed"]})]}),(0,r.jsx)("div",{style:s.progressBar,children:(0,r.jsx)("div",{style:{...s.progressFill,width:`${w}%`,animation:b?.snapshotInProgress?"pulse 2s infinite":"none"}})})]}):j&&(0,r.jsxs)("div",{style:s.nextRunSection,children:[(0,r.jsx)("div",{style:s.nextRunHeading,children:"Next Snapshot"}),(0,r.jsxs)("div",{style:s.statusRow,children:[(0,r.jsx)("div",{style:s.statusItem,children:"Block:"}),(0,r.jsx)("div",{style:s.statusValue,children:j})]}),(0,r.jsxs)("div",{style:s.statusRow,children:[(0,r.jsx)("div",{style:s.statusItem,children:"Estimated Time:"}),(0,r.jsxs)("div",{style:s.statusValue,children:[C," (",$,")"]})]})]})]}),(0,r.jsx)("h4",{style:{color:"var(--ifm-heading-color)"},children:"Client Status"}),(0,r.jsx)("div",{style:s.targetGrid,children:x.targets?.slice().sort((e,t)=>e.alias.localeCompare(t.alias)).map(e=>(0,r.jsxs)("div",{style:s.targetCard,children:[(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"10px"},children:[(0,r.jsx)("img",{src:p[e.alias]?.src,alt:p[e.alias]?.alt||`${e.alias} logo`,style:s.clientLogo}),(0,r.jsx)("span",{style:{textTransform:"capitalize",fontWeight:"bold",color:"var(--ifm-heading-color)"},children:e.alias})]}),(0,r.jsxs)("div",{style:{fontSize:"0.9rem",marginBottom:"5px",color:"var(--ifm-color-emphasis-800)"},children:[(0,r.jsx)("span",{style:{fontWeight:"bold"},children:"Status: "}),(0,r.jsx)("span",{style:f(e.status),children:e.status})]}),(0,r.jsxs)("div",{style:{fontSize:"0.9rem",marginBottom:"5px",color:"var(--ifm-color-emphasis-800)"},children:[(0,r.jsx)("span",{style:{fontWeight:"bold"},children:"Started: "}),m(e.startTime)]}),"running"!==e.status&&(0,r.jsxs)("div",{style:{fontSize:"0.9rem",marginBottom:"5px",color:"var(--ifm-color-emphasis-800)"},children:[(0,r.jsx)("span",{style:{fontWeight:"bold"},children:"Completed: "}),m(e.endTime)]}),(0,r.jsxs)("div",{style:{fontSize:"0.9rem",color:"var(--ifm-color-emphasis-800)"},children:[(0,r.jsx)("span",{style:{fontWeight:"bold"},children:"Duration: "}),g(e.startTime,e.endTime)]}),e.errorMessage&&(0,r.jsx)("div",{style:s.errorMessage,children:e.errorMessage})]},e.id))})]}),b?.snapshotInProgress&&(0,r.jsx)("div",{style:s.refreshNote,children:"Status auto-refreshes every 30 seconds while snapshot is in progress"})]})}},66362(e,t,a){a.d(t,{A:()=>
1o});a(96540);const n={alert:"alert_dmjp",alertIcon:"alertIcon_W31s",alertContent:"alertContent_sQ4d","alert--info":"alert--info_mi3q","alert--warning":"alert--warning_zHeT","alert--danger":"alert--danger_mlzQ","alert--success":"alert--success_m5Z0"};var r=a(34164),s=a(74848);function o({children:e,type:t="info"}){return(0,s.jsxs)("div",{className:(0,r.A)(n.alert,n[`alert--${t}`]),children:[(0,s.jsxs)("div",{className:n.alertIcon,children:["info"===t&&(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,s.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 15c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1-8h-2V7h2v2z"})}),"warning"===t&&(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,s.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 15h2v-2h-2v2zm0-4h2V7h-2v6z"})}),"danger"===t&&(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,s.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 11c-.55 0-1-.45-1-1V8c0-.55.45-1 1-1s1 .45 1 1v4c0 .55-.45 1-1 1zm1 4h-2v-2h2v2z"})}),"success"===t&&(0,s.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",children:(0,s.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"})})]}),(0,s.jsx)("div",{className:n.alertContent,children:e})]})}},80571(e,t,a){a.d(t,{A:()=>c});var n=a(96540),r=a(74848);const s=["22923350","23861500"],o=["24188300","24331400","24358000"];function i({network:e,client:t}){const[a,i]=(0,n.useState)(!0),[l,d]=(0,n.useState)(null),[c,h]=(0,n.useState)([]),[p,u]=(0,n.use
1State)(1),[m,g]=(0,n.useState)(!0),[f,x]=(0,n.useState)({}),[b,v]=(0,n.useState)({}),[y,k]=(0,n.useState)({}),[w,j]=(0,n.useState)({}),[N,S]=(0,n.useState)(!1),[C,$]=(0,n.useState)({});(0,n.useEffect)(()=>{h([]),u(1),g(!0),i(!0),x({}),v({}),k({}),j({}),S(!1),$({}),"perf-devnet-2"===e||"perf-devnet-3"===e?T():E(1)},[e,t]);const T=async()=>{const a=("perf-devnet-2"===e?s:o).map((a,n)=>({id:`static-${t}-${a}`,status:"success",uploadPrefix:`${e}/${t}/${a}`,startTime:(new Date).toISOString(),endTime:(new Date).toISOString()})).reverse();h(a),g(!1),S(!0),i(!1),_(a),A(a),R(a)};(0,n.useEffect)(()=>{a||1!==p||!m||N||(S(!0),E(2))},[a,p,m,N]);const E=async a=>{try{i(!0);const n=await fetch(`https://snapshotter.${e}.ethpandaops.io/api/v1/targets?alias=${t}&page=${a}`,{cache:"no-store",headers:{"Cache-Control":"no-cache",Pragma:"no-cache"}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);const r=await n.json();if(r.targets&&r.targets.length>0){const e=r.targets.filter(e=>"success"===e.status);e.length>0?(h(t=>[...t,...e]),g(!0),_(e),A(e),R(e)):r.targets.length===e.length&&g(!1)}else g(!1);u(a),i(!1)}catch(l){console.error("Error fetching history data:",l),d(l.message),i(!1),g(!1)}},_=async e=>{const t=e.map(async e=>{try{const t=await fetch(`https://snapshots.ethpandaops.io/${e.uploadPrefix}/snapshot.tar.zst`,{method:"HEAD"});if(t.ok){const a=t.headers.get("content-length");return{id:e.id,size:a?I(Number(a)):"N/A"}}return{id:e.id,size:"N/A"}}catch(l){return console.error(`Error fetching file size for ${e.uploadPrefix}:`,l),{id:e.id,size:"N/A"}}}),a=await Promise.allSettled(t),n={};a.forEach(e=>{"fulfilled"===e.status&&(n[e.value.id]=e.value.size)}),k(e=>({...e,...n}))},A=async e=>{const t=e.map(async e=>{try{const t=D(e.uploadPrefix),a=await fetch(`https://snapshots.ethpandaops.io/${e.uploadPrefix}/_snapshot_eth_getBlockByNumber.json`,{cache:"no-store",headers:{"Cache-Control":"no-cache",Pragma:"no-cache"}});if(a.ok){const n=await a.json();if(n&&n.result)return{id:e.id,blockNumber:n.result.number?parseInt(n.result.number,16).toString():t,blockHash:n.result.hash||null,timestamp:n.result.timestamp?1e3*parseInt(n.result.timestamp,16):null}}return{id:e.id,blockNumber:D(e.uploadPrefix),blockHash:null,timestamp:null}}catch(l){return console.error(`Error fetching block details for ${e.uploadPrefix}:`,l),{id:e.id,blockNumber:D(e.uploadPrefix),blockHash:null,timestamp:null}}}),a=await Promise.allSettled(t),n={};a.forEach(e=>{"fulfilled"===e.status&&(n[e.value.id]=e.value)}),j(e=>({...e,...n}))},R=async e=>{const t={};e.forEach(e=>{t[e.id]=!0}),x(t);const a=e.map(async e=>{try{const t=`https://snapshots.ethpandaops.io/${e.uploadPrefix}`,[a,n]=await Promise.allSettled([fetch(`${t}/_snapshot_metadata.json`),fetch(`${t}/_snapshot_web3_clientVersion.json`)]),r={id:e.id,metadata:null,clientVersion:null};if("fulfilled"===a.status&&a.value.ok){const e=await a.value.json();r.metadata=e}if("fulfilled"===n.status&&n.value.ok){const e=await n.value.json();r.clientVersion=e.result}return r}catch(l){return console.error(`Error fetching additional details for target ${e.id}:`,l),{id:e.id,metadata:null,clientVersion:null}}}),n=await Promise.allSettled(a),r={};n.forEach(e=>{"fulfilled"===e.status&&(r[e.value.id]=e.value)}),v(e=>({...e,...r}));const s={};e.forEach(e=>{s[e.id]=!1}),x(s)},B=e=>{const t=new Date(e);return t.toLocaleDateString()+" "+t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})},D=e=>{if(!e)return"N/A";const t=e.split("/");return t[t.length-1]},I=e=>e?0===e?"0 GB":Math.round(e/Math.pow(1024,3),2)+" GB":"N/A";return l?(0,r.jsxs)("div",{style:{color:"var(--ifm-color-danger)",textAlign:"center",padding:"20px"},children:["Error loading historical data: ",l,". Please try again later."]}):(0,r.jsxs)("div",{className:"snapshot-history",children:[(0,r.jsx)("style",{children:"\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n\n /* Global rule to remove row hover effects in both light and dark modes */\n .snapshot-history table tr,\n .snapshot-history table tr:hover,\n .snapshot-history table tbody tr:hover,\n .snapshot-history table tbody tr,\n .table-container table tr,\n .table-container table tr:hover,\n .table-content tr,\n .table-content tr:hover,\n .table-content tr.clickable-row:hover,\n .table-content tbody tr:hover,\n .snapshot-history .table-content tr:hover,\n .snapshot-history table tr:hover,\n /* Dark mode specific */\n html[data-theme='dark'] .snapshot-history table tr,\n html[data-theme='dark'] .snapshot-history table tr:hover,\n html[data-theme='dark'] .snapshot-history table tbody tr,\n html[data-theme='dark'] .snapshot-history table tbody tr:hover,\n html[data-theme='dark'] .table-container table tr,\n html[data-theme='dark'] .table-container table tr:hover,\n html[data-theme='dark'] .table-content tr,\n html[data-theme='dark'] .table-content tr:hover,\n html[data-theme='dark'] .table-content tbody tr,\n html[data-theme='dark'] .table-content tbody tr:hover,\n html[data-theme='dark'] tr.clickable-row,\n html[data-theme='dark'] tr.clickable-row:hover {\n background-color: transparent !important;\n background: none !important;\n background-image: none !important;\n --ifm-table-stripe-background: transparent !important;\n --ifm-table-background: transparent !important;\n --ifm-table-hover-background: transparent !important;\n }\n\n /* Override Docusaurus table styles */\n .snapshot-history table tr,\n html[data-theme='dark'] .snapshot-history table tr {\n border-top: 1px solid var(--ifm-color-emphasis-200);\n }\n\n .snapshot-history table tr td,\n html[data-theme='dark'] .snapshot-history table tr td {\n background: transparent !important;\n }\n\n /* Remove alternating row colors in dark mode */\n html[data-theme='dark'] .snapshot-history table tbody tr:nth-child(2n),\n html[data-theme='dark'] .snapshot-history table tbody tr:nth-child(2n+1),\n html[data-theme='dark'] .table-content tbody tr:nth-child(2n),\n html[data-theme='dark'] .table-content tbody tr:nth-child(2n+1),\n html[data-theme='dark'] .table-container table tbody tr:nth-child(2n),\n html[data-theme='dark'] .table-container table tbody tr:nth-child(2n+1) {\n background-color: transparent !important;\n background: var(--ifm-background-color) !important;\n }\n\n /* Force all table rows to have the same background */\n html[data-theme='dark'] table tr,\n html[data-theme='dark'] tbody tr {\n background-color: var(--ifm-background-color) !important;\n }\n\n .table-content tr {\n cursor: default !important;\n }\n .clickable-row,\n .clickable-row:hover,\n .clickable-row:active,\n html[data-theme='dark'] .clickable-row,\n html[data-theme='dark'] .clickable-row:hover,\n html[data-theme='dark'] .clickable-row:active {\n cursor: pointer !important;\n background-color: transparent !important;\n background: none !important;\n }\n\n /* Force override any table hover effects from framework */\n tr.clickable-row td,\n tr.clickable-row td:
1hover,\n html[data-theme='dark'] tr.clickable-row td,\n html[data-theme='dark'] tr.clickable-row td:hover {\n background-color: transparent !important;\n background: none !important;\n }\n .metadata-toggle {\n cursor: pointer;\n width: 24px;\n height: 24px;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n transition: transform 0.2s ease-in-out;\n font-weight: bold;\n border-radius: 4px;\n background-color: var(--ifm-color-emphasis-100);\n font-size: 12px;\n line-height: 1;\n }\n .metadata-toggle.expanded {\n transform: rotate(90deg);\n background-color: var(--ifm-color-emphasis-200);\n }\n .metadata-toggle:hover {\n background-color: var(--ifm-color-emphasis-200);\n }\n .metadata-content {\n background-color: var(--ifm-color-emphasis-50);\n border-left: 3px dashed var(--ifm-color-emphasis-300);\n font-size: 0.9rem;\n padding: 10px;\n margin: 0 10px 10px 10px;\n }\n .metadata-row {\n display: flex;\n border-bottom: 1px solid var(--ifm-color-emphasis-200);\n margin-bottom: 5px;\n }\n .metadata-label {\n width: 150px;\n padding: 8px 12px;\n font-weight: bold;\n border-right: 1px solid var(--ifm-color-emphasis-200);\n background-color: var(--ifm-color-emphasis-100);\n }\n .metadata-value {\n flex: 1;\n padding: 8px 12px;\n font-family: monospace;\n background-color: var(--ifm-color-emphasis-0);\n font-size: 0.8rem;\n text-transform: lowercase;\n line-height: 1.4;\n word-break: break-word;\n }\n "}),0!==c.length||a?(0,r.jsxs)("div",{className:"table-container",children:[(0,r.jsx)("table",{className:"table-content",children:(0,r.jsx)("tbody",{children:c.map((t,a)=>{const s=D(t.uploadPrefix),o=w[t.id]||{blockNumber:s,blockHash:null},i=o.blockHash?o.blockHash.slice(0,8)+"...":"",l=new Date(t.startTime),d=new Date(t.endTime)-l,c=`${Math.floor(d/36e5)}h ${Math.floor(d%36e5/6e4)}m`,h=(e=>{const t=Math.floor((new Date-e)/1e3),a={year:31536e3,month:2592e3,week:604800,day:86400,hour:3600,minute:60};for(const[n,r]of Object.entries(a)){const e=Math.floor(t/r);if(e>=1)return`${e} ${n}${1===e?"":"s"} ago`}return"just now"})(l),p=f[t.id],u=b[t.id],m=y[t.id]||"Loading...",g=(x=o.blockNumber)?`https://${"mainnet"===e?"":e+"."}etherscan.io/block/${x}`:null;var x;const v=Boolean(C[t.id]);return(0,r.jsxs)(n.Fragment,{children:[(0,r.jsxs)("tr",{className:"clickable-row",onClick:()=>{return e=t.id,void $(t=>({...t,[e]:!t[e]}));var e},style:{pointerEvents:"auto",cursor:"pointer"},children:[(0,r.jsx)("td",{style:{width:"40px",textAlign:"center",verticalAlign:"middle"},children:(0,r.jsx)("span",{className:"metadata-toggle "+(v?"expanded":""),onClick:e=>{return a=t.id,e.stopPropagation(),void $(e=>({...e,[a]:!e[a]}));var a},style:{pointerEvents:"auto",fontFamily:"system-ui"},children:"\u25b6"})}),(0,r.jsx)("td",{children:g?(0,r.jsxs)("a",{href:g,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--ifm-color-primary)",textDecoration:"none"},onClick:e=>e.stopPropagation(),children:[o.blockNumber,i&&(0,r.jsx)("div",{style:{color:"var(--ifm-color-emphasis-600)",fontSize:"0.75rem",marginTop:"2px"},children:i})]}):(0,r.jsxs)("span",{children:[o.blockNumber,i&&(0,r.jsx)("div",{style:{color:"var(--ifm-color-emphasis-600)",fontSize:"0.75rem",marginTop:"2px"},children:i})]})}),(0,r.jsxs)("td",{children:[B(l),(0,r.jsx)("div",{style:{color:"var(--ifm-color-emphasis-600)",fontSize:"0.75rem",marginTop:"2px"},children:h})]}),(0,r.jsx)("td",{children:(0,r.jsx)("span",{title:"Time taken to upload the snapshot",children:c})}),(0,r.jsx)("td",{style:{whiteSpace:"nowrap"},children:m}),(0,r.jsx)("td",{children:(0,r.jsx)("a",{href:`https://snapshots.ethpandaops.io/${t.uploadPrefix}/snapshot.tar.zst`,className:"button button--primary button--sm",style:{float:"right",marginLeft:"auto",display:"block"},onClick:e=>e.stopPropagation(),children:"Download"})})]}),v&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:"6",style:{padding:"0px !important"},children:(0,r.jsx)("div",{className:"metadata-content",children:p?(0,r.jsxs)("div",{className:"metadata-row",children:[(0,r.jsx)("div",{className:"metadata-label",children:"Status"}),(0,r.jsxs)("div",{className:"metadata-value",style:{display:"flex",alignItems:"center",gap:"10px"},children:[(0,r.jsx)("div",{style:{display:"inline-block",width:"20px",height:"20px",border:"3px solid white",borderRadius:"50%",borderTopColor:"var(--tw-prose-links, #3182ce)",animation:"spin 1s linear infinite"}}),(0,r.jsx)("span",{style:{textTransform:"none"},children:"Loading details..."})]})]}):(0,r.jsxs)(r.Fragment,{children:[u?.clientVersion&&(0,r.jsxs)("div",{className:"metadata-row",children:[(0,r.jsx)("div",{className:"metadata-label",children:"Version"}),(0,r.jsx)("div",{className:"metadata-value",children:u.clientVersion})]}),o.blockHash&&(0,r.jsxs)("div",{className:"metadata-row",children:[(0,r.jsx)("div",{className:"metadata-label",children:"Block Hash"}),(0,r.jsx)("div",{className:"metadata-value",children:o.blockHash})]}),u?.metadata&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"metadata-row",children:[(0,r.jsx)("div",{className:"metadata-label",children:"Docker Image"}),(0,r.jsx)("div",{className:"metadata-value",children:u.metadata.docker_image||"Not available"})]}),u.metadata.static&&u.metadata.static.extra_args&&(0,r.jsxs)("div",{className:"metadata-row",children:[(0,r.jsx)("div",{className:"metadata-label",children:"Extra Args"}),(0,r.jsx)("div",{className:"metadata-value",children:u.metadata.static.extra_args.replace(/,\s/g," ")})]})]}),!u?.clientVersion&&!o.blockHash&&!u?.metadata&&(0,r.jsxs)("div",{className:"metadata-row",children:[(0,r.jsx)("div",{className:"metadata-label",children:"Details"}),(0,r.jsx)("div",{className:"metadata-value",children:(0,r.jsx)("span",{style:{color:"var(--ifm-color-emphasis-600)",textTransform:"none"},children:"No additional details available"})})]})]})})})})]},a)})})}),m&&N&&(0,r.jsx)("div",{style:{textAlign:"center",margin:"20px 0"},children:(0,r.jsx)("button",{onClick:()=>
1{m&&!a&&E(p+1)},disabled:a,className:"button button--secondary",children:a?"Loading...":"Load More"})})]}):(0,r.jsx)("div",{style:{textAlign:"center",padding:"20px"},children:"No historical snapshot data available."}),a&&(0,r.jsxs)("div",{style:{textAlign:"center",padding:"20px"},children:[(0,r.jsx)("div",{style:{display:"inline-block",width:"25px",height:"25px",border:"3px solid white",borderRadius:"50%",borderTopColor:"var(--tw-prose-links, #3182ce)",animation:"spin 1s linear infinite",margin:"10px auto"}}),(0,r.jsx)("p",{children:"Loading historical data..."})]})]})}function l({network:e,client:t}){const[a,s]=(0,n.useState)(!1);return(0,r.jsxs)("div",{className:"snapshot-client-history",style:{marginTop:"10px",marginBottom:"20px"},children:[(0,r.jsx)("div",{style:{display:"flex",justifyContent:"center",marginBottom:a?"15px":"0",padding:"0",borderRadius:"20px"},children:(0,r.jsx)("button",{onClick:()=>s(!a),className:"button button--secondary button--sm",style:{width:"100%",textAlign:"center"},children:a?`Hide all ${t.charAt(0).toUpperCase()+t.slice(1)} snapshots for ${e.charAt(0).toUpperCase()+e.slice(1)}`:`Show all ${t.charAt(0).toUpperCase()+t.slice(1)} snapshots for ${e.charAt(0).toUpperCase()+e.slice(1)}`})}),a&&(0,r.jsx)("div",{className:"history-container",style:{padding:"10px",borderRadius:"6px",backgroundColor:"var(--ifm-color-emphasis-100)"},children:(0,r.jsx)(i,{network:e,client:t})})]})}const d={loadingContainer:{textAlign:"center",padding:"20px"},loadingSpinner:{display:"inline-block",width:"50px",height:"50px",border:"5px solid white",borderRadius:"50%",borderTopColor:"var(--tw-prose-links, #3182ce)",animation:"spin 1s linear infinite",margin:"20px auto"},"@keyframes spin":{"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}},metadataSection:{marginBottom:"10px",backgroundColor:"var(--ifm-color-secondary-lightest)",borderRadius:"6px",fontSize:"0.9rem",width:"100%",tableLayout:"fixed"},metadataTable:{width:"100%",borderCollapse:"separate",borderSpacing:"0"},metadataCell:{padding:"8px 12px",borderBottom:"1px solid var(--ifm-color-emphasis-200)"},metadataLabelCell:{fontWeight:"bold",width:"100px",minWidth:"100px",maxWidth:"100px",borderRight:"1px solid var(--ifm-color-emphasis-200)",boxSizing:"border-box",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},metadataValueCell:{width:"auto",textAlign:"left"}};function c({network:e}){const[t,a]=(0,n.useState)(!0),[s,o]=(0,n.useState)(null),[i,c]=(0,n.useState)(null);(0,n.useEffect)(()=>(()=>{if("undefined"!=typeof document){const e=document.createElement("style");return e.textContent="\n @keyframes spin {\n 0% { transform: rotate(0deg); }\n 100% { transform: rotate(360deg); }\n }\n ",document.head.appendChild(e),()=>{document.head.removeChild(e)}}return()=>{}})(),[]);const h=["besu","erigon","geth","nethermind","reth"],p={besu:{src:"/img/clients/besu.png",alt:"Besu Logo"},erigon:{src:"/img/clients/erigon.png",alt:"Erigon Logo"},geth:{src:"/img/clients/geth.png",alt:"Geth Logo"},nethermind:{src:"/img/clients/nethermind.png",alt:"Nethermind Logo"},reth:{src:"/img/clients/reth.png",alt:"Reth Logo"}},u=e&&["mainnet","sepolia","hoodi","holesky","perf-devnet-2","perf-devnet-3"].includes(e)?e:"mainnet";async function m(e){const t=await fetch(e,{cache:"no-store",headers:{"Cache-Control":"no-cache",Pragma:"no-cache"}});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return t.json()}const g=["22923350","23861500"],f=["24188300","24331400","24358000"];
1async function x(e){try{let t,a={network:e,display:e.charAt(0).toUpperCase()+e.slice(1),blockNumbers:[],clientData:[],allSame:!0};const n="perf-devnet-2"===e?g:"perf-devnet-3"===e?f:null;if(n){const e=n[n.length-1];t=h.map(t=>({client:t,blockNumber:e,error:!1}))}else{const a=h.map(async t=>{try{const a=await async function(e){const t=await fetch(e,{cache:"no-store",headers:{"Cache-Control":"no-cache",Pragma:"no-cache"}});if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return t.text()}(`https://snapshots.ethpandaops.io/${e}/${t}/latest`);return{client:t,blockNumber:a.trim(),error:!1}}catch(s){return console.error(`Error fetching block number for ${t}: ${s}`),{client:t,blockNumber:null,error:!0}}});t=await Promise.all(a)}const r=t.map(async({client:t,blockNumber:n,error:r})=>{if(r||!n)return{client:t,error:!0};try{a.blockNumbers.push({number:n,client:t});const[o,i]=await Promise.all([m(`https://snapshots.ethpandaops.io/${e}/${t}/${n}/_snapshot_eth_getBlockByNumber.json`),m(`https://snapshots.ethpandaops.io/${e}/${t}/${n}/_snapshot_web3_clientVersion.json`)]);let l=null;try{l=await m(`https://snapshots.ethpandaops.io/${e}/${t}/${n}/_snapshot_metadata.json`)}catch(r){console.log(`Metadata not available for ${t} at block ${n}`)}const d=o.result.number?parseInt(o.result.number,16).toString():"N/A",c=o.result.hash?o.result.hash.slice(0,8):"N/A",h=(o.result.hash,o.result.timestamp?1e3*parseInt(o.result.timestamp,16):null),p=h?function(e){const t=new Date(e);return t.toLocaleDateString()+" "+t.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}(new Date(h)):"N/A",u=h?function(e){const t=Math.floor((new Date-e)/1e3),a={year:31536e3,month:2592e3,week:604800,day:86400,hour:3600,minute:60};for(const[n,r]of Object.entries(a)){const e=Math.floor(t/r);if(e>=1)return`${e} ${n}${1===e?"":"s"} ago`}return"just now"}(new Date(h)):"N/A",g=i.result||"unknown",f=`https://snapshots.ethpandaops.io/${e}/${t}/${n}/_snapshot_web3_clientVersion.json`,x=`https://${"mainnet"===e?"":e+"."}etherscan.io/block/${d}`,b=`https://snapshots.ethpandaops.io/${e}/${t}/${n}/snapshot.tar.zst`;let v="N/A";try{const e=await fetch(b,{method:"HEAD"});e.ok&&(v=(s=e.headers.get("content-length"))?0===s?"0 GB":Math.round(s/Math.pow(1024,3),2)+" GB":"N/A")}catch(r){console.error(`Error fetching file size for ${t}: ${r}`)}return{client:t,blockNumber:d,blockHash:c,timestamp:p,timeAgoStr:u,clientVersion:g,clientVersionUrl:f,explorerUrl:x,downloadUrl:b,fileSize:v,metadata:l}}catch(r){return console.error(`Error fetching data for ${t}: ${r}`),{client:t,error:!0}}var s});if(a.clientData=await Promise.all(r),a.blockNumbers.length>1){const e=a.blockNumbers[0].number;a.allSame=a.blockNumbers.every(t=>t.number===e)}return a}catch(s){return console.error(`Error fetching network data for ${e}:`,s),{network:e,error:!0}}}return(0,n.useEffect)(()=>{!async function(){try{a(!0);const e=await x(u);c(e),a(!1)}catch(s){console.error("Error fetching data:",s),o(s.message),a(!1)}}()},[u]),t?(0,r.jsxs)("div",{style:d.loadingContainer,children:[(0,r.jsx)("div",{style:d.loadingSpinner}),(0,r.jsx)("p",{children:"Loading snapshot data..."})]}):s?(0,r.jsxs)("div",{style:{color:"red",textAlign:"center",padding:"20px"},children:["Error loading data: ",s,". Please try again later."]}):i?(0,r.jsxs)("div",{className:"snapshot-tab-content",children:[!i.allSame&&(0,r.jsxs)("div",{style:{backgroundColor:"#e85d04",padding:"12px 16px",borderRadius:"6px",marginBottom:"20px"},children:[(0,r.jsx)("strong",{children:"Warning:"})," Not all client snapshots are at the same block height. Some may be more outdated than others."]}),(0,r.jsx)("div",{className:"table-container table-container-snapshot",children:(0,r.jsx)("table",{className:"table-content",children:(0,r.jsx)("tbody",{children:i.clientData.map((t,a)=>(0,r.jsx)(n.Fragment,{children:t.error?(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{style:{textTransform:"capitalize",fontWeight:"500"},children:t.client}),(0,r.jsx)("td",{colSpan:"4",style:{color:"var(--ifm-color-danger)",fontStyle:"italic"},children:"Data not available"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("tr",{style:{backgroundColor:"var(--ifm-color-emphasis-0) !important"},children:[(0,r.jsx)("td",{style:{textTransform:"capitalize",fontWeight:"500"},children:(0,r.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,r.jsx)("img",{src:p[t.client]?.src,alt:p[t.client]?.alt||`${t.client} logo`,style:{width:"40px",height:"40px",marginRight:"8px",objectFit:"contain",borderRadius:"50%",border:"1px solid var(--ifm-color-emphasis-300)",padding:"2px",backgroundColor:"black"}}),t.client]})}),(0,r.jsx)("td",{children:(0,r.jsxs)("a",{href:t.explorerUrl,target:"_blank",rel:"noopener noreferrer",style:{color:"var(--ifm-color-primary)",textDecoration:"none"},children:[t.blockNumber,(0,r.jsx)("div",{style:{color:"var(--ifm-color-emphasis-600)",fontSize:"0.75rem",marginTop:"2px"},children:t.blockHash})]})}),(0,r.jsxs)("td",{children:[t.timestamp,(0,r.jsx)("div",{className:"time-ago",children:t.timeAgoStr})]}),(0,r.jsx)("td",{style:{whiteSpace:"nowrap"},children:t.fileSize}),(0,r.jsx)("td",{children:(0,r.jsx)("a",{href:t.downloadUrl,className:"button button--primary",style:{float:"right",marginLeft:"auto",display:"block"},children:"Download"})})]}),t.metadata&&(0,r.jsx)("tr",{style:{backgroundColor:"var(--ifm-color-emphasis-100) !important"},children:(0,r.jsx)("td",{colSpan:"5",style:{padding:"0px !important"},children:(0,r.jsxs)("div",{style:{marginBottom:"10px",backgroundColor:"var(--ifm-color-secondary-lightest)",borderRadius:"6px",fontSize:"0.9rem",padding:"0px !important",width:"100%"},children:[(0,r.jsxs)("div",{style:{display:"flex",borderBottom:"1px solid var(--ifm-color-emphasis-200)"},children:[(0,r.jsx)("div",{style:{width:"150px",padding:"8px 12px",fontWeight:"bold",borderRight:"1px solid var(--ifm-color-emphasis-200)",backgroundColor:"var(--ifm-color-emphasis-100)"},children:"Version"}),(0,r.jsx)("div",{style:{flex:1,padding:"8px 12px",textTransform:"lowercase",fontFamily:"monospace",backgroundColor:"var(--ifm-color-emphasis-0)",fontSize:"0.8rem"},children:t.clientVersion})]}),(0,r.jsxs)("div",{style:{display:"flex",borderBottom:"1px solid var(--ifm-color-emphasis-200)"},children:[(0,r.jsx)("div",{style:{width:"150px",padding:"8px 12px",fontWeight:"bold",borderRight:"1px solid var(--ifm-color-emphasis-200)",backgroundColor:"var(--ifm-color-emphasis-100)"},children:"Docker Image"}),(0,r.jsx)("div",{style:{flex:1,padding:"8px 12px",textTransform:"lowercase",fontFamily:"monospace",backgroundColor:"var(--ifm-color-emphasis-0)",fontSize:"0.8rem"},children:t.metadata.docker_image})]}),t.metadata.static&&t.metadata.static.extra_args&&(0,r.jsxs)("div",{style:{display:"flex"},children:[(0,r.jsx)("div",{style:{width:"150px",padding:"8px 12px",fontWeight:"bold",borderRight:"1px solid var(--ifm-color-emphasis-200)",backgroundColor:"var(--ifm-color-emphasis-100)"},children:"Extra Args"}),(0,r.jsx)("div",{style:{flex:1,padding:"8px 12px",fontStyle:"code",textTransform:"lowercase",fontFamily:"monospace",backgroundColor:"var(--ifm-color-emphasis-0)",fontSize:"0.8rem"},children:t.metadata.static.extra_args.replace(/,\s/g," ")})]})]})})}),(0,r.jsx)("tr",{style:{backgroundColor:"var(--ifm-color-emphasis-100) !important"},children:(0,r.jsx)("td",{colSpan:"5",style:{padding:"0px !important"},children:(0,r.jsx)(l,{network:e,client:t.client})})})]})},a))})})})]}):(0,r.jsx)("div",{style:{textAlign:"center",padding:"20px"},children:"No data available for this network."})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.