View Issue Details

IDProjectCategoryView StatusLast Update
0006553Talerexchangepublic2021-09-02 18:14
ReporterFlorian Dold Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product Versiongit (master) 
Target Version0.8Fixed in Version0.8 
Summary0006553: requested and residual value swapped in error response
DescriptionIt looks like the residual and requested value are swapped in the exchange's error response.

See additional information for the message that the exchange generates. Note how the operation would work if the values were as the exchange claimed.
Additional Information  {
    "type": "refresh-operation-error",
    "error": {
      "code": 7005,
      "hint": "Error: WALLET_UNEXPECTED_REQUEST_ERROR",
      "details": {
        "requestUrl": "http://localhost:8081/coins/6NXNGCZJWTCEZ42C491G5QX0D7F3KTW3A5DE2091FCPM93NP03S0/melt",
        "httpStatusCode": 409,
        "errorResponse": {
          "hint": "The respective coin did not have sufficient residual value for the /refresh/melt operation. The \"history\" in this response provdes the \"residual_value\" of the coin, which may be less than its \"original_value\".",
          "code": 1300,
          "coin_pub": "6NXNGCZJWTCEZ42C491G5QX0D7F3KTW3A5DE2091FCPM93NP03S0",
          "original_value": "TESTKUDOS:10",
          "residual_value": "TESTKUDOS:5.2",
          "requested_value": "TESTKUDOS:4.99",
          "history": [
            {
              "type": "REFUND",
              "amount": "TESTKUDOS:4.8",
              "refund_fee": "TESTKUDOS:0.2",
              "h_contract_terms": "D4JDC2MKG7R36E2P9MYTHMG95VR033F7KF5W3V811HXC2KY99CDQGWFBQZRPYPC2T7PCTGQ52C1TP8Q6ZJKHD3DPG2RH9YYTKY8D3W8",
              "merchant_pub": "MFSMHZCFHNF5QDNK9B4ZMNZQ10X5916J3RRQ59J67P5KT1VB1CCG",
              "rtransaction_id": 1,
              "merchant_sig": "85GA2PS96T0NGPPXKCFA6W1XFWJQ0J1VNZS23XB8DJHKZPRJB5ZPEDDQM2CP0F0MHYK3P5X2JK3DX5R23HDMNS70W4VA7E3NSTPH23R"
            },
            {
              "type": "MELT",
              "amount": "TESTKUDOS:5.2",
              "melt_fee": "TESTKUDOS:0.2",
              "rc": "FVGJ2JTXJ6QTQD3TK3EZ50BAB53ZFND97HCXD8V5TFCZBZN145MQTCRMAE54DY6N5VNKYCD9YBBVFXYWKSW2TWS5Z2T1EY7N5605EMR",
              "h_denom_pub": "XHX6TWT32E2CNYGPQ98QR03YEDCJ8FQGFRN3HBSEM7CFXZV13WEB7KZNE7W9TQ31HQ9SATFP4TBR3514NYZVXKSTP8YZZ3H9Y8DJV88",
              "coin_sig": "1GNQ0B2N7GK2TWQYZ6GV6Q66TFWVE7DHQ8RYQVZMPS1DW6FFYCEDX5S56FJ2RR8SBSD5SXT021FSZCWJRCGDYWPKR8E37QXSF57P210"
            },
            {
              "type": "DEPOSIT",
              "amount": "TESTKUDOS:5",
              "deposit_fee": "TESTKUDOS:0.2",
              "timestamp": {
                "t_ms": 1598979942000
              },
              "refund_deadline": {
                "t_ms": 1598979942000
              },
              "merchant_pub": "MFSMHZCFHNF5QDNK9B4ZMNZQ10X5916J3RRQ59J67P5KT1VB1CCG",
              "h_contract_terms": "D4JDC2MKG7R36E2P9MYTHMG95VR033F7KF5W3V811HXC2KY99CDQGWFBQZRPYPC2T7PCTGQ52C1TP8Q6ZJKHD3DPG2RH9YYTKY8D3W8",
              "h_wire": "8M0HYB05W5J65RYVSCZ83RRSWMZJ96B0KE4TBXEEAGYV6XDYQH48QGAZ0CFDWWJ9FRDD64F6CCDQ8W3YK341S8VV4HBTWQB510RZB9G",
              "h_denom_pub": "XHX6TWT32E2CNYGPQ98QR03YEDCJ8FQGFRN3HBSEM7CFXZV13WEB7KZNE7W9TQ31HQ9SATFP4TBR3514NYZVXKSTP8YZZ3H9Y8DJV88",
              "coin_sig": "78G5XXJJGGW28RWXMTNPVXKXY8RH31SZ6BJ6JJ8GFD83G929RJCVJNMMBC1X0QJQ7PVZD1XGZS2BG9YJFZTVNFT13E69K4MFTPB4G28"
            }
          ]
        }
      },
      "message": "Unexpected error code in response"
    }
  }
TagsNo tags attached.

Activities

Christian Grothoff

2020-09-02 00:03

manager   ~0016813

They are not swapped, but the residual_value is actually the total spent, not the total remaining. Fixing in implementation now...

Christian Grothoff

2020-09-02 00:05

manager   ~0016814

Fixed in d453c47a..ee4f1c10

Christian Grothoff

2021-09-02 18:14

manager   ~0018244

Fix committed to master branch.

Related Changesets

exchange: master ee4f1c10

2020-09-02 01:59

Christian Grothoff


Details Diff
fix 0006553: compute residual coin value correctly in melt conflict response Affected Issues
0006553
mod - contrib/gana Diff File
mod - src/exchange/taler-exchange-httpd_melt.c Diff File

Issue History

Date Modified Username Field Change
2020-09-01 19:20 Florian Dold New Issue
2020-09-01 19:20 Florian Dold Status new => assigned
2020-09-01 19:20 Florian Dold Assigned To => Christian Grothoff
2020-09-02 00:03 Christian Grothoff Note Added: 0016813
2020-09-02 00:03 Christian Grothoff Product Version => git (master)
2020-09-02 00:03 Christian Grothoff Target Version => 0.8
2020-09-02 00:05 Christian Grothoff Note Added: 0016814
2020-09-02 00:06 Christian Grothoff Status assigned => resolved
2020-09-02 00:06 Christian Grothoff Resolution open => fixed
2020-09-02 00:06 Christian Grothoff Fixed in Version => 0.8
2021-08-24 16:23 Christian Grothoff Status resolved => closed
2021-09-02 18:13 Christian Grothoff Changeset attached => Taler-exchange master ee4f1c10
2021-09-02 18:14 Christian Grothoff Note Added: 0018244