Method for constructing portal coin public chain simulation system

By deploying large-scale container simulation Monero nodes on Kubernetes clusters, a complete Monero public chain simulation system that can run in the local LAN was built, solving the problems of lack of Monero simulator and limitations of test network research, and achieving a more realistic and scalable simulation environment.

CN119647043APending Publication Date: 2025-03-18BEIJING JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311192280.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-15
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The lack of Monero emulator and the limitations of Monero test network research are not possible to effectively simulate complex and diverse real network environments.

Method used

Based on the Kubernetes cluster, large-scale container simulation Monero seed nodes, full nodes and light nodes are deployed to realize address generation, transaction sending and receiving and block packaging that can be controlled by the central government, and build a complete Monero public chain simulation system that can run in the local LAN.

Benefits of technology

The deployment of large-scale Monero nodes has been realized, which reduces the chance of experimental research, fills the gap in Monero simulator, and improves the authenticity and scalability of the simulation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119647043A_ABST
    Figure CN119647043A_ABST
Patent Text Reader

Abstract

The invention relates to a method for constructing a portal coin public chain simulation system, and the method comprises the steps: modifying and reconstructing a monero 0.18. 2.2 version open source code of a portal coin client, and making a portal coin node mirror image; the method comprises the following steps: establishing a Kubernetes main node and working node cluster on the basis of a Kubernetes container arrangement platform, deploying a portal node container to a Kubernetes working node by using a portal node mirror image, automatically distributing a node IP address by using an IPPool provided by a Calico plug-in, and establishing mapping between the node IP address and a geographic position; persistently storing node data by using a PV persistent volume; simulating all nodes, light nodes and seed nodes of the Momena, and automatically establishing a network topology; cPU resource generation blocks are distributed in a user-defined mode; automatically generating a gate coin account based on the exponential distribution; the invention relates to automatically creating portal coin transactions based on exponential distributions. According to the method, large-scale container arrangement is carried out based on a Kubernetes platform, simulation of nodes, accounts, transactions and block generation of the portal-roundcoin is supported, and the scale and authenticity of portal-roundcoin public chain simulation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of blockchain and relates to a method for implementing the construction of a Monero public chain simulation system. Background Art

[0002] With the development of information technology, blockchain has gradually become well-known. Blockchain has the characteristics of traceability, immutability, decentralization, etc., and builds a distributed network based on peer-to-peer communication. Electronic cryptocurrencies are emerging in an endless stream, and Monero is one of them. Monero is an electronic cryptocurrency based on the CryptoNote protocol, which is unlinkable and untraceable.

[0003] Monero has proposed several privacy protection measures, including ring signatures, hidden addresses, and ring confidential transactions, which improve the privacy of Monero. Specifically, ring signatures and hidden addresses can hide the real public keys of the sender and receiver respectively, and ring confidential transactions can hide the transaction amount, thus avoiding user privacy leakage to a large extent.

[0004] The anonymity and privacy protection technology in Monero has attracted widespread attention from the academic community, and researchers have gradually begun to conduct academic research on Monero. Most researchers verify their related work in the Monero test network, but this method is limited to a single Monero node deployed by the researcher, and other peer nodes cannot be effectively controlled, which makes the research have certain limitations. In addition, in order to meet the needs of large-scale simulation, some researchers have proposed a variety of blockchain simulation systems, including the VIBES simulation system, the SimBlock simulator, and the Bitcoin Simulator simulator. Although the above-mentioned blockchain simulation systems provide researchers with a good simulation environment, most of them do not use mainstream public chain clients and cannot simulate complex and diverse real network environments.

[0005] In order to solve the above-mentioned problems of lack of Monero simulators and limitations in Monero test network research, this patent proposes a method for constructing a Monero public chain simulation system.

[0006] The schematic diagram of the Monero public chain simulation system is as follows Figure 1 As shown in the figure, this method is based on the Kubernetes cluster. By deploying large-scale containers to simulate Monero seed nodes, full nodes, and light nodes, it realizes address generation, transaction sending and receiving, and block packaging that can be centrally controlled, and builds a complete Monero public chain simulation system that can run in the local area network. Summary of the invention

