Online Block Packing

Ariel Ben Eliezer, Noam NisanarXiv 2025 · DOI

Abstract

As blockchains evolve from simple single-resource systems to complex multi-dimensional environments, the challenge of transaction scheduling has grown significantly. This paper introduces the "Online Block Packing" framework to address the problem of scheduling transactions with multi-dimensional resource requirements (e.g., Ethereum's gas and blobs) and time-sensitive values. We provide the first online approximation algorithms for this setting, demonstrating that a simple greedy approach can capture at least half of the maximum possible social welfare. Furthermore, we explore the necessity of resource augmentation to achieve constant-factor approximations in more general scenarios.

Introduction

In the early iterations of blockchain technology, such as Bitcoin, transaction scheduling was a straightforward one-dimensional problem: transactions occupied a specific size, and blocks had a fixed capacity. However, modern blockchains like Ethereum have introduced multi-dimensional resource constraints. A single block now has separate limits for computation (gas) and data availability (blobs), requiring a more sophisticated approach to block construction.

Beyond resource complexity, user behavior adds a temporal dimension. Users are often time-sensitive; some are "impatient," requiring their transactions to be included in the immediate next block, while others are "quasi-patient," with the value of their transactions decaying over time. This creates an online scheduling problem where a block proposer must decide which transactions to include without knowledge of future high-value arrivals. The objective is to maximize social welfare—the total time-discounted value of all executed transactions.

Methodology

The research approaches the Online Block Packing problem through a three-step algorithmic progression designed to handle increasing levels of complexity.

1. The Fractional Case

The authors first consider a relaxed version of the problem where transactions can be partially included in a block. They analyze a Greedy Fractional Algorithm, which selects the most valuable set of fractional transactions for the current block in a myopic fashion. This serves as a theoretical baseline for more complex integral constraints.

2. Small Transactions and Randomized Rounding

In the "integral" setting—where a transaction must be included in its entirety or not at all—the problem becomes more difficult. For scenarios where transactions are small relative to the total block capacity, the authors employ a Repeated Myopic Solution. This method uses randomized rounding techniques to convert the optimal fractional solution into a valid integral one without significant loss in welfare.

3. The General Case and Batching

To address "large" transactions that might occupy a significant portion of a block's capacity, the authors introduce a Batching Algorithm. This approach groups blocks into discrete batches and utilizes resource augmentation. By allowing the algorithm a degree of "slack"—either in terms of extra time or slightly expanded capacity—the authors maintain high performance even when individual transactions are large.

Key Insights and Theoretical Results

The Efficiency of Myopic Scheduling

A central finding of the paper is Theorem 1, which proves that in the fractional setting, a myopic algorithm—one that maximizes the value of the current block without considering the future—guarantees at least 1/2 of the optimal offline social welfare. This result is robust, holding true regardless of the number of resource dimensions involved.

The Role of Resource Augmentation

The paper identifies that while the general packing problem is NP-hard, constant-factor approximations become feasible when the system allows for resource augmentation. This finding is particularly relevant to real-world implementations like Ethereum’s EIP-1559, where block sizes can flex based on demand. With logarithmic slackness, the authors achieve a constant factor approximation for patient users.

Fundamental Limits

The research also establishes a "myopic limit." Any algorithm that behaves reasonably (i.e., does not ignore a superior transaction for an inferior one in the present) cannot exceed a 1/2-approximation as the number of resource dimensions increases. Additionally, they prove a hard lower bound of 7/8, meaning no online algorithm can ever perfectly match the offline optimum; a loss of at least 1/8 of potential welfare is inevitable in the worst-case scenario.

Conclusion and Future Work

This work provides a foundational theoretical framework for multi-dimensional block construction. It demonstrates that simple greedy strategies are surprisingly effective, capturing a significant portion of available welfare.

However, several avenues for future research remain. The current model focuses on algorithmic efficiency and does not account for strategic behavior or game-theoretic incentives; users might manipulate their bids or timing to exploit the scheduling algorithm. Furthermore, the current general-case results rely on slackness that scales with the number of resource dimensions. Future work is needed to find algorithms where these parameters remain fixed constants, and to determine if any non-greedy online algorithm can eventually break the 1/2-approximation barrier.

Summary updated

BibTeX
@misc{eliezer2025online,
  author = {Ariel Ben Eliezer and Noam Nisan},
  title = {{Online Block Packing}},
  year = {2025},
  eprint = {2507.12357},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.12357},
}
Figure