Native Contract Execution on Blockchain via Bytecode Indicators
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current blockchain systems are limited by requiring smart contracts to be written in Solidity, lacking support for native contracts written in other languages like C++ or Python, which restricts development and application.
Innovation Solution
Implementing a system that uses dynamic libraries and indicators to execute native contracts on blockchain, allowing for the determination and execution of contract types, including the use of virtual machines and Docker containers to run C++ and other non-Solidity code.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If blockchain systems require smart contracts to be written in Solidity and executed on EVM, then the system maintains simplicity and consistency, but it limits language support and restricts development flexibility
Solution Approach 1:
The patent introduces bytecode as an intermediary representation that bridges different programming languages and the blockchain execution environment. Source code in various languages (C++, Python, etc.) is compiled to bytecode, which then executes on the blockchain. This intermediary layer enables multi-language support without requiring the blockchain core to directly handle multiple languages, thus resolving the contradiction between adaptability and complexity.
Solution Approach 2:
The bytecode execution system serves multiple functions: it can execute contracts from different programming languages, maintain security through standardized execution, and preserve blockchain consistency. By making the execution system universal through bytecode interpretation, the patent enables the blockchain to handle diverse contract types without proportionally increasing system complexity.
2Speed
If native contracts are allowed to run outside EVM without gas limits, then execution speed improves and developers gain flexibility, but security risks and system stability deteriorate
Solution Approach 1:
The patent changes the execution parameters by introducing a configured gas limit specific to native contract execution, rather than applying the standard EVM gas rules. This parameter adjustment allows native contracts to execute faster with higher gas limits when needed, while still maintaining bounded resource consumption. The system can dynamically adjust execution parameters based on contract type, resolving the contradiction between speed and security.
3Adaptability or versatility
If the system supports multiple contract types with different execution methods, then functionality and language support expand, but the complexity of contract deployment and execution increases
Solution Approach 1:
The patent segments the contract execution system into distinct handling paths based on contract type. Solidity contracts follow the traditional EVM execution path, while native contracts follow a separate bytecode interpretation path. This segmentation allows each contract type to be handled by specialized routines, making the overall system more manageable despite supporting multiple contract types. The deployment process remains simple because the system automatically routes contracts to appropriate execution paths based on their type indicators.
Data Source
AI summary
A computer-implemented method for implementing native contract on blockchain comprises: obtaining combined bytecode associated with a blockchain contract, wherein the combined bytecode comprises an indicator representing a type of the blockchain contract; determining the type of the blockchain contract based at least on the indicator; and executing the blockchain contract based on the determined type of the blockchain contract.


