Questions tagged [state]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
10 views

get final changed state of a transacion

I want to call 'eth_call' and get all changed state after this call. How I can do that? I want to use it as 'stateDiff' for next 'eth_call'.
user avatar
1 vote
1 answer
90 views

Is Nonce Stored in State?

I read these paragraphs from the Whitepaper and Mastering Ethereum book. And I'm confused. Is nonce stored at state, or not? Whitepaper says: If the value transfer failed because the sender did not ...
user avatar
1 vote
2 answers
49 views

How does a node rollback?

I've been trying to learn Ethereum's mechanisms for a little while, but there is a thing I still don't understand and it is how nodes switch to the correct state when solving a fork. As far as I ...
user avatar
  • 13
3 votes
0 answers
21 views

Why does a STORAGEADD op (SSTORE) add 80 bytes to state rather than 32?

According to this spreadsheet that Vitalik has referenced before, stating that it's what they used to determine gas fees for each opcode, a STORAGEADD opcode (presumably renamed to SSTORE) is ...
user avatar
1 vote
1 answer
34 views

Why does Ethereum state storage cost more than history storage?

According to this spreadsheet that Vitalik has referenced before, stating that it's what they used to determine gas fees for each opcode, state storage costs around 190 gas per byte while history ...
user avatar
0 votes
1 answer
118 views

Efficient struct ordering for less gas

Unlike initializing state variables in specific orders in order to save on gas, does this also apply to how you declare your struct properties where you keep lower uints side by side each other? // ...
user avatar
  • 103
0 votes
1 answer
59 views

UseDApp TransactionStatus not working in Brave

