2018-06-08 00:11:25 +00:00
|
|
|
DHT messages
|
|
|
|
|
|
|
|
these messages can be either wrapped in a LIDM message or sent anonymously over a path
|
|
|
|
|
2018-06-29 14:25:09 +00:00
|
|
|
This document is currently out of date (probably)
|
2018-06-08 00:11:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
find introduction message (FIM)
|
|
|
|
|
2018-07-17 06:41:52 +00:00
|
|
|
variant 1: recursively find an IS by SA
|
2018-06-08 00:11:25 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
A: "F",
|
2018-07-12 15:46:30 +00:00
|
|
|
I: 0 or 1 if iterative request,
|
2018-06-08 00:11:25 +00:00
|
|
|
S: "<32 bytes SA>",
|
|
|
|
T: transaction_id_uint64,
|
|
|
|
V: 0
|
|
|
|
}
|
|
|
|
|
2018-07-17 06:41:52 +00:00
|
|
|
variant 2: recursively find many IS in a tag
|
2018-06-08 00:11:25 +00:00
|
|
|
|
2018-07-17 06:41:52 +00:00
|
|
|
{
|
|
|
|
A: "F",
|
2018-07-17 07:30:03 +00:00
|
|
|
E: "<N*32 bytes optional exclude SA list>",
|
2018-07-17 06:41:52 +00:00
|
|
|
I: 0 or 1 if iterative request,
|
|
|
|
N: "<16 bytes topic tag>",
|
|
|
|
T: transaction_id_uint64,
|
|
|
|
V: 0
|
|
|
|
}
|
2018-06-08 00:11:25 +00:00
|
|
|
|
2018-07-17 07:30:03 +00:00
|
|
|
exclude adding service addresses in E if present
|
|
|
|
|
|
|
|
|
2018-06-08 00:11:25 +00:00
|
|
|
got introduction message (GIM)
|
|
|
|
|
2018-07-17 07:30:03 +00:00
|
|
|
sent in reply to FIM and PIM
|
|
|
|
|
2018-06-08 00:11:25 +00:00
|
|
|
{
|
|
|
|
A: "G",
|
2018-07-17 07:30:03 +00:00
|
|
|
I: [IS, IS, IS, ...],
|
2018-06-08 00:11:25 +00:00
|
|
|
T: transaction_id_uint64,
|
|
|
|
V: 0,
|
|
|
|
}
|
|
|
|
|
2018-06-29 14:25:09 +00:00
|
|
|
|
2018-07-17 07:30:03 +00:00
|
|
|
The I value MUST NOT contain more than 8 IS.
|
|
|
|
The I value is either 1 or 0 IS long for PIM and FIM variant 1.
|
|
|
|
|
|
|
|
|
2018-06-08 00:11:25 +00:00
|
|
|
publish introduction message (PIM)
|
|
|
|
|
2018-06-29 14:25:09 +00:00
|
|
|
publish one IS to the DHT.
|
2018-06-08 00:11:25 +00:00
|
|
|
|
2018-06-29 14:25:09 +00:00
|
|
|
version 0 uses the SA of the IS as the keyspace location.
|
2018-06-08 00:11:25 +00:00
|
|
|
|
|
|
|
in the future the location will be determined by the dht kdf
|
|
|
|
which uses a shared random source to obfuscate keyspace location.
|
|
|
|
|
|
|
|
|
2018-06-29 14:25:09 +00:00
|
|
|
R is currently set to 0 by the sender.
|
2018-06-08 00:11:25 +00:00
|
|
|
|
|
|
|
{
|
2018-06-29 14:25:09 +00:00
|
|
|
A: "I",
|
|
|
|
I: IS,
|
2018-06-08 00:11:25 +00:00
|
|
|
R: r_counter,
|
2018-06-29 14:25:09 +00:00
|
|
|
S: optional member 0 for immediate store otherwise non zero,
|
2018-07-09 17:32:11 +00:00
|
|
|
T: transaction_id_uint64,
|
2018-06-29 14:25:09 +00:00
|
|
|
V: 0
|
2018-06-08 00:11:25 +00:00
|
|
|
}
|
|
|
|
|
2018-06-29 14:25:09 +00:00
|
|
|
if R is greater than 0, do a random walk, otherwise if we are
|
|
|
|
closer to the SA of the IS than anyone else we know in the DHT
|
|
|
|
store the IS for later lookup.
|
2018-07-05 15:44:06 +00:00
|
|
|
As of protocol version 0, R is always 0.
|
2018-06-08 00:11:25 +00:00
|
|
|
|
2018-06-29 14:25:09 +00:00
|
|
|
If S is provided store the IS for later lookup unconditionally,
|
|
|
|
decrement S by 1 and forward to dht peer who is next closest to
|
|
|
|
the SA of the IS. If S is greater than 3, don't store and discard
|
|
|
|
this message.
|
2018-06-08 00:11:25 +00:00
|
|
|
|
|
|
|
|
|
|
|
find router contact message (FRCM)
|
|
|
|
|
|
|
|
find a router by long term RC.k public key
|
|
|
|
|
|
|
|
{
|
2018-06-08 11:54:48 +00:00
|
|
|
A: "R",
|
2018-07-26 21:08:56 +00:00
|
|
|
E: 0 or 1 if exploritory lookup,
|
|
|
|
I: 0 or 1 if iterative lookup,
|
2018-06-08 00:11:25 +00:00
|
|
|
K: "<32 byte public key of router>",
|
|
|
|
T: transaction_id_uint64,
|
|
|
|
V: 0
|
|
|
|
}
|
|
|
|
|
2018-07-12 15:46:30 +00:00
|
|
|
TODO: document me
|
2018-06-08 00:11:25 +00:00
|
|
|
|
|
|
|
got router contact message (GRCM)
|
|
|
|
|
|
|
|
R is a list containing a single RC if found or is an empty list if not found
|
|
|
|
sent in reply to FRCM only
|
|
|
|
|
|
|
|
{
|
2018-06-08 11:54:48 +00:00
|
|
|
A: "S",
|
2018-06-08 00:11:25 +00:00
|
|
|
R: [RC],
|
|
|
|
T: transaction_id_uint64,
|
|
|
|
V: 0
|
|
|
|
}
|
|
|
|
|
2018-08-27 13:44:16 +00:00
|
|
|
in response to an exploritory FRCM if the target router is not found the form
|
2018-06-08 00:11:25 +00:00
|
|
|
|
2018-08-27 13:44:16 +00:00
|
|
|
{
|
|
|
|
A: "S",
|
|
|
|
N: [list, of, router, publickeys, near, target],
|
|
|
|
R: [],
|
|
|
|
T: transaction_id_uint64,
|
|
|
|
V: 0
|
|
|
|
}
|