HomePhabricator

Compact serialization for scripts
69fc8047a9a9Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Compact serialization for scripts

Special serializers for script which detect common cases and encode
them much more efficiently. 3 special cases are defined:

  • Pay to pubkey hash (encoded as 21 bytes)
  • Pay to script hash (encoded as 21 bytes)
  • Pay to pubkey starting with 0x02, 0x03 or 0x04 (encoded as 33 bytes)

Other scripts up to 121 bytes require 1 byte + script length. Above
that, scripts up to 16505 bytes require 2 bytes + script length.

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Jun 15 2012, 16:52
deadalnixPushed on May 14 2017, 22:04
Parents
rABC4d6144f97faf: Compact serialization for variable-length integers
Branches
Unknown
Tags
Unknown

Event Timeline

Pieter Wuille <pieter.wuille@gmail.com> committed rABC69fc8047a9a9: Compact serialization for scripts (authored by Pieter Wuille <pieter.wuille@gmail.com>).Oct 20 2012, 21:08