Questions tagged [leveldb]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1
vote
1answer
85 views

How do the stored transactions receipts are referred from the block?

Based on the data structure of Ethereum blocks and transactions which is also represented here, we know the following sentences about the transactions receipts: 1- The transactions receipts are ...
1
vote
0answers
154 views

using events in private blockchain raises leveldb not found error

i'm getting { [Error: Node error: {"code":-32000,"message":"leveldb: not found"}] when trying to use events on a private eth blockhain. What might be the problem? (I've installed Leveldb with brew) ...
1
vote
0answers
94 views

What filesystem should I use for geth and leveldb?

I used old LGA775 machine for running geth node. Its mobo has older sata 3gb/s (benchmark showed that ssd bottlenecked there) and only 4gb of DDR2, with windows installed. So syncing is a real pain ...
1
vote
0answers
67 views

Ethereum state database persistence

Is there a way to reinstantiate a stateDB after saving the output of state.Dump()? My problem is the following : I create a new StateDB object using : db := ethdb.NewMemDatabase() state, _ := state....
2
votes
2answers
79 views

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

I would like to know if it is at all possible to have multiple geth processes share the same chain data. I currently have multiple nodes (for a private chain) connected to the same file system via ...
0
votes
1answer
79 views

How do I check the Ethereum balance and unique transactions count of a Smart Contract over a period of time?

Basically I want to be able to track smart contracts balance and unique transactions over a period of time such as , last 24hours, last hour and so. What would be the best approach into doing this? ...
2
votes
1answer
207 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
93 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 ...
1
vote
0answers
32 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 ...
2
votes
1answer
380 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
61 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?
1
vote
0answers
27 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?
1
vote
1answer
117 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
2answers
547 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
116 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....
3
votes
2answers
172 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
1k 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 ...
3
votes
1answer
158 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
244 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
96 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
248 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 -...
4
votes
2answers
413 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
274 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 - ...
2
votes
2answers
718 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
714 views

Block header format

Does anyone understand what each element of a block header represents? I have an example block header represented here: [ cd7bd64fba4cc782fe5474d3640882afece5887180591e72f80ce6916cf73526, ...
5
votes
2answers
3k 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
262 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
769 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
39 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
123 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", {...
5
votes
2answers
1k 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
572 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 ...
1
vote
1answer
198 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 ...
7
votes
1answer
4k 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
96 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 ...
5
votes
1answer
3k 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 ...
2
votes
1answer
2k 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
516 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
859 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, ...
9
votes
2answers
6k 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. ...