Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to send more than one transaction within a block #128

Closed
merc1er opened this issue Jul 15, 2023 · 2 comments
Closed

Unable to send more than one transaction within a block #128

merc1er opened this issue Jul 15, 2023 · 2 comments

Comments

@merc1er
Copy link
Member

merc1er commented Jul 15, 2023

The UTXO list from the Actorforth API is incorrect when a transaction is pending (in mempool).

Example:

Upon sending a single transaction 555fc34812eb83e64d9f488b1091c5668ad49a11618c2e9debf573f3d5d0b96a from the address qrjluzvef02tz5czm5u90jkdalte8qldyqc7afjlsd to the same address, the following UTXOs are returned by Actorforth:

{
  "utxos": [
    {
      "height": 801429,
      "txid": "ac6ff11bcdcfcfdaa043c1eadcca915b96e4aa12d9044e5ebfcb87bc648faa5e",
      "vout": 0,
      "satoshis": 187709,
      "amount": 0.00187709,
      "confirmations": 433
    },
    {
      "height": 0,
      "txid": "555fc34812eb83e64d9f488b1091c5668ad49a11618c2e9debf573f3d5d0b96a",
      "vout": 0,
      "satoshis": 187517,
      "amount": 0.00187517,
      "confirmations": 0
    }
  ],
  "legacyAddress": "1My64mJNQy9dDa1zaJzJfaqjB5QFRfNzsi",
  "cashAddress": "bitcoincash:qrjluzvef02tz5czm5u90jkdalte8qldyqc7afjlsd",
  "slpAddress": "simpleledger:qrjluzvef02tz5czm5u90jkdalte8qldyq59kj8lwn",
  "scriptPubKey": "76a914e5fe09994bd4b15302dd3857cacdefd79383ed2088ac",
  "asm": "OP_DUP OP_HASH160 e5fe09994bd4b15302dd3857cacdefd79383ed20 OP_EQUALVERIFY OP_CHECKSIG"
}

The correct output should be:

{
  "utxos": [
    {
      "height": 0,
      "txid": "555fc34812eb83e64d9f488b1091c5668ad49a11618c2e9debf573f3d5d0b96a",
      "vout": 0,
      "satoshis": 187517,
      "amount": 0.00187517,
      "confirmations": 0
    }
  ],
  "legacyAddress": "1My64mJNQy9dDa1zaJzJfaqjB5QFRfNzsi",
  "cashAddress": "bitcoincash:qrjluzvef02tz5czm5u90jkdalte8qldyqc7afjlsd",
  "slpAddress": "simpleledger:qrjluzvef02tz5czm5u90jkdalte8qldyq59kj8lwn",
  "scriptPubKey": "76a914e5fe09994bd4b15302dd3857cacdefd79383ed2088ac",
  "asm": "OP_DUP OP_HASH160 e5fe09994bd4b15302dd3857cacdefd79383ed20 OP_EQUALVERIFY OP_CHECKSIG"
}

as the UTXO from ac6ff11bcdcfcfdaa043c1eadcca915b96e4aa12d9044e5ebfcb87bc648faa5e is already spent.

Context

This issue starting appearing shortly after the May 2023 network upgrade. Actorforth's service went down because they did not upgrade their BCHN node. They upgraded it shortly after the outage was reported to them and went back online.

However, the UTXO issue was noticed shortly after, and they told me that they did not change their indexer and API codebase.

@merc1er
Copy link
Member Author

merc1er commented Jul 15, 2023

PR #122 replaces the UTXO endpoint with chaingraph, fixing this issue.

@merc1er merc1er closed this as completed Aug 11, 2023
@merc1er
Copy link
Member Author

merc1er commented Aug 11, 2023

Fixed in #122

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant