The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [state-transition]

State transitions being direct transfers of value and information between accounts.

Filter by
Sorted by
Tagged with
0
votes
1answer
24 views

Why some transaction errors lead to discarding the whole block?

In terms of go-ethereum code, transaction errors can be grouped into (I made up the terminology) several categories by their effect on state transition. System errors: like database connection issues....
2
votes
1answer
246 views

Formal definition of the EVM as a Turing Machine

I am trying to understand the EVM in the context of a classic Turing Machine. I have read through the yellow paper and taken what I can from the internet, but I still feel like I could use some help ...
1
vote
1answer
41 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 ...
0
votes
0answers
44 views

How does UTXO fit into this schema?

I have been rather confused by the eponymous web3 stack introduced by the Web3 Foundation. https://wiki.web3.foundation/en/latest/tech_stack/Layer-0/platform_neutral_computation_description_language/ ...
0
votes
0answers
9 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 ...
0
votes
2answers
400 views

Transactions and contract state

Imagine I have a contract that allows people to buy tokens. After some time, only one token left, but two persons try to buy this token at nearly the exact same time from the same node (a web server)....
2
votes
1answer
103 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 ...
0
votes
1answer
1k views

How do you send Ether as a function to a contract using Remix?

New to Solidity... When deploying a contract on a private blockchain using Remix, I am unable to execute payable functions. When executing these functions, the following error message displays: gas ...
0
votes
1answer
867 views

How to send Ether to a contract successfully?

New to Solidity... I am studying how to deposit Ether into a smart contract by setting a parameter in a function. Based on the value the function receives, the msg.sender is able to send a ...
0
votes
1answer
142 views

How can Ether be withdrawn from a contract successfully using transfer?

New to Solidity... I am studying how to withdraw Ether from a smart contract by setting a parameter in a function. Based on the value the function receives, an amount of Ether is sent to a contract ...
1
vote
1answer
221 views

Is it possible write a test for Truffle to validate that I am preventing unpredictable state variable changes in my contracts?

I recently read this paper on designing secure smart contracts, and it gives the following modifier to ensure that when an EOA (or contract address) interacts with your original contract that the ...
6
votes
3answers
3k views

Why are there no change addresses?

What's the concept behind ethereum transactions that allows them not to require change addresses? What's the underlying difference compared to - for example - bitcoin?
0
votes
0answers
37 views

State transiation logic

I read the whitepaper of ethereum and I have a question: APPLY(S,TX) -> S' My question is since S is defined as a set of UTXO, but AFAIK the blockchain does not store each balance in a block, is ...
1
vote
1answer
272 views

More questions about changing a smart contract state (variable)

Assume we have a smart contract that has a state variable as follows: uint data=32; The contract is stored in the blockchain. We have two transactions tx1, and tx2 sent to the contract one after ...
0
votes
1answer
183 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 ...
4
votes
2answers
2k views

What does it mean by smart contract state.Where they get stored?

I am new to ethereum. We understand that whenever some new transaction made Contract state changes. What does it mean exactly by state change. Where they get stored.Are they called distributed ledger. ...
3
votes
0answers
95 views

Is it possible to stack transactions?

Is it possible to stack transactions which depend from themselves? Example: State on start: Account A (2 ETH), Account B (0 ETH), Account C (0 ETH) Transaction 1 - Account A sends 2 ETH to Account ...
1
vote
1answer
54 views

Carry out function for either x state or y state

I've created my own struct: enum TestState {noWager, wagerMade, wagerAccepted} And my modifier: modifier onlyState(GameState expectedState){ if(expectedState == currentState){ _;} else{...
4
votes
1answer
172 views

Transaction propagation and acceptance on forks

Assuming the scenario where a fork occurs shortly after I have sent a transaction out, and it gets mined in my side of the fork, could it also be mined in the other side of the fork? In other words, ...
4
votes
0answers
375 views

How does ethereum keep track of changes on smart contract storage? [closed]

I'm aware that ethereum has essentially 3 tree-like structures: State data Receipts data Chain data As I've just learned from this question, contract storage resides on state data tree. Digging ...
5
votes
2answers
511 views

Retrieving historical balance and lifespan of an address

I am coding up a PoC for a free market basic income mechanism, and am trying to figure out how to get the historical balance of msg.sender, as well as the time since that address was generated. ...
7
votes
1answer
262 views

Ethereum walk-through

Would the following story line be a fair approximation of how Ethereum would work in this simplistic scenario? Simple network with just three nodes: N1, N2 and N3 N1 writes a contract that initiates ...