Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [state-trie]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
51 views

mining requires access to the entire blockchain?

I am reading the white paper and confused by two sentences bellow: In the Section of Mining Centralization: ... miners are required to fetch random data from the state, compute some randomly ...
1
vote
0answers
15 views

Why does Ethereum have nested trie structure that a storage trie is under a account in state trie?

As I understand it, the leaf node of the state trie has account data. The account data has a storage root, and the variables of the contract are stored in the leaf node of the storage root. But ...
1
vote
1answer
90 views

What does State Trie save when pushing into array?

I'm interested/worried about the size of the State Trie over time Lets suppose I have a contract with two vars: uint myNumber; uint[] myArray; As far as I understand, If I change the value of "...
0
votes
1answer
131 views

Accessing older blocks from Geth: Returned error: missing trie node 94d34

When my Nodejs script uses web3 to query a geth node running in a private Ethereum network for an older block, I encounter the error UnhandledPromiseRejectionWarning: Error: Returned error: missing ...
1
vote
1answer
139 views

Merkle proof for Smart Contract mapping field data

I'm trying to get merkle proof for Ethereum Smart Contract mapping field data. I created test smart contract and deployed to test network. Smart Contract Code like following code: contract ...
0
votes
0answers
25 views

Ethereum Trie dependence on mutation order

Given a set of non-overlapping key/value tuples, for all possible orderings of it, may constructing the trie by putting each tuple in the order yield different root hashes in the end?
0
votes
1answer
196 views

Geth syncing - Jan 18, how much time should wait before I call it quits. (First time miner)

After 3 days; current status: > eth.syncing { currentBlock: 4829460, highestBlock: 4829665, knownStates: 19675738, pulledStates: 19646971, startingBlock: 4828906 } Getting ti
2
votes
0answers
22 views

Question on initial sync and Freezer (SSD and HDD)

I've kicked off a fresh fast sync of Geth v1.9.2 and after 3 weeks it's still pulling states (state trie). As per the documentation you can use the Freezer with a HDD as it references old data so ...
1
vote
1answer
26 views

What is “w”, the permission to make modifications?

As per chapter 9 of the yellow paper: However, I find it vaguely defined. Who gives this permission? Is it dependent on each machine or is there an objective algo to follow? What is the type of "w"? ...
1
vote
0answers
40 views

Geth Dump Has Been Running For A Week

For my project I want to dump the full state data of all Eth wallets/balances. I have a fully synced Geth node with all state data (over 2TB). I started a block dump geth dump 7300000 --datadir "/...
2
votes
0answers
37 views

when syncing state trie of an Ethereum node, why not start from a recent block to reduce syncing time

as explained in this issue: https://github.com/ethereum/go-ethereum/issues/16218#issuecomment-371454280 when we are syncing an eth node, firstly it downloads the blocks, then the states, the first ...
1
vote
1answer
83 views

How many non-empty accounts are there?

I am researching into the statistics of Ethereum and I an looking for a datum of how many non-zero balance account currently exist in Ethereum? I know that in total 30M of accounts were created but ...
1
vote
1answer
43 views

Is there any way to only find blocks where state changes of a contract occurred?

I'm currently using the ethereumjs libraries (https://github.com/ethereumjs) to iterate over the blockchain, replay transactions and read the state trie of a contract from the geth leveldb. Currently ...
4
votes
1answer
256 views

Exploring Ethereum's state trie with golang

Exploring Ethereum's state trie with Node.js It is a nice article to explore ethereum internal storage, but the code is Node.js. Does anyone have a golang version?
0
votes
0answers
64 views

Service to show number of state entries for syncing?

When syncing a node it would be helpful to know (an estimate of) the number of state entries in the current state to assess how long it takes to finish syncing a node. Is there a website, service or ...
4
votes
0answers
110 views

How to generate a state root

I am trying to implement a Simplified World State Trie based on Merkle Patricia Tree. Take the following image for example there are four accounts address  value a711355   ...
0
votes
0answers
10 views

Why all stateObjects are merged to the state trie in *StateDB.Finalise function?

In *StateDB.Finalise function, why stateObjectsDirty flags of stateObjects are not reset after merging to the state trie? This leads to handling all stateObjects including some stateObjects not ...
1
vote
1answer
28 views

Why do Merckle trees use nibbles

In Appendix D of the yellow paper for Ethereum, it describes the Modified Merkle Patricia Tree, and states: Any series of bytes may also trivially be viewed as a series of nibbles, given an endian-...
1
vote
2answers
37 views

How are transactions stored in a block?

In State, use Merkle Patricia Trie for storing data. "key value" is account address(hash value). And also, Ethereum block uses MPT for storing transactions. However, Additionally Ethereum Block use ...
4
votes
1answer
889 views

Getting current full state

In my quest to understand ethereum in depth, I ended up in this article, which contains the following image: If the image above is correct, only the changes in state are taken in account to create ...
3
votes
2answers
228 views

Why are transaction tries in Ethereum not plain Merkle Tries?

