Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

The tag has no usage guidance.

1
vote
1answer
45 views

Ethereum storage implementation at the database level - how is it stored

I have read the yellow paper many times as well as various articles, I suppose if I cannot find the answer here - I will look into the code. My understanding is that each contract account contains a ...
3
votes
0answers
23 views

Does Geth and Parity store blockchain in level db in same format?

If not, what are the diffrences?, for example geth db format is: var databaseVerisionKey = new Buffer("DatabaseVersion"); // databaseVerisionKey tracks the current database version. var headHeaderKey ...
0
votes
0answers
26 views

How to check last block in which storage variable was modified?

I am looking for method to quick chceck in which block variable was modified last. Assuming I have geth database synced in archive mode, that means I have all previous world states tries and accounts ...
1
vote
1answer
88 views

How to store storage trie in leveldb?

I want to know the structure of storage trie and its data structure in leveldb, and I read solidity storage. I still have questions? In the yellow paper, it says that storage root is a mapping ...
-1
votes
2answers
32 views

why ethereum can run so much process with level db at the same time?

Leveldb can only run at single process. why Ethereum can run p2p, create block, rpc server at the same time, and the leveldb no lock?
0
votes
0answers
15 views

Getting storage variable state by name

What do I need to make script, which given the variable name and db with storage tree, will read account storage to check the value of the variable. Can I do this only having code of contract, code ...
1
vote
0answers
23 views

Best way to restore historical storage state

What is the best way to get historical storage state, given db with current world state and blockchain data? Do I need to reverse assemby code or can I do this using receipt logs?
0
votes
0answers
20 views

Parsing levelDB files with ethereumjs

