node: Implement signed refs

Signed-off-by: Alexis Sellier <self@cloudhead.io>
This commit is contained in:
Alexis Sellier
2022-09-13 10:16:05 +02:00
parent 6e86218c36
commit cd7421eb86
14 changed files with 776 additions and 172 deletions
+2 -3
View File
@@ -7,6 +7,7 @@ use crate::crypto;
use crate::identity::{ProjId, UserId};
use crate::protocol::{Context, NodeId, Timestamp, PROTOCOL_VERSION};
use crate::storage;
use crate::storage::refs::SignedRefs;
/// Message envelope. All messages sent over the network are wrapped in this type.
#[derive(Debug, Serialize, Deserialize)]
@@ -104,9 +105,7 @@ pub enum Message {
/// User signing.
user: UserId,
/// Updated refs.
refs: storage::Refs,
/// Signature over the refs.
signature: crypto::Signature,
refs: SignedRefs<crypto::Unverified>,
},
}