Skip to main content
47 votes
Accepted

Is there a table of EVM instructions and their gas costs?

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. ...
eth's user avatar
  • 86.5k
25 votes

Ethereum block architecture

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.
Vishal Sharma's user avatar
18 votes
Accepted

What is the difference between a "call" , "message call" and a "message"

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. ...
Rob Hitchens's user avatar
  • 55.6k
15 votes

Why is the Ethereum paper called the "yellow paper"?

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 ...
Richard Horrocks's user avatar
14 votes

What is the difference between a "call" , "message call" and a "message"

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 ...
eth's user avatar
  • 86.5k
14 votes

What's a precompiled contract and how are they different from native opcodes?

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 ...
benjaminion's user avatar
  • 9,317
11 votes
Accepted

Is there a readable (less formal) version of Ethereum Yellow Paper?

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/...
ivicaa's user avatar
  • 7,539
10 votes

Ethereum block architecture

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 ...
Jouko Salonen's user avatar
10 votes
Accepted

Block header structure change under the Merge to Proof of Stake?

Your question is a bit tricky because it depends on which types of block you speak of. After the merge, the beacon blocks will encapsulate all the info and thus can be considered as "the main ...
upavloff's user avatar
  • 1,210
8 votes

Is there a table of EVM instructions and their gas costs?

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 ...
user2754799's user avatar
7 votes
Accepted

why is the EVM stack limited to 1024?

Because if it was very large, then executing a contract would be more expensive (ie, require more memory). I think 1024 was a very conservative value to be as safe as possible I think the ...
Earlz's user avatar
  • 471
6 votes

Ethereum block architecture

Extrapolating from the syntactic block structure, we can also ask what the semantic ethereum world state structure looks like. I use this diagram to explain the relationship between "on-chain&...
samlaf's user avatar
  • 160
5 votes

What is a Zombie Account in Ethereum?

From the Yellowpaper, o, the resultant byte sequence from the execution of the initialisation code, specifies the final body code for the newly-created account. If the initialization function ...
Nicolas Bernard's user avatar
5 votes

Is there a table of EVM instructions and their gas costs?

There are lots of reference websites for EVM opcodes: crytic's evm-opcodes repo ethereum.org ethervm.io evm.codes My favorite one is evm.codes:
Paul Razvan Berg's user avatar
5 votes
Accepted

From an account's address is it possible to tell whether the account is a contract account or externally owned contract?

No, it is not possible to determine from the address alone if it is a contract account or an externally owned account. See this previous post on how contract addresses are generated: How is the ...
max taldykin's user avatar
  • 2,966
5 votes
Accepted

(key,value) pair in account storage and corresponding modified Merkle patricia tree

In the storage contents of the account what are these (k,v) i.e keys and values? The contract code is free to use these as it wishes. For example, in this Solidity code the compiler will take index 0 ...
medvedev1088's user avatar
5 votes
Accepted

Transaction init and 24kb contract size limit

Let's start by saying that you are right, it is quite weird because the "init bytecode" is basically the deployed contract. With that being said, the yellow paper may have amends by the EIPs ...
matank001's user avatar
  • 820
4 votes
Accepted

Where are the opcode 0xfe and 0xfd documented?

This is probably a result of the technology moving faster than updates to the yellow paper. Your best bet is to go to the source. Pyethereum is a good source for readability. You can see the latest ...
dbryson's user avatar
  • 6,403
4 votes
Accepted

What is the maximum number of blocks in a blockchain?

Actually, there is no maximum limit on number of blocks, blocks just keep getting added to the end of the chain at an average rate of one every 10 minute this process will not stop even if all Bitcoin ...
Vijesh's user avatar
  • 298
4 votes
Accepted

In the Ethereum Modified Merkle-Particia tree, what do the prefix, key and value signify?

Appendix D of the Yellow Paper, in defining the node types, states (italics mine): Leaf: A two-item structure whose first item corresponds to the nibbles in the key not already accounted for by ...
Lee's user avatar
  • 8,618
4 votes
Accepted

Where’s the equivalent of Yellow paper for Ethereum classic?

The Yellow Paper for Ethereum Classic is... the Ethereum Yellow Paper. The first version of the Yellow Paper was released in 2014. Ethereum Classic split from the original chain at block 1,920,000 (...
Richard Horrocks's user avatar
3 votes
Accepted

What happens on hash collisions for, e.g., transactions, blocks, and contracts?

Transaction hashes are 64 hexadecimal characters. This means there are 16 ^ 64 = 115792089237316195423570985008687907853269984665640564039457584007913129639936 possible transaction hashes. Currently, ...
Jesbus's user avatar
  • 10.5k
3 votes
Accepted

How do Ethereum clients cope with future blocks?

I read the source code of Eth, Geth, Parity, pyethapp. Eth keeps future blocks (in m_future map object) and later processes them at the time specified in the timestamp. Geth and Parity accept future ...
Константин Ван's user avatar
3 votes

What is the maximum number of blocks in a blockchain?

Vijesh's answer is correct at the blockchain level. Within smart contracts, block numbers are represented as a 256-bit unsigned integer, so the maximum block number is 115,792,089,237,316,195,423,570,...
James_pic's user avatar
  • 1,108
3 votes
Accepted

How to calculate a root node in a Merkle Patricia tree?

Let's take a pseudo-code example: x00: {balance: 1} x01: {balance: 2} x02: {balance: 3} x03: {balance: 4} You calculate the first-level nodes: hashOf("x00: {balance: 1}", "x01: {balance: 2}") -> ...
Xavier Leprêtre B9lab's user avatar
3 votes
Accepted

How can callable contracts have an empty account state?

Possibly a kind soul will chime in with more details. At a high level, a "pre-compile" has a specific meaning. It is not contract code that has been compiled and deployed in advance as one ...
Rob Hitchens's user avatar
  • 55.6k
3 votes

When is code executed from a different account than the recipient?

Unless I misunderstood that section, this would be in the case in a delegate call where contract A executes bytecode of contract B but uses contract A's context. This can have many applications but ...
Bigbrotha's user avatar
  • 791
2 votes

How large are header scalar values?

The header is defined here, and the 5 scalar values are *big.Int. These are arbitrary precision integers, so variable size.
Randomblue's user avatar
  • 2,620
2 votes

Brute-forcing private keys

Disclaimer: Not my domain of expertise. Ethereum uses elliptic curve cryptography (ECC) for security. One can perform naïve brute force testing of a 256 bit key by testing all 2^256 combinations. ...
lungj's user avatar
  • 6,680
2 votes
Accepted

Contract creation - "previous existence" of the contract

It looks like you are reading the paper correctly, and indeed it is bemusing. My understanding was that a contract address can never be duplicated given how it is defined: "The address of the new ...
Thomas Clowes's user avatar

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