What exactly is the role of the cardano-nodes in Daedalus instances in the network?

So, a lot of the work that contributes to the spectacular start-up time of Daedalus (even if it is not the first, several hour start) is validating the chain that I just got from IOHK (and no-one else), because I don’t trust them out of principle?

And that, while other people happily entrust arbitrary websites that use arbitrary nodes for the same job with their funds?

(And BTW, the “Validating the blockchain …“ part at the beginning. Does it re-validate the things on disk that I already know have been validated last time? Because getting new blocks seems to start only after that.)

And there is no middle-ground between these extremes? A stand-alone desktop wallet that does not depend on a single upstream, validates the new blocks, but not the old ones, does not store them forever?

Do you have a link to these design papers?

I only find this Blog post: Cardano: robust, resilient – and flexible - IOHK Blog

Since they share resources among many users, light wallets may need to temporarily scale the available computing and networking resources (including replicating endpoints) to ensure that user demand can be met. This demand-scaling is similar to the requirements that are placed when a company releases a popular new product, for example. In contrast, full node wallets may be essentially unaffected. Transactions may be slightly delayed, but each wallet will have the dedicated resources that are needed to retry the submission, including its own network connections.

Seems a little unconvincing to me. Where’s the big difference between my local Cardano node waiting to submit a transaction to the IOHK relays (and I checked the logs, it is really only connecting to them) and Yoroi waiting to submit to the Yoroi node or ccVault waiting to submit the ccVault node?

I don’t even know if a cardano-node that does not know that it is “only” used as a backend of a single wallet behaves better than a light wallet in that regard. A middle-sized wallet app could definitely be programmed to behave well enough, store transactions until they can be submitted, increase wait times to not make the congestion worse, … It does not necessarily need a full node for that.

1 Like

Only new blocks being fetched, because the ones before the last start are already in the database.

No, validated blocks can’t change per se (since the history of a block chain cannot change), but there are exceptions when it comes to forks. If a fork happened and your node is on the wrong path it has to go back and follow the right path.

Of course - and AFAIK - IOG is working on such a wallet implementation.

1 Like

You know, there’s theory and implementation. Sometimes one has to go for compromises to achieve targets.

There’s still a big difference. There’s no internet connection and no middle-man between the client (the Daedalus GUI) and the node; and it’s the node that submits the transactions. If some middle-man attack changes your transaction between the plugin the the remote node then that changed transaction is executed. Because browser plugins run in sandboxes being fully exposed to the internet, to protect your local data, they are more vulnerable to hacker attacks compared to real desktop applications. That’s the reason why applets (Java, e.g.) went out of fashion.

Then, what does it do in the four minutes that I am looking at this?
According to the logs:

[leeloo:cardano.node.ChainDB:Info:21] [2022-01-13 14:59:52.42 UTC] Opened lgr db
[leeloo:cardano.node.ChainDB:Info:21] [2022-01-13 15:03:29.64 UTC] Opened db with immutable tip at e7d5b5d709d0ba0b90bc3d570de6552d8f0f8055ef0a2abb0f3d6e02df54835a at slot 50242947 and tip 79f3219c5fdf8a46c3828e2aae552d0e2a8bc7c8975a2897c243bd812d4fef21 at slot 50291083
[leeloo:cardano.node.DiffusionInitializationTracer:Info:330] [2022-01-13 15:03:29.64 UTC] CreatingServerSocket [::1]:35221
[leeloo:cardano.node.DiffusionInitializationTracer:Info:333] [2022-01-13 15:03:29.64 UTC] CreateSystemdSocketForSnocketPath "cardano-node.socket"
[leeloo:cardano.node.DnsSubscription:Notice:352] [2022-01-13 15:03:29.68 UTC] Domain: "relays-new.cardano-mainnet.iohk.io" Connection Attempt Start, destination
[leeloo:cardano.node.DnsSubscription:Notice:360] [2022-01-13 15:03:29.71 UTC] Domain: "relays-new.cardano-mainnet.iohk.io" Connection Attempt Start, destination
[leeloo:cardano.node.DnsSubscription:Notice:352] [2022-01-13 15:03:29.71 UTC] Domain: "relays-new.cardano-mainnet.iohk.io" Connection Attempt End, destination outcome: ConnectSuccessLast

Nothing except opening really happens. And the network connections that could lead to the necessity to switch to another path are only opened afterwards.

For a pool that is not restarted that often, that might be okayish (but still annoying, I don’t think I have seen a service startup that needs several minutes anywhere else).
For a desktop application, though, …

The point of the IOHK blog post was that it behaves better at high network load times. That one I would still doubt.

Security might be better, although:

This should really not be possible. I think (hope?) my secrets stay on my computer, even with web-based wallets (for hardware wallets, I definitely know it, because they not even leave the USB device). So, the transaction has to be signed on my computer and cannot be swapped by a simple man-in-the-middle.

I was talking about software wallets. You are right hardware wallets offer better protection. That’s why they are highly recommended for browser-plugin based wallet.

Things will improve as soon as node version 1.33.0 will be integrated with Daedalus. Startup times are a bit more than 5 minutes + fetching new blocks.

Startup time includes integrity checks of the blockchain database. Restarting a database server also takes some time.

But anyways there are good reasons to use Yoroi or other light-weight wallets instead of Daedalus. The important thing to me is choice - I am not forced to use something I don’t like for whatever reasons. The good thing is that more and more wallet implementations serving different interests are appearing and well accepted by the community.

It is just important, that you can choose the pool you want to stake with yourself (not like Exodus) and that you withdraw your ADA from your exchange.

1 Like

Cardano network was near full or at full capacity only a few times, and AFAIK only before parameters have been increased. We should expect higher utilization as soon as DEXes go online on mainnet.

Even with software wallets, your secrets/seed/private keys should stay on your computer and not go to the Yoroi/Adalite/ccVault/… servers. If they do, they are horribly broken and should be totally avoided.

Signature of transactions is done on your computer.

So, there is no possibility for man-in-the-middle to exchange the transaction.

The adversaries can still do all kinds of stuff with malware on your computer. They also could with Daedalus (but perhaps it’s not such a promising target), but man-in-the-middle is not enough.

Yeah, several seconds, not minutes.

I’m quite okay using Daedalus. I can use the contained cardano-cli to do some minting, learn a bit about the architecture, … I just would had hoped that its outrageous resource usage would make more sense.

Just from the mid month update today from IOG: 1.33.0 node will come next week to Daedalus; it will bring faster startup times, less memory consumption (6-7GB instead of 16GB).

1 Like

Thank you! Can’t wait!

There’s just one caveat. Upon first startup all blocks in the database are migrated to a new format which will take a couple of hours, but it’s a one time event.

Thanks! I already figured that from all of the 1.33.0 pool update threads. :grinning:

Just got the update to Daedalus 4.7.0. Unfortunately, they decided to upgrade cardano-node/cardano-cli only to 1.32.1, not to 1.33.1, but better than nothing.

1.32.1 does not help the memory requirements. Also startup times did not improve. Guess IOG will make another release with 1.33.0 soon.

1 Like

They reactivated Daedalus Flight and there already is a release with 1.33.0. Will need to test that soon.

1 Like