Questions tagged [cardano-db-sync]

For questions about cardano-db-sync, one of the core Cardano components, which provides a convenient way to find and query historical information from the Cardano blockchain through the use of a Structured Query Language (SQL) relational database.

Filter by
Sorted by
Tagged with
0 votes
1 answer
16 views

Could we remove old data in cardano-db-sync table (PostgreSQL)?

I'm trying to improve the performance of cardano-db-sync's database by removing unused tables (truncate block table) and deleting old data from the tx_out table. However after re-start the cardano-db-...
manhdt's user avatar
  • 125
0 votes
0 answers
9 views

How to continue syncing the newest data after importing snapshot data completed

I'm trying to sync the newest data from Cardano-db-sync, but after importing snapshot data successfully. I don't know how to continue to sync new data in realtime. There is an example here https://...
manhdt's user avatar
  • 125
0 votes
0 answers
10 views

Multiple NFT meta in the tx_metadata.json of a single asset?

In some, not all cases, when I retrieve the tx_metadata.json of a given fingerprint (of an NFT), the json contains the meta of several NFT's, redundantly. I cannot seem to see any sensible way of ...
RelevantData's user avatar
1 vote
1 answer
28 views

cardano-db-sync sql query for assets of a wallet

I am trying to develop the PostgreSQL query that will return all the assets of a given stake address and their respective quantities. What needs to be joined and queried in order to determine what's ...
RelevantData's user avatar
1 vote
1 answer
34 views

DB Sync Upgrade to v 3.1.1.3 snapshot restore (4 days old) running "extra migration consumed_tx_out". Why is new column not included in snapshot?

Interested to understand why db sync snap shot does not include new consumed_tx_out column. Just upgraded to v3.1.1.3 using manual method (not docker) and restored most recent db snapshot from 4 days ...
Nicholas's user avatar
0 votes
0 answers
14 views

Receiving "Handling input offset" message during db sync 3.1.1.3 update - going on 20 hours now. Is this normal?

Performing db sync update to 3.1.1.3 and waiting while server processes fix. Currently receiving Handling input offset message as part of SQL update, been running for approximately 20 hours now. Is ...
Nicholas's user avatar
0 votes
0 answers
22 views

DB-Sync insanely slow

So i built the latest node and db-sync releases from source. My node works great it was fully synced fairly quickly. the db-sync got to around %78 and then started going insanely slow. I still have ...
noone392's user avatar
  • 273
1 vote
1 answer
38 views

Missing inline_datum_id in tx_out table

I'm trying to get the specified transaction's datum value, but it didn't appear in the cardano-db-sync db. Can anyone enlighten me, please? the transaction: https://cardanoscan.io/transaction/...
manhdt's user avatar
  • 125
1 vote
1 answer
37 views

DBSync: Querying ma_tx_out

I queried ma_tx_out and used the fingerprint of an asset to get its ident so I could get the tx_out_id to get the most recent tx_out for a given asset - but that asset is only in that tx_out because ...
RelevantData's user avatar
0 votes
1 answer
41 views

How to query input UTXOs of a transaction

Could anyone help to query input UTXOs of a transaction, please? I tried to use tx_in and tx_out tables to view the detail inputs and outputs of the transaction https://cardanoscan.io/transaction/...
manhdt's user avatar
  • 125
0 votes
0 answers
20 views

How to get pointer to an actual cardano address by pool script hash in format "script...."?

The address format is script15ew2tzjwn364l2pszu7j5h9w63v2crrnl97m074w9elrkxhah0e. In this example from https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/projects/minswap/index.js, you can ...
ErikM's user avatar
  • 41
1 vote
1 answer
16 views

Restore state snapshot running out of disk space

I'm following this guide to restore the latest state of the chain to my local machine https://github.com/input-output-hk/cardano-db-sync/blob/master/doc/state-snapshot.md while running the restore job ...
manhdt's user avatar
  • 125
1 vote
0 answers
31 views

cardano-db-sync How could we define an asset as NFT?

Could anyone tell me if is there any way to check if an asset is NFT using the database of cardano-db-sync? I tried to look at tx_metadata table and check if in json field contains an image, but many ...
manhdt's user avatar
  • 125
1 vote
1 answer
58 views

db-sync not syncing

I've restored a recent db-sync snapshot (I am running node 8.1.2). The restore was successful; I can run SQL queries against the default cexplorer database. However, there seems to be an issue when I ...
zhekson's user avatar
  • 3,669
1 vote
0 answers
32 views

Cardano-db-sync insertion error

I'm trying to sync data from Cardano using cardano-db-sync https://github.com/input-output-hk/cardano-db-sync, but the insertion process is stuck at epoch 323 due to the following error. logs from ...
manhdt's user avatar
  • 125
1 vote
1 answer
68 views

Querying a transaction by hash vs id

When I want to query a tx by hash I can do this: select * from tx where encode(hash::bytea, 'hex') = '28b492be2f733201ba3441d5d7d0fefc097c3deba3f299628680fae484293758' ...but the hash, stored as ...
RelevantData's user avatar
2 votes
1 answer
37 views

