Phase Coupling in Cross-Chain Atomic Swaps: A Predictive Latency Model and the Cost of Trustlessness on Hyperledger Besu and Fabric

Published: 20 November 2026| Version 2 | DOI: 10.17632/3ppx2nkv77.2
Contributors:
,

Description

This dataset contains the complete testbed configuration, code and raw measurements for an empirical comparison of two ways of moving an asset between a Hyperledger Besu network (four validators, QBFT consensus, EVM) and a Hyperledger Fabric channel (two organisations, Raft ordering): a hash time-locked contract (HTLC) atomic swap, which needs no trusted party, and a custodial relayer, which holds keys on both chains. Contents: - results/ — 26 raw JSON result files, one per experiment run: single-chain latency and load sweeps for both chains; decomposed atomic swaps at block periods of 5 s, 4 s and 3 s; a paired, interleaved comparison of 50 atomic swaps against 50 custodial transfers; failure-semantics tests (counterparty abandonment, relayer outage); and validator crash-fault runs at round timeouts of 10 s and 15 s. Runs made from November 2026 also record the number, timestamp and proposer of every Besu block. - vm1-besu/ — the Besu genesis with all block-period transitions, Docker Compose file, Solidity contracts (HashedTimelock.sol, Bridge.sol) and the deployment and benchmark scripts, exactly as run. - vm2-fabric/ — the HTLC chaincode (chaincode as a service), the Fabric benchmark scripts and the cross-chain orchestration, experiment and analysis scripts, exactly as run. - figures/ — the five figures of the associated article, regenerated from results/. - Documentation: README, SETUP, RUNBOOK, RESULTS, TROUBLESHOOTING, config-history (every configuration change during the campaign, with block numbers and times) and a results schema. Principal findings that can be recomputed from the files: removing the trusted party cost 2971 ms per transfer (95% CI ±188 ms; Welch's t(49.3) = 31.0), a factor of 2.40; the cross-chain preimage read took 9.5 ms; a phase-coupling model predicts the latency of the dependent Besu stage within 1.6% at three block periods; under a single validator crash, each swap paid one full round timeout or none. Private keys are not included. The code is laboratory software and must not be used on a network that holds value. Associated article: I. Ahmad and O. Farooq, "Phase Coupling in Cross-Chain Atomic Swaps: A Predictive Latency Model and the Cost of Trustlessness on Hyperledger Besu and Fabric", submitted to the Journal of Parallel and Distributed Computing.

Files

Steps to reproduce

1. Hardware: three virtual machines on one host (the original used VMware ESXi 8 on 2x Xeon E5-2620 v4, 64 GB RAM). VM1 (at least 4 vCPU, 8 GB) for Besu; VM2 (at least 4 vCPU, 8 GB) for Fabric and the orchestrator; VM3 (optional) for Prometheus and Grafana. Ubuntu 24.04 or 26.04, Docker 29, Node.js 22. 2. VM1: start the four-validator Besu QBFT network from vm1-besu/besu-qbft (genesis.json, docker-compose.yml); deploy HashedTimelock.sol and Bridge.sol with the scripts in vm1-besu/blockchain-training/scripts (Hardhat, Solidity 0.8.28, evmVersion shanghai). Block period 5 s, requesttimeoutseconds 10. 3. VM2: start the Fabric 2.5.10 test network (two organisations, one Raft orderer, BatchTimeout 2 s, MaxMessageCount 10); deploy the asset-transfer-basic sample and the HTLC chaincode in vm2-fabric/htlc-cc as chaincode-as-a-service; install the scripts in vm2-fabric/fabric-bench and vm2-fabric/swap (npm install). 4. Run the experiments in RUNBOOK.md (E1 to E9): single-chain latency and load (bench-besu, load-besu, bench-fabric, load-fabric), decomposed swaps (batch-swap, batch-swap-p for other block periods), the paired comparison (compare.mjs), failure tests (fail-timeout, fail-relayer) and the validator fault (fail-validator-n). Each run writes a JSON file to results/. Block-period changes need a QBFT transition in genesis.json and a restart of all validators; the new period starts at the restart, not at the configured block (see config-history.md). 5. Recompute: node stats.mjs results/compare-*.json (Welch's test, Table 10); node periods.mjs <5 s file> <3 s or 4 s file> (Table 13); python3 figures.py --results results --out figures (all five figures). Absolute latencies depend on hardware; the paired differences, ratios and phase-coupling predictions should reproduce.

Institutions

Categories

Computer Science, Computer Network, Distributed System, Cryptography, Performance Measurement, Blockchain

Licence