Rippled: 3,458.989688 missing/lost XRP at block 7366105

Created on 4 Dec 2019  路  3Comments  路  Source: ripple/rippled

Potential bug:

Transaction: 58F40AA6F7A5D6CB8610BE1C341E66708FE84585926CA087992D35216C5E4FE1 at block 7366105

As you can see there are only 3 AccountRoot entries in the metadata:

1) Account: r37R... gets +2261834111 drops
2) Account rHpo... looses -10 drops for the tx fee
3) Account rJUi... looses -5720823799 drops

There are no other entries, +3458989688 drops (3,458.989688 XRP) is missing, no one gets in their balance the missing amount, is this amount lost due to some strange bug or a historical bug?


Below is the raw rpcjson response for tx: 58F40AA6F7A5D6CB8610BE1C341E66708FE84585926CA087992D35216C5E4FE1

{
  "Account": "rHpoggSkNY7puahMUGVafWPZQ5JH8piZVQ",
  "Amount": {
    "currency": "JPY",
    "issuer": "rMAz5ZnK73nyNUL4foAvaxdreczCkG3vA6",
    "value": "2500"
  },
  "Destination": "rHpoggSkNY7puahMUGVafWPZQ5JH8piZVQ",
  "Fee": "10",
  "Flags": 131072,
  "Paths": [
    [
      {
        "currency": "JPY",
        "issuer": "rMAz5ZnK73nyNUL4foAvaxdreczCkG3vA6",
        "type": 48,
        "type_hex": "0000000000000030"
      },
      {
        "account": "rMAz5ZnK73nyNUL4foAvaxdreczCkG3vA6",
        "type": 1,
        "type_hex": "0000000000000001"
      }
    ],
    [
      {
        "currency": "XRP",
        "type": 16,
        "type_hex": "0000000000000010"
      },
      {
        "currency": "JPY",
        "issuer": "rMAz5ZnK73nyNUL4foAvaxdreczCkG3vA6",
        "type": 48,
        "type_hex": "0000000000000030"
      },
      {
        "account": "rMAz5ZnK73nyNUL4foAvaxdreczCkG3vA6",
        "type": 1,
        "type_hex": "0000000000000001"
      }
    ]
  ],
  "SendMax": {
    "currency": "CNY",
    "issuer": "razqQKzJRdB4UxFPWf5NEpEG3WMkmwgcXA",
    "value": "149.25629291591"
  },
  "Sequence": 13610,
  "SigningPubKey": "03FC5F96EA61889691EC7A56FB2B859B600DE68C0255BF580D5C22D02EB97AFCE4",
  "TransactionType": "Payment",
  "TxnSignature": "304402201D36A76CA2EB0D332C380721266100AE67E1A600EEFF093F6E954960118397C2022020D7F61A1B971033959BC1D64841CDA6714258803D9E5A5692E2BB4C9845D192",
  "hash": "58F40AA6F7A5D6CB8610BE1C341E66708FE84585926CA087992D35216C5E4FE1",
  "metaData": {
    "AffectedNodes": [
      {
        "ModifiedNode": {
          "FinalFields": {
            "Account": "rHpoggSkNY7puahMUGVafWPZQ5JH8piZVQ",
            "Balance": "74993503",
            "Flags": 0,
            "OwnerCount": 6,
            "Sequence": 13611
          },
          "LedgerEntryType": "AccountRoot",
          "LedgerIndex": "0FCD092467A9098926161CCE5331EA35DD2846CE7B98690B68D23B96505AA65F",
          "PreviousFields": {
            "Balance": "74993513",
            "Sequence": 13610
          },
          "PreviousTxnID": "F6452ADF4ECFD21CC4C5E55EFDCC73430746B618645E4270EA25C58DE377C1A4",
          "PreviousTxnLgrSeq": 7366103
        }
      },
      {
        "ModifiedNode": {
          "FinalFields": {
            "Account": "r37RhTPgw8Eu6ucV2Ut47zBBRvU316dmp",
            "Balance": "2559862931448",
            "Flags": 0,
            "OwnerCount": 25,
            "Sequence": 2654
          },
          "LedgerEntryType": "AccountRoot",
          "LedgerIndex": "10D12876A7C1042CE651A6BDD03FFA58D12D83117CADE921197B2398D3056EF0",
          "PreviousFields": {
            "Balance": "2557601097337"
          },
          "PreviousTxnID": "0576D51D2EAF13F91EC23FCB1E91B2D076735DA3F1DFC2BD1E488ED1698E09E9",
          "PreviousTxnLgrSeq": 7366104
        }
      },
      {
        "ModifiedNode": {
          "FinalFields": {
            "Account": "rJUieDFQxq5wngq5VQvnumJSkEVdy2DVgz",
            "BookDirectory": "7254404DF6B7FBFFEF34DC38867A7E7DE610B513997B78804D0945C7FADD2000",
            "BookNode": "0000000000000000",
            "Flags": 131072,
            "OwnerNode": "0000000000000000",
            "Sequence": 62,
            "TakerGets": "11786306349",
            "TakerPays": {
              "currency": "CNY",
              "issuer": "razqQKzJRdB4UxFPWf5NEpEG3WMkmwgcXA",
              "value": "307.622596203605"
            }
          },
          "LedgerEntryType": "Offer",
          "LedgerIndex": "2EEC5547B4B2D4AF00CE2E35B9F1FD3DE7937D74D981FF670E53859CA55B8A4B",
          "PreviousFields": {
            "TakerGets": "456.93609734496 / 17507130148",
            "TakerPays": {
              "currency": "CNY",
              "issuer": "razqQKzJRdB4UxFPWf5NEpEG3WMkmwgcXA",
              "value": "456.93609734496"
            }
          },
          "PreviousTxnID": "F6452ADF4ECFD21CC4C5E55EFDCC73430746B618645E4270EA25C58DE377C1A4",
          "PreviousTxnLgrSeq": 7366103
        }
      },
      {
        "ModifiedNode": {
          "FinalFields": {
            "Balance": {
              "currency": "CNY",
              "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
              "value": "-25702.09777293959"
            },
            "Flags": 2228224,
            "HighLimit": {
              "currency": "CNY",
              "issuer": "rJUieDFQxq5wngq5VQvnumJSkEVdy2DVgz",
              "value": "100000"
            },
            "HighNode": "0000000000000000",
            "LowLimit": {
              "currency": "CNY",
              "issuer": "razqQKzJRdB4UxFPWf5NEpEG3WMkmwgcXA",
              "value": "0"
            },
            "LowNode": "00000000000000C5"
          },
          "LedgerEntryType": "RippleState",
          "LedgerIndex": "3796E6919874FF97E60788C4482A6F62E9D50CC744B982088306495401D4DD45",
          "PreviousFields": {
            "Balance": {
              "currency": "CNY",
              "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
              "value": "-25643.06390265504"
            }
          },
          "PreviousTxnID": "F6452ADF4ECFD21CC4C5E55EFDCC73430746B618645E4270EA25C58DE377C1A4",
          "PreviousTxnLgrSeq": 7366103
        }
      },
      {
        "ModifiedNode": {
          "FinalFields": {
            "Account": "rJUieDFQxq5wngq5VQvnumJSkEVdy2DVgz",
            "Balance": "601023423042",
            "Flags": 0,
            "OwnerCount": 24,
            "Sequence": 64
          },
          "LedgerEntryType": "AccountRoot",
          "LedgerIndex": "3AEAAF3792A262F8F25BE249405C563BB88C928294F6A8DC5EA6113C09EF9531",
          "PreviousFields": {
            "Balance": "606744246841"
          },
          "PreviousTxnID": "F6452ADF4ECFD21CC4C5E55EFDCC73430746B618645E4270EA25C58DE377C1A4",
          "PreviousTxnLgrSeq": 7366103
        }
      },
      {
        "ModifiedNode": {
          "FinalFields": {
            "Balance": {
              "currency": "JPY",
              "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
              "value": "3096135.966847795"
            },
            "Flags": 1114112,
            "HighLimit": {
              "currency": "JPY",
              "issuer": "rMAz5ZnK73nyNUL4foAvaxdreczCkG3vA6",
              "value": "0"
            },
            "HighNode": "0000000000000015",
            "LowLimit": {
              "currency": "JPY",
              "issuer": "r37RhTPgw8Eu6ucV2Ut47zBBRvU316dmp",
              "value": "9000000"
            },
            "LowNode": "0000000000000000"
          },
          "LedgerEntryType": "RippleState",
          "LedgerIndex": "60F4A29E6C43A5CB7AC54B78A0DAE592A1F4FBD1EC75672DD6C53B1F9963F9C4",
          "PreviousFields": {
            "Balance": {
              "currency": "JPY",
              "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
              "value": "3098635.966847795"
            }
          },
          "PreviousTxnID": "0576D51D2EAF13F91EC23FCB1E91B2D076735DA3F1DFC2BD1E488ED1698E09E9",
          "PreviousTxnLgrSeq": 7366104
        }
      },
      {
        "ModifiedNode": {
          "FinalFields": {
            "Account": "r37RhTPgw8Eu6ucV2Ut47zBBRvU316dmp",
            "BookDirectory": "92466F5377C34C5EA957034339321E217A23FA4E27A31D475B0821393C22CAB0",
            "BookNode": "0000000000000000",
            "Flags": 0,
            "OwnerNode": "0000000000000000",
            "Sequence": 2653,
            "TakerGets": {
              "currency": "JPY",
              "issuer": "rMAz5ZnK73nyNUL4foAvaxdreczCkG3vA6",
              "value": "18304.52489892399"
            },
            "TakerPays": "41886784662"
          },
          "LedgerEntryType": "Offer",
          "LedgerIndex": "B993CE36FB090C5FEB7A4D6B6BBCB2BFD6CC8E33472F1C54214094C27BEA620A",
          "PreviousFields": {
            "TakerGets": {
              "currency": "JPY",
              "issuer": "rMAz5ZnK73nyNUL4foAvaxdreczCkG3vA6",
              "value": "20804.52489892399"
            },
            "TakerPays": "47607608461"
          },
          "PreviousTxnID": "0576D51D2EAF13F91EC23FCB1E91B2D076735DA3F1DFC2BD1E488ED1698E09E9",
          "PreviousTxnLgrSeq": 7366104
        }
      },
      {
        "ModifiedNode": {
          "FinalFields": {
            "Balance": {
              "currency": "CNY",
              "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
              "value": "0"
            },
            "Flags": 2228224,
            "HighLimit": {
              "currency": "CNY",
              "issuer": "rHpoggSkNY7puahMUGVafWPZQ5JH8piZVQ",
              "value": "200000"
            },
            "HighNode": "0000000000000000",
            "LowLimit": {
              "currency": "CNY",
              "issuer": "razqQKzJRdB4UxFPWf5NEpEG3WMkmwgcXA",
              "value": "0"
            },
            "LowNode": "00000000000000AA"
          },
          "LedgerEntryType": "RippleState",
          "LedgerIndex": "D043B6B526F5B9FBC7C2DE1BC2D59291A0C59CB7906153CF0E7DC2F6C80D00C8",
          "PreviousFields": {
            "Balance": {
              "currency": "CNY",
              "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
              "value": "-59.033870284555"
            }
          },
          "PreviousTxnID": "F6452ADF4ECFD21CC4C5E55EFDCC73430746B618645E4270EA25C58DE377C1A4",
          "PreviousTxnLgrSeq": 7366103
        }
      },
      {
        "ModifiedNode": {
          "FinalFields": {
            "Balance": {
              "currency": "JPY",
              "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
              "value": "383829.4578252457 - 382841.0363187387"
            },
            "Flags": 1114112,
            "HighLimit": {
              "currency": "JPY",
              "issuer": "rMAz5ZnK73nyNUL4foAvaxdreczCkG3vA6",
              "value": "0"
            },
            "HighNode": "000000000000000C",
            "LowLimit": {
              "currency": "JPY",
              "issuer": "rHpoggSkNY7puahMUGVafWPZQ5JH8piZVQ",
              "value": "1000000000"
            },
            "LowNode": "0000000000000000"
          },
          "LedgerEntryType": "RippleState",
          "LedgerIndex": "E2F373FF3803FFEB2F3EBB805AE20A00A16E7A32E6F51EA49AEA47D4B851AAC5",
          "PreviousFields": {
            "Balance": {
              "currency": "JPY",
              "issuer": "rrrrrrrrrrrrrrrrrrrrBZbvji",
              "value": "382841.0363187387"
            }
          },
          "PreviousTxnID": "F6452ADF4ECFD21CC4C5E55EFDCC73430746B618645E4270EA25C58DE377C1A4",
          "PreviousTxnLgrSeq": 7366103
        }
      }
    ],
    "DeliveredAmount": {
      "currency": "JPY",
      "issuer": "rMAz5ZnK73nyNUL4foAvaxdreczCkG3vA6",
      "value": "988.4215065070004"
    },
    "TransactionIndex": 2,
    "TransactionResult": "tesSUCCESS",
    "delivered_amount": {
      "currency": "JPY",
      "issuer": "rMAz5ZnK73nyNUL4foAvaxdreczCkG3vA6",
      "value": "988.4215065070004"
    }
  }
}

