125

Here's my interpretation, based on the yellow paper: ...the Tries should look more like this:


72

Lets first start with my adaptation of this figure illustrating the Bitcoin block structure: So far so good. All fairly basic. Enter Ethereum and things get a wee bit more complex. After reading through this and this, and as per @eth 's recommendation this, my best interpretation is the figure below: The header field definitions are available in section 4....


42

Events in the ethereum system must be easily searched for, so that applications can filter and display events, including historical ones, without undue overhead. At the same time, storage space is expensive, so we don't want to store a lot of duplicate data - such as the list of transactions, and the logs they generate. The logs bloom filter exists to ...


40

The Yellow Paper is actively maintained and should always be current, and it's not as easy as a table, but the gas costs are there in Appendix G. Fee Schedule and read it with Appendix H. Historically: A spreadsheet of opcodes and their gas costs that Ethereum launched with are here. It has some analysis per How were gas costs chosen for the Ethereum ...


34

Even though I do not know the real reason, I will try to guess. There would be the following considerations: Size of the namespace. There are not so many possible opcodes, so these need to be allocated very sparingly. The space of contract addresses, on the other hand, is practically unlimited for all practical purposes. Risk of name re-use. It is a good ...


31

I share with you the spreadsheet which explains the formula behind the gas cost of each OPCODE. Version 1.0 was created by Core Devs of Ethereum. I look forward how to articulate future updates of it. It is a meta-consensus challenge to resolve.


29

Just to clarify, the "trivial solution" referred to is about how to produce a series of random numbers from a single random seed. As a general rule, BLOCKHASH can only be safely used for a random number if the total amount of value resting on the quality of that randomness is lower than what a miner earns by mining a single block. To see why this is the ...


24

From my reading of the Yellow Paper (YP), Yes you would be able to spend the funds of the contract. But as you note, it is with extremely low probability of being able to find a contract's private key. Spending money in Ethereum is done via a CALL opcode, passing it parameters such as the sender, recipient, value (being spent). Since you have the private ...


21

Here is a complete structure of a block and where it plays its role in Ethereum's blockchain. You asked for a diagram but i think this would be more explanatory.


16

Univerally recognised mathematical symbols and their name/meaning is defined as/is equivalent to is equal to is not equal to size (length) of is in the following set is not in the following set for all union (common elements in adjacent sets) and such that set function or tuple array indexing ...


15

Good question. Both "message" and "call" are, arguably, overloaded terms. This question connects similar-sounding practical concerns and internal formal concerns making it challenging to address. See Eth's answer for formal definitions of terms. I suspect the intent of the question is of a more practical nature. That is, how to work with the protocol as a ...


14

Not an authority, but I know of someone who is... From Vitalik's article, A Prehistory of the Ethereum Protocol The second was the idea of “precompiles”, solving the problem of allowing complex cryptographic computations to be usable in the EVM without having to deal with EVM overhead. We had also gone through many more ambitious ideas about “...


13

Summary A block mined by a miner that sets their computer time ahead of the current "real" time will have their winning block rejected by other Ethereum nodes. Other miners on the Ethereum network will continue mining on the latest valid block. Details According to the code, from Github - Go Ethereum - consensus/ethash/consensus.go, lines 220-284: // ...


13

