Transaction via cardano-submit-api fails (with Nami)

I have a node synced and running on a Ubuntu server. I also run the cardano-submit-api so I can use that node externally.

cardano-node parameters:
/usr/bin/cardano-node run +RTS -N -RTS --database-path /var/lib/cardano-node/db --socket-path /run/cardano-node/socket --host-addr 127.0.0.1 --port 3000 --config /var/lib/cardano-node/config/cardano/mainnet-config.json --topology /var/lib/cardano-node/config/cardano/mainnet-topology.json

cardano-submit-api parameters:

cardano-submit-api --config /var/lib/cardano-node/config/tx-submit-mainnet-config.yaml \
                   --socket-path /run/cardano-node/socket\
                   --listen-address 0.0.0.0 \
                   --port 11225 \
                   --mainnet \

So I should be able to use that node with Nami right? However when I make a transaction it fails like this. I’m sorry I have no idea what this is supposed to mean. Could somebody help me pointing out the steps I have to complete for this setup to be running?

[2022-01-27 17:34:55.71 UTC] txSubmitPost: failed to submit transaction: transaction submit error ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ValueNotConservedUTxO (Value 0 (fromList [])) (Value 14474853 (fromList []))))),UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (BadInputsUTxO (fromList [TxInCompact (TxId {_unTxId = SafeHash "6391ad16c8f2069c879f3f15789253a22913d193ddc20082d0a24074e0baa66c"}) 2]))))])

Are you sure that the node is fully synced?

as far as I can see means: “I want to use the second output of 6391ad16c8f2069c879f3f15789253a22913d193ddc20082d0a24074e0baa66c. You say that it’s 14.474853 ADA, but I have 0.”

Cardanoscan (the transaction number above is linked to it) says that it really should be there, but your node does not seem to know it. That’s why I would conclude not fully synced.

You can do cardano-cli query tip --mainnet to see the sync status.

Perhaps, you have to do export CARDANO_NODE_SOCKET_PATH="/run/cardano-node/socket" before that, so that cardano-cli knows, where to find the node.

1 Like

Thanks you are right! I thought it was done since I synced for 1.5 days and the db folder size didn’t change in hours. It’s at 99.7%.

Sorry I know this is offtopic but I have also a minor issue with users. I currently have a user that’s in the group cardano and I set the same permissions for owner and group. However the socket file might reset after restart leading to a permission error for the socket. I’m thinking my approach to manage the users might be flawed. Is there a best practice for this issue?

Could be stuck. Check if the cardano-cli query tip --mainnet output changes at all. At least, slots and blocks should change. Percentages change very slowly in the more recent, more crowded part of the chain.

Sorry, I don’t know. I just let the node and cardano-cli run as the same user.

It seems to create the socket with rwxr-xr-x. So, the group wouldn’t be allowed to write to it. But this might be because of my umask set to 0022.

To let the recreated socket be writable by a specific group, maybe ACLs would help. I’m doing that for things on my web server (files belonging to the user’s group, but also accessible, partly writable by www-data, which is the group the web server runs in).

1 Like

It just took pretty long for the last percent. It’s fully synced now :slight_smile:

Thanks for pointing out ACL I wasn’t familiar with it.

1 Like