Patent attributes
A method and apparatus for executing a smart contract are provided. The method includes: in response to determining that a preset execution moment for executing a smart contract is reached, determining whether a transaction to be executed sent by another node in a blockchain system and used for executing the smart contract has been received; in response to determining that said transaction submitted by the another node has not been received, generating a transaction to be executed corresponding to the current node, and sending said generated transaction to the blockchain system; performing consensus with the another node on said transaction corresponding to the smart contract; and obtaining and executing the smart contract according to said transaction on which the consensus is performed.