Eth mempool #10
Replies: 4 comments 3 replies
-
In effect we create an aggregated mempool. If you had multiple clients spread across data centers you end up with a very natural global mem pool. |
Beta Was this translation helpful? Give feedback.
-
If we are unable to use NATS to somehow co-ordinate the proxies and elect one as being responsible for managing the mempool kv store, we can just create a mempool command instead. It would be responsible for listening to all chains and maintaining multiple kv stores. Still quite efficient. Plus you can elect to listen to the aggregate feed without running the mempool process if you want and process the updates yourself. With the use of |
Beta Was this translation helpful? Give feedback.
-
It looks like we can use determinist subject partitioning to ensure any updates related to a specific tx are published within a known subject. This should allow us to distribute the work of maintaining the kv store across all active proxies by ensuring only one of them at a time is responsible for a given key and thereby preserving ordering or processing. https://docs.nats.io/nats-concepts/subject_mapping#deterministic-subject-token-partitioning |
Beta Was this translation helpful? Give feedback.
-
I wonder if a simple queue group would be enough. The real issue would be out of ordering processing of insertions / deletes, however with the de-duplication provided by the stream before processing and the way the mempool works, a first version could just distribute evenly the updates across the proxies and they update the kv store accordingly. |
Beta Was this translation helpful? Give feedback.
-
We can create a consolidated view of the mempool in a KV store within NATS.
Some things to consider:
Msg-Id
header. The subject would be configured to de-duplicate anything received within the last few mins based on that id.Questions
Beta Was this translation helpful? Give feedback.
All reactions