System entities
In Rell, once data is stored within block
and transaction
entities, it becomes immutable, meaning it cannot be
altered, modified, or deleted through code execution. This immutability contributes to the integrity of the blockchain
data, ensuring a reliable and tamper-resistant historical record.
entity block {
block_height: integer;
block_rid: byte_array;
timestamp;
}
entity transaction {
tx_rid: byte_array;
tx_hash: byte_array;
tx_data: byte_array;
block;
}
It's impossible to create, modify, or delete the values of these entities in the code.
tx_data
The tx_data
field contains the raw binary encoding of the full transaction. It is encoded using
Generic Transfer Value (GTV),
the standard format for structured data on Chromia.
More specifically, this field holds a serialized GTX transaction, which can be decoded in Rell using the built-in
gtx_transaction
type:
query get_transactions() {
return transaction @* { } ( gtx_transaction.from_bytes(.tx_data) );
}
This returns a structured list of transactions. Each transaction includes fields such as:
{
"body": {
"blockchain_rid": "0x...",
"operations": [
{
"name": "create_book",
"args": ["ISBN001", "Chromia 101", "Alice"]
}
],
"signers": ["0x..."]
},
"signatures": ["0x..."]
}
For details on this structure, see the Postchain REST API – Transaction object.