Skip to content

Commit 7fed13e

Browse files
committed
update README
1 parent 960033e commit 7fed13e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

statediff/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ e.g.
104104
./build/bin/geth --syncmode=full --gcmode=archive --statediff --statediff.writing --statediff.db.type=postgres --statediff.db.driver=sqlx --statediff.db.host=localhost --statediff.db.port=5432 --statediff.db.name=vulcanize_test --statediff.db.user=postgres --statediff.db.nodeid=nodeid --statediff.db.clientname=clientname
105105
`
106106

107+
When operating in `--statediff.db.type=file` mode, the service will write SQL statements out to the file designated by
108+
`--statediff.file.path`. Please note that it writes out SQL statements with all `ON CONFLICT` constraint checks dropped.
109+
This is done so that we can scale out the production of the SQL statements horizontally, merge the separate SQL files produced,
110+
de-duplicate using unix tools (`sort statediff.sql | uniq` or `sort -u statediff.sql`), bulk load using psql
111+
(`psql db_name --set ON_ERROR_STOP=on -f statediff.sql`), and then add our primary and foreign key constraints and indexes
112+
back afterwards.
113+
107114
### RPC endpoints
108115
The state diffing service exposes both a WS subscription endpoint, and a number of HTTP unary endpoints.
109116

0 commit comments

Comments
 (0)