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 ...
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.
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 ...
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 ...
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 ...
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 ...
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.
...
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 ...
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 ...
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 ...
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
...
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 ...
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 ...
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 ...
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 ...
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. ...
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 ...
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 ...
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 ...
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 ...
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
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 ...
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 ...
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,...
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 ...
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.
...
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 ...
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 ...
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 ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
database × 139blockchain × 31
solidity × 25
contract-development × 15
storage × 15
go-ethereum × 13
contract-design × 13
ipfs × 10
leveldb × 9
transactions × 8
private-blockchain × 8
dapps × 8
openethereum × 6
synchronization × 5
dapp-development × 4
nodejs × 4
data-types × 4
query × 4
web3js × 3
remix × 3
tokens × 3
security × 3
addresses × 3
mapping × 3
python × 3