IntersectMBO / IntersectMBO/mithril

Sign block number with Cardano transactions hashes

Open
#1,561 1 comment 0 reactions 0 assignees View on GitHub
idea :bulb: stale :calendar:
Dominant language
Rust
Stars
154
Forks
51
Avg merge
1d 23h
Merged PRs (30d)
38

Description

## 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
```json
{
"certified_transactions": [
"82376f6b89d9c7a3b2259376807402ea7240493bc0f26a5ff46149a8d0e81722",
"010761466c1bf4114650455204fbde524852360bfca60779df43e7f56170ae7b",
"313de43d4a8169120a116972d22063ff555ac43af69032d7c6cdde99f46fa9a6"
],
"non_certified_transactions": [
"313de43d4a8169120a116972d22063ff555ac43af69032d7c6cdde99f46fa9a5",
"61e4895cbad33fa4a31299222ef983e9c5e2e78239edc07e695cc4d494f722c5"
]
}
```

### After
```json
{
"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` to `transaction_hash || block_number` (new structure that implements the `Into` 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.