Blockchain Script Engine Segmentation for Network Stability
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Blockchain nodes executing transactions differently can lead to network partitioning, causing forks and increasing the potential for malicious activity, such as 51% attacks, while also wasting resources.
Innovation Solution
A computer-implemented method and a blockchain script engine with a native and versioned script engine are introduced. The native script engine executes a script until encountering a version function, then determines script validity and supplies a sub-script to the versioned script engine for execution, ensuring that the validity of transactions is not affected by different node capabilities.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If nodes execute scripts differently based on their capabilities, then adaptability and versatility are improved, but network stability and reliability deteriorate due to network partitioning and forks
Solution Approach 1:
The script execution process is segmented into two distinct phases: a common execution phase that all nodes perform to determine transaction validity, and an optional versioned execution phase that only nodes with specific capabilities perform. This segmentation allows nodes to differ in capabilities while maintaining agreement on fundamental validity, resolving the contradiction between adaptability and network stability.
Solution Approach 2:
The common execution phase acts as an intermediary that all nodes must agree upon before any differentiated execution occurs. This intermediary layer ensures that all nodes reach consensus on basic transaction validity, preventing network partitioning while still allowing advanced nodes to perform additional validation.
2Reliability
If all nodes execute the same script validation, then network stability is improved, but device complexity increases due to requiring all nodes to support all script types
Solution Approach 1:
Node functionality is segmented into core common execution capabilities that all nodes must have, and optional versioned capabilities that only specific nodes implement. This segmentation reduces the complexity burden on individual nodes while maintaining network-wide stability through the common execution layer.
Solution Approach 2:
The common script engine provides universal functionality that all nodes share, ensuring network stability. Additional versioned functionality is then layered on top for nodes that need specialized capabilities, allowing the system to scale complexity only where needed rather than requiring all nodes to support all features.
3Adaptability or versatility
If versioned script execution is allowed, then adaptability is improved, but loss of information occurs as transaction validity may differ between nodes
Solution Approach 1:
Transaction validity is determined in advance through the common execution phase, which all nodes perform identically. Only after this preliminary validity check passes do nodes proceed to optional versioned execution. This preliminary action ensures that all nodes agree on fundamental validity before any differentiated processing occurs, preventing loss of information about transaction validity.
Solution Approach 2:
Instead of allowing versioned execution to determine validity and then trying to reconcile differences, the approach inverts the logic: common execution determines validity first, and versioned execution only adds supplementary validation. This inversion ensures that the baseline validity information is preserved and agreed upon by all nodes.
Data Source
AI summary
A computer-implemented method of executing a script formed from a locking script of a first blockchain transaction and an unlocking script of a second blockchain transaction, wherein the script comprises a first script portion, a version function, and a second script portion, and wherein the method comprises: a native script engine executing the first script portion; upon encountering the version function, the native script engine terminating execution of the script and determining whether the first script portion is valid according to a blockchain protocol; in response to determining that the first script portion is valid, the native script engine supplying a sub-script comprising at least the version function and the second script portion to a versioned script engine; and the versioned script engine executing the sub-script, wherein the execution of the sub-script by the versioned script engine does not affect the validity of the first and/or second blockchain transactions.


