Batch
A batch bundles a number of off-chain messages, with associated data, into a single payload for broadcast or private transfer.
This allows the transfer of many messages (hundreds) to be backed by a single blockchain transaction. Thus making very efficient use of the blockchain.
The same benefit also applies to the off-chain transport mechanism.
Shared storage operations benefit from the same optimization. In IPFS for example chunks are 256Kb in size, so there is a great throughput benefit in packaging many small messages into a single large payload.
For a data exchange transport, there is often cryptography and transport overhead for each individual transport level send between participants. This is particularly true if using a data exchange transport with end-to-end payload encryption, using public/private key cryptography for the envelope.
Example¶
{
"id": "894bc0ea-0c2e-4ca4-bbca-b4c39a816bbb",
"type": "private",
"namespace": "ns1",
"node": "5802ab80-fa71-4f52-9189-fb534de93756",
"group": "cd1fedb69fb83ad5c0c62f2f5d0b04c59d2e41740916e6815a8e063b337bd32e",
"created": "2022-05-16T01:23:16Z",
"author": "did:firefly:org/example",
"key": "0x0a989907dcd17272257f3ebcf72f4351df65a846",
"hash": "78d6861f860c8724468c9254b99dc09e7d9fd2d43f26f7bd40ecc9ee47be384d",
"payload": {
"tx": {
"type": "private",
"id": "04930d84-0227-4044-9d6d-82c2952a0108"
},
"messages": [],
"data": []
}
}
Field Descriptions¶
Field Name | Description | Type |
---|---|---|
id |
The UUID of the batch | UUID |
type |
The type of the batch | FFEnum :"broadcast" "private" |
namespace |
The namespace of the batch | string |
node |
The UUID of the node that generated the batch | UUID |
group |
The privacy group the batch is sent to, for private batches | Bytes32 |
created |
The time the batch was sealed | FFTime |
author |
The DID of identity of the submitter | string |
key |
The on-chain signing key used to sign the transaction | string |
hash |
The hash of the manifest of the batch | Bytes32 |
payload |
Batch.payload | BatchPayload |
BatchPayload¶
Field Name | Description | Type |
---|---|---|
tx |
BatchPayload.tx | TransactionRef |
messages |
BatchPayload.messages | Message[] |
data |
BatchPayload.data | Data[] |
TransactionRef¶
Field Name | Description | Type |
---|---|---|
type |
The type of the FireFly transaction | FFEnum : |
id |
The UUID of the FireFly transaction | UUID |