0

I am trying to find out the relation among dependant transactions in the Mempool. I have already used the "depends" field and tracking the transaction ids to go through. but I still can not clearly figure out how and when this field modified or updated to show the dependencies. I am looking for a scenario for that as well.

Thanks

0

getrawmempool

getrawmempool(true)

Returns all transaction ids in memory pool as a json array of string transaction ids. If we use verbose as 'true' it returns more than just transaction ids and one of the result is 'depends'.

"depends" : [(json array) unconfirmed transactions used as inputs for this transaction "hex",(string) parent transaction id]

Example:

"2004b140d4b4eb1048cdb7def895a211c279711e47cc402c64f91f1c0d20f0dc": {
    "fees": {
      "base": 0.00000446,
      "modified": 0.00000446,
      "ancestor": 0.00000892,
      "descendant": 0.00000446
    },
    "vsize": 142,
    "weight": 565,
    "fee": 0.00000446,
    "modifiedfee": 0.00000446,
    "time": 1598036451,
    "height": 1807966,
    "descendantcount": 1,
    "descendantsize": 142,
    "descendantfees": 446,
    "ancestorcount": 2,
    "ancestorsize": 284,
    "ancestorfees": 892,
    "wtxid": "4e680766ede2535b53e868c95d1483a443f9ab7f8b9d9ef4fcb355a768faba16",
    "depends": [
      "8b72e7045466d79a60ea13c9700b268ae0d695a7666008fc0c454775d7d95561"
    ],
    "spentby": [
    ],
    "bip125-replaceable": false
  }
}

Child transaction:

Child tx

Parent transaction which had Unconfirmed input in above case:

Parent tx

Both transactions got confirmed in block 1807995.

| improve this answer | |
  • Thank you for your answer. – Motahareh Moravej Aug 21 at 19:44
  • Can I realize the "child pays for parent" scenario tracking this field? – Motahareh Moravej Aug 21 at 19:45
  • Yes if a transaction is dependent on other transaction and both get confirmed in the same block most probably because child tx used higher fee rate then its CPFP. Else its just one transaction dependent on another and can get confirmed in different blocks but be in the mempool at the same time for a while. – Prayank Aug 21 at 19:54
  • Perfect. Many Thanks – Motahareh Moravej Aug 21 at 20:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.