Tilikum:无弱边的DAG上的交易公平排序 Tilikum: Transaction Fair Ordering on a DAG without Weak Edges 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-06-25
⬇️ 2 次下载
👁️ 预览文献
💡 AI 中文简介
DeFi应用依赖交易执行顺序,容易被攻击者重排交易以提取区块链可提取价值(BEV)。现有公平排序研究多针对以太坊等线性区块链,而基于DAG的共识协议虽吞吐量高却缺乏保护。本文提出Tilikum,一种不依赖弱边的DAG账本协议,通过基于中位数的时戳聚合实现批次顺序公平,同时保持低数据冗余和垃圾回收。用Rust实现后与Narwhal/Tusk、Pompē、Themis和FairDAG对比,吞吐量最高提升39倍,并能完全阻止针对DAG的重排攻击。
领域区块链与分布式系统 / 共识协议与公平排序
适合谁读需要一定专业背景(分布式系统、共识算法、区块链安全)
核心贡献1. 提出Tilikum,首个不依赖弱边的DAG公平排序协议,通过中位数时戳聚合实现批次顺序公平,支持垃圾回收和低数据冗余。2. 在Rust中实现并评估,吞吐量比现有公平排序基线最高提升39倍,同时完全阻止针对DAG的重排攻击。
关键数据吞吐量比Narwhal/Tusk、Pompē、Themis和FairDAG等基线最高提升39倍;完全阻止最先进的DAG特定重排攻击;保持低数据冗余和鲁棒垃圾回收。
推荐理由如果你关心DeFi安全或DAG共识,这篇论文给出了一个既高效又能防抢跑的新方案,吞吐量提升高达39倍,值得一读。
关键词["顺序公平共识", "交易排序", "基于DAG的共识", "区块链", "BEV", "重排攻击"]

原文摘要

查看英文原文摘要

Decentralized Finance (DeFi) applications rely heavily on the order in which transactions are executed, making them susceptible to reordering attacks that enable adversaries to extract Blockchain Extractable Value (BEV). While linear blockchain systems such as Ethereum have inspired extensive research into fair ordering mechanisms, DAG-based consensus protocols have remained largely unprotected despite their growing adoption for scalability and performance. In this paper, we introduce Tilikum, a DAG-based ledger protocol that ensures fair transaction ordering without relying on weak edges. Tilikum achieves ordering linearizability by leveraging median-based timestamp aggregation, or batch order fairness, while maintaining low data redundancy and robust garbage collection. We implemented Tilikum in Rust and evaluated it against representative baselines, namely Narwhal/Tusk, Pompē, Themis and FairDAG. Our results show that Tilikum achieves up to $39\times$ higher throughput than other fair-ordering baselines, while fully blocking state-of-the-art DAG-specific reordering attacks.

📚 参考文献 (47 条)

