Skip to content

Conversation

@alexggh
Copy link
Contributor

@alexggh alexggh commented Dec 18, 2025

Work in progress

Description

Implements the proposed changes from here #10452, where the API surface has been limited to two functions submit and a subscribe_statement.

Submit changes

For submitting the only changes are implementing the logic of the newly expiry field where statements with an expiration timestamp lower than current time get rejected.

Subscribe changes

For subscription the approach is to have a configurable number of workers that keep track of all subscriptions, each time a new subscription arrives it gets assigned by a round-robin protocol to one of the workers.

When a new statements gets accepted by the statement-store it notifies all workers about the statement, the workers then go and evaluate all subscription filters they are assigned to and notifies each of them accordingly.

Remaining work

  • Add more tests.
  • Evaluate performance under load and port statement_store_bench.rs to using subscribe API.
  • Evaluate and set proper RPC limits.
  • Periodically scan existing statements and removed expired ones.
  • Plan for deploying it with minimising impact for people prototype with the old APIs

Signed-off-by: Alexandru Gheorghe <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants