ScriptNum, PUSHDATA, CODESEPARATOR, and Hash Functions

2024-04-01 · Ryan X. Charles
  • ScriptNum, the type of number that lives on the stack during script execution, now supports numbers bigger than 4 bytes and is encoded in big endian two’s complement rather than sign-magnitude little endian encoding.
  • An item on the stack, which is a SysBuf that can be interpreted as a ScriptNum for some operations, is only zero if it is all zeroes. This is different from Bitcoin which uses signed magnitude encoding and where there is such a thing as negative zero.
  • The unnamed push operations that push small amounts of data have been removed. Only PUSHDATA1, PUSHDATA2, and PUSHDATA4 are allowed.
  • I have removed VER, RESERVED, and NOP operations from the script language.
  • I have removed the original hash functions, RIPMED160, SHA1, and SHA256, from the script language. We are using Blake3 for all hashing operations.
  • I have removed CODESEPARATOR from the script language as it has almost never been used for anything.

Earlier Blog Posts

Why We Need Another Blockchain
2024-03-30 · Ryan X. Charles
Data Structures
2024-03-30 · Ryan X. Charles
Var Ints, Script, and Names
2024-03-29 · Ryan X. Charles
Blake3 and Big Endian
2024-03-28 · Ryan X. Charles
One-GPU-one-vote
2024-03-26 · Ryan X. Charles

Back to Blog

Home · About · Blog · Privacy · Terms
X · Telegram · Discord · reddit · GitHub
Copyright © 2024 Ryan X. Charles LLC