Upgrade watcher-ts packages to configure failover RPC endpoints (#44)

* Upgrade watcher-ts dependencies

* Update config and add an indexer method to switch clients

* Update indexer and database methods

* Update package version

* Update event parsing in watcher indexer
This commit is contained in:
prathamesh0
2024-05-22 10:33:25 +05:30
committed by GitHub
parent ffd8baa4bc
commit be0dbc1701
35 changed files with 394 additions and 162 deletions
@@ -50,7 +50,9 @@
[upstream]
[upstream.ethServer]
gqlApiEndpoint = "http://127.0.0.1:8082/graphql"
rpcProviderEndpoint = "http://127.0.0.1:8081"
rpcProviderEndpoints = [
"http://127.0.0.1:8081"
]
# Boolean flag to specify if rpc-eth-client should be used for RPC endpoint instead of ipld-eth-client (ipld-eth-server GQL client)
rpcClient = true
@@ -87,3 +89,6 @@
# Max block range of historical processing after which it waits for completion of events processing
# If set to -1 historical processing does not wait for events processing and completes till latest canonical block
historicalMaxFetchAhead = 10000
# Max number of retries to fetch new block after which watcher will failover to other RPC endpoints
maxNewBlockRetries = 3