We’re going to release data transaction on mainnet shortly.
A data transaction contains a number of key-value pairs that are recorded into the blockchain and become part of state. The values are tied to the account that authored the transaction, and are readable from both REST API and smart contract code. It is possible to overwrite values by publishing another transaction that provides another value for the same key. We currently don’t plan to have a way to delete a key-value pair.
Keys are arbitrary UTF8-encoded strings, so they can include punctuation, national alphabet characters, white space etc. Max key length is 100 characters.
Values are of one of 4 types: integer (8 bytes), boolean (1 byte), variable-length string (UTF8 encoded), and variable length byte array (max 32k bytes).
Transaction fee is 0.001 WAVES per kilobyte of data.
Here’s a (somewhat outdated) technical note
One decision to be made is how to encode binary arrays in JSON. Base58 is too slow for large arrays, so we’re thinking of using base16 or base64. Pros and cons:
- base64: widely used, supported in every developer stack
but: almost indistinguishable from Base58
- base16: used in Ethereum, easy to tell from Base58
but: less supported, produces longer strings
Comments are welcome!