Skip to content

Arbitrary Data

Transactions provide a field for including unstructured binary data, which can be used for any purpose. The history of other blockchains, namely Bitcoin, has shown that clever users can always find ways of encoding arbitrary data into transactions—often in the service of novel functionality. Thus, Sia explicitly allows this practice.

Arbitrary data also provides a facility for softforks: new fields can be encoded as arbitrary data, which updated nodes can decode into a structured format while old nodes remain oblivious.

In v1

Arbitrary data played a larger role in v1, as it was the primary means for host discovery: since Attestations did not exist, host announcements were encoded and broadcast as arbitrary data, prefixed by a "HostAnnouncement" string. Foundation Address Updates were handled similarly; in fact, this was the only instance where v1 consensus code examined arbitrary data. Lastly, v1 transactions could contain multiple pieces of arbitrary data, whereas v2 transactions are limited to one.