Configuration method and device of modular block chain network, equipment and medium

By using a visual interface to display code templates of the functional layers and data interaction processes of a modular blockchain network, the problem of high difficulty in developing and deploying modular blockchain networks is solved, enabling more efficient development and deployment.

CN120880907APending Publication Date: 2025-10-31HANGZHOU HIGH-TECH ZONE (BINJIANG) INSTITUTE OF BLOCKCHAIN & DATA SECURITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510813162.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

The development and deployment of modular blockchain networks are highly complex, requiring users to possess strong coding skills and a deep understanding of the underlying protocols. It is also difficult to configure and manage the interaction protocols between blockchain networks in a convenient and visual way.

Method used

The code templates for the functional components and data interaction processes corresponding to the functional layers of the modular blockchain network are displayed through a visual interface. Users can edit the code templates by configuring parameters to deploy the modular blockchain network.

Benefits of technology

It reduces the difficulty of developing and deploying modular blockchain networks, improves development and deployment efficiency, and enables more non-professional users to participate in the development and deployment of modular blockchain networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120880907A_ABST
    Figure CN120880907A_ABST
Patent Text Reader

Abstract

The invention is suitable for the technical field of block chains, and provides a configuration method and device of a modular block chain network, equipment and a medium, and the method comprises the steps: displaying a plurality of functional components in a first interface, the functional components corresponding to a first functional layer of the modular block chain network; in response to a configuration instruction received by the functional component, configuring a data acquisition strategy of the first functional layer to obtain a second functional layer corresponding to the first functional layer; under the condition that configuration of the second functional layers corresponding to the multiple functional components is completed, at least one template component corresponding to the multiple functional components is displayed on a second interface; in response to the configuration parameters received by the template component, editing the first code template to obtain a second code template corresponding to the first code template; and in response to a configuration completion instruction received in the first interface, deploying the modular block chain network based on the second function layer and the second code template. And visual configuration and deployment of the modular block chain network are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of blockchain technology, and in particular relates to a method, apparatus, device and medium for configuring a modular blockchain network. Background Technology

[0002] Modular blockchain networks decouple the different functions of traditional blockchain networks into multiple independent modules (also known as functional layers), allowing each functional layer to be independently optimized and upgraded. For example, a modular blockchain network may have dedicated first data availability layer, first execution layer, and settlement layer, and these layers can each utilize different blockchain networks and collaborate to achieve the functions achievable by traditional blockchain networks. Therefore, the development and deployment of modular blockchain networks are receiving increasing attention from users.

[0003] Currently, the development of modular blockchains often requires users to select the blockchain network corresponding to each functional layer and write corresponding program code for the interaction between different blockchain networks. This requires users to have solid coding skills and a deep understanding of the underlying protocols of each blockchain, making the development and deployment of modular blockchain networks quite difficult.

[0004] Therefore, how to reduce the difficulty of developing and deploying modular blockchain networks in order to improve their efficiency has become an urgent technical problem to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, device, and medium for configuring a modular blockchain network, which can solve the problem of how to reduce the difficulty of developing and deploying a modular blockchain network.

[0006] In a first aspect, embodiments of this application provide a method for configuring a modular blockchain network, the method comprising:

[0007] The first interface displays multiple functional components, which correspond to the first functional layer of the modular blockchain network.

[0008] In response to the configuration instructions received by the functional components, the data acquisition strategy of the first functional layer is configured to obtain the second functional layer corresponding to the first functional layer. The data acquisition strategy is used to instruct the functional layer to implement the preset transaction processing function in the modular blockchain network.

[0009] Once the second functional layer configuration corresponding to multiple functional components is completed, at least one template component corresponding to each of the multiple functional components is displayed on the second interface. The template component includes a first code template corresponding to the modular blockchain network, which represents the data interaction process in the modular blockchain network.

[0010] The response template component receives the configuration parameters, edits the first code template, and obtains the second code template corresponding to the first code template;

[0011] In response to receiving the configuration completion instruction on the first interface, a modular blockchain network is deployed based on the second functional layer and the second code template.

[0012] In some embodiments, the method further includes:

[0013] Based on the second functional layer corresponding to multiple functional components, an interaction diagram corresponding to the modular blockchain network is generated. The interaction diagram includes the data flow direction identifier between the second functional layers corresponding to multiple functional components.

[0014] The first interface displays the interactive diagram;

[0015] In response to the operation of selecting a data flow direction indicator in the interactive diagram, the template component corresponding to the selected data flow direction indicator is determined and displayed on the second interface to configure the corresponding first code template.

[0016] In some embodiments, the modular blockchain network includes a first transaction entry point, a first execution layer, and a first data availability layer. Among the multiple functional components, there are a first functional component, a second functional component, and a third functional component. The first functional component includes a first configuration list, the second functional component includes a second configuration list and a third configuration list, and the third functional component includes a data selection list. The first configuration list includes at least one blockchain network that can serve as the first transaction entry point, the second configuration list includes at least one interactive contract corresponding to the first execution layer, the third configuration list includes at least one blockchain network that can serve as the source of state data, and the data selection list includes at least one data type that the first data availability layer can store.

[0017] In response to configuration instructions received by the functional components, the data acquisition strategy of the first functional layer is configured to obtain the second functional layer corresponding to the first functional layer, including:

[0018] In response to the operation of selecting a blockchain network from the first configuration list, the selected blockchain network is configured as the first transaction entry, and the second transaction entry corresponding to the first transaction entry is obtained. The second transaction entry is used to receive transactions and send the transactions to the second execution layer.

[0019] In response, select the interaction contract from the second configuration list and configure the selected interaction contract as the target interaction contract corresponding to the first execution layer;

[0020] In response to the operation of selecting a blockchain network from the third configuration list, the selected blockchain network is configured as the source chain for the first execution layer to obtain state data, thus obtaining the second execution layer corresponding to the first execution layer. The second execution layer is used to execute transactions and generate transaction execution results based on the target interaction contract and the source chain.

[0021] In response to the operation of selecting at least one data type from the data selection list, the selected data type configures the storage strategy of the first data availability layer, resulting in the second data availability layer corresponding to the first data availability layer. The second data availability layer is used to support the data existence verification operation of the modular blockchain network.

[0022] In some embodiments, the modular blockchain network further includes a first main chain, and among the multiple functional components, a fourth functional component is also included. The fourth functional component includes a fourth configuration list, which includes at least one blockchain network capable of serving as the first main chain. The first main chain is used for transaction settlement and consensus. The method further includes:

[0023] In response to the operation of selecting a blockchain network from the fourth configuration list, the selected blockchain network is configured as the first main chain, and the second main chain corresponding to the first main chain is obtained.

[0024] Based on the network identifiers of each blockchain network in the execution library and the network identifier of the second main chain, a fifth configuration list is determined. The execution library includes at least one blockchain network that can serve as the first execution layer, and the fifth configuration list includes at least one blockchain network that can interact with the second main chain.

[0025] In response to the operation of selecting a blockchain network from the fifth configuration list, the selected blockchain network is used as the first execution layer;

[0026] Based on the network identifiers of each interactive contract in the contract library, the network identifiers of the first execution layer, and the network identifiers of the second main chain, the second configuration list is determined.

[0027] Based on the blockchain networks corresponding to the second main chain, the first data availability layer, and the first execution layer, a third configuration list is determined. The second and third configuration lists are used to obtain the second execution layer.

[0028] In some embodiments, the plurality of functional components further includes a fifth functional component, and the method further includes:

[0029] Based on the network identifiers of each blockchain network in the data availability database, the network identifiers of the first execution layer, and the network identifiers of the second main chain, a sixth configuration list is determined. The data availability database includes at least one blockchain network that can serve as the first data availability layer.

[0030] The sixth configuration list is displayed in the fifth functional component;

[0031] In response to the operation of selecting a blockchain network from the sixth configuration list, the selected blockchain network is used as the first data availability layer so that the second data availability layer can be obtained subsequently.

[0032] In some embodiments, the modular blockchain network includes a second main chain, a second execution layer and a second data availability layer, and at least one template component includes a first template component, a second template component, a third template component and a fourth template component. The first template component includes a first sub-code template, the second template component includes a second sub-code template, the third template component includes a third sub-code template, and the fourth template component includes a fourth sub-code template.

[0033] The response template component receives configuration parameters, edits the corresponding code template, and obtains the second code template corresponding to the first code template, including:

[0034] In response to the transaction batch parameters received by the first template component, the first sub-code template is configured to obtain the fifth sub-code template corresponding to the first sub-code template. The fifth sub-code template is used to instruct the second main chain to send the transaction batch to the second execution layer.

[0035] In response to the status data parameters received by the second template component, the second sub-code template is configured to obtain the sixth sub-code template corresponding to the second sub-code template. The sixth sub-code template is used to instruct the second execution layer to obtain status data.

[0036] In response to the execution parameters received by the third template component, the third sub-code template is configured to obtain the seventh sub-code template corresponding to the third sub-code template. The seventh sub-code template is used to instruct the second execution layer to execute the transaction process.

[0037] In response to the data verification parameters received by the fourth template component, the fourth sub-code template is configured to obtain the eighth sub-code template corresponding to the fourth sub-code template. The eighth sub-code template is used to instruct the second data availability layer to perform the data existence verification procedure.

[0038] Secondly, embodiments of this application provide a configuration device for a modular blockchain network, comprising:

[0039] The first display module is used to display multiple functional components in the first interface. The functional components correspond to the first functional layer of the modular blockchain network.

[0040] The first configuration module is used to respond to the configuration instructions received by the functional components, configure the data acquisition strategy of the first functional layer, and obtain the second functional layer corresponding to the first functional layer. The data acquisition strategy is used to instruct the functional layer to implement the preset transaction processing function in the modular blockchain network.

[0041] The second display module is used to display at least one template component corresponding to each of the multiple functional components on the second interface after the configuration of the second functional layer corresponding to the multiple functional components is completed. The template component includes a first code template corresponding to the modular blockchain network, and the code template represents the data interaction process in the modular blockchain network.

[0042] The second configuration module is used to respond to the configuration parameters received by the template component, edit the first code template, and obtain the second code template corresponding to the first code template;

[0043] The deployment module is used to deploy a modular blockchain network based on the second functional layer and the second code template in response to receiving a configuration completion instruction on the first interface.

[0044] Thirdly, embodiments of this application provide an electronic device including a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it causes the electronic device to implement the configuration method of a modular blockchain network as described in any embodiment of the first aspect.

[0045] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the configuration method of a modular blockchain network as described in any embodiment of the first aspect.

[0046] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when run, causes the configuration method of a modular blockchain network as described in any embodiment of the first aspect to be executed.

[0047] The beneficial effects of the embodiments in this application compared with the prior art are:

[0048] The first interface visually displays multiple functional components corresponding to the functional layers of the modular blockchain network, allowing users to intuitively input configuration operations through these components to initially configure the functional layers of the blockchain network. The second interface visually displays corresponding template components. These template components include code templates representing the data interaction processes between the various functional layers of the modular blockchain network. Users can edit these code templates using the configuration parameters received by the template components, allowing for visual modification and customization of existing code templates. After gaining a basic understanding of modular blockchain networks, users can intuitively configure and deploy the functional layers and code templates of the modular blockchain network through the visually displayed functional and template components. This eliminates the need for users to manually write large amounts of code, reducing the development and deployment difficulty of modular blockchain networks and thus improving their development and deployment efficiency. Attached Figure Description

[0049] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 This is a schematic diagram illustrating the working process of a modular blockchain network provided in an embodiment of this application;

[0051] Figure 2 This is a flowchart illustrating a configuration method for a modular blockchain network provided in an embodiment of this application;

[0052] Figure 3 This is one of the schematic diagrams of a first interface provided in the embodiments of this application;

[0053] Figure 4 This is a flowchart illustrating the configuration method of a modular blockchain network in an application scenario.

[0054] Figure 5a This is a second schematic diagram of a first interface provided in an embodiment of this application;

[0055] Figure 5b This is a third schematic diagram of a first interface provided in an embodiment of this application;

[0056] Figure 6 This is a flowchart illustrating the process of configuring a first main chain and determining the configuration list in a second functional component, as provided in an embodiment of this application.

[0057] Figure 7 This is a flowchart illustrating an example of providing an interaction diagram corresponding to a modular blockchain network, as provided in an embodiment of this application.

[0058] Figure 8a This is one of the schematic diagrams of an interaction diagram provided in the embodiments of this application;

[0059] Figure 8b This is a second schematic diagram of an interaction diagram provided in an embodiment of this application;

[0060] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0061] Figure 10 This is a schematic diagram of the configuration device for the modular blockchain network provided in this application embodiment. Detailed Implementation

[0062] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0063] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0064] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0065] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0066] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0067] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0068] Taking the construction of a modular blockchain system that requires settlement and consensus in Ethereum, zkSync as the execution layer to process transactions, and Celestia as the data availability (DA) layer to store relevant transaction data as an example, this paper illustrates the current solutions for developing and deploying (also known as building) modular blockchain networks.

[0069] Users need to write corresponding code modules for the interaction processes between Ethereum, zkSync, and Celestia to complete the construction of a modular blockchain network. Taking the interaction process between Ethereum and zkSync as an example, users need to develop a Layer 2 interaction contract that supports interaction between Ethereum and zkSync, and write programs that can automatically listen for and collect contract events or execution receipts between Ethereum and zkSync. This process is highly complex and requires users to have solid coding skills and a deep understanding of the underlying protocols. Specifically, users first need to parse Ethereum blocks and transaction formats, extract and deserialize relevant contract events from the data parsed by Ethereum. Subsequently, these extracted contract events need to undergo further content parsing and format conversion to adapt to zkSync transaction formats, and finally submit them to the zkSync chain to complete the interaction. This non-visualized programming approach places high demands on users' comprehensive technical capabilities and increases the development and maintenance costs of the modular blockchain network.

[0070] Moreover, when building a modular blockchain network, users often need to select and combine multiple blockchain networks with different functions, and configure and manage the interaction protocols between different blockchain networks. The aforementioned non-visualized modular blockchain network development and deployment scheme makes it difficult for users to configure and manage the interaction protocols in a convenient and visual way, making it difficult for users to efficiently customize and adjust the interaction logic between blockchain networks, thus affecting the development efficiency and deployment speed of modular blockchain networks.

[0071] To address the aforementioned issues, this application provides a configuration method, apparatus, device, and medium for a modular blockchain network. It visually displays the functional components corresponding to each functional layer of the modular blockchain network, as well as template components displaying code templates corresponding to the interaction processes between functional layers. This allows users to input configuration operations or parameters into the displayed components through a visual interface to complete the deployment of the modular blockchain network. Compared to traditional non-visual solutions that require manually writing large amounts of code, the graphical configuration management solution in this application reduces the development difficulty of modular blockchain networks, thereby improving their development and deployment efficiency.

[0072] The following specific embodiments illustrate the configuration method of the modular blockchain network of this application.

[0073] Firstly, to facilitate understanding of the configuration method of the modular blockchain network in the embodiments of this application, as follows: Figure 1 As shown, taking Ethereum as the main chain and transaction entry point, zkSync as the execution layer and Celestia as the DA layer, and taking the example of user A transferring funds to user B, the working process of a modular blockchain network is explained.

[0074] 1. User A initiates a transfer transaction through an Ethereum wallet (an example of an Ethereum transaction gateway), designating User B as the recipient and transferring 10 units of resources to User B. 2. This transfer transaction first enters Ethereum. Ethereum, acting as the transaction gateway, receives this transaction and packages it along with other received transactions into a batch. 3. Ethereum sends this batch of transactions to zkSync. 4. zkSync processes this batch of transactions off-chain. Specifically, this may involve calculating the state changes after each transaction in the batch is executed (e.g., updating the account balances of User A and User B) based on the smart contract code and the current world state of the modular blockchain network, obtaining state transition data. Then, using zero-knowledge proof technology (e.g., zk-SNARKs), a zero-knowledge proof (zk proof) is generated for this batch of transactions. This proof includes a state root (typically a hash value) representing the state change and a zk proof indicating that the batch of transactions was executed according to the correct rules.

[0075] 5. zkSync will contain information such as transaction batches, the original transaction data for each transaction within the batch, zk proofs, and related state transition data. Figure 1The transaction batch data (collectively referred to as transaction batch data) is submitted to Celestia. 6. Celestia processes this data, specifically verifying its availability through Data Availability Sampling (DAS). If the availability verification is successful, Celestia generates a Data Availability Certificate (DAC). 7. Celestia returns the DAC to zkSync, which, upon receiving the DAC, confirms receipt of the Certificate (data) and its on-chain verification. 8. At this point, zkSync sends the zero-knowledge proof (zk proof and state root) to Ethereum so that Ethereum's smart contract can verify it. If the verification is successful, Ethereum updates its state commitment contract, recording the latest state root to record the result of the transaction batch on the blockchain, completing the final settlement. At this point, user B's account balance increases by 10 units. The modular blockchain network completes the entire transaction, which is immutable and final.

