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
Copy file name to clipboardExpand all lines: README.md
+67-2Lines changed: 67 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,7 @@ eth-rpc build
95
95
These commands will compile the binaries into `~/polkadot-sdk/target/debug/`. The build process may take some time on the first run.
96
96
97
97
> **Note**: The helper scripts use the `POLKADOT_SDK_DIR` environment variable to locate the Polkadot SDK repository. By default, it points to `~/polkadot-sdk`. If you cloned the repository to a different location, you can override this by setting the environment variable before sourcing the scripts:
@@ -150,17 +151,23 @@ This will start a local Geth development node with HTTP RPC enabled, useful for
150
151
151
152
### Recording RPC Requests
152
153
153
-
When testing and debugging, you can record all `eth_sendRawTransaction` requests using the `--record` flag:
154
+
When testing and debugging, you can record all `eth_sendRawTransaction` requests using the `--record` flag. This works with both `eth-rpc` and `revive_dev_stack`:
154
155
155
156
```sh
156
157
# Record requests when running eth-rpc
157
158
eth-rpc run ws://localhost:9944 --record
159
+
160
+
# Or specify a custom path for the recorded requests
161
+
eth-rpc run ws://localhost:9944 --record=/path/to/requests.log
162
+
163
+
# Record requests when running the full stack in tmux
164
+
revive_dev_stack --record
158
165
```
159
166
160
167
When `--record` is enabled, eth-rpc will:
161
168
162
169
- Log all output to console and `/tmp/eth-rpc.log`
163
-
- Extract and save all `eth_sendRawTransaction` requests to `/tmp/eth-rpc-requests.log`
170
+
- Extract and save all `eth_sendRawTransaction` requests to `/tmp/eth-rpc-requests.log` (or your custom path)
164
171
165
172
### Replaying Recorded Requests
166
173
@@ -180,6 +187,64 @@ This script will:
180
187
181
188
This is useful for regression testing - record a successful test session, then replay it against new builds to ensure compatibility.
182
189
190
+
## Additional Testing Utilities
191
+
192
+
The `node-env.sh` script provides several other useful functions for testing and development:
193
+
194
+
### Differential Testing
195
+
196
+
Run differential tests against the local dev node using the [revive-differential-tests](https://github.com/paritytech/revive-differential-tests) repository:
197
+
198
+
```sh
199
+
# Build the dev-node and generate the chainspec required by retester
200
+
dev-node build --retester
201
+
# Start the revive-dev-stack with the chainspec required by retester
> **Note**: Requires the `revive-differential-tests` repository to be cloned. By default, it looks for the repository at `~/github/revive-differential-tests`. You can override this by setting the `RETESTER_DIR` environment variable:
Quickly configure `cast` CLI tool for different environments:
216
+
217
+
```sh
218
+
# Configure for local development
219
+
cast_local
220
+
221
+
# Configure for Westend Asset Hub testnet
222
+
cast_westend
223
+
224
+
# Configure for Passet Hub testnet
225
+
cast_passet
226
+
```
227
+
228
+
These functions set up the `PRIVATE_KEY` and `ETH_RPC_URL` environment variables, allowing you to use `cast` commands without repeatedly specifying credentials.
229
+
230
+
### Testing Against Westend/Passet Hub
231
+
232
+
Build and run custom chain specs for testing on Westend Asset Hub or Passet Hub:
233
+
234
+
```sh
235
+
# Build and run Westend Asset Hub runtime locally
236
+
westend build # Build runtime and generate chain spec
237
+
westend run # Run with polkadot-omni-node
238
+
239
+
# Run the full Westend stack in tmux
240
+
westend_stack
241
+
242
+
# Similarly for Passet Hub (requires https://github.com/paseo-network/passet-hub checkout under ~/github/passet-hub-
243
+
passet build
244
+
passet run
245
+
passet_stack
246
+
```
247
+
183
248
# Learn more
184
249
185
250
-[Asset Hub documentation](https://contracts.polkadot.io) to learn more about building Smart Contracts on Asset Hub.
0 commit comments