Questions tagged [state-transition]

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

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

Why is shared mutable state on the ETH network considered problematic?

I understand shared mutable state as describing a situation in which two or more parties control the same data. If their lifetimes or execution periods overlap, this can cause an issue. But in the ...
0
votes
0answers
27 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....
8
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?
2
votes
1answer
312 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 ...
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 ...
1
vote
2answers
122 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 ...
0
votes
2answers
489 views

How Ethereum supports in dealing with double spending problems

Let's us consider a scenario where I am using my ethereum wallet for creating a transaction request (where my account balance is 100 eth and I am doing a transaction of 50 eth to someone from one ...
0
votes
1answer
64 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....
1
vote
1answer
68 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
2answers
423 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
188 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
3k 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
3k 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
168 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 ...
2
votes
1answer
270 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 ...
0
votes
0answers
39 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
281 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 ...
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 ...
4
votes
2answers
3k 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
99 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
63 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
184 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
409 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
593 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
271 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 ...