[0076] Figure 2 This is a flowchart illustrating a modular blockchain network configuration method provided in an embodiment of this application, as shown below. Figure 2 As shown, the method includes the following steps:

[0077] S101 displays multiple functional components on the first interface.

[0078] The modular blockchain network configuration method of this application embodiment can be applied to electronic devices, such as mobile phones, tablets, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc. This application embodiment does not impose any restrictions on the specific type of electronic device.

[0079] Among them, the functional component corresponds to the first functional layer of the modular blockchain network. The first functional layer is any one of the multiple functional layers of the modular blockchain network, and each functional layer is independent of the others.

[0080] The multiple functional layers include the first main chain and other functional layers, which include at least one of the first transaction entry, the first execution layer, or the first data availability layer.

[0081] The first main chain, as one of the important functional layers in the modular blockchain network, is mainly used for final settlement of transactions and global consensus. The first transaction entry point is the interface through which users or applications submit transactions, marking the starting point for transactions entering the modular blockchain network. The first execution layer is used to batch execute transactions and generate execution results. The first data availability layer (hereinafter referred to as the first DA layer) is used to store the raw transaction data received by the first execution layer for data availability verification.

[0082] The first interface is the one displayed on the electronic device screen, used to configure the modular blockchain network.

[0083] Each functional component can correspond to a functional layer of a modular blockchain network, and each functional component can include at least one configuration option for its corresponding functional layer.

[0084] In one implementation, the electronic device can pre-configure the number of functional layers corresponding to the modular blockchain network, and configure the blockchain network corresponding to at least one functional layer, based on preset initialization configuration rules. For example, the electronic device can pre-configure the modular blockchain network to include three functional layers: a first main chain, a first execution layer, and a first transaction entry point, or it can pre-configure the modular blockchain network to include four functional layers: a first main chain, a first execution layer, a first DA layer, and a first transaction entry point.

[0085] Taking a modular blockchain network comprising four functional layers—the first main chain, the first execution layer, the first DA layer, and the first transaction entry point—as an example, an electronic device can configure the first blockchain network (e.g., Ethereum, Solana, or BNB Chain) as the first main chain of the modular blockchain network, the second blockchain network (e.g., zkSync, OP Stack, or Arbitrum) as the first execution layer, and the third blockchain network (e.g., Celestia, Avail, or EigenDA) as the first DA layer, thus completing the initial construction of the modular blockchain network. This allows the first interface to display multiple functional components, enabling users to visually configure each functional layer of the modular blockchain network based on their actual application needs. It can be understood that the first to third blockchain networks are mutually compatible for data interaction. The first main chain is also called the first layer (layer 1).

[0086] The preset initialization configuration rules include the number of functional layers corresponding to the modular blockchain, and the blockchain network corresponding to at least one functional layer. In this technical solution, electronic devices can pre-configure the specific functional layers corresponding to the modular blockchain network and the blockchain networks selected for each functional layer based on the default initialization configuration rules. This allows users to directly access the specific configuration of the functional layers without having to consider the selection and combination of blockchain networks, saving configuration time for the functional layers of the modular blockchain, reducing the difficulty of developing and deploying the modular blockchain, and accelerating the development and deployment speed of the modular blockchain.

[0087] Electronic devices can display various functional components on the first interface. Each functional component contains configuration options corresponding to its own functional layer, allowing users to intuitively configure the corresponding configuration options and thus configure the corresponding functional layer.

[0088] S102, responding to the configuration instruction received by the functional component, configure the data acquisition strategy of the first functional layer, and obtain the second functional layer corresponding to the first functional layer.

[0089] Data acquisition strategies are used to instruct functional layers to implement preset transaction processing functions during the operation of a modular blockchain network. For example, the data acquisition strategy corresponding to the first execution layer may include the source chain of the interaction contract and state data. During the operation of the modular blockchain network, the first execution layer can interact with the first main chain and the source chain of state data based on the interaction contract to realize the transaction processing function of executing transactions and generating transaction execution results. As another example, the data acquisition strategy corresponding to the first DA layer may include the data type to be stored. During the operation of the modular blockchain network, the first DA layer can interact with the first main chain and the first execution layer based on the data type to obtain data corresponding to the data type for storage and support data existence verification, thus realizing data storage and transaction processing functions that support data existence verification.

[0090] For each functional component, the user can select at least one configuration option in the first interface, or enter the required parameters in the functional component. The electronic device can respond to the operation of selecting configuration options or entering parameters and configure the data acquisition strategy of the functional layer corresponding to the functional component.

[0091] In one implementation, the modular blockchain network includes a first transaction entry point, a first execution layer, and a first data availability layer. Among the multiple functional components, there are a first functional component, a second functional component, and a third functional component. The first functional component includes a first configuration list, the second functional component includes a second configuration list and a third configuration list, and the third functional component includes a data selection list. The first configuration list includes at least one blockchain network that can serve as the first transaction entry point, the second configuration list includes at least one interactive contract corresponding to the first execution layer, the third configuration list includes at least one blockchain network that can serve as the source of state data, and the data selection list includes at least one data type that the first data availability layer can store.

[0092] In response to configuration instructions received by the functional components, the data acquisition strategy of the first functional layer is configured, and the second functional layer corresponding to the first functional layer is obtained, including:

[0093] In response to the operation of selecting a blockchain network from the first configuration list, the selected blockchain network is configured as the first transaction entry, and the second transaction entry corresponding to the first transaction entry is obtained. The second transaction entry is used to receive transactions and send the transactions to the second execution layer.

[0094] In response, select the interaction contract from the second configuration list and configure the selected interaction contract as the target interaction contract corresponding to the first execution layer;

[0095] In response to the operation of selecting a blockchain network from the third configuration list, the selected blockchain network is configured as the source chain for the first execution layer to obtain state data, thus obtaining the second execution layer corresponding to the first execution layer. The second execution layer is used to execute transactions and generate transaction execution results based on the target interaction contract and the source chain.

[0096] In response to the operation of selecting at least one data type from the data selection list, the selected data type configures the storage strategy of the first data availability layer, resulting in the second data availability layer corresponding to the first data availability layer. The second data availability layer is used to support the data existence verification operation of the modular blockchain network.

[0097] State data, also known as world state, is a key set of information recording the global state of a modular blockchain network and is the core of its operation. State data includes, but is not limited to, account information, contract code, or the results of smart contract execution in the modular blockchain network. Account information may include account identifiers (e.g., account name or code) and account balances.

[0098] The target interaction contract corresponding to the first execution layer is used to support data interaction between the second execution layer and the first main chain in the modular blockchain network. The data selection list may include at least one data type from ledger data, transaction data, receipt data, or execution process data. Ledger data represents the collection of all transaction records and state data in the blockchain. Transaction data includes unprocessed transaction information and is the core data unit for transaction processing, verification, and cross-layer collaboration among the functional layers in the modular blockchain network. Receipts represent feedback information generated after transaction processing, including transaction status, gas consumption, and log events. The execution process includes intermediate state data, operation records, and verification information generated during transaction processing and execution in each functional layer.

[0099] In the above technical solution, the electronic device can visually display configuration lists or data selection lists corresponding to different functional layers in different functional components, making it convenient for users to intuitively select configuration options (such as blockchain network or data type) in the list. In response to the user's selection operation, it completes the configuration of the first execution layer, the first transaction entry point, and the first data availability layer in the modular blockchain network. Users do not need to have in-depth knowledge of the complex technical details of each blockchain network. They only need to perform simple configuration operations to complete the configuration of the main functional layers in the modular blockchain network. This reduces the difficulty of developing and deploying the modular blockchain network, enabling more non-professional users to participate in the development and deployment of the modular blockchain network, thereby expanding the application scope of the modular blockchain network.

[0100] In one example, the electronic device displays the configuration options for each functional component in the form of a list. For instance, taking a modular blockchain network that includes a first transaction entry point, a first execution layer, and a first DA layer, where the first main chain of the modular blockchain is Ethereum, the first execution layer is zkSync, and the first DA layer is Celestia as an example, the electronic device can display the first functional component corresponding to the first transaction entry point, the second functional component corresponding to the first execution layer, and the third functional component corresponding to the first DA layer on the first interface.

