Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate Paris EIPs #894

Merged
merged 8 commits into from
Jan 9, 2024
Merged

Incorporate Paris EIPs #894

merged 8 commits into from
Jan 9, 2024

Conversation

alexkroeger
Copy link
Contributor

@alexkroeger alexkroeger commented Dec 7, 2023

This PR brings master up to date as of the Paris hard fork.

The Paris hard fork is described here and includes the following EIPs:

TODO before merging:

Other TODO:

Paper.tex Outdated
B'_{\mathrm{m}} & = & m \quad \text{with } (x, m) = \mathtt{PoW}(B^*_{\hyperlink{H_cancel_n}{\hcancel{n}}}, n, \mathbf{d}) \\
B^* & \equiv & B \quad \text{except:} \quad {\hyperlink{Transaction_Receipt}{B^*_{\mathrm{r}}}} = \hyperlink{r}{r}(\hyperlink{Pi}{\Pi}(\Gamma(B), B))
\Phi(B) & \equiv & B': \quad B' = B \quad \text{except:} \\
{\hyperlink{Transaction_Receipt}{{B'_{\mathrm{H}}}_{\mathrm{r}}}} & = & \hyperlink{r}{r}(\hyperlink{Pi}{\Pi}(\Gamma(B), B))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think B_r was referring to the state root header property here, so this change would make that more clear, though I'm still a bit confused by this line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think that H_r refers to the state root. The hyperlinks look wrong here. And I think it should be TRIE(L_S(...)) instead of r(...), like in Eq (33) or (173). I suggest to change to

{B'_{\mathrm{H}}}_{\mathrm{r}} & = & \mathtt{TRIE}(L_{\mathrm{S}}(\hyperlink{Pi}{\Pi}(\Gamma(B), B)))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, and I made the change

@alexkroeger alexkroeger marked this pull request as ready for review December 7, 2023 09:44
@alexkroeger alexkroeger changed the title incorporate Paris EIPs Incorporate Paris EIPs Dec 7, 2023
ethosdev added a commit to ethosdev/yellowpaper that referenced this pull request Dec 13, 2023
Fix to be consistent with ethereum#894
@ethosdev ethosdev mentioned this pull request Dec 13, 2023
Paper.tex Outdated
This document describes the \textit{execution layer} of Ethereum.
The execution layer defines the rules for interacting with and updating the state of the Ethereum virtual machine.
The consensus layer is described in greater detail in the \href{https://github.com/ethereum/consensus-specs}{consensus specifications}.
How the consensus layer is used to determine the canonical state of Ethereum is discussed in section \ref{ch:blocktree_to_blockchain}.

Sometimes, a path follows a new protocol from a particular height (block number).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Starting from Shanghai, hard forks are triggered by block time rather than block height.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll add some detail on how forks can be triggered

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added!

Paper.tex Outdated
@@ -404,29 +409,29 @@ \subsection{The Transaction} \label{subsec:transaction}

\subsection{The Block}\linkdest{block}\label{subsec:The_Block}

The block in Ethereum is the collection of relevant pieces of information (known as the block \textit{header}), $H$, together with information corresponding to the comprised transactions, $\mathbf{T}$,\hypertarget{ommerheaders}{} and a set of other block headers $\mathbf{U}$ that are known to have a parent equal to the present block's parent's parent (such blocks are known as \textit{ommers}\footnote{\textit{ommer} is a gender-neutral term to mean ``sibling of parent''; see \url{https://nonbinary.miraheze.org/wiki/Gender_neutral_language_in_English\#Aunt/Uncle}}). The block header contains several pieces of information:
The block in Ethereum is the collection of relevant pieces of information (known as the block \textit{header}), $H$, together with information corresponding to the comprised transactions, $\mathbf{T}$,\hypertarget{ommerheaders}{} and a now deprecated property $\mathbf{U}$ that prior to the \textit{Paris} hard fork contained headers equal to the present block's parent's parent (such blocks are known as \textit{ommers}\footnote{\textit{ommer} is a gender-neutral term to mean ``sibling of parent''; see \url{https://nonbinary.miraheze.org/wiki/Gender_neutral_language_in_English\#Aunt/Uncle}}). The block header contains several pieces of information:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not "headers equal to the present block's parent's parent", but rather "headers whose parent is equal to the present block's parent's parent"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Paper.tex Outdated

%\textit{TODO: Introduce logs}

\begin{description}
\item[parentHash]\linkdest{parent_Hash_H__p_def_words}{} The Keccak 256-bit hash of the parent block's header, in its entirety; formally $H_{\mathrm{p}}$.
\item[ommersHash] The Keccak 256-bit hash of the ommers list portion of this block; formally $H_{\mathrm{o}}$.
\item[beneficiary]\linkdest{beneficiary_H__c}{}\linkdest{H__c} The 160-bit address to which all fees collected from the successful mining of this block be transferred; formally $H_{\mathrm{c}}$.
\item[ommersHash] A 256-bit hash field that is now deprecated due the replacement of proof of work consensus. It is now to a constant, \texttt{Keccak256(RLP([]))}; formally $H_{\mathrm{o}}$.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Yellow Paper uses () for an empty list. It's a bit confusing because it also uses () for an empty string (there's a comment about this in Appendix B), but cleaning that confusion up should be done in a separate PR IMO. For now it's better to use () for an empty list for consistency sake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed here and at all uses in this section

Paper.tex Outdated
@@ -488,11 +499,11 @@ \subsubsection{Transaction Receipt}\linkdest{Transaction_Receipt}{}

\subsubsection{Holistic Validity}

\linkdest{block_validity}{}We can assert a block's validity if and only if it satisfies several conditions: it must be internally consistent with the ommer and transaction block hashes and the given transactions $B_{\mathbf{T}}$ (as specified in sec \ref{ch:finalisation}), when executed in order on the base state $\boldsymbol{\sigma}$ (derived from the final state of the parent block), result in a new state of the identity $H_{\mathrm{r}}$:
\linkdest{block_validity}{}We can assert a block's validity if and only if it satisfies several conditions: its ommers field $B_{\mathbf{U}}$ must be an empty array and it must be internally consistent with the given transactions $B_{\mathbf{T}}$ (as specified in sec \ref{ch:finalisation}), when executed in order on the base state $\boldsymbol{\sigma}$ (derived from the final state of the parent block), result in a new state of the identity $H_{\mathrm{r}}$:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unclear what "it" in "it must be internally consistent with" refers to. The ommer field? Then that's wrong. Better to replace with smth. like "header transaction hash must be internally consistent with..."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed, "it" just refers to the block here, i.e. the transactions it contains must be consistent w/ the state root, receipt roots. I'll make this more clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took a stab at making this more clear

@yperbasis yperbasis merged commit 33ce541 into ethereum:master Jan 9, 2024
1 check passed
@yperbasis yperbasis mentioned this pull request Jun 26, 2024
6 tasks
fulldecent pushed a commit to fulldecent/yellowpaper that referenced this pull request Dec 31, 2024
* incorporate Paris EIPs

* wording, and remove extra line in equation

* address comments round 1

* grammar edit

* address comments round 2

* fix typo

* fix state root calculation in the block finalization section

* fix Paris fork block number in footnote
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants