11 votes
Accepted

Why are there no change addresses?

The fundamental difference between Ethereum and Bitcoin is that while Bitcoin uses a UTXO model, Ethereum uses a state-transition model. In Bitcoin, in order for a transaction to be valid, it must ...
user avatar
  • 34.4k
10 votes
Accepted

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

The code is correct but I lacked the understanding regarding the mechanics of how Ether is accessed and sent to contracts. I will explain to aid others in their advancement of knowledge... The ...
user avatar
  • 177
5 votes
Accepted

Retrieving historical balance and lifespan of an address

Those data are unavailable as they would require access to the entire past intermediate state of the blockchain. A contract can only access the current state. If you want to do this for very specific ...
user avatar
5 votes

Why are there no change addresses?

Change addresses are a privacy feature, not a bug. The idea is users would choose a different change address for each transaction. Someone analyzing the blockchain would then not be able to tell ...
user avatar
5 votes
Accepted

Ethereum walk-through

Yes When a new block is received, it should be validated that the transactions included match the advertised state. Failing verification, the block would be discarded instead of propagating to other ...
user avatar
5 votes

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

What does it mean exactly by state change. State change in a smart contract refers to a Transaction, which means two parties involved in the transaction will have some changes. For instance, if you ...
user avatar
  • 3,322
4 votes
Accepted

How to send Ether to a contract successfully?

A contract can't forcefully extract ETH from a wallet address, if you want to pay Ether into a contract, you must set the "Value" of the transaction when calling a function (or just send ETH to the ...
user avatar
4 votes

Carry out function for either x state or y state

Here's one way to do it: pragma solidity ^0.4.2; contract Test { enum GameState {noWager, wagerMade, wagerAccepted} GameState public currentState; modifier onlyState(GameState ...
user avatar
4 votes
Accepted

How is a post-transaction state calculated?

The state trie contains the balance of each account. Even transactions that throw an exception result in a reduction in the sender's balance through gas costs, which means that the resulting state is ...
user avatar
  • 34.4k
3 votes

More questions about changing a smart contract state (variable)

When tx1 and tx2 are broadcast to the network they will be picked up by miners and included in blocks. If both tx1 and tx2 originate from the same "owned" account, then they will be included in the ...
user avatar
  • 8,702
3 votes
Accepted

Transaction propagation and acceptance on forks

Yes, the same contract can be mined on both sides of the fork. I don't think it's correct that each instance of the contract creation would yield a different contract address. Contract addresses are ...
user avatar
  • 16.4k
2 votes

Retrieving historical balance and lifespan of an address

You could keep a map of (blockchain_number + address) -> balance in your contract, and update it every time you need to interact with that address. This will use up a large amount of storage and cost ...
user avatar
  • 4,181
2 votes

How Ethereum supports in dealing with double spending problems

If the transactions are created close to each other they are possibly valid transactions. If one transactions has already been processed (mined) and the wallet knows about this then the wallet refuses ...
user avatar
2 votes
Accepted

Reason for World State

From what I've understood through all the reading I've done on Casper CBC I'm assuming you're referring to Vlad's Casper CBC paper? Vlad has proposed a number of sharding schemes but I don't think ...
user avatar
1 vote
Accepted

Is EVM deterministic?

Are these two different concepts? Even though we can't predict the result beforehand, being deterministic means that for the same starting conditions, and given the same inputs, the same result will ...
user avatar
1 vote

How Ethereum supports in dealing with double spending problems

The wallet's idea of its balance is irrelevant. It's the network's accounting that matters. That is what is authoritative. A wallet merely reports it. There are really two scenarios here: Double-...
user avatar
  • 51.8k
1 vote

Smart Contract States

The definition of “state” is the position the smart contract has in the space described by its permanent variables. In the case the smart contract has one bool variable and nothing more, it can ...
user avatar
  • 3,020
1 vote

Smart Contract States

Unlike other forms of software in which the data is (generally) external to the software that manages it, contract data is stored within a namespace (a key/value store) that is logically "inside" the ...
user avatar
  • 51.8k
1 vote

Why some transaction errors lead to discarding the whole block?

It is a miner mistake to allow invalid transactions. A block with invalid transactions is using blockchain space with something useless for infinite time. If the user doesn't have enough balance the ...
user avatar
  • 29.5k
1 vote
Accepted

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

You need to add a payable function to accept Ether function () public payable { // this function enables the contract to receive funds } It doesn't need to do anything, but you can add logic in ...
user avatar
1 vote

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

Having looked at the doc you linked, I don't think you need to simulate transactions happening at varying speeds. Since you also submit the nextTransitionCounter to the functions that you declare that ...
user avatar
  • 1,618
1 vote

Formal definition of the EVM as a Turing Machine

I can confirm the following: they run the exception handling before the state transition. If exception handling is triggered, the ongoing transaction is being reverted, so the state remains the ...
user avatar
1 vote

Transactions and contract state

If both transactions for the token saved in your contract are mined, it will act by whoever is higher up in the transaction pool (whoever paid more). There is only one token and two people, so only ...
user avatar
1 vote

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

What does it mean exactly by state change. Where they get stored. State change of a contract means the values of the variables that are stored on the blockchain as part of the contract are changed. ...
user avatar
  • 989

Only top scored, non community-wiki answers of a minimum length are eligible