Skip to main content

Reference microblocks

A microblock can reference other microblocks. This lets you:

  • share storage on the blockchain;
  • make your objects more readable.
note

A reference is only possible between microblocks managed by the same operator.

Syntax​

A reference to a microblock looks like this:

cmts://resolve/al/B304934D7D323D412621A6A8A9FB4919/h/123
└──────────────────┬───────────────┘ └┬┘
id of the virtual blockchain height in the VB

There are two ways to write it: with the __resolution_link__ key, or as a bare string.

Suppose the debtor's data is anchored on-chain in a microblock:

{
"applicationId": "...",
"chainStorageInDays": 360,
"data": { "lastName": "Durand", "firstName": "Pierre" }
}

A receivable can then reference that debtor with the key:

{
"applicationId": "...",
"chainStorageInDays": 720,
"data": {
"name": "Energy supply invoice",
"reference": "F-2025-11873",
"issuer": "EDF",
"date": "2023-12-05",
"principal": 358.2,
"interest": 12.5,
"debtor": {
"__resolution_link__": "cmts://resolve/al/B304934D7D323D/h/123"
}
}
}

Or with the bare string:

{
"applicationId": "...",
"chainStorageInDays": 720,
"data": {
"name": "Energy supply invoice",
"reference": "F-2025-11873",
"issuer": "EDF",
"date": "2023-12-05",
"principal": 358.2,
"interest": 12.5,
"debtor": "cmts://resolve/al/B304934D7D323D/h/123"
}
}

Lifetime​

Mind the storage durations

Virtual blockchains can have different lifetimes (chainStorageInDays). In the example above, the receivable is anchored for 720 days but the debtor it references for only 360. The receivable is therefore really valid for 360 days: once the debtor's chain disappears, the link can no longer be resolved and the proof is invalidated.

Choose the lifetime of a referenced chain at least as long as that of every microblock that references it.

Next​