1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
extern crate bincode;
#[macro_use]
extern crate log;
extern crate rand;
extern crate serde;
#[macro_use]
extern crate serde_derive;
extern crate time;
mod protocol;
mod node;
mod key;
mod storage;
mod routing;
pub use self::node::node_data::NodeData;
pub use self::node::Node;
pub use self::key::Key;
const KEY_LENGTH: usize = 32;
const MESSAGE_LENGTH: usize = 8196;
const ROUTING_TABLE_SIZE: usize = KEY_LENGTH * 8;
const REPLICATION_PARAM: usize = 20;
const CONCURRENCY_PARAM: usize = 3;
const REQUEST_TIMEOUT: u64 = 5000;
const KEY_EXPIRATION: u64 = 3600;
const BUCKET_REFRESH_INTERVAL: u64 = 3600;