[0101] like Figure 3As shown, the electronic device directly displays a "Transaction Entry Selection" component (an example of the first functional component) and a list under this component (an example of the first configuration list). This list includes two blockchain networks that can serve as the first transaction entry point: Ethereum and zkSync (an example of configuration options). After the user selects Ethereum, the electronic device can respond to the selection command received by this component and use Ethereum as the first transaction entry point. The "Transaction Entry Selection" component also includes a search box (another example of configuration options). The user can enter the full or partial name of a blockchain network that can serve as the first transaction entry point in this search box. The electronic device responds to the user's input (full or partial) name, searches for the corresponding blockchain network in the list and its own blockchain network library, and displays the searched blockchain networks in a pop-up window for the user to select. If the electronic device determines that the searched blockchain network does not exist in the list under this component, it can also display a warning message. The warning message indicates that the searched blockchain network does not constitute a modular blockchain network and refuses to respond to the selection operation for that blockchain network. In this way, the search service allows users to quickly find the blockchain network they need for configuration.

[0102] The electronic device displays an "Execution Layer Configuration" component (an example of a second functional component) on its first interface, along with two lists under this component. One list (an example of a second configuration list) includes three interaction contracts, designated as contracts 1 to 3, that can be used for interaction between the first main chain and the first execution layer. The other list (an example of a third configuration list) includes two blockchain networks, Ethereum and zkSync, that can serve as sources of state data. When the user selects contract 2, the electronic device responds to this selection instruction and uses contract 2 as the interaction contract between Ethereum and zkSync. When the user selects Ethereum, the electronic device responds to the selection instruction received by this component and uses Ethereum as the source of state data. This state data represents the current state of the modular blockchain network.

[0103] The electronic device displays a "Data Storage Configuration" component (an example of a third functional component) on its first interface, along with a checklist under this component. This checklist includes four types of data that can be stored in Celestia: ledger data, transaction data, receipt data, and execution process data. After the user selects these four data types, the electronic device responds to the selection action received by the component, configuring Celestia to acquire and store these data during the operation of the modular blockchain network. The "Execution Layer Configuration" and "Data Storage Configuration" components also provide search services, similar to those in the "Transaction Entry Selection" component, and will not be elaborated upon further.

[0104] In one application scenario, taking Ethereum as the first main chain, zkSync as the first execution layer, and Celestia as the DA layer in a modular blockchain network as an example, such as... Figure 4 As shown, users can complete the initial configuration of the modular blockchain network in the graphical interface (an example of the first interface) displayed on the electronic device. Specifically, this includes: S31, Transaction Entry Selection. Users can specify which chain is the (first) transaction entry point in the graphical interface. For example, users can choose Ethereum as the entry point for initiating the initial transaction based on business needs, or choose a more suitable blockchain network, such as zkSync, by comprehensively considering practical application factors such as gas fees or transaction confirmation delays. The electronic device can configure the blockchain network corresponding to the transaction entry point in response to the user's selection. S32, Execution Layer Configuration. Users can select the transaction contract and the source chain of the state data in the graphical interface. For example, when zkSync is the (first) execution layer, users can select a suitable Layer 2 interaction contract from the contract list provided in the graphical interface (an example of the second configuration list) and specify whether the state data comes from Ethereum or other related chains. The electronic device can configure the interaction contract between the execution layer and the main chain and the source chain of the state data in response to the user's selection. S33, DA Layer Configuration: Users can select multiple types of content to be stored in the DA layer through a graphical interface, such as ledger data, transaction data, receipt data, or execution process data. The electronic device responds to the user's selections and configures the specific data to be stored in the DA layer. Through simple selection operations, users can flexibly configure the data types stored in the DA layer.

[0105] S103, after the second functional layer configuration corresponding to the multiple functional components is completed, at least one template component corresponding to the multiple functional components is displayed on the second interface.

[0106] The template component includes a first code template corresponding to the modular blockchain network, which represents the data interaction process within the modular blockchain network. The second interface can be a portion of the first interface or a window interface independent of the first interface.

[0107] The electronic device can display various template components on a second interface. Each displayed template component contains at least one configuration option for its corresponding code template, allowing users to intuitively configure the corresponding options and thus the code template. In this way, the electronic device can pre-provide code templates to users, eliminating the need for them to manually write large amounts of code and improving the development and deployment efficiency of modular blockchain networks.

[0108] In one implementation, the electronic device can respond to a user's input template component configuration request, count whether the functional layer corresponding to each functional component has been configured. If the functional layer corresponding to each functional component has been configured, a second interface including at least one template component is displayed. If the functional layer corresponding to at least one functional component has not been configured, the device waits for the functional layer corresponding to each functional component to be configured before displaying the second interface.

[0109] When at least one functional component's corresponding functional layer is not configured, the electronic device can also display a first prompt message on the first interface. This first prompt message indicates that the functional layer corresponding to a functional component is not configured and needs to be configured within that component first. In this technical solution, based on the user's request to configure template components, the system can automatically determine whether to display a second interface based on whether the functional layers corresponding to multiple functional components are configured. This reduces the likelihood of users developing modular blockchain networks in a decentralized manner, thereby ensuring the reliability of modular blockchain network development.

[0110] When the second interface is a portion of the first interface, the electronic device can further determine the configuration status of each template component as configurable in the second interface when the functional layers corresponding to multiple functional components are configured, in response to user input; when there is at least one functional layer corresponding to a functional component, the configuration status of each template component is determined as unconfigurable, in order to refuse to respond to user input. This technical solution allows template components and functional components to be uniformly displayed in the first interface, providing users with a comprehensive and visual configuration experience. This facilitates users quickly grasping the configuration progress of the modular blockchain and automatically modifies the configuration status of template components based on whether the functional layers corresponding to multiple functional components are configured. This reduces the likelihood of users developing modular blockchain networks in a decentralized manner, thereby ensuring the reliability of the modular blockchain network development.

[0111] It is understandable that electronic devices can prompt users that template components are currently unconfigurable by marking each template component in gray or displaying a message below the template component indicating that it is currently unconfigurable in the second interface.

[0112] It is understandable that code templates can be pre-determined and stored based on the possible functional layers and data interaction processes in a modular blockchain network.

[0113] In one implementation, the electronic device includes a code library containing multiple code templates. Before displaying at least one template component corresponding to each of the multiple functional components on the second interface, the electronic device also determines the multiple code templates corresponding to the modular blockchain network from the code library based on the blockchain network configured for each functional layer in the modular blockchain network, and generates a corresponding template component for each determined code template.

[0114] In the code repository, each code template can be associated with at least one blockchain network identifier, which can be the name or number of the blockchain network. When an electronic device configures a corresponding blockchain network for a functional layer, it records the network identifier of that blockchain network. In this way, the electronic device can obtain the network identifiers corresponding to multiple blockchain networks within the modular blockchain network. Furthermore, the electronic device can search the code repository using these network identifiers to obtain multiple corresponding code templates for the modular blockchain network. In this technical solution, the electronic device pre-stores multiple code templates and can automatically retrieve the corresponding code templates from the code repository based on the blockchain networks configured for each functional layer of the modular blockchain network. This eliminates the need for users to write corresponding code for each functional layer of the modular blockchain network, reducing the development and deployment difficulty of the modular blockchain network.

[0115] S104, respond to the configuration parameters received by the template component, edit the first code template, and obtain the second sub-code template corresponding to the first code template.

[0116] For each template component, the user can select at least one configuration option in the template component on the second interface, or enter the required parameters in the template component. The electronic device can respond to the operation of selecting configuration options or entering parameters and configure the code template corresponding to the template component.

[0117] In some embodiments, the modular blockchain network includes a second main chain, a second execution layer and a second data availability layer, and at least one template component includes a first template component, a second template component, a third template component and a fourth template component. The first template component includes a first sub-code template, the second template component includes a second sub-code template, the third template component includes a third sub-code template, and the fourth template component includes a fourth sub-code template.

[0118] The response template component receives configuration parameters, edits the corresponding code template, and obtains the second code template corresponding to the first code template, including:

[0119] In response to the transaction batch parameters received by the first template component, the first sub-code template is configured to obtain the fifth sub-code template corresponding to the first sub-code template. The fifth sub-code template is used to instruct the second main chain to send the transaction batch to the second execution layer.

