From c5f087eebd8706aa1031f7103745fa1e1691bd4d Mon Sep 17 00:00:00 2001 From: Michael de Hoog Date: Fri, 2 Feb 2024 09:08:07 -1000 Subject: [PATCH 1/5] Add specs for the FastLZ change Co-authored-by: Michael de Hoog Co-authored-by: Yukai Tu Co-authored-by: Sebastian Stammler --- specs/fjord/derivation.md | 119 ++++++++++++++++++ specs/fjord/exec-engine.md | 79 ++++++++++++ specs/fjord/overview.md | 3 + specs/fjord/predeploys.md | 76 +++++++++++ specs/protocol/derivation.md | 2 +- specs/protocol/predeploys.md | 4 +- .../fjord-gas-price-oracle-deployment.txt | 1 + 7 files changed, 281 insertions(+), 3 deletions(-) create mode 100644 specs/fjord/exec-engine.md create mode 100644 specs/fjord/predeploys.md create mode 100644 specs/static/bytecode/fjord-gas-price-oracle-deployment.txt diff --git a/specs/fjord/derivation.md b/specs/fjord/derivation.md index 4bbc09ff4..ce56c5deb 100644 --- a/specs/fjord/derivation.md +++ b/specs/fjord/derivation.md @@ -13,6 +13,10 @@ - [Rationale](#rationale-1) - [Security Considerations](#security-considerations-1) - [Brotli Channel Compression](#brotli-channel-compression) +- [Network upgrade automation transactions](#network-upgrade-automation-transactions) + - [GasPriceOracle Deployment](#gaspriceoracle-deployment) + - [GasPriceOracle Proxy Update](#gaspriceoracle-proxy-update) + - [GasPriceOracle Enable Fjord](#gaspriceoracle-enable-fjord) @@ -137,3 +141,118 @@ Brotli compression algorithm (as specified in [RFC-7932][rfc7932]) with no custo [rfc7932]: https://datatracker.ietf.org/doc/html/rfc7932 [rfc1950]: https://www.rfc-editor.org/rfc/rfc1950.html + +# Network upgrade automation transactions + +The Fjord hardfork activation block contains the following transactions, in this order: + +- L1 Attributes Transaction +- User deposits from L1 +- Network Upgrade Transactions + - GasPriceOracle deployment + - Update GasPriceOracle Proxy ERC-1967 Implementation Slot + - GasPriceOracle Enable Fjord + +To not modify or interrupt the system behavior around gas computation, this block will not include any sequenced +transactions by setting `noTxPool: true`. + +## GasPriceOracle Deployment + +The `GasPriceOracle` contract is upgraded to support the new Fjord L1 data fee computation. Post fork this contract +will use FastLZ to compute the L1 data fee. + +To perform this upgrade, a deposit transaction is derived with the following attributes: + +- `from`: `0x4210000000000000000000000000000000000002` +- `to`: `null`, +- `mint`: `0` +- `value`: `0` +- `gasLimit`: `1,450,000` +- `data`: `0x60806040523...` ([full bytecode](../static/bytecode/fjord-gas-price-oracle-deployment.txt)) +- `sourceHash`: `0x86122c533fdcb89b16d8713174625e44578a89751d96c098ec19ab40a51a8ea3` + computed with the "Upgrade-deposited" type, with `intent = "Fjord: Gas Price Oracle Deployment" + +This results in the Fjord GasPriceOracle contract being deployed to `0xa919894851548179A0750865e7974DA599C0Fac7`, +to verify: + +```bash +cast compute-address --nonce=0 0x4210000000000000000000000000000000000002 +Computed Address: 0xa919894851548179A0750865e7974DA599C0Fac7 +``` + +Verify `sourceHash`: + +```bash +cast keccak $(cast concat-hex 0x0000000000000000000000000000000000000000000000000000000000000002 $(cast keccak "Fjord: Gas Price Oracle Deployment")) +# 0x86122c533fdcb89b16d8713174625e44578a89751d96c098ec19ab40a51a8ea3 +``` + +Verify `data`: + +```bash +git checkout fbdba16ce5fe0207ceeb8487d762807888aa43f5 (update once merged) +pnpm clean && pnpm install && pnpm build +jq -r ".bytecode.object" packages/contracts-bedrock/forge-artifacts/GasPriceOracle.sol/GasPriceOracle.json +``` + +This transaction MUST deploy a contract with the following code hash +`0x58e192326ee67ed52b7add91e4640024cbd1b21528a0ff1e1d21b7ca54e3ee62`. + +## 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: + +- `from`: `0x0000000000000000000000000000000000000000` +- `to`: `0x420000000000000000000000000000000000000F` (Gas Price Oracle Proxy) +- `mint`: `0` +- `value`: `0` +- `gasLimit`: `50,000` +- `data`: `0x3659cfe6000000000000000000000000a919894851548179a0750865e7974da599c0fac7` +- `sourceHash`: `0x1e6bb0c28bfab3dc9b36ffb0f721f00d6937f33577606325692db0965a7d58c6` + computed with the "Upgrade-deposited" type, with `intent = "Fjord: Gas Price Oracle Proxy Update"` + +Verify data: + +```bash +cast concat-hex $(cast sig "upgradeTo(address)") $(cast abi-encode "upgradeTo(address)" 0xa919894851548179A0750865e7974DA599C0Fac7) +# 0x3659cfe6000000000000000000000000a919894851548179a0750865e7974da599c0fac7 +``` + +Verify `sourceHash`: + +```bash +cast keccak $(cast concat-hex 0x0000000000000000000000000000000000000000000000000000000000000002 $(cast keccak "Fjord: Gas Price Oracle Proxy Update")) +# 0x1e6bb0c28bfab3dc9b36ffb0f721f00d6937f33577606325692db0965a7d58c6 +``` + +## GasPriceOracle Enable Fjord + +This transaction informs the GasPriceOracle to start using the Fjord 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`: `90,000` +- `data`: `0x8e98b106` +- `sourceHash`: `0xbac7bb0d5961cad209a345408b0280a0d4686b1b20665e1b0f9cdafd73b19b6b`, + computed with the "Upgrade-deposited" type, with `intent = "Fjord: Gas Price Oracle Set Fjord" + +Verify data: + +```bash +cast sig "setFjord()" +0x8e98b106 +``` + +Verify `sourceHash`: + +```bash +cast keccak $(cast concat-hex 0x0000000000000000000000000000000000000000000000000000000000000002 $(cast keccak "Fjord: Gas Price Oracle Set Fjord")) +# 0xbac7bb0d5961cad209a345408b0280a0d4686b1b20665e1b0f9cdafd73b19b6b +``` diff --git a/specs/fjord/exec-engine.md b/specs/fjord/exec-engine.md new file mode 100644 index 000000000..ed664b40f --- /dev/null +++ b/specs/fjord/exec-engine.md @@ -0,0 +1,79 @@ +# L2 Execution Engine + + + +**Table of Contents** + +- [Fees](#fees) + - [L1-Cost fees (L1 Fee Vault)](#l1-cost-fees-l1-fee-vault) + - [Fjord L1-Cost fee changes (FastLZ estimator)](#fjord-l1-cost-fee-changes-fastlz-estimator) + - [FastLZ Implementation](#fastlz-implementation) + - [L1-Cost linear regression details](#l1-cost-linear-regression-details) + - [L1 Gas Usage Estimation](#l1-gas-usage-estimation) + + + +## Fees + +### L1-Cost fees (L1 Fee Vault) + +#### Fjord L1-Cost fee changes (FastLZ estimator) + +Fjord updates the L1 cost calculation function to use a FastLZ-based compression estimator. +The L1 cost is computed as: + +```pseudocode +l1FeeScaled = baseFeeScalar*l1BaseFee*16 + blobFeeScalar*l1BlobBaseFee +estimatedSize = max(minTransactionSize, intercept + fastlzCoef*fastlzSize) +l1Cost = estimatedSize * l1FeeScaled / 1e12 +``` + +The final `l1Cost` computation is an unlimited precision unsigned integer computation, with the result in Wei and +having `uint256` range. The values in this computation, are as follows: + +| Input arg | Type | Description | Value | +|----------------------|-----------|-------------------------------------------------------------------|--------------------------| +| `l1BaseFee` | `uint256` | L1 base fee of the latest L1 origin registered in the L2 chain | varies, L1 fee | +| `l1BlobBaseFee` | `uint256` | Blob gas price of the latest L1 origin registered in the L2 chain | varies, L1 fee | +| `fastlzSize` | `uint256` | Size of the FastLZ-compressed RLP-encoded signed tx | varies, per transaction | +| `baseFeeScalar` | `uint32` | L1 base fee scalar, scaled by `1e6` | varies, L2 configuration | +| `blobFeeScalar` | `uint32` | L1 blob fee scalar, scaled by `1e6` | varies, L2 configuration | +| `intercept` | `int32` | Intercept constant, scaled by `1e6` (can be negative) | -42_585_600 | +| `fastlzCoef` | `uint32` | FastLZ coefficient, scaled by `1e6` | 836_500 | +| `minTransactionSize` | `uint32` | A lower bound on transaction size, in bytes | 100 | + +Previously, `baseFeeScalar` and `blobFeeScalar` were used to encode the compression ratio, due to the inaccuracy of +the L1 cost function. However, the new cost function takes into account the compression ratio, so these scalars should +be adjusted to account for any previous compression ratio they encoded. + +##### FastLZ Implementation + +All compression algorithms must be implemented equivalently to the `fastlz_compress` function in `fastlz.c` at the +following [commit](https://github.com/ariya/FastLZ/blob/344eb4025f9ae866ebf7a2ec48850f7113a97a42/fastlz.c#L482-L506). + +##### L1-Cost linear regression details + +The `intercept` and `fastlzCoef` constants are calculated by linear regression using a dataset +of previous L2 transactions. The dataset is generated by iterating over all transactions in a given time range, and +performing the following actions. For each transaction: + +1. Compress the payload using FastLZ. Record the size of the compressed payload as `fastlzSize`. +2. Emulate the change in batch size adding the transaction to a batch, compressed with Brotli 10. Record the change in + batch size as `bestEstimateSize`. + +Once this dataset is generated, a linear regression can be calculated using the `bestEstimateSize` as +the dependent variable and `fastlzSize` as the independent variable. + +We generated a dataset from two weeks of post-Ecotone transactions on Optimism Mainnet, as we found that was +the most representative of performance across multiple chains and time periods. More details on the linear regression +and datasets used can be found in this [repository](https://github.com/roberto-bayardo/compression-analysis/tree/main). + +### L1 Gas Usage Estimation + +The `L1GasUsed` property on the transaction receipt is updated to take into account the improvement in +[compression estimation](./exec-engine.md#fees) accuracy. The value will be calculated by +multiplying the `estimatedSize` of the transaction from the above L1 cost formula by 16. The value of 16 assumes most +of the bytes in the compressed data are non-zero. + +The `L1GasUsed` property will be deprecated due to it not accurately calculating the L1 gas used +by a transaction. Users can continue to use the `L1Fee` field to retrieve the L1 fee for a given transaction. diff --git a/specs/fjord/overview.md b/specs/fjord/overview.md index 94f895462..a3d718a95 100644 --- a/specs/fjord/overview.md +++ b/specs/fjord/overview.md @@ -14,6 +14,9 @@ This document is not finalized and should be considered experimental. ## Execution Layer - [RIP-7212: Precompile for secp256r1 Curve Support](https://github.com/ethereum/RIPs/blob/master/RIPS/rip-7212.md) +- [FastLZ compression for L1 data fee calculation](./exec-engine.md#fees) +- [Deprecate the `getL1GasUsed` method on the `GasPriceOracle` contract](./predeploys.md#l1-gas-usage-estimation) +- [Deprecate the `L1GasUsed` field on the transaction receipt](./exec-engine.md#l1-gas-usage-estimation) ## Consensus Layer diff --git a/specs/fjord/predeploys.md b/specs/fjord/predeploys.md new file mode 100644 index 000000000..e4cb661f3 --- /dev/null +++ b/specs/fjord/predeploys.md @@ -0,0 +1,76 @@ +# Predeploys + + + +**Table of Contents** + +- [GasPriceOracle](#gaspriceoracle) + - [L1 Gas Usage Estimation](#l1-gas-usage-estimation) + + + +## GasPriceOracle + +Following the Fjord upgrade, three additional values used for L1 fee computation are: + +- costIntercept +- costFastlzCoef +- minTransactionSize + +These values are hard-coded constants in the `GasPriceOracle` contract. The +calculation follows the same formula outlined in the +[Fjord L1-Cost fee changes (FastLZ estimator)](./exec-engine.md#fjord-l1-cost-fee-changes-fastlz-estimator) +section. + +A new method is introduced: `getL1FeeUpperBound(uint256)`. This method returns an upper bound for the L1 fee +for a given transaction size. It is provided for callers who wish to estimate L1 transaction costs in the +write path, and is much more gas efficient than `getL1Fee`. + +The upper limit overhead is assumed to be `original/255+16`, borrowed from LZ4. According to historical data, this +approach can encompass more than 99.99% of transactions. + +This is implemented as follows: + +```solidity +function getL1FeeUpperBound(uint256 unsignedTxSize) external view returns (uint256) { + // txSize / 255 + 16 is the pratical fastlz upper-bound covers 99.99% txs. + // Add 68 to account for unsigned tx + int256 flzUpperBound = int256(unsignedTxSize) + int256(unsignedTxSize) / 255 + 16 + 68; + + int256 estimatedSize = costIntercept + costFastlzCoef * flzUpperBound; + if (estimatedSize < minTransactionSize) { + estimatedSize = minTransactionSize; + } + + uint256 l1FeeScaled = baseFeeScalar() * l1BaseFee() * 16 + blobBaseFeeScalar() * blobBaseFee(); + return uint256(estimatedSize) * feeScaled / (10 ** (DECIMALS * 2)); +} +``` + +### L1 Gas Usage Estimation + +The `getL1GasUsed` method is updated to take into account the improved [compression estimation](./exec-engine.md#fees) +accuracy as part of the Fjord upgrade. + +```solidity +function getL1GasUsed(bytes memory _data) public view returns (uint256) { + if (isFjord) { + // Add 68 to the size to account for the unsigned tx + int256 flzSize = LibZip.flzCompress(_data).length + 68; + + int256 estimatedSize = costIntercept + costFastlzCoef * flzSize; + if (estimatedSize < minTransactionSize) { + estimatedSize = minTransactionSize; + } + + // Assume the compressed data is mostly non-zero, and would pay 16 gas per calldata byte + return estimatedSize * 16; + } + // ... +} +``` + +The `getL1GasUsed` method will be deprecated. This is due to it not accurately estimating the +L1 gas used, for a transaction. + +Users can continue to use the `getL1FeeUpperBound` or `getL1Fee` method to estimate the L1 fee for a given transaction. diff --git a/specs/protocol/derivation.md b/specs/protocol/derivation.md index 2db0d3d47..3d5ca6119 100644 --- a/specs/protocol/derivation.md +++ b/specs/protocol/derivation.md @@ -1040,7 +1040,7 @@ special transactions may be inserted as part of the derivation process. #### Ecotone -The Ecotone hardfork activation block, contains the following transactions in this order: +The Ecotone hardfork activation block contains the following transactions, in this order: - L1 Attributes Transaction, using the pre-Ecotone `setL1BlockValues` - User deposits from L1 diff --git a/specs/protocol/predeploys.md b/specs/protocol/predeploys.md index da83b5349..3bedd150b 100644 --- a/specs/protocol/predeploys.md +++ b/specs/protocol/predeploys.md @@ -242,8 +242,8 @@ has been hardcoded to 6. Following the Ecotone upgrade, the values used for L1 fee computation are: -- l1BaseFeeScalar -- l1BlobBaseFeeScalar +- baseFeeScalar +- blobBaseFeeScalar - decimals [ecotone-scalars]: system_config.md#ecotone-scalar-overhead-uint256uint256-change diff --git a/specs/static/bytecode/fjord-gas-price-oracle-deployment.txt b/specs/static/bytecode/fjord-gas-price-oracle-deployment.txt new file mode 100644 index 000000000..700a3fcef --- /dev/null +++ b/specs/static/bytecode/fjord-gas-price-oracle-deployment.txt @@ -0,0 +1 @@ +0x608060405234801561001057600080fd5b50611951806100206000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c80636ef25c3a116100b2578063de26c4a111610081578063f45e65d811610066578063f45e65d81461025b578063f820614014610263578063fe173b971461020d57600080fd5b8063de26c4a114610235578063f1c7a58b1461024857600080fd5b80636ef25c3a1461020d5780638e98b10614610213578063960e3a231461021b578063c59859181461022d57600080fd5b806349948e0e11610109578063519b4bd3116100ee578063519b4bd31461019f57806354fd4d50146101a757806368d5dca6146101f057600080fd5b806349948e0e1461016f5780634ef6e2241461018257600080fd5b80630c18c1621461013b57806322b90ab3146101565780632e0f262514610160578063313ce56714610168575b600080fd5b61014361026b565b6040519081526020015b60405180910390f35b61015e61038c565b005b610143600681565b6006610143565b61014361017d3660046113c6565b6105af565b60005461018f9060ff1681565b604051901515815260200161014d565b610143610600565b6101e36040518060400160405280600581526020017f312e332e3000000000000000000000000000000000000000000000000000000081525081565b60405161014d9190611495565b6101f8610661565b60405163ffffffff909116815260200161014d565b48610143565b61015e6106e6565b60005461018f90610100900460ff1681565b6101f861097a565b6101436102433660046113c6565b6109db565b610143610256366004611508565b610ad5565b610143610ba5565b610143610c98565b6000805460ff1615610304576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f47617350726963654f7261636c653a206f76657268656164282920697320646560448201527f707265636174656400000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103879190611521565b905090565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663e591b2826040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040f919061153a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f47617350726963654f7261636c653a206f6e6c7920746865206465706f73697460448201527f6f72206163636f756e742063616e2073657420697345636f746f6e6520666c6160648201527f6700000000000000000000000000000000000000000000000000000000000000608482015260a4016102fb565b60005460ff1615610582576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a2045636f746f6e6520616c72656164792060448201527f616374697665000000000000000000000000000000000000000000000000000060648201526084016102fb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60008054610100900460ff16156105e3576105dd6105cc83610cf9565b516105d890604461159f565b61101e565b92915050565b60005460ff16156105f7576105dd826110b0565b6105dd82611154565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16635cf249696040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff166368d5dca66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106c2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038791906115b7565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663e591b2826040518163ffffffff1660e01b8152600401602060405180830381865afa158015610745573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610769919061153a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610823576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f47617350726963654f7261636c653a206f6e6c7920746865206465706f73697460448201527f6f72206163636f756e742063616e20736574206973466a6f726420666c61670060648201526084016102fb565b60005460ff166108b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f47617350726963654f7261636c653a20466a6f72642063616e206f6e6c79206260448201527f65206163746976617465642061667465722045636f746f6e650000000000000060648201526084016102fb565b600054610100900460ff161561094c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f47617350726963654f7261636c653a20466a6f726420616c726561647920616360448201527f746976650000000000000000000000000000000000000000000000000000000060648201526084016102fb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663c59859186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106c2573d6000803e3d6000fd5b60008054610100900460ff1615610a2257620f4240610a0d6109fc84610cf9565b51610a0890604461159f565b6112a8565b610a189060106115dd565b6105dd919061161a565b6000610a2d83611307565b60005490915060ff1615610a415792915050565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac49190611521565b610ace908261159f565b9392505050565b60008054610100900460ff16610b6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f47617350726963654f7261636c653a206765744c314665655570706572426f7560448201527f6e64206f6e6c7920737570706f72747320466a6f72640000000000000000000060648201526084016102fb565b6000610b7a60ff8461161a565b610b84908461159f565b610b8f90601061159f565b610b9a90604461159f565b9050610ace8161101e565b6000805460ff1615610c39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a207363616c61722829206973206465707260448201527f656361746564000000000000000000000000000000000000000000000000000060648201526084016102fb565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663f82061406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b6060610e90565b818153600101919050565b600082840393505b83811015610ace5782810151828201511860001a1590930292600101610d13565b825b60208210610d80578251610d4b601f83610d00565b52602092909201917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090910190602101610d36565b8115610ace578251610d956001840383610d00565b520160010192915050565b60006001830392505b6101078210610de157610dd38360ff16610dce60fd610dce8760081c60e00189610d00565b610d00565b935061010682039150610da9565b60078210610e0e57610e078360ff16610dce60078503610dce8760081c60e00189610d00565b9050610ace565b610e278360ff16610dce8560081c8560051b0187610d00565b949350505050565b610e88828203610e6c610e5c84600081518060001a8160011a60081b178160021a60101b17915050919050565b639e3779b90260131c611fff1690565b8060021b6040510182815160e01c1860e01b8151188152505050565b600101919050565b6180003860405139618000604051016020830180600d8551820103826002015b81811015610fc3576000805b50508051604051600082901a600183901a60081b1760029290921a60101b91909117639e3779b9810260111c617ffc16909101805160e081811c878603811890911b90911890915284019081830390848410610f185750610f53565b600184019350611fff8211610f4d578251600081901a600182901a60081b1760029190911a60101b178103610f4d5750610f53565b50610ebc565b838310610f61575050610fc3565b60018303925085831115610f7f57610f7c8787888603610d34565b96505b610f93600985016003850160038501610d0b565b9150610fa0878284610da0565b965050610fb884610fb386848601610e2f565b610e2f565b915050809350610eb0565b5050610fd58383848851850103610d34565b925050506040519150618000820180820391508183526020830160005b8381101561100a578281015182820152602001610ff2565b506000920191825250602001604052919050565b60008061102a836112a8565b90506000611036610c98565b61103e610661565b63ffffffff1661104e91906115dd565b611056610600565b61105e61097a565b611069906010611655565b63ffffffff1661107991906115dd565b611083919061159f565b9050611091600660026115dd565b61109c90600a6117a1565b6110a682846115dd565b610e27919061161a565b6000806110bc83611307565b905060006110c8610600565b6110d061097a565b6110db906010611655565b63ffffffff166110eb91906115dd565b905060006110f7610c98565b6110ff610661565b63ffffffff1661110f91906115dd565b9050600061111d828461159f565b61112790856115dd565b90506111356006600a6117a1565b6111409060106115dd565b61114a908261161a565b9695505050505050565b60008061116083611307565b9050600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e79190611521565b6111ef610600565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa15801561124e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112729190611521565b61127c908561159f565b61128691906115dd565b61129091906115dd565b905061129e6006600a6117a1565b610e27908261161a565b6000806112b883620cc3946115dd565b6112e2907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd7632006117ad565b90506112f26064620f4240611821565b8112156105dd57610ace6064620f4240611821565b80516000908190815b8181101561138a5784818151811061132a5761132a6118dd565b01602001517fff000000000000000000000000000000000000000000000000000000000000001660000361136a5761136360048461159f565b9250611378565b61137560108461159f565b92505b806113828161190c565b915050611310565b50610e278261044061159f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156113d857600080fd5b813567ffffffffffffffff808211156113f057600080fd5b818401915084601f83011261140457600080fd5b81358181111561141657611416611397565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561145c5761145c611397565b8160405282815287602084870101111561147557600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b818110156114c2578581018301518582016040015282016114a6565b818111156114d4576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b60006020828403121561151a57600080fd5b5035919050565b60006020828403121561153357600080fd5b5051919050565b60006020828403121561154c57600080fd5b815173ffffffffffffffffffffffffffffffffffffffff81168114610ace57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156115b2576115b2611570565b500190565b6000602082840312156115c957600080fd5b815163ffffffff81168114610ace57600080fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561161557611615611570565b500290565b600082611650577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600063ffffffff8083168185168183048111821515161561167857611678611570565b02949350505050565b600181815b808511156116da57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156116c0576116c0611570565b808516156116cd57918102915b93841c9390800290611686565b509250929050565b6000826116f1575060016105dd565b816116fe575060006105dd565b8160018114611714576002811461171e5761173a565b60019150506105dd565b60ff84111561172f5761172f611570565b50506001821b6105dd565b5060208310610133831016604e8410600b841016171561175d575081810a6105dd565b6117678383611681565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561179957611799611570565b029392505050565b6000610ace83836116e2565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156117e7576117e7611570565b827f800000000000000000000000000000000000000000000000000000000000000003841281161561181b5761181b611570565b50500190565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60008413600084138583048511828216161561186257611862611570565b7f8000000000000000000000000000000000000000000000000000000000000000600087128682058812818416161561189d5761189d611570565b600087129250878205871284841616156118b9576118b9611570565b878505871281841616156118cf576118cf611570565b505050929093029392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361193d5761193d611570565b506001019056fea164736f6c634300080f000a \ No newline at end of file From 275d0f853563929fd89eb7179286fafd5dc465dc Mon Sep 17 00:00:00 2001 From: Danyal Prout Date: Thu, 9 May 2024 11:46:31 +0100 Subject: [PATCH 2/5] Specify fjord must activate one block after ecotone --- specs/fjord/derivation.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specs/fjord/derivation.md b/specs/fjord/derivation.md index ce56c5deb..f66560571 100644 --- a/specs/fjord/derivation.md +++ b/specs/fjord/derivation.md @@ -38,6 +38,9 @@ Changes to derivation are applied when it is considering data from a L1 Block wh is greater than or equal to the activation timestamp. The change of the `max_sequencer_drift` parameter activates with the L1 origin block timestamp. +If Fjord is not activated at genesis, it must be activated at least one block after the Ecotone +activation block. This ensures that the network upgrade transactions don't conflict. + ## Constant Maximum Sequencer Drift With Fjord, the `max_sequencer_drift` parameter becomes a constant of value `1800` _seconds_, From 26490d300a4fce20f3f9e591abbcecc97d256f79 Mon Sep 17 00:00:00 2001 From: Danyal Prout Date: Sun, 12 May 2024 16:23:25 +0100 Subject: [PATCH 3/5] Update code hash / bytecode --- specs/fjord/derivation.md | 2 +- specs/fjord/predeploys.md | 7 ++++--- .../static/bytecode/fjord-gas-price-oracle-deployment.txt | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/specs/fjord/derivation.md b/specs/fjord/derivation.md index f66560571..f804bebb9 100644 --- a/specs/fjord/derivation.md +++ b/specs/fjord/derivation.md @@ -199,7 +199,7 @@ jq -r ".bytecode.object" packages/contracts-bedrock/forge-artifacts/GasPriceOrac ``` This transaction MUST deploy a contract with the following code hash -`0x58e192326ee67ed52b7add91e4640024cbd1b21528a0ff1e1d21b7ca54e3ee62`. +`0xa8682d0cb2cf24478bda32c1058ed3ca741134c5a319e80f29a30f45fe5b8245`. ## GasPriceOracle Proxy Update diff --git a/specs/fjord/predeploys.md b/specs/fjord/predeploys.md index e4cb661f3..32fe0db38 100644 --- a/specs/fjord/predeploys.md +++ b/specs/fjord/predeploys.md @@ -33,10 +33,11 @@ This is implemented as follows: ```solidity function getL1FeeUpperBound(uint256 unsignedTxSize) external view returns (uint256) { - // txSize / 255 + 16 is the pratical fastlz upper-bound covers 99.99% txs. // Add 68 to account for unsigned tx - int256 flzUpperBound = int256(unsignedTxSize) + int256(unsignedTxSize) / 255 + 16 + 68; - + uint256 txSize = unsignedTxSize + 68; + // txSize / 255 + 16 is the pratical fastlz upper-bound covers 99.99% txs. + uint256 flzUpperBound = txSize + txSize / 255 + 16; + int256 estimatedSize = costIntercept + costFastlzCoef * flzUpperBound; if (estimatedSize < minTransactionSize) { estimatedSize = minTransactionSize; diff --git a/specs/static/bytecode/fjord-gas-price-oracle-deployment.txt b/specs/static/bytecode/fjord-gas-price-oracle-deployment.txt index 700a3fcef..c518bfd0a 100644 --- a/specs/static/bytecode/fjord-gas-price-oracle-deployment.txt +++ b/specs/static/bytecode/fjord-gas-price-oracle-deployment.txt @@ -1 +1 @@ -0x608060405234801561001057600080fd5b50611951806100206000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c80636ef25c3a116100b2578063de26c4a111610081578063f45e65d811610066578063f45e65d81461025b578063f820614014610263578063fe173b971461020d57600080fd5b8063de26c4a114610235578063f1c7a58b1461024857600080fd5b80636ef25c3a1461020d5780638e98b10614610213578063960e3a231461021b578063c59859181461022d57600080fd5b806349948e0e11610109578063519b4bd3116100ee578063519b4bd31461019f57806354fd4d50146101a757806368d5dca6146101f057600080fd5b806349948e0e1461016f5780634ef6e2241461018257600080fd5b80630c18c1621461013b57806322b90ab3146101565780632e0f262514610160578063313ce56714610168575b600080fd5b61014361026b565b6040519081526020015b60405180910390f35b61015e61038c565b005b610143600681565b6006610143565b61014361017d3660046113c6565b6105af565b60005461018f9060ff1681565b604051901515815260200161014d565b610143610600565b6101e36040518060400160405280600581526020017f312e332e3000000000000000000000000000000000000000000000000000000081525081565b60405161014d9190611495565b6101f8610661565b60405163ffffffff909116815260200161014d565b48610143565b61015e6106e6565b60005461018f90610100900460ff1681565b6101f861097a565b6101436102433660046113c6565b6109db565b610143610256366004611508565b610ad5565b610143610ba5565b610143610c98565b6000805460ff1615610304576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f47617350726963654f7261636c653a206f76657268656164282920697320646560448201527f707265636174656400000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103879190611521565b905090565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663e591b2826040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040f919061153a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f47617350726963654f7261636c653a206f6e6c7920746865206465706f73697460448201527f6f72206163636f756e742063616e2073657420697345636f746f6e6520666c6160648201527f6700000000000000000000000000000000000000000000000000000000000000608482015260a4016102fb565b60005460ff1615610582576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a2045636f746f6e6520616c72656164792060448201527f616374697665000000000000000000000000000000000000000000000000000060648201526084016102fb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60008054610100900460ff16156105e3576105dd6105cc83610cf9565b516105d890604461159f565b61101e565b92915050565b60005460ff16156105f7576105dd826110b0565b6105dd82611154565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16635cf249696040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff166368d5dca66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106c2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038791906115b7565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663e591b2826040518163ffffffff1660e01b8152600401602060405180830381865afa158015610745573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610769919061153a565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610823576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f47617350726963654f7261636c653a206f6e6c7920746865206465706f73697460448201527f6f72206163636f756e742063616e20736574206973466a6f726420666c61670060648201526084016102fb565b60005460ff166108b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f47617350726963654f7261636c653a20466a6f72642063616e206f6e6c79206260448201527f65206163746976617465642061667465722045636f746f6e650000000000000060648201526084016102fb565b600054610100900460ff161561094c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f47617350726963654f7261636c653a20466a6f726420616c726561647920616360448201527f746976650000000000000000000000000000000000000000000000000000000060648201526084016102fb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663c59859186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106c2573d6000803e3d6000fd5b60008054610100900460ff1615610a2257620f4240610a0d6109fc84610cf9565b51610a0890604461159f565b6112a8565b610a189060106115dd565b6105dd919061161a565b6000610a2d83611307565b60005490915060ff1615610a415792915050565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610aa0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac49190611521565b610ace908261159f565b9392505050565b60008054610100900460ff16610b6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f47617350726963654f7261636c653a206765744c314665655570706572426f7560448201527f6e64206f6e6c7920737570706f72747320466a6f72640000000000000000000060648201526084016102fb565b6000610b7a60ff8461161a565b610b84908461159f565b610b8f90601061159f565b610b9a90604461159f565b9050610ace8161101e565b6000805460ff1615610c39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a207363616c61722829206973206465707260448201527f656361746564000000000000000000000000000000000000000000000000000060648201526084016102fb565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663f82061406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b6060610e90565b818153600101919050565b600082840393505b83811015610ace5782810151828201511860001a1590930292600101610d13565b825b60208210610d80578251610d4b601f83610d00565b52602092909201917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090910190602101610d36565b8115610ace578251610d956001840383610d00565b520160010192915050565b60006001830392505b6101078210610de157610dd38360ff16610dce60fd610dce8760081c60e00189610d00565b610d00565b935061010682039150610da9565b60078210610e0e57610e078360ff16610dce60078503610dce8760081c60e00189610d00565b9050610ace565b610e278360ff16610dce8560081c8560051b0187610d00565b949350505050565b610e88828203610e6c610e5c84600081518060001a8160011a60081b178160021a60101b17915050919050565b639e3779b90260131c611fff1690565b8060021b6040510182815160e01c1860e01b8151188152505050565b600101919050565b6180003860405139618000604051016020830180600d8551820103826002015b81811015610fc3576000805b50508051604051600082901a600183901a60081b1760029290921a60101b91909117639e3779b9810260111c617ffc16909101805160e081811c878603811890911b90911890915284019081830390848410610f185750610f53565b600184019350611fff8211610f4d578251600081901a600182901a60081b1760029190911a60101b178103610f4d5750610f53565b50610ebc565b838310610f61575050610fc3565b60018303925085831115610f7f57610f7c8787888603610d34565b96505b610f93600985016003850160038501610d0b565b9150610fa0878284610da0565b965050610fb884610fb386848601610e2f565b610e2f565b915050809350610eb0565b5050610fd58383848851850103610d34565b925050506040519150618000820180820391508183526020830160005b8381101561100a578281015182820152602001610ff2565b506000920191825250602001604052919050565b60008061102a836112a8565b90506000611036610c98565b61103e610661565b63ffffffff1661104e91906115dd565b611056610600565b61105e61097a565b611069906010611655565b63ffffffff1661107991906115dd565b611083919061159f565b9050611091600660026115dd565b61109c90600a6117a1565b6110a682846115dd565b610e27919061161a565b6000806110bc83611307565b905060006110c8610600565b6110d061097a565b6110db906010611655565b63ffffffff166110eb91906115dd565b905060006110f7610c98565b6110ff610661565b63ffffffff1661110f91906115dd565b9050600061111d828461159f565b61112790856115dd565b90506111356006600a6117a1565b6111409060106115dd565b61114a908261161a565b9695505050505050565b60008061116083611307565b9050600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa1580156111c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111e79190611521565b6111ef610600565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa15801561124e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112729190611521565b61127c908561159f565b61128691906115dd565b61129091906115dd565b905061129e6006600a6117a1565b610e27908261161a565b6000806112b883620cc3946115dd565b6112e2907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd7632006117ad565b90506112f26064620f4240611821565b8112156105dd57610ace6064620f4240611821565b80516000908190815b8181101561138a5784818151811061132a5761132a6118dd565b01602001517fff000000000000000000000000000000000000000000000000000000000000001660000361136a5761136360048461159f565b9250611378565b61137560108461159f565b92505b806113828161190c565b915050611310565b50610e278261044061159f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156113d857600080fd5b813567ffffffffffffffff808211156113f057600080fd5b818401915084601f83011261140457600080fd5b81358181111561141657611416611397565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561145c5761145c611397565b8160405282815287602084870101111561147557600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b818110156114c2578581018301518582016040015282016114a6565b818111156114d4576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b60006020828403121561151a57600080fd5b5035919050565b60006020828403121561153357600080fd5b5051919050565b60006020828403121561154c57600080fd5b815173ffffffffffffffffffffffffffffffffffffffff81168114610ace57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156115b2576115b2611570565b500190565b6000602082840312156115c957600080fd5b815163ffffffff81168114610ace57600080fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561161557611615611570565b500290565b600082611650577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600063ffffffff8083168185168183048111821515161561167857611678611570565b02949350505050565b600181815b808511156116da57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156116c0576116c0611570565b808516156116cd57918102915b93841c9390800290611686565b509250929050565b6000826116f1575060016105dd565b816116fe575060006105dd565b8160018114611714576002811461171e5761173a565b60019150506105dd565b60ff84111561172f5761172f611570565b50506001821b6105dd565b5060208310610133831016604e8410600b841016171561175d575081810a6105dd565b6117678383611681565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561179957611799611570565b029392505050565b6000610ace83836116e2565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156117e7576117e7611570565b827f800000000000000000000000000000000000000000000000000000000000000003841281161561181b5761181b611570565b50500190565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60008413600084138583048511828216161561186257611862611570565b7f8000000000000000000000000000000000000000000000000000000000000000600087128682058812818416161561189d5761189d611570565b600087129250878205871284841616156118b9576118b9611570565b878505871281841616156118cf576118cf611570565b505050929093029392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361193d5761193d611570565b506001019056fea164736f6c634300080f000a \ No newline at end of file +0x608060405234801561001057600080fd5b50611960806100206000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c80636ef25c3a116100b2578063de26c4a111610081578063f45e65d811610066578063f45e65d81461025b578063f820614014610263578063fe173b971461020d57600080fd5b8063de26c4a114610235578063f1c7a58b1461024857600080fd5b80636ef25c3a1461020d5780638e98b10614610213578063960e3a231461021b578063c59859181461022d57600080fd5b806349948e0e11610109578063519b4bd3116100ee578063519b4bd31461019f57806354fd4d50146101a757806368d5dca6146101f057600080fd5b806349948e0e1461016f5780634ef6e2241461018257600080fd5b80630c18c1621461013b57806322b90ab3146101565780632e0f262514610160578063313ce56714610168575b600080fd5b61014361026b565b6040519081526020015b60405180910390f35b61015e61038c565b005b610143600681565b6006610143565b61014361017d3660046113d5565b6105af565b60005461018f9060ff1681565b604051901515815260200161014d565b6101436105ec565b6101e36040518060400160405280600581526020017f312e332e3000000000000000000000000000000000000000000000000000000081525081565b60405161014d91906114a4565b6101f861064d565b60405163ffffffff909116815260200161014d565b48610143565b61015e6106d2565b60005461018f90610100900460ff1681565b6101f8610966565b6101436102433660046113d5565b6109c7565b610143610256366004611517565b610ac1565b610143610b9d565b610143610c90565b6000805460ff1615610304576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f47617350726963654f7261636c653a206f76657268656164282920697320646560448201527f707265636174656400000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103879190611530565b905090565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663e591b2826040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040f9190611549565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f47617350726963654f7261636c653a206f6e6c7920746865206465706f73697460448201527f6f72206163636f756e742063616e2073657420697345636f746f6e6520666c6160648201527f6700000000000000000000000000000000000000000000000000000000000000608482015260a4016102fb565b60005460ff1615610582576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a2045636f746f6e6520616c72656164792060448201527f616374697665000000000000000000000000000000000000000000000000000060648201526084016102fb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60008054610100900460ff16156105cf576105c982610cf1565b92915050565b60005460ff16156105e3576105c982610d10565b6105c982610db4565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16635cf249696040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff166368d5dca66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610387919061157f565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663e591b2826040518163ffffffff1660e01b8152600401602060405180830381865afa158015610731573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107559190611549565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461080f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f47617350726963654f7261636c653a206f6e6c7920746865206465706f73697460448201527f6f72206163636f756e742063616e20736574206973466a6f726420666c61670060648201526084016102fb565b60005460ff166108a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f47617350726963654f7261636c653a20466a6f72642063616e206f6e6c79206260448201527f65206163746976617465642061667465722045636f746f6e650000000000000060648201526084016102fb565b600054610100900460ff1615610938576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f47617350726963654f7261636c653a20466a6f726420616c726561647920616360448201527f746976650000000000000000000000000000000000000000000000000000000060648201526084016102fb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663c59859186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ae573d6000803e3d6000fd5b60008054610100900460ff1615610a0e57620f42406109f96109e884610f08565b516109f49060446115d4565b611225565b610a049060106115ec565b6105c99190611629565b6000610a1983611284565b60005490915060ff1615610a2d5792915050565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab09190611530565b610aba90826115d4565b9392505050565b60008054610100900460ff16610b59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f47617350726963654f7261636c653a206765744c314665655570706572426f7560448201527f6e64206f6e6c7920737570706f72747320466a6f72640000000000000000000060648201526084016102fb565b6000610b668360446115d4565b90506000610b7560ff83611629565b610b7f90836115d4565b610b8a9060106115d4565b9050610b9581611314565b949350505050565b6000805460ff1615610c31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a207363616c61722829206973206465707260448201527f656361746564000000000000000000000000000000000000000000000000000060648201526084016102fb565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663f82061406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b60006105c9610cff83610f08565b51610d0b9060446115d4565b611314565b600080610d1c83611284565b90506000610d286105ec565b610d30610966565b610d3b906010611664565b63ffffffff16610d4b91906115ec565b90506000610d57610c90565b610d5f61064d565b63ffffffff16610d6f91906115ec565b90506000610d7d82846115d4565b610d8790856115ec565b9050610d956006600a6117b0565b610da09060106115ec565b610daa9082611629565b9695505050505050565b600080610dc083611284565b9050600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e479190611530565b610e4f6105ec565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed29190611530565b610edc90856115d4565b610ee691906115ec565b610ef091906115ec565b9050610efe6006600a6117b0565b610b959082611629565b6060611097565b818153600101919050565b600082840393505b83811015610aba5782810151828201511860001a1590930292600101610f22565b825b60208210610f8f578251610f5a601f83610f0f565b52602092909201917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090910190602101610f45565b8115610aba578251610fa46001840383610f0f565b520160010192915050565b60006001830392505b6101078210610ff057610fe28360ff16610fdd60fd610fdd8760081c60e00189610f0f565b610f0f565b935061010682039150610fb8565b6007821061101d576110168360ff16610fdd60078503610fdd8760081c60e00189610f0f565b9050610aba565b610b958360ff16610fdd8560081c8560051b0187610f0f565b61108f82820361107361106384600081518060001a8160011a60081b178160021a60101b17915050919050565b639e3779b90260131c611fff1690565b8060021b6040510182815160e01c1860e01b8151188152505050565b600101919050565b6180003860405139618000604051016020830180600d8551820103826002015b818110156111ca576000805b50508051604051600082901a600183901a60081b1760029290921a60101b91909117639e3779b9810260111c617ffc16909101805160e081811c878603811890911b9091189091528401908183039084841061111f575061115a565b600184019350611fff8211611154578251600081901a600182901a60081b1760029190911a60101b178103611154575061115a565b506110c3565b8383106111685750506111ca565b60018303925085831115611186576111838787888603610f43565b96505b61119a600985016003850160038501610f1a565b91506111a7878284610faf565b9650506111bf846111ba86848601611036565b611036565b9150508093506110b7565b50506111dc8383848851850103610f43565b925050506040519150618000820180820391508183526020830160005b838110156112115782810151828201526020016111f9565b506000920191825250602001604052919050565b60008061123583620cc3946115ec565b61125f907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd7632006117bc565b905061126f6064620f4240611830565b8112156105c957610aba6064620f4240611830565b80516000908190815b81811015611307578481815181106112a7576112a76118ec565b01602001517fff00000000000000000000000000000000000000000000000000000000000000166000036112e7576112e06004846115d4565b92506112f5565b6112f26010846115d4565b92505b806112ff8161191b565b91505061128d565b50610b95826104406115d4565b60008061132083611225565b9050600061132c610c90565b61133461064d565b63ffffffff1661134491906115ec565b61134c6105ec565b611354610966565b61135f906010611664565b63ffffffff1661136f91906115ec565b61137991906115d4565b9050611387600660026115ec565b61139290600a6117b0565b61139c82846115ec565b610b959190611629565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156113e757600080fd5b813567ffffffffffffffff808211156113ff57600080fd5b818401915084601f83011261141357600080fd5b813581811115611425576114256113a6565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561146b5761146b6113a6565b8160405282815287602084870101111561148457600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b818110156114d1578581018301518582016040015282016114b5565b818111156114e3576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b60006020828403121561152957600080fd5b5035919050565b60006020828403121561154257600080fd5b5051919050565b60006020828403121561155b57600080fd5b815173ffffffffffffffffffffffffffffffffffffffff81168114610aba57600080fd5b60006020828403121561159157600080fd5b815163ffffffff81168114610aba57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156115e7576115e76115a5565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611624576116246115a5565b500290565b60008261165f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600063ffffffff80831681851681830481118215151615611687576116876115a5565b02949350505050565b600181815b808511156116e957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156116cf576116cf6115a5565b808516156116dc57918102915b93841c9390800290611695565b509250929050565b600082611700575060016105c9565b8161170d575060006105c9565b8160018114611723576002811461172d57611749565b60019150506105c9565b60ff84111561173e5761173e6115a5565b50506001821b6105c9565b5060208310610133831016604e8410600b841016171561176c575081810a6105c9565b6117768383611690565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156117a8576117a86115a5565b029392505050565b6000610aba83836116f1565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156117f6576117f66115a5565b827f800000000000000000000000000000000000000000000000000000000000000003841281161561182a5761182a6115a5565b50500190565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600084136000841385830485118282161615611871576118716115a5565b7f800000000000000000000000000000000000000000000000000000000000000060008712868205881281841616156118ac576118ac6115a5565b600087129250878205871284841616156118c8576118c86115a5565b878505871281841616156118de576118de6115a5565b505050929093029392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361194c5761194c6115a5565b506001019056fea164736f6c634300080f000a \ No newline at end of file From 2dd412ce42171b4041e826fd6b8defacc88e8f56 Mon Sep 17 00:00:00 2001 From: Danyal Prout Date: Tue, 14 May 2024 15:36:39 +0100 Subject: [PATCH 4/5] Update bytecode / code hash / commit --- specs/fjord/derivation.md | 4 ++-- specs/static/bytecode/fjord-gas-price-oracle-deployment.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/fjord/derivation.md b/specs/fjord/derivation.md index f804bebb9..d6e702139 100644 --- a/specs/fjord/derivation.md +++ b/specs/fjord/derivation.md @@ -193,13 +193,13 @@ cast keccak $(cast concat-hex 0x000000000000000000000000000000000000000000000000 Verify `data`: ```bash -git checkout fbdba16ce5fe0207ceeb8487d762807888aa43f5 (update once merged) +git checkout 52abfb507342191ae1f960b443ae8aec7598755c pnpm clean && pnpm install && pnpm build jq -r ".bytecode.object" packages/contracts-bedrock/forge-artifacts/GasPriceOracle.sol/GasPriceOracle.json ``` This transaction MUST deploy a contract with the following code hash -`0xa8682d0cb2cf24478bda32c1058ed3ca741134c5a319e80f29a30f45fe5b8245`. +`0xa88fa50a2745b15e6794247614b5298483070661adacb8d32d716434ed24c6b2`. ## GasPriceOracle Proxy Update diff --git a/specs/static/bytecode/fjord-gas-price-oracle-deployment.txt b/specs/static/bytecode/fjord-gas-price-oracle-deployment.txt index c518bfd0a..210c3b6b1 100644 --- a/specs/static/bytecode/fjord-gas-price-oracle-deployment.txt +++ b/specs/static/bytecode/fjord-gas-price-oracle-deployment.txt @@ -1 +1 @@ -0x608060405234801561001057600080fd5b50611960806100206000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c80636ef25c3a116100b2578063de26c4a111610081578063f45e65d811610066578063f45e65d81461025b578063f820614014610263578063fe173b971461020d57600080fd5b8063de26c4a114610235578063f1c7a58b1461024857600080fd5b80636ef25c3a1461020d5780638e98b10614610213578063960e3a231461021b578063c59859181461022d57600080fd5b806349948e0e11610109578063519b4bd3116100ee578063519b4bd31461019f57806354fd4d50146101a757806368d5dca6146101f057600080fd5b806349948e0e1461016f5780634ef6e2241461018257600080fd5b80630c18c1621461013b57806322b90ab3146101565780632e0f262514610160578063313ce56714610168575b600080fd5b61014361026b565b6040519081526020015b60405180910390f35b61015e61038c565b005b610143600681565b6006610143565b61014361017d3660046113d5565b6105af565b60005461018f9060ff1681565b604051901515815260200161014d565b6101436105ec565b6101e36040518060400160405280600581526020017f312e332e3000000000000000000000000000000000000000000000000000000081525081565b60405161014d91906114a4565b6101f861064d565b60405163ffffffff909116815260200161014d565b48610143565b61015e6106d2565b60005461018f90610100900460ff1681565b6101f8610966565b6101436102433660046113d5565b6109c7565b610143610256366004611517565b610ac1565b610143610b9d565b610143610c90565b6000805460ff1615610304576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f47617350726963654f7261636c653a206f76657268656164282920697320646560448201527f707265636174656400000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103879190611530565b905090565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663e591b2826040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040f9190611549565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104ef576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f47617350726963654f7261636c653a206f6e6c7920746865206465706f73697460448201527f6f72206163636f756e742063616e2073657420697345636f746f6e6520666c6160648201527f6700000000000000000000000000000000000000000000000000000000000000608482015260a4016102fb565b60005460ff1615610582576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a2045636f746f6e6520616c72656164792060448201527f616374697665000000000000000000000000000000000000000000000000000060648201526084016102fb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60008054610100900460ff16156105cf576105c982610cf1565b92915050565b60005460ff16156105e3576105c982610d10565b6105c982610db4565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16635cf249696040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff166368d5dca66040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610387919061157f565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663e591b2826040518163ffffffff1660e01b8152600401602060405180830381865afa158015610731573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107559190611549565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461080f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f47617350726963654f7261636c653a206f6e6c7920746865206465706f73697460448201527f6f72206163636f756e742063616e20736574206973466a6f726420666c61670060648201526084016102fb565b60005460ff166108a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f47617350726963654f7261636c653a20466a6f72642063616e206f6e6c79206260448201527f65206163746976617465642061667465722045636f746f6e650000000000000060648201526084016102fb565b600054610100900460ff1615610938576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f47617350726963654f7261636c653a20466a6f726420616c726561647920616360448201527f746976650000000000000000000000000000000000000000000000000000000060648201526084016102fb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663c59859186040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106ae573d6000803e3d6000fd5b60008054610100900460ff1615610a0e57620f42406109f96109e884610f08565b516109f49060446115d4565b611225565b610a049060106115ec565b6105c99190611629565b6000610a1983611284565b60005490915060ff1615610a2d5792915050565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ab09190611530565b610aba90826115d4565b9392505050565b60008054610100900460ff16610b59576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f47617350726963654f7261636c653a206765744c314665655570706572426f7560448201527f6e64206f6e6c7920737570706f72747320466a6f72640000000000000000000060648201526084016102fb565b6000610b668360446115d4565b90506000610b7560ff83611629565b610b7f90836115d4565b610b8a9060106115d4565b9050610b9581611314565b949350505050565b6000805460ff1615610c31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a207363616c61722829206973206465707260448201527f656361746564000000000000000000000000000000000000000000000000000060648201526084016102fb565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663f82061406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b60006105c9610cff83610f08565b51610d0b9060446115d4565b611314565b600080610d1c83611284565b90506000610d286105ec565b610d30610966565b610d3b906010611664565b63ffffffff16610d4b91906115ec565b90506000610d57610c90565b610d5f61064d565b63ffffffff16610d6f91906115ec565b90506000610d7d82846115d4565b610d8790856115ec565b9050610d956006600a6117b0565b610da09060106115ec565b610daa9082611629565b9695505050505050565b600080610dc083611284565b9050600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e23573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e479190611530565b610e4f6105ec565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed29190611530565b610edc90856115d4565b610ee691906115ec565b610ef091906115ec565b9050610efe6006600a6117b0565b610b959082611629565b6060611097565b818153600101919050565b600082840393505b83811015610aba5782810151828201511860001a1590930292600101610f22565b825b60208210610f8f578251610f5a601f83610f0f565b52602092909201917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090910190602101610f45565b8115610aba578251610fa46001840383610f0f565b520160010192915050565b60006001830392505b6101078210610ff057610fe28360ff16610fdd60fd610fdd8760081c60e00189610f0f565b610f0f565b935061010682039150610fb8565b6007821061101d576110168360ff16610fdd60078503610fdd8760081c60e00189610f0f565b9050610aba565b610b958360ff16610fdd8560081c8560051b0187610f0f565b61108f82820361107361106384600081518060001a8160011a60081b178160021a60101b17915050919050565b639e3779b90260131c611fff1690565b8060021b6040510182815160e01c1860e01b8151188152505050565b600101919050565b6180003860405139618000604051016020830180600d8551820103826002015b818110156111ca576000805b50508051604051600082901a600183901a60081b1760029290921a60101b91909117639e3779b9810260111c617ffc16909101805160e081811c878603811890911b9091189091528401908183039084841061111f575061115a565b600184019350611fff8211611154578251600081901a600182901a60081b1760029190911a60101b178103611154575061115a565b506110c3565b8383106111685750506111ca565b60018303925085831115611186576111838787888603610f43565b96505b61119a600985016003850160038501610f1a565b91506111a7878284610faf565b9650506111bf846111ba86848601611036565b611036565b9150508093506110b7565b50506111dc8383848851850103610f43565b925050506040519150618000820180820391508183526020830160005b838110156112115782810151828201526020016111f9565b506000920191825250602001604052919050565b60008061123583620cc3946115ec565b61125f907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd7632006117bc565b905061126f6064620f4240611830565b8112156105c957610aba6064620f4240611830565b80516000908190815b81811015611307578481815181106112a7576112a76118ec565b01602001517fff00000000000000000000000000000000000000000000000000000000000000166000036112e7576112e06004846115d4565b92506112f5565b6112f26010846115d4565b92505b806112ff8161191b565b91505061128d565b50610b95826104406115d4565b60008061132083611225565b9050600061132c610c90565b61133461064d565b63ffffffff1661134491906115ec565b61134c6105ec565b611354610966565b61135f906010611664565b63ffffffff1661136f91906115ec565b61137991906115d4565b9050611387600660026115ec565b61139290600a6117b0565b61139c82846115ec565b610b959190611629565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156113e757600080fd5b813567ffffffffffffffff808211156113ff57600080fd5b818401915084601f83011261141357600080fd5b813581811115611425576114256113a6565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561146b5761146b6113a6565b8160405282815287602084870101111561148457600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b818110156114d1578581018301518582016040015282016114b5565b818111156114e3576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b60006020828403121561152957600080fd5b5035919050565b60006020828403121561154257600080fd5b5051919050565b60006020828403121561155b57600080fd5b815173ffffffffffffffffffffffffffffffffffffffff81168114610aba57600080fd5b60006020828403121561159157600080fd5b815163ffffffff81168114610aba57600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082198211156115e7576115e76115a5565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611624576116246115a5565b500290565b60008261165f577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600063ffffffff80831681851681830481118215151615611687576116876115a5565b02949350505050565b600181815b808511156116e957817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156116cf576116cf6115a5565b808516156116dc57918102915b93841c9390800290611695565b509250929050565b600082611700575060016105c9565b8161170d575060006105c9565b8160018114611723576002811461172d57611749565b60019150506105c9565b60ff84111561173e5761173e6115a5565b50506001821b6105c9565b5060208310610133831016604e8410600b841016171561176c575081810a6105c9565b6117768383611690565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156117a8576117a86115a5565b029392505050565b6000610aba83836116f1565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038413811516156117f6576117f66115a5565b827f800000000000000000000000000000000000000000000000000000000000000003841281161561182a5761182a6115a5565b50500190565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600084136000841385830485118282161615611871576118716115a5565b7f800000000000000000000000000000000000000000000000000000000000000060008712868205881281841616156118ac576118ac6115a5565b600087129250878205871284841616156118c8576118c86115a5565b878505871281841616156118de576118de6115a5565b505050929093029392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361194c5761194c6115a5565b506001019056fea164736f6c634300080f000a \ No newline at end of file +0x608060405234801561001057600080fd5b506117f6806100206000396000f3fe608060405234801561001057600080fd5b50600436106101365760003560e01c80636ef25c3a116100b2578063de26c4a111610081578063f45e65d811610066578063f45e65d81461025b578063f820614014610263578063fe173b971461020d57600080fd5b8063de26c4a114610235578063f1c7a58b1461024857600080fd5b80636ef25c3a1461020d5780638e98b10614610213578063960e3a231461021b578063c59859181461022d57600080fd5b806349948e0e11610109578063519b4bd3116100ee578063519b4bd31461019f57806354fd4d50146101a757806368d5dca6146101f057600080fd5b806349948e0e1461016f5780634ef6e2241461018257600080fd5b80630c18c1621461013b57806322b90ab3146101565780632e0f262514610160578063313ce56714610168575b600080fd5b61014361026b565b6040519081526020015b60405180910390f35b61015e61038c565b005b610143600681565b6006610143565b61014361017d3660046112a1565b610515565b60005461018f9060ff1681565b604051901515815260200161014d565b610143610552565b6101e36040518060400160405280600581526020017f312e332e3000000000000000000000000000000000000000000000000000000081525081565b60405161014d9190611370565b6101f86105b3565b60405163ffffffff909116815260200161014d565b48610143565b61015e610638565b60005461018f90610100900460ff1681565b6101f8610832565b6101436102433660046112a1565b610893565b6101436102563660046113e3565b61098d565b610143610a69565b610143610b5c565b6000805460ff1615610304576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602860248201527f47617350726963654f7261636c653a206f76657268656164282920697320646560448201527f707265636174656400000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061038791906113fc565b905090565b3373deaddeaddeaddeaddeaddeaddeaddeaddead000114610455576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604160248201527f47617350726963654f7261636c653a206f6e6c7920746865206465706f73697460448201527f6f72206163636f756e742063616e2073657420697345636f746f6e6520666c6160648201527f6700000000000000000000000000000000000000000000000000000000000000608482015260a4016102fb565b60005460ff16156104e8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a2045636f746f6e6520616c72656164792060448201527f616374697665000000000000000000000000000000000000000000000000000060648201526084016102fb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055565b60008054610100900460ff16156105355761052f82610bbd565b92915050565b60005460ff16156105495761052f82610bdc565b61052f82610c80565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16635cf249696040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff166368d5dca66040518163ffffffff1660e01b8152600401602060405180830381865afa158015610614573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103879190611415565b3373deaddeaddeaddeaddeaddeaddeaddeaddead0001146106db576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603f60248201527f47617350726963654f7261636c653a206f6e6c7920746865206465706f73697460448201527f6f72206163636f756e742063616e20736574206973466a6f726420666c61670060648201526084016102fb565b60005460ff1661076d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603960248201527f47617350726963654f7261636c653a20466a6f72642063616e206f6e6c79206260448201527f65206163746976617465642061667465722045636f746f6e650000000000000060648201526084016102fb565b600054610100900460ff1615610804576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f47617350726963654f7261636c653a20466a6f726420616c726561647920616360448201527f746976650000000000000000000000000000000000000000000000000000000060648201526084016102fb565b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055565b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663c59859186040518163ffffffff1660e01b8152600401602060405180830381865afa158015610614573d6000803e3d6000fd5b60008054610100900460ff16156108da57620f42406108c56108b484610dd4565b516108c090604461146a565b6110f1565b6108d0906010611482565b61052f91906114bf565b60006108e583611150565b60005490915060ff16156108f95792915050565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610958573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061097c91906113fc565b610986908261146a565b9392505050565b60008054610100900460ff16610a25576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603660248201527f47617350726963654f7261636c653a206765744c314665655570706572426f7560448201527f6e64206f6e6c7920737570706f72747320466a6f72640000000000000000000060648201526084016102fb565b6000610a3283604461146a565b90506000610a4160ff836114bf565b610a4b908361146a565b610a5690601061146a565b9050610a61816111e0565b949350505050565b6000805460ff1615610afd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f47617350726963654f7261636c653a207363616c61722829206973206465707260448201527f656361746564000000000000000000000000000000000000000000000000000060648201526084016102fb565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff1663f82061406040518163ffffffff1660e01b8152600401602060405180830381865afa158015610363573d6000803e3d6000fd5b600061052f610bcb83610dd4565b51610bd790604461146a565b6111e0565b600080610be883611150565b90506000610bf4610552565b610bfc610832565b610c079060106114fa565b63ffffffff16610c179190611482565b90506000610c23610b5c565b610c2b6105b3565b63ffffffff16610c3b9190611482565b90506000610c49828461146a565b610c539085611482565b9050610c616006600a611646565b610c6c906010611482565b610c7690826114bf565b9695505050505050565b600080610c8c83611150565b9050600073420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16639e8c49666040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1391906113fc565b610d1b610552565b73420000000000000000000000000000000000001573ffffffffffffffffffffffffffffffffffffffff16638b239f736040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d9e91906113fc565b610da8908561146a565b610db29190611482565b610dbc9190611482565b9050610dca6006600a611646565b610a6190826114bf565b6060610f63565b818153600101919050565b600082840393505b838110156109865782810151828201511860001a1590930292600101610dee565b825b60208210610e5b578251610e26601f83610ddb565b52602092909201917fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090910190602101610e11565b8115610986578251610e706001840383610ddb565b520160010192915050565b60006001830392505b6101078210610ebc57610eae8360ff16610ea960fd610ea98760081c60e00189610ddb565b610ddb565b935061010682039150610e84565b60078210610ee957610ee28360ff16610ea960078503610ea98760081c60e00189610ddb565b9050610986565b610a618360ff16610ea98560081c8560051b0187610ddb565b610f5b828203610f3f610f2f84600081518060001a8160011a60081b178160021a60101b17915050919050565b639e3779b90260131c611fff1690565b8060021b6040510182815160e01c1860e01b8151188152505050565b600101919050565b6180003860405139618000604051016020830180600d8551820103826002015b81811015611096576000805b50508051604051600082901a600183901a60081b1760029290921a60101b91909117639e3779b9810260111c617ffc16909101805160e081811c878603811890911b90911890915284019081830390848410610feb5750611026565b600184019350611fff8211611020578251600081901a600182901a60081b1760029190911a60101b1781036110205750611026565b50610f8f565b838310611034575050611096565b600183039250858311156110525761104f8787888603610e0f565b96505b611066600985016003850160038501610de6565b9150611073878284610e7b565b96505061108b8461108686848601610f02565b610f02565b915050809350610f83565b50506110a88383848851850103610e0f565b925050506040519150618000820180820391508183526020830160005b838110156110dd5782810151828201526020016110c5565b506000920191825250602001604052919050565b60008061110183620cc394611482565b61112b907ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd763200611652565b905061113b6064620f42406116c6565b81121561052f576109866064620f42406116c6565b80516000908190815b818110156111d35784818151811061117357611173611782565b01602001517fff00000000000000000000000000000000000000000000000000000000000000166000036111b3576111ac60048461146a565b92506111c1565b6111be60108461146a565b92505b806111cb816117b1565b915050611159565b50610a618261044061146a565b6000806111ec836110f1565b905060006111f8610b5c565b6112006105b3565b63ffffffff166112109190611482565b611218610552565b611220610832565b61122b9060106114fa565b63ffffffff1661123b9190611482565b611245919061146a565b905061125360066002611482565b61125e90600a611646565b6112688284611482565b610a6191906114bf565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000602082840312156112b357600080fd5b813567ffffffffffffffff808211156112cb57600080fd5b818401915084601f8301126112df57600080fd5b8135818111156112f1576112f1611272565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f0116810190838211818310171561133757611337611272565b8160405282815287602084870101111561135057600080fd5b826020860160208301376000928101602001929092525095945050505050565b600060208083528351808285015260005b8181101561139d57858101830151858201604001528201611381565b818111156113af576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b6000602082840312156113f557600080fd5b5035919050565b60006020828403121561140e57600080fd5b5051919050565b60006020828403121561142757600080fd5b815163ffffffff8116811461098657600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561147d5761147d61143b565b500190565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156114ba576114ba61143b565b500290565b6000826114f5577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b600063ffffffff8083168185168183048111821515161561151d5761151d61143b565b02949350505050565b600181815b8085111561157f57817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048211156115655761156561143b565b8085161561157257918102915b93841c939080029061152b565b509250929050565b6000826115965750600161052f565b816115a35750600061052f565b81600181146115b957600281146115c3576115df565b600191505061052f565b60ff8411156115d4576115d461143b565b50506001821b61052f565b5060208310610133831016604e8410600b8410161715611602575081810a61052f565b61160c8383611526565b807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0482111561163e5761163e61143b565b029392505050565b60006109868383611587565b6000808212827f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0384138115161561168c5761168c61143b565b827f80000000000000000000000000000000000000000000000000000000000000000384128116156116c0576116c061143b565b50500190565b60007f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6000841360008413858304851182821616156117075761170761143b565b7f800000000000000000000000000000000000000000000000000000000000000060008712868205881281841616156117425761174261143b565b6000871292508782058712848416161561175e5761175e61143b565b878505871281841616156117745761177461143b565b505050929093029392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82036117e2576117e261143b565b506001019056fea164736f6c634300080f000a \ No newline at end of file From 44edb4fa4b1cf1f990b43af1dd1bac8341e405c8 Mon Sep 17 00:00:00 2001 From: Danyal Prout Date: Wed, 15 May 2024 10:53:11 +0100 Subject: [PATCH 5/5] Specify removal --- specs/fjord/exec-engine.md | 3 ++- specs/fjord/predeploys.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/specs/fjord/exec-engine.md b/specs/fjord/exec-engine.md index ed664b40f..b8671d9b0 100644 --- a/specs/fjord/exec-engine.md +++ b/specs/fjord/exec-engine.md @@ -76,4 +76,5 @@ multiplying the `estimatedSize` of the transaction from the above L1 cost formul of the bytes in the compressed data are non-zero. The `L1GasUsed` property will be deprecated due to it not accurately calculating the L1 gas used -by a transaction. Users can continue to use the `L1Fee` field to retrieve the L1 fee for a given transaction. +by a transaction. Users can continue to use the `L1Fee` field to retrieve the L1 fee for a given transaction. This field +will be removed in a future network upgrade. diff --git a/specs/fjord/predeploys.md b/specs/fjord/predeploys.md index 32fe0db38..7cc7bcf99 100644 --- a/specs/fjord/predeploys.md +++ b/specs/fjord/predeploys.md @@ -72,6 +72,6 @@ function getL1GasUsed(bytes memory _data) public view returns (uint256) { ``` The `getL1GasUsed` method will be deprecated. This is due to it not accurately estimating the -L1 gas used, for a transaction. +L1 gas used, for a transaction. In a future network upgrade this function will revert when called. Users can continue to use the `getL1FeeUpperBound` or `getL1Fee` method to estimate the L1 fee for a given transaction.