Payment channel networks (PCNs) are a promising approach to making cryptocurrency transactions faster and more scalable. At their core, PCNs bypass the blockchain by routing transactions through intermediary channels. However, a channel can forward a transaction only if it has the necessary funds: the problem of keeping the channels balanced is a current bottleneck for the PCN's transaction throughput. This paper considers the problem of maximizing the number of transactions accepted by a channel in a PCN. Previous works either considered the associated optimization problem with all transactions known in advance or developed heuristics tested on particular transaction datasets. This work, however, considers the problem in its purely online form where the transactions are arbitrary and revealed one after the other. We show that the problem can be modeled as a new online knapsack variant where the items (transaction proposals) can be either positive or negative depending on the direction of the transaction. The main contribution of this paper is a deterministic online algorithm that is $O(\log B)$-competitive, where $B$ is the knapsack capacity (maximum allowed channel balance). We complement this result with an asymptotically matching lower bound of $Ω(\log B)$ which holds for any randomized algorithm, demonstrating our algorithm's optimality.
翻译:支付通道网络(PCN)是使加密货币交易更快、更具可扩展性的一种有前景的方法。其核心机制是通过中间通道路由交易来绕过区块链。然而,通道仅在拥有必要资金时才能转发交易:保持通道平衡的问题是当前PCN交易吞吐量的瓶颈。本文研究了PCN中通道接受交易数量最大化的问题。先前的工作或考虑所有交易已知情况下的相关优化问题,或开发针对特定交易数据集测试的启发式算法。而本文则考虑该问题的纯在线形式,其中交易是任意的且逐次披露。我们表明该问题可建模为一种新的在线背包变体,其中物品(交易提议)基于交易方向可为正或负。本文的主要贡献在于提出的一种确定性在线算法,其竞争比为$O(\log B)$,其中$B$为背包容量(通道允许的最大余额)。我们通过一个渐近匹配的$Ω(\log B)$下界(该下界对任意随机算法均成立)来补充此结果,从而证明了算法的最优性。