ergoplatform / ergo

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

Add new functionalities to improve mempool tracking efficiency #2174

Open arobsn opened 3 months ago

arobsn commented 3 months 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 3 months ago

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