I am trying to read the leveldb files using ethereumjs. Here is my code below (taken from https://wanderer.github.io/ethereum/nodejs/code/2014/05/21/using-ethereums-tries-with-node/) - var Trie = ...
1
vote
1answer
39 views

Ethereum Block Pattern change

I want to know how block data get added to the leveldb chaindata in Ethereum . So that i can change the pattern of block. Basically i am creating my own private ethereum blockchain. And i want to add ...
2
votes
1answer
243 views

Decoding ethereum leveldb keys and values

I've created a simple script to read ethereum data from the leveldb using C++. Basically this testing program would print all keys in leveldb to the console. #include <cassert> #include <...
0
votes
1answer
53 views

Viewing account balance of an address

Is there a way to get the account balance of any given address (address which is not belongs to me) using geth or by using a script which reading leveldb? Similar to how etherscan (https://rinkeby....
0
votes
0answers
141 views

Reading state trie and storage trie

How to read the state trie and storage trie from ethereums leveldb? I tried to follow this https://gist.githubusercontent.com/tpmccallum/bd9e5538346e1defb1234f37cfd33eda/raw/...
3
votes
2answers
96 views

reading contract bytecode from leveldb

Is there a way to read a deployed contract's bytecode from leveldb? From what I understand, within each account in the state tree, there exists the nonce, the balance, the codehash, and the storage ...
3
votes
2answers
528 views

Index and query blockchain data and levelDB

Would it be more performant to query the blockchain data directly through the underlying database levelDB instead of using the provided geth api? How would it be possible? Can I just index the ...
4
votes
1answer
110 views

JavaScript merkle-patricia-tree/secure - OutOfMemory when traversing large (~70Gb) state tries

I have the JavaScript code below, which is traversing the state trie from geth's leveldb for Ethereum mainnet Block #5200035. After some time with high cpu usage and having reserved about 6Gb RAM, ...
4
votes
0answers
111 views

Rationale behind levelDB? [duplicate]

1) Ethereum needs to store lots of data whose identifier can be said to be purely random. It makes use of LevelDB, whose indexing/sorting properties are useless here since the very key is random. The ...
2
votes
0answers
78 views

Where I can I find a description of how geth maps Blocks, Transactions, Accounts, etc. onto a LevelDB database

Where I can I find a description of how geth maps Blocks, Transactions, Accounts, etc. onto a LevelDB database? I can dump the 300+ million db blocks (keys) in my local geth database but I have no ...
1
vote
0answers
201 views

For what data does Ethereum use Memory Database, and for what does it use Level Database

Ethereum uses two databases Memory database and Level Database. Is data stored in MemoryDatabase different than LevelDb? In what cases is one database used over other? The question is different from -...
0
votes
0answers
139 views

Pyethereum linking to blockchain

I am trying to create a blockchain from my already download geth leveldb in pyethereum. There are very few resources on pyethereum but what I can find never link the blockchain to their workspace ...
4
votes
2answers
327 views

How open local ethereum chain (leveldb) using PyEthereum package?

I got local private blockchain in: /Users/User/EthereumTestNet/geth/chaindata How i can connect to it, to get chain data by ethereum.pow.chain.get_block(hash)? I know that to look at chain data i ...
2
votes
1answer
221 views

Where can i get local merkle-patricia-tree root of my chain for look it in Nodejs?

In addition to my prev question... So i want to get data from my local chain. For that i use example form wanderer.github.io. I open my chain and get raw data, so this data, according to example - ...
3
votes
2answers
581 views

How open local ethereum chain (leveldb) using Nodejs levelup package?

Read the article about how to get info from local chain, but example not work. My code stoped when i create connection to LevelDB of my local chain in var db = levelup(...): var levelup = require('...
3
votes
1answer
464 views

Block header format

Does anyone understand what each element of a block header represents? I have an example block header represented here: [ cd7bd64fba4cc782fe5474d3640882afece5887180591e72f80ce6916cf73526, ...
4
votes
2answers
2k views

LevelDB in Geth, key and values

When parsing through the levelDB or RocksDB (Depending on the client you are using) there are string values representing the key and the value. These are both stored as Byte arrays as well. My ...
3
votes
1answer
217 views

Iterating through the ethereum blockchain using Java

I am trying to iterate through the LevelDB in ethereum to see what data is stored in the blockchain. I have loaded the database and created in itr using Dain's LevelDB api, but I am having trouble ...
0
votes
1answer
361 views

Loading LevelDB in Java

I am trying to iterate through the ethereum ldb files. When I run this code my iterator believes there is nothing stored on the ropsten's testnet blockchain. There are no errors, and the iter gets to ...
2
votes
0answers
36 views

Sharing live chaindata across processes

I'm running a node with geth, and would like to operate on the live chaindata using pyethereum. Is there a clever way to get around the lock imposed by LevelDB? Thanks!
2
votes
0answers
105 views

Ethereumjs: How to save the blockchain / state

Ethereumjs noob here. Using the code below, I'm able to create a new blockchain and add blocks to it. But the blocks are not being saved to the database. var blockdb = levelup("./blockdb", {...
4
votes
1answer
964 views

How to access Geth's state trie

Using Geth, how can I extract a snapshot of the network state for a given block? My Geth node runs a full sync (~300 gb) which means the state trie should already be saved down. I've tried accessing ...
1
vote
1answer
445 views

Recovering transactions from ldb files

I have a geth-based ethereum installation that started crashing with "Missing trie node" errors. In the chaindata folder I have hundreds of ldb files, nearly all of which are around 2.1Mb - but the ...
0
votes
1answer
144 views

Why web3.db.putString throws error?

Whenever i try web3.db.putString("user","name","jon_lobo") command from Geth console it throwsbelow error Error: The method db_putString does not exist/is not available at web3.js:3119:20 at ...
7
votes
1answer
3k views

LDB files reading

I'm looking for the format of the LDB files in order to fetch all the contracts created by my account. I read in a post on reddit (https://www.reddit.com/r/ethereum/comments/64hhp1/...
2
votes
1answer
90 views

If I stored the blockchain in shared storage, can multiple miners work on it?

So I have a crazy idea to speed up the mining process. If I stored the blockchain in /data/ethData (which is on shared storage like a SAN), I can then mount it on multiple machines and then have ...
4
votes
1answer
2k views

How to read block data from chaindata

I know that chaindata folder (on Mac OS X) stores the state as key/value database. But how is a block stored? Are transactions also stored as key/value pairs? If yes, how to identify which files ...
3
votes
1answer
1k views

Format of LevelDB files in nodes directory? Trouble pulling contents with python leveldb API

I am interested in exploring the data in ~/.ethereum/nodes, which I believe contains previous connection attempts and information about the nodes. (Is that correct?) But I am stuck trying to pull the ...
3
votes
0answers
479 views

Pyethapp Build error: No files/directories in ..pip-build-gpzcs1\leveldb\pip-egg-info (fr om PKG-INFO)

I'm new to ethereum & do not have any ethereum clients 'installed'. I'm trying to install pyethapp in a clean virtualenv following the github tutorial, but it produces the following error. ...
8
votes
1answer
779 views

What is the composition of the blockchain database?

From axic's explanation of the structure of the ethereum database, we learned that data is stored in Merkle Patricia tries, usually inside a LevelDB store. It consists of structures such as blocks, ...
7
votes
2answers
5k views

Corruption on data-block while synchronising

My home server's been down for a couple of days while I do some upgrades. I'd had Geth running in one of the terminal windows, but shut it down gracefully using exit before taking the server offline. ...