IntersectMBO / cardano-node

The core component that is used to participate in a Cardano decentralised blockchain.
https://cardano.org
Apache License 2.0
3.06k stars 721 forks source link

[BUG] - Cardano-cli take longer to query #3490

Closed SebCli78 closed 1 year ago

SebCli78 commented 2 years ago

External otherwise.

Area Other Any other topic (Delegation, Ranking, ...).

Summary

Not really a bug but cardano-cli using node 1.33.0 is taking from 4 to 5 seconds to provide query result, versus less than a second using 1.30.1

As I'm using cardano-cli with scripts to automate minting of NFTs, this become a problem when doing queries to list utxo So is there any tips on Cardano-node side to make it more responsive on queries here or anything to look for ?

This really makes regression on the process and especially when the mint process was good running at less than a second to refresh wallet utxo.

your help will be very welcome. Thanks

Expected behavior an output as before is less than a second.

System info (please complete the following information):

Thanks again

frog357 commented 2 years ago

I also experience this. The following command using cli v1.31 takes less than a second. cardano-cli query utxo --address $(cat pay.addr) --mainnet The same command on v1.33 takes greater than 15 seconds.

rdlrt commented 2 years ago

It is "by design", as UTxO is now saved on disk (keeping it in memory was not sustainable), you'd want to start looking at query layers for checking UTxO details - if you need it to be performant

frog357 commented 2 years ago

I have 64gb of ram - how about a flag to restore the functionality for those who can afford it? Seems like you just hurt all the builders who rely on such basic functionality.

rdlrt commented 2 years ago

you just hurt all the builders who rely on such basic functionality.

I am not associated with IO, just informing about the change. Widely used tools within builder community are already adopting :)

SebCli78 commented 2 years ago

I hope to get a flag too to move it back in memory when we can afford it, at least the time to let us a chance to move on another way to query.

frog357 commented 2 years ago

you just hurt all the builders who rely on such basic functionality.

I am not associated with IO, just informing about the change. Widely used tools within builder community are already adopting :)

You might be able to help more by referring to some of these community solutions that you imply to have knowledge about. We have two people in this thread who are not a member of the insider club you seem to know more about and are seeking help - you say the community is adopting so you know about this - we are asking for help - I guess thank you for telling us that other people know more and don't need to ask for help here?

den-is commented 2 years ago

@rdlrt

you'd want to start looking at query layers for checking UTxO details

what are these layers? any links to docs and/or examples?

rdlrt commented 2 years ago

Current popular component being cardano-db-sync (which can be accessed over cardano-graphql, postgREST, koios (locally or remotely) or using third party services like blockfrost, dandelion , etc), and/or can build one using ogmios.

For example, CNTools, gLiveView (naming this one since this is what I was referring above) community tools already working towards starting to use koios.

*Updated to include links for respective docs/websites

SebCli78 commented 2 years ago

so was looking to work around with cardano dbsync, where I'm testing it and face 'rollback issue' that takes ages to recover database and that is a bit not so powerful that was Cardano-cli in the past. See my previous link 'Query UTxOs' where it said that Cardano-cli is quicker due to in-memory than database ... so sounds like we need to have a robust infra and redundancy in place if we want to use dbsync instead cardano-cli

den-is commented 2 years ago

so sounds like we need to have a robust infra and redundancy in place if we want to use dbsync instead cardano-cli

or pay "query layers" to do that for you - that's how capitalist's mathematically proven, peer-reviewed, model of equality and universal balance, looks like.

Jimbo4350 commented 1 year ago

Closing this. If this is still relevant please reopen.