27
votes
Accepted
Why did Monero choose LMDB over alternative database types?
I wasn't around when the decision to use LMDB was made, but I can present some obvious reasons why such a decision makes sense:
1) at the time they made their decision, there were only 2 embedded key ...
15
votes
Why did Monero choose LMDB over alternative database types?
LMDB is a fast database that is a lot less brittle than the typical-within-cryptocurrencies leveldb. The only drawback which called for a Berkeley DB fallback was its patchy 32 bit support, but that ...
15
votes
Accepted
Blockchain database file size variance by Operating System
You are probably looking at a database file with the blockchain in it. The main variation cause is that the database library Monero uses, LMDB, preallocates some space for writing. Every so often, ...
12
votes
Accepted
How many transactions per second can the Monero network handle?
Monero transaction confirmations are very quick on modern computers. With LMDB estimates from developers Smooth and NoodleDoodle are that Monero can handle 1700 TPS (up from 1600 TPS pre LMDB).
...
10
votes
Accepted
Is Monero the first cryptocurrency to use Confidential Transactions (RingCT), 0MQ, and LMDB?
RingCT
RingCT was developed by Monero Research Labs specifically for coins with ring signatures (and even more specifically Monero). Monero is by far the most common of these, and Monero is the first ...
9
votes
Accepted
Are the LMDB files cross-platform compatible?
As of v0.10.0, yes the LMDB files are cross-compatible between 32 and 64bit architectures. They have always been cross-compatible between OSs. They are still byte-order dependent but almost everyone ...
8
votes
Accepted
Is the Monero blockchain database portable between 32 and 64 bit architectures, and little/big endian architectures?
In general, LMDB files are architecture-dependent and cannot be moved between different architectures.
In Monero, all LMDB structures are 64-bit clean, so the files are portable between 32 and 64 bit ...
8
votes
How can one query the blockchain's database?
If you're using python, the py-lmdb module includes a basic CLI. http://lmdb.readthedocs.io/en/release/
Keep in mind that you'll be getting raw data back, not anything in a human-readable format.
8
votes
Accepted
What does it mean when the Monero daemon says "LMDB Mapsize increased"?
For performance reasons, LMDB asks the OS to preallocate its storage space in large chunks, instead of growing incrementally as new records are added. Periodically this space must be increased as the ...
8
votes
Accepted
bitmonerod data-dir in a virtualbox shared folder
This will not work. VirtualBox shared folders don't support mmap, which is required for LMDB (and BDB).
7
votes
Accepted
LMDB conversion vs downloading from scratch
Security wise, it's the same, assuming you do not disable verification on the conversion process (which speeds up a lot, but then if there are problems, they won't be detected).
Speedwise, it varies. ...
7
votes
Blockchain database file size variance by Operating System
The previous answers are correct, but there are plenty of other reasons for size variations. The timing and order in which records are written will also affect the way space is allocated in the ...
7
votes
Blockchain database file size variance by Operating System
Probably because Windows, by default, reports file sizes in KiB/MiB/GiB/TiB (1024 bytes in a kilobyte, 1024 kilobytes in a megabyte, etc.), while Ubuntu, by default reports file sizes using the "...
6
votes
Accepted
How to backup the blockchain file?
rsync copies what's changed:
rsync ~/.bitmonero/lmdb/data.mdb /mnt/wherever/monero-blockchain/data.mdb
This should be done when nothing is writing to the blockchain database file. If you need to ...
6
votes
bitmonerod data-dir in a virtualbox shared folder
I personally use an external hard drive to store the blockchain and get virtual box to capture the device so it can be recognised by the VB OS. It works very well as an alternative to storing the ...
6
votes
How many transactions per second can the Monero network handle?
Adding to the previous answer, those TPS estimates assume an Intel i7 2600k quad core processor. So roughly 400 TPS per core. That processor is from 2011, so I assume that this figure will improve ...
6
votes
blockchain_import fails, "Transaction has too many dirty pages - transaction too big"
It appears that you're using a 32bit build. This was a known bug in the 32bit LMDB code, Issue #855, fixed on August 11 in commit 7442dd084acfcef571c51f53277247c050d1c98b.
5
votes
How many transactions per second can the Monero network handle?
Bandwidth is currently the limiting factor.
Assuming an average transaction size of around 15 KiB, nodes can handle ~8 tx/s with every Mbit/s connection speed.
There is no real answer to how many ...
5
votes
Accepted
How can one query the blockchain's database?
I don't think there is an equivalent of the mysql or psql commands for lmdb, therefore to make custom queries to the database you must write a program that accesses it directly.
There are some ...
5
votes
Accepted
How/when does the --db-salvage flag get used? What's it do?
If your daemon was interrupted by a power failure or OS crash, and it was still trying to catch up to the network (as opposed to already being synchronized), there's a chance the DB got corrupted. If ...
5
votes
Accepted
Why would you need multiple daemons using one LMDB database?
The use case I had in mind when I wrote this code is to run daemons on different network interfaces, or on different network protocols, using the same database. E.g., if you want to use different ...
5
votes
Understanding the structure of Monero's LMDB and how explore its contents using mdb_stat
Understanding the structure of Monero's LMDB and how explore its contents using mdb_stat
Firstly, mdb_stat is a tool to get status information about the database environment, not to explore its ...
4
votes
Error when starting monerod: Failed to open db handle for m_blocks : MDB_CORRUPTED : Located page was wrong type
It is likely that this means blockchain database (LMDB) corruption.
The easiest way to fix it is to rename your corrupt lmdb folder to something else, for example:
Rename C:\ProgramData\bitmonero\...
3
votes
Accepted
Why does `monerod` on Raspberry Pi 3 with a copied LMDB not catch up with new blocks?
There was a bug in the ARMv7-specific source code, which was triggered when using newer versions of GCC to compile the code.
https://github.com/monero-project/monero/issues/1991
It has recently been ...
3
votes
Accepted
Is the raw Monero blockchain file different for Linux, Windows, or Mac?
The .raw file is "raw" as the name implies, meaning it should be platform-agnostic, ie, the data inside is the bare minimum, unoptimized, blockchain data, as it flies over the network, and nothing ...
3
votes
Moving LMDB from Laptop to SBC?
It might work. Edit: As per hyc's comment, it will work fine.
You can safely try as it would properly trigger an error.
Here is a detailled answer.
3
votes
Accepted
What is the best way to pop the top block from the monero blockchain and fix a bad "unknown top block" error in the sync data process?
While getting a bad block on top should not be possible in the first place, it could happen in case of crashes, etc, on some systems.
Popping one or more blocks can be done with blockchain_import, eg:...
3
votes
Accepted
What is in ~/.bitmonero/lock.mdb? Is it needed to start syncing from a blockchain backup from another computer?
Do I have to backup the entire lmdb/ directory or just lmdb/data.mdb?
You may as well backup your whole ~/.bitmonero folder, to keep your config, logs and blockchain.
What is in ~/.bitmonero/lock....
2
votes
Blockchain syncing and transactions verification
Unless you had --fast-block-sync 0 as a command-line flag, it should've already been skipping both POW checks and ring signature checks. With the transaction rates we've had in much of the coin's ...
2
votes
Error Failed to commit a transaction to the db: operation not supported
The default ntfs driver in Linux doesn't support writes. NTFS support on Linux is generally pretty awful.
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
lmdb × 29monerod × 14
blockchain × 8
synchronization × 6
database × 6
blockchain-data × 3
daemon × 2
ringct × 2
windows × 2
error-log × 2
raspberry-pi × 2
security × 1
ring-signatures × 1
linux × 1
monerod-commands × 1
scalability × 1
blockchain-size × 1
pruning × 1
python × 1
bandwidth × 1
backup × 1
blockchain-analysis × 1
offline-nodes × 1
database-conversion × 1
transactions-per-second × 1