Selective Tezos mempool indexer based on DipDup framework.
Fully compatible with DipDup YAML configuration file format.
Mempool indexer reuses datasources, contracts,
database, hasura sections, and reads its own
settings from mempool top-level section.
Mempool configuration has two sections: settings and indexers (required).
This section is optional so are all the setting keys.
mempool:
settings:
keep_operations_seconds: 172800
expired_after_blocks: 60
keep_in_chain_blocks: 10
mempool_request_interval_seconds: 10
rpc_timeout_seconds: 10
indexers:
...How long to store operations that did not get into the chain. After that period, such operations will be wiped from the database. Default value is 172800 seconds (2 days).
When level(head) - level(operation.branch) >= expired_after_blocks and operation is
still on in chain it's marked as expired. Default value is 60 blocks (~1 hour).
Since the main purpose of this service is to index mempool operations (actually it's a rolling index), all the operations that were included in the chain are removed from the database after specified period of time. Default value is 10 blocks (~10 minutes).
How often Tezos nodes should be polled for pending mempool operations. Default value is 10 seconds.
Tezos node request timeout. Default value is 10 seconds.
You can index several networks at once, or index different nodes independently. Indexer names are not standardized, but for clarity it's better to stick with some meaningful keys:
mempool:
settings:
...
indexers:
mainnet:
filters:
kinds:
- transaction
accounts:
- contract_alias
datasources:
tzkt: tzkt_mainnet
rpc:
- node_mainnet
edonet:
florencenet: Each indexer object has two keys: filters and datasources (required).
An optional section specifying which mempool operations should be indexed. By default, all transactions will be indexed.
Array of operations kinds, default value is transaction (single item).
The complete list of values allowed:
activate_accountballotdelegationdouble_baking_evidencedouble_endorsement_evidenceendorsementendorsement_with_slotoriginationproposalsrevealseed_nonce_revelationtransactionregister_global_constantpreendorsementset_deposits_limitdouble_preendorsement_evidencetx_rollup_originationtx_rollup_submit_batchtx_rollup_committx_rollup_return_bondtx_rollup_finalize_commitmenttx_rollup_remove_commitmenttx_rollup_rejectiontx_rollup_dispatch_ticketstransfer_ticketvdf_revelationIncrease_paid_storageupdate_consensus_keydrain_delegatesmart_rollup_add_messagessmart_rollup_originatesmart_rollup_execute_outbox_messagesmart_rollup_refutesmart_rollup_publishsmart_rollup_recover_bondsmart_rollup_timeoutsmart_rollup_cement
Array of contract aliases used to filter operations by source or destination.
NOTE: applied to manager operations only.
Mempool service is tightly coupled with TzKT and Tezos node providers.
An alias pointing to a datasource of kind tzkt is expected.
An array of aliases pointing to datasources of kind tezos-node
Polling multiple nodes allows to detect more refused operations and makes indexing more robust in general.
npm i @dipdup/mempool
Read how to use the GraphQL client for the Mempool service.