mithril
mithril copied to clipboard
Sign block number with Cardano transactions hashes
Why
We could provide extra information (block number, which is not retrievable from the body of the transaction) with the certified status of a transaction in the Mithril client. This information should also be signed by the protocol.
What
In order to guarantee the block number value displayed along the verified transactions, we need to make it part of the message signed in the Merkle tree. We also need to modify the proof message returned by the aggregator:
Currently
{
"certified_transactions": [
"82376f6b89d9c7a3b2259376807402ea7240493bc0f26a5ff46149a8d0e81722",
"010761466c1bf4114650455204fbde524852360bfca60779df43e7f56170ae7b",
"313de43d4a8169120a116972d22063ff555ac43af69032d7c6cdde99f46fa9a6"
],
"non_certified_transactions": [
"313de43d4a8169120a116972d22063ff555ac43af69032d7c6cdde99f46fa9a5",
"61e4895cbad33fa4a31299222ef983e9c5e2e78239edc07e695cc4d494f722c5"
]
}
After
{
"certified_transactions": {
"82376f6b89d9c7a3b2259376807402ea7240493bc0f26a5ff46149a8d0e81722": {
"block_number": 10
},
"010761466c1bf4114650455204fbde524852360bfca60779df43e7f56170ae7b": {
"block_number": 10
},
"313de43d4a8169120a116972d22063ff555ac43af69032d7c6cdde99f46fa9a6": {
"block_number": 21
}
},
"non_certified_transactions": [
"313de43d4a8169120a116972d22063ff555ac43af69032d7c6cdde99f46fa9a5",
"61e4895cbad33fa4a31299222ef983e9c5e2e78239edc07e695cc4d494f722c5"
]
}
How
- [ ] Update the signed information and change it from
transaction_hash
totransaction_hash || block_number
(new structure that implements theInto<MKTreeNode>
trait) - [ ] Adapt the crates to support this change
- [ ]
mithril-aggregator
- [ ]
mithril-signer
? - [ ]
mithril-common
- [ ]
mithril-client
- [ ]
mithril-client-cli
- [ ]
mithril-client-wasm
- [ ]
- [ ] Update examples
- [ ] Update documentation