Submitapi.sh configure

Does anybody know how to configure submitapi.sh to run on a relay?

I see the script inside the scripts folder (cntools users)

@vmi438734:/opt/cardano/cnode/scripts$ ls -l | grep submit
-rwxr-xr-x 1 user user 3346 Jan 28 20:20 submitapi.sh
@vmi438734:/opt/cardano/cnode/scripts$

Yes do you know how to use it? I want to offer Nami wallet users to use one of my relays to on board transactions

I think u need to start the process open the port on fw and share the link to users?

yes that is what I was thinking… is it that simple? I am used to your awesome guides! lol

cardano-submit-api: FatalError {fatalErrorMessage = “readTxSubmitNodeConfig: Error parsing config: AesonException “Error in $: key \“EnableLogging\” not found””}

U are using the cntools right? U can type nano submitapi.sh if u want to change the variables …then try to run it, open the port on fw… and test with someone :slight_smile:

change the variables in env? or submitapi?

cardano-submit-api: FatalError {fatalErrorMessage = “readTxSubmitNodeConfig: Error parsing config: AesonException “Error in $: key \“EnableLogging\” not found””}

Wait 10 minutes… testing

So, I see also this script ogmios.sh

… now what u must do…

run

cd ~/tmp
./prereqs.sh -f
for ogmios run 
./prereqs.sh -f -o

now… new files will be downloded so after this u will need to:

  • edit env (cnode port and uncomment the line)
  • edit topology_Updater.sh (u can use mv topology_Updater.sh_bkpxxx topology_Updater.sh)
  • edit config.json file (tracem mempool, etc )

Restart the node and wait to start
now try
./submitapi.sh for me it’s working now

or
./ogmios.sh (but first read about it) didn’t tested it

Also if u want to set as systemd, I believe u must run again ./deploy-as-systemd.sh

And don’t forget to open the port on FW

Cheers,

1 Like
1 Like

Yeah, I see something with testnet …

I’ve added a page with a short description on how I am providing the service currently. It’s not using the guild-operators scripts, just standard source build / install using cabal and a basic service file for control. Any questions, please don’t hesitate to reach out.

2 Likes

I think I need the config file? tx-submit-config-mainnet.yaml

1 Like

chris6@vmi717501:/tmp$ sudo systemctl status tx-api.service
● tx-api.service - Cardano TX Submit API
Loaded: loaded (/etc/systemd/system/tx-api.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Fri 2022-01-28 20:19:26 EST; 5s ago
Process: 451590 ExecStart=/bin/bash -l -c exec /opt/startup-scripts/tx-api.sh (code=exited, status=217/USER)
Main PID: 451590 (code=exited, status=217/USER)
chris6@vmi717501:/tmp$

Exit code 217 is something to do with the User setting in the service file (/etc/systemd/system/tx-api.service). If you change that to a user with permissions to execute the startup script (similar to the one used for running node, or even the same user), then sudo systemctl daemon-reload it should be able to start up

Make sure the script can be executed: sudo chmod +x /opt/startup-scripts/tx-api.sh

Then using vim, nano or your other favorite text editor, edit the service file /etc/systemd/system/tx-api.service to change the User setting to chris6 (based on previous screenshot) – or some other user with permissions to execute the script.

Will try again tomorrow. Thanks Ryan :slight_smile: