Patent attributes
The present specification provides a method for executing a smart contract and a blockchain node. An implementation of a method for executing a smart contract includes: receiving, by a blockchain node, a request for creating a smart contract, the request including a bytecode of the smart contract; starting, by the blockchain node after completing deployment of the smart contract, to compile the bytecode of the smart contract into a machine code by using just-in-time and storing the machine code; and in execution of the deployed smart contract, executing, by the blockchain node, the machine code corresponding to a bytecode of the smart contract in response to the machine code being locally stored. According to the above implementations of the present application, the blockchain node can greatly increase a speed of executing a smart contract.