Blockchain Native Contract Execution via Bytecode Type Indicators

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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 potential.

Innovation Solution

Implementing a method to execute native contracts on blockchain by using dynamic libraries, where bytecode includes an indicator to determine the contract type, allowing execution through a corresponding virtual machine, child process, or Docker container, enabling support for non-Solidity languages.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If blockchain systems require contracts to be written in Solidity and executed on EVM, then the system maintains simplicity and consistency, but the adaptability and versatility of the blockchain system are limited

Engineering Contradiction:
Improvelanguage supportVSAvoidexecution system
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements a universal contract execution system that can handle multiple contract types (Solidity contracts on EVM and native contracts in C++/Python) through a unified bytecode interface. The system uses a contract type indicator in the bytecode to determine whether to execute on EVM or invoke a native virtual machine, allowing the blockchain to support multiple programming languages and execution environments without requiring separate systems for each language.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent introduces an intermediary mechanism (the contract type indicator in bytecode and the corresponding execution dispatcher) that mediates between the blockchain system and different contract execution environments. This intermediary allows the system to seamlessly route contracts to the appropriate execution engine (EVM or native VM) based on the contract type, enabling multi-language support while maintaining system coherence.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If the blockchain system supports only Solidity contracts on EVM, then the system maintains ease of operation, but the productivity and application range are restricted

Engineering Contradiction:
Improvecontract execution efficiencyVSAvoidsystem operation
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The system achieves multi-functionality by enabling the blockchain to execute both Solidity contracts (with gas-based fee mechanisms) and native contracts (with unlimited execution and sandbox escaping capabilities). This allows developers to choose the most appropriate language and execution model for each application scenario, thereby improving overall productivity while maintaining operational simplicity through automated contract type detection and routing.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Speed

If native contracts are executed with unlimited gas and without EVM constraints, then the execution speed and flexibility improve, but the system reliability and security may be compromised

Engineering Contradiction:
Improvecontract execution speedVSAvoidexecution safety
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The patent applies local quality by implementing different execution constraints for different contract types: Solidity contracts on EVM are subject to gas limits and strict safety constraints, while native contracts in C++/Python execute with unlimited gas and sandbox escaping capabilities. This localized differentiation allows each contract type to operate with the appropriate level of freedom and constraint for its specific requirements, optimizing both speed and reliability for each execution context.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS11086847B2System and method for implementing native contract on blockchain
Publication Date: 2021.08.10 ADVANCED NEW TECHNOLOGIES CO LTD
  • US11086847B2 patent drawing
  • US11086847B2 patent drawing
  • US11086847B2 patent drawing

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.