The Ethereum paper is the White Paper, originally published by Vitalik towards the end of 2013. (About a month later, in early 2014, Vitalik announced the start of the project.) Other colours of paper are presumably plays on the fact that the colour white was already taken. The Yellow Paper (a technical specification) was written later by Gavin Wood (at ...


11

The description can be found in the Yellow Paper which is the formal specification of the Ethereum protocol. Here are the main pieces of a block: 4.3. The Block. The block in Ethereum is the collection of relevant pieces of information (known as the block header), H, together with information corresponding to the comprised transactions, T, and a set ...


11

Since few days there is "Beige Paper", which is a rewrite of the Yellowpaper in non-Yellowpaper syntax, which is readable by a broader audience. GitHub Project: https://github.com/chronaeon/beigepaper/ Shortcut to the PDF: https://github.com/chronaeon/beigepaper/blob/master/beigepaper.pdf (Beta-Release)


10

The yellow paper is up-to-date and the only technical specification I know of. Below the headline, it says Homestead Draft which refers to the most recent homestead release on March 14, 2016. I just checked some formulas today and noticed they moved up in numbering, so you can consider this specification is always updated with the latest design changes. ...


10

There's "practical" answers to these questions, and "formal" ones. First, for practicality (and to avoid duplication) an important thing to understand is What is the difference between a transaction and a call? To answer the questions formally, see Appendix A from the Yellow Paper (YP) Is a transaction a type of a message? No, a transaction that creates ...


9

The total cost of a transaction that creates a contract or executes a contract is based on 2 factors: gasUsed is the total gas that is consumed gasPrice specified in the transaction Total cost = gasUsed * gasPrice gasUsed Each operation in the EVM was assigned a number of how much gas it consumes. gasUsed is summing up all the gas for all the ...


8

No, they are not the same thing. The Bloom filter in the transaction (R_b) contains only the logs from this transaction while the Bloom filter in the block header (H_b) contains the logs from all transactions in this block. So yes, the information is stored twice, but with the benefit of being able to check quickly if a certain log is present in a block ...


8

If a miner M sees a block B with a timestamp far in the future, here's what they would probably do: instead of building on B, they would publish their own block C with a more accurate timestamp. By doing this, M is likely to get rewarded since others will likely build upon C instead of B. As mentioned in the question, to build upon block B, a miner, such ...


7

Replying to euri10's question (this should be a comment instead of an answer but I cannot format in comments), here is the geth --help snippet that displays the options to set the gas price options - try setting it to "0": MINER OPTIONS: ... --gasprice "20000000000" Minimal gas price to accept for mining a transactions ...


7

Here's a picture from V's article regarding data structures for light clients: https://blog.ethereum.org/2014/02/18/ethereum-scalability-and-decentralization-updates/


7

The Identity function simply returns whatever its input is. At a talk given by Vitalik Buterin, it's for efficient data copying. It costs 15 gas + 3 gas for each 32 bytes of input data (rounded up). It is a precompiled contract located at address 4.


7

Yes, the Ethereum Yellow Paper (YP) and related Ethereum block architecture. Here are the main pieces of a block and the YP has all the sizes: 4.3. The Block. The block in Ethereum is the collection of relevant pieces of information (known as the block header), H, together with information corresponding to the comprised transactions, T, and a set of ...


6

Here's an illusatration adapted from another answer -> definitions summarised from the yellow paper: See also Equation (35) of the yellow paper. On github here, Latex format: The component types are defined thus: \begin{equation} \begin{array}[t]{lclclcl} H_p \in \mathbb{B}_{32} & \wedge & H_o \in \mathbb{B}_{32} & \wedge & H_c \in \mathbb{...


5

Vitalik Buterin gives a compact answer: Every block header in Ethereum contains 3 trees for three kinds of objects: Transactions, Receipts (essentially, pieces of data showing the effect of each transaction), State. You can read a longer version with pictures here.


5

In that equation, the fancy n doesn't refer to nonce. Hn refers to nonce. Here's the full, put together equation which might clarify it: More info on difficulty: Given an approximately uniform distribution in the range [0,2^64), the expected time to find a solution is proportional to the difficulty, Hd. or, more frankly stated: This mechanism ...


5

As defined on page 18 of Ethereum's formal specification written by Gavin Wood (a.k.a the "Yellow Paper"), there are 4 pre-compiled contracts that are mapped to addresses 1-4 in the Ethereum blockchain, as demonstrated in this Pyeth snippet: specials = { decode_hex(k): v for k, v in { '0000000000000000000000000000000000000001': ...


5

If you're looking for such a table for the purpose of golfing down contract gas cost, I'd recommend you bookmark protocol_params.go. It is good for two reasons: It is the source of truth. The gas costs specified in that file are what a full node really meters. It lists the important numbers you really need. For example, the usual gas table doesn't show how ...


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