JoinMarket-Org/joinmarket-clientserver

Transaction fails, no additional error description?

FeatureSpitter opened this issue · 8 comments

image

This error has no useful information.

Where can I get a more precise cause?

Thanks

Just for clarity: this was sending without coinjoin, am I correct?

Just for clarity: this was sending without coinjoin, am I correct?

It was a direct send, on regtest.

version: "3.3"

services:

  bitcoind:
    image: lncm/bitcoind:v25.0
    container_name: bitcoind
    user: 1000:1000
    volumes:
      - ${MOUNT__BTC_DATA}:/data/.bitcoin
    environment:
      - BTC__RPC_USER=${BTC__RPC_USER}
      - BTC__RPC_PASS=${BTC__RPC_PASS}
      - BTC__RPC_PORT=${BTC__RPC_PORT}
    command: [
      "--server=1",
      "--rpcuser=${BTC__RPC_USER}",
      "--rpcpassword=${BTC__RPC_PASS}",
      "--rpcbind=0.0.0.0",
      "--rpcallowip=0.0.0.0/0",
      "--rpcport=${BTC__RPC_PORT}",
      "--txindex=1",
      "--zmqpubrawblock=tcp://0.0.0.0:${BTC__ZMQ_BLOCK_PORT}",
      "--zmqpubrawtx=tcp://0.0.0.0:${BTC__ZMQ_TX_PORT}",
      "--regtest=1",
    ]
    stop_grace_period: 1m
    networks:
      lulz:
        ipv4_address: 10.5.0.8

  jm:
    image: ghcr.io/joinmarket-webui/jam-standalone:v0.1.6-clientserver-v0.9.10
    container_name: jm
    init: true
    volumes:
      - ${MOUNT__JM_DATA}:/root/.joinmarket
    environment:
      WAIT_FOR_BITCOIND: "true"
      RESTORE_DEFAULT_CONFIG: "true"
      REMOVE_LOCK_FILES: "true"
      ENSURE_WALLET: "true"
      APP_USER: ${JM__USER}
      APP_PASSWORD: ${JM__PASS}
      JM_NETWORK: regtest
      JM_RPC_HOST: bitcoind
      JM_RPC_PORT: ${BTC__RPC_PORT}
      JM_RPC_USER: ${BTC__RPC_USER}
      JM_RPC_PASSWORD: ${BTC__RPC_PASS}
      JM_RPC_WALLET_FILE: jam_default
      TINI_SUBREAPER: "true"
    ports:
      - "${JM__PORT}:80"
    networks:
      lulz:
        ipv4_address: 10.5.0.13

networks:
  lulz:
    driver: bridge
    ipam:
      config:
        - subnet: 10.5.0.0/16

I am still stuck with this.
JM doesn't log anywhere the cause of this failure. :(

@AdamISZ I found the reason, JM logs it in the web-ui only (but doesn't store those logs on disk -- at least I couldn't find them).

Would it be too difficult to make it return the error cause in the HTTP response?

@theborakompanioni Any comments on this?

Any comments on this?

The UTXO/s don't seem to be frozen, so, just from the image above, I cannot really guess why the transaction fails.

I found the reason, JM logs it in the web-ui only (but doesn't store those logs on disk -- at least I couldn't find them).

Did you find out? What was the reason?
The logs in the image are stored in /var/log/jam. You can do docker exec -it <container_name> tail -f /var/log/jam/jmwalletd_stdout.log.

Would it be too difficult to make it return the error cause in the HTTP response?

As for the message, this is just - as seen on the screenshot - what is returned as error. It would indeed be great to have a more meaningful explanation!

Sorry been a bit busy with other things, but, as I understand it from a brief review previously, the problem is that in wallet_rpc's directsend method there are two raises of TransactionFailed, the one passed due to a raise of NotEnoughFunds is invoed with TransactionFailed(repr(e)) but the definition of the exception class TransactionFailed does not pay attention to any arguments, so this would need to be changed to have that error message e be bubbled up. The other invocation has a comment indicating "this should really never happen" but we would have to review the jmclient.wallet_utils.direct_send code carefully to see if there is some edge case.