Skip to main content
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, ...
user36303's user avatar
  • 34.9k
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 ...
hyc's user avatar
  • 4,233
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.
hyc's user avatar
  • 4,233
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 "...
HopelessN00b's user avatar
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 ...
hyc's user avatar
  • 4,233
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 ...
jtgrassie's user avatar
  • 19.2k
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 ...
glv's user avatar
  • 3,334
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 ...
hyc's user avatar
  • 4,233
4 votes
Accepted

Running monerod in the cloud on SSD volume, but with a tight limit on IOPS imposed by the provider. Will the PR #1506 help?

Yes, judging from my test results PR#1506 should reduce the IOPS requirement by at least half.
hyc's user avatar
  • 4,233
4 votes
Accepted

Equivalent of TX index=1 in Bitcoin

Blocks, txs, outputs, and spent keys are already indexed. What else is there? The complete DB schema is here https://github.com/monero-project/monero/blob/master/src/blockchain_db/lmdb/db_lmdb.cpp#...
hyc's user avatar
  • 4,233
3 votes

How can I increase the database cache size?

No. If you mean disk cache, assuming your OS isn't too dire, it should cache what's needed, and take it back when needed. If you mean another type of cache, then the answer is still no, but with no ...
user36303's user avatar
  • 34.9k
3 votes
Accepted

What settings for ZFS dataset containing blockchain directory?

The recordsize must be the same as the system's VM page size, which is usually 4KB on most systems. For blockchain data, compression is a waste of CPU. Cryptographic data is inherently incompressible.
hyc's user avatar
  • 4,233
2 votes

What settings for ZFS dataset containing blockchain directory?

Compression gets you a little bit with the Monero blockchain: # zfs list -o name,used,lused tank/xmr NAME USED LUSED tank/xmr 155G 166G The actual txns aren't compressible but the ...
Bill McGonigle's user avatar
1 vote

In which file monero is getting this "last_reward" and "last_timestamp" and how it is calculating that?

They don't need to "calculate" it, or obtain from a "file". There are a few ways to obtain but they probably use get_last_block_header from the daemon RPC interface.
jtgrassie's user avatar
  • 19.2k
1 vote

Graft blockchain

No, you cannot "graft" the blockchain.
jtgrassie's user avatar
  • 19.2k
1 vote
Accepted

monerod is sync or not?

One easy way to check whether the sync has completed is to check the current block height using a block explorer (e.g. https://moneroblocks.info) and then check to see whether your status height is ...
StrawbsUK's user avatar
  • 701

Only top scored, non community-wiki answers of a minimum length are eligible