Questions tagged [state]
The state tag has no usage guidance.
52 questions
3
votes
1
answer
236
views
Error Starting op-geth Node with Archive Mode: "incompatible state scheme
I am following the Optimism documentation to set up a Layer 2 Rollup testnet and have encountered an issue while running my op-geth node. Here’s what I have done so far:
Initialized the op-geth node:
...
1
vote
0
answers
27
views
Disconnected button state doesn't update when disconnecting, so Metamask doesn't pop-up when trying to connect back again
Context:
NFT Smart Contract/
React App/
State Managed with Redux store
Issue Description: When pressing "Disconnect" button state does not reset to initial state and Metamask connection ...
1
vote
1
answer
54
views
Does Precompile Address Affect State Root?
I'm currently building my own L2 stack and have encountered an issue with the state root. Here’s what I’ve done so far:
I used the eth_getProof API to get an address proof for a specific precompiled ...
0
votes
0
answers
26
views
Executing contract function to change Contract state
i am trying to execute function that changing the state of the contract, currently i am testing it on my localhost hardhat node.
this is my function (in my contract)
address owner;
string[] ...
1
vote
2
answers
131
views
What are touched accounts?
I've seen this term used a lot in EIPs and client implementations. But I've never seen it defined properly. What does it mean, precisely, for an account to be "touched"?
For example, here's ...
1
vote
1
answer
98
views
Do new clients necessarily need to connect to archive nodes?
I understand that when a new client starts syncing the Ethereum blockchain, they have to recreate all previous states for each transaction starting from a particular checkpoint (in geth, this depends ...
1
vote
0
answers
9
views
What is 'Inconsistent' & 'consistent' state?
I am confused of those terms. I am studying Read-Only Reentrancy, and just found that the attack happens when a function with 'view' is in inconsistent state. However, this is vague for me. Can I get ...
1
vote
0
answers
10
views
Implementation for Alin Tomescu's Aggregatable Subvector Commitments for Stateless Cryptocurrencies
I’m a cryptography researcher attempting to understand the problem of statelessness.
I came across this paper by Alin Tomescu, et al titled “Aggregatable Subvector Commitments for Stateless ...
1
vote
2
answers
123
views
Are nodes in Merkle Patricia Tree ever deleted?
I was researching how contract storage works. I know that the world state is a Merkle Patricia Trie, containing all active Ethereum adresses with their storageRoot (and their nonce, balance, and ...
1
vote
0
answers
44
views
State Size of Ethereum - why is it so hard to get this number
I am looking for the current state size of Ethereum. Not the size of the data a client downloads when syncing. Just the current state size. It's super hard to get those numbers. Can I somehow run Geth ...
0
votes
1
answer
24
views
Is the previous state of Ethereum saved to level db file after a state change has occurred
Newbie here please I am a bit confused. when a state change occurs is the previous state trie updated or it is saved to level db and a new state trie is generated.
2
votes
1
answer
327
views
Why can't the EVM access old blocks and transactions during execution?
EVM can only access state and not history of the blockchain during execution.
Since transactions can get the block hash of the 256 most recent blocks, giving smart contracts the access to history is ...
3
votes
4
answers
662
views
Is sharding already working in Ethereum?
I understand that sharding is a solution to prevent full nodes to be very expensive to run in terms of storage, as they store the state of every smart contract on chain (more information about this ...
2
votes
0
answers
81
views
useDapp useContractFunction state not updating
In React i am using useDapp hook useContractFunction to call a contract function, it returns a send function (works perfectly), and a state object that represents current state of a transaction, ...
0
votes
0
answers
635
views
Maximum amount of state vars, smart contract storage limit and scalable architecture in Solidity
While architecting a smart contract system, which is expected to grow to a large size and be highly scalable, the question arose to use a central module with storage and functionality set in one place ...
1
vote
1
answer
115
views
If a low-level call fails, are the state changes applied?
Suppose that you perform a low-level call, and for whatever reason you do not check if the call reverted or not (in other words, you do not bubble up the revert).
Now, further suppose that that low-...
2
votes
3
answers
908
views
Which client holds the state of the chain?
I am interested in a (private) network where multiple consensus client (specifically Prysm clients) are connected to the same execution client (Geth).
Where, in this case, I want to know which chain ...
1
vote
1
answer
256
views
How are BeaconBlocks and BeaconStates interconnected?
After the Ethereum merge took place, the original blockchain merged into the Beacon chain and its data is referenced under the execution_payload field in the class BeaconBlock(...) and the Beacon ...
1
vote
1
answer
69
views
How to get ether amount from state change of a ERC-721 transaction? (web3 py)
I am looking at this NFT token transfer:
https://etherscan.io/tx/0xe20b03eaa2ec1062dcdda2057b604a8d5f38b2f863342675c6fe38f8d6324a6c/advanced#statechange
When I fetch the transaction, it only returns ...
1
vote
1
answer
221
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'.
1
vote
1
answer
771
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 ...
1
vote
2
answers
452
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 ...
3
votes
0
answers
48
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 ...
1
vote
1
answer
71
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 ...
0
votes
1
answer
554
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?
// ...
0
votes
1
answer
119
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", {
...
0
votes
0
answers
63
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 ...
0
votes
0
answers
329
views
What is the current size of Ethereum's world state?
I'm interested in the STATE size, not the size of the chain.
1
vote
0
answers
137
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....
1
vote
1
answer
30
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 ...
1
vote
0
answers
59
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 ...
0
votes
1
answer
578
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 ...
1
vote
2
answers
381
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 ...
1
vote
0
answers
51
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 ...
2
votes
0
answers
238
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?...
1
vote
1
answer
97
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 ...
1
vote
0
answers
51
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, ...
0
votes
2
answers
107
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 ...
0
votes
1
answer
110
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....
0
votes
1
answer
101
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?
0
votes
0
answers
615
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 ...
2
votes
1
answer
94
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'...
1
vote
0
answers
64
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 ...
2
votes
2
answers
423
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 ...
4
votes
1
answer
222
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, ...
1
vote
1
answer
285
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 ∈ ...
2
votes
0
answers
299
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....
3
votes
1
answer
1k
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 ...
2
votes
1
answer
745
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 ...
2
votes
2
answers
445
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 ...