Disclosure of Invention
One or more embodiments of the present specification describe a method and apparatus for monitoring transaction content in a blockchain, by which content review of transactions generated in the blockchain network can be performed using a review platform outside of the blockchain network.
According to a first aspect, there is provided a method of monitoring transaction content in a blockchain, the method being performed by any first node in a blockchain network, comprising:
in response to initiating a first transaction by a first node, obtaining content data for the first transaction;
and sending a first message generated based on the content data to a review platform outside the blockchain network through a trusted channel, so that the review platform reviews the content of the first transaction and returns a review result corresponding to the first transaction to the blockchain network.
In one embodiment, the first transaction is a transaction that invokes a smart contract, and the obtaining content data of the first transaction includes: reading parameters passed into the smart contract as the content data from a particular field of the first transaction.
According to one embodiment, a Oracle contract of a language prediction machine is pre-deployed in the first node, and the Oracle contract comprises a transaction reading function; in this way, the first node executes the transaction read function in the Oracle contract, and the content data of the first transaction is read through the transaction read function.
According to one embodiment, the Oracle contract further comprises a review event, and the sending of the first message generated based on the content data to a review platform outside the blockchain network comprises: and generating a first message based on the content data by triggering a checking event in the Oracle contract, and sending the first message to the checking platform.
In one embodiment, the first message comprises said content data.
In another embodiment, the first message comprises a storage address of the content data.
In yet another embodiment, the first message includes log information recording the content data.
According to a second aspect, there is provided a method of uploading transaction data in a blockchain, the method being performed by a second node in a blockchain network, the second node being a billing node, the method comprising:
for a first transaction in a local transaction pool, acquiring an examination result returned after an examination platform outside the block chain network conducts content examination on the first transaction;
and if the examination result is examination passing, adding the first transaction into a block body for generating a new block.
In one embodiment, the review result returned by the review platform is obtained by:
reading the examination result by executing a language predictive machine Oracle contract which is pre-deployed in the second node; the Oracle contract comprises a result transfer function, and the examination result is returned to the Oracle contract by the examination platform by calling back the result transfer function.
According to a third aspect, there is provided a method of monitoring transaction content in a blockchain, the method being performed by an audit platform outside of a blockchain network, comprising:
receiving a first message sent by a first node in the blockchain network, the first message relating to content data of a first transaction initiated in the first node;
acquiring the content data based on the first message;
performing content compliance review on the first transaction based on the content data to generate review result data;
returning the review result data to a plurality of second nodes in the blockchain network.
In one embodiment, a Oracle contract is pre-deployed in the first node, the Oracle contract includes a transaction reading function, and the content data is obtained by the first node by executing the transaction reading function in the Oracle contract.
In one embodiment, the first message includes a storage address of the content data; in such a case, the content data may be read based on the storage address; or
In another embodiment, the first message includes log information recording the content data; in such a case, the content data may be read based on the log information.
According to one embodiment, a prologue Oracle contract is pre-deployed in each of the plurality of second nodes, the Oracle contract comprising a result transfer function;
returning the review result data to a plurality of second nodes in the blockchain network comprises:
and calling the result transfer function, and returning the inspection result data to the Oracle contract, so that the second node acquires the inspection result data by executing the Oracle contract.
According to a fourth aspect, there is provided an apparatus for monitoring transaction content in a blockchain, the apparatus being deployed in any first node in a blockchain network, comprising:
the content acquisition unit is configured to respond to the first transaction initiated by the first node and acquire the content data of the first transaction;
and the message sending unit is configured to send a first message generated based on the content data to an examination platform outside the blockchain network through a trusted channel, so that the examination platform conducts content examination on the first transaction, and returns an examination result corresponding to the first transaction to the blockchain network.
According to a fifth aspect, there is provided an apparatus for uploading transaction data in a blockchain, the apparatus being deployed in a second node in a blockchain network, the second node being a billing node, the apparatus comprising:
the result acquisition unit is configured to acquire an examination result returned after an examination platform outside the block chain network conducts content examination on a first transaction in a local transaction pool;
and the block generating unit is configured to add the first transaction to a block body for generating a new block if the examination result is that the examination is passed.
According to a sixth aspect, there is provided an apparatus for monitoring transaction content in a blockchain, the apparatus being deployed in an audit platform outside a blockchain network, comprising:
a receiving unit configured to receive a first message sent by a first node in the blockchain network, the first message relating to content data of a first transaction initiated in the first node;
an acquisition unit configured to acquire the content data based on the first message;
the examination unit is configured to conduct content compliance examination on the first transaction based on the content data and generate examination result data;
a returning unit configured to return the inspection result data to a plurality of second nodes in the blockchain network.
According to a seventh aspect, there is provided a computer readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of the first to third aspects.
According to an eighth aspect, there is provided a computing device comprising a memory and a processor, wherein the memory has stored therein executable code, and the processor, when executing the executable code, implements the method of the first to third aspects.
According to the method and the device provided by the embodiment of the specification, the transaction generated in the blockchain network is captured by the content data and is sent to a review platform outside the blockchain network for content review. When the accounting node packs and enters each transaction, the examination result of the transaction is considered, and only the examined and checked transaction is linked in blocks, so that only the examined and checked transaction can be uploaded to the block chain to be effective. In the process, the content is inspected by using an inspection platform outside the blockchain network, the network structure and the consensus mechanism of the blockchain network do not need to be modified, and the inspection requirement is met safely and efficiently.
Detailed Description
The scheme provided by the specification is described below with reference to the accompanying drawings.
FIG. 1 is a schematic diagram of a process for performing a transfer transaction in a blockchain network. First, the blockchain network includes a plurality of nodes, and each node can communicate with each other. Assuming that a certain node in the network, Bob wants to transfer money to another node, Alice, he can initiate a transfer transaction, i.e., create a transaction, the contents of which include, the transfer initiator Bob (from field), the receiver Alice (to field), the transfer amount 10(amount field), etc. Bob then adds his own digital signature to this transaction, which is published into the blockchain network. The transaction is verified by the accounting node in the blockchain network, packaged into a block, broadcast in the blockchain network, and added to the blockchain after consensus, at which time the transaction can be considered to be valid.
The above transfer transaction may also be referred to as a normal transaction. In a platform supporting intelligent contracts, transactions can also be implemented by invoking intelligent contracts.
FIG. 2 is a schematic diagram of a process for creating an intelligent contract in a blockchain network. More specifically, FIG. 2 is described in connection with an Etherhouse. Assuming a certain node, Bob wants to publish such a piece of smart contract:
according to the above contract, a piece of character string s is acquired as data postData to be posted.
Bob may also issue the contract in the form of a transaction. Specifically, Bob can initiate a transaction, the from field of the initiator in the transaction content is Bob (more specifically, the address of Bob), and the to field of the receiver is set to null; the transaction content also includes a Data field containing a code after compiling the intelligent contract into byte codes. After Bob has issued such a transaction to the blockchain network, the accounting node also validates, packages, etc. the transaction, records it in the blockchain, and adds it to the blockchain through a consensus mechanism. In this process, a contract address, such as 0x6f …, is also assigned to the smart contract according to an algorithm, such as hashing based on the publisher address. Thus, an intelligent contract corresponds to a contract address, which is not formally different from the user's account address.
After the above intelligent contract is packed and linked, any user in the block chain network can call the intelligent contract. Fig. 3 is a schematic diagram of a process for invoking the intelligent contract created in fig. 2 in a blockchain network. Assuming that Alice in the blockchain network wants to invoke the above intelligent contract, the node can initiate a transaction to make the contract invocation.
Specifically, in the transaction content, the from field may be the address of the caller Alice, and the to field is the contract address 0x6f … of the aforementioned PostingData contract, which represents the intelligent contract invoked by the transaction. In the Data field, the method or function name (set) in the contract to be called and the incoming parameters ("ant forest, green commons") are contained.
After receiving the transaction, other nodes execute the operation corresponding to the contract logic through the Ethernet virtual machine EVM, and realize the change of the contract state on the network through a consensus mechanism. Then, when any node in the network looks at the variable of the contract, it will find that the value of postData in the contract becomes "ant forest, green public welfare".
The above fig. 1, fig. 2, and fig. 3 depict a transfer transaction, a transaction to create a smart contract, and a transaction to invoke a smart contract, respectively. Generally, a transaction in a blockchain network includes the above three transactions.
As mentioned above, for the security, legitimacy and compliance of network contents, the transaction contents of various transaction transactions in the blockchain network need to be monitored, supervised and examined. In one approach, special nodes are provided in the blockchain network for content review and administration. In such a scheme, additional nodes need to be added, and the nodes are enabled by characterization, so that the node management cost and the post-maintenance cost are increased, and the original consensus mechanism is changed.
According to one or more embodiments of the present description, when new transactions are generated in the blockchain, including ordinary transfer transactions and transactions involving smart contracts, the transaction contents are examined by using an examination platform outside the blockchain network, so that no special node needs to be added in the blockchain network, and no existing network structure or consensus mechanism needs to be changed. The implementation of the above scheme is described below.
FIG. 4 illustrates a schematic diagram of a method of monitoring transaction content in a blockchain according to one embodiment. The method may be applied to public chains, private chains, and federation chains, without limitation. The following description is exemplified in connection with an ethernet blockchain platform, but is equally applicable to other blockchain platforms having similar functionality.
As shown in fig. 4, first, in step 401, a user in the blockchain network initiates a transaction, referred to as a first transaction, through its corresponding node, referred to as a first node. The first transaction may be a transfer transaction or a transaction involving a smart contract.
At step 402, the first node, in response to initiation of a first transaction, obtains content data for the first transaction. Depending on the transaction type of the first transaction, the content data may include, for example, the recipient account, parameters that are passed into the smart contract through specific fields (e.g., data fields) in the transaction content, and so on.
It will be appreciated that the first node will also broadcast the first transaction in the blockchain network to other nodes as is conventional. The embodiments of the present description do not modify this process. Therefore, this process is also not shown in fig. 4.
Next, at step 403, the first node sends a first message generated based on the content data of the first transaction to an audit platform outside the blockchain network via a trusted channel. The first message may contain the content data, may contain an address pointing to the content data, or take other forms.
After receiving the first message, in step 404, the auditing platform obtains the content data of the first transaction based on the first message. For example, the content data is directly extracted from the first message, or the content data is read based on the address in the first message, and so on.
Then, in step 405, the review platform performs content compliance review on the first transaction based on the above content data, and generates review result data. The specific examination rules of the examination platform are set according to laws and regulations and regulatory requirements, and include, for example, sensitive word examination, account blacklist examination, and the like, which are not limited herein.
After review, the review platform returns review result data, e.g., review pass/fail, to the second node in the blockchain network, as shown at step 406. It should be understood that the second node here may be any accounting node in the blockchain network. In the aforementioned case where the first node has the accounting function, the second node may also include the first node.
As previously described, the first node broadcasts the first transaction in the network after generating the first transaction, and each accounting node then places the first transaction in the local transaction pool after receiving it. The local transaction pool is used for storing various transactions to be linked.
When a second node, that is, a certain accounting node, prepares to generate a new block based on transaction packaging in the local transaction pool, as shown in step 407, for a first transaction in the local transaction pool, the second node obtains an examination result returned after the examination platform performs content examination on the first transaction.
In step 408, block packing is performed according to the review result. Specifically, if the examination result corresponding to the first transaction is an examination pass, the first transaction is added to the block body for generating a new block. Otherwise, if the examination result is failed, the uplink is abandoned for the first transaction inbound block. In other words, when pending uplink transactions are selected from the local transaction pool to be added to a new block, only approved transactions are selected to be added to the block, and transactions with failed reviews are discarded or skipped.
Thus, if the first transaction passes the content review of the review platform, the first transaction can be normally added into the blockchain, so that the transaction is effective; if the examination result of the first transaction is that the examination is not passed, although the first transaction can be propagated to some nodes in the blockchain network, the accounting node only accounts the examined transactions into the blocks, so that the transactions cannot be recorded in the blocks, cannot be added into the blockchain, and cannot be validated. Thus, review and supervision of transactional content in a blockchain network is achieved.
The capture of the content data of the transaction, and the communication between the node and the review platform in fig. 4, may be accomplished in a variety of ways.
In one embodiment, capture of the above transaction data and data interaction with the review platform are achieved by way of an Oracle contract.
It can be understood that, generally speaking, transaction data in the blockchain network is blockchain internal data, so as to better satisfy the requirement of consensus and avoid network instability caused by inconsistent states of each node due to external data. However, this greatly limits the usage scenarios of the blockchain, and cannot meet the data requirements of the intelligent contracts, which are particularly rich in functionality.
To compensate for access limitations, an Oracle mechanism has been proposed as a link between the blockchain and the external environment. In simple terms, Oracle can be thought of as a program or a piece of software that provides a contract based on blockchains that can access external information. Thus, Oracle can be considered a special type of intelligent contract that interacts with requests from ordinary intelligent contracts and operates according to strict algorithms. On the other hand, Oracle itself does not make any changes to the blockchain contents, it simply sends a request to an external data source and retransmits the response to the smart contract.
For example, Oraclize, an example of Oracle, a Oracle, may assist various blockchains to effectively access internet APIs, protecting the security and robustness of its Dapp. At present, four block chains of Ether, Biguo, Rootstock and Eris can be supported. In the example of the etherhouse, the identity is currently used to write smart contracts, such smart contracts can only access information in the access chain, and Oraclize as a data transmitter can provide a reliable connection between the DApps of the etherhouse and the Web APIs, so that the Dapp application based on the smart contracts can reliably obtain external information and data. More specifically, Oraclize deploys a special intelligent contract on the etherhouse named singoraclize. If the data access service of Oraclize needs to be used, the intelligent contract only needs to be referred in a common intelligent contract, and then related calling is carried out according to the method described in the API document.
Based on the characteristics of the Oracle contract of the prediction machine, data interaction with an examination platform outside the block chain network can be realized in an Oracle contract mode. Unlike the common intelligent contract created by the user in a transaction manner shown in fig. 2, an Oracle contract needs to be deployed in each node of the blockchain network in advance, and the Oracle contract is used for capturing transaction data and performing data interaction with an external examination platform.
In a specific example, the structure of the Oracle contract described above may be as follows:
among them, there are audit event contentCheck, transaction read function TransactionHandle, result transfer function TransactionCheckResult, etc.
The Oracle contract thus deployed having the above structure is hereinafter referred to as an Oracle audit contract.
The following describes the process of performing the method shown in fig. 4 via an Oracle audit contract.
FIG. 5 illustrates a schematic diagram of a method of monitoring transaction content in a blockchain, according to one embodiment. As schematically shown in fig. 5, the Oracle audit contract described above is pre-deployed in each node of the blockchain network for capturing transaction data and data interaction with an external audit platform.
Assume that a user Bob in the blockchain network initiates a transaction, i.e., a first transaction, through its corresponding first node (corresponding to step 401 in fig. 4). Initiation of the transaction triggers execution of the transaction read function TransactionHandle by an Oracle audit contract deployed in the first node. The transaction read function reads the content data of the initiated transaction.
In one specific example, the Oracle audit contract is configured to be triggered to read the content data of the first transaction through the transaction read function when the first transaction is a transaction that invokes the smart contract. Since the transaction that invokes the smart contract may involve richer content, it is a primary concern for transaction content review.
As shown in fig. 3, in the transaction of calling the smart contract, the to field includes the address of the smart contract to be called, and the data field includes the function name set in the smart contract to be called and the incoming parameter "ant forest, green public service". For such a first transaction, the transaction read function may read the content of the data field as the content data of the transaction. For example, for the transaction of fig. 3, "ant forest, green public welfare" may be read as the content data.
In another specific example, the Oracle audit contract is set to be triggered to read the content data of the transaction through the transaction read function once the transaction is initiated in the node, that is, to perform extraction of the content data for each type of transaction. Specifically, for ordinary transactions of the transfer class, the information of a receiver of the to field can be read as content data; for transactions that create smart contracts, the code or the like of the smart contract in the data field may be read as content data.
As previously mentioned, an audit event contentCheck is also included in the deployed Oracle audit contract.
In a typical intelligent contract, event events are used to record various events and state changes that occur during the execution of the contract. In the Ethernet intelligent contract, the event uses the built-in log function of the EVM of the Ethernet virtual machine, and the Ethernet client can monitor the event by using a callback function of JavaScript. When an event is triggered, the event and its parameters are stored in the ether house log.
Similarly, an audit event contentCheck in an Oracle audit contract may be used to record state data during contract execution. More specifically, the execution of the transaction read function TransactionHandle triggers the audit event contentCheck to record transaction content data captured during execution, and based on the content data, a message, i.e. the first message, is sent to the audit platform outside the blockchain network.
As previously mentioned, the first message may contain the content data itself of the first transaction. Or, because the event in the Oracle contract records the execution state by a log, the first message may also be log information for recording the content data; alternatively, the first message may be a storage address pointing to the content data, so that the review platform may obtain the content data according to the storage address.
When the first message is sent to the auditing platform for data interaction, data transmission needs to be carried out through a trusted secure channel so as to ensure data security and data privacy.
In the Oracle contract mechanism, such as Oraclize, transport layer security protocol TLS attestation (tlsnoopy) technology is relied upon to enable secure communication of blockchain data with external data sources. The tlsnoopy certification is based primarily on the secure transport layer protocol TLS, which is used to provide confidentiality and data integrity between two communicating applications, and it contains three basic phases: 1. a key algorithm supported by peer negotiation, 2, exchanging a public key based on private key encryption and identity authentication based on a PKI certificate, and 3, transmitting secret data based on public key encryption.
The Oracle audit contract deployed above may send messages to the audit platform based on a similar secure communication mechanism.
And the examination platform acquires the content data of the first transaction through the first message and examines the content data. For example, sensitive word review is performed on the content data "ant forest, green commonweal" extracted for the exchange shown in fig. 3; account blacklist review, based on recipient address, for ordinary transfer transactions, etc.
After review, the review platform calls back the result transfer function TransactionCheckResult () in the Oracle review contract, thereby passing the review result back to the Oracle review contract. Thus, any node deployed with the Oracle examination contract can obtain the examination result for the first transaction by executing the Oracle contract.
Alice is assumed to be an arbitrary accounting node in the blockchain network, on which the Oracle audit contract described above is also deployed. When Alice generates a new block based on the transaction package in the local transaction pool, she acquires the examination result of the first transaction which is received by broadcasting and put into the local transaction pool by executing the Oracle examination contract, and decides whether to put the first transaction into the block uplink according to the examination result.
It should be noted that, the transaction that fails the examination may be saved in the examination platform for subsequent query or other processing.
Through the process, transaction contents are captured in an Oracle contract mode, data interaction is carried out between the transaction contents and an external examination platform, and monitoring and examination of the transaction contents are achieved.
In addition, the capture of the transaction content data and the communication between the node and the examination platform in fig. 4 can be realized by embedding a software tool in the node client. It will be appreciated that users typically join a blockchain network through a node client to become a node in the network. According to the functions which can be realized by the client, the nodes can be correspondingly divided into transaction nodes which only can perform transactions, and not only can perform transactions, but also can generate accounting nodes of blocks. The client of the trading node comprises a publishing module for publishing the trade, and the client of the accounting node comprises not only the publishing module but also an accounting module, sometimes referred to as a consensus module, for generating and adding a new block into the block chain (because the addition of a new block into the block chain requires consensus in the block chain network).
According to one embodiment, a transaction data capture tool can be added or deployed in a publishing module of a node client, and a review result acquisition tool is deployed in a consensus module, wherein the review result acquisition tool is realized by codes embedded in the client.
FIG. 6 illustrates a schematic diagram of a method of monitoring transaction content in a blockchain, according to one embodiment. As schematically shown in fig. 6, in each node client of the blockchain network, a corresponding tool is deployed. Specifically, for the trading node, a trading data capture tool is deployed in the issuing module, and for the accounting node, in addition to the trading data capture tool, a review result acquisition tool is deployed in the consensus module.
Assume that a user Bob in the blockchain network initiates a first transaction through its corresponding first node, where the first node may be a transaction node or an accounting node. A data capture tool is deployed in the publishing module of the first node and can capture and record content data in a transaction issued by a user.
For example, when the first transaction is a transaction that invokes a smart contract, the data capture tool may read a data field in the transaction content from which to capture parameters to be passed into the smart contract as transaction content data. In another example, for other transactions, the recipient information of the to field, or the content of the data field, may also be read as transaction content data.
After obtaining the content data for the first transaction issued by the first node, the data capture tool also sends a first message to an audit platform outside of the blockchain network based on the content data. Specifically, the data capture tool may send a message to the audit platform for data interaction via the trusted channel in an encrypted manner and protocol.
And then, the examination platform acquires the content data of the first transaction through the first message and examines the content data. The examination content is as described above and will not be described in detail.
After review, the review platform generates review results. In one embodiment, the review platform pushes the review result to the review result acquiring tool in a pushing manner, so that the consensus modules in the accounting nodes can synchronously acquire the review result generated by the review platform. In another embodiment, the review platform stores the generated review results for querying by a review result acquisition tool in the consensus module. In such a case, the execution logic of the consensus module in the node client may be modified such that the consensus module invokes the review result acquisition tool, sends a query request for the transaction to be packaged to the review platform, and receives the review result fed back by the review platform before the transaction packaging is performed.
For example, assume that Alice is an arbitrary accounting node in the blockchain network, and a review result acquisition tool is deployed in the consensus module thereof. When Alice generates a new block based on transaction packaging in the local transaction pool, the examination result acquisition tool in the consensus module acquires the examination result of the first transaction from the examination platform in a pushed or queried mode. And according to the examination result, the Alice determines whether to carry out block uplink on the first transaction.
In the above process, the review platform may be regarded as a server, the transaction data capture tool and the review result acquisition tool may be regarded as a client, and interaction is performed in a server-client interaction manner to transfer the transaction content data and the review result, thereby implementing review and monitoring of the transaction content.
Reviewing the above, whether by way of an Oracle contract or by way of a client embedded tool, the transaction content in the blockchain network can be reviewed by a review platform outside the blockchain network. Therefore, the transaction content in the blockchain network can be examined and monitored without setting a special node in the blockchain network or modifying the network structure and the consensus mode of the blockchain network, so as to meet the requirements of laws, regulations and supervision.
According to another aspect, an apparatus for monitoring transaction content in a blockchain is provided, where the apparatus is deployed in any first node in a blockchain network, and the first node may be embodied as any device, platform, or device cluster having computing and processing capabilities. Fig. 7 shows a schematic block diagram of a monitoring device in a first node according to an embodiment. As shown in fig. 7, the monitoring apparatus 700 includes:
a content obtaining unit 71, configured to, in response to initiating a first transaction by a first node, obtain content data of the first transaction;
a message sending unit 72, configured to send, through a trusted channel, a first message generated based on the content data to an examination platform outside the blockchain network, so that the examination platform performs content examination on the first transaction, and returns an examination result corresponding to the first transaction to the blockchain network.
In one embodiment, the first transaction is a transaction that invokes a smart contract; the content acquisition unit 71 is configured to: reading parameters passed into the smart contract as the content data from a particular field of the first transaction.
According to one embodiment, a Oracle contract is pre-deployed in a first node, wherein the Oracle contract comprises a transaction reading function;
accordingly, the content acquisition unit 71 is configured to: and executing a transaction reading function in the Oracle contract, and reading the content data of the first transaction through the transaction reading function.
Further, in an embodiment, the Oracle contract further includes an audit event, and the message sending unit 72 is configured to: and generating a first message based on the content data by triggering a checking event in the Oracle contract, and sending the first message to the checking platform.
In one embodiment, the first message includes the content data;
in another embodiment, the first message includes a storage address of the content data;
in yet another embodiment, the first message includes log information recording the content data.
According to an embodiment of another aspect, an apparatus for uploading transaction data in a blockchain is provided, and the apparatus is deployed in a second node in a blockchain network, where the second node is an accounting node, and the second node may be embodied as any device, platform or device cluster having computing and processing capabilities. Fig. 8 shows a schematic block diagram of a transaction data uploading arrangement in a second node according to an embodiment. As shown in fig. 8, the apparatus 800 includes:
the result obtaining unit 81 is configured to obtain, for a first transaction in the local transaction pool, an examination result returned after an examination platform outside the blockchain network performs content examination on the first transaction;
a block generating unit 82, configured to add the first transaction to a block for generating a new block if the examination result is an examination pass.
In one embodiment, the result obtaining unit 81 is configured to: reading the examination result by executing a language prediction machine Oracle contract which is pre-deployed in a second node; the Oracle contract comprises a result transfer function, and the examination result is returned to the Oracle contract by the examination platform by calling back the result transfer function.
According to another aspect of the embodiments, an apparatus for monitoring transaction content in a blockchain is provided, and the apparatus is deployed in an inspection platform outside a blockchain network, and the inspection platform may employ any device, platform or device cluster having computing and processing capabilities. FIG. 9 illustrates a schematic block diagram of a monitoring device in an audit platform according to one embodiment. As shown in fig. 9, the apparatus 900 includes:
a receiving unit 91 configured to receive a first message sent by a first node in the blockchain network, the first message relating to content data of a first transaction initiated in the first node;
an obtaining unit 92 configured to obtain the content data based on the first message;
a review unit 93 configured to perform content compliance review on the first transaction based on the content data, and generate review result data;
a returning unit 94 configured to return the inspection result data to a plurality of second nodes in the blockchain network.
According to one embodiment, a Oracle contract is pre-deployed in the first node, the Oracle contract includes a transaction read function, and the content data is obtained by the first node through execution of the transaction read function in the Oracle contract.
In one embodiment, the first message includes a storage address of the content data; the obtaining unit 92 is configured to: reading the content data according to the storage address;
in another embodiment, the first message includes log information for recording the content data; the obtaining unit 92 is configured to: and reading the content data according to the log information.
According to one embodiment, a prologue Oracle contract is pre-deployed in each of the plurality of second nodes, the Oracle contract comprising a result transfer function;
the return unit 94 is configured to: and calling the result transfer function, and returning the inspection result data to the Oracle contract, so that the second node acquires the inspection result data by executing the Oracle contract.
Through the devices in the aspects, the examination platform outside the blockchain network can be used for examining the transaction content, and the requirements of examination and supervision are met.
According to an embodiment of another aspect, there is also provided a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method described in connection with fig. 4.
According to an embodiment of yet another aspect, there is also provided a computing device comprising a memory and a processor, the memory having stored therein executable code, the processor, when executing the executable code, implementing the method described in connection with fig. 4.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this invention may be implemented in hardware, software, firmware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
The above-mentioned embodiments, objects, technical solutions and advantages of the present invention are further described in detail, it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present invention should be included in the scope of the present invention.