ergoplatform / ergo

Ergo protocol description & reference client implementation
https://ergoplatform.org/
Creative Commons Zero v1.0 Universal
499 stars 169 forks source link

Add new functionalities to improve mempool tracking efficiency #2174

Open arobsn opened 1 month ago

arobsn commented 1 month ago

As discussed in discord, new functionalities are necessary for efficient mempool tracking for backend applications such as explorers and off-chain bots.

Modify info endpoint

  1. Add lastMempoolUpdate timestamp property to /info/ endpoint

Add new mempool endpoints

  1. GET /transactions/unconfirmed/transactionIds - returns an array containing TransactionId of all transactions present in the mempool
  2. POST /transactions/unconfirmed/byTransactionIds - accepts an array of TransactionId in its body and returns corresponding transactions, if present in the mempool
zackbalbin commented 1 month ago

https://github.com/ergoplatform/ergo/pull/2177