38 votes

Which database(s) do the ethereum clients use and why?

Geth uses leveldb. Some of the reasons behind choosing it was: In process database (i.e. I don't need to run an additional software) Native implementation in Go (i.e. cross platform to everything Go ...
Péter Szilágyi's user avatar
21 votes
Accepted

Fatal: Could not open database: resource temporarily unavailable

Your geth client is already running in the background. You can attach to it by typing: $ geth attach in your command line. This will allow you to run commands on the geth client console.
q9f's user avatar
  • 32.6k
16 votes
Accepted

Exploring and Analyzing the Ethereum blockchain

Data structures are stored in Merkle Patricia tries (read this and this), usually inside a LevelDB store. The chaindata is exactly that. I think the structure might slightly depend on the actual node ...
axic's user avatar
  • 2,519
15 votes
Accepted

How to reduce chaindata database size?

There is state trie pruning in the works, which would be able to constantly delete old data that is not needed any more. Hand in hand with pruning is the fast sync, which sync to the network in such a ...
Péter Szilágyi's user avatar
13 votes
Accepted

Database used for Parity

I'm one of parity devs. We use Rocksdb. It's a key-value database developed by Facebook. We chose it mostly because of it's performance. In our benchmarks it was faster than LevelDB From their ...
debris's user avatar
  • 861
10 votes

Exploring and Analyzing the Ethereum blockchain

I am also interested in analysing the Ethereum blockchain. In fact, I'm primarily looking into smart contracts. While I was researching papers and articles about this, I stumbled upon this paper where ...
Dominik Harz's user avatar
8 votes
Accepted

How to use blockchain as a Database?

The best way to start is to understand the following few concepts and learnings. what is Smart contracts ? What is solidity and how to start writing your domain data or objects in solidity. ...
Abhiram mishra's user avatar
7 votes

How to reduce chaindata database size?

While Péter Szilágyi's answer is in no way wrong, there's also an other possibility. If you redownload the blockchain with Parity instead of geth, the size of the blockchain is reduced from your 10 GB ...
Jon Ramvi's user avatar
  • 243
7 votes

If a blockchain is a distributed database, where is the data?

Blockchains are databases from a high-level view, but the underlying technology is different enough to make some assumptions inaccurate. An Excel file is also a database, but with characteristics ...
Matthew Schmidt's user avatar
6 votes
Accepted

Django, Ethereum, Sqlite

It's very difficult to answer with any precision based on a general description of a modest data model with 6 entities. Some comments to hopefully help clarify the big topics. Ethereum consensus ...
Rob Hitchens's user avatar
  • 54.5k
6 votes

Exploring and Analyzing the Ethereum blockchain

I am interested in the same project. Currently, it appears to me that the javascript API provides the most robust access to the blockchain data: https://github.com/ethereum/wiki/wiki/JavaScript-API ...
antianticamper's user avatar
6 votes
Accepted

What is the composition of the blockchain database?

account is a local object to easily track changes on the accounts (with a StateObject db). The size depends on the nbr of transactions you execute with this account. An unused account should be less ...
wiwulo's user avatar
  • 131
5 votes

Which database(s) do the ethereum clients use and why?

Parity is using RocksDB as it's database. From reading here it seems the reason for choosing it was performance. Faster than LevelDB in their tests. Lately though they have hit some performance ...
NoMan'sLand's user avatar
4 votes

Using Ethereum as a ACID database?

I can wait a second or so before the response. This is a crucial requirement, because reading is way slower than with MySQL at al. What you need to do is to set up a private network learn about ...
n1cK's user avatar
  • 3,358
4 votes
Accepted

Best way to store data on the chain

Couple of ideas that might help simplify this and reduce the cost by removing redundant storage. This line: mapping(string => OrganisationObject[]) organisations; seems heavy. I would incline ...
Rob Hitchens's user avatar
  • 54.5k
4 votes

Is it worth to store Ether at the full precision in database?

As the commenters have correctly pointed out, it depends entirely on what you are trying to achieve. You can, and probably should store full-precision strings so you have all significant digits, i.e. ...
Rob Hitchens's user avatar
  • 54.5k
3 votes

LDB files reading

...or a Go API library, or to explain me what part of Geth accesses the chain files, for being able to develop it myself? Have a look at Geth's database.go, which is part of the ethdb package. For ...
Richard Horrocks's user avatar
3 votes

If a blockchain is a distributed database, where is the data?

It is a custom structure, not SQL anyways. It contains the previous hash, Nonce, Merkle tree root and the timestamp, very basically, but also may other informations about the block. You can look at ...
A. Grenouilloux's user avatar
3 votes

Database used for Parity

The answer here is slightly out of date. Parity has migrated to use blooms db which is an implementation of a Bloom Filter to reduce overall disk reads. The blooms are a db layer before the kvdb ...
forgetso's user avatar
  • 163
3 votes
Accepted

Local caching database for fast retrieval

A two-part answer. "you need to loop": This just jumps out at me and deserves a comment. Smart Contracts don't give you indexed storage but this doesn't imply that a contract should loop over ...
Rob Hitchens's user avatar
  • 54.5k
3 votes

Exploring and Analyzing the Ethereum blockchain

That is your location: provide full transparency of the smart contract execution: https://live.ether.camp/ Here is how smart contract is traceable
Roman Mandeleil's user avatar
3 votes
Accepted

How can I check the current state of a token I made?

You can use live.ether.camp to see all of the accounts that have your token. That link goes to the MistCoin contract. If you click the mapping in the "storage" section, you can see the mapping from ...
Tjaden Hess's user avatar
  • 36.5k
3 votes
Accepted

Where should I store GPS data on Ethereum?

Hmm.. you should seriously research Ethereum alot more before proposing this. because it is expensive does not begin to describe how expensive and slow this will be if you wrote all your GPS data to ...
cappy's user avatar
  • 191
3 votes
Accepted

Is there a practical way for Ethereum networks to handle considerably large volumes of data used by heavy contracts?

An SSTORE of a non-zero value costs 20,000 gas. Each SSTORE can store 32 bytes of information. Double check my math: 1TB / 32 bytes = 31,250,000,000 31,250,000,000 * 20,000 gas * 1 gwei/gas = 625,...
user19510's user avatar
  • 27.8k
3 votes

Are the contents of ethereum storage private?

The contents are private only in the sense that other contracts can't read them if you set them private, but otherwise everything is public. All nodes need to be able to process the data so they also ...
Lauri Peltonen's user avatar
3 votes

Is there any lifespan of data on Rinkeby testnet?

I read that there are pre-autorized nodes which creates blocks on rinkeby testnet. Correct. It's a proof of authority (PoA) network, where certain nodes have the authority to create new blocks. ...
Richard Horrocks's user avatar
3 votes

Is it possible for multiple geth processes to share chain data?

I don't think that is possible, because it will completely break the goal of the ethereum network and may (and should) break the integrity and network validation of transactions and stored data on the ...
Kaki Master Of Time's user avatar
3 votes

how to identify a transaction?

Transaction hashes are unique until there is a hash collision. A hash collision occurs if two different inputs produce the same hash output. The transaction hash is 64 hexadecimal characters (2 ...
Lauri Peltonen's user avatar
2 votes

Connect Ethereum to a database

It's possible to cache the data that's stored on the blockchain in a database and update it frequently (every block?). This can be done simply by querying the blockchain and retrieving an updated ...
Mark Beylin's user avatar
2 votes
Accepted

Ethereum - Does it only have a single blockchain?

Ethereum offers a platform for anyone to create their own applications which are powered by the blockchain technology. Just like Bitcoin, Ethereum also has a public blockchain. So, you can either run ...
galahad's user avatar
  • 3,900

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