blockEYE is a low-level blockchain listener that aims to populate data that we can use for benchmarking and product performance analysis.
blockEYE uses our own ETH node to detect new pending transactions, new ERC-721 and ERC-1155 token transfers, and new blocks in order to store the time they were detected in the mempool along with other data we can use to benchmark our system's performance.
blockEYE v0.1.0 is capable of:
- Detecting 20,000+ ERC-721 and ERC-1155 token transfers in an hour, using no external providers
- Capturing 95% (lower bound estimate) of those token transfers mempool discovery timestamps (when we detect the pending transaction)
- Caching 30,000+ pending transactions at a time, waiting until they confirm
- Detecting blocks, indefinitely
- Identifying the difference between an ERC-721 and ERC-1155 token transfer
- Periodically and carefully dumping results into a table using a bulk insert
- Each result contains various points of data that can be used for rich benchmarking and querying
- Powered entirely by our own ETH node with the Web3.js framework
And more.
The mempool is essentially a waiting lobby for Ethereum transactions. A more user-friendly name for them is "pending" transactions, as they waiting to be added to a block. These transactions have numerous problems:
- They do not have a timestamp, as individual Ethereum transactions do not have a timestamp field.
- When you try to load the transaction details through most node configurations, you will very frequently get a
nullresult, preventing access to finer details. - They are subject to removals, drops, and can often be misformatted as they have not been validated yet.
The value in solving, or at least mitigating, these problems can lead to a more real-time product that:
- Allows users to track their transactions before they're confirmed.
- Strategically use them to predict upcoming blockchain changes.
- Make a product that dominates others in the level of visibilty we provide about the chain.
- Prepare to load transaction data as early as possible.
blockEYE can detect 30,000+ new mempool transaction hashes in a 30 minute time period, and use these hashes to create a first discovery timestamp of when our system detects new transactions in a very early state.
blockEYE can be expanded upon to capture other types of data from the low-level hooks that are created. Additionally, v0.1.0 only completed the first of three planned components. The other two components are:
Confirmer System— regularly set confirmation block values at various intervals, ranging from the first confirmation to virtually any other thanks to the data structure used for the table. These confirmation values can be used to measure the exact times providers likeAlchemysupply us with data, as well as being able to compare against any other system since all of these values are provided by the blockchain. blockEYE will simply handle the parsing and uploading of that data into our database.Linker System— find a link from the transaction to the relevant Yat Page Item entry. This component needs some planning before execution as there are some issues with Yat Page Items that may impact our ability to reliably maintain these links over time due to the overwrite-updatestatusarch style.
Running blockEYE has some prerequisites:
- An ETH node. You can either use Teleport to use our own node or a free provider like Infura. Either will work.
- TypeScript.
- A correctly configured .env file.
- Access to our dev PSQL tables.
Use the sample env in the root of the project to see the required fields.