-
Notifications
You must be signed in to change notification settings - Fork 522
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
Shanghai Update #906
Shanghai Update #906
Conversation
Bump @yperbasis @timbeiko |
Currently I don't have the capacity to review this PR unfortunately :( |
@yperbasis |
@pldespaigne not a maintainer, nor fully up to date with all the protocol changes, contributed (small) changes years ago. However, the work you are doing is interesting, if it's helpful I can spend a spike next week to review and provide feedback. |
That would be awesome 🙏 |
&&&& is too low to fulfil the value transfer); and otherwise $x=\mathtt{ADDR}(I_{\mathrm{a}}, \boldsymbol{\sigma}[I_{\mathrm{a}}]_{\mathrm{n}}, \zeta, \mathbf{i} )$, the\\ | ||
&&&& address of the newly created account (\ref{eq:new-address}). \\ | ||
&&&& where $x=0$ if $z = 0$, i.e., the \hyperlink{contract_creation_result}{contract creation process failed},\\ | ||
&&&& or $\lVert \mathbf{i} \rVert > 49152$ (initcode is longer than 49152 bytes),\\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Observation rather than a proposed change: realised that MAX_CODE_SIZE
=24576
and 2*24576=49152
is not defined anywhere in the paper, hence the semantic is lost, if there is a section anywhere in the paper then it could go there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Soundness of |
Thanks a lot for your feedbacks @alexprut 🙏 |
@nicksavers @pirapira Any time on your side to have a look at this? |
More than happy to be helpful, thanks for updating the YP. |
Paper.tex
Outdated
@@ -1365,10 +1404,27 @@ \section{Block Finalisation} \label{ch:finalisation} | |||
The process of finalising a block involves two stages: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 stages now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes in aac8e1c
@@ -1365,10 +1404,27 @@ \section{Block Finalisation} \label{ch:finalisation} | |||
The process of finalising a block involves two stages: | |||
|
|||
\begin{enumerate} | |||
\item executing withdrawals; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding is that validate transactions
precede executing withdrawals
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question! The EIP only states that it should happen after transaction execution but it says nothing about where it should happen during block finalization.
The transaction validation step purpose in the YP is simply meant to set the block header's gas used value (
Paper.tex
Outdated
\item validate transactions; | ||
\item verify state. | ||
\end{enumerate} | ||
|
||
\subsection{Executing Withdrawals} | ||
After processing the block's transactions, the withdrawals are executed. A withdrawal is simply an increase of the recipient account's balance of the specified amount. No other balances are decreased, a withdrawal is not a transfer but a creation of funds. | ||
A withdrawal operation cannot fail and has no gas cost. We define the function $P$ as the withdrawal state transition function: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, not necessarily an issue, function P
is already defined in the paper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! It's actually a big issue here, since state validation function
I'll update the withdrawal state transition function
as
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes in aac8e1c
Paper.tex
Outdated
\linkdest{selfdestruct}{}0xff & {\small SELFDESTRUCT} & 1 & 0 & Halt execution and register account for later deletion. \\ | ||
\linkdest{selfdestruct}{}0xff & {\small SELFDESTRUCT} & 1 & 0 & Halt execution and register account for later deletion. Readers should be warned, \\ | ||
&&&& since the \textit{Shanghai} update, this opcode has been marked as deprecated. \\ | ||
&&&& Its behavior might be subject to change in an upcoming update. \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggesting adding that it may be subject "to breaking changes"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes in 22c2ca5
Paper.tex
Outdated
Because the Beacon Chain generate a new slot every 12 seconds, post-\textit{Paris} updates can be scheduled to occur at a specific timestamp. | ||
At the execution layer, the update will then happen in the first produced block after the scheduled timestamp. | ||
For example the \textit{Shanghai} hard fork was scheduled to occur at 2023-04-12 10:27:35 UTC, on Epoch 194,048. | ||
Validators failed to propose a block during the two first slots of this Epoch, but at slot 6,209,538 a validator finally proposed a the block 17,034,870, marking the transition to \textit{Shanghai} on the execution layer. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
proposed a the block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes in 878ee5b
@@ -203,6 +203,7 @@ \subsection{Which History?} | |||
$F_{\mathrm{Arrow Glacier}}$ & 13773000 \\ | |||
$F_{\mathrm{Gray Glacier}}$ & 15050000 \\ | |||
$F_{\mathrm{Paris}}$ & 15537394 \\ | |||
$F_{\mathrm{Shanghai}}$ & 17034870 \\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of scope of this PR, was thinking if going forward there should be another column besides Block Number
, e.g. Timestamp
or whatever will be the canonical trigger.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good idea imo!
Left small comments, changes for |
Thanks again for your time @alexprut 🙏 @yperbasis how many approvals would be required for you to be comfortable in merging this PR? |
Sorry guys, I was on holiday and next week I'll be at a workshop. I'll take a look during the week starting from 24 June. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also update BRANCHES.md & README.md (see how it was done in PR #894 for Paris).
Meanwhile I've created branch |
I've rebased the PR with latest changes from Let me know if I can do anything else! |
Thanks a lot for your time @yperbasis! |
Thank you! It's easier for me to review eip by eip. |
Alright, I'll do it eip by eip then! |
@pldespaigne If helpful, volunteering on providing feedback for the Cancun PRs, just tag me. |
Thanks a lot 🙏 |
I've re-run the job and https://ethereum.github.io/yellowpaper/paper.pdf seems to be fine now. |
* eip-3651 * eip-3855 * eip-3860 * eip-4895 * eip-6049 * shanghai * eip-3651-alexprut-review * eip-3860-alexprut-review * eip-4895-alexprut-review * eip-6049-alexprut-review * shanghai-alexprut-review * update README.md & BRANCHES.md
Update the Yellow Paper from the Paris hard-fork to the Shanghai hard-fork.
Here is the current pdf version of the Yellow Paper for this PR.
EIP-3651: Warm COINBASE
View Screenshot Diff
EIP-3855: PUSH0 instruction
View Screenshot Diff
EIP-3860: Limit and meter initcode
View Screenshot Diff
EIP-4895: Beacon chain push withdrawals as operations
View Screenshot Diff
EIP-6049: Deprecate SELFDESTRUCT
View Screenshot Diff
General Updates
View Screenshot Diff