查看全部 47 条
  1. [1] S. Nakamoto. “Bitcoin: A peer-to-peer electronic cash system”. In: (2008).
  2. [2] G. Wood et al. “Ethereum: A secure decentralised generalised transaction ledger”. In: Ethereum project yellow paper 151.2014 (2014), pp. 1–32.
  3. [3] P. Schueffel. “DeFi: Decentralized finance-an introduction and overview”. In: Journal of Innovation Management 9.3 (2021), pp. I–XI. 13
  4. [4] Flashbot. Flashbot MEV Explore. 2024. URL: https://explore. flashbots.net/ (visited on 06/12/2024).
  5. [5] P. Daian, S. Goldfeder, T. Kell, Y. Li, X. Zhao, I. Bentov, L. Breidenbach, and A. Juels. “Flash boys 2.0: Frontrunning, transaction reordering, and consensus instability in decentral- ized exchanges”. In: arXiv preprint arXiv:1904.05234 (2019).
  6. [6] M. Kelkar, F. Zhang, S. Goldfeder, and A. Juels. “Order- fairness for byzantine consensus”. In: Advances in Cryptology– CRYPTO 2020: 40th Annual International Cryptology Confer- ence, CRYPTO 2020, Santa Barbara, CA, USA, August 17–21, 2020, Proceedings, Part III 40. Springer. 2020, pp. 451–480.
  7. [7] Y. Zhang, S. Setty, Q. Chen, L. Zhou, and L. Alvisi. “Byzantine ordered consensus without byzantine oligarchy”. In: 14th USENIX Symposium on Operating Systems Design and Im- plementation (OSDI 20). 2020, pp. 633–649.
  8. [8] M. Castro and B. Liskov. “Practical Byzantine Fault Tolerance”. In: OSDI. 1999.
  9. [9] M. Yin, D. Malkhi, M. K. Reiter, G. G. Gueta, and I. Abraham. “HotStuff: BFT consensus with linearity and responsiveness”. In: Proceedings of the 2019 ACM Symposium on Principles of Distributed Computing. 2019, pp. 347–356.
  10. [10] I. Keidar, E. Kokoris-Kogias, O. Naor, and A. Spiegelman. “All you need is DAG”. In: Proceedings of the 2021 ACM Symposium on Principles of Distributed Computing. 2021, pp. 165–175.
  11. [11] G. Danezis, L. Kokoris-Kogias, A. Sonnino, and A. Spiegelman. “Narwhal and tusk: a dag-based mempool and efficient bft consensus”. In: Proceedings of the Seventeenth European Conference on Computer Systems. 2022, pp. 34–50.
  12. [12] A. Spiegelman, N. Giridharan, A. Sonnino, and L. Kokoris- Kogias. “Bullshark: Dag bft protocols made practical”. In: Pro- ceedings of the 2022 ACM SIGSAC Conference on Computer and Communications Security. 2022, pp. 2705–2718.
  13. [13] P. Jovanovic, L. Kokoris-Kogias, B. Kumara, A. Sonnino, P. Tennage, and I. Zablotchi. “Mahi-mahi: Low-latency asyn- chronous bft dag-based consensus”. In: 2025 IEEE 45th International Conference on Distributed Computing Systems (ICDCS). IEEE. 2025, pp. 549–559.
  14. [14] N. Polyanskii, S. Mueller, and I. Vorobyev. “Starfish: A high throughput BFT protocol on uncertified DAG with linear amortized communication complexity”. In: Cryptology ePrint Archive (2025).
  15. [15] J. Zhang and A. Kate. “No fish is too big for flash boys! frontrunning on DAG-based blockchains”. In: 2025 IEEE Annual Computer Security Applications Conference (ACSAC). IEEE. 2025, pp. 1065–1080.
  16. [16] E. Mahe and S. Tucci-Piergiovanni. “Order Fairness Evaluation of DAG-based ledgers”. In: arXiv preprint arXiv:2502.17270 (2025).
  17. [17] D. Kang, J. Chen, T. T. A. Dinh, and M. Sadoghi. “FairDAG: Consensus Fairness over Multi-Proposer Causal Design”. In: VLDB. 2026.
  18. [18] M. Kelkar, S. Deb, S. Long, A. Juels, and S. Kannan. “Themis: Fast, strong order-fairness in byzantine consensus”. In: Proceedings of the 2023 ACM SIGSAC Conference on Computer and Communications Security. 2023, pp. 475–489.
  19. [19] K. Babel, A. Chursin, G. Danezis, A. Kichidis, L. Kokoris- Kogias, A. Koshy, A. Sonnino, and M. Tian. “Mysticeti: Reaching the Latency Limits with Uncertified DAGs”. In: 32nd Annual Network and Distributed System Security Symposium, NDSS 2025, San Diego, California, USA, February 24-28, 2025. The Internet Society, 2025.
  20. [20] A. Spiegelman, B. Arun, R. Gelashvili, and Z. Li. “Shoal: Improving dag-bft latency and robustness”. In: International Conference on Financial Cryptography and Data Security. Springer. 2024, pp. 92–109.
  21. [21] B. Arun, Z. Li, F. Suri-Payer, S. Das, and A. Spiegelman. “Shoal++: High Throughput {DAG}{BFT} Can Be Fast and Robust!” In: 22nd USENIX Symposium on Networked Systems Design and Implementation (NSDI 25). 2025, pp. 813–826.
  22. [22] G. Danezis, J. Komatovic, L. Kokoris-Kogias, A. Sonnino, and I. Zablotchi. “Byzantine Consensus in the Random Asynchronous Model”. In: 39th International Symposium on Distributed Computing (DISC 2025). Vol. 356. Leibniz International Pro- ceedings in Informatics (LIPIcs). Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2025, 28:1–28:22.
  23. [23] P. Zarbafian and V. Gramoli. “Lyra: Fast and scalable resilience to reordering attacks in blockchains”. In: 2023 IEEE Interna- tional Parallel and Distributed Processing Symposium (IPDPS). IEEE. 2023, pp. 929–939.
  24. [24] S. Gupta, S. Rahnama, J. Hellings, and M. Sadoghi. “Re- silientdb: Global scale resilient blockchain fabric”. In: arXiv preprint arXiv:2002.00160 (2020).
  25. [25] H. Bal, D. Epema, C. De Laat, R. Van Nieuwpoort, J. Romein, F. Seinstra, C. Snoek, and H. Wijshoff. “A medium-scale distributed system for computer science research: Infrastructure for the long term”. In: Computer 49.5 (2016), pp. 54–63.
  26. [26] K. Kursawe. “Wendy, the Good Little Fairness Widget: Achiev- ing Order Fairness for Blockchains”. In: AFT ’20: 2nd ACM Conference on Advances in Financial Technologies, New York, NY, USA, October 21-23, 2020. ACM, 2020, pp. 25–36.
  27. [27] V. Gramoli, Z. Lu, Q. Tang, and P. Zarbafian. “AOAB: optimal and fair ordering of financial transactions”. In: 2024 54th Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN). IEEE. 2024, pp. 377–388.
  28. [28] O. Alpos, I. Amores-Sesar, C. Cachin, and M. Yeo. “Eating Sandwiches: Modular and Lightweight Elimination of Transac- tion Reordering Attacks”. In: 27th International Conference on Principles of Distributed Systems (OPODIS). 2024.
  29. [29] K. Mu, B. Yin, A. Asheralieva, and X. Wei. “Separation is good: A faster order-fairness Byzantine consensus”. In: (2024).
  30. [30] H. Nagda, S. P. Singhal, M. J. Amiri, and B. T. Loo. “Rashnu: Data-Dependent Order-Fairness”. In: Proc. VLDB Endow. (2024).
  31. [31] W. Chen, Y. Feng, J. Zhang, Z. Cai, H.-N. Dai, and Z. Zheng. “Auncel: Fair Byzantine Consensus Protocol with High Performance”. In: IEEE INFOCOM 2024 - IEEE Conference on Computer Communications. 2024.
  32. [32] Y. Wang, X. Xing, G. Wang, Y. Zhang, and P. Li. “Dikaios: Position-anchored group ordering with reputation for fair and efficient Byzantine consensus”. In: Comput. Netw. (2025).
  33. [33] P. Ren, H. Dong, N. Sohrabi, Z. Tari, and P. Zhang. Proof- Carrying Fair Ordering: Asymmetric Verification for BFT via Incremental Graphs. 2025. eprint: 2510.14186.
  34. [34] A. Kiayias, N. Leonardos, and Y. Shen. “Ordering Transac- tions with Bounded Unfairness: Definitions, Complexity and Constructions”. In: Advances in Cryptology – EUROCRYPT 2024: 43rd Annual International Conference on the Theory and Applications of Cryptographic Techniques. 2024.
  35. [35] G. Ramseyer and A. Goel. Fair Ordering in Replicated Systems via Streaming Social Choice. 2024. arXiv: 2304.02730
  36. [36] M. Ciampi, A. Kiayias, and Y. Shen. “Universal composable transaction serialization with order fairness”. In: Annual Inter- national Cryptology Conference. Springer. 2024, pp. 147–180.
  37. [37] C. Cachin, J. Mi´ci´c, N. Steinhauer, and L. Zanolini. “Quick order fairness”. In: International Conference on Financial Cryptography and Data Security. Springer. 2022, pp. 316–333.
  38. [38] I. Amores-Sesar and M. Yeo. Rethinking Consensus with Time as a Primitive. Cryptology ePrint Archive, Paper 2025/1975. 2025.
  39. [39] E. Park, T. Yoon, H. Nam, D. Maram, and M. S. Kang. “On Frontrunning Risks in Batch-Order Fair Systems for 14
  40. Blockchains (Extended Version)”. In: Cryptology ePrint Archive (2025).
  41. [40] D. Malkhi and P. Szalachowski. “Maximal extractable value (mev) protection on a dag”. In: arXiv preprint arXiv:2208.00940 (2022).
  42. [41] R. Fernando, G.-V. Policharla, A. Tonkikh, and Z. Xiang. “TrX: Encrypted Mempools in High Performance BFT Protocols”. In: Cryptology ePrint Archive (2025).
  43. [42] M. A. Vafadar and M. Khabbazian. “Condorcet Attack Against Fair Transaction Ordering”. In: 5th Conference on Advances in Financial Technologies. 2023. APPENDIX A DETAILED COMPARISON WITH FAIRDAG In this section we discuss limitations of FairDAG [17], whether they could be mitigated and explain why Tilikum does not share them. The first part discusses the disadvantages of using weak edges and having redundant transactions in the DAG. Finally, we propose three attack scenarios where a single malicious client can break liveness for the system, and how to prevent this. Table II summarizes the main difference between Tilikum and FairDAG. A. Weak Edges & Redundancy FairDAG [17] relies on weak edges for its implementation. As a transaction needs to appear 2f+1 times in the DAG to be executed, losing the strong theoretical guarantees given by the Validity property is not permissible. As explained by Danezis et al. [11], maintaining weak edges comes at the cost of losing garbage collection. Without garbage collection, the system is unusable in practice, which we believe is a big design shortcoming. The solution adopted by Narwhal/Tusk to achieve validity in the absence of weak edges is to retransmit the payload (i.e., transactions) of blocks that were not committed [11] together with the payload of the block for the round where this is detected. This approach cannot be easily adapted to FairDAG. The execution threshold relies on the assumption that the timestamps in the block created in round r by a replica are always smaller than the ones in future rounds (i.e., r + i for i > 0). If we allow the retransmission of the uncommitted payload of a block created in round r during r+i, the blocks of rounds r < r′ < r + i will effectively include ordering indicators that are larger than the ones in the block for r + i, breaking the assumption. Removing the need for weak edges is then not trivial and reduces the applicability of FairDAG in a realistic scenario. To remove weak edges, replicas should rely on a way to detect the actual exact order of block’s payloads and detect missing ones that might be retransmitted. A mechanism similar to Tilikum’s logical clocks could be employed. Apart from disallowing garbage collection, the way in which FairDAG computes the execution threshold and its reliance on weak edges does not allow for transactions to be inserted into the DAG in a different order than the one shown by their timestamps. This assumption is relatively strong and can be problematic when paired with an asynchronous network. Tilikum does not require transactions to appear more than once in the DAG for it to be executed, as all necessary information is bundled in the batch’s metadata. As now the DAG will have redundant information, if we assume that no other factor is bottlenecking the system, its throughput should be at most the one achieved by the underlying DAG layer divided by the amount of (correct) parties. This does not seem to be the case in the plots provided by the authors [17]. The author re-implemented Narwhal/Tusk [11] on the same framework they used for FairDAG [17], ResilientDB [24]. We think that the reason for this discrepancy is found in the way transactions are treated. 15
  44. TABLE II: Comparison between DAG-based fair ordering approaches FairDAG [17] Narwhal/Tusk with full redundancy (FairDAG’s approach without weak edges) Tilikum (this work) Mempool time complexity NA 2 4 Consensus time complexity unmodified (full blocks of transactions) unmodified (blocks of batch digests) unmodified (blocks of batch digests) Garbage collection % ! ! Expected tx redundancy in DAG 3f + 1 3f + 1 K ∈[f + 1, 3f + 1] Expected # signs per tx in DAG 3f + 1 3f + 1 K(2f + 1), or K with BLS aggregate signatures (not implemented) Execution Liveness with f faulty fast replicas ! % ! Robust against malicious clients %(!with perf. degrada- tion) %(!with perf. degrada- tion) ! Transaction Insertion Order In-order Out-of-order Out-of-order Rebroadcasts None Full block of transactions Hole Fillers + Batch di- gests ResilientDB [24] allows client to batch transactions. These batches are then treated by the underlying protocol (in this case FairDAG on top of Narwhal/Tusk) as a single transaction. This results in a batch of transactions being assigned a single timestamp, removing fairness between them. Moreover, the throughput values were effectively multiplied by the batch size. The default value available in the code was of 400, which means that each 400 transactions were assigned a single timestamp. We also noticed that the script extracting the throughput and latency values from the execution logs was intentionally excluding values lower than 1, 000. While we do not know the rationale behind this decision, we think it is not a correct behavior. Both Tilikum and FairDAG’s execution speeds depend on a threshold which might not grow or grow particularly slowly in periods of network asynchrony or other types of faults. We think that measuring the system’s behavior under these circumstances is more correct, and we did so in our experiments. B. Attacks on Liveness with Malicious Clients FairDAG assumes that “clients generate and submit transac- tions to replicas, then await execution results in response”, and that “there is no assumption that clients always behave cor- rectly; they may exhibit arbitrary or malicious behavior” [17]. This however clashes with the later assumption that “clients broadcast their transactions to all replicas” [17]. If we actually assume arbitrary client behavior, the system suffers from some of its design choices. We now propose three scenarios in which malicious clients can halt the system and break liveness. The first two scenarios are slight variations of each other, but they achieve different results. The first one leads to an overall slowdown in throughput, while the second can potentially stop the execution threshold from advancing, completely blocking the system. We then suggest two mitigation strategies which might have consequences on the scalability of the system. The last attack strategy is more inherent to the system’s assumptions. The main way clients can misbehave is by not actually broadcasting their transactions, but instead send them to a subset of replicas. This has negative outcomes for the client, as also pointed out by the authors, as malicious replicas could censor or delay the inclusion of transactions in their blocks. However, the system makes no assumption that correct replicas will try to include transactions that have not been sent directly by a client. A transaction received only by a subset of parties will then be included only by that same subset of replicas. We will now see how different sizes of this subset impact the system, with two main types of attacks. Let us start with the simple case where a client sends a transaction to S < f+1 parties. In this case, those parties will use some of their block space to include this transaction, thus reducing throughput. The LPAOI of this transaction will however always increase. The entry in lp_ois for the S parties that received it will be constant, but for all other parties it will keep increasing as the DAG expands. Given that the LPAOI is the (f+1)th lowest value in the array and there are less than f+1 constant values, then it will always be changing. The only consequence of this attack is reduced throughput, as block space is taken by this unexecutable transaction, and higher resource usage for the parties that need to keep track of the Ordering Indicators for this transaction. The second possibility for clients is more impactful. If a malicious client sends a transaction t to f+1 < S < 2f+1 parties, the LPAOI will be eventually computed to a constant value, but the transaction will never be executed. As the rest of 16
  45. the DAG grows, the LPAOI of t will eventually be the smallest and become the execution threshold for the system. The transaction t will never receive enough ordering indicators for execution and so it will always remain in the set of transactions without AOI, and always be the transaction determining the execution threshold. The system will then fully come to a halt, with the DAG continuing to expand, but no new transaction being executed. There are two ways in which this issue can be solved, and they both have some impact on the overall throughput of the system. The simpler way requires correct replicas to re- broadcast all transactions they receive to all other replicas, similarly to the third mitigation proposed by Vafadar et al. [42]. The second attack scenario is fully stopped by this mitigation. At least one correct replica will receive the transaction and broadcast it to all other replicas, making it eventually executable. The first attack scenario is still possible, but its impact was not as severe as the second one to begin with. If we want to fully stop the first attack as well, we can introduce a way for replicas to include transactions in their blocks even if they were not received by a client (or by another replica during the re-broadcasting step described above). A correct replica that receives a valid block including a transaction digest d that was not received by any client, can consider the receipt of this block as seeing the transaction for the first time, thus assigning its own ordering indicator and adding d to its next block. This is similar to what Tilikum does. A request for timestamps for a specific batch may include unseen transactions, which are then assigned a Timestamp Pair on the spot. The last way malicious clients can influence the system has to do with how FairDAG stores transactions in the DAG. Transactions are actually not stored in the ledger, but a cryptographically secure digest is used instead to reduce network and storage usage. This works correctly assuming that all replicas have access to all transactions, and have a fast way to match the committed digest to the actual transaction content. A malicious client partially sending a transaction, enough times to allow execution (i.e., 2f+1), can stop parties that did not receive it from knowing its contents, stopping their ability to maintain the correct state. This attack is fully mitigated by the first strategy described above. If at least one correct replica sees the transaction, they will broadcast it allowing every other correct party to store it. Note that Tilikum does not suffer from any of the above issues, all information required for executing a transaction is available in any block including the transaction and the execution threshold always grows, at least at the same speed as the slowest correct node. We believe that one of the above mitigations should be implemented in FairDAG [17], so that their impact on the performance metrics can be measured. APPENDIX B ADDITIONAL PSEUDOCODE For completeness, this appendix collects pseudocode for procedures of Tilikum that were deferred from the main text: Algorithm 3 First-Sight Timestamping at party pi 1: Initialization: 2: lci ←0 ▷local logical counter 3: knowni ←∅ ▷set of already-timestamped transactions 4: storei ←{} ▷map: tx 7→(lc, φ) 5: upon receive transaction tx from client or replica do 6: if tx ∈knowni then 7: return ▷timestamp only on first sight 8: end if 9: lci(tx) ←lci ▷assign current counter value 10: φi(tx) ←CLOCK() ▷record physical time 11: lci ←lci + 1 12: knowni ←knowni ∪{tx} 13: storei[tx] ← lci(tx), φi(tx)  first-sight timestamping (Alg. 3, Sec. IV-A), batch sealing and DAG block creation (Alg. 4, Sec. IV-B), execution-threshold computation for Tilikum-OL (Alg. 5, Sec. IV) and per sub-DAG commit graph processing for Tilikum-BOF (Alg. 6, Sec. V-C). The notation below is shared by all algorithms. Algorithm 4 Batch Sealing (proposer side) and DAG block creation (round r) at party pi 1: procedure SEALBATCH(batch) ▷batch: list of transactions to propose 2: ▷Round 1: collect 2f+1 timestamp vectors 3: broadcast ⟨TSREQUEST, batch⟩to all parties 4: replies ←{} 5: wait until |replies| ≥2f+1 6: upon receive ⟨TSREPLY, batch,⃗vj, σj⟩from pj do 7: if VERIFYSIG(σj, pj) then 8: replies[pj] ←  (lcj(tx), φj(tx))  tx∈batch 9: end if 10: ▷Round 2: reliable storage of sealed batch 11: sealed ←(batch, replies) 12: broadcast ⟨STOREREQ, sealed⟩to all parties 13: acks ←{} 14: wait until |acks| ≥2f+1 15: upon receive ⟨STOREACK, h, σj⟩from pj do 16: if VERIFYSIG(σj, pj) then 17: acks[pj] ←σj 18: end if 19: return h ←HASH(sealed) ▷ready for inclusion in DAG block 20: end procedure 21: procedure CREATEBLOCK(r) 22: payloads ←  HASH(sb) | sb ∈pi.sealedReady
  46. 23: parents ←collect 2f+1 certificates from round r−1 24: fillers ←COMPUTEHOLEFILLERS( ) ▷Alg. 2 25: block ←(pi, r, parents, payloads, fillers) 26: proceed with Narwhal consensus protocol 27: end procedure Notation. Each party pi maintains a monotonically increasing local counter lci and has access to a UNIX physical clock φi(·). A timestamp pair for transaction tx at party pi is (lci(tx), φi(tx)). The set of K parties responsible for in- 17
  47. cluding tx in a block is determined by H(tx) (a deterministic hash-based assignment). Algorithm 5 Execution Threshold via Logical Table (Tilikum- OL) 1: function THRESHOLD(L) 2: H ←[ ] ▷collect head timestamps 3: for all party pj do 4: headj ←smallest lc in L[pj] where lc+1 is absent 5: H.APPEND(headj.φ) 6: end for 7: sort H in ascending order 8: return MEDIAN H[1..2f+1]  9: end function Algorithm 6 Per-commit graph processing (Tilikum-BOF) 1: State (long-lived): 2: graphs ←[ ] 3: node[tx] with fields count, seqnums, graph 4: Fp ←0 for every party p 5: procedure PROCESSSUBDAG(Lr, Ar) 6: Gr ←NEWGRAPH(r); graphs.PUSH(Gr) 7: ▷Advance frontiers and grow count 8: for all (p, tx, ℓ) ∈Ar ∪HoleFillers(Ar) do 9: UPDATELVEC(p, tx, ℓ) 10: if Fp advanced past tx for the first time then 11: node[tx].count += 1 12: end if 13: end for 14: ▷Admit transactions to Gr 15: for all tx updated this round do 16: if node[tx].graph = ⊥and node[tx].count ≥n(1−γ)+ f + 1 then 17: Gr.nodes.ADD(tx) 18: node[tx].graph ←Gr 19: end if 20: end for 21: ▷Aggregate pairwise weights and add edges 22: for all newly admitted tx ∈Gr, tx′ ∈Gr.nodes do 23: update WeightL(tx, tx′) from new contributors 24: if Weight ≥n(1−γ) + f + 1 and no edge exists then 25: add edge in direction of larger weight 26: end if 27: end for 28: ▷Finalize tournaments in round order 29: for all G ∈graphs in round order do 30: if G is not a tournament then break 31: end if 32: [S1, . . . , Ss] ←TARJANSCC(G) 33: j∗←max{j | ∃tx ∈Sj, node[tx].count ≥2f+1} 34: for j = 1, . . . , j∗do 35: append Sj to final ordering 36: end for 37: for j = j∗+1, . . . , s do 38: node[tx].graph ←⊥for tx ∈Sj 39: end for 40: release G from graphs 41: end for 42: end procedure 18