Skip to content

[ETH] Reduce payload size #222

@odesenfans

Description

@odesenfans

The current format to store data on-chain can be improved to reduce the size of the payload and reduce transaction costs. Currently we store the data as a JSON dictionary:

{"protocol": "aleph-offchain", "version": 1, "content": ipfs_id}

or

{"protocol": "aleph", "version": 1, "content": {"messages": messages}}

when we only store short messages (unlikely to happen at this stage).

Since the JSON payload is already quite straightforward, the only change in format that would make sense is to switch to a binary format. Ex: byte 1 = protocol, byte 2 = version, variable length bytes = IPFS hash.

Another option to reduce fees is to store more messages in the same payload. We limit it to 10k messages at the moment but most TXs effectively target less messages, resulting in more TXs than strictly necessary. This would however increase the latency to confirm messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions