Benchmarking Bitcoin Script Evaluation for the Varops Budget (Great Script Restoration)

Nov 7 - Jan 26, 2026

  • The introduction of a new Tapscript leaf version addresses the disabling of many opcodes in Bitcoin script execution version 0.3.1, motivated by the need to mitigate denial-of-service attacks.

The proposed solution generalizes the sigops budget into a varops budget, linked to transaction weight, allowing for proportional compute units based on transaction size. Benchmarking focuses on block-sized scripts with a cap at 4M weight units, translating to a varops budget of 20.8 billion compute units, to determine feasibility and efficiency. Tests include hashing loops and bit operations within this budget, aiming to identify slowest script validation scenarios. Community involvement is emphasized for refining the varops budget, with developers encouraged to participate in benchmarking efforts.

Benchmarking methods are crucial, with specific configurations needed to ensure comparable results across systems. Issues such as script errors need addressing to ensure data reliability. The varops budget's effectiveness in limiting script execution time is questioned, particularly when capped at 100%, suggesting a need for methodological improvement. Preliminary calculations for opcode factors under less than 100% varops budget could aid in revising hardcoded factors, indicating potential areas for further investigation into operation costs and stack setup.

The discussion extends to cryptographic operations' optimization, particularly Schnorr signatures, revealing concerns over current benchmarking practices potentially setting unrealistic standards for transaction verification times. A debate emerges on acceptable verification times, highlighting challenges in predicting Bitcoin's future transaction verification landscape. Additionally, the conversation touches upon blockchain validation, emphasizing that the average block is unlikely to reach computational budget limits, suggesting that full validation processes could be quicker than worst-case scenarios.

Further analysis delves into the methodology of blockchain transaction validation benchmarking, pointing out efficiency gains from cached signature verification processes. It also explores the implications of segwit v0/BIP141 standards and Taproot/BIP340-342 for signature operations, suggesting opportunities for optimizing validation through smarter strategies and multi-threaded processing. Intriguingly, the potential for advanced logic opcodes to handle complex operations like zero-knowledge proofs under current constraints is discussed, hinting at broader implications for blockchain efficiency and security.

The preservation of the 80,000 signature operations limit in Taproot/BIP340-342 underscores a cautious development approach, balancing various factors like security and scalability. The discussion reflects a willingness to diverge from past decisions, fostering innovation while maintaining network integrity. Concerns about Taproot's vulnerabilities highlight the importance of carefully considering operational limits to prevent abuse while ensuring system integrity and security.

RIPEMD160's performance when applied repetitively to 520-byte elements offers insights into computational demands, emphasizing the need for efficient data validation in blockchain technologies. This discussion suggests ongoing efforts to refine cryptographic practices, highlighting the dynamic nature of programming in addressing data security and performance challenges.

Overall, the dialogue encapsulates critical reflections within the blockchain developer community on thoughtful decision-making, the balance between innovation and network integrity, and the continuous pursuit of optimization amidst complex trade-offs.

Link to Raw Post
Bitcoin Logo

TLDR

Join Our Newsletter

We’ll email you summaries of the latest discussions from high signal bitcoin sources, like bitcoin-dev, lightning-dev, and Delving Bitcoin.

Explore all Products

ChatBTC imageBitcoin searchBitcoin TranscriptsSaving SatoshiDecoding BitcoinWarnet
Built with 🧡 by the Bitcoin Dev Project
View our public visitor count

We'd love to hear your feedback on this project.

Give Feedback