Please help us resolving this bug.
opened 02:45PM - 28 Feb 22 UTC
closed 10:16PM - 28 Feb 22 UTC
bug
networking
**Internal/External**
*External*
**Area**
*Other* Submitting transactio… n with cardano-submit-api
**Summary**
A transaction created with cardano-cli 1.32.1 on another computer can be send to a cardano-submit-api 1.33.0 running on a server with cardano-node 1.33.0, but when sending an identical transaction to the same server after upgrading cardano-submit-api and cardano-node to 1.34.0-rc3 (git revision 54155a28dbdb9a17e4ffe52b68f6c58af54ff83b), sending the transaction fails.
The message in the cardano-submit-api log is (I tried 2 times, and a few times yesterday):
Feb 28 16:10:04 <hostname> bash[92594]: MuxError (MuxIOException writev: resource vanished (Broken pipe)) "(sendAll errored)"
Feb 28 16:12:16 <hostname> bash[92594]: MuxError (MuxIOException writev: resource vanished (Broken pipe)) "(sendAll errored)"
After downgrading the cardano-node and the cardano-submit-api to 1.33.0, submitting the same transaction file is working as expected.
**Steps to reproduce**
Steps to reproduce the behavior:
1. Create the transaction:
ADDRESS=$(cat wallet/dev_wallet-1.addr)
DSTADDRESS=$(cat wallet/dev_wallet-1.addr)
CARDANO_NODE_SOCKET_PATH=/run/cardano-node-testnet.socket
TRANS=$(cardano-cli query utxo $TESTNET --address $ADDRESS | tail -n1)
UTXO=$(echo ${TRANS} | awk '{print $1}')
ID=$(echo ${TRANS} | awk '{print $2}')
TXIN=${UTXO}#${ID}
cardano-cli transaction build \
--testnet-magic 1097911063 \
--alonzo-era \
--tx-in ${TXIN} \
--change-address ${DSTADDRESS} \
--out-file tx.raw
2. Sign the transaction:
cardano-cli transaction sign \
--tx-body-file tx.raw \
--signing-key-file wallet/dev_wallet-1.skey \
--testnet-magic 1097911063 \
--out-file tx.signed
3. Encode the transaction as cbor file:
jq .cborHex tx.signed | xxd -r -p > tx.signed.cbor
4. Submit the transaction:
API_HOST=<hostname>
API_PORT=80
TXID=$(cardano-cli transaction txid --tx-file tx.signed)
curl -H "Content-Type: application/cbor" \
--data-binary @tx.signed.cbor \
-X POST \
http://${API_HOST}:${API_PORT}/api/submit/tx
5. The following error message is displayed at the console:
Something went wrong
and on the logs of the submi-api, the messages mentioned above.
**Expected behavior**
The following messages were displayed when submitting the same file with the same command after downgrading to 1.33.0:
At the console:
"8347016ebf0f45a8cce982cf3619163f372f0324a23ac6706d3163d9b033d3b3"
In the logs:
Feb 28 16:19:24 <hostname> bash[95607]: [cardano-tx-submit:Info:15] [2022-02-28 14:19:24.84 UTC] txSubmitPost: successfully submitted transaction 8347016ebf0f45a8
**System info (please complete the following information):**
- OS Name: Debian (server)
- OS Version 10.11
- Node version (output of `cardano-node --version`) (on the server. same version for cardano-submit-api):
cardano-node 1.33.0 - linux-x86_64 - ghc-8.10
git rev 54155a28dbdb9a17e4ffe52b68f6c58af54ff83b
- CLI version (output of `cardano-cli --version`) (on the workstation, where the transaction was created):
cardano-cli 1.32.1 - linux-x86_64 - ghc-8.10
git rev 4f65fb9a27aa7e3a1873ab4211e412af780a3648
Same error with cardano-cli 1.34.0-rc3 on the workstation (and with the transaction created on the server, but signed on the workstation and submitted from the workstation):
cardano-cli 1.33.0 - linux-x86_64 - ghc-8.10
git rev 54155a28dbdb9a17e4ffe52b68f6c58af54ff83b
os11k
20 May 2022 18:10
2
It is fixed on master(I tested), or you can build it from patch-cardano-ping-fix
tag, I never tested though.
So if you need it urgently fixed either ran master or patch-cardano-ping-fix
, not sure what to add more.
os11k
21 May 2022 08:35
3
I just tried patch-cardano-ping-fix
tag and seems that is broken. It is 12+ hours it is not synced and it shows mempool transactions… So seems something not good. First time I see such behavior on my relay.
7.4d4
22 May 2022 00:12
4
@weebl2000 pointed out how you can compile 1.34.1 with a specific version of the ouroboros network library:
You can try using the specific commit from ouroboros-network with the fix:
48ff9f3a9876713e87dc302e567f5747f21ad720
And use this in building cardano-node. Like so: Cherry-pick fix for p2p · weebl2000/cardano-node@9c77b3f · GitHub
[image]
And then rebuilding. No guarantees that everything will work, since there might be other changes that are incompatible but it’s worth a try. I tried it and it at least compiles, that’s saying a lot when dealing with Haskell programs.
I use this specific sed command for amending cabal.project when compiling 1.34.1:
sed -i 's/tag: 4fac197b6f0d2ff60dc3486c593b68dc00969fbf/tag: 48ff9f3a9876713e87dc302e567f5747f21ad720/g' cabal.project
I can confirm that when 1.34.1 is compiled with this fix, cardano-cli works while running in P2P mode. I have been running a couple of nodes in P2P mode since 1.34.1 was released without any problems.
1 Like