Method for upgrading smart contract in blockchain system

A smart contract and blockchain technology, applied in the blockchain field, can solve the problems of leaving interfaces, status data of old contracts cannot be migrated, and huge losses, etc., to achieve the effect of ensuring security and simple upgrade solutions

Inactive Publication Date: 2018-06-22
邵美
View PDF4 Cites 40 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0008] But as smart contracts started to gain more and more use, their processes and codes became more and more complex, and people found that, just like real-world contracts, it was difficult to design and code without careful review. Avoid human errors. Once a hacker finds a loophole, the loss is often huge
The DAO attack in June 2016 caused a loss of USD 60 million for Ethereum users due to a code defect; more recently, due to a vulnerability in the Parity wallet, the loss was worth USD 30 million
These two types of solutions have their limitations and cannot solve all problems: the separation of contract code and storage adds a lot of complexity to the design, and sometimes it is not feasible; although the proxy contract can point to the new contract, the state data of the old contract It cannot be migrated; some contracts did not have a good design at the beginning of development, and did not leave interfaces for future upgrades

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method for upgrading smart contract in blockchain system
  • Method for upgrading smart contract in blockchain system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0021] The upgrading method of the smart contract in the blockchain system of the present invention will be further described in detail below in conjunction with the embodiments of the present invention.

[0022] In order to realize the upgradeability of smart contracts, although there are currently many best practices for smart contract programming, as well as stricter review processes, and even formal verification tools have emerged to verify the certainty of smart contracts through mathematical proofs. However, since the smart contract contains code, it is impossible to be free of loopholes. Looking back at our current neutral Internet world, all kinds of Internet services are designed to be upgradeable, through upgrades to make up for various loopholes that are unintentionally generated during the development process. We believe that any perfect application system cannot avoid the existence of defects such as loopholes. A perfect application system is not designed through ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The present invention discloses a method for upgrading a smart contract in a blockchain system. The method comprises the following steps: A. at a language level, enabling a contract to directly read and write state variables in another contract under the premise of complying with security constraints, and when the code is running, providing a separate storage area for the state variables through the nebula chain virtual machine NVM for direct access by other contracts; B. providing a shared keyword at the language level, wherein the state variables modified by using the keyword can be accessedby other contracts; and C. translating the shared keyword defined by the language level into a pre-defined completed function by the corresponding compiler front end, and generating the underlying virtual machine LLVM byte code. According to the upgrade mechanism provided by the upgrade method of the present invention, the security of the smart contract can be ensured while solving the smart contract upgrade problem.

Description

technical field [0001] The present invention relates to blockchain technology, in particular to a method for upgrading smart contracts in a blockchain system. Background technique [0002] The current blockchain technology is considered to be the next-generation disruptive core technology after the steam engine, electricity, and the Internet. If the steam engine has released people's productivity, electricity has solved people's basic living needs, and the Internet has completely changed the way information is transmitted, then the blockchain, as a machine for constructing trust, may completely change the way the value of the entire human society is transmitted. [0003] Blockchain technology (Blockchain Technology, BT) is an Internet database technology, which is characterized by decentralization, openness and transparency, allowing everyone to participate in database records. The basic concepts of the blockchain include: Transaction, an operation that leads to a change in...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F8/656G06F9/455
CPCG06F9/45504
Inventor 邵美
Owner 邵美
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products