Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync event state (tracking) #144

Open
1 of 2 tasks
ryardley opened this issue Oct 11, 2024 · 0 comments
Open
1 of 2 tasks

Sync event state (tracking) #144

ryardley opened this issue Oct 11, 2024 · 0 comments
Assignees
Labels
Ciphernode Related to the ciphernode package enhancement New feature or request

Comments

@ryardley
Copy link
Contributor

ryardley commented Oct 11, 2024

Currently we have a realtime system which responds to realtime events from the EVM as they are broadcast but we need to be able to collect historical events in an actor from both the eth_getFilterLogs as well as eth_subscribe for future / live events. Which should be committed to disk.

We can change the stream_from_evm function to become an actor that is sent requests to forward to the bus and utilize hydration as referenced within the persistence issue however we will need to store an offset at which events are streamed as part of this actor.

Also we need to event source the event bus and ensure we have processed past events correctly and are up to date.


WIP Sync scenarios

Scenario: New node comes online

  1. The node will need to register itself as online
  2. The node will ask the contract for all historical ciphernode events in order to be able to determine it's place within CN sortition
  3. The node has not been part of the network and as a consequence need not take part in any decryptions

Scenario: Node restart / network disruption

  1. Node that has been online has a temporary disruption that lasts a few minutes
  2. Node needs to ask network for all recent events from the period of time they have missed for this they broadcast an event request with an event_id of the last event they received.
@ryardley ryardley changed the title Create an EVM historical event actor. Create an EVM historical event aware actor. Oct 11, 2024
@ryardley ryardley added enhancement New feature or request Ciphernode Related to the ciphernode package labels Oct 15, 2024
@ryardley ryardley changed the title Create an EVM historical event aware actor. Sync event state Oct 22, 2024
@ryardley ryardley self-assigned this Oct 29, 2024
@ryardley ryardley changed the title Sync event state Sync event state (tracking) Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ciphernode Related to the ciphernode package enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant