indra icon indicating copy to clipboard operation
indra copied to clipboard

[watcher] performance concerns & final wrap up

Open bohendo opened this issue 5 years ago • 0 comments

Before we turn the watcher on in prod, 2 potential performance issues should be addresses

  1. Currently watcher stores all StateProgressed and ChallengeUpdated events emitted from the watched ChallengeRegistries. We really ought to filter those out so that we only store the events that are relevant to our publicIdentifier's channels' apps.
  2. We should save the block number as lastProcessedBlock in the store at the point where we run the setup protocol & wait to start the watcher until setup finishes. We're currently starting to download event logs from the block where our challenger registry got deployed so, that's a lot of blocks to scan.

Once these ^ are done & watcher tests in modules/node/src/test/e2e/challenge.spec.ts are passing, we can re-activate the watchers by passing in the chain providers instead of an empty object in:

  • modules/client/src/connect.ts
  • modules/node/src/challenge/challenge.service.ts

bohendo avatar Aug 31 '20 14:08 bohendo