How can I check, when a node is running, that transaction logging is actually working?
I’ve added the required ENV variables from here to my mainnet.env file and have supplied this to the Concordium-node on startup. The fact that the node is up and running (and processing blocks from the imported blocks.db) makes me believe either the node hasn’t recognised the transaction logging request at all, or it has and it’s configured properly, otherwise the node would not start.
However, I see nothing added to the 3 mentioned tables, hence my question: is there a way to check on a running node if it’s actually logging transactions to the db?
The easiest is probably to just check the database. If there are no entries in the database then logging is not enabled.
Are you sure you also set this CONCORDIUM_NODE_TRANSACTION_OUTCOME_LOGGING=true
. Is this the debian package, or some other distribution?
For some you have to reload the configuration files for the settings to be picked up.
I’m using the repo from bisgardo, with the documentation as found in this PR.
There’s no mention of any logging happening when the node starts up, see logs:
2022-03-21T07:15:29.618150733Z: INFO: Starting up concordium_node version 3.0.1!
2022-03-21T07:15:29.618166933Z: INFO: Application data directory: /mnt/data
2022-03-21T07:15:29.618169188Z: INFO: Application config directory: /mnt/config
2022-03-21T07:15:29.618170580Z: INFO: Network: enabled
2022-03-21T07:15:29.618171772Z: INFO: Log level: info
2022-03-21T07:15:29.618174538Z: INFO: Enabling prometheus server
2022-03-21T07:15:29.618584526Z: INFO: My Node ID is 0a5c3c2b08fb3cda
2022-03-21T07:15:29.618589836Z: INFO: Listening on 192.168.16.3:8888
2022-03-21T07:15:29.627304158Z: INFO: Starting consensus layer
2022-03-21T07:15:29.627318565Z: INFO: Starting up the consensus thread
2022-03-21T07:15:29.651912411Z: INFO: Starting up the consensus layer
2022-03-21T07:15:30.339258569Z: INFO: Runner: Starting new chain with genesis block 9dd9ca4d19e9393877d2c44b70f89acbfc0883c2243e5eeaecc0d1cd0503f478 at absolute height 0
2022-03-21T07:15:33.063604973Z: INFO: Consensus layer started
2022-03-21T07:15:33.063615232Z: INFO: Runner: Transaction purging thread started.
2022-03-21T07:15:33.063667149Z: INFO: Starting RPC server
2022-03-21T07:15:33.063701884Z: INFO: Starting out of band catch-up
So do now, my best guess is that I’m not asking the node to start logging.
The are the logs that I get from starting a node on testnet with tx logging (not from scratch):
2022-03-21T09:41:49.314802172Z: INFO: Starting up concordium_node version 3.0.1!
2022-03-21T09:41:49.314811930Z: INFO: Application data directory: /mnt/data
2022-03-21T09:41:49.314813022Z: INFO: Application config directory: /mnt/config
2022-03-21T09:41:49.314813774Z: INFO: Network: enabled
2022-03-21T09:41:49.314814435Z: INFO: Log level: info
2022-03-21T09:41:49.314816058Z: INFO: Enabling prometheus server
2022-03-21T09:41:49.314964425Z: INFO: My Node ID is ada81f970cf9b6c4
2022-03-21T09:41:49.314968223Z: INFO: Listening on [192.168.64.2:8888](http://192.168.64.2:8888)
2022-03-21T09:41:49.316837819Z: INFO: Starting consensus layer
2022-03-21T09:41:49.316841736Z: INFO: Starting up the consensus thread
2022-03-21T09:41:49.317166082Z: INFO: Starting up the consensus layer
2022-03-21T09:41:49.513502994Z: INFO: Runner: Starting new chain with genesis block b6078154d6717e909ce0da4a45a25151b592824f31624b755900a74429e3073d at absolute height 0
2022-03-21T09:41:49.527171716Z: INFO: GlobalState: No relevant tables found in transaction logging database. Creating them.
2022-03-21T09:41:58.876920330Z: INFO: Runner: Starting new chain with genesis block 532c57beea5184eb2b67a55b4ceb51308a039d76b4d238ae0a21c6db2e59a235 at absolute height 1150347
2022-03-21T09:41:58.887411279Z: INFO: GlobalState: Using existing PostgreSQL tables for transaction logging.
2022-03-21T09:42:08.942359961Z: INFO: Runner: Starting new chain with genesis block 396e1ac6b3cd4aef76fbd463275f270dbacf70294d3e33eee8e28cfb51aa1625 at absolute height 1788274
2022-03-21T09:42:08.952451474Z: INFO: GlobalState: Using existing PostgreSQL tables for transaction logging.
2022-03-21T09:42:23.642860336Z: INFO: Consensus layer started
2022-03-21T09:42:23.642872699Z: INFO: Starting RPC server
2022-03-21T09:42:23.642882117Z: INFO: Starting out of band catch-up
2022-03-21T09:42:23.643006971Z: INFO: Runner: Transaction purging thread started.
2022-03-21T09:42:23.644344732Z: INFO: Completed out of band catch-up
2022-03-21T09:42:23.644457202Z: INFO: Starting the P2P layer
2022-03-21T09:42:23.644460719Z: INFO: Attempting to bootstrap
2022-03-21T09:42:23.664844279Z: INFO: Using bootstrapper [18.194.217.131:8888](http://18.194.217.131:8888)
2022-03-21T09:42:23.664849850Z: INFO: Using bootstrapper [3.69.226.167:8888](http://3.69.226.167:8888)
...
I’m fairly sure the node would crash if it was set up to do tx logging but couldn’t access the DB. So it seems likely that it isn’t actually enabled.
Did you include the changes to docker-compose.yaml from the PR in your setup? If not, the correct variables will not be passed to the node.
You can inspect the container with docker inspect <container>
to see which exact environment variables are passed.