Compare commits

...

10 Commits

Author SHA1 Message Date
Simon-Pierre Vivier
69973bddd7 Update vac/raw/random-discovery.md
Co-authored-by: Hanno Cornelius <68783915+jm-clius@users.noreply.github.com>
2026-01-08 16:26:37 -05:00
Simon-Pierre Vivier
8e584d82b0 Update vac/raw/random-discovery.md
Co-authored-by: Hanno Cornelius <68783915+jm-clius@users.noreply.github.com>
2026-01-08 16:21:58 -05:00
Simon-Pierre Vivier
aef8f774ed Update vac/raw/random-discovery.md
Co-authored-by: Hanno Cornelius <68783915+jm-clius@users.noreply.github.com>
2026-01-08 16:15:44 -05:00
SionoiS
776b6e1da9 init draft 2026-01-07 11:37:46 -05:00
Prem Chaitanya Prathi
cfc08e9f0e include spam protection specifications for Mix Protocol (#228)
Reference discussion
[post](https://forum.vac.dev/t/sybil-and-dos-spam-protection-for-libp2p-mix/598).
This PR includes sections for spam protecting a mixnet deployment using
mix protocol and how spam protection mechansims are pluggable in nature.
It lists down requirements of a spam protection mechanism and suggests
two integration methods for any mechanism with various trade-offs.
- [x] Add spam protection mechanism architecture
- [x] Suggest various approaches possible with trade-offs 
- [x] Detail how each approach would be integrated into sphinx packet
and changes to it
- [x] Include node responsibilities
- [x]  Interface definition for spam protection implementations
2026-01-07 10:52:15 +05:30
seugu
1d2f682892 Hashgraphlike consensus small fixes (#221)
done: 
- update uint64 (no need negative numbers in timestamp)
- fixed repeated Vote votes
- renamed expiration_timestamp and its comment
- modify number of rounds to votes
2026-01-06 10:09:37 +03:00
Prem Chaitanya Prathi
dabc31786b fixing format errors in mix rfc (#229)
<img width="1158" height="635" alt="image"
src="https://github.com/user-attachments/assets/3f3582b4-77b2-4eb5-a7ea-12b60951303c"
/>
2025-12-15 13:26:43 +05:30
Cofson
b2f35644a4 Improved codex/raw/codex-block-exchange.md file (#215)
Improved codex-block-exchange.md file in codex/raw folder
2025-12-12 12:10:02 +01:00
Prem Chaitanya Prathi
4f54254706 fix format errors in math sections for mix rfc (#225) 2025-12-12 14:59:14 +05:30
Prem Chaitanya Prathi
7f1df32779 chore: use sembreaks for easy review and edits (#223)
Modified the mix spec to use sembreaks and not break line at charater limits
as per
https://github.com/vacp2p/rfc-index/pull/194#pullrequestreview-3562274262
2025-12-11 21:02:15 +05:30
4 changed files with 2185 additions and 1208 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -73,11 +73,11 @@ message Proposal {
string payload = 11; // Proposal description
uint32 proposal_id = 12; // Unique identifier of the proposal
bytes proposal_owner = 13; // Public key of the creator
repeated Votes = 14; // Vote list in the proposal
repeated Vote votes = 14; // Vote list in the proposal
uint32 expected_voters_count = 15; // Maximum number of distinct voters
uint32 round = 16; // Number of Votes
uint32 round = 16; // Number of rounds
uint64 timestamp = 17; // Creation time of proposal
uint64 expiration_time = 18; // The time interval that the proposal is active.
uint64 expiration_timestamp = 18; // The timestamp at which the proposal becomes outdated
bool liveness_criteria_yes = 19; // Shows how managing the silent peers vote
}
@@ -85,7 +85,7 @@ message Vote {
uint32 vote_id = 20; // Unique identifier of the vote
bytes vote_owner = 21; // Voter's public key
uint32 proposal_id = 22; // Linking votes and proposals
int64 timestamp = 23; // Time when the vote was cast
uint64 timestamp = 23; // Time when the vote was cast
bool vote = 24; // Vote bool value (true/false)
bytes parent_hash = 25; // Hash of previous owner's Vote
bytes received_hash = 26; // Hash of previous received Vote
@@ -138,7 +138,7 @@ check that the hash of the former vote is equal to the `parent_hash` of the late
5.3. Increase the round by one, namely `P_2.round = P_1.round + 1`.
5.4. Verify that the proposal has not expired by checking that: `P_2.timestamp - current_time < P_1.expiration_time`.
5.4. Verify that the proposal has not expired by checking that: `current_time in [P_timestamp, P_expiration_timestamp]`.
If this does not hold, other peers ignore the message.
After the peer creates the proposal `P_2` with its vote `V_2`,

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,90 @@
---
title: random-discovery
name: Random Discovery
status: raw
category: Standards Track
tags:
editor: Simon-Pierre Vivier <simvivier@status.im>
contributors:
---
## Abstract
TODO blabla summarizing what's in here
## Motivation
TOOD blabla on why we need this
## Semantic
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”,
“SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in this document
are to be interpreted as described in [2119](https://www.ietf.org/rfc/rfc2119.txt).
Please refer to [libp2p Kademlia DHT specification](https://github.com/libp2p/specs/blob/master/kad-dht/README.md) and [extended peer records specification](TODO) for terminology used in this document.
## Protocol
### Record Propagation
A node that wants to make itself discoverable,
also known as an _advertiser_,
MUST encode its discoverable information in an [Extensible Peer Record]().
The encoded information MUST be sufficient for discoverers to connect to this advertiser.
It MAY choose to encode some or all of its capabilities (and related information)
as `services` in the `ExtensiblePeerRecord`.
This will allow future discoverers to filter discovered records based on desired capabilities.
In order to advertise this record,
the advertiser SHOULD first retrieve the `k` closest peers to its own peer ID
in its own [Kademlia routing table](https://github.com/libp2p/specs/blob/e87cb1c32a666c2229d3b9bb8f9ce1d9cfdaa8a9/kad-dht/README.md#kademlia-routing-table).
This assumes that the routing table has been previously initialised
and follows the regular [bootstrap process](https://github.com/libp2p/specs/blob/e87cb1c32a666c2229d3b9bb8f9ce1d9cfdaa8a9/kad-dht/README.md#bootstrap-process) as per the libp2p Kad-DHT specification.
The advertiser SHOULD then perform a [Kad-DHT `PUT_VALUE`](https://github.com/libp2p/specs/blob/e87cb1c32a666c2229d3b9bb8f9ce1d9cfdaa8a9/kad-dht/README.md#value-storage-and-retrieval) to these `k` peers
to store the `ExtensiblePeerRecord` against its own peer ID.
This process SHOULD be repeated periodically to maintain the advertised record.
We RECOMMEND an interval of once every `30` minutes,
for each discoverable `ExtensiblePeerRecord` the node wants to advertise.
### Record Discovery
A random discovery procedure (`FIND_RANDOM`) consist of the following steps;
1. A random value in the key space MUST be chosen (`R_KEY`).
2. A `GET_VALUE` message MUST be sent to the `k` closest nodes to `R_KEY`.
3. A `FIND_NODE` message MUST be sent to the `k` closest nodes to `R_KEY`.
4. For each peers in `closerPeers` from `FIND_NODE` responses, a `GET_VALUE` message MUST be sent but already seen peers MUST be ignored.
5. Repeat step 3 and 4 with new peers found via `FIND_NODE`.
`FIND_RANDOM` MAY terminate when the `k` closest peers to `R_KEY` are found.
The discoverer MAY choose to filter discovered `ExtensiblePeerRecords`
based on advertised `services`
to find peers matching a set of desired capabilities.
> `GET_VALUE` messages MUST always contain the peer id of the recipiant as the `key`
and the `record` in the response MUST be verified, invalid records and `closerPeers` MUST be discarded. Valid records MAY be filtered for specific services.
### Attack Vectors
To make the system more resilient extended peer records could be stored randomly in the key space
but doing so would result in increased bandwidth requirements
because of the need to first find random nodes to store the records at.
When used in conjuction with [capability discovery](https://github.com/vacp2p/rfc-index/blob/main/vac/raw/logos-capability-discovery.md),
eclipse attacks effectiveness are greatly reduced
because a node can always be discovered via it's advertised services regardless of the random discoverability of it's records.
For this reason, we decided that this trade-off was worth it.
## Copyright
Copyright and related rights waived via [CC0](https://creativecommons.org/publicdomain/zero/1.0/).
## References
- [extended peer records specification](TODO)
- [libp2p Kademlia DHT specification](https://github.com/libp2p/specs/blob/master/kad-dht/README.md)
- [RFC002 Signed Envelope](https://github.com/libp2p/specs/blob/7740c076350b6636b868a9e4a411280eea34d335/RFC/0002-signed-envelopes.md)
- [RFC003 Routing Records](https://github.com/libp2p/specs/blob/7740c076350b6636b868a9e4a411280eea34d335/RFC/0003-routing-records.md)
- [capability discovery](https://github.com/vacp2p/rfc-index/blob/main/vac/raw/logos-capability-discovery.md)