You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Renames the flags to `--fork-host` & `--fork-height`, improves the remote store's reliability/performance for production use in CI (lru cache + rate limit management).
Copy file name to clipboardExpand all lines: README.md
+6-8Lines changed: 6 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,8 +73,8 @@ values.
73
73
|`--host`|`FLOW_HOST`|``| Host to listen on for emulator GRPC/REST/Admin servers (default: All Interfaces) |
74
74
|`--chain-id`|`FLOW_CHAINID`|`emulator`| Chain to simulate, if 'mainnet' or 'testnet' values are used, you will be able to run transactions against that network and a local fork will be created. Valid values are: 'emulator', 'testnet', 'mainnet' |
|`--start-block-height`|`FLOW_STARTBLOCKHEIGHT`|`0`| Start block height to use when starting the network using 'testnet' or 'mainnet' as the chain-id|
77
-
|`--rpc-host`|`FLOW_RPCHOST`| ''| RPC host (access node) to query for previous state when starting the network using 'testnet' or 'mainnet' as the chain-id|
76
+
|`--fork-host`|`FLOW_FORK_HOST`| ''| gRPC access node address (`host:port`) to fork from |
77
+
|`--fork-height`|`FLOW_FORK_HEIGHT`|`0`| Block height to pin the fork (defaults to latest sealed) |
78
78
|`--legacy-upgrade`|`FLOW_LEGACYUPGRADE`|`false`| Enable upgrading of legacy contracts |
79
79
|`--computation-reporting`|`FLOW_COMPUTATIONREPORTING`|`false`| Enable computation reporting for Cadence scripts & transactions |
80
80
|`--checkpoint-dir`|`FLOW_CHECKPOINTDIR`| '' | Checkpoint directory to load the emulator state from, if starting the emulator from a checkpoint |
@@ -155,8 +155,7 @@ Post Data: height={block height}
155
155
```
156
156
157
157
Note: it is only possible to roll back state to a height that was previously executed by the emulator.
158
-
To roll back to a past block height when using a forked Mainnet or Testnet network, use the
159
-
`--start-block-height` flag.
158
+
To pin the starting block height when using a fork, use the `--fork-height` flag.
160
159
161
160
## Managing emulator state
162
161
It's possible to manage emulator state by using the admin API. You can at any point
@@ -269,15 +268,14 @@ you must specify the network name for the chain ID flag and the RPC host
Please note, that the actual execution on the real network may differ depending on the exact state when the transaction is
277
276
executed.
278
277
279
-
By default, the forked network will start from the latest sealed block when the emulator
280
-
is started. You can specify a different starting block height by using the `--start-block-height` flag.
278
+
By default, the forked network will start from the latest sealed block when the emulator is started. You can specify a different starting block height by using the `--fork-height` flag.
281
279
282
280
You can also store all of your changes and cached registers to a persistent db by using the `--persist` flag,
SetupEVMEnabledbool`default:"true" flag:"setup-evm" info:"enable EVM setup for the emulator, this will deploy the EVM contracts"`
85
85
SetupVMBridgeEnabledbool`default:"true" flag:"setup-vm-bridge" info:"enable VM Bridge setup for the emulator, this will deploy the VM Bridge contracts"`
86
+
87
+
// Deprecated hidden aliases
88
+
StartBlockHeightuint64`default:"0" flag:"start-block-height" info:"(deprecated) use --fork-height"`
89
+
RPCHoststring`default:"" flag:"rpc-host" info:"(deprecated) use --fork-host"`
|`--start-block-height`|`FLOW_STARTBLOCKHEIGHT`|`0`| Start block height to use when starting the network using 'testnet' or 'mainnet' as the chain-id|
77
-
|`--rpc-host`|`FLOW_RPCHOST`| '' | RPC host (access node) to query for previous state when starting the network using 'testnet' or 'mainnet' as the chain-id|
76
+
|`--fork-host`|`FLOW_FORK_HOST`| ''| gRPC access node address (`host:port`) to fork from |
77
+
|`--fork-height`|`FLOW_FORK_HEIGHT`|`0`| Block height to pin the fork (defaults to latest sealed) |
78
78
79
79
## Running the emulator with the Flow CLI
80
80
@@ -149,8 +149,7 @@ Post Data: height={block height}
149
149
```
150
150
151
151
Note: it is only possible to roll back state to a height that was previously executed by the emulator.
152
-
To roll back to a past block height when using a forked Mainnet or Testnet network, use the
153
-
`--start-block-height` flag.
152
+
To pin the starting block height when using a fork, use the `--fork-height` flag.
154
153
155
154
## Managing emulator state
156
155
@@ -246,14 +245,13 @@ you must specify the network name for the chain ID flag as well as the RPC host
Please note, the actual execution on the real network may differ depending on the exact state when the transaction is executed.
254
253
255
-
By default, the forked network will start from the latest sealed block when the emulator
256
-
is started. You can specify a different starting block height by using the `--start-block-height` flag.
254
+
By default, the forked network will start from the latest sealed block when the emulator is started. You can specify a different starting block height by using the `--fork-height` flag.
257
255
258
256
You can also store all of your changes and cached registers to a persistent db by using the `--persist` flag,
0 commit comments