Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Hot answers tagged

6

At the point of writing this the supply of ether is still "infinite". Every 15 seconds two new Ether are generated. Currently we are at 107,682,753.47 Ether. These are from: Genesis (60M Crowdsale 12M Other): 72,009,990.50 Ether Mining Block Rewards: 33,168,789.59 Ether Mining Uncle Rewards: 2,503,973.38 Ether The change to PoS got delayed a few times ...


4

Blocks that are fuller, and contain more transactions, both propagate around the network more slowly and take more time for other nodes to validate1. Both of these things increase the chance of a miner's block becoming an uncle and reduce the chance of getting the full block reward. Miners, therefore, have to decide whether to increase the number of ...


4

You can totally simulated the transaction througth eth_call. Her are the code snippets of eth_call and apply transaction (source from go-ethereum): eth_call (could not change state) // Setup the gas pool (also for unmetered requests) // and apply the message. gp := new(core.GasPool).AddGas(math.MaxUint64) res, gas, failed, err := core.ApplyMessage(evm, ...


3

It's different. From reading your question, I got the impression that you're thinking about this from the perspective of a cluster of computers that know and trust each other. There is some misuse of terms that may make it difficult for you to interpret documentation and explanations. If I may, I'll try to sort a few things out without getting too ...


3

These are both valid transactions, provided transaction 2 gets mined before transaction 1. When a miner finds a block, they include the transactions in an order they choose. If they happen to choose transaction 2 to occur before transaction 1, then transaction 1 will be successful. If they do it in the opposite order, transaction 1 will not be successful. ...


3

... which sends 25 Bitcoin to his own address as 'Reward'... The reward hasn't been 25 BTC since July 2017, when it halved to 12.5. But who decides which reward the miner gets in case he successfully manage to solve the riddle? The title of your question implies that by "which reward" you mean the type of reward, rather than quantity. Standard block ...


3

Very unlikely. Machine learning is based on finding patterns in data, the very assumption of a good hashing function is that you gain no information about the data A seeing the hash of A nor you gain information about B knowing the hash of A and the hash of A + B. Therefore in theory you can not predict the output from unseen data. That said, is it "possible"...


3

You've misunderstood the steps. But close! Consensus is easily misunderstood. The fundamental problem first solved by Bitcoin was how to reach eventual consensus among nodes that do not know or necessarily trust each other. Add money to the environment and it becomes an adversarial environment. This is in no way like the situation in a typical cluster of ...


3

Your questions hint at some conceptual confusion. Fairly common misunderstandings. "Consensus" is not about the results of transactions or contracts. It's mainly about disambiguating transaction order. With deterministic contract functions (they are) and an agreed transaction order (consensus), each node runs transactions for themselves. They rely on no ...


3

No. That isn't how it works. It's a distributed network in which no node has a privileged position, so your idea is not possible. Unless I misunderstand the question, it would require your node to receive special treatment. Gas cost for contract deployment is the price you pay to release persistent code into the network. Hope it helps.


2

