🤖 AI Summary
Blockchain multi-client implementations frequently suffer from forks and security vulnerabilities due to semantic inconsistencies among clients; existing testing approaches fail to detect subtle, divergence-inducing protocol violations. This paper proposes a bimodal collaborative testing framework that tightly integrates formal protocol models (in TLA+ and Promela) into a deterministic blockchain simulation environment, establishing a bidirectional workflow for trace generation and verification—combining symbolic execution, trace comparison, and automated counterexample synthesis. It is the first approach to achieve tight coupling between formal models and simulators, enabling comprehensive detection of protocol semantic deviations. Evaluated on industrial-grade consensus protocols, the framework uncovers multiple critical consistency flaws overlooked by prior testing methods, significantly enhancing semantic consistency assurance across heterogeneous clients.
📝 Abstract
Modern blockchains increasingly consist of multiple clients that implement the blockchain protocol. If there is a semantic mismatch between the protocol implementations, the blockchain can permanently split and introduce new attack vectors. Current ad-hoc test suites for client implementations are not sufficient to ensure a high degree of protocol conformance. As an alternative, we present a framework that performs protocol conformance testing using a formal model of the protocol and an implementation running inside a deterministic blockchain simulator. Our framework consists of two complementary workflows that use the components as trace generators and checkers. Our insight is that both workflows are needed to detect all types of violations. We have applied and demonstrated the utility of our framework on an industrial strength consensus protocol.