-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e55d350
commit 6afa0e1
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
submissions/issue-15/milestone-4/chriswayoub/milestone-4.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
## New Tool: Events indexing service - Milestone 4 | ||
|
||
## Description | ||
|
||
This PR is for issue #15 | ||
|
||
## Submission Links & Documents | ||
|
||
Full indexing service: | ||
|
||
https://github.com/chriswayoub/flow-scanner | ||
|
||
Full example deployment: | ||
|
||
https://github.com/chriswayoub/flow-scanner-example | ||
|
||
|
||
All milestone 4 requirements are met: | ||
|
||
* A user can configure the events they wish to watch using a list of Cadence event IDs. The service will continuously monitor all events in this list. The event list can only be changed upon startup — the service does not need to support dynamic configuration (e.g. adding event IDs using an API call). | ||
|
||
Use `CADENCE_EVENT_TYPES` in the `.env` file of the example deployment | ||
|
||
* The service should watch for events in every block. It can (and should!) use the GetEventsByHeight range to query multiple blocks at once. | ||
|
||
This is implemented in the `EventScanner` service | ||
|
||
* The service must not miss any events; if a failure occurs in a block, the event indexer should not proceed to the next block until all events have been fetched. | ||
|
||
This is handled in various places, notable in the `EventScanner` class and in the `EventBroadcaster` classes | ||
|
||
* At a minimum, the service should support event delivery via HTTP webhooks. In this scenario, the consuming application will provide an HTTP endpoint as part of the startup configuration. The consumer should respond with appropriate status consumes to indicate a successful or unsuccessful delivery — these status codes are defined by the indexer. | ||
|
||
HTTP delivery is supported as well as SNS and SQS. The architecture allows plugins to be written for any other backend as well. | ||
|
||
* The service only needs to support delivery to a single consumer. | ||
|
||
Multiple consumers can be configured in a single instance, or multiple instances of the indexer can be run | ||
|
||
* All events should be delivered in the same order they were emitted on-chain | ||
|
||
This is true, and events are grouped by transactionId if multiple events are being listened for | ||
|
||
* Each event should be delivered exactly once. The indexer will need to implement logic to ensure idempotency of events. | ||
|
||
This is an optional feature that can be enabled in the service itself, or you can rely on external services to do it (SQS/SNS/etc) | ||
|
||
* Message Queueing | ||
|
||
Currently supported services are SQS and SNS, and can be extended to additional services easily | ||
|
||
* Multiple Consumers | ||
|
||
Multiple consumers are supported through the `MulticastEventBroadcaster` configuration |