ExchangeUnion / xud-docker

Streamlined setup of xud and all dependencies via docker 🐳
https://docs.exchangeunion.com
GNU Affero General Public License v3.0
5 stars 5 forks source link

feat: upgrade connext to 7.1.2 #654

Closed ghost closed 4 years ago

raladev commented 4 years ago

Updated connext client(From 7.1.0 to 7.1.1):

openchannel ETH 5 closechannel ETH --amount 0.015

UPD: Tested with clean installation - same result

2020-08-10T12:47:37.499Z [CF-RpcRouter] Processed chan_getFreeBalanceState method in 11 ms
[1597063659717] INFO  (70 on connext): received request
    url: "/withdraw"
    id: 45
    reqId: 45
[1597063659718] INFO  (70 on connext): Getting client for publicIdentifier: indra6vpM6vL2M2qUrt9BAmjg47hBxP9zmPTWjn2qY8ec1Dr6mqpwbR
2020-08-10T12:47:39.719Z [WithdrawalController] withdraw started: {
  "recipient": "",
  "amount": "15000000000000000"
}
2020-08-10T12:47:39.719Z [CF-GetStateChannel] Executing with params: {"multisigAddress":"0x066a..63d5"}
2020-08-10T12:47:39.721Z [CF-GetStateChannel] Before execution complete in 2 ms
2020-08-10T12:47:39.722Z [CF-RpcRouter] Processed chan_getStateChannel method in 3 ms
2020-08-10T12:47:39.826Z [WithdrawalController] Calling propose install
2020-08-10T12:47:39.827Z [CF-GetFreeBalanceState] Executing with params: {"multisigAddress":"0x066a..63d5","assetId":"0x0000..0000"}
2020-08-10T12:47:39.832Z [CF-GetFreeBalanceState] Before execution complete in 5 ms
2020-08-10T12:47:39.840Z [CF-GetFreeBalanceState] Executed method implementation in 7 ms
2020-08-10T12:47:39.840Z [CF-RpcRouter] Processed chan_getFreeBalanceState method in 13 ms
2020-08-10T12:47:39.842Z [CF-ProposeInstall] Executing with params: {"abiEncodings":{"actionEncoding":"tuple( bytes signature)","stateEncoding":"tuple( tuple( address to, uint256 amount)[2] transfers, bytes[2] signatures, address[2] signers, bytes32 data, bytes32 nonce, bool finalized)"},"appDefinition":"0x2896..Abb6","initialState":{"transfers":[{"amount":"15000000000000000","to":"0xC922..05D9"},{"amount":"0","to":"0xE223..1BA6"}],"signatures":["0x01ee..f71c","0x0000..0000"],"signers":["0xC922..05D9","0xE223..1BA6"],"data":"0xf1fe..a7cd","nonce":"0x64ed..cf9d","finalized":false},"initiatorDeposit":"15000000000000000","initiatorDepositAssetId":"0x0000..0000","multisigAddress":"0x066a..63d5","outcomeType":"SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER","responderIdentifier":"indra6WRA..4cBh","responderDeposit":"0","responderDepositAssetId":"0x0000..0000","defaultTimeout":"8640","stateTimeout":"0"}
2020-08-10T12:47:39.893Z [NodeApiClient] Node responded to indra6vpM6vL2M2qUrt9BAmjg47hBxP9zmPTWjn2qY8ec1Dr6mqpwbR.indra6WRA6HQQTDQD1FC3KmdbpePijdcgLTqAdi2xy2Q2HqNeGn4cBh.1337.lock.acquire.0x066aB017dC559470d65b1420d076ac28699963d5 request in 51 ms
2020-08-10T12:47:39.893Z [CF-ProposeInstall] Acquired locks 0x066aB017dC559470d65b1420d076ac28699963d5 in 52 ms
2020-08-10T12:47:39.898Z [CF-ProposeInstall] Before execution complete in 5 ms
2020-08-10T12:47:39.898Z [CF-ProposeProtocol] [0x066aB017dC559470d65b1420d076ac28699963d5] Initiation started
2020-08-10T12:47:39.903Z [CF-ProposeProtocol] [0x066aB017dC559470d65b1420d076ac28699963d5] Validated proposal 0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6 in 5 ms
2020-08-10T12:47:39.918Z [CF-ProposeProtocol] [0x066aB017dC559470d65b1420d076ac28699963d5] Signed set state commitment 0x3b42bf30fe11842f2ad980dfe07f93af65c5e19f034281ab7bf1fd2808864895 & conditional transfer commitment 0x1dd3281898c55014ed54e06932b34a45eaa3f78ce466e02d5f78259924d309fb in 2 ms
2020-08-10T12:47:40.094Z [CF-ProposeProtocol] [0x066aB017dC559470d65b1420d076ac28699963d5] Received responder's m2 in 176 ms
2020-08-10T12:47:40.097Z [CF-ProposeProtocol] [0x066aB017dC559470d65b1420d076ac28699963d5] Asserted valid responder signature set state commitment in 3 ms
2020-08-10T12:47:40.099Z [CF-ProposeProtocol] [0x066aB017dC559470d65b1420d076ac28699963d5] Asserted valid responder signature on conditional transaction in 2 ms
2020-08-10T12:47:40.133Z [CF-ProposeProtocol] [0x066aB017dC559470d65b1420d076ac28699963d5] Persisted app instance 0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6 in 16 ms
2020-08-10T12:47:40.192Z [NodeApiClient] Node responded to indra6vpM6vL2M2qUrt9BAmjg47hBxP9zmPTWjn2qY8ec1Dr6mqpwbR.indra6WRA6HQQTDQD1FC3KmdbpePijdcgLTqAdi2xy2Q2HqNeGn4cBh.1337.lock.release.0x066aB017dC559470d65b1420d076ac28699963d5 request in 59 ms
2020-08-10T12:47:40.192Z [CF-ProposeInstall] Acquired locks 0x066aB017dC559470d65b1420d076ac28699963d5 in 59 ms
2020-08-10T12:47:40.213Z [CF-InstallProtocol] [0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6] Response started
2020-08-10T12:47:40.225Z [CF-InstallProtocol] [0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6] Validated app 0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6 in 12 ms
2020-08-10T12:47:40.236Z [CF-InstallProtocol] [0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6] Verified initiator's free balance update sig in 11 ms
2020-08-10T12:47:40.253Z [CF-InstallProtocol] [0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6] Persisted app 0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6 in 17 ms
2020-08-10T12:47:40.253Z [CF-InstallProtocol] [0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6] Response finished in 40 ms
2020-08-10T12:47:40.253Z [ConnextListener] runPostInstallTasks for app WithdrawApp 0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6 started
2020-08-10T12:47:40.254Z [ConnextListener] runPostInstallTasks for app WithdrawApp 0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6 complete
2020-08-10T12:47:40.254Z [ConnextListener] handleAppProposal for app WithdrawApp 0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6 completed
2020-08-10T12:47:40.254Z [CF-RequestHandler] Event for install protocol was processed in 47 ms
2020-08-10T12:47:40.372Z [WithdrawalController] Installed app with id: 0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6
2020-08-10T12:47:40.373Z [WithdrawalController] Waiting for node to provide withdrawl tx hash
[1597063660487] INFO  (70 on connext): Getting client for publicIdentifier: indra6vpM6vL2M2qUrt9BAmjg47hBxP9zmPTWjn2qY8ec1Dr6mqpwbR
2020-08-10T12:47:40.488Z [CF-GetFreeBalanceState] Executing with params: {"multisigAddress":"0x066a..63d5","assetId":"0x0000..0000"}
2020-08-10T12:47:40.495Z [CF-GetFreeBalanceState] Before execution complete in 7 ms
2020-08-10T12:47:40.501Z [CF-GetFreeBalanceState] Executed method implementation in 6 ms
2020-08-10T12:47:40.501Z [CF-RpcRouter] Processed chan_getFreeBalanceState method in 13 ms
2020-08-10T12:47:41.036Z [CF-UninstallProtocol] [0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6] Response started
2020-08-10T12:47:41.041Z [CF-UninstallProtocol] [0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6] Validated uninstall request in 5 ms
2020-08-10T12:47:41.385Z [CF-UninstallProtocol] [0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6] Asserted valid signature in responding uninstall in 12 ms
[1597063661618] ERROR (70 on connext): Error: Cannot find withdrawal tx in uninstall event data: {
  "appIdentityHash": "0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6",
  "multisigAddress": "0x066aB017dC559470d65b1420d076ac28699963d5",
  "uninstalledApp": {
    "abiEncodings": {
      "actionEncoding": "tuple( bytes signature)",
      "stateEncoding": "tuple( tuple( address to, uint256 amount)[2] transfers, bytes[2] signatures, address[2] signers, bytes32 data, bytes32 nonce, bool finalized)"
    },
    "appDefinition": "0x289608A1041BD3a36bd4BA42cFAC9B1825FfAbb6",
    "appSeqNo": 3,
    "defaultTimeout": "0x21c0",
    "identityHash": "0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6",
    "initiatorDeposit": "0x354a6ba7a18000",
    "initiatorDepositAssetId": "0x0000000000000000000000000000000000000000",
    "initiatorIdentifier": "indra6vpM6vL2M2qUrt9BAmjg47hBxP9zmPTWjn2qY8ec1Dr6mqpwbR",
    "latestState": {
      "transfers": [
        {
          "amount": "15000000000000000",
          "to": "0xC9220c5424E77ADFDaa88b3eB66CbB08e4DE05D9"
        },
        {
          "amount": "0",
          "to": "0xE223A8135A27733Fed9e4812f443EC15ece31BA6"
        }
      ],
      "signatures": [
        "0x01eea9d670927ed1da03853317e608b63f543c2c89c476eb3c6f72b5b0937a131a447a57dc6c9af25a58cdfdca665397f17bb094e0ef89346b090e6158de3df71c",
        "0x0000000000000000000000000000000000000000000000000000000000000000"
      ],
      "signers": [
        "0xC9220c5424E77ADFDaa88b3eB66CbB08e4DE05D9",
        "0xE223A8135A27733Fed9e4812f443EC15ece31BA6"
      ],
      "data": "0xf1feb2179205566d8fbc30198ba459ec47c91f73e1d271cea65d35474d38a7cd",
      "nonce": "0x64ed987b214601b640525f510946ab2d58176f0f2fad61249b85381824bdcf9d",
      "finalized": false
    },
    "latestVersionNumber": 1,
    "multisigAddress": "0x066aB017dC559470d65b1420d076ac28699963d5",
    "outcomeInterpreterParameters": {
      "limit": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
      "tokenAddress": "0x0000000000000000000000000000000000000000"
    },
    "outcomeType": "SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER",
    "responderDeposit": "0x00",
    "responderDepositAssetId": "0x0000000000000000000000000000000000000000",
    "responderIdentifier": "indra6WRA6HQQTDQD1FC3KmdbpePijdcgLTqAdi2xy2Q2HqNeGn4cBh",
    "stateTimeout": "0x00"
  }
}
    at WithdrawalController.<anonymous> (/app/node_modules/@connext/client/dist/controllers/WithdrawalController.js:62:27)
    at Generator.next (<anonymous>)
    at fulfilled (/app/node_modules/@connext/client/dist/controllers/WithdrawalController.js:5:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    Error: Error: Cannot find withdrawal tx in uninstall event data: {
      "appIdentityHash": "0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6",
      "multisigAddress": "0x066aB017dC559470d65b1420d076ac28699963d5",
      "uninstalledApp": {
        "abiEncodings": {
          "actionEncoding": "tuple( bytes signature)",
          "stateEncoding": "tuple( tuple( address to, uint256 amount)[2] transfers, bytes[2] signatures, address[2] signers, bytes32 data, bytes32 nonce, bool finalized)"
        },
        "appDefinition": "0x289608A1041BD3a36bd4BA42cFAC9B1825FfAbb6",
        "appSeqNo": 3,
        "defaultTimeout": "0x21c0",
        "identityHash": "0x2f6341e14c04f243287850db39533e425bd69e52f4df0add20542d2e4829d8f6",
        "initiatorDeposit": "0x354a6ba7a18000",
        "initiatorDepositAssetId": "0x0000000000000000000000000000000000000000",
        "initiatorIdentifier": "indra6vpM6vL2M2qUrt9BAmjg47hBxP9zmPTWjn2qY8ec1Dr6mqpwbR",
        "latestState": {
          "transfers": [
            {
              "amount": "15000000000000000",
              "to": "0xC9220c5424E77ADFDaa88b3eB66CbB08e4DE05D9"
            },
            {
              "amount": "0",
              "to": "0xE223A8135A27733Fed9e4812f443EC15ece31BA6"
            }
          ],
          "signatures": [
            "0x01eea9d670927ed1da03853317e608b63f543c2c89c476eb3c6f72b5b0937a131a447a57dc6c9af25a58cdfdca665397f17bb094e0ef89346b090e6158de3df71c",
            "0x0000000000000000000000000000000000000000000000000000000000000000"
          ],
          "signers": [
            "0xC9220c5424E77ADFDaa88b3eB66CbB08e4DE05D9",
            "0xE223A8135A27733Fed9e4812f443EC15ece31BA6"
          ],
          "data": "0xf1feb2179205566d8fbc30198ba459ec47c91f73e1d271cea65d35474d38a7cd",
          "nonce": "0x64ed987b214601b640525f510946ab2d58176f0f2fad61249b85381824bdcf9d",
          "finalized": false
        },
        "latestVersionNumber": 1,
        "multisigAddress": "0x066aB017dC559470d65b1420d076ac28699963d5",
        "outcomeInterpreterParameters": {
          "limit": "115792089237316195423570985008687907853269984665640564039457584007913129639935",
          "tokenAddress": "0x0000000000000000000000000000000000000000"
        },
        "outcomeType": "SINGLE_ASSET_TWO_PARTY_COIN_TRANSFER",
        "responderDeposit": "0x00",
        "responderDepositAssetId": "0x0000000000000000000000000000000000000000",
        "responderIdentifier": "indra6WRA6HQQTDQD1FC3KmdbpePijdcgLTqAdi2xy2Q2HqNeGn4cBh",
        "stateTimeout": "0x00"
      }
    }
        at WithdrawalController.<anonymous> (/app/node_modules/@connext/client/dist/controllers/WithdrawalController.js:62:27)
        at Generator.next (<anonymous>)
        at fulfilled (/app/node_modules/@connext/client/dist/controllers/WithdrawalController.js:5:58)
        at runMicrotasks (<anonymous>)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
        at WithdrawalController.<anonymous> (/app/node_modules/@connext/client/dist/controllers/WithdrawalController.js:91:23)
        at Generator.next (<anonymous>)
        at fulfilled (/app/node_modules/@connext/client/dist/controllers/WithdrawalController.js:5:58)
        at runMicrotasks (<anonymous>)
        at processTicksAndRejections (internal/process/task_queues.js:97:5)
[1597063661620] INFO  (70 on connext): request completed
    url: "/withdraw"
    statusCode: 500
    reqId: 45
[1597063663487] INFO  (70 on connext): Getting client for publicIdentifier: indra6vpM6vL2M2qUrt9BAmjg47hBxP9zmPTWjn2qY8ec1Dr6mqpwbR
ghost commented 4 years ago

@raladev @kilrau when you test this again please do so with a clean environment as the contract address for USDT changed and simnet was completely wiped. Using old connext store could cause weird issues.

ghost commented 4 years ago

With the node upgraded to 7.1.2 closechannel seems to work for me:

simnet > getbalance

Balance:
┌──────────┬───────────────┬────────────────────────────┬───────────────────────────────┐
│ Currency │ Total Balance │ Channel Balance (Tradable) │ Wallet Balance (Not Tradable) │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ BTC      │ 2.5           │ 0 (2.5 pending)            │ 0                             │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ ETH      │ 14.99942669   │ 10                         │ 4.99942669                    │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ LTC      │ 5             │ 0 (5 pending)              │ 0                             │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ USDT     │ 1000          │ 1000                       │ 0                             │
└──────────┴───────────────┴────────────────────────────┴───────────────────────────────┘
simnet > closechannel ETH --amount 10
success
simnet > getbalance

Balance:
┌──────────┬───────────────┬────────────────────────────┬───────────────────────────────┐
│ Currency │ Total Balance │ Channel Balance (Tradable) │ Wallet Balance (Not Tradable) │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ BTC      │ 2.5           │ 0 (2.5 pending)            │ 0                             │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ ETH      │ 14.99942669   │ 0                          │ 14.99942669                   │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ LTC      │ 5             │ 0 (5 pending)              │ 0                             │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ USDT     │ 1000          │ 1000                       │ 0                             │
└──────────┴───────────────┴────────────────────────────┴───────────────────────────────┘
kilrau commented 4 years ago

Withdrawal looking good now:

simnet > getbalance

Balance:
┌──────────┬───────────────┬────────────────────────────┬───────────────────────────────┐
│ Currency │ Total Balance │ Channel Balance (Tradable) │ Wallet Balance (Not Tradable) │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ BTC      │ 2.49802832    │ 2.49802832                 │ 0                             │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ ETH      │ 14.99921669   │ 11                         │ 3.99921669                    │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ LTC      │ 5             │ 5                          │ 0                             │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ USDT     │ 1000          │ 1000                       │ 0                             │
└──────────┴───────────────┴────────────────────────────┴───────────────────────────────┘
simnet > closechannel eth
success
simnet > getbalance

Balance:
┌──────────┬───────────────┬────────────────────────────┬───────────────────────────────┐
│ Currency │ Total Balance │ Channel Balance (Tradable) │ Wallet Balance (Not Tradable) │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ BTC      │ 2.49802832    │ 2.49802832                 │ 0                             │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ ETH      │ 3.99921669    │ 0                          │ 3.99921669                    │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ LTC      │ 5             │ 5                          │ 0                             │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ USDT     │ 1000          │ 1000                       │ 0                             │
└──────────┴───────────────┴────────────────────────────┴───────────────────────────────┘
simnet > getbalance

Balance:
┌──────────┬───────────────┬────────────────────────────┬───────────────────────────────┐
│ Currency │ Total Balance │ Channel Balance (Tradable) │ Wallet Balance (Not Tradable) │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ BTC      │ 2.49802832    │ 2.49802832                 │ 0                             │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ ETH      │ 14.99921669   │ 0                          │ 14.99921669                   │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ LTC      │ 5             │ 5                          │ 0                             │
├──────────┼───────────────┼────────────────────────────┼───────────────────────────────┤
│ USDT     │ 1000          │ 1000                       │ 0                             │
└──────────┴───────────────┴────────────────────────────┴───────────────────────────────┘

withdrawal connext client logs: https://paste.ubuntu.com/p/9smJPMH9SY/