From 27bfb5bd3a0fb21941769d3aef58ddb97ced45bd Mon Sep 17 00:00:00 2001 From: 0xSpaceShard <0xSpaceShard@users.noreply.github.com> Date: Tue, 18 Jun 2024 14:22:01 +0000 Subject: [PATCH] Deploy website - based on 24ed52d435e995f80947dd622450d256709c9577 --- 404.html | 2 +- assets/js/{5fbc5cf1.8e7fc6bf.js => 5fbc5cf1.0b9257a5.js} | 2 +- assets/js/{a5ad27b1.6f4eb162.js => a5ad27b1.19c24872.js} | 2 +- assets/js/b0477c6d.079d8bef.js | 1 + assets/js/b0477c6d.20300e8b.js | 1 - ...{runtime~main.100847be.js => runtime~main.07d34fe8.js} | 2 +- docs/0.0.6/account-impersonation/index.html | 2 +- docs/0.0.6/api/index.html | 2 +- docs/0.0.6/balance/index.html | 2 +- docs/0.0.6/blocks/index.html | 2 +- docs/0.0.6/category/running/index.html | 2 +- docs/0.0.6/dump-load-restart/index.html | 2 +- docs/0.0.6/forking/index.html | 2 +- docs/0.0.6/historic-state/index.html | 2 +- docs/0.0.6/intro/index.html | 2 +- docs/0.0.6/lite/index.html | 2 +- docs/0.0.6/postman/index.html | 2 +- docs/0.0.6/predeployed/index.html | 2 +- docs/0.0.6/running/cli/index.html | 2 +- docs/0.0.6/running/docker/index.html | 2 +- docs/0.0.6/running/install/index.html | 2 +- docs/0.0.6/server-config/index.html | 2 +- docs/0.0.6/starknet-time/index.html | 2 +- docs/account-impersonation/index.html | 2 +- docs/api/index.html | 2 +- docs/balance/index.html | 2 +- docs/blocks/index.html | 2 +- docs/category/running/index.html | 2 +- docs/dump-load-restart/index.html | 2 +- docs/forking/index.html | 2 +- docs/historic-state/index.html | 2 +- docs/intro/index.html | 2 +- docs/lite/index.html | 2 +- docs/next/account-impersonation/index.html | 2 +- docs/next/api/index.html | 4 ++-- docs/next/balance/index.html | 2 +- docs/next/blocks/index.html | 8 +++++--- docs/next/category/running/index.html | 2 +- docs/next/dump-load-restart/index.html | 4 ++-- docs/next/forking/index.html | 2 +- docs/next/historic-state/index.html | 2 +- docs/next/intro/index.html | 2 +- docs/next/lite/index.html | 2 +- docs/next/postman/index.html | 2 +- docs/next/predeployed/index.html | 2 +- docs/next/running/cli/index.html | 2 +- docs/next/running/docker/index.html | 2 +- docs/next/running/install/index.html | 2 +- docs/next/server-config/index.html | 2 +- docs/next/starknet-time/index.html | 2 +- docs/postman/index.html | 2 +- docs/predeployed/index.html | 2 +- docs/running/cli/index.html | 2 +- docs/running/docker/index.html | 2 +- docs/running/install/index.html | 2 +- docs/server-config/index.html | 2 +- docs/starknet-time/index.html | 2 +- index.html | 2 +- markdown-page/index.html | 2 +- 59 files changed, 64 insertions(+), 62 deletions(-) rename assets/js/{5fbc5cf1.8e7fc6bf.js => 5fbc5cf1.0b9257a5.js} (85%) rename assets/js/{a5ad27b1.6f4eb162.js => a5ad27b1.19c24872.js} (58%) create mode 100644 assets/js/b0477c6d.079d8bef.js delete mode 100644 assets/js/b0477c6d.20300e8b.js rename assets/js/{runtime~main.100847be.js => runtime~main.07d34fe8.js} (98%) diff --git a/404.html b/404.html index f599c95f7..c57d52b90 100644 --- a/404.html +++ b/404.html @@ -4,7 +4,7 @@ Page Not Found | Starknet Devnet - + diff --git a/assets/js/5fbc5cf1.8e7fc6bf.js b/assets/js/5fbc5cf1.0b9257a5.js similarity index 85% rename from assets/js/5fbc5cf1.8e7fc6bf.js rename to assets/js/5fbc5cf1.0b9257a5.js index 65f68d9f1..f0f6715c1 100644 --- a/assets/js/5fbc5cf1.8e7fc6bf.js +++ b/assets/js/5fbc5cf1.0b9257a5.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7624],{8946:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>s,metadata:()=>o,toc:()=>d});var a=t(4848),i=t(8453);const s={},r="API",o={id:"api",title:"API",description:"Starknet API",source:"@site/docs/api.md",sourceDirName:".",slug:"/api",permalink:"/starknet-devnet-rs/docs/next/api",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/docs/api.md",tags:[],version:"current",frontMatter:{},sidebar:"docSidebar",previous:{title:"Account impersonation",permalink:"/starknet-devnet-rs/docs/next/account-impersonation"},next:{title:"Account balance",permalink:"/starknet-devnet-rs/docs/next/balance"}},c={},d=[{value:"Starknet API",id:"starknet-api",level:2},{value:"Devnet API",id:"devnet-api",level:2},{value:"Config API",id:"config-api",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h1,{id:"api",children:"API"}),"\n",(0,a.jsx)(n.h2,{id:"starknet-api",children:"Starknet API"}),"\n",(0,a.jsxs)(n.p,{children:["Unlike Pythonic Devnet, which also supported Starknet's gateway and feeder gateway API, Devnet in Rust supports Starknet's JSON-RPC API. Since JSON-RPC v0.6.0, to find out which JSON-RPC version is supported by which Devnet version, check out the ",(0,a.jsx)(n.a,{href:"https://github.com/0xspaceshard/starknet-devnet-rs/releases",children:"releases page"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["The JSON-RPC API is reachable via ",(0,a.jsx)(n.code,{children:"/rpc"})," and ",(0,a.jsx)(n.code,{children:"/"})," (e.g. if spawning Devnet with default settings, these URLs are functionally equivalent: ",(0,a.jsx)(n.code,{children:"http://127.0.0.1:5050/rpc"})," and ",(0,a.jsx)(n.code,{children:"http://127.0.0.1:5050/"}),")"]}),"\n",(0,a.jsx)(n.h2,{id:"devnet-api",children:"Devnet API"}),"\n",(0,a.jsx)(n.p,{children:"Devnet has many other functional features which are available via their own endpoints, which are all mentioned throughout the documentation."}),"\n",(0,a.jsx)(n.h2,{id:"config-api",children:"Config API"}),"\n",(0,a.jsxs)(n.p,{children:["To retrieve the current configuration of Devnet, send a ",(0,a.jsx)(n.code,{children:"GET"})," request to ",(0,a.jsx)(n.code,{children:"/config"}),". Example response is attached below. It can be interpreted as a JSON mapping of CLI input parameters, both specified and default ones, with some irrelevant parameters omitted. So use ",(0,a.jsx)(n.code,{children:"starknet-devnet --help"})," to better understand the meaning of each value, though keep in mind that some of the parameters have slightly modified names."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-json",children:'{\n "seed": 4063802897,\n "total_accounts": 10,\n "account_contract_class_hash": "0x61dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f",\n "predeployed_accounts_initial_balance": "1000000000000000000000",\n "start_time": null,\n "gas_price_wei": 100000000000,\n "gas_price_strk": 100000000000,\n "data_gas_price_wei": 100000000000,\n "data_gas_price_strk": 100000000000,\n "chain_id": "SN_SEPOLIA",\n "dump_on": "exit",\n "dump_path": "dump_path.json",\n "state_archive": "none",\n "fork_config": {\n "url": "http://rpc.pathfinder.equilibrium.co/integration-sepolia/rpc/v0_7",\n "block_number": 26429\n },\n "server_config": {\n "host": "127.0.0.1",\n "port": 5050,\n "timeout": 120,\n "request_body_size_limit": 2000000\n },\n "blocks_on_demand": false,\n "lite_mode": false\n}\n'})})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>o});var a=t(6540);const i={},s=a.createContext(i);function r(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(i):e.components||i:r(e.components),a.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[7624],{8946:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>r,default:()=>p,frontMatter:()=>s,metadata:()=>o,toc:()=>d});var a=t(4848),i=t(8453);const s={},r="API",o={id:"api",title:"API",description:"Starknet API",source:"@site/docs/api.md",sourceDirName:".",slug:"/api",permalink:"/starknet-devnet-rs/docs/next/api",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/docs/api.md",tags:[],version:"current",frontMatter:{},sidebar:"docSidebar",previous:{title:"Account impersonation",permalink:"/starknet-devnet-rs/docs/next/account-impersonation"},next:{title:"Account balance",permalink:"/starknet-devnet-rs/docs/next/balance"}},c={},d=[{value:"Starknet API",id:"starknet-api",level:2},{value:"Devnet API",id:"devnet-api",level:2},{value:"Config API",id:"config-api",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.h1,{id:"api",children:"API"}),"\n",(0,a.jsx)(n.h2,{id:"starknet-api",children:"Starknet API"}),"\n",(0,a.jsxs)(n.p,{children:["Unlike Pythonic Devnet, which also supported Starknet's gateway and feeder gateway API, Devnet in Rust supports Starknet's JSON-RPC API. Since JSON-RPC v0.6.0, to find out which JSON-RPC version is supported by which Devnet version, check out the ",(0,a.jsx)(n.a,{href:"https://github.com/0xspaceshard/starknet-devnet-rs/releases",children:"releases page"}),"."]}),"\n",(0,a.jsxs)(n.p,{children:["The JSON-RPC API is reachable via ",(0,a.jsx)(n.code,{children:"/rpc"})," and ",(0,a.jsx)(n.code,{children:"/"})," (e.g. if spawning Devnet with default settings, these URLs are functionally equivalent: ",(0,a.jsx)(n.code,{children:"http://127.0.0.1:5050/rpc"})," and ",(0,a.jsx)(n.code,{children:"http://127.0.0.1:5050/"}),")"]}),"\n",(0,a.jsx)(n.h2,{id:"devnet-api",children:"Devnet API"}),"\n",(0,a.jsx)(n.p,{children:"Devnet has many other functional features which are available via their own endpoints, which are all mentioned throughout the documentation."}),"\n",(0,a.jsx)(n.h2,{id:"config-api",children:"Config API"}),"\n",(0,a.jsxs)(n.p,{children:["To retrieve the current configuration of Devnet, send a ",(0,a.jsx)(n.code,{children:"GET"})," request to ",(0,a.jsx)(n.code,{children:"/config"}),". Example response is attached below. It can be interpreted as a JSON mapping of CLI input parameters, both specified and default ones, with some irrelevant parameters omitted. So use ",(0,a.jsx)(n.code,{children:"starknet-devnet --help"})," to better understand the meaning of each value, though keep in mind that some of the parameters have slightly modified names."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-json",children:'{\n "seed": 4063802897,\n "total_accounts": 10,\n "account_contract_class_hash": "0x61dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f",\n "predeployed_accounts_initial_balance": "1000000000000000000000",\n "start_time": null,\n "gas_price_wei": 100000000000,\n "gas_price_strk": 100000000000,\n "data_gas_price_wei": 100000000000,\n "data_gas_price_strk": 100000000000,\n "chain_id": "SN_SEPOLIA",\n "dump_on": "exit",\n "dump_path": "dump_path.json",\n "state_archive": "none",\n "fork_config": {\n "url": "http://rpc.pathfinder.equilibrium.co/integration-sepolia/rpc/v0_7",\n "block_number": 26429\n },\n "server_config": {\n "host": "127.0.0.1",\n "port": 5050,\n "timeout": 120,\n "request_body_size_limit": 2000000\n },\n "block_generation": null,\n "lite_mode": false\n}\n'})})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>o});var a=t(6540);const i={},s=a.createContext(i);function r(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(i):e.components||i:r(e.components),a.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/a5ad27b1.6f4eb162.js b/assets/js/a5ad27b1.19c24872.js similarity index 58% rename from assets/js/a5ad27b1.6f4eb162.js rename to assets/js/a5ad27b1.19c24872.js index 9c7944b00..e960dc341 100644 --- a/assets/js/a5ad27b1.6f4eb162.js +++ b/assets/js/a5ad27b1.19c24872.js @@ -1 +1 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5120],{6989:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>l});var r=t(4848),d=t(8453);const s={},i="Dump, load, restart",o={id:"dump-load-restart",title:"Dump, load, restart",description:"Dumping",source:"@site/docs/dump-load-restart.md",sourceDirName:".",slug:"/dump-load-restart",permalink:"/starknet-devnet-rs/docs/next/dump-load-restart",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/docs/dump-load-restart.md",tags:[],version:"current",frontMatter:{},sidebar:"docSidebar",previous:{title:"Blocks",permalink:"/starknet-devnet-rs/docs/next/blocks"},next:{title:"Forking",permalink:"/starknet-devnet-rs/docs/next/forking"}},a={},l=[{value:"Dumping",id:"dumping",level:2},{value:"Loading",id:"loading",level:2},{value:"Loading disclaimer",id:"loading-disclaimer",level:3},{value:"Restarting",id:"restarting",level:2},{value:"Docker",id:"docker",level:2}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,d.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"dump-load-restart",children:"Dump, load, restart"}),"\n",(0,r.jsx)(n.h2,{id:"dumping",children:"Dumping"}),"\n",(0,r.jsx)(n.p,{children:"To preserve your Devnet instance for future use, these are the options:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Dumping on exit (handles Ctrl+C, i.e. SIGINT; doesn't handle SIGKILL):"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ starknet-devnet --dump-on exit --dump-path \n"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Dumping after each block:"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ starknet-devnet --dump-on block --dump-path \n"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Dumping on request requires providing --dump-on mode on the startup. Example usage in ",(0,r.jsx)(n.code,{children:"exit"})," mode (replace ",(0,r.jsx)(n.code,{children:""}),", ",(0,r.jsx)(n.code,{children:""})," and ",(0,r.jsx)(n.code,{children:""})," with your own):"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'$ starknet-devnet --dump-on exit --dump-path \n$ curl -X POST http://:/dump -d \'{ "path": }\' -H "Content-Type: application/json"\n'})}),"\n",(0,r.jsx)(n.h2,{id:"loading",children:"Loading"}),"\n",(0,r.jsx)(n.p,{children:"To load a preserved Devnet instance, the options are:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Loading on startup (note the argument name is not ",(0,r.jsx)(n.code,{children:"--load-path"})," as it was in Devnet-py):"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ starknet-devnet --dump-path \n"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Loading on request:"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'curl -X POST http://:/load -d \'{ "path": }\' -H "Content-Type: application/json"\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Currently, dumping produces a list of received transactions that is stored on disk. Conversely, loading is implemented as the re-execution of transactions from a dump. This means that timestamps of ",(0,r.jsx)(n.code,{children:"StarknetBlock"})," will be different on each load."]}),"\n",(0,r.jsx)(n.h3,{id:"loading-disclaimer",children:"Loading disclaimer"}),"\n",(0,r.jsx)(n.p,{children:"Dumping and loading are not guaranteed to work across versions. I.e. if you dumped one version of Devnet, do not expect it to be loadable with a different version."}),"\n",(0,r.jsxs)(n.p,{children:["If you dumped a Devnet utilizing one class for account predeployment (e.g. ",(0,r.jsx)(n.code,{children:"--account-class cairo0"}),"), you should use the same option when loading. The same applies for dumping a Devnet in ",(0,r.jsx)(n.code,{children:"--blocks-on-demand"})," mode."]}),"\n",(0,r.jsx)(n.h2,{id:"restarting",children:"Restarting"}),"\n",(0,r.jsxs)(n.p,{children:["Devnet can be restarted by making a ",(0,r.jsx)(n.code,{children:"POST /restart"})," request (no body required). All of the deployed contracts (including predeployed), blocks and storage updates will be restarted to the original state, without the transactions and requests that may have been loaded from a dump file on startup."]}),"\n",(0,r.jsxs)(n.p,{children:["If you're using ",(0,r.jsx)(n.a,{href:"https://github.com/0xSpaceShard/starknet-hardhat-plugin#restart",children:(0,r.jsx)(n.strong,{children:"the Hardhat plugin"})}),", restart with ",(0,r.jsx)(n.code,{children:"starknet.devnet.restart()"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"docker",children:"Docker"}),"\n",(0,r.jsx)(n.p,{children:"To enable dumping and loading with dockerized Devnet, you must bind the container path to the path on your host machine."}),"\n",(0,r.jsx)(n.p,{children:"This example:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Relies on ",(0,r.jsx)(n.a,{href:"https://docs.docker.com/storage/bind-mounts/",children:"Docker bind mount"}),"; try ",(0,r.jsx)(n.a,{href:"https://docs.docker.com/storage/volumes/",children:"Docker volume"})," instead."]}),"\n",(0,r.jsxs)(n.li,{children:["Assumes that ",(0,r.jsx)(n.code,{children:"/path/to/dumpdir"})," exists. If unsure, use absolute paths."]}),"\n",(0,r.jsxs)(n.li,{children:["Assumes you are listening on ",(0,r.jsx)(n.code,{children:"127.0.0.1:5050"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["If there is ",(0,r.jsx)(n.code,{children:"mydump"})," inside ",(0,r.jsx)(n.code,{children:"/path/to/dumpdir"}),", you can load it with:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"docker run \\\n -p 127.0.0.1:5050:5050 \\\n --mount type=bind,source=/path/to/dumpdir,target=/path/to/dumpdir \\\n shardlabs/starknet-devnet-rs \\\n --dump-path /path/to/dumpdir/mydump\n"})}),"\n",(0,r.jsxs)(n.p,{children:["To dump to ",(0,r.jsx)(n.code,{children:"/path/to/dumpdir/mydump"})," on Devnet shutdown, run:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"docker run \\\n -p 127.0.0.1:5050:5050 \\\n --mount type=bind,source=/path/to/dumpdir,target=/path/to/dumpdir \\\n shardlabs/starknet-devnet-rs \\\n --dump-on exit --dump-path /path/to/dumpdir/mydump\n"})})]})}function h(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var r=t(6540);const d={},s=r.createContext(d);function i(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5120],{6989:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>h,frontMatter:()=>s,metadata:()=>o,toc:()=>l});var r=t(4848),d=t(8453);const s={},i="Dump, load, restart",o={id:"dump-load-restart",title:"Dump, load, restart",description:"Dumping",source:"@site/docs/dump-load-restart.md",sourceDirName:".",slug:"/dump-load-restart",permalink:"/starknet-devnet-rs/docs/next/dump-load-restart",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/docs/dump-load-restart.md",tags:[],version:"current",frontMatter:{},sidebar:"docSidebar",previous:{title:"Blocks",permalink:"/starknet-devnet-rs/docs/next/blocks"},next:{title:"Forking",permalink:"/starknet-devnet-rs/docs/next/forking"}},a={},l=[{value:"Dumping",id:"dumping",level:2},{value:"Loading",id:"loading",level:2},{value:"Loading disclaimer",id:"loading-disclaimer",level:3},{value:"Restarting",id:"restarting",level:2},{value:"Docker",id:"docker",level:2}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,d.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.h1,{id:"dump-load-restart",children:"Dump, load, restart"}),"\n",(0,r.jsx)(n.h2,{id:"dumping",children:"Dumping"}),"\n",(0,r.jsx)(n.p,{children:"To preserve your Devnet instance for future use, these are the options:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Dumping on exit (handles Ctrl+C, i.e. SIGINT; doesn't handle SIGKILL):"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ starknet-devnet --dump-on exit --dump-path \n"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Dumping after each block:"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ starknet-devnet --dump-on block --dump-path \n"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Dumping on request requires providing --dump-on mode on the startup. Example usage in ",(0,r.jsx)(n.code,{children:"exit"})," mode (replace ",(0,r.jsx)(n.code,{children:""}),", ",(0,r.jsx)(n.code,{children:""})," and ",(0,r.jsx)(n.code,{children:""})," with your own):"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'$ starknet-devnet --dump-on exit --dump-path \n$ curl -X POST http://:/dump -d \'{ "path": }\' -H "Content-Type: application/json"\n'})}),"\n",(0,r.jsx)(n.h2,{id:"loading",children:"Loading"}),"\n",(0,r.jsx)(n.p,{children:"To load a preserved Devnet instance, the options are:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Loading on startup (note the argument name is not ",(0,r.jsx)(n.code,{children:"--load-path"})," as it was in Devnet-py):"]}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"$ starknet-devnet --dump-path \n"})}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"Loading on request:"}),"\n"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:'curl -X POST http://:/load -d \'{ "path": }\' -H "Content-Type: application/json"\n'})}),"\n",(0,r.jsxs)(n.p,{children:["Currently, dumping produces a list of received transactions that is stored on disk. Conversely, loading is implemented as the re-execution of transactions from a dump. This means that timestamps of ",(0,r.jsx)(n.code,{children:"StarknetBlock"})," will be different on each load."]}),"\n",(0,r.jsx)(n.h3,{id:"loading-disclaimer",children:"Loading disclaimer"}),"\n",(0,r.jsx)(n.p,{children:"Dumping and loading are not guaranteed to work across versions. I.e. if you dumped one version of Devnet, do not expect it to be loadable with a different version."}),"\n",(0,r.jsxs)(n.p,{children:["If you dumped a Devnet utilizing one class for account predeployment (e.g. ",(0,r.jsx)(n.code,{children:"--account-class cairo0"}),"), you should use the same option when loading. The same applies for dumping a Devnet in ",(0,r.jsx)(n.code,{children:"--block-generation-on demand"})," mode."]}),"\n",(0,r.jsx)(n.h2,{id:"restarting",children:"Restarting"}),"\n",(0,r.jsxs)(n.p,{children:["Devnet can be restarted by making a ",(0,r.jsx)(n.code,{children:"POST /restart"})," request (no body required). All of the deployed contracts (including predeployed), blocks and storage updates will be restarted to the original state, without the transactions and requests that may have been loaded from a dump file on startup."]}),"\n",(0,r.jsxs)(n.p,{children:["If you're using ",(0,r.jsx)(n.a,{href:"https://github.com/0xSpaceShard/starknet-hardhat-plugin#restart",children:(0,r.jsx)(n.strong,{children:"the Hardhat plugin"})}),", restart with ",(0,r.jsx)(n.code,{children:"starknet.devnet.restart()"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"docker",children:"Docker"}),"\n",(0,r.jsx)(n.p,{children:"To enable dumping and loading with dockerized Devnet, you must bind the container path to the path on your host machine."}),"\n",(0,r.jsx)(n.p,{children:"This example:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Relies on ",(0,r.jsx)(n.a,{href:"https://docs.docker.com/storage/bind-mounts/",children:"Docker bind mount"}),"; try ",(0,r.jsx)(n.a,{href:"https://docs.docker.com/storage/volumes/",children:"Docker volume"})," instead."]}),"\n",(0,r.jsxs)(n.li,{children:["Assumes that ",(0,r.jsx)(n.code,{children:"/path/to/dumpdir"})," exists. If unsure, use absolute paths."]}),"\n",(0,r.jsxs)(n.li,{children:["Assumes you are listening on ",(0,r.jsx)(n.code,{children:"127.0.0.1:5050"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["If there is ",(0,r.jsx)(n.code,{children:"mydump"})," inside ",(0,r.jsx)(n.code,{children:"/path/to/dumpdir"}),", you can load it with:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"docker run \\\n -p 127.0.0.1:5050:5050 \\\n --mount type=bind,source=/path/to/dumpdir,target=/path/to/dumpdir \\\n shardlabs/starknet-devnet-rs \\\n --dump-path /path/to/dumpdir/mydump\n"})}),"\n",(0,r.jsxs)(n.p,{children:["To dump to ",(0,r.jsx)(n.code,{children:"/path/to/dumpdir/mydump"})," on Devnet shutdown, run:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"docker run \\\n -p 127.0.0.1:5050:5050 \\\n --mount type=bind,source=/path/to/dumpdir,target=/path/to/dumpdir \\\n shardlabs/starknet-devnet-rs \\\n --dump-on exit --dump-path /path/to/dumpdir/mydump\n"})})]})}function h(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>o});var r=t(6540);const d={},s=r.createContext(d);function i(e){const n=r.useContext(s);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:i(e.components),r.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b0477c6d.079d8bef.js b/assets/js/b0477c6d.079d8bef.js new file mode 100644 index 000000000..98e79d13d --- /dev/null +++ b/assets/js/b0477c6d.079d8bef.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5186],{686:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>s,contentTitle:()=>r,default:()=>b,frontMatter:()=>a,metadata:()=>l,toc:()=>i});var o=t(4848),c=t(8453);const a={},r="Blocks",l={id:"blocks",title:"Blocks",description:"Devnet starts with a genesis block (with a block number equal to 0). In forking mode, the genesis block number will be equal to the forked block number plus one.",source:"@site/docs/blocks.md",sourceDirName:".",slug:"/blocks",permalink:"/starknet-devnet-rs/docs/next/blocks",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/docs/blocks.md",tags:[],version:"current",frontMatter:{},sidebar:"docSidebar",previous:{title:"Account balance",permalink:"/starknet-devnet-rs/docs/next/balance"},next:{title:"Dump, load, restart",permalink:"/starknet-devnet-rs/docs/next/dump-load-restart"}},s={},i=[{value:"Creating blocks on demand",id:"creating-blocks-on-demand",level:2},{value:"Automatic periodic block creation",id:"automatic-periodic-block-creation",level:2},{value:"Create an empty block",id:"create-an-empty-block",level:2},{value:"Abort blocks",id:"abort-blocks",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,c.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"blocks",children:"Blocks"}),"\n",(0,o.jsx)(n.p,{children:"Devnet starts with a genesis block (with a block number equal to 0). In forking mode, the genesis block number will be equal to the forked block number plus one."}),"\n",(0,o.jsxs)(n.p,{children:["A new block is generated based on the pending block, once a new block is generated the pending block is restarted. By default, a new block is generated with each new transaction, but you can also ",(0,o.jsx)(n.a,{href:"#create-an-empty-block",children:"create an empty block by yourself"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"creating-blocks-on-demand",children:"Creating blocks on demand"}),"\n",(0,o.jsxs)(n.p,{children:["If you start Devnet with the ",(0,o.jsx)(n.code,{children:"--block-generation-on demand"})," CLI option, you will enable the possibility to store more than one transaction in the pending block (targetable via block tag ",(0,o.jsx)(n.code,{children:'"pending"'}),")."]}),"\n",(0,o.jsxs)(n.p,{children:["Once you've added the desired transactions into the pending block, you can send a ",(0,o.jsx)(n.code,{children:"POST"})," request to ",(0,o.jsx)(n.code,{children:"/create_block"}),". This will convert the pending block to the latest block (targetable via block tag ",(0,o.jsx)(n.code,{children:'"latest"'}),"), giving it a block hash and a block number. All subsequent transactions will be stored in a new pending block."]}),"\n",(0,o.jsx)(n.p,{children:"In case of demanding block creation with no pending transactions, a new empty block will be generated."}),"\n",(0,o.jsx)(n.p,{children:"The creation of the genesis block is not affected by this feature."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"POST /create_block\n"})}),"\n",(0,o.jsx)(n.p,{children:"Response:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"{'block_hash': '0x115e1b390cafa7942b6ab141ab85040defe7dee9bef3bc31d8b5b3d01cc9c67'}\n"})}),"\n",(0,o.jsx)(n.h2,{id:"automatic-periodic-block-creation",children:"Automatic periodic block creation"}),"\n",(0,o.jsxs)(n.p,{children:["Devnet started with the ",(0,o.jsx)(n.code,{children:"--block-generation-on "})," CLI option, will behave like in ",(0,o.jsx)(n.code,{children:"demand"})," mode but new blocks will be mined automatically in time intervals."]}),"\n",(0,o.jsx)(n.h2,{id:"create-an-empty-block",children:"Create an empty block"}),"\n",(0,o.jsxs)(n.p,{children:["To create an empty block without transactions, ",(0,o.jsx)(n.code,{children:"POST"})," a request to ",(0,o.jsx)(n.code,{children:"/create_block"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"POST /create_block\n"})}),"\n",(0,o.jsx)(n.p,{children:"Response:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'{"block_hash": "0x115e1b390cafa7942b6ab141ab85040defe7dee9bef3bc31d8b5b3d01cc9c67"}\n'})}),"\n",(0,o.jsx)(n.h2,{id:"abort-blocks",children:"Abort blocks"}),"\n",(0,o.jsx)(n.p,{children:"This functionality allows simulating block abortion that can occur on mainnet."}),"\n",(0,o.jsx)(n.p,{children:"You can abort blocks and revert transactions from the specified block to the currently latest block. Newly created blocks after the abortion will have accepted status and will continue with numbering where the last accepted block left off."}),"\n",(0,o.jsx)(n.p,{children:"The state of Devnet will be reverted to the state of the last accepted block."}),"\n",(0,o.jsx)(n.p,{children:"E.g. assume there are 3 accepted blocks numbered 1, 2 and 3. Upon receiving a request to abort blocks starting with block 2, the blocks numbered 2 and 3 are aborted and their transactions reverted. The state of network will be as it was in block 1. Once a new block is mined, it will be accepted and it will have number 2."}),"\n",(0,o.jsx)(n.p,{children:"Aborted blocks can only be queried by block hash. Aborting the blocks in forking origin and already aborted blocks is not supported and results in an error."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'POST /abort_blocks\n{\n "starting_block_hash": BLOCK_HASH\n}\n'})}),"\n",(0,o.jsx)(n.p,{children:"Response:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'{\n "aborted": [BLOCK_HASH_0, BLOCK_HASH_1, ...]\n}\n'})})]})}function b(e={}){const{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>l});var o=t(6540);const c={},a=o.createContext(c);function r(e){const n=o.useContext(a);return o.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(c):e.components||c:r(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/b0477c6d.20300e8b.js b/assets/js/b0477c6d.20300e8b.js deleted file mode 100644 index bd2ee85f1..000000000 --- a/assets/js/b0477c6d.20300e8b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([[5186],{686:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>r,default:()=>b,frontMatter:()=>s,metadata:()=>a,toc:()=>i});var o=t(4848),c=t(8453);const s={},r="Blocks",a={id:"blocks",title:"Blocks",description:"Devnet starts with a genesis block (with a block number equal to 0). In forking mode, the genesis block number will be equal to the forked block number plus one.",source:"@site/docs/blocks.md",sourceDirName:".",slug:"/blocks",permalink:"/starknet-devnet-rs/docs/next/blocks",draft:!1,unlisted:!1,editUrl:"https://github.com/0xSpaceShard/starknet-devnet-rs/blob/master/website/docs/blocks.md",tags:[],version:"current",frontMatter:{},sidebar:"docSidebar",previous:{title:"Account balance",permalink:"/starknet-devnet-rs/docs/next/balance"},next:{title:"Dump, load, restart",permalink:"/starknet-devnet-rs/docs/next/dump-load-restart"}},l={},i=[{value:"Creating blocks on demand",id:"creating-blocks-on-demand",level:2},{value:"Create an empty block",id:"create-an-empty-block",level:2},{value:"Abort blocks",id:"abort-blocks",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",p:"p",pre:"pre",...(0,c.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.h1,{id:"blocks",children:"Blocks"}),"\n",(0,o.jsx)(n.p,{children:"Devnet starts with a genesis block (with a block number equal to 0). In forking mode, the genesis block number will be equal to the forked block number plus one."}),"\n",(0,o.jsxs)(n.p,{children:["A new block is generated based on the pending block, once a new block is generated the pending block is restarted. By default, a new block is generated with each new transaction, but you can also ",(0,o.jsx)(n.a,{href:"#create-an-empty-block",children:"create an empty block by yourself"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"creating-blocks-on-demand",children:"Creating blocks on demand"}),"\n",(0,o.jsxs)(n.p,{children:["If you start Devnet with the ",(0,o.jsx)(n.code,{children:"--blocks-on-demand"})," CLI option, you will enable the possibility to store more than one transaction in the pending block (targetable via block tag ",(0,o.jsx)(n.code,{children:'"pending"'}),")."]}),"\n",(0,o.jsxs)(n.p,{children:["Once you've added the desired transactions into the pending block, you can send a ",(0,o.jsx)(n.code,{children:"POST"})," request to ",(0,o.jsx)(n.code,{children:"/create_block"}),". This will convert the pending block to the latest block (targetable via block tag ",(0,o.jsx)(n.code,{children:'"latest"'}),"), giving it a block hash and a block number. All subsequent transactions will be stored in a new pending block."]}),"\n",(0,o.jsx)(n.p,{children:"In case of demanding block creation with no pending transactions, a new empty block will be generated."}),"\n",(0,o.jsx)(n.p,{children:"The creation of the genesis block is not affected by this feature."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"POST /create_block\n"})}),"\n",(0,o.jsx)(n.p,{children:"Response:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"{'block_hash': '0x115e1b390cafa7942b6ab141ab85040defe7dee9bef3bc31d8b5b3d01cc9c67'}\n"})}),"\n",(0,o.jsx)(n.h2,{id:"create-an-empty-block",children:"Create an empty block"}),"\n",(0,o.jsxs)(n.p,{children:["To create an empty block without transactions, ",(0,o.jsx)(n.code,{children:"POST"})," a request to ",(0,o.jsx)(n.code,{children:"/create_block"}),":"]}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:"POST /create_block\n"})}),"\n",(0,o.jsx)(n.p,{children:"Response:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'{"block_hash": "0x115e1b390cafa7942b6ab141ab85040defe7dee9bef3bc31d8b5b3d01cc9c67"}\n'})}),"\n",(0,o.jsx)(n.h2,{id:"abort-blocks",children:"Abort blocks"}),"\n",(0,o.jsx)(n.p,{children:"This functionality allows simulating block abortion that can occur on mainnet."}),"\n",(0,o.jsx)(n.p,{children:"You can abort blocks and revert transactions from the specified block to the currently latest block. Newly created blocks after the abortion will have accepted status and will continue with numbering where the last accepted block left off."}),"\n",(0,o.jsx)(n.p,{children:"The state of Devnet will be reverted to the state of the last accepted block."}),"\n",(0,o.jsx)(n.p,{children:"E.g. assume there are 3 accepted blocks numbered 1, 2 and 3. Upon receiving a request to abort blocks starting with block 2, the blocks numbered 2 and 3 are aborted and their transactions reverted. The state of network will be as it was in block 1. Once a new block is mined, it will be accepted and it will have number 2."}),"\n",(0,o.jsx)(n.p,{children:"Aborted blocks can only be queried by block hash. Aborting the blocks in forking origin and already aborted blocks is not supported and results in an error."}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'POST /abort_blocks\n{\n "starting_block_hash": BLOCK_HASH\n}\n'})}),"\n",(0,o.jsx)(n.p,{children:"Response:"}),"\n",(0,o.jsx)(n.pre,{children:(0,o.jsx)(n.code,{children:'{\n "aborted": [BLOCK_HASH_0, BLOCK_HASH_1, ...]\n}\n'})})]})}function b(e={}){const{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var o=t(6540);const c={},s=o.createContext(c);function r(e){const n=o.useContext(s);return o.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(c):e.components||c:r(e.components),o.createElement(s.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.100847be.js b/assets/js/runtime~main.07d34fe8.js similarity index 98% rename from assets/js/runtime~main.100847be.js rename to assets/js/runtime~main.07d34fe8.js index 8ace415c2..23ae597cd 100644 --- a/assets/js/runtime~main.100847be.js +++ b/assets/js/runtime~main.07d34fe8.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,b,f,t,c={},r={};function d(e){var a=r[e];if(void 0!==a)return a.exports;var b=r[e]={id:e,loaded:!1,exports:{}};return c[e].call(b.exports,b,b.exports,d),b.loaded=!0,b.exports}d.m=c,d.c=r,e=[],d.O=(a,b,f,t)=>{if(!b){var c=1/0;for(i=0;i=t)&&Object.keys(d.O).every((e=>d.O[e](b[o])))?b.splice(o--,1):(r=!1,t0&&e[i-1][2]>t;i--)e[i]=e[i-1];e[i]=[b,f,t]},d.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return d.d(a,{a:a}),a},b=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,f){if(1&f&&(e=this(e)),8&f)return e;if("object"==typeof e&&e){if(4&f&&e.__esModule)return e;if(16&f&&"function"==typeof e.then)return e}var t=Object.create(null);d.r(t);var c={};a=a||[null,b({}),b([]),b(b)];for(var r=2&f&&e;"object"==typeof r&&!~a.indexOf(r);r=b(r))Object.getOwnPropertyNames(r).forEach((a=>c[a]=()=>e[a]));return c.default=()=>e,d.d(t,c),t},d.d=(e,a)=>{for(var b in a)d.o(a,b)&&!d.o(e,b)&&Object.defineProperty(e,b,{enumerable:!0,get:a[b]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((a,b)=>(d.f[b](e,a),a)),[])),d.u=e=>"assets/js/"+({134:"b7bb6147",337:"3f194bb7",463:"682c6856",562:"5fadd32f",598:"c25a813d",646:"7b998695",952:"2d66ba60",1235:"a7456010",1316:"1b560adb",1475:"9c3aeb12",1527:"778bcc8b",1863:"b4513eec",1914:"1151f991",2282:"6d990bb1",2408:"9abfa349",2412:"16a2713f",2627:"4769fc4e",2828:"49885c5e",2871:"3c883fc4",2916:"425e1ae2",3332:"e28eadbb",3726:"a5e062ff",3768:"e8953dad",3956:"a0ea14c4",3976:"0e384e19",4134:"393be207",4290:"ae603a5f",4583:"1df93b7f",4676:"24503201",4876:"17682634",5120:"a5ad27b1",5186:"b0477c6d",5480:"80526ee6",5532:"e81f6410",5624:"9b932233",5700:"b9f7b2ab",5742:"aba21aa0",5771:"8f2e4180",5960:"0657c530",6017:"8d981dc3",6061:"1f391b9e",6187:"e44e17f8",6286:"e2f00550",6439:"ad6bd692",6773:"2146f16f",6828:"9976ff42",6900:"cc3979e2",6969:"14eb3368",7098:"a7bd4aaa",7229:"eb78b783",7230:"93f75803",7595:"0debafb6",7624:"5fbc5cf1",7969:"5985dcf4",8401:"17896441",8626:"bca784a7",9048:"a94703ab",9167:"ba738306",9218:"cc2baa30",9378:"5b870ab8",9440:"8d820236",9629:"9875b4b5",9647:"5e95c892",9998:"7923f30a"}[e]||e)+"."+{134:"290a582f",337:"22bfc72a",463:"6d8a69a6",562:"4470b0e4",598:"dcaf95cd",646:"ba2beb82",952:"5554bca5",1235:"7b4b0a20",1316:"0fed137f",1475:"75ce2603",1527:"dd9974ab",1863:"2a54a4d3",1914:"193b4b8f",2237:"ede9a640",2282:"f3976d03",2408:"32a724b9",2412:"7d2fd4b2",2627:"8cd2f5e8",2828:"88fa1633",2871:"d1c841d8",2916:"a5de04d1",3332:"28dbb1f2",3658:"e4ca47ec",3726:"a888e2f6",3768:"ac67425e",3956:"74b8c7b1",3976:"5aa906b8",4134:"030d51d7",4290:"fa5b263f",4583:"f182b925",4676:"bb859ed4",4876:"3d25384a",5120:"6f4eb162",5186:"20300e8b",5480:"b9a69f3d",5532:"60f06895",5624:"10ce9365",5700:"4aa13ff2",5742:"9ac6642b",5771:"6fb725c9",5960:"aa8fdf00",6017:"77fdfc67",6061:"68f8d4d4",6187:"c49d81b4",6286:"76a5e6d2",6439:"7bc5fb7f",6773:"3e9e5b9b",6828:"8da5bc72",6900:"f2efdc37",6969:"eeb6b7e2",7098:"b82ee0df",7229:"33a8bdeb",7230:"260ce03e",7595:"bf13c614",7624:"8e7fc6bf",7969:"49afb06c",8401:"4295b40f",8626:"0345585f",9048:"2668bc5b",9167:"0c1ac6c3",9218:"c74667a4",9378:"e5b723a6",9440:"525617f1",9629:"0aaf62d5",9647:"b1f5748f",9998:"4aa28861"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),f={},t="website:",d.l=(e,a,b,c)=>{if(f[e])f[e].push(a);else{var r,o;if(void 0!==b)for(var n=document.getElementsByTagName("script"),i=0;i{r.onerror=r.onload=null,clearTimeout(s);var t=f[e];if(delete f[e],r.parentNode&&r.parentNode.removeChild(r),t&&t.forEach((e=>e(b))),a)return a(b)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=l.bind(null,r.onerror),r.onload=l.bind(null,r.onload),o&&document.head.appendChild(r)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/starknet-devnet-rs/",d.gca=function(e){return e={17682634:"4876",17896441:"8401",24503201:"4676",b7bb6147:"134","3f194bb7":"337","682c6856":"463","5fadd32f":"562",c25a813d:"598","7b998695":"646","2d66ba60":"952",a7456010:"1235","1b560adb":"1316","9c3aeb12":"1475","778bcc8b":"1527",b4513eec:"1863","1151f991":"1914","6d990bb1":"2282","9abfa349":"2408","16a2713f":"2412","4769fc4e":"2627","49885c5e":"2828","3c883fc4":"2871","425e1ae2":"2916",e28eadbb:"3332",a5e062ff:"3726",e8953dad:"3768",a0ea14c4:"3956","0e384e19":"3976","393be207":"4134",ae603a5f:"4290","1df93b7f":"4583",a5ad27b1:"5120",b0477c6d:"5186","80526ee6":"5480",e81f6410:"5532","9b932233":"5624",b9f7b2ab:"5700",aba21aa0:"5742","8f2e4180":"5771","0657c530":"5960","8d981dc3":"6017","1f391b9e":"6061",e44e17f8:"6187",e2f00550:"6286",ad6bd692:"6439","2146f16f":"6773","9976ff42":"6828",cc3979e2:"6900","14eb3368":"6969",a7bd4aaa:"7098",eb78b783:"7229","93f75803":"7230","0debafb6":"7595","5fbc5cf1":"7624","5985dcf4":"7969",bca784a7:"8626",a94703ab:"9048",ba738306:"9167",cc2baa30:"9218","5b870ab8":"9378","8d820236":"9440","9875b4b5":"9629","5e95c892":"9647","7923f30a":"9998"}[e]||e,d.p+d.u(e)},(()=>{var e={5354:0,1869:0};d.f.j=(a,b)=>{var f=d.o(e,a)?e[a]:void 0;if(0!==f)if(f)b.push(f[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var t=new Promise(((b,t)=>f=e[a]=[b,t]));b.push(f[2]=t);var c=d.p+d.u(a),r=new Error;d.l(c,(b=>{if(d.o(e,a)&&(0!==(f=e[a])&&(e[a]=void 0),f)){var t=b&&("load"===b.type?"missing":b.type),c=b&&b.target&&b.target.src;r.message="Loading chunk "+a+" failed.\n("+t+": "+c+")",r.name="ChunkLoadError",r.type=t,r.request=c,f[1](r)}}),"chunk-"+a,a)}},d.O.j=a=>0===e[a];var a=(a,b)=>{var f,t,c=b[0],r=b[1],o=b[2],n=0;if(c.some((a=>0!==e[a]))){for(f in r)d.o(r,f)&&(d.m[f]=r[f]);if(o)var i=o(d)}for(a&&a(b);n{"use strict";var e,a,b,f,t,c={},r={};function d(e){var a=r[e];if(void 0!==a)return a.exports;var b=r[e]={id:e,loaded:!1,exports:{}};return c[e].call(b.exports,b,b.exports,d),b.loaded=!0,b.exports}d.m=c,d.c=r,e=[],d.O=(a,b,f,t)=>{if(!b){var c=1/0;for(i=0;i=t)&&Object.keys(d.O).every((e=>d.O[e](b[o])))?b.splice(o--,1):(r=!1,t0&&e[i-1][2]>t;i--)e[i]=e[i-1];e[i]=[b,f,t]},d.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return d.d(a,{a:a}),a},b=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,f){if(1&f&&(e=this(e)),8&f)return e;if("object"==typeof e&&e){if(4&f&&e.__esModule)return e;if(16&f&&"function"==typeof e.then)return e}var t=Object.create(null);d.r(t);var c={};a=a||[null,b({}),b([]),b(b)];for(var r=2&f&&e;"object"==typeof r&&!~a.indexOf(r);r=b(r))Object.getOwnPropertyNames(r).forEach((a=>c[a]=()=>e[a]));return c.default=()=>e,d.d(t,c),t},d.d=(e,a)=>{for(var b in a)d.o(a,b)&&!d.o(e,b)&&Object.defineProperty(e,b,{enumerable:!0,get:a[b]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((a,b)=>(d.f[b](e,a),a)),[])),d.u=e=>"assets/js/"+({134:"b7bb6147",337:"3f194bb7",463:"682c6856",562:"5fadd32f",598:"c25a813d",646:"7b998695",952:"2d66ba60",1235:"a7456010",1316:"1b560adb",1475:"9c3aeb12",1527:"778bcc8b",1863:"b4513eec",1914:"1151f991",2282:"6d990bb1",2408:"9abfa349",2412:"16a2713f",2627:"4769fc4e",2828:"49885c5e",2871:"3c883fc4",2916:"425e1ae2",3332:"e28eadbb",3726:"a5e062ff",3768:"e8953dad",3956:"a0ea14c4",3976:"0e384e19",4134:"393be207",4290:"ae603a5f",4583:"1df93b7f",4676:"24503201",4876:"17682634",5120:"a5ad27b1",5186:"b0477c6d",5480:"80526ee6",5532:"e81f6410",5624:"9b932233",5700:"b9f7b2ab",5742:"aba21aa0",5771:"8f2e4180",5960:"0657c530",6017:"8d981dc3",6061:"1f391b9e",6187:"e44e17f8",6286:"e2f00550",6439:"ad6bd692",6773:"2146f16f",6828:"9976ff42",6900:"cc3979e2",6969:"14eb3368",7098:"a7bd4aaa",7229:"eb78b783",7230:"93f75803",7595:"0debafb6",7624:"5fbc5cf1",7969:"5985dcf4",8401:"17896441",8626:"bca784a7",9048:"a94703ab",9167:"ba738306",9218:"cc2baa30",9378:"5b870ab8",9440:"8d820236",9629:"9875b4b5",9647:"5e95c892",9998:"7923f30a"}[e]||e)+"."+{134:"290a582f",337:"22bfc72a",463:"6d8a69a6",562:"4470b0e4",598:"dcaf95cd",646:"ba2beb82",952:"5554bca5",1235:"7b4b0a20",1316:"0fed137f",1475:"75ce2603",1527:"dd9974ab",1863:"2a54a4d3",1914:"193b4b8f",2237:"ede9a640",2282:"f3976d03",2408:"32a724b9",2412:"7d2fd4b2",2627:"8cd2f5e8",2828:"88fa1633",2871:"d1c841d8",2916:"a5de04d1",3332:"28dbb1f2",3658:"e4ca47ec",3726:"a888e2f6",3768:"ac67425e",3956:"74b8c7b1",3976:"5aa906b8",4134:"030d51d7",4290:"fa5b263f",4583:"f182b925",4676:"bb859ed4",4876:"3d25384a",5120:"19c24872",5186:"079d8bef",5480:"b9a69f3d",5532:"60f06895",5624:"10ce9365",5700:"4aa13ff2",5742:"9ac6642b",5771:"6fb725c9",5960:"aa8fdf00",6017:"77fdfc67",6061:"68f8d4d4",6187:"c49d81b4",6286:"76a5e6d2",6439:"7bc5fb7f",6773:"3e9e5b9b",6828:"8da5bc72",6900:"f2efdc37",6969:"eeb6b7e2",7098:"b82ee0df",7229:"33a8bdeb",7230:"260ce03e",7595:"bf13c614",7624:"0b9257a5",7969:"49afb06c",8401:"4295b40f",8626:"0345585f",9048:"2668bc5b",9167:"0c1ac6c3",9218:"c74667a4",9378:"e5b723a6",9440:"525617f1",9629:"0aaf62d5",9647:"b1f5748f",9998:"4aa28861"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),f={},t="website:",d.l=(e,a,b,c)=>{if(f[e])f[e].push(a);else{var r,o;if(void 0!==b)for(var n=document.getElementsByTagName("script"),i=0;i{r.onerror=r.onload=null,clearTimeout(s);var t=f[e];if(delete f[e],r.parentNode&&r.parentNode.removeChild(r),t&&t.forEach((e=>e(b))),a)return a(b)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=l.bind(null,r.onerror),r.onload=l.bind(null,r.onload),o&&document.head.appendChild(r)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/starknet-devnet-rs/",d.gca=function(e){return e={17682634:"4876",17896441:"8401",24503201:"4676",b7bb6147:"134","3f194bb7":"337","682c6856":"463","5fadd32f":"562",c25a813d:"598","7b998695":"646","2d66ba60":"952",a7456010:"1235","1b560adb":"1316","9c3aeb12":"1475","778bcc8b":"1527",b4513eec:"1863","1151f991":"1914","6d990bb1":"2282","9abfa349":"2408","16a2713f":"2412","4769fc4e":"2627","49885c5e":"2828","3c883fc4":"2871","425e1ae2":"2916",e28eadbb:"3332",a5e062ff:"3726",e8953dad:"3768",a0ea14c4:"3956","0e384e19":"3976","393be207":"4134",ae603a5f:"4290","1df93b7f":"4583",a5ad27b1:"5120",b0477c6d:"5186","80526ee6":"5480",e81f6410:"5532","9b932233":"5624",b9f7b2ab:"5700",aba21aa0:"5742","8f2e4180":"5771","0657c530":"5960","8d981dc3":"6017","1f391b9e":"6061",e44e17f8:"6187",e2f00550:"6286",ad6bd692:"6439","2146f16f":"6773","9976ff42":"6828",cc3979e2:"6900","14eb3368":"6969",a7bd4aaa:"7098",eb78b783:"7229","93f75803":"7230","0debafb6":"7595","5fbc5cf1":"7624","5985dcf4":"7969",bca784a7:"8626",a94703ab:"9048",ba738306:"9167",cc2baa30:"9218","5b870ab8":"9378","8d820236":"9440","9875b4b5":"9629","5e95c892":"9647","7923f30a":"9998"}[e]||e,d.p+d.u(e)},(()=>{var e={5354:0,1869:0};d.f.j=(a,b)=>{var f=d.o(e,a)?e[a]:void 0;if(0!==f)if(f)b.push(f[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var t=new Promise(((b,t)=>f=e[a]=[b,t]));b.push(f[2]=t);var c=d.p+d.u(a),r=new Error;d.l(c,(b=>{if(d.o(e,a)&&(0!==(f=e[a])&&(e[a]=void 0),f)){var t=b&&("load"===b.type?"missing":b.type),c=b&&b.target&&b.target.src;r.message="Loading chunk "+a+" failed.\n("+t+": "+c+")",r.name="ChunkLoadError",r.type=t,r.request=c,f[1](r)}}),"chunk-"+a,a)}},d.O.j=a=>0===e[a];var a=(a,b)=>{var f,t,c=b[0],r=b[1],o=b[2],n=0;if(c.some((a=>0!==e[a]))){for(f in r)d.o(r,f)&&(d.m[f]=r[f]);if(o)var i=o(d)}for(a&&a(b);n Account impersonation | Starknet Devnet - + diff --git a/docs/0.0.6/api/index.html b/docs/0.0.6/api/index.html index aabbbcf87..5dee42514 100644 --- a/docs/0.0.6/api/index.html +++ b/docs/0.0.6/api/index.html @@ -4,7 +4,7 @@ API | Starknet Devnet - + diff --git a/docs/0.0.6/balance/index.html b/docs/0.0.6/balance/index.html index d9d244a77..4293c124d 100644 --- a/docs/0.0.6/balance/index.html +++ b/docs/0.0.6/balance/index.html @@ -4,7 +4,7 @@ Account balance | Starknet Devnet - + diff --git a/docs/0.0.6/blocks/index.html b/docs/0.0.6/blocks/index.html index 12417a1e8..cc4490647 100644 --- a/docs/0.0.6/blocks/index.html +++ b/docs/0.0.6/blocks/index.html @@ -4,7 +4,7 @@ Blocks | Starknet Devnet - + diff --git a/docs/0.0.6/category/running/index.html b/docs/0.0.6/category/running/index.html index 1afb4dcdf..5d7fe8d3a 100644 --- a/docs/0.0.6/category/running/index.html +++ b/docs/0.0.6/category/running/index.html @@ -4,7 +4,7 @@ Running | Starknet Devnet - + diff --git a/docs/0.0.6/dump-load-restart/index.html b/docs/0.0.6/dump-load-restart/index.html index b966618f6..2f68a5569 100644 --- a/docs/0.0.6/dump-load-restart/index.html +++ b/docs/0.0.6/dump-load-restart/index.html @@ -4,7 +4,7 @@ Dump, load, restart | Starknet Devnet - + diff --git a/docs/0.0.6/forking/index.html b/docs/0.0.6/forking/index.html index 6fe12de41..af37b9da0 100644 --- a/docs/0.0.6/forking/index.html +++ b/docs/0.0.6/forking/index.html @@ -4,7 +4,7 @@ Forking | Starknet Devnet - + diff --git a/docs/0.0.6/historic-state/index.html b/docs/0.0.6/historic-state/index.html index 0f20beeaa..3bb3c250d 100644 --- a/docs/0.0.6/historic-state/index.html +++ b/docs/0.0.6/historic-state/index.html @@ -4,7 +4,7 @@ Historic state support | Starknet Devnet - + diff --git a/docs/0.0.6/intro/index.html b/docs/0.0.6/intro/index.html index 461c89c9c..dc6fdbdab 100644 --- a/docs/0.0.6/intro/index.html +++ b/docs/0.0.6/intro/index.html @@ -4,7 +4,7 @@ Intro | Starknet Devnet - + diff --git a/docs/0.0.6/lite/index.html b/docs/0.0.6/lite/index.html index 567a230b4..a1438f6ae 100644 --- a/docs/0.0.6/lite/index.html +++ b/docs/0.0.6/lite/index.html @@ -4,7 +4,7 @@ Lite mode | Starknet Devnet - + diff --git a/docs/0.0.6/postman/index.html b/docs/0.0.6/postman/index.html index a66b66014..bf8b25455 100644 --- a/docs/0.0.6/postman/index.html +++ b/docs/0.0.6/postman/index.html @@ -4,7 +4,7 @@ L1-L2 interaction via Postman | Starknet Devnet - + diff --git a/docs/0.0.6/predeployed/index.html b/docs/0.0.6/predeployed/index.html index 1e5f8a453..82d094655 100644 --- a/docs/0.0.6/predeployed/index.html +++ b/docs/0.0.6/predeployed/index.html @@ -4,7 +4,7 @@ Predeployed contracts | Starknet Devnet - + diff --git a/docs/0.0.6/running/cli/index.html b/docs/0.0.6/running/cli/index.html index 0af012e97..5f717b90f 100644 --- a/docs/0.0.6/running/cli/index.html +++ b/docs/0.0.6/running/cli/index.html @@ -4,7 +4,7 @@ CLI options | Starknet Devnet - + diff --git a/docs/0.0.6/running/docker/index.html b/docs/0.0.6/running/docker/index.html index d41c9e4ac..b7881e900 100644 --- a/docs/0.0.6/running/docker/index.html +++ b/docs/0.0.6/running/docker/index.html @@ -4,7 +4,7 @@ Run with Docker | Starknet Devnet - + diff --git a/docs/0.0.6/running/install/index.html b/docs/0.0.6/running/install/index.html index 5edd87a51..2f237f97c 100644 --- a/docs/0.0.6/running/install/index.html +++ b/docs/0.0.6/running/install/index.html @@ -4,7 +4,7 @@ Install and run | Starknet Devnet - + diff --git a/docs/0.0.6/server-config/index.html b/docs/0.0.6/server-config/index.html index 61c680435..78a20ce89 100644 --- a/docs/0.0.6/server-config/index.html +++ b/docs/0.0.6/server-config/index.html @@ -4,7 +4,7 @@ Server config | Starknet Devnet - + diff --git a/docs/0.0.6/starknet-time/index.html b/docs/0.0.6/starknet-time/index.html index ce0ebdc9b..1c28ebb79 100644 --- a/docs/0.0.6/starknet-time/index.html +++ b/docs/0.0.6/starknet-time/index.html @@ -4,7 +4,7 @@ Starknet time | Starknet Devnet - + diff --git a/docs/account-impersonation/index.html b/docs/account-impersonation/index.html index f110fe197..85d05e6b7 100644 --- a/docs/account-impersonation/index.html +++ b/docs/account-impersonation/index.html @@ -4,7 +4,7 @@ Account impersonation | Starknet Devnet - + diff --git a/docs/api/index.html b/docs/api/index.html index 5ee499683..f2fc91bf6 100644 --- a/docs/api/index.html +++ b/docs/api/index.html @@ -4,7 +4,7 @@ API | Starknet Devnet - + diff --git a/docs/balance/index.html b/docs/balance/index.html index 2e577a943..6a85d05ac 100644 --- a/docs/balance/index.html +++ b/docs/balance/index.html @@ -4,7 +4,7 @@ Account balance | Starknet Devnet - + diff --git a/docs/blocks/index.html b/docs/blocks/index.html index f26246e17..f3d40c072 100644 --- a/docs/blocks/index.html +++ b/docs/blocks/index.html @@ -4,7 +4,7 @@ Blocks | Starknet Devnet - + diff --git a/docs/category/running/index.html b/docs/category/running/index.html index 966b7f28c..5389b485e 100644 --- a/docs/category/running/index.html +++ b/docs/category/running/index.html @@ -4,7 +4,7 @@ Running | Starknet Devnet - + diff --git a/docs/dump-load-restart/index.html b/docs/dump-load-restart/index.html index 539b0cd9e..a1a2dd7e6 100644 --- a/docs/dump-load-restart/index.html +++ b/docs/dump-load-restart/index.html @@ -4,7 +4,7 @@ Dump, load, restart | Starknet Devnet - + diff --git a/docs/forking/index.html b/docs/forking/index.html index 62d4d1e9f..614d6f69b 100644 --- a/docs/forking/index.html +++ b/docs/forking/index.html @@ -4,7 +4,7 @@ Forking | Starknet Devnet - + diff --git a/docs/historic-state/index.html b/docs/historic-state/index.html index 451598c7e..14d77a4a4 100644 --- a/docs/historic-state/index.html +++ b/docs/historic-state/index.html @@ -4,7 +4,7 @@ Historic state support | Starknet Devnet - + diff --git a/docs/intro/index.html b/docs/intro/index.html index 3e64a28bf..5b417c856 100644 --- a/docs/intro/index.html +++ b/docs/intro/index.html @@ -4,7 +4,7 @@ Intro | Starknet Devnet - + diff --git a/docs/lite/index.html b/docs/lite/index.html index c4167eee4..7131b4166 100644 --- a/docs/lite/index.html +++ b/docs/lite/index.html @@ -4,7 +4,7 @@ Lite mode | Starknet Devnet - + diff --git a/docs/next/account-impersonation/index.html b/docs/next/account-impersonation/index.html index 5c22c946e..45e15c493 100644 --- a/docs/next/account-impersonation/index.html +++ b/docs/next/account-impersonation/index.html @@ -4,7 +4,7 @@ Account impersonation | Starknet Devnet - + diff --git a/docs/next/api/index.html b/docs/next/api/index.html index 5cd9567cf..b81bd84d3 100644 --- a/docs/next/api/index.html +++ b/docs/next/api/index.html @@ -4,7 +4,7 @@ API | Starknet Devnet - + @@ -16,6 +16,6 @@

Devnet APIDevnet has many other functional features which are available via their own endpoints, which are all mentioned throughout the documentation.

Config API

To retrieve the current configuration of Devnet, send a GET request to /config. Example response is attached below. It can be interpreted as a JSON mapping of CLI input parameters, both specified and default ones, with some irrelevant parameters omitted. So use starknet-devnet --help to better understand the meaning of each value, though keep in mind that some of the parameters have slightly modified names.

-
{
"seed": 4063802897,
"total_accounts": 10,
"account_contract_class_hash": "0x61dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f",
"predeployed_accounts_initial_balance": "1000000000000000000000",
"start_time": null,
"gas_price_wei": 100000000000,
"gas_price_strk": 100000000000,
"data_gas_price_wei": 100000000000,
"data_gas_price_strk": 100000000000,
"chain_id": "SN_SEPOLIA",
"dump_on": "exit",
"dump_path": "dump_path.json",
"state_archive": "none",
"fork_config": {
"url": "http://rpc.pathfinder.equilibrium.co/integration-sepolia/rpc/v0_7",
"block_number": 26429
},
"server_config": {
"host": "127.0.0.1",
"port": 5050,
"timeout": 120,
"request_body_size_limit": 2000000
},
"blocks_on_demand": false,
"lite_mode": false
}
+
{
"seed": 4063802897,
"total_accounts": 10,
"account_contract_class_hash": "0x61dac032f228abef9c6626f995015233097ae253a7f72d68552db02f2971b8f",
"predeployed_accounts_initial_balance": "1000000000000000000000",
"start_time": null,
"gas_price_wei": 100000000000,
"gas_price_strk": 100000000000,
"data_gas_price_wei": 100000000000,
"data_gas_price_strk": 100000000000,
"chain_id": "SN_SEPOLIA",
"dump_on": "exit",
"dump_path": "dump_path.json",
"state_archive": "none",
"fork_config": {
"url": "http://rpc.pathfinder.equilibrium.co/integration-sepolia/rpc/v0_7",
"block_number": 26429
},
"server_config": {
"host": "127.0.0.1",
"port": 5050,
"timeout": 120,
"request_body_size_limit": 2000000
},
"block_generation": null,
"lite_mode": false
}
\ No newline at end of file diff --git a/docs/next/balance/index.html b/docs/next/balance/index.html index 359ae5648..f153f3384 100644 --- a/docs/next/balance/index.html +++ b/docs/next/balance/index.html @@ -4,7 +4,7 @@ Account balance | Starknet Devnet - + diff --git a/docs/next/blocks/index.html b/docs/next/blocks/index.html index 2530b0c34..b3ef78b14 100644 --- a/docs/next/blocks/index.html +++ b/docs/next/blocks/index.html @@ -4,7 +4,7 @@ Blocks | Starknet Devnet - + @@ -12,13 +12,15 @@

Devnet starts with a genesis block (with a block number equal to 0). In forking mode, the genesis block number will be equal to the forked block number plus one.

A new block is generated based on the pending block, once a new block is generated the pending block is restarted. By default, a new block is generated with each new transaction, but you can also create an empty block by yourself.

Creating blocks on demand

-

If you start Devnet with the --blocks-on-demand CLI option, you will enable the possibility to store more than one transaction in the pending block (targetable via block tag "pending").

+

If you start Devnet with the --block-generation-on demand CLI option, you will enable the possibility to store more than one transaction in the pending block (targetable via block tag "pending").

Once you've added the desired transactions into the pending block, you can send a POST request to /create_block. This will convert the pending block to the latest block (targetable via block tag "latest"), giving it a block hash and a block number. All subsequent transactions will be stored in a new pending block.

In case of demanding block creation with no pending transactions, a new empty block will be generated.

The creation of the genesis block is not affected by this feature.

POST /create_block

Response:

{'block_hash': '0x115e1b390cafa7942b6ab141ab85040defe7dee9bef3bc31d8b5b3d01cc9c67'}
+

Automatic periodic block creation

+

Devnet started with the --block-generation-on <INTERVAL> CLI option, will behave like in demand mode but new blocks will be mined automatically in time intervals.

Create an empty block

To create an empty block without transactions, POST a request to /create_block:

POST /create_block
@@ -32,6 +34,6 @@

Abort blocksAborted blocks can only be queried by block hash. Aborting the blocks in forking origin and already aborted blocks is not supported and results in an error.

POST /abort_blocks
{
"starting_block_hash": BLOCK_HASH
}

Response:

-
{
"aborted": [BLOCK_HASH_0, BLOCK_HASH_1, ...]
}
+
{
"aborted": [BLOCK_HASH_0, BLOCK_HASH_1, ...]
}
\ No newline at end of file diff --git a/docs/next/category/running/index.html b/docs/next/category/running/index.html index 572446fea..dcbb5eb85 100644 --- a/docs/next/category/running/index.html +++ b/docs/next/category/running/index.html @@ -4,7 +4,7 @@ Running | Starknet Devnet - + diff --git a/docs/next/dump-load-restart/index.html b/docs/next/dump-load-restart/index.html index 1a287e995..5967fbbc7 100644 --- a/docs/next/dump-load-restart/index.html +++ b/docs/next/dump-load-restart/index.html @@ -4,7 +4,7 @@ Dump, load, restart | Starknet Devnet - + @@ -36,7 +36,7 @@

LoadingLoading disclaimer

Dumping and loading are not guaranteed to work across versions. I.e. if you dumped one version of Devnet, do not expect it to be loadable with a different version.

-

If you dumped a Devnet utilizing one class for account predeployment (e.g. --account-class cairo0), you should use the same option when loading. The same applies for dumping a Devnet in --blocks-on-demand mode.

+

If you dumped a Devnet utilizing one class for account predeployment (e.g. --account-class cairo0), you should use the same option when loading. The same applies for dumping a Devnet in --block-generation-on demand mode.

Restarting

Devnet can be restarted by making a POST /restart request (no body required). All of the deployed contracts (including predeployed), blocks and storage updates will be restarted to the original state, without the transactions and requests that may have been loaded from a dump file on startup.

If you're using the Hardhat plugin, restart with starknet.devnet.restart().

diff --git a/docs/next/forking/index.html b/docs/next/forking/index.html index 09c8d405e..c3428789b 100644 --- a/docs/next/forking/index.html +++ b/docs/next/forking/index.html @@ -4,7 +4,7 @@ Forking | Starknet Devnet - + diff --git a/docs/next/historic-state/index.html b/docs/next/historic-state/index.html index f3b1f6396..a983e4207 100644 --- a/docs/next/historic-state/index.html +++ b/docs/next/historic-state/index.html @@ -4,7 +4,7 @@ Historic state support | Starknet Devnet - + diff --git a/docs/next/intro/index.html b/docs/next/intro/index.html index 3c0855478..ba387eb07 100644 --- a/docs/next/intro/index.html +++ b/docs/next/intro/index.html @@ -4,7 +4,7 @@ Intro | Starknet Devnet - + diff --git a/docs/next/lite/index.html b/docs/next/lite/index.html index ca69ada95..e70d8bc34 100644 --- a/docs/next/lite/index.html +++ b/docs/next/lite/index.html @@ -4,7 +4,7 @@ Lite mode | Starknet Devnet - + diff --git a/docs/next/postman/index.html b/docs/next/postman/index.html index 007561729..fe42fc631 100644 --- a/docs/next/postman/index.html +++ b/docs/next/postman/index.html @@ -4,7 +4,7 @@ L1-L2 interaction via Postman | Starknet Devnet - + diff --git a/docs/next/predeployed/index.html b/docs/next/predeployed/index.html index 08b69ea16..a20af75e3 100644 --- a/docs/next/predeployed/index.html +++ b/docs/next/predeployed/index.html @@ -4,7 +4,7 @@ Predeployed contracts | Starknet Devnet - + diff --git a/docs/next/running/cli/index.html b/docs/next/running/cli/index.html index 260440bc6..fd62c4106 100644 --- a/docs/next/running/cli/index.html +++ b/docs/next/running/cli/index.html @@ -4,7 +4,7 @@ CLI options | Starknet Devnet - + diff --git a/docs/next/running/docker/index.html b/docs/next/running/docker/index.html index d6f1a6bae..630fadc8f 100644 --- a/docs/next/running/docker/index.html +++ b/docs/next/running/docker/index.html @@ -4,7 +4,7 @@ Run with Docker | Starknet Devnet - + diff --git a/docs/next/running/install/index.html b/docs/next/running/install/index.html index bf77713d6..eca43e406 100644 --- a/docs/next/running/install/index.html +++ b/docs/next/running/install/index.html @@ -4,7 +4,7 @@ Install and run | Starknet Devnet - + diff --git a/docs/next/server-config/index.html b/docs/next/server-config/index.html index 3c806160b..7cc62f3a8 100644 --- a/docs/next/server-config/index.html +++ b/docs/next/server-config/index.html @@ -4,7 +4,7 @@ Server config | Starknet Devnet - + diff --git a/docs/next/starknet-time/index.html b/docs/next/starknet-time/index.html index 60acca3fb..c45e1b5a4 100644 --- a/docs/next/starknet-time/index.html +++ b/docs/next/starknet-time/index.html @@ -4,7 +4,7 @@ Starknet time | Starknet Devnet - + diff --git a/docs/postman/index.html b/docs/postman/index.html index 5ac724ddd..e2b65be50 100644 --- a/docs/postman/index.html +++ b/docs/postman/index.html @@ -4,7 +4,7 @@ L1-L2 interaction via Postman | Starknet Devnet - + diff --git a/docs/predeployed/index.html b/docs/predeployed/index.html index c2403b575..e813fd25e 100644 --- a/docs/predeployed/index.html +++ b/docs/predeployed/index.html @@ -4,7 +4,7 @@ Predeployed contracts | Starknet Devnet - + diff --git a/docs/running/cli/index.html b/docs/running/cli/index.html index ea0156af3..efb2e0e7d 100644 --- a/docs/running/cli/index.html +++ b/docs/running/cli/index.html @@ -4,7 +4,7 @@ CLI options | Starknet Devnet - + diff --git a/docs/running/docker/index.html b/docs/running/docker/index.html index 878d36f66..d7f74538b 100644 --- a/docs/running/docker/index.html +++ b/docs/running/docker/index.html @@ -4,7 +4,7 @@ Run with Docker | Starknet Devnet - + diff --git a/docs/running/install/index.html b/docs/running/install/index.html index 7b02ef86f..8cd06d76e 100644 --- a/docs/running/install/index.html +++ b/docs/running/install/index.html @@ -4,7 +4,7 @@ Install and run | Starknet Devnet - + diff --git a/docs/server-config/index.html b/docs/server-config/index.html index 35b0de115..d4b5d0328 100644 --- a/docs/server-config/index.html +++ b/docs/server-config/index.html @@ -4,7 +4,7 @@ Server config | Starknet Devnet - + diff --git a/docs/starknet-time/index.html b/docs/starknet-time/index.html index 2fb0b96de..348095a04 100644 --- a/docs/starknet-time/index.html +++ b/docs/starknet-time/index.html @@ -4,7 +4,7 @@ Starknet time | Starknet Devnet - + diff --git a/index.html b/index.html index 3cfbb68ab..f3f1c0254 100644 --- a/index.html +++ b/index.html @@ -4,7 +4,7 @@ Home | Starknet Devnet - + diff --git a/markdown-page/index.html b/markdown-page/index.html index c31cfff56..e0960553e 100644 --- a/markdown-page/index.html +++ b/markdown-page/index.html @@ -4,7 +4,7 @@ Markdown page example | Starknet Devnet - +