Skip to content

Optional signed message in registered signatures #1909

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

Merged
merged 6 commits into from
Sep 2, 2024

Conversation

Alenar
Copy link
Collaborator

@Alenar Alenar commented Aug 30, 2024

Content

This PR add an optional field to single signatures: signed_message.

In order to decentralize signatures orchestration we will need to buffer incoming single signatures when the Aggregator has yet to create an open message for the signed entity type.
But in that case we won't be able to some validation to reject immediately malicious signatures from bad actors.
This new field will allow us to do an integrity check of incoming signatures, by checking their validity against their signed message and the current stake distribution, .

Pre-submit checklist

  • Branch
    • Tests are provided (if possible)
    • Crates versions are updated (if relevant)
    • CHANGELOG file is updated (if relevant)
    • Commit sequence broadly makes sense
    • Key commits have useful messages
  • PR
    • No clippy warnings in the CI
    • Self-reviewed the diff
    • Useful pull request description
    • Reviewer requested

Issue(s)

Closes #1899

Alenar added 4 commits August 29, 2024 18:20
Else we would need to change signatures of multiple methods in the
signer in order to pass it to the `RegisterSignnatureMessage`.

It will also be usefull in aggregator to handle signature buffer on the
service side (since most services use entities instead of messages).
@Alenar Alenar requested review from sfauvel and jpraynaud August 30, 2024 14:55
Copy link

github-actions bot commented Aug 30, 2024

Test Results

    4 files  ±0     53 suites  ±0   9m 18s ⏱️ -7s
1 247 tests +2  1 247 ✅ +2  0 💤 ±0  0 ❌ ±0 
1 458 runs  +2  1 458 ✅ +2  0 💤 ±0  0 ❌ ±0 

Results for commit 064aa0a. ± Comparison against base commit cbd65d0.

This pull request removes 1 and adds 3 tests. Note that renamed tests count towards both.
mithril-common ‑ messages::register_signature::tests::test_v1
mithril-common ‑ messages::register_signature::tests::test_actual_json_deserialized_into_actual_message
mithril-common ‑ messages::register_signature::tests::test_actual_json_deserialized_into_previous_message
mithril-common ‑ protocol::single_signer::test::embed_signed_message_in_issued_signature

♻️ This comment has been updated with latest results.

@Alenar Alenar temporarily deployed to testing-preview August 30, 2024 15:03 — with GitHub Actions Inactive
@Alenar Alenar temporarily deployed to testing-sanchonet August 30, 2024 15:03 — with GitHub Actions Inactive
Copy link
Collaborator

@sfauvel sfauvel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@jpraynaud jpraynaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Alenar Alenar temporarily deployed to testing-preview September 2, 2024 08:34 — with GitHub Actions Inactive
@Alenar Alenar temporarily deployed to testing-sanchonet September 2, 2024 08:34 — with GitHub Actions Inactive
* Mithril-aggregator from `0.5.57` to `0.5.58`
* Mithril-signer from `0.2.175` to `0.2.176`
* Mithril-common from `0.4.47` to `0.4.48`
* Mithril-end-to-end from `0.4.29` to `0.4.30`
@Alenar Alenar force-pushed the djo/1899/optional_signed_message_in_register_signature branch from eb7d638 to 064aa0a Compare September 2, 2024 14:28
@Alenar Alenar temporarily deployed to testing-preview September 2, 2024 14:36 — with GitHub Actions Inactive
@Alenar Alenar temporarily deployed to testing-sanchonet September 2, 2024 14:36 — with GitHub Actions Inactive
@Alenar Alenar merged commit 7b39690 into main Sep 2, 2024
40 checks passed
@Alenar Alenar deleted the djo/1899/optional_signed_message_in_register_signature branch September 2, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add message signed in signature HTTP messages
3 participants