`OP_FOLD`: A Looping Construct For Bitcoin SCRIPT



Summary:

In a discussion about the possibility of adding jets to bitcoin software, ZmnSCPxj explains that changing the weight of a transaction using jets can be done similarly to how segwit separated the witness out. However, if a new jet is released but nobody else has upgraded, a user of a new jet has no security. There is no incentive for end-users to use a jet if the script does not weigh less if it uses a jet. Fullnodes recognizing jettable code and inserting them automatically on transport could potentially have a large lookup table once there are a few hundred jets. Jets would require some debate and review to add it to bitcoin core or whichever bitcoin software they want to add it to. The idea proposed in the last email would allow anyone to add a new jet and each node can have their policy to determine which jets of the ones registered it wants to keep an index of and use. This mechanism would require a consensus change to implement, but thereafter any jet could be registered in userspace.


Updated on: 2023-06-15T17:20:51.107794+00:00