Update CLI to compare only updated entities and verify IPLD state (#161)

* Change compare CLI to verify only updated entities

* Implement IPLD state verification in compare CLI

* Changes to IPLD state to match with GQL result entity
This commit is contained in:
2022-08-17 19:11:40 +05:30
committed by GitHub
parent ec56de057f
commit 7238f614c0
33 changed files with 518 additions and 68 deletions
+16 -3
View File
@@ -75,9 +75,9 @@
./bin/compare-blocks --config-file environments/compare-cli-config.toml --start-block 1 --end-block 10
```
* For comparing entities after fetching ids from one of the endpoints and then querying individually by ids:
* For comparing entities after fetching updated entity ids from watcher database:
* Set the `idsEndpoint` to choose which endpoint the ids should be fetched from.
* Set the watcher config file path and entities directory.
```toml
[endpoints]
@@ -90,7 +90,20 @@
"author",
"blog"
]
idsEndpoint = "gqlEndpoint1"
[watcher]
configPath = "../../graph-test-watcher/environments/local.toml"
entitiesDir = "../../graph-test-watcher/dist/entity/*"
```
* To verify diff IPLD state generated at each block, set the watcher endpoint and `verifyState` flag to true
```toml
[watcher]
configPath = "../../graph-test-watcher/environments/local.toml"
entitiesDir = "../../graph-test-watcher/dist/entity/*"
endpoint = "gqlEndpoint2"
verifyState = true
```
* Run the CLI with `fetch-ids` flag set to true:\