[0120] In response to the status data parameters received by the second template component, the second sub-code template is configured to obtain the sixth sub-code template corresponding to the second sub-code template. The sixth sub-code template is used to instruct the second execution layer to obtain status data.

[0121] In response to the execution parameters received by the third template component, the third sub-code template is configured to obtain the seventh sub-code template corresponding to the third sub-code template. The seventh sub-code template is used to instruct the second execution layer to execute the transaction process.

[0122] In response to the data verification parameters received by the fourth template component, the fourth sub-code template is configured to obtain the eighth sub-code template corresponding to the fourth sub-code template. The eighth sub-code template is used to instruct the second data availability layer to perform the data existence verification procedure.

[0123] The second main chain is the first main chain of the blockchain network that has been determined to be used.

[0124] The transaction batch parameters include at least one of the following: the modification content of the first sub-code template, the number of transactions that can be submitted by the first sub-code template, the number of transactions that can be cached by the first sub-code template, the memory size corresponding to the first sub-code template, or the number of processors corresponding to the first sub-code template.

[0125] The status data parameters include at least one of the following: the modified content of the second sub-code template, the cache settings of the status data, the memory size corresponding to the second sub-code template, or the number of processors corresponding to the second sub-code template.

[0126] The execution parameters include at least one of the following: the modified content of the third sub-code template, the contract address corresponding to the third sub-code template in the second main chain, or the gas fee corresponding to the third sub-code template.

[0127] The data verification parameters include at least one of the following: the modified content of the fourth sub-code template, the data existence verification period corresponding to the fourth sub-code template, or the number of blocks sampled corresponding to the fourth sub-code template.

[0128] Taking Ethereum as the first main chain, zkSync as the first execution layer, and Celestia as the first DA layer as an example, the first sub-code template is used to detect the content of the rollup contract in Ethereum and send the detected content to zkSync.

[0129] The second sub-code template is used to obtain state data in a modular blockchain network, such as obtaining ledger data based on ledger data identifiers carried in transactions or detecting receipt data generated by zkSync.

[0130] The third sub-code template instructs zkSync to record execution process data (which serves as input to the zero-knowledge proof); execute receipts; submit relevant state transition data to Celestia; upon receiving a confirmation reply from Celestia, retrieve the proof (DAC) and index information related to the transaction batch data from Celestia; generate a zero-knowledge proof for the execution process data; and encapsulate the zero-knowledge proof, the state data on Ethereum, and the root identifier of the ledger data related to the transaction batch stored on Celestia into an Ethereum transaction and submit it to Ethereum. The protocol for zkSync to obtain the root identifier of the ledger data related to the transaction batch stored on Celestia can be pre-defined. For example, zkSync can construct a Merkle tree from the state data stored on Celestia and store the root hash of the Merkle tree in an Ethereum smart contract.

[0131] The fourth sub-code template is used to randomly sample blocks on Ethereum that contain Celestia data and iterate through the samples to propose data existence challenges to Celestia in turn. For example, it calls the Celestia Software Development Kit (SDK) interface to query whether the data exists and verify the correctness of the data existence challenge proof.

[0132] Taking the second interface as a part of the first interface as an example, such as Figure 5aAs shown, the upper half of the visual interface displays the "Transaction Entry Selection" component, the "Execution Layer Configuration" component, and the "Data Storage Configuration" component. The lower half displays the "Status Data Configuration" component (an example of the second template component), the "Execution Interface Configuration" component (an example of the third template component), and the "Data Storage Configuration" component (an example of the fourth template component) within the "Transaction Configuration" component (an example of the first template component). The components displayed in the upper half have higher configuration priority than those displayed in the lower half. Initially, if the electronic device does not detect user input in the "Execution Layer Configuration" component, it will gray out the components displayed in the lower half of the visual interface, indicating that the settings of the components currently displayed in the lower half are not configurable.

[0133] After the user has entered configuration operations in the "Transaction Entry Selection" component, the "Execution Layer Configuration" component, and the "Data Storage Configuration" component, such as Figure 5b As shown, the electronic device will set the components displayed in the lower half of the visualization interface to white, indicating that the settings of the components currently displayed in the lower half are configurable. Users can enter the required information in the configuration options for "Number of Submitted Transaction Batches," "Number of Cached Transaction Batches," "Number of Processors," "Code Modification," and "Memory Size" in the "Transaction Configuration" component to configure the first sub-code template. After configuration, the first sub-code template becomes the fifth sub-code template. Users can enter the required information in the configuration options for "Code Modification," "Number of Processors," and "Memory Size" in the "Status Data Configuration" component to configure the second sub-code template. After configuration, the second sub-code template becomes the sixth sub-code template. Users can enter the required information in the configuration options for "Contract Address," "Gas Fee," "Number of Processors," "Code Modification," and "Memory Size" in the "Execution Data Configuration" component to configure the third sub-code template. After configuration, the third sub-code template becomes the seventh sub-code template. Users can enter the required content in the configuration options of "Code Modification", "Sampling Quantity" and "Verification Period" in the "Data Storage Configuration" component to configure the fourth sub-code template. After configuration, the fourth sub-code template will become the eighth sub-code template. Figure 5a and Figure 5b The configuration options in the above template components are not displayed.

[0134] S105, in response to receiving a configuration completion instruction on the first interface, deploys a modular blockchain network based on the second functional layer and the second code template.

[0135] The first interface provides a component to indicate that the configuration is complete. After the user selects the component on the first interface, the electronic device will receive the configuration completion instruction and generate a configuration file corresponding to the modular blockchain network based on the configured functional layer (i.e., the second functional layer) and the configured code template (i.e., the second code template). The configuration file includes code describing all data interaction processes in the modular blockchain network. Based on the configuration file, the modular blockchain network is deployed to the designated server for subsequent use by the user.

[0136] Continue to combine Figure 4 In the application scenario shown, after the electronic device completes the initial configuration of the modular blockchain network in response to the user's configuration operation, it can enter S35 and expand the configuration drawer. When the user needs to configure the interaction logic between the main chain, the execution layer, and the DA layer, he / she can click the "Expand Configuration Drawer" button in the visualization interface. The electronic device responds to this click operation (an example of responding to the user's input template component configuration request) and displays the configuration drawer (an example of displaying at least one template component corresponding to multiple functional components on the second interface, and an example of the configuration drawer being a template component), so as to enter S36 to S310 so that the user can configure the interaction logic.

[0137] S36, Configure transaction batch (responding to the transaction batch parameters received by the first template component, configuring an example of the first code template). At this time, the electronic device provides a code template in advance (an example of the first sub-code template). The electronic device can respond to the user's setting operation of the code template entered in the visual interface to configure the number of transactions in the transaction batch submitted by Ehtereum to zkSync at one time, as well as the upper limit of the number of transactions output by Ehtereum that can be cached in the corresponding storage location of the code template (i.e., setting transaction parameters). At the same time, it supports users to configure related resources, such as the central processing unit (CPU) and memory.

[0138] S37, Configure status data (an example of configuring the second sub-code template in response to status data parameters received by the second template component). At this point, the electronic device pre-provides a code template (an example of the second sub-code template), which the user can customize in the visual interface to suit different business logic. It also supports user configuration of whether status data is cached (i.e., setting cache parameters) and configuration of related resources such as CPU and memory. For example, if the business has high real-time requirements, caching status data can be selected; if the data processing volume is large, the allocation of CPU and memory can be appropriately increased.

[0139] S38, Configure Execution Result (Response to Execution Parameters Received by the Third Template Component, Example of Configuring the Third Sub-Code Template). At this point, the electronic device pre-provides a code template (an example of the third sub-code template). The electronic device can respond to the user's setting operation of the code template entered in the visual interface to configure parameters such as the contract address and gas fee for Ehtereum to receive transactions. It also supports users configuring related resources such as CPU and memory to optimize transaction execution efficiency.

[0140] S39, Configure Data Availability Verification (responding to the data verification parameters received by the fourth template component, configuring the fourth sub-code template). At this time, the electronic device provides a code template in advance (an example of the fourth sub-code template). Users can modify the code template according to actual needs. The electronic device can respond to the user's setting operation of the code template entered in the visual interface to configure Celestia's data availability verification challenge cycle (i.e., how often data existence verification is performed) and random sampling size (i.e., the number of blocks sampled each time). It also supports user configuration of related resources such as CPU, memory, and whether to deploy a specified service independently.

