{'fraction_non_alphanumeric': 0.032081911262798635, 'fraction_numerical': 0.0027303754266211604, 'mean_word_length': 5.108333333333333, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Cost-Effective Data Feeds to Blockchains via Workload-Adaptive Data Replication

Feeding external data to a blockchain, a.k.a. data feed, is an essential task to enable blockchain interoperability and support emerging cross-domain applications. Given the data-intensive nature of real-life feeds (e.g., high-frequency price updates) and the high cost of using blockchain, namely Gas, it is imperative to reduce the Gas cost of data feeds. Motivated by the constant-changing workloads in financial applications, this work aims at designing a dynamic, workload-aware approach for Gas cost optimization. This design space is understudied in existing blockchain research which has so far focused on static data placement. This work presents GRuB, a cost-effective data feed that dynamically replicates data between the blockchain and off-chain cloud storage. GRuB monitors the current workload and makes data-replication decisions in a workload-adaptive fashion. Online algorithms are proposed to bound the worstcase cost in Gas. GRuB's decision-making components run on the untrusted cloud off-chain for lower Gas, and employs a security protocol to authenticate the data transferred between the blockchain and cloud. We built a GRuB prototype on Ethereum and supported real financial applications. Using the workloads reconstructed from Ethereum transaction history, we evaluate GRuB's cost and show a Gas saving by 10% ~ 74%, in comparison with the static baselines.