2026 Layla Upgrade Lock-in CHIP Endorsements Thread

I don’t know if one of these has been done in the past, but it seems sensible to have a convenient place where endorsements can either be posted or linked somewhat in aggregate. Hopefully this facilitates people referencing, discussing or staying up to date with the momentum of various proposals.

Edit: Of course, individual CHIPs will be responsible for collecting their endorsements within the CHIP itself for others to review, and this thread obviously does not replace that.

Endorsement season has started it seems with @kzKallisti posting in support of Loops, Bitwise & Functions (original version), with review pending for P2S. Source

6 Likes

Great to see some CHIP stacking going on, no pun intended.

These three would round off the requirements to start implementing some strong privacy functionality, I hope, into BCH!

4 Likes

CHIP-2025-05 Functions: Function Definition and Invocation Operations

With the VM limits CHIP in place finally we can safely enable functions inside our already powerful VM, and functions will serve as a great enabler and amplifier. Functions will let people structure their UTXO programs in ways that avoid errors, and will let people pack advanced contract logic into less bytes. It will simplify quantum-resistant solutions, and it will enable more privacy through MAST-like design patterns. The design of DEFINE/INVOKE is solid and all decisions have a solid rationale. I fully endorse this CHIP for 2026 activation!

CHIP-2025-05 Bitwise: Re-Enable Bitwise Operations

It was very annoying to miss basic bitwise operations present in most other programming languages, and finally it was the VM limits CHIP that opened the door to completing the set of bitwise operations. I fully endorse this CHIP for 2026 activation!

CHIP-2021-05 Loops: Bounded Looping Operations

Another fruit of VM limits CHIP, finally contracts authors can work with transaction totals without having to unroll loops or having to use other error-prone workarounds. Loops will also open the door to implementing many operations that are missing as native functions, such as EC operations and advanced math operations like exponentiation, opening the door for more financial and privacy applications. I fully endorse this CHIP for 2026 activation!

CHIP-2024-12 P2S: Pay to Script

This is very exciting! Since CashTokens upgrade the smart contract ecosystem has moved past “send to address” flow to a flow where client-side app creates the transaction for the user. P2S will fit right in, and I expect that app builders will find P2S more convenient than P2SH. I fully endorse this CHIP for 2026 activation!

I’d like to add that the gap between relay and consensus rules has been an obstacle to experimentation, and this is a great step towards closing that gap. I think what matters here is that the default is maximally permissive (consensus-limited only by DoS considerations) and then node operators & miners can further restrict it if they want, as opposed to status quo of being restrictive and then some operators may relax it and cause unexpected issues for everyone else. I hope to see OP_RETURN alignment next, as OP_RETURN outputs are a convenient place to define function bodies to be shared by many inputs.

10 Likes

@ShadowOfHarbringer endorsed Functions, Bitwise & Bounded Loops chip in my Telegram channel. With a neutral for P2S. He has also posted in the relevant threads here on BCR.

2 Likes

I endorse CHIP-2025-05 Functions (without Takes 2 & 3) for 2026 lock-in.

In my mind there is no doubt about the massive value that functions provide to a programming language. The Functions CHIP delivers a lot of that value to Bitcoin Cash. One of the key benefits of functions is that they provide a means of abstraction which is how complexity is tamed as contracts grow larger (albaVm HTML logs example). Abstraction allows developers to create higher-level constructs out of primitives, and then work at this higher-level without being distracted by the details. Abstraction removes a lot of code repetition and makes contract code easier to audit, increasing safety. In addition, functions allow for recursion which can be used to succinctly express certain algorithms, also simplifying review.

What risks are associated with the Functions CHIP? As with any change there is the risk of introducing bugs along with the implementation. Having implemented the Functions CHIP myself in albaVm, my view is that it is simple and not riskier to implement than other CHIPs we have delivered recently.

Metaprogramming has been brought up as a risk. But it is also a useful feature that allows the Functions CHIP to offer run-time-created immutable tables with cheap lookups (Windowed EC scalar multiplication example). I don’t view metaprogramming as a downside. Even today it is possible to do very limited scale metaprogramming using evaluators like TurtleVm. And the Loops CHIP (2026) will make such evaluators a lot more practical.

