Would Bitcoin script benefit from variable length integers?

Maybe a 64-bit integer system could replace the current 32-bit limitation possibly providing sufficient range for Bitcoin's needs?

A custom variable length integer type has much higher complexity and computation cost, personally I'm not sure which use cases would benefit from it?

nostr:nprofile1qqs0zuj4s6jq9sr2ajqc69rc53d25rwpd3afcjrfm97r2qek69hcuscpr4mhxue69uhkummnw3ezucnfw33k76twv4ezuum0vd5kzmp0qy2hwumn8ghj7mn0wd68ytn00p68ytnyv4mz7mwrf0g

Reply to this note

Please Login to reply.

Discussion

I've lived through the 16 to 32 bit and 32 to 64 bit computing transitions, so I'm base sceptical that we've maxed out (though I wouldn't rule it out). Definitely there are cryptographic primitives which want larger numbers.

The real problem is handling overflows: it's actually simpler to say "we don't do that" with some certainty (you *can* actually hit size limits in GSR due to stack size limits, but 4MB is a fairly large number!).

TBH: The complexity for people *writing* Script dealing with signed numbers is actually a much bigger problem than the well-known issues of simple arithmetic operations on large numbers in the implementation.