Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

feat: add validator id and verification to echo and ready messages #298

Merged
merged 53 commits into from
Sep 22, 2023

Conversation

gruberb
Copy link
Contributor

@gruberb gruberb commented Sep 8, 2023

Description

Introducing ValidatorId to verify that ECHO | READY message come from a valid validator. We also add a signature to EACH | READY messages. Therefore the double_echo has to be aware of the validator private key (secret).

Fixes TP-677 and TP-678

Additions and Changes

  • Adding signing_key to the TceConfig
  • Adding signature and validator_id to DoubleEchoCommand and ProtocolEvents::Echo and ProtocolEvents::Ready.

PR Checklist:

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added or updated tests that comprehensively prove my change is effective or that my feature works

@hadjiszs hadjiszs mentioned this pull request Sep 11, 2023
4 tasks
@gruberb gruberb marked this pull request as ready for review September 13, 2023 11:53
@gruberb gruberb requested a review from a team as a code owner September 13, 2023 11:53
@codecov
Copy link

codecov bot commented Sep 14, 2023

Codecov Report

Patch coverage: 79.39% and project coverage change: +0.77% 🎉

Comparison is base (2b7517c) 57.64% compared to head (ad9ce40) 58.41%.
Report is 2 commits behind head on main.

❗ Current head ad9ce40 differs from pull request most recent head 0c48074. Consider uploading reports for the commit 0c48074 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #298      +/-   ##
==========================================
+ Coverage   57.64%   58.41%   +0.77%     
==========================================
  Files         228      230       +2     
  Lines       11807    11998     +191     
==========================================
+ Hits         6806     7009     +203     
+ Misses       5001     4989      -12     
Files Changed Coverage Δ
crates/topos-crypto/src/lib.rs 50.00% <ø> (ø)
crates/topos-sequencer-subnet-client/src/lib.rs 0.00% <ø> (ø)
...pos-sequencer-subnet-client/src/subnet_contract.rs 0.00% <ø> (ø)
crates/topos-tce-api/tests/runtime.rs 92.74% <ø> (ø)
crates/topos-tce-broadcast/src/sampler/mod.rs 87.50% <ø> (+46.32%) ⬆️
crates/topos-tce-gatekeeper/src/client.rs 88.23% <ø> (ø)
crates/topos-tce/src/config.rs 0.00% <ø> (ø)
crates/topos-tce/src/lib.rs 0.00% <0.00%> (ø)
crates/topos-test-sdk/src/tce/mod.rs 86.39% <ø> (ø)
crates/topos/src/components/node/services.rs 20.20% <0.00%> (-0.42%) ⬇️
... and 17 more

... and 11 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hadjiszs hadjiszs changed the title feat: add authority id and verification to echo and ready messages feat: add validator id and verification to echo and ready messages Sep 17, 2023
@gruberb gruberb force-pushed the feat/TP-677 branch 3 times, most recently from 537904a to 598c58e Compare September 18, 2023 19:10
tools/init.sh Outdated Show resolved Hide resolved
tools/init.sh Show resolved Hide resolved
tools/init.sh Outdated Show resolved Hide resolved
tools/init.sh Show resolved Hide resolved
crates/topos-tce-transport/src/lib.rs Show resolved Hide resolved
crates/topos-tce-broadcast/src/lib.rs Show resolved Hide resolved
crates/topos-tce-broadcast/src/double_echo/mod.rs Outdated Show resolved Hide resolved
crates/topos-tce-transport/src/lib.rs Outdated Show resolved Hide resolved
crates/topos-tce-broadcast/Cargo.toml Outdated Show resolved Hide resolved
crates/topos-tce/src/lib.rs Outdated Show resolved Hide resolved
crates/topos-tce-transport/src/lib.rs Show resolved Hide resolved
crates/topos-tce-transport/src/lib.rs Outdated Show resolved Hide resolved
crates/topos-tce-broadcast/src/task_manager_futures/mod.rs Outdated Show resolved Hide resolved
crates/topos-tce-broadcast/src/lib.rs Show resolved Hide resolved
crates/topos-tce-broadcast/src/double_echo/mod.rs Outdated Show resolved Hide resolved
crates/topos-test-sdk/src/tce/protocol.rs Outdated Show resolved Hide resolved
crates/topos/src/components/node/services.rs Outdated Show resolved Hide resolved
@gruberb gruberb requested review from Nashtare and a team as code owners September 21, 2023 17:01
@gruberb gruberb requested a review from hratoanina September 21, 2023 17:01
crates/topos-crypto/src/messages.rs Outdated Show resolved Hide resolved
crates/topos-crypto/src/messages.rs Outdated Show resolved Hide resolved
@gruberb gruberb requested a review from Freyskeyd September 22, 2023 05:57
crates/topos-crypto/Cargo.toml Outdated Show resolved Hide resolved
crates/topos-crypto/src/messages.rs Outdated Show resolved Hide resolved
crates/topos-crypto/src/messages.rs Outdated Show resolved Hide resolved
crates/topos-tce-broadcast/Cargo.toml Outdated Show resolved Hide resolved
crates/topos-tce-broadcast/src/double_echo/mod.rs Outdated Show resolved Hide resolved
crates/topos-tce-broadcast/src/lib.rs Outdated Show resolved Hide resolved
crates/topos-tce-transport/src/lib.rs Show resolved Hide resolved
tools/docker-compose.yml Outdated Show resolved Hide resolved
crates/topos/tests/cert_delivery.rs Outdated Show resolved Hide resolved
@gruberb gruberb force-pushed the feat/TP-677 branch 2 times, most recently from c9b158f to ad9ce40 Compare September 22, 2023 12:47
@gruberb gruberb merged commit cb2eb7f into main Sep 22, 2023
@gruberb gruberb deleted the feat/TP-677 branch September 22, 2023 14:20
@dvdplm
Copy link
Contributor

dvdplm commented Sep 22, 2023

🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants