Goal and Scope
This document outlines a structured approach to assess and implement incremental upgrades to the Bitcoin Cash (BCH) Script system. It provides a roadmap for evaluating consensus changes while maintaining alignment with BCH's core mission: peer-to-peer electronic cash.
Key Focus Areas:
- Incremental Improvements: Focus on enhancing existing Script functionality (e.g., arithmetic operations, stack manipulation).
- Exclusion of Overarching Changes: Proposals like new transaction formats (e.g., NIMBUS) are outside this scope.
Approach
Bitcoin Cash Script should empower the "electronic" aspect of peer-to-peer cash by enabling flexible spending conditions. Upgrades must:
- Address current gaps or complement existing Script features.
- Harmonize with future Script developments.
- Prioritize generic, simple operators over niche functionalities.
- Advance BCH’s utility as electronic cash.
- Minimize risks (e.g., resource abuse, attack vectors).
Bitcoin Cash Script Roadmap
1. Bigger Integers
- Description: Expand integer support beyond 32-bit (e.g., 64/128-bit) for arithmetic operations.
- Status: Consensus exists, but lacks implementation leadership.
- Use-Cases: Simplifies transaction "amount" field manipulation.
- Interactions: Requires overflow behavior analysis for opcodes like
OP_MUL.
2. OP_MUL
- Description: Re-enable multiplication (
OP_MUL), currently disabled in Script. - Status: Discussed; activated on BSV but lacks urgency in BCH.
- Use-Cases: Generic arithmetic utility; relevant for covenant price actions.
- Concerns: Overflow behavior must align with potential integer-size upgrades.
3. Change Endianness (OP_REVERSE)
- Description: Add
OP_REVERSEto simplify big-endian data handling (e.g., SLP "amount" fields). - Status: Draft spec proposed; no node implementation.
- Use-Cases: Reduces manual byte manipulation (30+ opcodes → 1).
- Concerns: Limited demand beyond niche scenarios.
👉 Explore Bitcoin Cash Script upgrades
4. OP_PUSHSTATE
- Description: Push sighash preimage data to the stack for efficient covenants.
- Status: Early draft spec under heavy discussion.
- Use-Cases: Enables covenants, custom sighash schemes.
5. Reverse OP_ROLL
- Description: Insert top stack element at arbitrary depths (aids high-level language compilation).
- Status: Conceptual.
- Use-Cases: Improves compiler efficiency for languages targeting BCH Script.
6. Registers
- Description: Supplement the stack with register-based push/pop opcodes.
- Status: Preliminary discussion.
- Use-Cases: Optimizes high-level language support.
7. Increase Script Size Limits
- Description: Raise opcode/script size limits for complex contracts.
- Status: Under review.
- Concerns: Requires careful evaluation of attack vectors.
FAQ
Q1: Why focus on incremental Script upgrades?
A: Targeted improvements minimize disruption while enhancing functionality, ensuring BCH remains stable and scalable.
Q2: Is OP_MUL critical for BCH?
A: While useful, its activation depends on community prioritization and clear use-cases.
👉 Learn more about BCH Script innovations
Q3: How does OP_REVERSE benefit developers?
A: It streamlines data handling, reducing manual workarounds for endianness conflicts.
Conclusion
This roadmap prioritizes pragmatic upgrades to BCH Script, balancing innovation with stability. Community feedback and developer engagement will drive its evolution.
Acknowledgements: Mark Lundeberg for insights and suggestions.