Take a look at EIP 918: Mineable Token Standard. Proposed interface: contract ERC918 { function mint(uint256 nonce) public returns (bool success); function getAdjustmentInterval() public view returns (uint); function getChallengeNumber() public view returns (bytes32); function getMiningDifficulty() public view returns (uint); function ...


2

If you use PoW you can modify the Go code under consensus/ethash/sealer.go and add a condition to refuse seal if there are no transactions: // Seal implements consensus.Engine, attempting to find a nonce that satisfies // the block's difficulty requirements. func (ethash *Ethash) Seal(chain consensus.ChainReader, block *types.Block, stop <-chan ...


2

It works. The first thing is to filter out malformed transactions and settle on a canonical transaction order all nodes eventually agree on. Transaction order is a critical concern as there can be no consensus about the present state without consensus about the order of the inputs. To avoid repetition, these posts describe the same process from slightly ...


2

Can someone point me in the right direction such as documentation of where the reward is given in the codebase? The static block reward is defined in consensus.go: FrontierBlockReward = big.NewInt(5e+18) // Block reward in wei for successfully mining a block ByzantiumBlockReward = big.NewInt(3e+18) // Block reward in wei for successfully mining ...


2

Ether is the only cryptocurrency in the Ethereum blockchain which needs to be mined. Ether is the native currency and the whole Ethereum blockchain works around that. In Ethereum it is possible to create different kinds of "sub" cryptocurrencies called tokens. These are simply a programmatical ledger ("who owns how many of these tokens which I just created ...


2

The problem is always the same, only the inputs change. The problem is always "given an input X, try to find a hash value with a nonce which has a smaller integer value than Y". The input X is formed from the previous block's hash and from transactions in the current block. It's very difficult to find the correct nonce value which produces the desired ...


2

Thats almost impossible to get right in a network. Even if you would get some value, its just a rough estimate. You need to track all miners in the network, get the computing power, guess their energy consumption based on that (different graphic cards, different energy consumption) in total, assess this globally consumed (!) energy in kilowatts against ...


2

which makes the transaction faster to be included into a block. It would get your transaction to the miner's transaction pool more quickly, but that's no guarantee it would get included in a block any faster. In the best case, if the miner's transaction pool is completely empty, your transaction might get mined more quickly. However, the block time is ~15 ...


2

I would suggest this. Smart contract execution on EVM is effectively same as code execution on any (virtual) machine For each transaction, you can trace what "CPU" instructions were executed You can assign a cost for each instructions If you want to do this in advanced way, you can for example use Intel performance tuning suites and a doctored Go Ethereum/...


2

I haven't done it for a while, so hopefully, a kind spirit will chime in if I seem to be misleading you. Mining on Ropsten is not very competitive. You can mine coins with CPU mining and I think you'll be successful with a free tier instance. Keep in mind that you might not be able to stay within the free tier limits if you run it 24/7. CPU mining scales ...


2

POW and POS are both methods of choosing the miner who will have the privilege of appending a block to the canonical chain. POS doesn't change the idea of ordering transactions in ordered blocks. It changes the method of selecting a miner. Hope it helps.


2

The JSON_RPC eth_call method allows you to simulate a transaction on the blockchain, including contract executions. From : How can I execute code locally at given address?


2

While all the nodes operate on their local time (i.e. the local time of the computer they are being run on) large differences in time between nodes are not allowed. If you are really out of sync with an NTP server, you will experience problems with syncing blocks, consensus, etc. So while not strictly enforced, it is necessary to have accurate local time. ...


2

First of all, in bitcoin and subsequently in every other blockchain nonce is shortcut for nonsense. It does not make any sense to the block data but it is there. Lets see why is it there? A Block basically should have 1) Previous block hash, and 2) List of transactions to be mined in that block With these values no matter how many times you calculate ...


2

Your understanding is correct about both nonces. The block nonce is what miners keep changing to compute a solution to Proof of Work (in Ethereum, it's Ethash). Miners probably start with a value of 0 (all bits set to 0) and then keep incrementing it by 1 until they find a solution. A definition of nonce is "occurring, used, or made only once or for a ...


2

Sure, you can implement your own algorithm to order the txpool. Currently, they order by gas price that make sense for mining incentive https://github.com/ethereum/go-ethereum/blob/6bd896a97f0c86fdb6d0538f5f839d7ea104e888/core/tx_list.go#L374


2

I've read some docs online that to get the miner/sealer/signer address of a particular block that runs with the Ethereum PoA/Clique consensus (the Rinkeby testnet for example), I need to call the clique_getSnapshot RPC interface. However when I tried it with a infura Rinkeby endpoint, it returns "The method clique_getSnapshot does not exist/is not ...


2

Thanks a lot for helps from @Ha ĐANG I finally reached this solution const Web3 = require("web3"); const web3 = new Web3("https://rinkeby.infura.io/v3/xxxxxx"); // infura Rinkeby endpoint const eju = require("ethereumjs-utils"); (async () => { let blk = await web3.eth.getBlock(4753195); let header = [ eju.toBuffer(...


2

As you said, more computation is required if the block size is bigger. But mining nodes (initially) do the actual computations - they include transactions in a block and execute the transactions. So if there are more (or more complex) transactions more computation is required from the mining nodes. Other non-mining nodes do various levels of validations (and ...


2

Your problem is that you can start mining from whichever block and it's totally ok. At least in theory. If we are now at block 10 and you start mining from block 5 you may eventually get your own block number 10 and 11. But at that point the rest of the blockchain is probably already at least at block 20 or 50 or 1000 - you can never catch up by solo-mining ...


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