CPC G06F 21/577 (2013.01) [G06F 8/656 (2018.02); G06F 21/64 (2013.01); G06Q 20/389 (2013.01); G06F 2221/033 (2013.01)] | 15 Claims |
1. A method for supporting smart contracts in a blockchain network, the blockchain network being a distributed blockchain network having nodes, each node, of the nodes, that validates transactions running a virtual machine for executing a smart contract, a contract rewriting framework system being provided, the contract rewriting framework system comprising a vulnerability detection tool, a rewriter tool, and a deployment component, the method comprising:
obtaining, by the deployment component, a permission to upgrade the smart contract, the permission being granted to the deployment component by a creator or owner of the smart contract during a creation phase of the smart contract;
retrieving, by the contract rewriting framework system, the smart contract from the blockchain network, the smart contract being passed to the vulnerability detection tool;
detecting, by the vulnerability detection tool, a vulnerability in the smart contract, the vulnerability detection tool determining a type of the vulnerability and an instruction location of the vulnerability;
rewriting, by the rewriter tool, the smart contract to include a patch for fixing the vulnerability, a patched smart contract being generated by the rewriter tool based on the type of the vulnerability and the instruction location of the vulnerability; and
issuing, by the deployment component, an upgrade transaction including the patched smart contract to the blockchain network, such that the patched smart contract is deployed in the blockchain network.
|