[0007] The purpose of the present invention is to address the problems of lack of Monero simulators and limitations in Monero test network research, and propose a method for constructing a Monero public chain simulation system that can simulate Monero nodes, address generation, transaction sending and receiving, and block packaging in a local area network, providing users with a more realistic Monero simulation environment.

[0008] The advantages of the present invention are: (1) based on the Kubernetes container orchestration platform, it can realize large-scale Monero node deployment, reducing the randomness of experimental research; (2) it realizes the simulation of various types of Monero nodes, filling the gap of Monero simulator; (3) it realizes autonomous and controllable account generation, transaction creation and block packaging functions, improving the authenticity and scalability of the simulation system. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 This is a schematic diagram of the construction of the Monero public chain simulation system; DETAILED DESCRIPTION

[0010] In order to achieve the purpose of the invention, the present invention adopts the following technical means:

[0011] Step 1: Modify and reconstruct the Monero client monero 0.18.2.2 open source code to create a Monero node image;

[0012] Step 2: Based on the Kubernetes container orchestration platform, build a Kubernetes master node and a Kubernetes worker node cluster, configure node PV persistent volume storage resources, IP address pool network resources, and memory and CPU computing resources, and deploy the Monero node container to the Kubernetes worker node based on the Monero node image described in step 1;

[0013] Step 3: In the Kubernetes master node, the node control module simulates the Monero full node, light node, and seed node, automatically establishes the network topology, calls the monero 0.18.2.2 API interface to obtain the peer node connection information, and stores it in the database;

[0014] Step 4: On the Kubernetes master node, the block packaging module retrieves the online full node information of the database, and based on the memory and CPU computing resources described in step 2, calls the monero 0.18.2.2 API interface to automatically generate blocks;

[0015] Step 5: On the Kubernetes master node, the account generation module retrieves the online node information of the database, calls the monero 0.18.2.2 API interface to automatically generate the Monero account address, and stores the address information in the database;

[0016] Step 6. On the Kubernetes master node, the transaction generation module retrieves the online node information and address information from the database, obtains the online node balance, and calls the monero 0.18.2.2 API interface to automatically create a transaction if the balance is greater than 0.

[0017] The specific process of step 1 is as follows:

[0018] Step 11, use the Ubuntu 18.04 operating system as the operating environment for Kubernetes and Docker, and use the Ubuntu 18.04 image as the base image for the Monero image;

[0019] Step 12, delete the domain name address in the variable DEFAULT_DNS_PUBLI C_ADDR in src / common / dns_utils.cpp; delete the domain name address in the container dns_urls in src / common / update.cpp; delete the domain name address in the container dns_urls in src / p2p / net_node.inl, and delete the IP address insertion statement in get_ip_seed_nodes(); save the modified monero 0.18.2.2 code;

[0020] Step 13, write Dockerfile, call Docker command to make Monero node image; the Dockerfile is a description text file for making Monero node image;

[0021] The specific process of step 2 is as follows:

[0022] Step 21, using the Ubuntu 18.04 operating system to build a Kubernetes cluster, including a Kubernetes master node and a Kubernetes worker node; the Kubernetes master node plays a management role in the Kubernetes cluster; the Kubernetes worker node plays the role of running a Monero node in the Kubernetes cluster;

[0023] Step 22, write pv.yaml and pvc.yaml to configure node storage resources, and mount the container data directory to the host; the pv.yaml is a configuration file for creating a PV persistent volume; the pvc.yaml is a configuration file for creating a PVC persistent volume declaration;

[0024] Step 23, write ippool.yaml to use the Calico plug-in to configure node network resources, specify the IP address pool name and IP address range, specify the IP address pool used by the containers deployed by the same Deployment, and establish a mapping between the IP address and the geographic location; the ippool.yaml is a configuration file for creating an IP address pool;

