-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(protocol): remove the ETHDeposit feature completely (#16638)
- Loading branch information
Showing
10 changed files
with
34 additions
and
360 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,16 +2,21 @@ | |
pragma solidity 0.8.24; | ||
|
||
import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; | ||
import "../../common/IAddressResolver.sol"; | ||
import "../../libs/LibAddress.sol"; | ||
import "../hooks/IHook.sol"; | ||
import "../tiers/ITierProvider.sol"; | ||
import "./LibDepositing.sol"; | ||
|
||
/// @title LibProposing | ||
/// @notice A library for handling block proposals in the Taiko protocol. | ||
/// @custom:security-contact [email protected] | ||
library LibProposing { | ||
using LibAddress for address; | ||
|
||
// = keccak256(abi.encode(new TaikoData.EthDeposit[](0))) | ||
bytes32 private constant _EMPTY_ETH_DEPOSIT_HASH = | ||
0x569e75fc77c1a856f6daaf9e69d8a9566ca34aa47f9133711ce065a571af0cfd; | ||
|
||
// Warning: Any events defined here must also be defined in TaikoEvents.sol. | ||
/// @notice Emitted when a block is proposed. | ||
/// @param blockId The ID of the proposed block. | ||
|
@@ -46,8 +51,6 @@ library LibProposing { | |
/// @param _data Encoded data bytes containing the block params. | ||
/// @param _txList Transaction list bytes (if not blob). | ||
/// @return meta_ The constructed block's metadata. | ||
/// @return deposits_ The EthDeposit array about processed deposits in this proposed | ||
/// block. | ||
function proposeBlock( | ||
TaikoData.State storage _state, | ||
TaikoData.Config memory _config, | ||
|
@@ -92,10 +95,6 @@ library LibProposing { | |
revert L1_UNEXPECTED_PARENT(); | ||
} | ||
|
||
// Each transaction must handle a specific quantity of L1-to-L2 | ||
// Ether deposits. | ||
deposits_ = LibDepositing.processDeposits(_state, _config, params.coinbase); | ||
|
||
// Initialize metadata to compute a metaHash, which forms a part of | ||
// the block data to be stored on-chain for future integrity checks. | ||
// If we choose to persist all data fields in the metadata, it will | ||
|
@@ -106,7 +105,7 @@ library LibProposing { | |
difficulty: 0, // to be initialized below | ||
blobHash: 0, // to be initialized below | ||
extraData: params.extraData, | ||
depositsHash: keccak256(abi.encode(deposits_)), | ||
depositsHash: _EMPTY_ETH_DEPOSIT_HASH, | ||
coinbase: params.coinbase, | ||
id: b.numBlocks, | ||
gasLimit: _config.blockMaxGasLimit, | ||
|
@@ -213,6 +212,7 @@ library LibProposing { | |
} | ||
} | ||
|
||
deposits_ = new TaikoData.EthDeposit[](0); | ||
emit BlockProposed({ | ||
blockId: blk.blockId, | ||
assignedProver: blk.assignedProver, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.