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♦
- 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.
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.
...
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 ...
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♦
- 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 ...
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/...
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 ...
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 ...
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 ...
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 ...
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&...
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 ...
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:
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 (...
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, ...
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 ...
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,...
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}") -> ...
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 ...
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 ...
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.
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. ...
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 ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
yellow-paper × 93evm × 16
transactions × 9
blockchain × 8
go-ethereum × 6
opcode × 6
state-trie × 6
receipts × 6
block-header × 6
white-paper × 6
gas × 5
mining × 5
blocks × 5
contract-design × 4
contract-deployment × 4
accounts × 4
cryptography × 4
logs × 4
nonce × 4
merkle-patricia-tries × 4
rlp × 4
security × 3
protocol × 3
bloom-filter × 3
contract-invocation × 2