Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
508ed89d
Unverified
Commit
508ed89d
authored
Dec 22, 2023
by
Mark Tyneway
Committed by
GitHub
Dec 22, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8702 from danyalprout/flesh-out-network-upgrades
Specify L1Block + GasPriceOracle network txns
parents
a7cc839e
6d852ce3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
159 additions
and
36 deletions
+159
-36
derivation.md
specs/derivation.md
+159
-36
No files found.
specs/derivation.md
View file @
508ed89d
...
@@ -88,8 +88,13 @@
...
@@ -88,8 +88,13 @@
-
[
Deriving Payload Attributes
](
#deriving-payload-attributes
)
-
[
Deriving Payload Attributes
](
#deriving-payload-attributes
)
-
[
Deriving the Transaction List
](
#deriving-the-transaction-list
)
-
[
Deriving the Transaction List
](
#deriving-the-transaction-list
)
-
[
Network upgrade automation transactions
](
#network-upgrade-automation-transactions
)
-
[
Network upgrade automation transactions
](
#network-upgrade-automation-transactions
)
-
[
Ecotone: L1Block predeploy upgrade
](
#ecotone-l1block-predeploy-upgrade
)
-
[
Ecotone
](
#ecotone
)
-
[
Ecotone: Beacon block roots contract deployment (EIP-4788)
](
#ecotone-beacon-block-roots-contract-deployment-eip-4788
)
-
[
L1Block Deployment
](
#l1block-deployment
)
-
[
GasPriceOracle Deployment
](
#gaspriceoracle-deployment
)
-
[
L1Block Proxy Update
](
#l1block-proxy-update
)
-
[
GasPriceOracle Proxy Update
](
#gaspriceoracle-proxy-update
)
-
[
GasPriceOracle Enable Ecotone
](
#gaspriceoracle-enable-ecotone
)
-
[
Beacon block roots contract deployment (EIP-4788)
](
#beacon-block-roots-contract-deployment-eip-4788
)
-
[
Building Individual Payload Attributes
](
#building-individual-payload-attributes
)
-
[
Building Individual Payload Attributes
](
#building-individual-payload-attributes
)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
...
@@ -987,46 +992,172 @@ Some network upgrades require automated contract changes or deployments at speci
...
@@ -987,46 +992,172 @@ Some network upgrades require automated contract changes or deployments at speci
To automate these, without adding persistent changes to the execution-layer,
To automate these, without adding persistent changes to the execution-layer,
special transactions may be inserted as part of the derivation process.
special transactions may be inserted as part of the derivation process.
#### Ecotone: L1Block predeploy upgrade
#### Ecotone
The Ecotone hardfork activation block, contains the following transactions in this order:
-
L1 Attributes Transaction, using the pre-Ecotone
`setL1BlockValues`
-
User deposits from L1
-
Network Upgrade Transactions
-
L1Block deployment
-
GasPriceOracle deployment
-
Update L1Block Proxy ERC-1967 Implementation Slot
-
Update GasPriceOracle Proxy ERC-1967 Implementation Slot
-
GasPriceOracle Enable Ecotone
-
Beacon block roots contract deployment (EIP-4788)
To not modify or interrupt the system behavior around gas computation, this block will not include any sequenced
transactions by setting
`noTxPool: true`
.
##### L1Block Deployment
The
`L1Block`
contract is upgraded to process the new Ecotone L1-data-fee parameters and L1 blob base-fee.
The
`L1Block`
contract is upgraded to process the new Ecotone L1-data-fee parameters and L1 blob base-fee.
The
`L1Block`
is called in the very first transaction of the block,
A deposit transaction is derived with the following attributes:
and parsed to retrieve the L1 block attributes.
-
`from`
:
`0x4210000000000000000000000000000000000000`
-
`to`
:
`null`
,
-
`mint`
:
`0`
-
`value`
:
`0`
-
`gasLimit`
:
`300,000`
(TBC)
-
`data`
: L1Block deploy bytecode (TBC when PR for contracts is merged)
-
`sourceHash`
:
`0x877a6077205782ea15a6dc8699fa5ebcec5e0f4389f09cb8eda09488231346f8`
,
computed with the "Upgrade-deposited" type, with
`intent = "Ecotone: L1 Block Deployment"
This results in the Ecotone L1Block contract being deployed to `
0x07dbe8500fc591d1852B76feE44d5a05e13097Ff
`, to verify:
```bash
cast compute-address --nonce=0 0x4210000000000000000000000000000000000000
Computed Address: 0x07dbe8500fc591d1852B76feE44d5a05e13097Ff
```
Verify `
sourceHash
`:
```bash
cast keccak $(cast concat-hex 0x0000000000000000000000000000000000000000000000000000000000000002 $(cast keccak "Ecotone: L1 Block Deployment"))
# 0x877a6077205782ea15a6dc8699fa5ebcec5e0f4389f09cb8eda09488231346f8
```
##### GasPriceOracle Deployment
The `
GasPriceOracle
` contract is upgraded to support the new Ecotone L1-data-fee parameters. Post fork this contract
will use the blob base fee to compute the gas price for L1-data-fee transactions.
A deposit transaction is derived with the following attributes:
- `
from
`: `
0x4210000000000000000000000000000000000001
`
- `
to
`: `
null
`,
- `
mint
`: `
0
`
- `
value
`: `
0
`
- `
gasLimit
`: `
500,000
` (TBC)
- `
data
`: GasPriceOracle deploy bytecode (TBC when PR for contracts is merged)
- `
sourceHash
`: `
0xa312b4510adf943510f05fcc8f15f86995a5066bd83ce11384688ae20e6ecf42
`
computed with the "Upgrade-deposited" type, with `
intent = "Ecotone: Gas Price Oracle Deployment"
This results in the Ecotone GasPriceOracle contract being deployed to
`0xb528D11cC114E026F138fE568744c6D45ce6Da7A`
,
to verify:
```
bash
cast compute-address
--nonce
=
0 0x4210000000000000000000000000000000000001
Computed Address: 0xb528D11cC114E026F138fE568744c6D45ce6Da7A
```
Verify
`sourceHash`
:
```
bash
❯ cast keccak
$(
cast concat-hex 0x0000000000000000000000000000000000000000000000000000000000000002
$(
cast keccak
"Ecotone: Gas Price Oracle Deployment"
))
# 0xa312b4510adf943510f05fcc8f15f86995a5066bd83ce11384688ae20e6ecf42
```
##### L1Block Proxy Update
This transaction updates the L1Block Proxy ERC-1967 implementation slot to point to the new L1Block deployment.
To not modify or interrupt the above system transaction behavior,
A deposit transaction is derived with the following attributes:
the
`L1Block`
contract upgrade is executed in the last block
*before*
the scheduled update.
-
`from`
:
`0x0000000000000000000000000000000000000000`
-
`to`
:
`0x4200000000000000000000000000000000000015`
(L1Block Proxy)
-
`mint`
:
`0`
-
`value`
:
`0`
-
`gasLimit`
:
`200,000`
(TBC)
-
`data`
:
`0x3659cfe600000000000000000000000007dbe8500fc591d1852b76fee44d5a05e13097ff`
-
`sourceHash`
:
`0x18acb38c5ff1c238a7460ebc1b421fa49ec4874bdf1e0a530d234104e5e67dbc`
computed with the "Upgrade-deposited" type, with
`intent = "Ecotone: L1 Block Proxy Update"
Verify data:
```bash
cast concat-hex $(cast sig "upgradeTo(address)") $(cast abi-encode "upgradeTo(address)" 0x07dbe8500fc591d1852B76feE44d5a05e13097Ff)
0x3659cfe600000000000000000000000007dbe8500fc591d1852b76fee44d5a05e13097ff
```
Verify `
sourceHash
`:
```bash
cast keccak $(cast concat-hex 0x0000000000000000000000000000000000000000000000000000000000000002 $(cast keccak "Ecotone: L1 Block Proxy Update"))
# 0x18acb38c5ff1c238a7460ebc1b421fa49ec4874bdf1e0a530d234104e5e67dbc
```
##### GasPriceOracle Proxy Update
This transaction updates the GasPriceOracle Proxy ERC-1967 implementation slot to point to the new GasPriceOracle
deployment.
A deposit transaction is derived with the following attributes:
A deposit transaction is derived with the following attributes:
-
`from`
:
`
ProxyAdmin`
owner
- `
from
`: `
0x0000000000000000000000000000000000000000
`
-
`to`
:
TBD (depending on multi-call approach
)
- `
to
`:
`
0x420000000000000000000000000000000000000F
` (Gas Price Oracle Proxy
)
- `
mint
`: `
0
`
- `
mint
`: `
0
`
- `
value
`: `
0
`
- `
value
`: `
0
`
-
`gasLimit`
: gas limit TBD
- `
gasLimit
`: `
200,000
` (TBC)
-
`isCreation`
:
`false`
- `
data
`: `
0x3659cfe6000000000000000000000000b528d11cc114e026f138fe568744c6d45ce6da7a
`
-
`data`
: bytecode TBD, a multi-call:
- `
sourceHash
`: `
0xee4f9385eceef498af0be7ec5862229f426dec41c8d42397c7257a5117d9230a
`
-
deploy new contract implementation
computed with the "Upgrade-deposited" type, with `
intent = "Ecotone: Gas Price Oracle Proxy Update"
`
-
upgrade of
`L1Block`
through
`ProxyAdmin`
-
`sourceHash`
:
`0x7dc74874297a8937186fdbec57ad344647a522de456088557e5fdeda88f66ddd`
,
Verify data:
computed with the "Upgrade-deposited" type, with
`intent = "Ecotone: L1Block upgrade"`
```bash
cast concat-hex $(cast sig "upgradeTo(address)") $(cast abi-encode "upgradeTo(address)" 0xb528D11cC114E026F138fE568744c6D45ce6Da7A)
0x3659cfe6000000000000000000000000b528d11cc114e026f138fe568744c6d45ce6da7a
```
Verify `
sourceHash
`:
Verify `
sourceHash
`:
```bash
```bash
# compute intent hash:
cast keccak $(cast concat-hex 0x0000000000000000000000000000000000000000000000000000000000000002 $(cast keccak "Ecotone: Gas Price Oracle Proxy Update"))
cast keccak
"Ecotone: L1Block upgrade"
# 0xee4f9385eceef498af0be7ec5862229f426dec41c8d42397c7257a5117d9230a
# 0xaf2b20ee05be9fc3f0712050591a5f8988f94b56cdf48842863a773b76634fde
```
##### GasPriceOracle Enable Ecotone
This transaction informs the GasPriceOracle to start using the Ecotone gas calculation formula.
A deposit transaction is derived with the following attributes:
- `
from
`: `
0xDeaDDEaDDeAdDeAdDEAdDEaddeAddEAdDEAd0001
` (Depositer Account)
- `
to
`: `
0x420000000000000000000000000000000000000F
` (Gas Price Oracle Proxy)
- `
mint
`: `
0
`
- `
value
`: `
0
`
- `
gasLimit
`: `
1,000,000
` (TBC)
- `
data
`: `
0x22b90ab3
`
- `
sourceHash
`: `
0xee4f9385eceef498af0be7ec5862229f426dec41c8d42397c7257a5117d9230a
`,
computed with the "Upgrade-deposited" type, with `
intent = "Ecotone: Gas Price Oracle Proxy Update"
`
# source hash type:
Verify data:
# 0x0000000000000000000000000000000000000000000000000000000000000002
# compute source hash:
```bash
cast keccak 0x0000000000000000000000000000000000000000000000000000000000000002831b745c7397f93704ae55eb0100bf3c56fe9e304d3f21c1a93ec25f736fea26
cast sig "setEcotone()"
# 0x7dc74874297a8937186fdbec57ad344647a522de456088557e5fdeda88f66ddd
0x22b90ab3
```
Verify `
sourceHash
`:
```bash
cast keccak $(cast concat-hex 0x0000000000000000000000000000000000000000000000000000000000000002 $(cast keccak "Ecotone: Gas Price Oracle Proxy Update"))
# 0xee4f9385eceef498af0be7ec5862229f426dec41c8d42397c7257a5117d9230a
```
```
####
Ecotone:
Beacon block roots contract deployment (EIP-4788)
####
#
Beacon block roots contract deployment (EIP-4788)
[EIP-4788] introduces a "Beacon block roots" contract, that processes and exposes the beacon-block-root values.
[EIP-4788] introduces a "Beacon block roots" contract, that processes and exposes the beacon-block-root values.
at address `
BEACON_ROOTS_ADDRESS = 0x000F3df6D732807Ef1319fB7B8bB8522d0Beac02
`.
at address `
BEACON_ROOTS_ADDRESS = 0x000F3df6D732807Ef1319fB7B8bB8522d0Beac02
`.
...
@@ -1053,7 +1184,7 @@ A Deposit transaction is derived with the following attributes:
...
@@ -1053,7 +1184,7 @@ A Deposit transaction is derived with the following attributes:
- `
data
`:
- `
data
`:
`
0x60618060095f395ff33373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500
`
`
0x60618060095f395ff33373fffffffffffffffffffffffffffffffffffffffe14604d57602036146024575f5ffd5b5f35801560495762001fff810690815414603c575f5ffd5b62001fff01545f5260205ff35b5f5ffd5b62001fff42064281555f359062001fff015500
`
- `
isSystemTx
`: `
false
`, as per the Regolith upgrade, even the system-generated transactions spend gas.
- `
isSystemTx
`: `
false
`, as per the Regolith upgrade, even the system-generated transactions spend gas.
-
`sourceHash`
:
`0x
fbcd78e2e9665570c3f73026d601053af3892bdd06292d7eaf3adf4a1ee1392f
`
,
- `
sourceHash
`: `
0x
69b763c48478b9dc2f65ada09b3d92133ec592ea715ec65ad6e7f3dc519dc00c
`,
computed with the "Upgrade-deposited" type, with `
intent = "Ecotone: beacon block roots contract deployment"
`
computed with the "Upgrade-deposited" type, with `
intent = "Ecotone: beacon block roots contract deployment"
`
The contract address upon deployment is computed as `
rlp(
[
sender, nonce
]
)
`, which will equal:
The contract address upon deployment is computed as `
rlp(
[
sender, nonce
]
)
`, which will equal:
...
@@ -1072,16 +1203,8 @@ cast compute-address --nonce=0 0x0B799C86a49DEeb90402691F1041aa3AF2d3C875
...
@@ -1072,16 +1203,8 @@ cast compute-address --nonce=0 0x0B799C86a49DEeb90402691F1041aa3AF2d3C875
Verify `
sourceHash
`:
Verify `
sourceHash
`:
```bash
```bash
# compute intent hash:
cast keccak $(cast concat-hex 0x0000000000000000000000000000000000000000000000000000000000000002 $(cast keccak "Ecotone: beacon block roots contract deployment"))
cast keccak
"Ecotone: beacon block roots contract deployment"
# 0x69b763c48478b9dc2f65ada09b3d92133ec592ea715ec65ad6e7f3dc519dc00c
# 0xab0dfc96b47739a0ae1d415bbfaae79ebb1111861a3b7cfbbaa6ca4a9e618357
# source hash type:
# 0x0000000000000000000000000000000000000000000000000000000000000002
# compute source hash:
cast keccak 0x0000000000000000000000000000000000000000000000000000000000000002ab0dfc96b47739a0ae1d415bbfaae79ebb1111861a3b7cfbbaa6ca4a9e618357
0x69b763c48478b9dc2f65ada09b3d92133ec592ea715ec65ad6e7f3dc519dc00c
```
```
[EIP-4788]: https://eips.ethereum.org/EIPS/eip-4788
[EIP-4788]: https://eips.ethereum.org/EIPS/eip-4788
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment