From 8bc3e7f9ef20defefc9585f582f3147f3e58db34 Mon Sep 17 00:00:00 2001 From: Christien Rioux Date: Tue, 12 Mar 2024 09:35:49 -0400 Subject: [PATCH] improve internal doc on validation --- veilid-core/src/rpc_processor/mod.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/veilid-core/src/rpc_processor/mod.rs b/veilid-core/src/rpc_processor/mod.rs index 1060e28c..cced8b54 100644 --- a/veilid-core/src/rpc_processor/mod.rs +++ b/veilid-core/src/rpc_processor/mod.rs @@ -1440,7 +1440,12 @@ impl RPCProcessor { Ok(operation) } - /// Cryptographic RPC validation + /// Cryptographic RPC validation and sanitization + /// + /// This code may modify the RPC operation to remove elements that are inappropriate for this node + /// or reject the RPC operation entirely. For example, PeerInfo in fanout peer lists may be + /// removed if they are deemed inappropriate for this node, without rejecting the entire operation. + /// /// We do this as part of the RPC network layer to ensure that any RPC operations that are /// processed have already been validated cryptographically and it is not the job of the /// caller or receiver. This does not mean the operation is 'semantically correct'. For