High-Level Language Compilation for Restricted Blockchain Scripts

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing blockchain scripting languages, such as Bitcoin's Script, are functionally restricted and require low-level programming techniques, making it difficult and time-consuming for programmers to develop blockchain applications, leading to increased errors and security risks.

Innovation Solution

A software compiler that translates high-level languages like C, Java, or C++ into blockchain-compatible scripts using static compilation and loop unrolling, ensuring error-free and secure execution on blockchain platforms.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If programmers use low-level scripting languages like Bitcoin's Script, then security and functional restrictions are maintained, but programming complexity and development time increase significantly

Engineering Contradiction:
Improveblockchain securityVSAvoidprogramming complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent introduces a compiler as an intermediary tool that translates high-level language code into blockchain-compatible script code. This mediator allows programmers to write secure, validated code in familiar high-level languages while the compiler ensures the output adheres to blockchain security requirements and functional restrictions, thus maintaining security without exposing programmers to low-level complexity

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The compiler performs preliminary validation and translation of code before deployment to the blockchain. By checking and converting code in advance, the system ensures security constraints are met before execution, preventing errors and security issues from occurring during runtime on the blockchain network

Inventive Principle:
Principle #10Preliminary action

2Reliability

If programmers use low-level scripting languages, then blockchain security is preserved, but development speed and productivity decrease

Engineering Contradiction:
Improvetransaction validityVSAvoiddevelopment speed
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The compiler serves as a productivity-enhancing intermediary that automatically handles the complex task of translating high-level code into valid blockchain script. This automation maintains transaction validity through rigorous compilation checks while dramatically increasing development speed by eliminating manual script writing and reducing errors

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The compilation process performs preliminary validation of code syntax, semantics, and blockchain compatibility before deployment. This advance checking ensures transaction validity is guaranteed while accelerating development by catching errors early in the development cycle rather than during blockchain execution

Inventive Principle:
Principle #10Preliminary action

3Loss of time

If high-level languages are used with static compilation, then development time is reduced, but the need for loop unrolling and code transformation increases

Engineering Contradiction:
Improvedevelopment timeVSAvoidcompilation complexity
Core Design Contradiction:
Loss of timeVSDevice complexity

Solution Approach 1:

The patent extracts complex compilation tasks such as loop unrolling and code transformation into automated compiler functions. By removing these complex operations from manual programming and handling them automatically during compilation, the system reduces development time while containing compilation complexity within the compiler itself rather than exposing it to programmers

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentEP4300290B1System and method for compiling high-level language code into a script executable on a blockchain platform
Publication Date: 2025.09.10 NCHAIN LICENSING AG
  • EP4300290B1 patent drawingFigure 1
  • EP4300290B1 patent drawingFigure 2
  • EP4300290B1 patent drawingFigure 3

AI summary

A computer-implemented method (and corresponding system) is provided that enables or facilitates the execution of a portion of source code, written in a high-level language (HLL), on a blockchain platform. The method and system can include a blockchain compiler, arranged to convert a portion of high-level source code into a form that can be used with a blockchain platform. This may be the Bitcoin blockchain or an alternative. The method can include : receiving the portion of source code as input; and generating an output script comprising a plurality of op_codes. The op_codes are a subset of op_codes that are native to a functionally-restricted, blockchain scripting language. The outputted script is arranged and/or generated such that, when executed, the script provides, at least in part, the functionality specified in the source code. The blockchain scripting language is restricted such that it does not natively support complex control-flow constructs or recursion via jump-based loops or other recursive programming constructs. The step of generating the output script may comprise the unrolling at least one looping construct provided in the source code. The method may further comprise providing or using an interpreter or virtual machine arranged to convert the output script into a form that is executable on a blockchain platform.