METHOD AND DEVICE FOR RUNNING CHAINCODE
Embodiments of this application provide a method and an apparatus for running a smart contract. The method is applied to a distributed network, and includes: receiving, by a processing node in the distributed network, a transaction sent by a consensus service node, where the transaction includes a p...
Gespeichert in:
Hauptverfasser: | , , , , |
---|---|
Format: | Patent |
Sprache: | eng ; fre ; ger |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | Embodiments of this application provide a method and an apparatus for running a smart contract. The method is applied to a distributed network, and includes: receiving, by a processing node in the distributed network, a transaction sent by a consensus service node, where the transaction includes a plurality of running results generated in an endorsement process of the smart contract; checking, by the processing node, whether the plurality of running results meet a verification policy, where the checking includes checking version numbers and data that are in the plurality of running results and that are generated by a program other than a restrictive condition in the smart contract; when the plurality of running results meet the verification policy, identifying, by the processing node, the restrictive condition in the smart contract, and determining whether local ledger data meets the restrictive condition; and when the local ledger data meets the restrictive condition, accepting, by the processing node, the transaction. According to the method and the apparatus for running a smart contract in the embodiments of this application, a success rate of writing a transaction to a ledger can be increased, and overall system performance can be improved. |
---|