Crates.io | open-transaction-pool |
lib.rs | open-transaction-pool |
version | 0.1.0 |
source | src |
created_at | 2023-06-16 18:18:14.194266 |
updated_at | 2023-06-16 18:18:14.194266 |
description | Open transaction pool is an extensible OTX solution based on memory pool. |
homepage | |
repository | |
max_upload_size | |
id | 892499 |
size | 112,995 |
CKB Open Transaction (OTX) is an extensible transaction format and workflow engine that supports the combination of multiple partial signed OTXs or multi-signed OTXs off-chain to construct a CKB transaction.
Compared to the CKB Transaction format described in the RFC 0022-transaction-structure, OTX can carry more auxiliary information to describe how it can be aggregated into a complete CKB transaction.
This project is an extensible OTX solution based on memory pools. We have developed several user cases in different application scenarios to make the solution reusable and versatile, which facilitates the secondary development of dApps.
We believe that the optimal architecture involves processing OTXs as a data stream. This architecture utilizes a Broker to collect OTXs and dispatch them to Agents.
An Agent serves as both a Consumer and a Producer. It receives OTXs from the Broker, executes its logic, and notifies the Broker of its processing result.
This project is an implementation of this design concept. It uses the memory pool as the Broker and plugins as Agents to expand its application business logic.
Open transactions require support from a corresponding lock script, which should follow the RFC: Composable Open Transaction Lock Script. The locking script that adheres to this RFC can support the partial signing of transactions, providing great convenience for subsequent aggregation and reducing the cost of interaction.
The lock script used in this project is provided by the Omni lock script. We have also utilized the CKB SDK, which has started to support this lock script.
The integration-tests sub-project provides various scenarios for applying OTX, which helps in understanding the project.
The integration-tests README outlines how to build a local development environment.
Existing scenario application cases include:
Thank you for your contribution to the open-source community!