There is a risk that we will discover a better design for functions down the road. This risk has been mitigated by all the hard work that has gone into this CHIP, and I think we have a really good design. I don’t think that delaying this CHIP for another year would be productive. The main contender to the Functions CHIP, OP_EVAL, was investigated thoroughly by the community. I implemented it in albaVm & albaDsl and wrote contract code using it. In my view the Functions CHIP better solves for the common use case of having functions that are globally available from any part of the contract at little cost. It also provides a better compilation target for CashScript. OP_EVAL on its own does not solve as well for this, but could still be a useful construct for other use cases. So it is worth keeping on the radar. Also note that the Functions CHIP does solve for immutable lambdas.

I think we have great momentum as a community right now and that we should capitalize on this moment and release functions in 2026. It will be a huge boost for Bitcoin Cash!

5 Likes

I support the 4 CHIPs proposed by Jason Dreyzehner for activation on Bitcoin Cash May 2026.

Below are my support statements for each of the CHIPs where I elaborate on my reasoning.

These statements are for myself personally, but can also be considered support statements for Cashonize and ParityUSD! For any other team projects where I am not the sole-lead, I will logically first have to discuss any separate CHIP statements.

CHIP-2024-12 P2S: Pay to Script

The ‘Pay to Script’ CHIP bundles a few small related changes which are low-hanging fruit for improving contract development on BCH. The CHIP removes the non-standardness restrictions for custom locking scripts which improves usecases like Cauldron DEX contracts or ZCEs by not forcing these usecases to use P2SH for standardness. Further, the CHIP improves the ease of contract development by removing the 1650 input bytecode standardness limit and by increasing the maximum commitment length. The CHIP does not introduce any novel concepts but instead removes or relaxes current constraints. I fully support this CHIP for activation in May 2026!

CHIP-2021-05 Loops: Bounded Looping Operations

The ‘Bounded Looping Operations’ CHIP got first proposed in 2021, now with the targeted VM limits activated in 2025 the groundwork has been laid to finally incorporate loops into the BCH VM by accurately measuring and limiting script resource usage. Loops are a very elementary concept for programming languages so now that they can be enabled in a straightforward way, we absolutely should. The Bounded loops CHIP research had been completed for years already and represents BCH overcoming dogmas and misconceptions on loops in Bitcoin. Fully support the CHIP and look forward to incorporating loops into CashScript to empower contract developers to create more advanced contracts!

CHIP-2025-05 Bitwise: Re-Enable Bitwise Operations

The ‘Bitwise’ CHIP is long-desired restoration of some of the remaining missing bitwise operations. After the VM Limits CHIP of the previous upgrade it has become straightforward to introduce new opcodes without any custom limits and in a way that nicely integrates with the existing test framework. BitcoinCashAutist and myself had even done some prior draft work for proposing to re-activate bitwise ops is a similar fashion. Fully support the CHIP for activation in May 2026!

CHIP-2025-05 Functions: Function Definition and Invocation Operations

The ‘Functions’ CHIP is a modern adaptation of an old but very powerful idea for improving the scripting language. With CashScript we had already run into the need for macros/libraries to make the high level language developer friendly & powerful. The idea to enable data-as-code by evaluating as bytecode is general concept but the devil is in the details of the implementation. With the benefit of a much better understanding of the evolution of the VM we’re able to look at these old ideas through a new lens.

The first iteration of the proposal, OP_EVAL, made strides in arguing against any kind of ‘stack isolation’ which is an anti-feature in practice. After great discussion with many back-and-froths, the proposal changed its approach to using 2 opcodes: OP_DEFINE & OP_INVOKE. The main reason being that stack juggling whole functions is actually a big drawback for creating compilers and optimizing contract code. With the 2nd iteration of the proposal, the discussion focused on possible dangers of allowing “function factories” and adding “mutation tracking” safety rails. The whole process thoroughly explored the solution space with multiple variations. With the current (unrestricted) functions CHIP coming out as the best solution.

The Functions CHIP represents a major unlock in the power of the VM, enabled by the prior work on VM limits. We can expect to see permissionless innovation for a much more advanced class of contracts including quantumproof cryptography, zero-knowledge usecases, cross language compilers. This will move out the frontier of innovation, allowing for exploration of very exciting new ideas. I fully support the Functions CHIP for activation in May 2026!

6 Likes