[0025] Step 24, write deployment.yaml, configure the number of nodes in the replicas field, add the node storage resource configuration described in step 22 in the volumeMounts field, add the node network resource configuration described in step 23 in the annotations field, and specify the node container CPU and memory computing resources in the resource field; the deployment.yaml is the configuration file for creating a Deployment controller;

[0026] Step 25, use the deployment.yaml file in step 24 to deploy the node container to the Kubernetes working node, store the node information in the database, and wait for the Pod to which the node belongs to switch to the Running state; the Pod is the basic unit of Kubernetes and is used to manage containers;

[0027] The specific process of step 3 is as follows:

[0028] Step 31, in the Kubernetes master node, the node control module queries the database node information, and starts a specified number of Monero full nodes in different geographical locations as seed nodes according to the geographical locations described in step 23;

[0029] The specific process of step 31 is as follows:

[0030] Step 311, the node control module queries the database node information, selects a specified number of single Monero nodes from different countries as seed nodes, and sets the database seed field to 1;

[0031] Step 312, start the seed node described in step 311 and establish a Monero network;

[0032] Step 32, query the database Monero node information on the Kubernetes master node, call the monero client command to add the seed node described in step 311 as a peer node and start the offline full node;

[0033] Step 33, for the full node described in step 32, use the expect command in combination with the monero-wallet-cli command to create a wallet, and call the monero-wallet-rpc command to start the wallet RPC service;

[0034] Step 34, query the database node information in the Kubernetes master node. If there is an online full node, call monero-wallet-rpc to specify the online full node IP address as daemon-address and start the light node;

[0035] Step 35, call the get_connections API interface to obtain network topology information and store it in the database.

[0036] The specific process of step 4 is as follows:

[0037] Step 41, on the Kubernetes master node, the block packaging module retrieves the online Monero full node in the database and calls the get_address API interface to generate a Monero address;

[0038] Step 42, based on the memory and CPU computing resource limits in step 24 and the Monero address in step 41, specify the number of block generation threads and call the start_mining API interface to automatically generate blocks;

[0039] The specific process of step 5 is as follows:

[0040] Step 51, in the Kubernetes master node, the account generation module retrieves the database online node information, automatically calls the time.sleep() function and the create_account API interface, and creates a Monero account address based on exponential distribution;

[0041] Step 52, storing the Monero account address described in step 51 into a local file, and storing it into a database after reaching a specified number;

[0042] The specific process of step 6 is as follows:

[0043] Step 61, in the Kubernetes master node, the transaction creation module retrieves the online Monero node information and the recipient address information from the database; and sends the address information of the specified number to the online Monero node;

[0044] Step 62, obtain the online node balance described in step 61. When the balance is greater than 0, call the time.sleep() function and the transfer API interface to automatically create a ring confidential transaction with the address described in step 61 as the transaction recipient address.

[0045] Step 63, storing the transactions described in step 62 in a local file, and storing them in a database after the number of transactions reaches a specified number.

[0046] Therefore, this method completes the implementation of the Monero public chain simulation system construction method.

Claims

1. A method for constructing a Monero public chain simulation system, characterized in that: The method comprises: Step 1: Modify and reconstruct the open source code of the Monero client version 0.18.2.2 to create a Monero node image; Step 2: Based on the Kubernetes container orchestration platform, build a Kubernetes master node and worker node cluster and deploy the Monero node container; Step 3: Build a node control module to simulate Monero full nodes, light nodes, and seed nodes, and automatically establish a network topology. Step 4: Build a block packaging module and customize the allocation of CPU resources to generate blocks; Step 5: Build an account generation module to automatically generate Monero accounts based on exponential distribution. Step 6: Build a transaction creation module to automatically create Monero transactions based on exponential distribution.

2. The method according to claim 1, characterized in that The specific process of step 1 is as follows: Step 11, use the Ubuntu 18.04 operating system as the operating environment for Kubernetes and Docker, and use the Ubuntu 18.04 image as the base image for the Monero image; Step 12, delete the domain name address in the variable DEFAULT_DNS_PUBLI C_ADDR in src / common / dns_utils.cpp; delete the domain name address in the container dns_urls in src / common / update.cpp; delete the domain name address in the container dns_urls in src / p2p / net_node.inl, and delete the IP address insertion statement in get_ip_seed_nodes(); save the modified monero 0.18.2.2 code; Step 13, write a Dockerfile and call the Docker command to create a Monero node image; the Dockerfile is a description text file for creating a Monero node image.

