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
1 vote
1 answer
36 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
33 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
31 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
14 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
29 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
39 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,639
1 vote
0 answers
27 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
61 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
36 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
63 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
36 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
22 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
15 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
0 answers
14 views

How to get all NFT that are added in last 24 hours in a address using SQL?

the attached queries give me all the assets in a particular address but i wish to get only nfts that are added in last 24 hours SELECT multi_asset.name::text, encode(decode(substring(concat(...
Hafiz Arsam Rahmaan's user avatar
0 votes
2 answers
37 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
85 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
47 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
44 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
46 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
104 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
88 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
19 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
76 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
44 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
60 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
  • 273
0 votes
1 answer
66 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
153 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
115 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
76 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
1 vote
2 answers
121 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
1 vote
0 answers
46 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
128 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
149 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
55 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
80 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
164 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
81 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
0 votes
1 answer
87 views

Can anyone explain how tAda locked with asset is calculated?

I have previously asked a similar question here Get Ada locked with asset from db-sync query? but I'm still really stuck with this and needing some help. After looking at Nami Wallet, Eternl Wallet ...
FoxB's user avatar
  • 1
4 votes
1 answer
134 views

How can I determine which smart contracts / script addresses are associated with which dApps?

I have seen numerous examples of blockchain explorers providing information about the on chain activity of specific dApps. For example: opencnft.io aggregates data about various token marketplaces ...
adjuric's user avatar
  • 145
2 votes
1 answer
78 views

How does db-sync query raw block data if cardano-node doesn't expose them?

I was trying to find a way to get raw block/transaction data and came across this question. The answer was that there is no way to do that currently but db-sync somehow does that. How does it do that? ...
alexk745's user avatar
0 votes
0 answers
38 views

Get Ada locked with asset from db-sync query? [duplicate]

Does anybody know a way to get the locked asset Ada/tAda information from db-sync? identical to the information displayed in Nami wallet? I've tried looking at all the tables, but nothing seems to ...
FoxB's user avatar
  • 1
2 votes
1 answer
143 views

How to query the address that sent a token from cardano-db-sync?

I'm trying to query the token transactions using the schemas of Cardano-db-sync. When querying ADA transactions, I can easily see the input and output addresses with the values sent by joining the tx, ...
TK36's user avatar
  • 21
0 votes
1 answer
28 views

How can db-sync "match" a data_hash to specific outputs?

Looking at the db-sync schema, I see the tx_out table has a data_hash column, but I can't make sense of why this column is not on the tx table instead. From the Alonzo CDDL, I can see the scripts are ...
Pedro Martins Timóteo da Costa's user avatar