The invention provides a node implementation method and
system for an on-chain and off-chain cooperative distributed
oracle machine. The method comprises the following steps: firstly, packaging an
external data address parameter into a request block, then converting the request block into a first Hash value, and signing the first Hash value by using a private key of a
consensus node; inputting the request block, the first Hash value and the signature into an
oracle machine node; verifying the
correctness of the first Hash value and the signature, and if the
verification is passed, analyzing the request block and calling
external data; packaging the
external data into a reply block based on the
oracle machine node, converting the reply block into a second Hash value, and signing the second Hash value by using a private key of the
oracle machine node; sending the reply block, the second Hash value and the signature to a
consensus node; verifying the signature
correctness by using the public key of the
oracle machine node; and if the
verification is passed, analyzing the reply block and calling a data receiving interface, and calling the analyzed data back to the oracle contract for
processing. According to the invention, the dependence of the
oracle machine on the main node can be reduced while the single-point fault risk is avoided, and the stability of the block
chain system is enhanced.