[0141] S10, Complete Configuration: After the user completes the initial configuration, parameter settings in all configuration drawers, and code template customization modifications, the user can click the "Generate" button in the visual interface. The electronic device will respond to this click operation and generate the corresponding code and configuration file according to the user's configuration, thus completing the entire modular blockchain configuration process.

[0142] In this embodiment, a first interface visually displays multiple functional components corresponding to the functional layers of the modular blockchain network, allowing users to intuitively input configuration operations through these components to initially configure the functional layers of the blockchain network. A second interface visually displays template components, which include code templates representing the interaction processes between the various functional layers of the modular blockchain network. These templates can be edited using configuration parameters received by the template components, allowing users to visually modify and customize existing code templates. After gaining a basic understanding of modular blockchain networks, users can intuitively configure and deploy the functional layers and code templates of the modular blockchain network through the visually displayed functional and template components. This eliminates the need for users to manually write large amounts of code, reducing the development and deployment difficulty of the modular blockchain network and thus improving its development and deployment efficiency.

[0143] Figure 6 This is a flowchart illustrating the configuration of a first main chain and the determination of a configuration list in a second functional component, as provided in an embodiment of this application. The method includes:

[0144] S201, in response to the operation of selecting a blockchain network from the fourth configuration list, configure the selected blockchain network as the first main chain, and obtain the second main chain corresponding to the first main chain.

[0145] The modular blockchain network's functional layer also includes a first main chain, and among the multiple functional components, there is a fourth functional component. The fourth functional component includes a fourth configuration list, which includes at least one blockchain network that can serve as the first main chain. The first main chain is used for transaction settlement and consensus.

[0146] S202, based on the network identifiers of each blockchain network in the execution library and the network identifier of the second main chain, determine the fifth configuration list.

[0147] The execution library includes at least one blockchain network capable of serving as the first execution layer, and the fifth configuration list includes at least one blockchain network capable of interacting with the second main chain. Each blockchain network in the execution library can be associated with the network identifier of the blockchain network capable of serving as the first main chain.

[0148] The electronic device can obtain the network identifier of the blockchain network corresponding to the second main chain, and query the blockchain network corresponding to the network identifier in the execution library based on the obtained network identifier. The queried blockchain networks are then grouped together to obtain the fifth configuration list.

[0149] S203, in response to the operation of selecting a blockchain network from the fifth configuration list, the selected blockchain network is used as the first execution layer.

[0150] The electronic device responds to the user's selection of a blockchain network from the fifth configuration list and uses the user-selected blockchain network as the first execution layer of the modular blockchain network.

[0151] S204. Based on the network identifiers of each interactive contract in the contract library, the network identifiers of the first execution layer, and the network identifiers of the second main chain, determine the second configuration list.

[0152] The contract library includes multiple interactive contracts. Each interactive contract corresponds to a first network identifier and a second network identifier. The first network identifier is the network identifier of a blockchain network that can serve as the first execution layer, and the second network identifier is the network identifier of a blockchain network that can serve as the first main chain.

[0153] When the electronic device identifies the blockchain network as the first execution layer, there is a lack of necessary interaction contracts between the blockchain network corresponding to the first execution layer and the blockchain network corresponding to the second main chain. Therefore, the electronic device analyzes the network identifiers of the current first execution layer and the second main chain, and searches the contract library for interaction contracts that match the two analyzed network identifiers, thereby obtaining the second configuration list.

[0154] S205, based on the blockchain network corresponding to the second main chain, the first data availability layer and the first execution layer, determines the third configuration list.

[0155] The second configuration list and the third configuration list are used to obtain the second execution layer.

[0156] The electronic device can use the second main chain, the first data availability layer, and the first execution layer as source chains for state data, and aggregate them into the third configuration list. The second configuration list and the third configuration list are displayed in the second component so that the user can further configure the first execution layer to obtain the second execution layer.

[0157] For example, if an electronic device configures Solana as the first main chain and Arbitrum as the first execution layer in response to a user's choice, it can be determined that the interaction contracts in the second configuration list include interaction contracts 3 to 4 in the contract library, all of which can support interaction between Solana and Arbitrum.

[0158] In some embodiments, the plurality of functional components further includes a fifth functional component, and the method further includes:

[0159] Based on the network identifiers of each blockchain network in the data availability database, the network identifiers of the first execution layer, and the network identifiers of the second main chain, a sixth configuration list is determined. The data availability database includes at least one blockchain network that can serve as the first data availability layer.

[0160] The sixth configuration list is displayed in the fifth functional component;

[0161] In response to the operation of selecting a blockchain network from the sixth configuration list, the selected blockchain network is used as the first data availability layer so that the second data availability layer can be obtained subsequently.

[0162] Each blockchain network in the data availability database is associated with at least one network identifier. After configuring the blockchain networks corresponding to the first execution layer and the first main chain, the electronic device can obtain the network identifiers of the two configured blockchain networks, and search for blockchain networks in the data availability database that match both network identifiers. The found blockchain networks are then grouped together to obtain a sixth configuration list. A fifth functional component, including this six configuration list, is displayed on the first interface, allowing users to flexibly configure the blockchain network corresponding to the DA layer, in addition to flexibly configuring the blockchain networks corresponding to the first execution layer and the first main chain.

[0163] In this embodiment, the electronic device can display a fourth configuration list in the fourth functional component. Users can quickly determine the first main chain corresponding to the modular blockchain network by selecting a blockchain network from this configuration list. Furthermore, based on the type of each blockchain network in the execution library and the network identifier of the second main chain, the device can automatically recommend blockchain networks that can serve as the first execution layer to the user. This allows users to determine the blockchain network corresponding to the required first execution layer, providing a service for flexibly configuring the first main chain and first execution layer of the modular blockchain network, making the modular blockchain network more suitable for user needs. Based on the user's selection of the blockchain networks for the first execution layer, first main chain, and first data availability layer, the device can determine a second configuration list and a third configuration list in the second functional component, achieving the purpose of displaying the corresponding configuration list according to the user's configuration. This reduces the difficulty for users to consider the interaction and combination between various blockchain networks in the modular blockchain network, thereby reducing the development and deployment difficulty of the modular blockchain network.

[0164] Figure 7 This application provides a flowchart illustrating the provision of an interaction diagram corresponding to a modular blockchain network, the method comprising:

[0165] S301 generates an interaction diagram corresponding to the modular blockchain network based on the second functional layer corresponding to multiple functional components.

[0166] The interaction diagram includes data flow indicators between the second functional layers corresponding to multiple functional components.

[0167] The electronic device analyzes the transaction functions corresponding to each of the second functional layers, and based on the analyzed transaction functions, determines the data interaction process between each second functional layer, thereby determining the data flow direction between each second functional layer, and generating an interaction diagram based on the determined data flow direction.

[0168] For example, a modular blockchain network includes a second main chain, a second execution layer, and a second data availability layer. The second data availability layer is configured to store ledger data, transaction data, receipt data, and execution process data; the source chain for state data is either the second main chain or the configured execution chain. Figure 8aWhen zkSync (an example of the second execution layer) executes a transaction, it needs to retrieve multiple transactions from Ethereum (an example of the second main chain) and package them together. During transaction execution, it also retrieves state data from the source chain of the state data. After zkSync completes the transaction, it sends it to Ethereum and stores the execution result, including ledger data, transaction data, receipt data, and execution process data, in Celestia. Ethereum then encapsulates the received transactions into blocks for on-chain storage. Celestia (an example of the second data availability layer) organizes the retrieved ledger data into a root hash and submits it to Ethereum.

[0169] The interaction diagram includes line 701 with an arrow pointing from Ethereum to zkSync (an example of data flow identification), marking the process of transaction-related data flowing from Ethereum to zkSync for execution. There is also line 702 with an arrow pointing from zkSync to Celestia, indicating that execution results, including ledger data, are stored in Celestia. Finally, there is line 703 with an arrow pointing from Celestia to Ethereum, representing the process of Celestia organizing the ledger data into a root hash and submitting it to Ethereum.

[0170] If the second data availability layer is configured not to store ledger data, then during transaction execution, there is no process where Celestia organizes the acquired ledger data into a root hash and submits it to Ethereum. Combined with... Figure 8b In this scenario, the interaction diagram includes arrowed lines 704 pointing from Ethereum to zkSync and 705 pointing from zkSync to Celestia. The arrowed line from zkSync to Celestia indicates that the execution results, which only contain transaction data, receipt data, and execution process data, are sent from zkSync to Celestia, and do not contain ledger data. There is no line pointing from Celestia to Ethereum for submitting the root hash of the ledger data.

[0171] Combination Figure 4 The application scenario shown in S34 automatically generates an interactive diagram on the electronic device, which can then be configured to expand the drawer in S35, facilitating further configuration of the modular blockchain network by the user.

[0172] S302 displays an interactive diagram on the first interface.

[0173] S303, responding to the operation of selecting the data flow direction indicator in the interactive diagram, determines the template component corresponding to the selected data flow direction indicator, and displays the determined template component on the second interface to configure the corresponding code template.

[0174] After generating the interaction diagram, the electronic device will also associate a template component with the corresponding data interaction process for each data flow indicator in the interaction diagram, based on the data interaction process between the various second functional layers. After the user selects a data flow indicator on the first interface, the electronic device will respond to the selection operation by displaying the template component associated with that data flow indicator on the second interface, so that the user can input configuration parameters in the template component to configure the corresponding code template.

[0175] For example, continue to combine Figure 8b The electronic device can associate a component for configuring a transaction batch (an example of a first template component) and a component for configuring state data (an example of a second template component) to line 704, and associate a component for configuring execution results (an example of a third template component) and a component for configuring data existence challenge verification operations (an example of a fourth template component) to line 705. Combined with... Figure 8a The electronic device can associate the component for configuring the transaction batch and the component for configuring the status data to line 701, associate the component for configuring the execution result to line 702, and associate the component for configuring the data existence challenge verification operation to line 703.

[0176] In this embodiment, after configuring the second functional layers corresponding to multiple functional components, a graphical interaction diagram can be automatically generated, supporting the selection of data flow direction identifiers in the interaction diagram to configure response code templates. This allows for a clear presentation of the data flow and interaction logic between the functional layers of the modular blockchain network based on the interaction diagram, facilitating users' rapid understanding of the network architecture during debugging and maintenance. This enhances the visualization and maintainability of the modular blockchain network.

[0177] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 9 As shown, the electronic device 6 of this embodiment includes: at least one processor 60 ( Figure 9 (Only one is shown) a processor, a memory 61, and a computer program 62 stored in the memory 61 and executable on the at least one processor 60, wherein the processor 60 executes the computer program 62 to implement the steps in any of the above-described data processing method embodiments.

[0178] The electronic device 6 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. This electronic device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will understand that... Figure 9 This is merely an example of electronic device 6 and does not constitute a limitation on electronic device 6. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0179] The processor 60 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0180] In some embodiments, the memory 61 may be an internal storage unit of the electronic device 6, such as a hard disk or memory of the electronic device 6. In other embodiments, the memory 61 may be an external storage device of the electronic device 6, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 6. Furthermore, the memory 61 may include both internal and external storage units of the electronic device 6. The memory 61 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 61 can also be used to temporarily store data that has been output or will be output.

[0181] Corresponding to the data processing method described in the above embodiments, Figure 10 A structural block diagram of a configuration device for a modular blockchain network provided in an embodiment of this application is shown. For ease of explanation, only the parts related to the embodiments of this application are shown.

[0182] Reference Figure 10 The device includes:

[0183] The first display module 100 is used to display multiple functional components in the first interface. The functional components correspond to the first functional layer of the modular blockchain network.

[0184] The first configuration module 200 is used to respond to the configuration instructions received by the functional components, configure the data acquisition strategy of the first functional layer, and obtain the second functional layer corresponding to the first functional layer. The data acquisition strategy is used to instruct the functional layer to implement the preset transaction processing function in the modular blockchain network.

[0185] The second display module 300 is used to display at least one template component corresponding to each of the multiple functional components on the second interface after the configuration of the second functional layer corresponding to the multiple functional components is completed. The template component includes a first code template corresponding to the modular blockchain network. The code template represents the data interaction process in the modular blockchain network.

[0186] The second configuration module 400 is used to respond to the configuration parameters received by the template component, edit the first code template, and obtain the second code template corresponding to the first code template;

[0187] Deployment module 500 is used to deploy a modular blockchain network based on the second functional layer and the second code template in response to receiving a configuration completion instruction on the first interface.

[0188] In some embodiments, the apparatus further includes:

[0189] The generation module is used to generate an interaction diagram corresponding to the modular blockchain network based on the second functional layer corresponding to multiple functional components. The interaction diagram includes data flow indicators between the second functional layers corresponding to multiple functional components.

[0190] The first display module is also used to display interactive diagrams on the first interface;

[0191] The "Determine" module is used to respond to the operation of selecting a data flow direction indicator in the interaction diagram, determine the template component corresponding to the selected data flow direction indicator, and display the determined template component on the second interface to configure the corresponding code template.

[0192] In some embodiments, the modular blockchain network includes a first transaction entry point, a first execution layer, and a first data availability layer. Among the multiple functional components, there are a first functional component, a second functional component, and a third functional component. The first functional component includes a first configuration list, the second functional component includes a second configuration list and a third configuration list, and the third functional component includes a data selection list. The first configuration list includes at least one blockchain network that can serve as the first transaction entry point, the second configuration list includes at least one interactive contract corresponding to the first execution layer, the third configuration list includes at least one blockchain network that can serve as the source of state data, and the data selection list includes at least one data type that the first data availability layer can store.

[0193] The first configuration module is also used for:

[0194] In response to the operation of selecting a blockchain network from the first configuration list, the selected blockchain network is configured as the first transaction entry, and the second transaction entry corresponding to the first transaction entry is obtained. The second transaction entry is used to receive transactions and send the transactions to the second execution layer.

[0195] In response, select the interaction contract from the second configuration list and configure the selected interaction contract as the target interaction contract corresponding to the first execution layer;

[0196] In response to the operation of selecting a blockchain network from the third configuration list, the selected blockchain network is configured as the source chain for the first execution layer to obtain state data, thus obtaining the second execution layer corresponding to the first execution layer. The second execution layer is used to execute transactions and generate transaction execution results based on the target interaction contract and the source chain.

[0197] In response to the operation of selecting at least one data type from the data selection list, the selected data type configures the storage strategy of the first data availability layer, resulting in the second data availability layer corresponding to the first data availability layer. The second data availability layer is used to support the data existence verification operation of the modular blockchain network.

[0198] In some embodiments, the modular blockchain network further includes a first main chain, and among the multiple functional components, a fourth functional component is further included. The fourth functional component includes a fourth configuration list, which includes at least one blockchain network capable of serving as the first main chain. The first main chain is used for transaction settlement and consensus. The apparatus further includes:

[0199] The third configuration module is used to respond to the operation of selecting a blockchain network from the fourth configuration list, configure the selected blockchain network as the first main chain, and obtain the second main chain corresponding to the first main chain.

[0200] The determination module is also used to determine the fifth configuration list based on the network identifiers corresponding to each blockchain network in the execution library and the network identifier of the second main chain. The execution library includes at least one blockchain network that can serve as the first execution layer, and the fifth configuration list includes at least one blockchain network that can interact with the second main chain.

[0201] The third configuration module is also used to respond to the operation of selecting a blockchain network from the fifth configuration list, and to use the selected blockchain network as the first execution layer;

[0202] The determination module is also used to determine the second configuration list based on the network identifiers corresponding to each interactive contract in the contract library, the network identifiers of the first execution layer, and the network identifiers of the second main chain;

[0203] The determination module is also used to determine a third configuration list based on the blockchain network corresponding to the second main chain, the first data availability layer, and the first execution layer. The second and third configuration lists are used to obtain the second execution layer.

[0204] In some embodiments, the plurality of functional components further includes a fifth functional component, and the apparatus further includes:

[0205] The determination module is also used to determine the sixth configuration list based on the network identifiers of each blockchain network in the data availability library, the network identifiers of the first execution layer, and the network identifiers of the second main chain. The data availability library includes at least one blockchain network that can serve as the first data availability layer.

[0206] The third display module is used to display the sixth configuration list in the fifth functional component;

[0207] The fourth configuration module is used to respond to the operation of selecting a blockchain network from the sixth configuration list, and to use the selected blockchain network as the first data availability layer so that the second data availability layer can be obtained subsequently.

[0208] In some embodiments, the modular blockchain network includes a second main chain, a second execution layer and a second data availability layer, and at least one template component includes a first template component, a second template component, a third template component and a fourth template component. The first template component includes a first sub-code template, the second template component includes a second sub-code template, the third template component includes a third sub-code template, and the fourth template component includes a fourth sub-code template.

[0209] The second configuration module is also used for:

