From 4b988cb56e6946e74c56912a30cf3d9c651537ea Mon Sep 17 00:00:00 2001
From: inso <insomniak.fr@gmaiL.com>
Date: Fri, 26 Oct 2018 18:51:21 +0200
Subject: [PATCH] Rename duniter-wotb to durs-wot

---
 Cargo.lock                             |  28 +++++++++---------
 Cargo.toml                             |   2 +-
 blockchain/Cargo.toml                  |   2 +-
 blockchain/apply_valid_block.rs        |  38 ++++++++++++-------------
 blockchain/check_and_apply_block.rs    |   4 +--
 blockchain/dbex.rs                     |   6 ++--
 blockchain/lib.rs                      |  32 ++++++++++-----------
 blockchain/revert_block.rs             |  32 ++++++++++-----------
 blockchain/sync.rs                     |  14 ++++-----
 dal/Cargo.toml                         |   2 +-
 dal/block.rs                           |   2 +-
 dal/certs.rs                           |   4 +--
 dal/identity.rs                        |  12 ++++----
 dal/lib.rs                             |   6 ++--
 dal/tools.rs                           |  10 +++----
 dal/writers/certification.rs           |   2 +-
 dal/writers/identity.rs                |   2 +-
 dal/writers/requests.rs                |  10 +++----
 {wotb => wot}/Cargo.toml               |   6 ++--
 wot/README.md                          |  10 +++++++
 {wotb => wot}/data/mod.rs              |   0
 {wotb => wot}/data/rusty.rs            |   0
 {wotb => wot}/lib.rs                   |   8 +++---
 {wotb => wot}/operations/centrality.rs |   0
 {wotb => wot}/operations/distance.rs   |   0
 {wotb => wot}/operations/file.rs       |   2 +-
 {wotb => wot}/operations/mod.rs        |   0
 {wotb => wot}/operations/path.rs       |   0
 {wotb => wot}/tests/g1_genesis.bin     | Bin
 wotb/README.md                         |  10 -------
 ws2p-v1-legacy/Cargo.toml              |   2 +-
 31 files changed, 122 insertions(+), 124 deletions(-)
 rename {wotb => wot}/Cargo.toml (82%)
 create mode 100644 wot/README.md
 rename {wotb => wot}/data/mod.rs (100%)
 rename {wotb => wot}/data/rusty.rs (100%)
 rename {wotb => wot}/lib.rs (98%)
 rename {wotb => wot}/operations/centrality.rs (100%)
 rename {wotb => wot}/operations/distance.rs (100%)
 rename {wotb => wot}/operations/file.rs (99%)
 rename {wotb => wot}/operations/mod.rs (100%)
 rename {wotb => wot}/operations/path.rs (100%)
 rename {wotb => wot}/tests/g1_genesis.bin (100%)
 delete mode 100644 wotb/README.md

