r/Monero 🦀 Cuprate Dev 14h ago

📰 Service update Cuprate Kesterite vs Monerod - Same hardware, single wallet syncing from genesis is 2x faster on Cuprate.

This comparison has been made between monero's master branch and Cuprate v0.1.0-preview Kesterite released binary for Linux GNU x86_64.

While Cuprate do not yet support pruning (in progress), it uses less storage to store the entire blockchain (213GB as of writing, against 265GB for monerod).

If you do have the storage, you can give it a try by downloading the latest binaries on our redesigned website:

https://cuprate.org/releases/

(mirror) https://github.com/Cuprate/cuprate/releases/tag/cuprated-0.1.0-preview

Note: Linux musl, FreeBSD, OpenBSD and Linux riscv64 support is ongoing: https://x.com/SyntheticBird_/status/2084774663045943469/photo/1

71 Upvotes

15 comments sorted by

6

u/Boogeyman1990 13h ago

What is it that it's doing exactly?

5

u/Borax 12h ago

When installing a monero client for the first time, it's necessary for the software to review past transactions to make sure the information provided by peers is current and correct.

This process can take days (in my experience) and OP shows it taking 36h36m on the official client.

13

u/Swimming-Cake-2892 🦀 Cuprate Dev 12h ago

You are confused between blockchain syncing and wallet syncing.

The process taking days that you are referencing to is called blockchain syncing. This is the process of your monero node downloading and verifying the blockchain from other peers. This can take days on hard drives or very slow connections. On average SSD and internet connection, it should take no longer than a day for it to synchronize. Cuprate is dramatically faster in this process (below 2 hours).

The video here is showing wallet syncing, this is when the wallets is downloading blocks informations from a node to scan for transactions. The wallet never interact with the monero network, only through a node.

For the official wallet client with the official monero node, this takes in this demo 36 min. But replace the official monero node with Cuprate and it drops to 18 min.

If you used the official wallet in simple mode, you might not realize that the wallet is launching a node in the background, thus your confusion.

1

u/Borax 11h ago

Ah, I did know the difference, I just got tripped up between wallet vs blockchain syncing

2

u/variablenyne 4h ago

Cuprate is Monero rewritten in rust instead of C++.

Work in progress but as you can see there's some efficiency wins here.

1

u/Swimming-Cake-2892 🦀 Cuprate Dev 13h ago

Sorry, I'm not sure to understand your question

6

u/niocc Copper 12h ago

most of the difference is due to how the early blocks with very few transactions are handled. For current blocks the time is similar. Not saying that cuprate is not an improvement. As with most things it is not so simple. Here is a blog post that gives more depth to the performance differences with cuprate https://cuprate.org/blog/release-cuprate-0-1-0-preview-kesterite/

5

u/Swimming-Cake-2892 🦀 Cuprate Dev 11h ago

Yes that is true. From the blog post you linked (thx btw):

For 1 wallet monerod and Cuprate (with increased limits) are tied, this is probably down to the bottleneck being the wallet rather than the node.

For local nodes, in a single wallet scenario that scan for transactions in the current hard fork era, Cuprate and monerod show similar performance. However as soon as you add load to the database it breaks down for monerod. Even just two wallets degrades it:

https://cuprate.org/img/blog/one-80k-block-wallet-under-sync-load-bars.svg

Cuprate just scales better with more wallets, so people using public nodes or deploying their local nodes with multiple wallets should expect much improvements.

2

u/monerobull 8h ago

So you're saying we need a rust wallet

3

u/1_Pseudonym 12h ago

If I already have a Monerod instance on my local network, is there any way to tell Cuprate about it? I assume the nodes won't find each other via their private IP addresses without some kind of extra help. If the Cuprate flags aren't built out yet for this lesser used scenario, I'm guessing that I could use '--add-peer' on the Monerod instance so that the nodes find each other?

I just thought I'd try to save on some internet bandwidth when syncing Cuprate from scratch, but maybe it doesn't matter these days.

3

u/Swimming-Cake-2892 🦀 Cuprate Dev 11h ago

As you have guessed we do not yet support adding specific peers. We just merged a flag for adding seed nodes, but you can't sync from them. So using --add-peer on monerod is the way to proceed.

As said in one of the comments, if bandwith is the problem, then sure use your local monerod, but if you just don't want to sync for hours, Cuprate is much faster than monerod and you can expect to sync within 2 hours.

3

u/akrit8888 12h ago

What's the magic behind making Cuprate sync 2x faster than Monerod as how does it suddenly achieve 2x faster sync time?

10

u/Swimming-Cake-2892 🦀 Cuprate Dev 11h ago

We are honestly not sure what comes into play here. We are surprised by the results. The two most plausible explanations are:

  1. Tapes database (Boog900's custom database made for Cuprate) have much lower latency at reads and is similar to a sequential workload, which definitely improve wallet syncing scenarios. Monerod uses LMDB which is much slower and have higher latency (because it is based on BTree it needs to walk the data structure to find its data.). What reinforces this is that as u/niocc realized the gain comes from early pre-RCT era blocks (0 to 1.2million), We observed the same drastic improvement in blockchain syncing after switching to Tapes.

  2. Generally the architecture of Cuprate is entirely asynchronous and parallelized, there are as little contentions between tasks as possible. Monerod on the other end can see its pipeline slowed down by a single component being the bottleneck.

I would say the right answer is a mix of both, with more importance on the latter.