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: statediff/doc.go
+13-4Lines changed: 13 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -15,19 +15,28 @@
15
15
// along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
16
16
17
17
/*
18
-
This work is adapted from work by Charles Crain at https://github.com/jpmorganchase/quorum/blob/9b7fd9af8082795eeeb6863d9746f12b82dd5078/statediff/statediff.go
19
-
20
18
Package statediff provides an auxiliary service that processes state diff objects from incoming chain events,
21
19
relaying the objects to any rpc subscriptions.
22
20
21
+
This work is adapted from work by Charles Crain at https://github.com/jpmorganchase/quorum/blob/9b7fd9af8082795eeeb6863d9746f12b82dd5078/statediff/statediff.go
22
+
23
23
The service is spun up using the below CLI flags
24
24
--statediff: boolean flag, turns on the service
25
25
--statediff.streamblock: boolean flag, configures the service to associate and stream out the rest of the block data with the state diffs.
26
26
--statediff.intermediatenodes: boolean flag, tells service to include intermediate (branch and extension) nodes; default (false) processes leaf nodes only.
27
27
--statediff.pathsandproofs: boolean flag, tells service to generate paths and proofs for the diffed storage and state trie leaf nodes.
28
28
--statediff.watchedaddresses: string slice flag, used to limit the state diffing process to the given addresses. Usage: --statediff.watchedaddresses=addr1 --statediff.watchedaddresses=addr2 --statediff.watchedaddresses=addr3
29
29
30
-
If you wish to use the websocket endpoint to subscribe to the statediff service, be sure to open up the Websocket RPC server with the `--ws` flag.
30
+
If you wish to use the websocket endpoint to subscribe to the statediff service, be sure to open up the Websocket RPC server with the `--ws` flag. The IPC-RPC server is turned on by default.
31
+
32
+
The statediffing services works only with `--syncmode="full", but -importantly- does not require garbage collection to be turned off (does not require an archival node).
This starts up the geth node in full sync mode, starts up the statediffing service, and opens up the websocket endpoint to subscribe to the service.
39
+
Because the "streamblock" flag has been turned on, the service will strean out block data (headers, transactions, and receipts) along with the diffed state and storage leafs.
31
40
32
41
Rpc subscriptions to the service can be created using the rpc.Client.Subscribe() method,
33
42
with the "statediff" namespace, a statediff.Payload channel, and the name of the statediff api's rpc method- "stream".
0 commit comments