I used useEffect with status of the transaction in dependency array: const { send: approveErc20Send, state: approveErc20State } = useContractFunction(tokenContract, "approve", { ...
user avatar
0 votes
0 answers
15 views

How were the funds returned to the dao after the 2016 hack when it shouldn't be possible to take someones funds?

Correct me if I'm wrong but you can't move someones funds even if you control the network, because these funds are connected to his public address, you will need his private keys. So how was the hard ...
user avatar
0 votes
0 answers
39 views

The state of the contract does not change

I deployed the contract on my private geth network for testing. pragma solidity ^0.4.26; contract MyContract { mapping (address => uint) private balances; function depositFunds() public ...
user avatar
0 votes
0 answers
38 views

What is the current size of Ethereum's world state?

I'm interested in the STATE size, not the size of the chain.
user avatar
1 vote
0 answers
47 views

State change, trace discrepancies

I'm finding several ETH transactions where the state changes do not match the traces and I cannot figure out why. For instance, in the transaction below the traces show a transfer of 0....
user avatar
1 vote
1 answer
23 views

World state in Ethereum - Always 1 turn lagging?

About the data in Ethereum block header, there is the State root from the World state trie. However this World state trie contain the whole Accounts states (EOA + CA). In a block, we have transactions ...
user avatar
  • 21
1 vote
0 answers
21 views

Retain states for the last X blocks in geth

I have a use case where I need to keep states for last 2000 blocks. The default number is 128 if I’m not mistaken. I’m looking for an option to select minimum number of recent blocks to keep the ...
user avatar
  • 11
0 votes
0 answers
14 views

What's the easiest way to call a constant function in the context of a past block number?

I need to find out what was the state of a contract at a specific block number in the past. What's the easiest way to do this? Is there a public archive node that we could interact with, similar to ...
user avatar
0 votes
1 answer
178 views

What is the difference between blockchain state and the Ethereum singleton?

I am reading the Mastering Ethereum book and came across this piece: Once mined into a block, transactions also modify the state of the Ethereum singleton, either by modifying the balance of an ...
user avatar
1 vote
2 answers
123 views

How does ethereum network keep consistent

Since nodes in Ethereum are decentralized and distributed, how does the system ensure consistency regarding the state of the blockchain. I am aware that a validator, once they find the answer to the ...
user avatar
1 vote
0 answers
24 views

Is this an accurate depiction of arbitrary state transition?

I'm looking for a bit of clarification. I'm trying to understand and help explain arbitrary state transition vs protocol-level state transition. I made a (very simple) graphic based on info from this ...
user avatar
2 votes
0 answers
149 views

Using Eth-Brownie to fork mainnet from specific blockheight?

Can I use eth-brownie to fork mainnet from a specific blockheight? I have an archive node if that helps. I want to see what would have happened, instead of what will happen Can another service do this?...
user avatar
  • 147
1 vote
1 answer
36 views

How does MPT update an account?

I have read that Ethereum uses a modified Merkle Patricia Trie to store information such as accounts and its balance, when updating a balance to an address does it just go thru the tree and update the ...
user avatar
1 vote
0 answers
32 views

questions on block (and header) storage in ethereum, how is it stored along with tries?

I understand that ethereum uses Trie to track the state, transactions, receipts. and each trie has key-value pair that is stored in the database. Each blockheader also has the root has of stateRoot, ...
user avatar
0 votes
2 answers
83 views

Does blockchain state information take up space?

When synchronising a new full node, the first step is to download all the available blocks, it's interesting to note that the node is not usable right away as it needs to pull from the network all the ...
user avatar
  • 123
0 votes
1 answer
56 views

Data Stream Processing on Ethereum

I developed a system that receives continual streams of requests via a REST API. For each bit of data contained in the body of the request, the sender receives an according bit of data in the response....
user avatar
0 votes
1 answer
50 views

ETH1 balances transition to ETH2

Can someone please explain how do the ETH1 balances become ETH2 if they don't move on-chain? How does eth1 become a shard? Is ETH2 an airdrop of eth1 balances?
user avatar
0 votes
0 answers
434 views

Connecting HTML buttons to functions of my smart contract

These solidity functions are part of my solidity code which i want to execute them by clickcing on a button on my HTML.One of them stands for accepting bets placeBet() and the other one for sending ...
user avatar
2 votes
1 answer
57 views

Does verification of a world state require downloading the whole ethereum blockchain?

Lets say I'm a new node on the Ethereum network, I download a world state of 500 blocks ago and I download the blockchain from that point to present (500 blocks). Can I verify that the world state I'...
user avatar
1 vote
0 answers
47 views

Retrieve size of Ethereum state on a local Go-Ethereum node

I have a local go-ethereum node and I would like to measure the size of its state on disk. The chain DB is under a .ethereum directory but measuring the size of this dir would also include space used ...
user avatar
  • 21
2 votes
2 answers
305 views

Are NFTs (technically, the smart contracts) stateless or stateful?

Are the smart contracts used to manage NFTs stateless or stateful? Ethereum as a protocol seems to be stateful, but the smart contracts for NFT marketplaces seem to be stateless. They don't save any ...
user avatar
  • 221
3 votes
1 answer
75 views

How can callable contracts have an empty account state?

On page 4 of the yellow-paper, the definition of an "empty" account is provided. An account is empty when it has no code, zero nonce and zero balance. A formal definition is then provided, ...
user avatar
1 vote
2 answers
146 views

What is a machine state in Ethereum?

Section 9.4.1. of Ethereum paper (Petersburg version 41c1837 — 2021-02-14), states that: The machine state μ is defined as the tuple (g,pc,m,i,s) which are the gas available, the program counter pc ∈ ...
user avatar
2 votes
0 answers
205 views

Statelessness vs statefulness - what is the difference? Comparison Bitcoin's vs. Ethereum's states

I now read multiple times about bitcoin, that it is a stateless system and that because of that bitcoin simple-purpose computations or programs can be executed at anytime and independent from any data....
user avatar
3 votes
1 answer
728 views

Do miners have to store the whole blockchain?

I was reading the ethereum whitepaper and encountered this paragraph. Ethereum is likely to suffer a similar growth pattern, worsened by the fact that there will be many applications on top of the ...
user avatar
  • 532
1 vote
1 answer
348 views

State only node

Is it possible for the network clients to just keep the latest network state (without keeping track of the past transactions) while not harming the network security? That is, is it really needed to ...
user avatar
1 vote
2 answers
313 views

Smart Contract States

I have been encountering the word 'state' in a lot of research papers, and I was wondering what they exactly mean by the state of the smart contract. I am aware of the following answer; however, it ...
user avatar
0 votes
1 answer
29 views

How to check state of the contract after some time?

I am writing a contract where I need to check that if in 5 minutes no new token get purchased then the sale should be ended. What I mean exactly is that, lets say user A has purchased 100 tokens and ...
user avatar
1 vote
0 answers
13 views

What are the rules on persisting old transactions?

If a new node joins the network and attempts a full sync, it requires all transaction information from genesis to build up its chain state. To do this the transactions it receives must be the ...
user avatar
  • 626