@@ -27,7 +27,7 @@ This does the following:
2727Update ` tools/deploy.ts ` to include new contracts you want to deploy.
2828Make sure to specify the constructor arguments and the value, if needed.
2929
30- Once you have the chain running (see [ Running the Development Stack] ( #running-the-development -stack ) ), deploy the contracts by running:
30+ Once you have the chain running (see [ Running the Revive Stack] ( #running-the-revive -stack ) ), deploy the contracts by running:
3131
3232``` sh
3333deno task deploy [--filter < contract-name> ]
@@ -94,9 +94,21 @@ eth-rpc build
9494
9595These commands will compile the binaries into ` ~/polkadot-sdk/target/debug/ ` . The build process may take some time on the first run.
9696
97- ## Running the Development Stack
97+ # Testing Tips
9898
99- Once built, you can run the complete development stack in tmux:
99+ ## Running the Revive Stack
100+
101+ Once built, you can run each service individually:
102+
103+ ``` sh
104+ # Run the development node
105+ dev-node run
106+
107+ # In another terminal, run the Ethereum RPC bridge
108+ eth-rpc run ws://localhost:9944
109+ ```
110+
111+ Alternatively, you can run the complete development stack in tmux:
100112
101113``` sh
102114# Run both services in separate tmux panes
@@ -107,23 +119,61 @@ revive_dev_stack
107119revive_dev_stack proxy
108120```
109121
110- Alternatively, you can run each service individually:
122+ ## Running the Geth Stack
123+
124+ To test contracts against standard Ethereum with Geth:
111125
112126``` sh
113- # Run the development node
114- dev-node run
127+ # Run geth in development mode (default port 8545)
128+ geth-dev
115129
116- # In another terminal, run the Ethereum RPC bridge
117- eth-rpc run ws://localhost:9944
130+ # Or specify a custom port
131+ geth-dev 8546
118132```
119133
120- To test contracts with Geth
134+ Alternatively, you can run geth with mitmproxy in a tmux window:
121135
122136``` sh
123137# Run geth with mitmproxy in a tmux window
124138geth_stack
125139```
126140
141+ This will start a local Geth development node with HTTP RPC enabled, useful for comparing behavior between Revive and standard EVM environments.
142+
143+ ## Recording and Replaying RPC Requests
144+
145+ ### Recording RPC Requests
146+
147+ When testing and debugging, you can record all ` eth_sendRawTransaction ` requests using the ` --record ` flag:
148+
149+ ``` sh
150+ # Record requests when running eth-rpc
151+ eth-rpc run ws://localhost:9944 --record
152+ ```
153+
154+ When ` --record ` is enabled, eth-rpc will:
155+
156+ - Log all output to console and ` /tmp/eth-rpc.log `
157+ - Extract and save all ` eth_sendRawTransaction ` requests to ` /tmp/eth-rpc-requests.log `
158+
159+ ### Replaying Recorded Requests
160+
161+ You can replay recorded requests using the ` scripts/run-all.sh ` script:
162+
163+ ``` sh
164+ # Replay all recorded requests against localhost:8545
165+ ./scripts/run-all.sh
166+ ```
167+
168+ This script will:
169+
170+ - Send each recorded transaction to the RPC endpoint
171+ - Wait for transaction receipts
172+ - Display status (✓ for success, ✗ for failure)
173+ - Report any errors or failed transactions at the end
174+
175+ This is useful for regression testing - record a successful test session, then replay it against new builds to ensure compatibility.
176+
127177# Learn more
128178
129179- [ Asset Hub documentation] ( https://contracts.polkadot.io ) to learn more about building Smart Contracts on Asset Hub.
0 commit comments