[0210] In response to the transaction batch parameters received by the first template component, the first sub-code template is configured to obtain the fifth sub-code template corresponding to the first sub-code template. The fifth sub-code template is used to instruct the second main chain to send the transaction batch to the second execution layer.

[0211] In response to the status data parameters received by the second template component, the second sub-code template is configured to obtain the sixth sub-code template corresponding to the second sub-code template. The sixth sub-code template is used to instruct the second execution layer to obtain status data.

[0212] In response to the execution parameters received by the third template component, the third sub-code template is configured to obtain the seventh sub-code template corresponding to the third sub-code template. The seventh sub-code template is used to instruct the second execution layer to execute the transaction process.

[0213] In response to the data verification parameters received by the fourth template component, the fourth sub-code template is configured to obtain the eighth sub-code template corresponding to the fourth sub-code template. The eighth sub-code template is used to instruct the second data availability layer to perform the data existence verification procedure.

[0214] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0215] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0216] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0217] This application provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.

[0218] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0219] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0220] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0221] In the embodiments provided in this application, it should be understood that the disclosed apparatus / network devices and methods can be implemented in other ways. For example, the apparatus / network device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0222] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0223] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for configuring a modular blockchain network, characterized in that, The method includes: The first interface displays multiple functional components, which correspond to the first functional layer of the modular blockchain network. In response to the configuration instruction received by the functional component, the data acquisition strategy of the first functional layer is configured to obtain the second functional layer corresponding to the first functional layer. The data acquisition strategy is used to instruct the functional layer to implement the preset transaction processing function in the modular blockchain network. Once the second functional layer corresponding to the plurality of functional components is configured, at least one template component corresponding to the plurality of functional components is displayed on the second interface. The template component includes a first code template corresponding to the modular blockchain network, and the first code template represents the data interaction process in the modular blockchain network. In response to the configuration parameters received by the template component, the first code template is edited to obtain the second code template corresponding to the first code template; In response to receiving a configuration completion instruction on the first interface, the modular blockchain network is deployed based on the second functional layer and the second code template.

2. The method as described in claim 1, characterized in that, The method further includes: Based on the second functional layer corresponding to the multiple functional components, an interaction diagram corresponding to the modular blockchain network is generated. The interaction diagram includes data flow direction identifiers between the second functional layers corresponding to the multiple functional components. The interactive diagram is displayed on the first interface; In response to the operation of selecting the data flow direction identifier in the interaction diagram, the template component corresponding to the selected data flow direction identifier is determined, and the determined template component is displayed on the second interface to configure the corresponding first code template.

3. The method as described in claim 1 or 2, characterized in that, The modular blockchain network includes a first transaction entry point, a first execution layer, and a first data availability layer. The multiple functional components include a first functional component, a second functional component, and a third functional component. The first functional component includes a first configuration list, the second functional component includes a second configuration list and a third configuration list, and the third functional component includes a data selection list. The first configuration list includes at least one blockchain network that can serve as the first transaction entry point, the second configuration list includes at least one interactive contract corresponding to the first execution layer, the third configuration list includes at least one blockchain network that can serve as a source of state data, and the data selection list includes at least one data type that the first data availability layer can store. The step of responding to the configuration instruction received by the functional component, configuring the data acquisition strategy of the first functional layer, and obtaining the second functional layer corresponding to the first functional layer includes: In response to the operation of selecting a blockchain network from the first configuration list, the selected blockchain network is configured as the first transaction entry, and a second transaction entry corresponding to the first transaction entry is obtained. The second transaction entry is used to receive transactions and send the transactions to the second execution layer. In response, select the interaction contract from the second configuration list and configure the selected interaction contract as the target interaction contract corresponding to the first execution layer; In response to the operation of selecting a blockchain network from the third configuration list, the selected blockchain network is configured as the source chain for the first execution layer to obtain state data, thereby obtaining a second execution layer corresponding to the first execution layer. The second execution layer is used to execute the transaction and generate the execution result of the transaction based on the target interaction contract and the source chain. In response to the operation of selecting at least one data type from the data selection list, the selected data type configures the storage strategy of the first data availability layer, thereby obtaining a second data availability layer corresponding to the first data availability layer. The second data availability layer is used to support data existence verification operations of the modular blockchain network.

4. The method as described in claim 3, characterized in that, The modular blockchain network further includes a first main chain, and the plurality of functional components further includes a fourth functional component. The fourth functional component includes a fourth configuration list, which includes at least one blockchain network that can serve as the first main chain. The first main chain is used for transaction settlement and consensus. The method further includes: In response to the operation of selecting a blockchain network from the fourth configuration list, the selected blockchain network is configured as the first main chain, and the second main chain corresponding to the first main chain is obtained. Based on the network identifiers corresponding to each blockchain network in the execution library and the network identifier of the second main chain, a fifth configuration list is determined. The execution library includes at least one blockchain network that can serve as the first execution layer, and the fifth configuration list includes at least one blockchain network that can interact with the second main chain. In response to the operation of selecting a blockchain network from the fifth configuration list, the selected blockchain network is used as the first execution layer; The second configuration list is determined based on the network identifiers of each interactive contract in the contract library, the network identifiers of the first execution layer, and the network identifiers of the second main chain. Based on the blockchain networks corresponding to the second main chain, the first data availability layer, and the first execution layer, the third configuration list is determined, and the second configuration list and the third configuration list are used to obtain the second execution layer.

5. The method as described in claim 4, characterized in that, The plurality of functional components further includes a fifth functional component, and the method further includes: Based on the network identifiers of each blockchain network in the data availability library, the network identifier of the first execution layer, and the network identifier of the second main chain, a sixth configuration list is determined, wherein the data availability library includes at least one blockchain network that can serve as the first data availability layer. The sixth configuration list is displayed in the fifth functional component; In response to the operation of selecting a blockchain network from the sixth configuration list, the selected blockchain network is used as the first data availability layer so that the second data availability layer can be obtained subsequently.

6. The method as described in claim 1 or 2, characterized in that, The modular blockchain network includes a second main chain, a second execution layer, and a second data availability layer. The at least one template component includes a first template component, a second template component, a third template component, and a fourth template component. The first template component includes a first sub-code template, the second template component includes a second sub-code template, the third template component includes a third sub-code template, and the fourth template component includes a fourth sub-code template. The response to the configuration parameters received by the template component, editing the code template corresponding to the template component to obtain the second code template corresponding to the first code template, includes: In response to the transaction batch parameters received by the first template component, the first sub-code template is configured to obtain the fifth sub-code template corresponding to the first sub-code template. The fifth sub-code template is used to instruct the second main chain to send transaction batches to the second execution layer. In response to the status data parameters received by the second template component, the second sub-code template is configured to obtain the sixth sub-code template corresponding to the second sub-code template. The sixth sub-code template is used to instruct the second execution layer to obtain status data. In response to the execution parameters received by the third template component, the third sub-code template is configured to obtain the seventh sub-code template corresponding to the third sub-code template. The seventh sub-code template is used to instruct the second execution layer to execute the transaction process. In response to the data verification parameters received by the fourth template component, the fourth sub-code template is configured to obtain the eighth sub-code template corresponding to the fourth sub-code template. The eighth sub-code template is used to instruct the second data availability layer to perform a data existence verification procedure.

7. A configuration device for a modular blockchain network, characterized in that, include: The first display module is used to display multiple functional components in the first interface, and the functional components correspond to the first functional layer of the modular blockchain network. The first configuration module is used to respond to the configuration instructions received by the functional component, configure the data acquisition strategy of the first functional layer, and obtain the second functional layer corresponding to the first functional layer. The data acquisition strategy is used to instruct the functional layer to implement the preset transaction processing function in the modular blockchain network. The second display module is used to display at least one template component corresponding to each of the multiple functional components on the second interface when the second functional layer corresponding to each of the multiple functional components is configured. The template component includes a first code template corresponding to the modular blockchain network, and the code template represents the data interaction process in the modular blockchain network. The second configuration module is used to respond to the configuration parameters received by the template component, edit the first code template, and obtain the second code template corresponding to the first code template; The deployment module is used to deploy the modular blockchain network based on the second functional layer and the second code template in response to receiving a configuration completion instruction on the first interface.

8. An electronic device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it causes the electronic device to implement a configuration method for a modular blockchain network as described in any one of claims 1-6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the configuration method of the modular blockchain network as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, Includes a computer program, which, when run, causes the configuration method of the modular blockchain network as described in any one of claims 1-6 to be executed.