diff --git a/Cargo.lock b/Cargo.lock
index 07273444..44d81fce 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -196,7 +196,7 @@ dependencies = [
  "duniter-message 0.1.0-a0.1",
  "duniter-module 0.1.0-a0.1",
  "duniter-network 0.1.0-a0.1",
- "duniter-wotb 0.8.0-a0.7",
+ "durs-wot 0.8.0-a0.8",
  "log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
  "pbr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -265,7 +265,7 @@ dependencies = [
  "duniter-documents 0.8.0-a0.1",
  "duniter-module 0.1.0-a0.1",
  "duniter-network 0.1.0-a0.1",
- "duniter-wotb 0.8.0-a0.7",
+ "durs-wot 0.8.0-a0.8",
  "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -357,17 +357,6 @@ dependencies = [
  "termion 1.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
-[[package]]
-name = "duniter-wotb"
-version = "0.8.0-a0.7"
-dependencies = [
- "bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
- "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)",
- "serde_derive 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
 [[package]]
 name = "durs"
 version = "0.1.0-a0.1"
@@ -379,6 +368,17 @@ dependencies = [
  "structopt 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
 ]
 
+[[package]]
+name = "durs-wot"
+version = "0.8.0-a0.8"
+dependencies = [
+ "bincode 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "byteorder 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
+ "rayon 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde 1.0.78 (registry+https://github.com/rust-lang/crates.io-index)",
+ "serde_derive 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
+]
+
 [[package]]
 name = "durs-ws2p"
 version = "0.1.0-a0.1"
@@ -425,7 +425,7 @@ dependencies = [
  "duniter-message 0.1.0-a0.1",
  "duniter-module 0.1.0-a0.1",
  "duniter-network 0.1.0-a0.1",
- "duniter-wotb 0.8.0-a0.7",
+ "durs-wot 0.8.0-a0.8",
  "lazy_static 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
  "log 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
  "rand 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/Cargo.toml b/Cargo.toml
index 60a612ea..53541ce5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -32,7 +32,7 @@ members = [
     "module",
     "network",
     "tui",
-    "wotb",
+    "wot",
     "ws2p",
     "ws2p-messages",
     "ws2p-v1-legacy"
diff --git a/blockchain/Cargo.toml b/blockchain/Cargo.toml
index 44ba92d6..a4be6dac 100644
--- a/blockchain/Cargo.toml
+++ b/blockchain/Cargo.toml
@@ -17,7 +17,7 @@ duniter-documents = { path = "../documents" }
 duniter-message =  { path = "../message" }
 duniter-module = { path = "../module" }
 duniter-network = { path = "../network" }
-duniter-wotb = { path = "../wotb" }
+durs-wot = { path = "../wot" }
 log = "0.4.*"
 num_cpus = "1.8.*"
 pbr = "1.0.*"
diff --git a/blockchain/apply_valid_block.rs b/blockchain/apply_valid_block.rs
index f731e93a..69e72f30 100644
--- a/blockchain/apply_valid_block.rs
+++ b/blockchain/apply_valid_block.rs
@@ -22,8 +22,8 @@ use duniter_documents::blockchain::v10::documents::transaction::{TxAmount, TxBas
 use duniter_documents::blockchain::v10::documents::BlockDocument;
 use duniter_documents::blockchain::Document;
 use duniter_documents::BlockId;
-use duniter_wotb::data::{NewLinkResult, RemLinkResult};
-use duniter_wotb::{NodeId, WebOfTrust};
+use durs_wot::data::{NewLinkResult, RemLinkResult};
+use durs_wot::{NodeId, WebOfTrust};
 use std::collections::{HashMap, HashSet};
 
 #[derive(Debug)]
@@ -63,7 +63,7 @@ pub fn apply_valid_block<W: WebOfTrust>(
         let pubkey = joiner.clone().issuers()[0];
         if let Some(idty_doc) = identities.get(&pubkey) {
             // Newcomer
-            let wotb_id = NodeId(
+            let wot_id = NodeId(
                 wot_db
                     .read(|db| db.size())
                     .expect("Fatal error : fail to read WotDB !"),
@@ -73,9 +73,9 @@ pub fn apply_valid_block<W: WebOfTrust>(
                     db.add_node();
                 })
                 .expect("Fail to write in WotDB");
-            wot_index.insert(pubkey, wotb_id);
+            wot_index.insert(pubkey, wot_id);
             wot_dbs_requests.push(WotsDBsWriteQuery::CreateIdentity(
-                wotb_id,
+                wot_id,
                 current_blockstamp,
                 block.median_time,
                 Box::new(idty_doc.clone()),
@@ -83,15 +83,15 @@ pub fn apply_valid_block<W: WebOfTrust>(
             ));
         } else {
             // Renewer
-            let wotb_id = wot_index[&joiner.issuers()[0]];
+            let wot_id = wot_index[&joiner.issuers()[0]];
             wot_db
                 .write(|db| {
-                    db.set_enabled(wotb_id, true);
+                    db.set_enabled(wot_id, true);
                 })
                 .expect("Fail to write in WotDB");
             wot_dbs_requests.push(WotsDBsWriteQuery::RenewalIdentity(
                 joiner.issuers()[0],
-                wotb_id,
+                wot_id,
                 block.median_time,
                 joiner.blockstamp().id,
             ));
@@ -100,15 +100,15 @@ pub fn apply_valid_block<W: WebOfTrust>(
     for active in block.actives.clone() {
         let pubkey = active.issuers()[0];
         if !identities.contains_key(&pubkey) {
-            let wotb_id = wot_index[&pubkey];
+            let wot_id = wot_index[&pubkey];
             wot_db
                 .write(|db| {
-                    db.set_enabled(wotb_id, true);
+                    db.set_enabled(wot_id, true);
                 })
                 .expect("Fail to write in WotDB");
             wot_dbs_requests.push(WotsDBsWriteQuery::RenewalIdentity(
                 pubkey,
-                wotb_id,
+                wot_id,
                 block.median_time,
                 active.blockstamp().id,
             ));
@@ -151,24 +151,24 @@ pub fn apply_valid_block<W: WebOfTrust>(
     for certification in block.certifications.clone() {
         trace!("stack_up_valid_block: apply cert...");
         let compact_cert = certification.to_compact_document();
-        let wotb_node_from = wot_index[&compact_cert.issuer];
-        let wotb_node_to = wot_index[&compact_cert.target];
+        let wot_node_from = wot_index[&compact_cert.issuer];
+        let wot_node_to = wot_index[&compact_cert.target];
         wot_db
             .write(|db| {
-                let result = db.add_link(wotb_node_from, wotb_node_to);
+                let result = db.add_link(wot_node_from, wot_node_to);
                 match result {
                     NewLinkResult::Ok(_) => {}
                     _ => panic!(
                         "Fail to add_link {}->{} : {:?}",
-                        wotb_node_from.0, wotb_node_to.0, result
+                        wot_node_from.0, wot_node_to.0, result
                     ),
                 }
             })
             .expect("Fail to write in WotDB");
         wot_dbs_requests.push(WotsDBsWriteQuery::CreateCert(
             compact_cert.issuer,
-            wotb_node_from,
-            wotb_node_to,
+            wot_node_from,
+            wot_node_to,
             compact_cert.block_number,
             block.median_time,
         ));
@@ -198,8 +198,8 @@ pub fn apply_valid_block<W: WebOfTrust>(
                 .read(|db| db.get_enabled())
                 .expect("Fail to read WotDB");
             let mut members_pubkeys = Vec::new();
-            for (pubkey, wotb_id) in wot_index {
-                if members_wot_ids.contains(wotb_id) {
+            for (pubkey, wot_id) in wot_index {
+                if members_wot_ids.contains(wot_id) {
                     members_pubkeys.push(*pubkey);
                 }
             }
diff --git a/blockchain/check_and_apply_block.rs b/blockchain/check_and_apply_block.rs
index 9851bf29..3c601f47 100644
--- a/blockchain/check_and_apply_block.rs
+++ b/blockchain/check_and_apply_block.rs
@@ -58,7 +58,7 @@ pub fn check_and_apply_block<W: WebOfTrust>(
     certs_db: &BinDB<CertsExpirV10Datas>,
     block: &Block,
     current_blockstamp: &Blockstamp,
-    wotb_index: &mut HashMap<PubKey, NodeId>,
+    wot_index: &mut HashMap<PubKey, NodeId>,
     wot_db: &BinDB<W>,
     forks_states: &[ForkStatus],
 ) -> Result<ValidBlockApplyReqs, BlockError> {
@@ -101,7 +101,7 @@ pub fn check_and_apply_block<W: WebOfTrust>(
         };
         return Ok(apply_valid_block(
             &block_doc,
-            wotb_index,
+            wot_index,
             wot_db,
             &expire_certs,
             old_fork_id,
diff --git a/blockchain/dbex.rs b/blockchain/dbex.rs
index 5ee9908e..34ede624 100644
--- a/blockchain/dbex.rs
+++ b/blockchain/dbex.rs
@@ -17,8 +17,8 @@ use duniter_crypto::keys::*;
 use duniter_dal::identity::DALIdentity;
 use duniter_documents::blockchain::v10::documents::transaction::*;
 use duniter_module::DuniterConf;
-use duniter_wotb::data::rusty::RustyWebOfTrust;
-use duniter_wotb::operations::distance::{DistanceCalculator, WotDistance, WotDistanceParameters};
+use durs_wot::data::rusty::RustyWebOfTrust;
+use durs_wot::operations::distance::{DistanceCalculator, WotDistance, WotDistanceParameters};
 use std::time::*;
 use *;
 
@@ -140,7 +140,7 @@ pub fn dbex_wot<DC: DuniterConf>(profile: &str, conf: &DC, csv: bool, query: &DB
         .expect("Fail to parse currency params !");
 
     // get wot_index
-    let wot_index = DALIdentity::get_wotb_index(&wot_databases.identities_db).expect("DALError");
+    let wot_index = DALIdentity::get_wot_index(&wot_databases.identities_db).expect("DALError");
 
     // get wot_reverse_index
     let wot_reverse_index: HashMap<NodeId, &PubKey> =
diff --git a/blockchain/lib.rs b/blockchain/lib.rs
index 82d44187..f365db83 100644
--- a/blockchain/lib.rs
+++ b/blockchain/lib.rs
@@ -40,7 +40,7 @@ extern crate duniter_documents;
 extern crate duniter_message;
 extern crate duniter_module;
 extern crate duniter_network;
-extern crate duniter_wotb;
+extern crate durs_wot;
 extern crate serde;
 extern crate serde_json;
 extern crate sqlite;
@@ -78,9 +78,9 @@ use duniter_module::*;
 use duniter_network::{
     NetworkBlock, NetworkDocument, NetworkEvent, NetworkResponse, NodeFullId, OldNetworkRequest,
 };
-use duniter_wotb::data::rusty::RustyWebOfTrust;
-use duniter_wotb::operations::distance::RustyDistanceCalculator;
-use duniter_wotb::{NodeId, WebOfTrust};
+use durs_wot::data::rusty::RustyWebOfTrust;
+use durs_wot::operations::distance::RustyDistanceCalculator;
+use durs_wot::{NodeId, WebOfTrust};
 
 /// The blocks are requested by packet groups. This constant sets the block packet size.
 pub static CHUNK_SIZE: &'static u32 = &50;
@@ -304,7 +304,7 @@ impl BlockchainModule {
         &mut self,
         network_documents: &[NetworkDocument],
         current_blockstamp: &Blockstamp,
-        wotb_index: &mut HashMap<PubKey, NodeId>,
+        wot_index: &mut HashMap<PubKey, NodeId>,
         wot_db: &BinDB<W>,
     ) -> Blockstamp {
         let mut blockchain_documents = Vec::new();
@@ -320,7 +320,7 @@ impl BlockchainModule {
                         &self.wot_databases.certs_db,
                         &Block::NetworkBlock(network_block),
                         &current_blockstamp,
-                        wotb_index,
+                        wot_index,
                         wot_db,
                         &self.forks_states,
                     ) {
@@ -439,7 +439,7 @@ impl BlockchainModule {
         &mut self,
         blocks_in_box: &[Box<NetworkBlock>],
         current_blockstamp: &Blockstamp,
-        wotb_index: &mut HashMap<PubKey, NodeId>,
+        wot_index: &mut HashMap<PubKey, NodeId>,
         wot: &BinDB<W>,
     ) -> Blockstamp {
         debug!("BlockchainModule : receive_blocks()");
@@ -455,7 +455,7 @@ impl BlockchainModule {
                     &self.wot_databases.certs_db,
                     &Block::NetworkBlock(block),
                     &current_blockstamp,
-                    wotb_index,
+                    wot_index,
                     wot,
                     &self.forks_states,
                 ) {
@@ -508,10 +508,10 @@ impl BlockchainModule {
         // Get dbs path
         let dbs_path = duniter_conf::get_blockchain_db_path(self.profile.as_str(), &self.currency);
 
-        // Get wotb index
-        let mut wotb_index: HashMap<PubKey, NodeId> =
-            DALIdentity::get_wotb_index(&self.wot_databases.identities_db)
-                .expect("Fatal eror : get_wotb_index : Fail to read blockchain databases");
+        // Get wot index
+        let mut wot_index: HashMap<PubKey, NodeId> =
+            DALIdentity::get_wot_index(&self.wot_databases.identities_db)
+                .expect("Fatal eror : get_wot_index : Fail to read blockchain databases");
 
         // Open wot file
         let wot_db = open_wot_db::<RustyWebOfTrust>(Some(&dbs_path)).expect("Fail to open WotDB !");
@@ -629,7 +629,7 @@ impl BlockchainModule {
                                 let new_current_blockstamp = self.receive_network_documents(
                                     network_docs,
                                     &current_blockstamp,
-                                    &mut wotb_index,
+                                    &mut wot_index,
                                     &wot_db,
                                 );
                                 current_blockstamp = new_current_blockstamp;
@@ -665,7 +665,7 @@ impl BlockchainModule {
                                                     );
                                                     revert_block::revert_block(
                                                         &last_dal_block,
-                                                        &mut wotb_index,
+                                                        &mut wot_index,
                                                         &wot_db,
                                                         Some(free_fork_id),
                                                         &self
@@ -686,7 +686,7 @@ impl BlockchainModule {
                                             let new_current_blockstamp = self.receive_blocks(
                                                 blocks,
                                                 &current_blockstamp,
-                                                &mut wotb_index,
+                                                &mut wot_index,
                                                 &wot_db,
                                             );
                                             if current_blockstamp != new_current_blockstamp {
@@ -748,7 +748,7 @@ impl BlockchainModule {
                                 &self.wot_databases.certs_db,
                                 &Block::LocalBlock(&stackable_block.block),
                                 &current_blockstamp,
-                                &mut wotb_index,
+                                &mut wot_index,
                                 &wot_db,
                                 &self.forks_states,
                             ) {
diff --git a/blockchain/revert_block.rs b/blockchain/revert_block.rs
index 4ac1e0f4..3ea7afc0 100644
--- a/blockchain/revert_block.rs
+++ b/blockchain/revert_block.rs
@@ -22,8 +22,8 @@ use duniter_dal::{BinDB, ForkId, TxV10Datas};
 use duniter_documents::blockchain::v10::documents::block::TxDocOrTxHash;
 use duniter_documents::blockchain::v10::documents::transaction::{TxAmount, TxBase};
 use duniter_documents::blockchain::Document;
-use duniter_wotb::data::{NewLinkResult, RemLinkResult};
-use duniter_wotb::{NodeId, WebOfTrust};
+use durs_wot::data::{NewLinkResult, RemLinkResult};
+use durs_wot::{NodeId, WebOfTrust};
 use std::collections::HashMap;
 
 #[derive(Debug)]
@@ -85,8 +85,8 @@ pub fn revert_block<W: WebOfTrust>(
                 .read(|db| db.get_enabled())
                 .expect("Fail to read WotDB");
             let mut members_pubkeys = Vec::new();
-            for (pubkey, wotb_id) in wot_index.iter() {
-                if members_wot_ids.contains(wotb_id) {
+            for (pubkey, wot_id) in wot_index.iter() {
+                if members_wot_ids.contains(wot_id) {
                     members_pubkeys.push(*pubkey);
                 }
             }
@@ -122,24 +122,24 @@ pub fn revert_block<W: WebOfTrust>(
     for certification in block.certifications.clone() {
         trace!("stack_up_valid_block: apply cert...");
         let compact_cert = certification.to_compact_document();
-        let wotb_node_from = wot_index[&compact_cert.issuer];
-        let wotb_node_to = wot_index[&compact_cert.target];
+        let wot_node_from = wot_index[&compact_cert.issuer];
+        let wot_node_to = wot_index[&compact_cert.target];
         wot_db
             .write(|db| {
-                let result = db.rem_link(wotb_node_from, wotb_node_to);
+                let result = db.rem_link(wot_node_from, wot_node_to);
                 match result {
                     RemLinkResult::Removed(_) => {}
                     _ => panic!(
                         "Fail to rem_link {}->{} : {:?}",
-                        wotb_node_from.0, wotb_node_to.0, result
+                        wot_node_from.0, wot_node_to.0, result
                     ),
                 }
             })
             .expect("Fail to write in WotDB");
         wot_dbs_requests.push(WotsDBsWriteQuery::RevertCert(
             compact_cert,
-            wotb_node_from,
-            wotb_node_to,
+            wot_node_from,
+            wot_node_to,
         ));
         trace!("stack_up_valid_block: apply cert...success.");
     }
@@ -188,15 +188,15 @@ pub fn revert_block<W: WebOfTrust>(
     for active in block.actives.clone() {
         let pubkey = active.issuers()[0];
         if !identities.contains_key(&pubkey) {
-            let wotb_id = wot_index[&pubkey];
+            let wot_id = wot_index[&pubkey];
             wot_db
                 .write(|db| {
-                    db.set_enabled(wotb_id, true);
+                    db.set_enabled(wot_id, true);
                 })
                 .expect("Fail to write in WotDB");
             wot_dbs_requests.push(WotsDBsWriteQuery::RevertRenewalIdentity(
                 pubkey,
-                wotb_id,
+                wot_id,
                 block.median_time,
                 active.blockstamp().id,
             ));
@@ -216,15 +216,15 @@ pub fn revert_block<W: WebOfTrust>(
             wot_dbs_requests.push(WotsDBsWriteQuery::RevertCreateIdentity(pubkey));
         } else {
             // Renewer
-            let wotb_id = wot_index[&joiner.issuers()[0]];
+            let wot_id = wot_index[&joiner.issuers()[0]];
             wot_db
                 .write(|db| {
-                    db.set_enabled(wotb_id, true);
+                    db.set_enabled(wot_id, true);
                 })
                 .expect("Fail to write in WotDB");
             wot_dbs_requests.push(WotsDBsWriteQuery::RevertRenewalIdentity(
                 joiner.issuers()[0],
-                wotb_id,
+                wot_id,
                 block.median_time,
                 joiner.blockstamp().id,
             ));
diff --git a/blockchain/sync.rs b/blockchain/sync.rs
index 1bcd942b..47b68cef 100644
--- a/blockchain/sync.rs
+++ b/blockchain/sync.rs
@@ -27,7 +27,7 @@ use duniter_dal::writers::requests::*;
 use duniter_dal::ForkId;
 use duniter_documents::{BlockHash, BlockId};
 use duniter_network::NetworkBlock;
-use duniter_wotb::NodeId;
+use durs_wot::NodeId;
 use std::collections::{HashMap, VecDeque};
 use std::fs;
 use std::ops::Deref;
@@ -279,10 +279,10 @@ pub fn sync_ts<DC: DuniterConf>(
         return;
     }
 
-    // Get wotb index
-    let mut wotb_index: HashMap<PubKey, NodeId> =
-        DALIdentity::get_wotb_index(&wot_databases.identities_db)
-            .expect("Fatal eror : get_wotb_index : Fail to read blockchain databases");
+    // Get wot index
+    let mut wot_index: HashMap<PubKey, NodeId> =
+        DALIdentity::get_wot_index(&wot_databases.identities_db)
+            .expect("Fatal eror : get_wot_index : Fail to read blockchain databases");
 
     // Start sync
     let sync_start_time = SystemTime::now();
@@ -535,7 +535,7 @@ pub fn sync_ts<DC: DuniterConf>(
         if let Ok(ValidBlockApplyReqs(block_req, wot_db_reqs, currency_db_reqs)) =
             apply_valid_block::<RustyWebOfTrust>(
                 &block_doc,
-                &mut wotb_index,
+                &mut wot_index,
                 &wot_db,
                 &expire_certs,
                 None,
@@ -624,7 +624,7 @@ pub fn sync_ts<DC: DuniterConf>(
     currency_params_db.save().expect("Fail to save params db");
 
     // Save wot file
-    wot_db.save().expect("Fail to save wotb db");
+    wot_db.save().expect("Fail to save wot db");
 
     let main_job_duration =
         SystemTime::now().duration_since(main_job_begin).unwrap() - all_wait_duration;
diff --git a/dal/Cargo.toml b/dal/Cargo.toml
index fd9d280d..535bf855 100644
--- a/dal/Cargo.toml
+++ b/dal/Cargo.toml
@@ -13,7 +13,7 @@ duniter-crypto = { path = "../crypto" }
 duniter-documents = { path = "../documents" }
 duniter-module = { path = "../module" }
 duniter-network = { path = "../network" }
-duniter-wotb = { path = "../wotb" }
+durs-wot = { path = "../wot" }
 lazy_static = "1.0.*"
 log = "0.4.*"
 rand = "0.4.*"
diff --git a/dal/block.rs b/dal/block.rs
index 8ca38a53..0b0128cd 100644
--- a/dal/block.rs
+++ b/dal/block.rs
@@ -18,7 +18,7 @@ use duniter_crypto::keys::*;
 use duniter_documents::blockchain::v10::documents::BlockDocument;
 use duniter_documents::blockchain::Document;
 use duniter_documents::{BlockHash, BlockId, Blockstamp, PreviousBlockstamp};
-use duniter_wotb::NodeId;
+use durs_wot::NodeId;
 use std::collections::HashMap;
 use *;
 
diff --git a/dal/certs.rs b/dal/certs.rs
index fea1325e..532ceeae 100644
--- a/dal/certs.rs
+++ b/dal/certs.rs
@@ -14,10 +14,10 @@
 // along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
 extern crate duniter_documents;
-extern crate duniter_wotb;
+extern crate durs_wot;
 
 use duniter_documents::BlockId;
-use duniter_wotb::NodeId;
+use durs_wot::NodeId;
 use std::collections::HashMap;
 use {BinDB, CertsExpirV10Datas, DALError};
 
diff --git a/dal/identity.rs b/dal/identity.rs
index 03467a86..30d36b4e 100644
--- a/dal/identity.rs
+++ b/dal/identity.rs
@@ -17,7 +17,7 @@ use currency_params::CurrencyParameters;
 use duniter_crypto::keys::*;
 use duniter_documents::blockchain::v10::documents::IdentityDocument;
 use duniter_documents::{BlockId, Blockstamp};
-use duniter_wotb::NodeId;
+use durs_wot::NodeId;
 use std::collections::HashMap;
 use {BinDB, DALError, IdentitiesV10Datas, MsExpirV10Datas};
 
@@ -129,16 +129,16 @@ impl DALIdentity {
     }
 
     /// Get wot_id index
-    pub fn get_wotb_index(
+    pub fn get_wot_index(
         identities_db: &BinDB<IdentitiesV10Datas>,
     ) -> Result<HashMap<PubKey, NodeId>, DALError> {
         Ok(identities_db.read(|db| {
-            let mut wotb_index: HashMap<PubKey, NodeId> = HashMap::new();
+            let mut wot_index: HashMap<PubKey, NodeId> = HashMap::new();
             for (pubkey, member_datas) in db {
-                let wotb_id = member_datas.wot_id;
-                wotb_index.insert(*pubkey, wotb_id);
+                let wot_id = member_datas.wot_id;
+                wot_index.insert(*pubkey, wot_id);
             }
-            wotb_index
+            wot_index
         })?)
     }
 
diff --git a/dal/lib.rs b/dal/lib.rs
index 8cceb24b..9ba82ae0 100644
--- a/dal/lib.rs
+++ b/dal/lib.rs
@@ -39,7 +39,7 @@ extern crate serde_derive;
 
 extern crate duniter_crypto;
 extern crate duniter_documents;
-extern crate duniter_wotb;
+extern crate durs_wot;
 extern crate rustbreak;
 extern crate serde;
 
@@ -85,7 +85,7 @@ use duniter_documents::blockchain::v10::documents::block::BlockV10Parameters;
 use duniter_documents::blockchain::v10::documents::transaction::*;
 use duniter_documents::CurrencyName;
 use duniter_documents::{BlockHash, BlockId, Blockstamp, PreviousBlockstamp};
-use duniter_wotb::{NodeId, WebOfTrust};
+use durs_wot::{NodeId, WebOfTrust};
 use rustbreak::backend::{FileBackend, MemoryBackend};
 use rustbreak::error::{RustbreakError, RustbreakErrorKind};
 use rustbreak::{deser::Bincode, Database, FileDatabase, MemoryDatabase};
@@ -478,7 +478,7 @@ pub fn open_db<D: Serialize + DeserializeOwned + Debug + Default + Clone + Send>
     }
 }
 
-/// Open wot db (cf. duniter-wot crate)
+/// Open wot db (cf. durs-wot crate)
 pub fn open_wot_db<W: WebOfTrust>(dbs_folder_path: Option<&PathBuf>) -> Result<BinDB<W>, DALError> {
     if let Some(dbs_folder_path) = dbs_folder_path {
         Ok(BinDB::File(open_db::<W>(dbs_folder_path, "wot.db")?))
diff --git a/dal/tools.rs b/dal/tools.rs
index b3509912..12a91949 100644
--- a/dal/tools.rs
+++ b/dal/tools.rs
@@ -13,15 +13,13 @@
 // You should have received a copy of the GNU Affero General Public License
 // along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-extern crate duniter_wotb;
+extern crate durs_wot;
 
-use duniter_wotb::operations::centrality::{
-    CentralitiesCalculator, UlrikBrandesCentralityCalculator,
-};
-use duniter_wotb::operations::distance::{
+use durs_wot::operations::centrality::{CentralitiesCalculator, UlrikBrandesCentralityCalculator};
+use durs_wot::operations::distance::{
     DistanceCalculator, RustyDistanceCalculator, WotDistance, WotDistanceParameters,
 };
-use duniter_wotb::{NodeId, WebOfTrust};
+use durs_wot::{NodeId, WebOfTrust};
 
 /// CENTRALITY_CALCULATOR
 pub static CENTRALITY_CALCULATOR: UlrikBrandesCentralityCalculator =
diff --git a/dal/writers/certification.rs b/dal/writers/certification.rs
index 7ac57ac1..bb01dfd1 100644
--- a/dal/writers/certification.rs
+++ b/dal/writers/certification.rs
@@ -20,7 +20,7 @@ use currency_params::CurrencyParameters;
 use duniter_crypto::keys::*;
 use duniter_documents::blockchain::v10::documents::certification::CompactCertificationDocument;
 use duniter_documents::BlockId;
-use duniter_wotb::NodeId;
+use durs_wot::NodeId;
 use {BinDB, CertsExpirV10Datas, DALError, IdentitiesV10Datas};
 
 /// Apply "certification" event in databases
diff --git a/dal/writers/identity.rs b/dal/writers/identity.rs
index 454f3d51..93f2bef0 100644
--- a/dal/writers/identity.rs
+++ b/dal/writers/identity.rs
@@ -18,7 +18,7 @@ use duniter_crypto::keys::PubKey;
 use duniter_documents::blockchain::v10::documents::IdentityDocument;
 use duniter_documents::blockchain::Document;
 use duniter_documents::{BlockId, Blockstamp};
-use duniter_wotb::NodeId;
+use durs_wot::NodeId;
 use identity::{DALIdentity, DALIdentityState};
 use {BinDB, DALError, IdentitiesV10Datas, MsExpirV10Datas};
 
diff --git a/dal/writers/requests.rs b/dal/writers/requests.rs
index 80d0a3fe..825a14af 100644
--- a/dal/writers/requests.rs
+++ b/dal/writers/requests.rs
@@ -22,7 +22,7 @@ use duniter_crypto::keys::PubKey;
 use duniter_documents::blockchain::v10::documents::certification::CompactCertificationDocument;
 use duniter_documents::blockchain::v10::documents::identity::IdentityDocument;
 use duniter_documents::Blockstamp;
-use duniter_wotb::NodeId;
+use durs_wot::NodeId;
 use identity::DALIdentity;
 use sources::SourceAmount;
 use std::ops::Deref;
@@ -89,9 +89,9 @@ impl BlocksDBsWriteQuery {
 #[derive(Debug, Clone)]
 /// Contain a pending write request for wots databases
 pub enum WotsDBsWriteQuery {
-    /// Newcomer (wotb_id, blockstamp, current_bc_time, idty_doc, ms_created_block_id)
+    /// Newcomer (wot_id, blockstamp, current_bc_time, idty_doc, ms_created_block_id)
     CreateIdentity(NodeId, Blockstamp, u64, Box<IdentityDocument>, BlockId),
-    /// Revert newcomer event (wotb_id, blockstamp, current_bc_time, idty_doc, ms_created_block_id)
+    /// Revert newcomer event (wot_id, blockstamp, current_bc_time, idty_doc, ms_created_block_id)
     RevertCreateIdentity(PubKey),
     /// Active (pubKey, idty_wot_id, current_bc_time, ms_created_block_id)
     RenewalIdentity(PubKey, NodeId, u64, BlockId),
@@ -124,7 +124,7 @@ impl WotsDBsWriteQuery {
     ) -> Result<(), DALError> {
         match *self {
             WotsDBsWriteQuery::CreateIdentity(
-                ref wotb_id,
+                ref wot_id,
                 ref blockstamp,
                 ref current_bc_time,
                 ref idty_doc,
@@ -136,7 +136,7 @@ impl WotsDBsWriteQuery {
                     &databases.ms_db,
                     idty_doc.deref(),
                     *ms_created_block_id,
-                    *wotb_id,
+                    *wot_id,
                     *blockstamp,
                     *current_bc_time,
                 )?;
diff --git a/wotb/Cargo.toml b/wot/Cargo.toml
similarity index 82%
rename from wotb/Cargo.toml
rename to wot/Cargo.toml
index 803afed1..900fd3fc 100644
--- a/wotb/Cargo.toml
+++ b/wot/Cargo.toml
@@ -1,11 +1,11 @@
 [package]
-name = "duniter-wotb"
-version = "0.8.0-a0.7"
+name = "durs-wot"
+version = "0.8.0-a0.8"
 authors = ["nanocryk <nanocryk@duniter.org>", "elois <elois@duniter.org>"]
 description = "Makes Web of Trust computations for the Duniter project."
 repository = "https://git.duniter.org/nodes/rust/duniter-rs"
 readme = "README.md"
-keywords = ["duniter", "wot", "wotb", "web", "trust"]
+keywords = ["duniter", "wot", "wot", "web", "trust"]
 license = "AGPL-3.0"
 
 [lib]
diff --git a/wot/README.md b/wot/README.md
new file mode 100644
index 00000000..3092a7fb
--- /dev/null
+++ b/wot/README.md
@@ -0,0 +1,10 @@
+# wot
+
+`wot` is a crate making "Web of Trust" computations for
+the [Duniter] project.
+
+[Duniter]: https://duniter.org/en/
+
+## How to use it
+
+You can add `durs-wot` as a `cargo` dependency in your Rust project.
\ No newline at end of file
diff --git a/wotb/data/mod.rs b/wot/data/mod.rs
similarity index 100%
rename from wotb/data/mod.rs
rename to wot/data/mod.rs
diff --git a/wotb/data/rusty.rs b/wot/data/rusty.rs
similarity index 100%
rename from wotb/data/rusty.rs
rename to wot/data/rusty.rs
diff --git a/wotb/lib.rs b/wot/lib.rs
similarity index 98%
rename from wotb/lib.rs
rename to wot/lib.rs
index a7a0c4f8..de3734d8 100644
--- a/wotb/lib.rs
+++ b/wot/lib.rs
@@ -13,7 +13,7 @@
 // You should have received a copy of the GNU Affero General Public License
 // along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-//! `wotb` is a crate making "Web of Trust" computations for
+//! `wot` is a crate making "Web of Trust" computations for
 //! the [Duniter] project.
 //!
 //! [Duniter]: https://duniter.org/
@@ -22,9 +22,9 @@
 //!
 //! It also contains an "legacy" implementation translated from the original C++ code.
 //!
-//! Web of Trust tests are translated from [duniter/wotb Javascript test][js-tests].
+//! Web of Trust tests are translated from [duniter/wot Javascript test][js-tests].
 //!
-//! [js-tests]: https://github.com/duniter/wotb/blob/master/wotcpp/webOfTrust.cpp
+//! [js-tests]: https://github.com/duniter/wot/blob/master/wotcpp/webOfTrust.cpp
 
 #![cfg_attr(feature = "strict", deny(warnings))]
 #![deny(
@@ -60,7 +60,7 @@ mod tests {
     use operations::file::*;
     use operations::path::*;
 
-    /// Test translated from https://github.com/duniter/wotb/blob/master/tests/test.js
+    /// Test translated from https://github.com/duniter/wot/blob/master/tests/test.js
     ///
     /// Clone and file tests are not included in this generic test and should be done in
     /// the implementation test.
diff --git a/wotb/operations/centrality.rs b/wot/operations/centrality.rs
similarity index 100%
rename from wotb/operations/centrality.rs
rename to wot/operations/centrality.rs
diff --git a/wotb/operations/distance.rs b/wot/operations/distance.rs
similarity index 100%
rename from wotb/operations/distance.rs
rename to wot/operations/distance.rs
diff --git a/wotb/operations/file.rs b/wot/operations/file.rs
similarity index 99%
rename from wotb/operations/file.rs
rename to wot/operations/file.rs
index 515fddaf..785cf784 100644
--- a/wotb/operations/file.rs
+++ b/wot/operations/file.rs
@@ -87,7 +87,7 @@ impl FileFormater for BinaryFileFormater {
     ) -> Result<(T, Vec<u8>), WotParseError> {
         let mut wot = T::new(max_links);
 
-        let file_size = fs::metadata(path).expect("fail to read wotb file !").len();
+        let file_size = fs::metadata(path).expect("fail to read wot file !").len();
         let mut file_pointing_to_blockstamp_size: Vec<u8> = vec![0; file_size as usize];
         match File::open(path) {
             Ok(mut file) => {
diff --git a/wotb/operations/mod.rs b/wot/operations/mod.rs
similarity index 100%
rename from wotb/operations/mod.rs
rename to wot/operations/mod.rs
diff --git a/wotb/operations/path.rs b/wot/operations/path.rs
similarity index 100%
rename from wotb/operations/path.rs
rename to wot/operations/path.rs
diff --git a/wotb/tests/g1_genesis.bin b/wot/tests/g1_genesis.bin
similarity index 100%
rename from wotb/tests/g1_genesis.bin
rename to wot/tests/g1_genesis.bin
diff --git a/wotb/README.md b/wotb/README.md
deleted file mode 100644
index 32266674..00000000
--- a/wotb/README.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# wotb
-
-`wotb` is a crate making "Web of Trust" computations for
-the [Duniter] project.
-
-[Duniter]: https://duniter.org/en/
-
-## How to use it
-
-You can add `duniter-wotb` as a `cargo` dependency in your Rust project.
\ No newline at end of file
diff --git a/ws2p-v1-legacy/Cargo.toml b/ws2p-v1-legacy/Cargo.toml
index 3df5308e..63e77f2c 100644
--- a/ws2p-v1-legacy/Cargo.toml
+++ b/ws2p-v1-legacy/Cargo.toml
@@ -17,7 +17,7 @@ duniter-documents = { path = "../documents" }
 duniter-message =  { path = "../message" }
 duniter-module = { path = "../module" }
 duniter-network = { path = "../network" }
-duniter-wotb = { path = "../wotb" }
+durs-wot = { path = "../wot" }
 lazy_static = "1.0.*"
 log = "0.4.*"
 rand = "0.4.*"
-- 
GitLab