I understand the Ethereum block header contains a Merkle Patricia Trie (MPT) root for the global state, one for receipts (which I don't understand but am not focussed on for now), and one for all the ...
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
0answers
21 views

Would full but not archive node delete old trie node from LVLDB?

Full not archive node would store the nearest 128 block's state in their lvldb. How could they delete old trie state in lvldb? I found they use dereference function in WriteBlockWithState function to ...
77
votes
6answers
53k views

Ethereum block architecture

Where can I find a description (preferably a diagram like below) showing the block structure in an Ethereum blockchain? Credits: Wikipedia
1
vote
2answers
56 views

If the World State only Stores Hashes of the Code, Where Is the Underlying Actual Code Stored?

Apologies in advance if it's a silly question. I'm slowly making my way through the ethereum yellow paper. Am I correct in saying that the ethereum world state does not contain any EVM code? It only ...
1
vote
1answer
577 views

How selfdestruct() works?

I'm wondering about how selfdestruct() actually works. Does it actually delete contract codes from the storage? Or just delete the contract address from state trie? If just deleting the contract ...
29
votes
3answers
11k views

Ethereum Merkle Tree Explanation

Here is my basic understanding about how Ethereum stores transactions A hash is generated for each transaction Then pairs are selected and a hash is generated for each pair This way the last ...
0
votes
3answers
311 views

how do you check if the account exists in current state?

Currently there is no way to check somehow that an account exists in the trie. I am looking for something like this: > web3.eth.accountExist("0x743623152a53b53be5f3463746726373") true > Is a ...
3
votes
1answer
98 views

How does knowing the root hash of a past world state help me to revert to this world state?

In section 4.1 of the Ethereum yellow-paper (http://gavwood.com/Paper.pdf) the following is written: The world state (state), is a mapping between addresses (160-bit identifiers) and account ...
2
votes
1answer
243 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 ...
2
votes
1answer
60 views

Leaf node with encodedPath containing only Hex-Prefix in Merkle Patricia Trie

A leaf node is defined as the tuple [encodedPath, value], and encodedPath uses the Hex-Prefix encoding. Is it possible we have a leaf node with encodedPath having only the prefix and no partial path ...
1
vote
1answer
70 views

Which node to use in Merkle Patricia Tree when there are single and shared nibbles at the same point?

If I understood well, extension and leaf nodes should be used when there are shared nibbles, and branch nodes when there are differences. Which type of node should be used when storing a different ...
1
vote
0answers
68 views

Custom Merkle Patricia Tree

One of the requirements of building our company's DApp is to maintain a separate, custom Merkle Patricia Tree that contain's data from our company's platform only. The Tree needs all CRUD operations ...
1
vote
0answers
322 views

Is it possible to download the Ethereum state trie and state database on their own?

I want to download a more or less recent version of the Ethereum state trie and state database, i.e. some version from within the last 1000 or so blocks. I know that I could set up a full node and let ...
3
votes
1answer
765 views

Does geth --syncmode light download the State Trie?

I'd like to download some recent version of the Ethereum State Trie. I read here that geth --syncmode light downloads the current state. But does that only encompass the most recent blocks or also a ...
25
votes
3answers
15k views

Where is the state data stored?

This question was asked on Reddit a while ago: Where is the state data actually stored though? On the hard drive of each node? Separate from or within the blockchain? — Reddit: Basic ...
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 ...
1
vote
0answers
18 views

Why do we need to keep state trie? Only for the computation speed?

I'm studying solidity these days and came up with this silly question. Is there any other reason why every node is maintaining state trie?
1
vote
1answer
286 views

eth.getBalance(<account>, <block>) returns “Error: missing trie node”

I have used --gcmode=archive to download all the state tries and eth.syncing returns false meaning my node is in sync. When I execute eth.getBalance for blocks closer to the current block I obtain the ...
3
votes
2answers
190 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 ...
2
votes
1answer
104 views

Reason for World State

All Ethereum blocks contain a stateRoot field - That is, the root hash of the world state trie. I have two questions about that. From what I've understood through all the reading I've done on Casper ...
1
vote
1answer
115 views

Are all state key-value pairs saved in a big trie?

I am learning Ethereum from yellow paper, I have some questions. The world state is talked in the paper. It seems that there is only one world state for all accounts in the whole blockchain from ...
0
votes
1answer
148 views

Ethereum account code hash

I've created a contract https://ropsten.etherscan.io/address/0xfaba4475358c1c23e37549f9bd54300261873d41#code And using its createChild() method I've created 3 children https://ropsten.etherscan....
2
votes
2answers
564 views
0
votes
1answer
27 views

Can state trie be hacked?

Ethereum's purpose is to decentralize components in the network. There is only one state trie in the network, Can't it be hacked and changed (because there is only one trie) ?
4
votes
0answers
328 views

What is the current size of the Ethereum State?

What is the current size of Ethereum's state in bytes? I am not asking about the size of the blockchain with blocks headers, transactions and receipts. I am looking for the size of all the structure ...
0
votes
1answer
159 views

Access contract storage from chaindata

I am trying to understand how to retrieve the complete storage of a contract based on chaindata (e.g. geth) of a full node. I have already found how to programmatically access the chaindata (which is ...
2
votes
1answer
269 views

Merkle tree child hashing process

Each non leaf node of a Merkle tree is just the hash of the concatenation of it's children. Does this literally mean stick the 2 hashes together or is there a more intricate process involved? i.e. ...
4
votes
1answer
344 views

How to collect all contract instantiations and count the bytecode redundancies?

I want to traverse the Ethereum blockchain, collect all contract instantiations, and count how often which bytecode has been instantiated. As result I want to have a map with key:hash(bytecode) -> ...
2
votes
0answers
119 views

Succinct contract state/storage root of a smart contract

In the yellow paper, it is mentioned(at section 4.1) that storageRoot: A 256-bit hash of the root node of a Merkle Patricia tree that encodes the storage contents of the account (a mapping between ...