Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik committed Jan 24, 2025
1 parent 11ff9aa commit 07ff3ad
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,14 @@ contract ForcedInclusionStore is EssentialContract, IForcedInclusionStore {
returns (ForcedInclusion memory inclusion_)
{
// we only need to check the first one, since it will be the oldest.
ForcedInclusion storage inclusion = queue[head];
uint64 _head = head;
ForcedInclusion storage inclusion = queue[_head];

if (inclusion.createdAt != 0 && block.timestamp >= inclusionDelay + inclusion.createdAt) {
inclusion_ = inclusion;
_feeRecipient.sendEtherAndVerify(inclusion.fee);
head++;
delete queue[_head];
head = _head + 1;
emit ForcedInclusionConsumed(inclusion);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,30 @@ import "./ITaikoInbox.sol";
import "./IForcedInclusionStore.sol";

/// @title TaikoInboxWithForcedTxInclusion
/// @dev This contract is part of a delayed inbox implementation to enforce the inclusion of
/// transactions.
/// The current design is a simplified and can be improved with the following ideas:
/// 1. **Fee-Based Request Prioritization**:
/// - Proposers can selectively fulfill pending requests based on transaction fees.
/// - Requests not yet due can be processed earlier if fees are attractive, incentivizing timely
/// execution.
///
/// 2. **Rate Limit Control**:
/// - A rate-limiting mechanism ensures a minimum interval of 12*N seconds between request
/// fulfillments.
/// - Prevents proposers from being overwhelmed during high request volume, ensuring system
/// stability.
///
/// 3. **Calldata and Blob Support**:
/// - Supports both calldata and blobs in the transaction list.
///
/// 4. **Gas-Efficient Request Storage**:
/// - Avoids storing full request data in contract storage.
/// - Saves only the request hash and its timestamp.
/// - Leverages Ethereum events to store request details off-chain.
/// - Proposers can reconstruct requests as needed, minimizing on-chain storage and gas
/// consumption.
///
/// @custom:security-contact [email protected]
contract TaikoInboxWithForcedTxInclusion is EssentialContract {
using LibAddress for address;
Expand Down

0 comments on commit 07ff3ad

Please sign in to comment.