ElementsProject / ElementsProject/elements
New mempool TX is always detected a few ms ahead of new block
- Dominant language
- C++
- Stars
- 1.2k
- Forks
- 416
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 15
Description
We're running the latest elementsd on prod liquid chain, on Linux, using ZeroMQ notification channels to detect ZCs and new blocks, and always see the same picture:
```
[11/27/25 08:49:11.240] hashtx: c67a4a64fb33e68b83358a2c91748ce05d2cb0a0cb3c15ba7998d7a8841a4a89
[11/27/25 08:49:11.255] hashblock: de904b5995121e12148dbc0bc82f10925056fdd2aaf5ed0366a267e08ecc2c71
[11/27/25 09:43:11.522] hashtx: b2bac69b345f241ec38e887d08803fff564144f9ad81ad76cca66d3dc775bed3
[11/27/25 09:43:11.546] hashblock: 723b1b5a9b9f850553a8af228af16d8fd228c301a0d62bd3192a9cf5b5d23c55
```
while the sender sees the TX in mempool for a few dozens of seconds before that.
Is there a way to improve the ZC detection speed? Is elements using async method to detect ZCs in the chain, or just polling for new blocks?
Contributor guide
Assessment
This issue has not been assessed yet.