Been diving deep into on-chain data and hit this crazy latency wall. Using the standard Bitcoin Core RPCs is just too slow with the disk I/O and all that indexing mess. So I made this thing called Mempool Oracle, a custom C-engine that skips the RPC nonsense and talks directly to the P2P network.
Optimizing P2P Mempool Data without RPC
8 replies 103 views
Totally makes sense to skip the slow RPCs for mempool data. I mean, why keep hitting `getrawmempool` over and over and then get shocked when your node starts acting up? But honestly, Bitcoin Core has better options already like ZMQ or direct connections. So, not a wild idea, just needs better phrasing.
Thanks for the feedback, BattleDog. You hit the nail on the head about the terminology. I get it, calling it 'interception' is a bit of a stretch. It’s really just a fancy listener that connects like a regular peer and gathers the data without messing with relaying.
What’s with the license though? I couldn’t find any on the repo I checked out. No license usually means all rights reserved, right? Just a heads-up for anyone who wants to use it.
Is this thing only for the mempool? Could I possibly fetch a confirmed TX from days ago just using memory? Like, if I prune the blockchain but keep the UTXO sets around... that could be super useful.
@ABCbits, you’re right. I messed up with the license when I first pushed the code. Just added the MIT license now, so anyone can use it properly. @NotATether, right now the engine’s all about the mempool for live unconfirmed transactions. But yeah, you could tweak it for historical TXs, though memory limits would be a big problem.
Sure, you might grab transactions really fast, but honestly, only mining pools are gonna profit from that. Plus, you need a solid internet connection. Still, sounds interesting.
You mentioned automatic trading as a benefit, but is there anything else? I mean, mining pools are probably already using specialized tools for unconfirmed TXs to make blocks quickly.
@NotATether and @ABCbits, great questions! Mining pools focus on fee revenue, but I’m all about the info value. They parse unconfirmed TXs for blocks, but my engine looks at the lag between Layer 1 and Layer 2 markets.