CN109413211B - Architecture of EOS block chain super node and implementation method thereof - Google Patents
Architecture of EOS block chain super node and implementation method thereof Download PDFInfo
- Publication number
- CN109413211B CN109413211B CN201811550741.1A CN201811550741A CN109413211B CN 109413211 B CN109413211 B CN 109413211B CN 201811550741 A CN201811550741 A CN 201811550741A CN 109413211 B CN109413211 B CN 109413211B
- Authority
- CN
- China
- Prior art keywords
- intelligent contract
- interface
- server
- module
- contract server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/60—Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses an EOS block chain super node architecture and an implementation method thereof. The contract scheduling module comprises a registration center ETCD, a registration interface for registering the intelligent contract server, a logout interface for logging out the intelligent contract server, an updating interface for updating the intelligent contract server and an inquiry interface for inquiring the intelligent contract server; the registration interface, the logout interface, the updating interface and the query interface are connected with a registration center ETCD. The invention solves the problem of bottleneck of memory resources of the intelligent contract server and improves the utilization rate of the resources.
Description
Technical Field
The invention relates to the field of blockchain, in particular to an EOS blockchain super node architecture and an implementation method thereof.
Background
The intelligent contract has the advantages of higher transaction processing efficiency, non-reversibility, safe transaction and full-automatic flow, and has attracted extensive attention and developed rapidly in recent years. At present, the same node of an EOS block chain is responsible for both the block production task and the intelligent contract execution task, and the two functions are deployed on the same physical host. This architecture has four disadvantages:
1. with the explosive growth of future intelligent contracts, the storage and access of the intelligent contracts can exert great pressure on the memory resources of the nodes, and the transaction can be congested or delayed to be executed until the memory is exhausted, so that the risk of paralysis of the nodes exists.
2. The cost is high for expanding the memory resource of a super node.
3. Because the memory requirement is continuously increased, and the memory of a single node cannot be infinitely increased, a resource bottleneck exists.
4. A single node has limited computational power and cannot handle parallel execution of a large number of contracts.
How to solve and optimize the above disadvantages is a problem to be considered by the related technical personnel.
Disclosure of Invention
The invention aims to provide an EOS block chain super node architecture and an implementation method thereof, which solve the problem of memory resource bottleneck of an intelligent contract server and improve the resource utilization rate.
In order to achieve the purpose, the technical scheme adopted by the invention is as follows:
an EOS blockchain super node architecture comprises a blockproduction module used for providing blockproduction in an EOS blockchain, a contract scheduling module used for intelligent contract scheduling distribution and a plurality of intelligent contract servers used for executing intelligent contracts and connected with the contract scheduling module.
The contract scheduling module comprises a registration center ETCD, a registration interface for registering the intelligent contract server, a logout interface for logging out the intelligent contract server, an updating interface for updating the intelligent contract server and an inquiry interface for inquiring the intelligent contract server; the dispatching and distributing module, the registration interface, the logout interface, the updating interface and the query interface are connected with a registration center ETCD.
A method for realizing an EOS blockchain super node architecture comprises the following steps:
(1) each online intelligent contract server registers resource information in a registration center ETCD through a registration interface, and the registration center ETCD stores the resource information;
(2) the method comprises the following steps that a block production module of a super node receives an intelligent contract access request sent by an external client, a scheduling distribution module of the block production module searches a registered intelligent contract server in a registration center ETCD according to a scheduling strategy, finds out the intelligent contract server capable of executing the intelligent contract access request, and forwards the access request to the found intelligent contract server;
(3) the intelligent contract server receiving the intelligent contract access request completes the intelligent contract access request and returns the result of the completed intelligent contract access request and related data to the block production module;
(4) and the block production module returns the result of the intelligent contract access request and related data to the external client, generates a corresponding block and stores the corresponding block in a block database of the block chain, so that the external client can access the intelligent contract.
Further, the resource information registered in the step (1) includes hardware resource data information, provided intelligent contract service information, and efficiency information of executing a contract in the past.
Further, the scheduling policy in step (2) includes an efficiency priority algorithm and a hash algorithm.
Furthermore, when the intelligent contract server quits, the intelligent contract server logs out through a logout interface of the contract scheduling module; when the intelligent contract server has hardware resource data information change and the provided intelligent contract service information change, the original information is updated through the updating interface of the contract scheduling module.
Further, the block production module uses the external network IP to be responsible for sending and receiving intelligent contract access requests to external clients, uses the internal IP to communicate with each intelligent contract server, and carries out requests and processing with each intelligent contract server through a high-quality local area network.
Further, the contract scheduling module periodically inquires information of an online intelligent contract server of the registration center ETCD, and when the online intelligent contract server is found to be changed, the information is synchronously changed into the local cache configuration of the intelligent contract server.
Compared with the prior art, the invention has the following beneficial effects:
(1) the invention distributes the request to other intelligent contract servers by separately deploying the block production module and the intelligent contract service on the EOS block chain and arranging the contract scheduling module for scheduling and distributing the intelligent contract. Therefore, the resource requirement of the original single server is dispersed to a plurality of hosts, the problem of bottleneck of memory resources is effectively solved, the cost of resource expansion is reduced, and the deployment efficiency is improved.
(2) The invention solves the distribution problem of the intelligent contract request through the contract scheduling module, sets the registration center ETCD, registers the intelligent contract server in the registration center ETCD, realizes the intelligent contract scheduling and distributes to the intelligent contract server through the scheduling strategy, has scientific and quick scheduling strategy algorithm, can be singly selected or combined for use, and efficiently and reasonably utilizes resources.
Drawings
FIG. 1 is a schematic structural diagram of a super node architecture according to the present invention.
FIG. 2 is a block diagram of the super node architecture implementation of the present invention.
Detailed Description
The present invention will be further described with reference to the following description and examples, which include but are not limited to the following examples.
Examples
As shown in fig. 1 and fig. 2, an architecture of an EOS blockchain super node disclosed in the present invention includes a blockproduction module for providing blockproduction in an EOS blockchain, a contract scheduling module for intelligent contract scheduling distribution, and a plurality of intelligent contract servers for executing intelligent contracts and connected to the contract scheduling module.
The contract scheduling module comprises a registration center ETCD, a registration interface for registering the intelligent contract server, a logout interface for logging out the intelligent contract server, an updating interface for updating the intelligent contract server and an inquiry interface for inquiring the intelligent contract server; the dispatching and distributing module, the registration interface, the logout interface, the updating interface and the query interface are connected with a registration center ETCD.
A method for realizing an EOS blockchain super node architecture comprises the following steps:
(1) each online intelligent contract server registers resource information in a registration center ETCD through a registration interface, and the registration center ETCD stores the resource information;
(2) the method comprises the following steps that a block production module of a super node receives an intelligent contract access request sent by an external client, a scheduling distribution module of the block production module searches a registered intelligent contract server in a registration center ETCD according to a scheduling strategy, finds out the intelligent contract server capable of executing the intelligent contract access request, and forwards the access request to the found intelligent contract server;
(3) the intelligent contract server receiving the intelligent contract access request completes the intelligent contract access request and returns the result of the completed intelligent contract access request and related data to the block production module;
(4) and the block production module returns the result of the intelligent contract access request and related data to the external client, generates a corresponding block and stores the corresponding block in a block database of the block chain, so that the external client can access the intelligent contract.
The resource information registered in the step (1) includes hardware resource data information, provided intelligent contract service information, and efficiency information of executing a contract in the past.
The scheduling policy in the step (2) comprises an efficiency priority algorithm and a hash algorithm.
When the intelligent contract server quits, the intelligent contract server logs out through a logout interface of the contract scheduling module; when the intelligent contract server has hardware resource data information change and the provided intelligent contract service information change, the original information is updated through the updating interface of the contract scheduling module.
The block production module uses the external network IP to be responsible for receiving and sending intelligent contract access requests to external clients, uses the internal IP to communicate with each intelligent contract server, and carries out requests and processing with each intelligent contract server through a high-quality local area network.
The contract scheduling module periodically inquires the information of the online intelligent contract server of the registration center ETCD, and synchronously changes the information into the local cache configuration of the intelligent contract server when the online intelligent contract server is found to be changed.
Through the design, the scheduling and distributing module of the contract scheduling module distributes the request to other intelligent contract servers according to the existing intelligent contract request and the scheduling strategy, and distributes the resource requirement of the original single intelligent contract server to a plurality of intelligent contract servers, thereby effectively solving the problem of bottleneck of the memory resource of the intelligent contract servers and improving the resource utilization rate.
The above-mentioned embodiment is only one of the preferred embodiments of the present invention, and should not be used to limit the scope of the present invention, but all the insubstantial modifications or changes made within the spirit and scope of the main design of the present invention, which still conform to the technical problems of the present invention, should be included in the scope of the present invention.
Claims (6)
1. An implementation method of an EOS blockchain super node architecture is characterized in that the architecture comprises a blockproduction module for providing blockproduction in an EOS blockchain, a contract scheduling module for intelligent contract scheduling distribution and a plurality of intelligent contract servers for executing intelligent contracts and connected with the contract scheduling module; the contract scheduling module comprises a scheduling distribution module, a registration center ETCD, a registration interface for registering the intelligent contract server, a logout interface for logging out the intelligent contract server, an updating interface for updating the intelligent contract server and an inquiry interface for inquiring the intelligent contract server; the dispatching and distributing module, the registration interface, the cancellation interface, the updating interface and the query interface are respectively connected with a registration center ETCD;
the implementation method comprises the following steps:
(1) each online intelligent contract server registers resource information in a registration center ETCD through a registration interface, and the registration center ETCD stores the resource information;
(2) the method comprises the following steps that a block production module of a super node receives an intelligent contract access request sent by an external client, a scheduling distribution module of the block production module searches a registered intelligent contract server in a registration center ETCD according to a scheduling strategy, finds out the intelligent contract server capable of executing the intelligent contract access request, and forwards the access request to the found intelligent contract server;
(3) the intelligent contract server receiving the intelligent contract access request completes the intelligent contract access request and returns the result of the completed intelligent contract access request and related data to the block production module;
(4) and the block production module returns the result of the intelligent contract access request and related data to the external client, generates a corresponding block and stores the corresponding block in a block database of the block chain, so that the external client can access the intelligent contract.
2. The method according to claim 1, wherein the resource information registered in step (1) includes hardware resource data information, provided intelligent contract service information, and efficiency information of past execution contracts.
3. The method of claim 1, wherein the scheduling policy in step (2) includes an efficiency priority algorithm and a hash algorithm.
4. The method of claim 3, further comprising the steps of: when the intelligent contract server quits, the intelligent contract server logs out through a logout interface of the contract scheduling module; when the intelligent contract server has hardware resource data information change and the provided intelligent contract service information change, the original information is updated through the updating interface of the contract scheduling module.
5. An implementation method of an EOS blockchain super node architecture according to claim 4, wherein in the step (2), the block production module uses an external network IP to send and receive intelligent contract access requests to external clients, uses an internal IP to communicate with each intelligent contract server, and performs requests and processing with each intelligent contract server through a high quality local area network.
6. An implementation method of an EOS blockchain super node architecture according to claim 5, further comprising the contract scheduling module periodically querying information of an online intelligent contract server of the registry ETCD, and when a change is found in the online intelligent contract server, synchronously changing the information into a local cache configuration of the intelligent contract server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811550741.1A CN109413211B (en) | 2018-12-18 | 2018-12-18 | Architecture of EOS block chain super node and implementation method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811550741.1A CN109413211B (en) | 2018-12-18 | 2018-12-18 | Architecture of EOS block chain super node and implementation method thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109413211A CN109413211A (en) | 2019-03-01 |
CN109413211B true CN109413211B (en) | 2019-12-31 |
Family
ID=65460856
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811550741.1A Active CN109413211B (en) | 2018-12-18 | 2018-12-18 | Architecture of EOS block chain super node and implementation method thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109413211B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109995613B (en) * | 2019-03-29 | 2021-02-05 | 北京乐蜜科技有限责任公司 | Flow calculation method and device |
CN111353690B (en) * | 2020-02-18 | 2023-04-18 | 广东工业大学 | Block chain enabled production scheduling edge calculation method |
CN111614725A (en) * | 2020-04-24 | 2020-09-01 | 深圳壹账通智能科技有限公司 | Service management method, device and equipment based on block chain development |
CN111782647A (en) * | 2020-05-29 | 2020-10-16 | 易联众信息技术股份有限公司 | Block data storage method, system, medium and equipment of EOS network |
CN112882774A (en) * | 2021-02-08 | 2021-06-01 | 北京微芯区块链与边缘计算研究院 | Intelligent contract chip device and method executed in parallel and block chain link point device |
CN113377738B (en) * | 2021-04-28 | 2024-03-22 | 南京欣网互联网络科技有限公司 | Method for building BaaS architecture based on PaaS platform and EOS framework |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107171794A (en) * | 2017-06-27 | 2017-09-15 | 葛峰 | A kind of electronic document based on block chain and intelligent contract signs method |
CN107423945A (en) * | 2017-04-13 | 2017-12-01 | 葛武 | Intelligent energy trade managing system and method based on block chain technology |
CN108805561A (en) * | 2017-04-27 | 2018-11-13 | 中思博安科技(北京)有限公司 | It may have access to the execution method and system of the intelligent contract of multiple block chains |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6827327B2 (en) * | 2017-01-05 | 2021-02-10 | 株式会社日立製作所 | Distributed computing system |
-
2018
- 2018-12-18 CN CN201811550741.1A patent/CN109413211B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107423945A (en) * | 2017-04-13 | 2017-12-01 | 葛武 | Intelligent energy trade managing system and method based on block chain technology |
CN108805561A (en) * | 2017-04-27 | 2018-11-13 | 中思博安科技(北京)有限公司 | It may have access to the execution method and system of the intelligent contract of multiple block chains |
CN107171794A (en) * | 2017-06-27 | 2017-09-15 | 葛峰 | A kind of electronic document based on block chain and intelligent contract signs method |
Also Published As
Publication number | Publication date |
---|---|
CN109413211A (en) | 2019-03-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109413211B (en) | Architecture of EOS block chain super node and implementation method thereof | |
US20180293111A1 (en) | Cdn-based content management system | |
CN102289508B (en) | Distributed cache array and data inquiry method thereof | |
CN105138615A (en) | Method and system for building big data distributed log | |
US7117242B2 (en) | System and method for workload-aware request distribution in cluster-based network servers | |
WO2020186807A1 (en) | System and method for power data linking based on blockchain technology | |
CN105516284B (en) | A kind of method and apparatus of Cluster Database distributed storage | |
WO2020019743A1 (en) | Traffic control method and device | |
CN105592163B (en) | A kind of communication means and system | |
CN101969468A (en) | Inquiry server cluster system and inquiry method | |
CN101753405A (en) | Cluster server memory management method and system | |
CN102970242A (en) | Method for achieving load balancing | |
WO2021120633A1 (en) | Load balancing method and related device | |
CN112583895B (en) | TCP communication method, system and device | |
EP2946304B1 (en) | Vertically-tiered client-server architecture | |
Kadhim et al. | Hybrid load-balancing algorithm for distributed fog computing in internet of things environment | |
US11386103B2 (en) | Query enhancement system and method for constructing elastic field based on time delay | |
CN113821566A (en) | Block chain aggregation architecture based on multi-chain fragmentation | |
Jin et al. | COAST: A cooperative storage framework for mobile transparent computing using device-to-device data sharing | |
CN102340522A (en) | Data transmission method and device | |
WO2015069378A1 (en) | Hierarchical distribution of control information in a massively scalable network server | |
CN105847428A (en) | Mobile cloud platform | |
Di et al. | Probabilistic best-fit multi-dimensional range query in self-organizing cloud | |
US10791088B1 (en) | Methods for disaggregating subscribers via DHCP address translation and devices thereof | |
US20150263958A1 (en) | Load balancing apparatus and method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |