Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sign block number with Cardano transactions hashes #1561

Open
10 tasks
jpraynaud opened this issue Mar 11, 2024 · 0 comments
Open
10 tasks

Sign block number with Cardano transactions hashes #1561

jpraynaud opened this issue Mar 11, 2024 · 0 comments
Labels
idea 💡 Something to discuss and refine

Comments

@jpraynaud
Copy link
Member

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 to transaction_hash || block_number (new structure that implements the Into<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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea 💡 Something to discuss and refine
Projects
None yet
Development

No branches or pull requests

1 participant