Questions tagged [state-trie]

The tag has no usage guidance.

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

Reference a long-forgoten account

In the Etherem Blog Vitalik says: "but we do not store history older than 5000 blocks.". 1) Is it to be understood that the state Trie does not contain the state of accounts which were not in use ...
6
votes
1answer
1k views

Full node sync only preserve the last 128 history states

While researching on the different sync modes and their behaviors, I learned that geth full sync will replay all transactions from the genesis and preserve all history states, while fast sync will ...
8
votes
1answer
1k views

Getting complete state of a smart contract

From the yellow paper, I figured out that a contract has 4 components 1. nonce, 2. balance, 3. code, 4. storage. To know about the current state of a smart contract we need to know the all these ...
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 ...
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
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. ...
3
votes
1answer
1k views

How Ethereum state tree is formed?

As we know each block contains a state-root. Following image is taken from https://blog.ethereum.org/2015/11/15/merkling-in-ethereum/. Ethereum Wiki: Constant light client reference: light ...
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
516 views

Access previous state

Let's say I have a uint public myvar in my contract that is initialized to some value. Then, myvar gets set to 3 in the next block. How can I retrieve the old value? Is this possible with web3? ...
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
1answer
139 views

go-ethereum unit-tests failing (when using `go-test`)

I cloned go-ethereum from https://github.com/ethereum/go-ethereum and its test cases from https://github.com/ethereum/tests.git When I run go test, it fails and gives error- state_test.go:79: post ...
2
votes
1answer
316 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. ...
3
votes
0answers
963 views

Questions about geth state tree pruning [closed]

In current geth, how long (in terms of blocks) will a state tree node put into the death row before being pruned? Does this vary among different sync mode? And can we configure it? Besides state ...
6
votes
2answers
2k 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 ...
2
votes
0answers
1k views

Geth traceTransaction: missing trie node [duplicate]

I have a fully synced Geth node and am trying to run the debug.traceTransaction() method, but it keeps giving me this error: Error: missing trie node ...
2
votes
2answers
160 views

Full Synchronisation with Geth Repeated Tree Node Error

I am doing a university project on the functionality of the EVM. I need to use debug.traceTransaction() function which requires a fully synchronized node. I have tried to sync Geth on a university VM ...
0
votes
1answer
2k views

Ethereum Block Structure - Roots and Tries Concept

Trying to reinforce my understanding, so hoping you guys may help me out. From reading the Ethereum wiki, I believe part of an Ethereum block header consist of the following: stateRoot ...
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 "...
1
vote
1answer
240 views

How is a post-transaction state calculated?

A receipt from rpc returns a root which I believe is the "post-transaction state" from the yellow paper. The internet seems to say this is the same thing as the full stateRoot at the exact moment ...
6
votes
4answers
3k views

How Ethereum transaction tree is formed

I am looking for clarity on transaction tree structure. Below I have listed my understanding If I am not wrong the state changes are tracked in a single state tree. Each block has a state root hash ...
31
votes
3answers
12k 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 ...
8
votes
1answer
1k views

How many trie's does Ethereum have?

Did I miss any trie below and get things right? Transaction tries, one per block, root hash included in the block header Transaction receipt tries, one per block, root hash included in the block ...
2
votes
2answers
656 views

In the Ethereum Modified Merkle-Particia tree, what do the prefix, key and value signify?

What does the prefix '3☐' mean in the leaf nodes?
4
votes
1answer
291 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?
8
votes
2answers
2k views

Is it possible to access storage history from a contract in solidity?

With web3, I can access the history of the blockchain like this: web3.eth.getBalance('0x1234') // returns current balance at address 0x1234 web3.eth.getBalance('0x1234', 1000) // returns balance at ...
9
votes
1answer
350 views

How was the state-bloat attack that led to the EIP 150 hardfork performed?

I understand that SELFDESTRUCT and mispricing of opcodes allowed many empty accounts to be created cheaply as explained in Why were empty accounts allowed to be on the blockchain? The answer to that ...
4
votes
1answer
640 views

Do the Ethereum clients store 'historic state' or just 'current state.'

I assume, given the recent state clearing, that the Ethereum clients must only store the current state of each account as opposed to all historic state. (Otherwise, if it stored a record of all past ...
3
votes
1answer
693 views

How much time until the state data is PoW validated when using parity warp?

Ethcore claims parity --warp only takes one minute to sync the chain. I tried myself and it indeed takes around 2-3 minutes on my machine with a slightly bad connection. 0 ✓ user@hoster ~ $ parity -...
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
1answer
115 views

Why does the blockchain store multiple copies of the same code?

Based on joeykrug's questions on Github: Is there any reason we need to store multiple copies of code if the same contracts use the same code? For example, if a contract is deployed and another ...
4
votes
1answer
327 views

How can empty accounts with a nonce of zero appear on the blockchain?

Recently I have heard about zero balance accounts with a nonce of zero appearing on the blockchain. My understanding is that any account that has been used in a transaction must have a nonce greater ...
2
votes
1answer
338 views

How to calculate a root node in a Merkle Patricia tree?

I'm trying to understand a Merkle Patricia tree. For example there are two accounts: x00: {balance: 1} x01: {balance: 2} I can't understand how to begin building my trie. RLP and HP encoding are ...
7
votes
3answers
1k views

Reading Ethereum contract state variables

Is this assumption correct ? There is absolutely no way an ethereum contract can send data to the external world. It can only modify its state variables (later stored in the new block)and send ...
7
votes
1answer
104 views

Are there multiple instances of Ethereum state or a single latest image?

Are there multiple instances of Ethereum's state? That is, is there one per mined block? Or a single latest image? Does Ethereum maintain a state snapshot, for every block since genesis, so that ...
2
votes
2answers
159 views

Do state tree key/vaue maps reference state trees from other blocks?

Each block includes both a state root and the whole state tree. In the state trees, do key/value maps reference state trees from other blocks ?
13
votes
3answers
2k views

is there an easy way to get the full state of a contract?

I'm developing a quite complex contract with many state variables of all kinds. (mappings, arrays, uint, strings, bytes, etc). For testing, it would be very useful to get a JSON (or similar) with the ...
4
votes
1answer
941 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 ...
26
votes
3answers
17k 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 ...
89
votes
6answers
66k 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
2