Why does an cardano token have multiple policys

I stumbled upon Society token, in multi_assets table via cardano-db-sync it has 2 entries with same name but the meta data difference is minimal, as well they're fingerprints are different policy = ...
ErikM's user avatar
  • 41
0 votes
1 answer
81 views

How to monitor Cardano Minswap transactions using Blockfrost?

I was trying to monitor the swap actions like who swapped which A to B Token, as real-time from Minswap platform. I was using Blockfrost webhook for this, but I fetched lots of transactions including ...
Firing Dev's user avatar
0 votes
0 answers
42 views

How to get Daily Volume for an Cardano token by using Cardano-Db-Syncs database

Is there an way to query directly Cardano Db Syncs database to get withhold of the daily volume of an certain token ( For example via using multi_asset.fingerprint ) WITH ma_tx_ids AS ( SELECT ...
ErikM's user avatar
  • 41
1 vote
0 answers
24 views

Is there a standart way to sync off-chain metadata (assets, tokens, mints) like cardano-db-sync does with on-chain data (epochs, blocks etc)?

I have running cardano-node-ogmios:v5.6.0_1.35.5 in couple with cardano-db-sync:13.1.0.0 (docker-compose.yml) and looking for the solution to sync off-chain assets localy. Is there any standart ...
Denis Akimov's user avatar
0 votes
0 answers
16 views

Transaction collateral inputs for specified transaction hash

In cardano-db-sync, how would you go about returning all transaction collateral inputs for a given transaction hash? Similar to the interesting queries documented here I thought that something like ...
ADA Capital - ADACT's user avatar
0 votes
2 answers
39 views

Detailed upgrade instructions for latest db-sync release 13.1

I was wondering if anyone knows where I can find the detailed upgrade instructions for db-sync 13.1. I’m current on the previous release and think the upgrade shouldn’t be too difficult, but I can ...
Nicholas's user avatar
0 votes
2 answers
96 views

Guarantee not dispensing native assets to a Franken address

As I understand it, a "mangled" address can be used to spoof ownership of a wallet who's stake address is NOT of a wallet controlled by the one doing the spoofing. Put another way: I can use ...
RelevantData's user avatar
1 vote
1 answer
53 views

Column does not exist when querying Rosetta endpoint

I'm currently running cardano-node version 1.35.0 and rosetta-server 1.8.2. The node is synced and I have blocks in postgres, however each query to rosetta throws an error: curl -vvv -X POST 'http://&...
relik's user avatar
  • 111
3 votes
1 answer
52 views

Track incoming payment of an address using cardano-db-sync

I have a cardano-node with cardano-db-sync installed. In this node, I also have a separate database named CDT, and a web UI to connect to this CDT database. I defined an address named addr1xxxxxx ...
cdt's user avatar
  • 121
0 votes
1 answer
47 views

Possible inconsistence data in db-sync

I've this query on Preprod: SELECT ENCODE(TX.HASH, 'hex') as tx_hash, TX_OUT.INDEX, TX_OUT.ADDRESS_HAS_SCRIPT, ENCODE(TX_OUT.DATA_HASH,'hex') AS DATUM_HASH, SCRIPT.ID as script_id, ...
leobelizquierdo's user avatar
0 votes
1 answer
115 views

How to decode the datum stored across records in the tx_metadata table for a given tx

For a given tx - where a contract has been used, outputs have been stored in the tx_metadata table - in this case key/value pairs where the values of keys 0 through 10, when appended together to form ...
RelevantData's user avatar
1 vote
1 answer
95 views

tx_metadata: How to interpret a CBOR string

In the document: https://github.com/input-output-hk/cardano-node/blob/master/doc/reference/tx-metadata.md We are told: "JSON strings are represented as CBOR strings" How can I interpret ...
RelevantData's user avatar
1 vote
1 answer
20 views

When is valid_contract column in tx table true and a contract?

In the schema descriptions for cardano-db-sync, the valid_contract column description is as follows (link below): "False if the contract is invalid. True if the contract is valid or there is no ...
RelevantData's user avatar
1 vote
3 answers
84 views

Running db-sync on a separate machine from node on same LAN

I currently have cardano-node and db-sync running on the same machine. The machine has a max RAM capacity of 32 GB and this is barely enough. Instead of buying a new machine that supports 64 GB RAM, I ...
RelevantData's user avatar
1 vote
3 answers
45 views

db-sync "Killed" sometimes. Why?

I have cardano-node and db-sync running just fine, latest versions. Every now and then though, db-sync stops and message in console says "Killed". This was not the case before the Vasil HF. ...
RelevantData's user avatar
0 votes
1 answer
35 views

cardano-db-sync different tx, same hash?

I'm listening for new records added on block table and have noticed that sometimes two blocks are added almost at the same time with basically the same info except for block hash (maybe a slot battle/...
leobelizquierdo's user avatar
1 vote
2 answers
68 views

How to calculate ADA balance at a prior point in time?

I'm trying to calculate the ADA balance at a prior point in time using DB-Sync. What I did was first work out what the last tx.ID number of the 10th May 22 was, which in my version of the db is ...
Reddspark's user avatar
  • 283
0 votes
1 answer
67 views

Downtime when upgrading or restarting a node

I run not only Cardano nodes but also Ethereum and other nodes. I think the downtime is longer when upgrading or restarting a Cardano node compared to other nodes. Downtime here is the time between ...
Satish's user avatar
  • 5
3 votes
2 answers
82 views

How to get number of delegators of a pool?

Using cardano-db-sync, I want to get the number of delegators given a pool_id. For example, this pool has 22 delegators. https://cardanoscan.io/pool/...
cdt's user avatar
  • 121
1 vote
1 answer
168 views

How to get all assets of a certain addresss using SQL on Cexplorer

It seems like a simple question, but I was struggling to find the answer. I am trying to get information of Cardano blockchain from cexplorer database. Given an address such as '...
cdt's user avatar
  • 121
0 votes
2 answers
39 views

How to view binarydata in cexplorer?

When running sql script to view data on Cexplorer database, many times,I see binary data. for example, multi_asset.name, multi_asset.policy in the following query. Is there any way to view these data ...
cdt's user avatar
  • 121
0 votes
2 answers
128 views

Get list of holders of a token using Cardano-cli or Cardano-DB-Sync or Ogmios

I am trying to find a way using either Cardano-cli, Ogmios, or Cardano-DB-Sync to get a list of token holders (addresses) for a particularly token, ideally in JSON format. What is the best way to do ...
Barney Chambers's user avatar
1 vote
1 answer
47 views

Cardano-graphql doesn't return sync percentage

when I first started It was returning the sync percentage, and the logs of cardano-graphql was like this: {"name":"cardano-graphql","hostname":"2f8ed0c5755a",&...
korimusk's user avatar
  • 153
0 votes
1 answer
62 views

Cardano Rosetta API returning 5000 error occurred - Cannot read property 'key_deposit' of undefined

Cardano Rosetta Construction endpoints /construction/preprocess and other endpoints are returning 5000 Error with Cannot read property 'key_deposit' of undefined". Also, /construction/metadata is ...
Kartik Iyer's user avatar
0 votes
1 answer
80 views

How to efficiently query for all transactions involving a particular policy

What is the best way (or perhaps only way) to query db-sync for transactions involving a specific policy?
RelevantData's user avatar
2 votes
2 answers
132 views

Can db-sync be used to "listen" for transactions involving particular smart contracts?

Take JPG store as an example. When someone lists an NFT for sale there, or when someone buys an NFT there, a smart contract governs that transaction. Can sql queries against the db-sync generated ...
RelevantData's user avatar
2 votes
0 answers
49 views

How to query for an executed smart contract in db-sync?

If any DApp allows the user to connect their wallet and make use of a given smart contract, how can I most efficiently find that through queries in db-sync? Select on an address associated with the ...
RelevantData's user avatar
1 vote
1 answer
139 views

What is your comfort level for Number Of Confirmations, and why?

As an example, in Eternl wallet, a new transaction is marked as follows: red (0 to 9 confirmations) yellow (10 to 19 confirmations) green (20+ confirmations) I have been watching blocks in db-sync, ...
RelevantData's user avatar
0 votes
1 answer
22 views

Is my db-sync far behind the latest block/slot?

Looking at the select statement in the screencap below - with the latest info also displayed from cardanoscan - I was expecting to see a direct correlation but my db-sync appears to be far behind ...
RelevantData's user avatar
1 vote
1 answer
159 views

How is Number Of Confirmations derived for a transaction?

In the wallet I use a transaction gets a "number of confirmations" and is indicated as "low" (red), "medium"(yellow), or "high"(green) confidence based on that ...
RelevantData's user avatar
-1 votes
1 answer
58 views

Running db-sync via CLI

While running the db-sync what to pass as a parameters is unclear. PGPASSFILE=config/pgpass-mainnet cabal run cardano-db-sync -- \ --config config/mainnet-config.yaml \ --socket-path /home/...
korimusk's user avatar
  • 153
1 vote
1 answer
86 views

Connecting Node and DB-Sync

I'm running Cardano Node and Cardano GraphQL on the same network/computer. This is how I started the node: cardano-node run \ --topology /home/ubuntu/cardano/cardano-src/cardano-node/mainnet-...
korimusk's user avatar
  • 153
2 votes
1 answer
166 views

Syncing from genesis instead of snapshot

I start the docker as followed in the guide: export NETWORK=mainnet &&\ docker pull inputoutput/cardano-graphql:6.2.0-${NETWORK} &&\ docker pull inputoutput/cardano-graphql-hasura:6.2....
korimusk's user avatar
  • 153
0 votes
2 answers
83 views

No space left on device, cardano-db-sync to blame?

I'm getting errors when starting up my producer suggesting I'm out of storage. It looks like db/immutable is the culprit taking almost 100g of space. I'm not super familiar with what this db is or ...
comrade-kirby's user avatar