3. The method according to claim 1, characterized in that The specific process of step 2 is as follows: Step 21, using the Ubuntu 18.04 operating system to build a Kubernetes cluster, including a Kubernetes master node and a Kubernetes worker node; the Kubernetes master node plays a management role in the Kubernetes cluster; the Kubernetes worker node plays the role of running a Monero node in the Kubernetes cluster; Step 22, write pv.yaml and pvc.yaml to configure node storage resources, and mount the container data directory to the host; the pv.yaml is a configuration file for creating a PV persistent volume; the pvc.yaml is a configuration file for creating a PVC persistent volume declaration; Step 23, write ippool.yaml to use the Calico plug-in to configure node network resources, specify the IP address pool name and IP address range, specify the IP address pool used by the containers deployed by the same Deployment, and establish a mapping between the IP address and the geographic location; the ippool.yaml is a configuration file for creating an IP address pool; Step 24, write deployment.yaml, configure the number of nodes in the replicas field, add the node storage resource configuration described in step 22 in the volumeMounts field, add the node network resource configuration described in step 23 in the annotations field, and specify the node container CPU and memory computing resources in the resource field; the deployment.yaml is the configuration file for creating a Deployment controller; Step 25, use the deployment.yaml described in step 24 to deploy the node container to the Kubernetes working node, store the node information in the database, and wait for the Pod to which the node belongs to switch to the Running state; the Pod is the basic unit of Kubernetes and is used to manage containers.

4. The method according to claim 1, characterized in that: The specific process of step 3 is as follows: Step 31, in the Kubernetes master node, the node control module queries the database node information, and starts a specified number of Monero full nodes in different geographical locations as seed nodes according to the geographical locations described in step 23; The specific process of step 31 is as follows: Step 311, the node control module queries the database node information, selects a specified number of single Monero nodes from different countries as seed nodes, and sets the database seed field to 1; Step 312, start the seed node described in step 311 and establish a Monero network; Step 32, query the database Monero node information on the Kubernetes master node, call the monero client command to add the seed node described in step 311 as a peer node and start the offline full node; Step 33, for the full node described in step 32, use the expect command in combination with the monero-wallet-cli command to create a wallet, and call the monero-wallet-rpc command to start the wallet RPC service; Step 34, query the database node information in the Kubernetes master node. If there is an online full node, call monero-wallet-rpc to specify the online full node IP address as daemon-address and start the light node; Step 35, call the get_connections API interface to obtain network topology information and store it in the database.

5. The method according to claim 1, characterized in that The specific process of step 4 is as follows: Step 41, on the Kubernetes master node, the block packaging module retrieves the online Monero full node in the database and calls the get_address API interface to generate a Monero address; Step 42, based on the memory and CPU computing resource limits described in step 24 and the Monero address described in step 41, specify the number of block generation threads and call the start_mining API interface to automatically generate blocks.

6. The method according to claim 1, characterized in that The specific process of step 5 is as follows: Step 51, in the Kubernetes master node, the account generation module retrieves the database online node information, automatically calls the time.sleep() function and the create_account API interface, and creates a Monero account address based on exponential distribution; Step 52, store the Monero account address described in step 51 into a local file, and store it into a database after reaching a specified number.

7. The method according to claim 1, characterized in that The specific process of step 6 is as follows: Step 61, in the Kubernetes master node, the transaction creation module retrieves the online Monero node information and the recipient address information from the database; and sends the address information of the specified number to the online Monero node; Step 62, obtaining the online node balance in step 61, when the balance is greater than 0, calling the time.sleep() function and the transfer API interface, and automatically creating a ring confidential transaction with the address in step 61 as the transaction recipient address; Step 63, storing the transactions described in step 62 in a local file, and storing them in a database after the number of transactions reaches a specified number.