Most helpful comment

Sorry for the delay in getting back to you, but this issue dates back to 2014, so it took a bit of time to research and then verify our findings. First of all, thanks for looking carefully (and far back!) enough to spot this!

The issue you highlight was known and it was the result of a bug that was fixed with, inter alia, commit https://github.com/ripple/rippled/commit/828c2e3c7166ab917ce7002e884b602c4087796b. The fix has been in the codebase since 0.25.2 which was released in July of 2014.

The current code does not exhibit this behavior; if it did, it would be caught by the invariant checking code in the XRPNotCreated checker: https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/InvariantCheck.h#L110-L136

If you have further questions about this issue, please feel free to post a follow-up. Otherwise, please be sure to close this issue. We will close it after a minimum of two weeks of inactivity.

All 3 comments

Thanks for reporting this. We'll look into it ASAP.

Sorry for the delay in getting back to you, but this issue dates back to 2014, so it took a bit of time to research and then verify our findings. First of all, thanks for looking carefully (and far back!) enough to spot this!

The issue you highlight was known and it was the result of a bug that was fixed with, inter alia, commit https://github.com/ripple/rippled/commit/828c2e3c7166ab917ce7002e884b602c4087796b. The fix has been in the codebase since 0.25.2 which was released in July of 2014.

The current code does not exhibit this behavior; if it did, it would be caught by the invariant checking code in the XRPNotCreated checker: https://github.com/ripple/rippled/blob/develop/src/ripple/app/tx/impl/InvariantCheck.h#L110-L136

If you have further questions about this issue, please feel free to post a follow-up. Otherwise, please be sure to close this issue. We will close it after a minimum of two weeks of inactivity.

Amazing, thanks @nbougalis , closing the issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lrauldan picture lrauldan  路  5Comments

mDuo13 picture mDuo13  路  4Comments

XieXiaomei-ptr picture XieXiaomei-ptr  路  3Comments

nixer89 picture nixer89  路  9Comments

tuloski picture tuloski  路  8Comments