Blockchain Contract Implementation System
Key Glossary
Term Definitions Blockchain is a system for storing data in a decentralized manner by saving it in a series of data blocks that have a sequential relationship with each other. Blockchain Nodes are network nodes that maintain and update the blockchain and are also responsible for verifying data. Lightweight Nodes are nodes that do not download the full blockchain, but only download block headers to verify the authenticity of blockchain transactions. Full Nodes are nodes that download each block and blockchain transaction and check them against the consensus rules of the blockchain. Blockchain Contracts are the terms of a contract between users written in lines of code, designed to digitally facilitate, verify or enforce the negotiation or performance of a contract. Smart Contracts are a common type of blockchain contract, usually referring to contracts that are automatically executed on the blockchain. Virtual Machine (VM) is a software emulation of a computer system based on a computer architecture that provides the functionality of a physical computer. Bytecode is program code that has been compiled from source code into low-level code designed for efficient execution by a software interpreter. Source Code is human-readable programming language code. Compiler is computer software that converts computer code from one programming language to another. Indicators are markers added to the bytecode to indicate the type of blockchain contract. Native Contracts are contracts written in a programming language that is natively supported by the blockchain system. Solidity contract A contract written in the Solidity programming language. Ethereum Virtual Machine (EVM) A virtual machine that executes Solidity contracts. GNU Compiler Collection (GCC) A compiler that executes C++ code. Java Virtual Machine (JVM) A virtual machine that executes Java bytecode. Python Virtual Machine (PVM) A virtual machine that executes Python code. Remote Procedure Call (RPC) A protocol that allows a program to request a service on another computer on a network without knowing the details of the network.
Short Answer Questions
What is the difference between a lightweight node and a full node?
Explain how blockchain contracts are executed in a blockchain network.
What is bytecode and how does it differ from source code?
What role does the compiler play in the deployment of blockchain contracts?
What is the purpose of indicators in the approach proposed in ?
How does the proposed approach address the limitations of a single virtual machine in existing blockchain systems?
Explain the advantages of using multiple virtual machines on blockchain nodes.
How can indicators be represented in ?
Explain different ways to add indicators to bytecode.
In addition to C++, Java, Solidity, and Python, what other programming languages do you think this approach can be extended to?
Short answer
Lightweight nodes do not download the full blockchain, but only download block headers to verify transactions, relying on full nodes to access more functions. Full nodes download each block and transaction and verify them according to consensus rules.
Users compile contract code into bytecode and submit it as a transaction to the blockchain network. Blockchain nodes verify the transaction, and if consensus is reached, it is added to the blockchain, and the contract code is executed by the virtual machine on the node.
Bytecode is a low-level code compiled from source code, designed for efficient execution by software interpreters. Unlike human-readable source code, bytecode is read and executed by software interpreters.
The compiler converts human-readable contract source code into bytecode that can be executed by a virtual machine.
The indicator is used to indicate the type of blockchain contract, allowing blockchain nodes to select the appropriate virtual machine to execute the contract.
This approach addresses the limitations of a single virtual machine by allowing blockchain nodes to support contracts written in different programming languages, thereby enabling a wider range of contract types and functions.
Using multiple virtual machines allows blockchain nodes to execute contracts written in various programming languages, thus increasing flexibility, interoperability, and scalability.
Indicators can use different representation methods, such as binary or hexadecimal representation, and can be placed at different locations in the bytecode.
Indicators can be added to the source code during compilation or added to the bytecode after compilation.
The approach can be extended to any other programming language with a corresponding virtual machine, such as Go, Rust, or JavaScript.