Monitoring Pending Transactions in Polkadot with Mempool Explorer
Mempool Explorer enables Polkadot ecosystem members to monitor pending transactions across several parameters and gain meaningful insights.
Recently, Protofire received a grant from Web3 Foundation to build a solution that would allow members of the Polkadot ecosystem to monitor information related to pending transactions. We delivered Mempool Explorer, which monitors temporal data, such as a transaction hash, a block number, an extrinsic type, a nonce, a status, as well as sender and recipient addresses. The data is stored for 24 hours for users of Substrate-based blockchains like Polkadot and Kusama.
Using this data, you can perform exhaustive follow-ups, as well as track and filter extrinsic transactions on different networks. For example, it becomes possible to monitor a wallet address, control the traffic of a specific address, and detect the overhead of transaction traffic for a group of stakeholder addresses. In addition, you can gather information about Mempool extrinsics, embed them in your app, or use in a back-end service by executing queries through the API.
What’s under the hood?
The back end of Mempool Explorer was built using Polkadot-JS, and a user interface was developed with React. Building on top of Polkadot-JS allowed us to easily establish interaction with any Substrate-based node: The Polkadot Relay Chain, parachains, Kusama, testnets, etc.
To build a transaction pool explorer, which is responsible for tracking pending extrinsics before those are saved in blocks, our team employed the Substrate RPC interface. By applying the author_pendingExtrinsics method, we made it possible to query any Substrate-based node and get the list of pending transactions.
In order to enable transparency across the extrinsics life cycle, our team added the author_trackExtrinsic method on the Substrate core. This way, users can subscribe to API endpoints and track status changes of extrinsics. For instance, you can get valuable insights into the movements around transactions and anything you find significant before including those extrinsics in the blocks.
Mempool Explorer supports the Polkadot, Kusama, Amber, and Westend blockchain networks.
What value does it bring to the Polkadot community?
Mempool Explorer enables the Polkadot community to track temporal information about pending transactions on different networks. The project features a cache service that saves extrinsics as records for 24 hours in the back end, while tracking each status change. Through the API developers are able to perform queries in real time or leverage cache time.
For more details about the project, check out our documentation and the GitHub repo.
You can also visit Web3 Foundation’s blog on Medium or follow them on Twitter.