Asset Registry Transaction Message (ARTM) describes the standard approach for parsing updates to the off-chain Asset Registry database. One ARTM can describe multiple sequential operations on the Asset Registry. A ZK-rollup of these transactions will be pushed to The Root Network to validate the updates made to the Asset Registry periodically.
Motivation
When updating the Asset Registry, a clearly defined transaction message standard must be followed and used to prove updates reliably. This RFC takes inspiration from ERC-4361: Sign-In with Ethereum.
Specification
Asset Registry Transaction Message generation works as follows:
A list of asset registry updates is first defined
A message is created that starts with \\x19Ethereum Signed Message:\\n<length of message> as defined in ERC-191
Each asset registry update will then be defined sequentially in the order the updates should take place.
The end of the message will have the address making the updates and the nonce.
The message will then be signed by the correct wallet
A transaction hash is generated based on the message + signature
keccak256(message + signature)
Example Message
Asset Registry transaction
An update is being made to your inventory
Operations:
asset-link delete
- equipWith_asmBrain
- did:fv-asset:1:evm:0x6bca6de2dbdc4e0d41f7273011785ea16ba47182:1000
- did:fv-asset:1:evm:0x1ea66a857de297471bc12dd12d93853ff6617284:20
end
asset-link create
- equipWith_asmBrain
- did:fv-asset:1:evm:0x6bca6de2dbdc4e0d41f7273011785ea16ba47182:1000
- did:fv-asset:1:evm:0x1ea66a857de297471bc12dd12d93853ff6617284:21
end
asset-link create
- equipWith_gloves
- did:fv-asset:1:evm:0x6bca6de2dbdc4e0d41f7273011785ea16ba47182:1000
- did:fv-asset:1:root:0x1ea66a857de297471bc12dd12d93853ff6617284:21
end
delegate delete
- 0x6bca6de2dbdc4e0d41f7273011785ea16ba47182 (FPPass address - account 1)
- 0x6bca6de2dbdc4e0d41f7273011785ea16ba47183 (FPPass address - account 2)
end
ownership update
- did:fv-asset:1:evm:0x6bca6de2dbdc4e0d41f7273011785ea16ba47182:1000
- 0x6bca6de2dbdc4e0d41f7273011785ea16ba47182
end
asset-link create
- equipwith_hairStyle
- did:fv-asset:1:evm:0x6bca6de2dbdc4e0d41f7273011785ea16ba47182:1000
- did:fv-asset:off-chain:0x6bca6de2dbdc4e0d41f7273011785ea16ba47182:1234
end
Operations END
Address: 0x854A3E045Ac44a7f4A1726AdAC576029135DFdA7
Nonce:1
Informal Message Template
A Bash-like informal template of the full message is presented below for readability and ease of understanding. Field descriptions are provided in the following section.
The message MUST conform with the following Augmented Backus–Naur Form (ABNF, RFC 5234) expression (note that %s denotes case sensitivity for a string term, as per RFC 7405).
(optional) is a human-readable ASCII assertion that the user will sign, and it must not contain '\n' (the byte 0x0a).
nonce
an incremented number for each address that is kept track of by the Asset Registry to mitigate replay attacks.
address
is the Ethereum address performing the signing conformant to capitalization encoded checksum specified in https://eips.ethereum.org/EIPS/eip-55 where applicable?
operations
an array of updated objects with type, action and args