This article belongs to a series of articles that describe blockchain interoperability patterns for the development of custom blockchain interoperability solutions.
Design patterns are best practices for known problems in a specific context, and many have been proposed in different domains (e.g. object-oriented programming and microservices). However, blockchain interoperability is a recent area of work, and little effort has been made to identify patterns that help software architects design their interoperability solutions. Without this knowledge, solving blockchain interoperability becomes complex and costly.
A study performed by Guzmán Llambías from Pyxis and Laura González and Raúl Ruggia from Universidad de la República of Uruguay, aimed to extract design patterns in existing interoperability solutions. Through observing 35 blockchain interoperability solutions, they extracted six interoperability patterns. Four of them were new and two of them were already identified in the literature by other researchers. A pattern catalogue was built using the Alexandrian template and it was evaluated with five semi-structured interviews with blockchain experts regarding its clarity, completeness, and utility. The results showed that all interviewees found the patterns useful, and they may help to speed up their design decisions in their first blockchain interoperability experience.
Key takeaways: 35 blockchain interoperability solutions were analysed and six blockchain interoperability patterns were extracted.
Key takeaways: blockchain interoperability patterns help software architects and developers design their own custom blockchain interoperability solutions based on industry best practices.
Key takeaways: blockchain experts stated that these patterns may speed up their design decisions.
Analysis on Blockchain interoperability solutions
The following table presents the interoperability solutions that were considered in this study and which patterns were extracted from each one.
Figura 1
Blockchain interoperability patterns Catalogue
Figure X presents a graphical overview of the catalogue of blockchain interoperability patterns. Patterns were classified in four areas: infrastructure, data migration, security, and cross-chain applications. Infrastructure patterns describe best practices related to connectivity problems that appear when interoperating two or more blockchains. Data migration patterns describe best practices when developers need to migrate data from one blockchain to another . Security patterns describe practices that developers may follow to improve the security of their interoperability solutions. Finally, cross-chain application patterns describe practices performed at the smart contract level. Table X presents a general overview of the patterns.
Infrastructure patterns
Infrastructure patterns provide best practices related to the connectivity layer of a blockchain architecture. They solve issues regarding message format, connectivity between blockchain and efficiency in this communication.
Relayer pattern
Summary: A third-party middleware called Relayer enables to send the state of an executed transaction from a source blockchain to a target Blockchain
Context: A target blockchain needs the state of an executed transaction on a source blockchain to perform a task (e.g. execute a smart contract).
Problem: How to send the state of an executed transaction from a source blockchain to a target blockchain.
Solution: Use a middleware component called Relayer that listens to the transactions committed on the source blockchain and sends them to the target blockchain. The Relayer enables point-to-point communication between the two blockchains. The Relayer may transform the transaction data format from the source blockchain to the target blockchain data format. The Relayer signs the transaction submitted to the target blockchain on behalf of the source blockchain. The Relayer must wait for X-confirmation blocks before submitting that state on the target blockchain.
Benefits: The main benefit of this pattern is that the source blockchain can send the state of an executed transaction to a target blockchain.
Liabilities: There exist some liabilities when applying this pattern:
• Communication: The Relayer provides a point-to-point communication. A new Relayer must be deployed to enable point-to-point communication to a new blockchain.
• Performance: the Relayer may be a bottleneck and may not send the transaction state in a timely manner
• Costs: the Relayer must pay a transaction fee to submit transactions to the target blockchain.
• Security: the Relayer acts on behalf of the source blockchain by signing transactions submitted to the target blockchain. This hinders the user identity that originated the cross-chain transaction at the source blockchain.
[1] Data migration requires interoperability but also requires other specific best practices. For a complete catalogue of data migration patterns see https://research.csiro.au/blockchainpatterns/general-patterns/migration-patterns/
With a 360° potential, our solutions matrix accompanies the lifecycle of any project, with skills and experience in Development, Design, Q&A, Devops, Operation & Deploy, and Architecture