Questions tagged [state-trie]

The tag has no usage guidance.

33 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
127 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 ...
4
votes
0answers
179 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   ...
3
votes
0answers
58 views

What happens in the account state when we pre-send ethers to a smart contract?

I'm asking this question in relation to this one : pre_sending Ether where the OP asked in a comment of the answer about what happens at the low-level when pre-sending ethers to a smart contract. As ...
3
votes
0answers
43 views

Why using Merkle Patricia trie for keeping transactions and receipts instead of Merkle trie?

Using Merkle Patricia trie for keeping Ethereum states has the advantage of fewer changes in the data structure during the updates in the states compared to Merkle trie. But what is the advantage of ...
3
votes
1answer
77 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 ...
3
votes
0answers
90 views

What is an empty account if the state root is not empty?

"State-bloat" attacks led to an empty account being defined as an account that has zero balance, nonce and code. There was a disagreement on EIP 161: I disagree. An account should be considered ...
2
votes
0answers
36 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 ...
2
votes
0answers
67 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 ...
2
votes
0answers
148 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 ...
2
votes
0answers
128 views

How get public address from State Root leaf node (code inside)?

In article "Understanding the ethereum trie"is written that: For the state trie, the keys are ethereum addresses. So i obtain State Trie and in that trie I got Merkle Leaf node: ['9:', ' LEAF ...
1
vote
0answers
44 views

the change of storage trie tree when the data in smart contract is changed

As we all know,the data in smart contract is stored in storage trie tree. If the data of a smart contract is modified, will a new storage trie tree be generated, or will the data is modified on the ...
1
vote
0answers
30 views

How to convert geth arhive to full node without loosing intermediate state

We have a geth node that runs with --gcmode "archive". However, the recent growth of disk space is unsustainable and we want to change this to a full node. If I stop the node and just re-run ...
1
vote
0answers
154 views

Obtaining pulledStates from Geth

How to obtain pulledStates from Geth when syncing is false?
1
vote
2answers
87 views

Upgrade a fully synced node to archive node?

Is it possible to upgrade a fully synced node to archive node ? means can i download older states by changing gcmode to archive ? or i will have to start from scratch ?
1
vote
0answers
113 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 "/...
1
vote
0answers
24 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 ...
1
vote
1answer
209 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 ...
1
vote
0answers
72 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
428 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 ...
1
vote
0answers
35 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
20 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
169 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
0answers
62 views

Is it possible to download a existing smart contract state from a blockchain and deploying it in a different blockchain?

Suppose I have independent 2 ethereum blockchain on private net N1 and N2. A smart contract S exists on the blockchain N1. Consider that the smart contract S is self-complete and doesn't depend on any ...
1
vote
0answers
69 views

Get root data of smart contract

I am deploying a Smart contract with set of fields. Updating some fields using events.Till here is fine. Now here i need to fetch the root data(data while deploying the contract) Please suggest. ...
1
vote
0answers
20 views

Why an attacker needs ~2^128 computing power to spoof membership of a key/value pair in a trie?

Ethereum Wiki: Every unique set of key/value pairs maps uniquely to a root hash, and it is not possible to spoof membership of a key/value pair in a trie (unless an attacker has ~2^128 ...
1
vote
1answer
104 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
0answers
13 views

The state tree uses the Merkel-Patrica (MPT) tree, while the transaction tree and state tree use the Merkel tree?

In some blogs, I have read the theory such as this: The state tree uses the Merkel-Patrica (MPT) tree, while the transaction tree and state tree use the Merkel tree. I want to be sure that this view ...
0
votes
0answers
13 views

State size per-contract breakdown

Are there charts for per-contract state size? I came across some blockchain size chart but couldn't find any per-contract breakdown. Suppose I have a full node (geth or parity), is there an "easy&...
0
votes
0answers
22 views

how does a new node get state data and where are storage/recepit trees stored?

I know that state data isn't stored on blockchain. Each node stores it separately on hard disk. Question 1) Let's say I am a new node and just joined the network. What will happen is I will sync the ...
0
votes
0answers
13 views

What's the point of keeping historical transactions?

I understand there are a few different sync modes. Archival nodes keep everything and they take ~2TB if not more. geth --fast downloads all historical transactions (besides transaction headers), but ...
0
votes
0answers
21 views

How is the storage trie of a user account which does not belong to any contract?

We know that storage trie (stored in the leaf node of state trie) is storing the contract's data related to an account. Then, what will be stored in the storage trie of a user account which does not ...
0
votes
1answer
260 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 ...
0
votes
1answer
206 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