From 9139b079d25bc7aca06fe0d4f5e33e76cb7b6a92 Mon Sep 17 00:00:00 2001
From: cgeek <cem.moreau@gmail.com>
Date: Fri, 27 May 2016 11:55:03 +0200
Subject: [PATCH] Renaming uCoin -> Duniter

---
 app/lib/dal/fileDALs/confDAL.js |  2 +-
 app/lib/network.js              |  2 +-
 app/lib/streams/bma.js          |  2 +-
 app/lib/streams/webmin.js       |  2 +-
 bin/daemon                      |  2 +-
 bin/ucoind                      |  2 +-
 doc/HTTP_API.md                 | 16 ++++++++--------
 doc/Protocol.md                 | 10 +++++-----
 doc/architecture.md             | 10 +++++-----
 doc/manual-config.md            | 22 +++++++++++-----------
 duniter.sh                      |  2 +-
 11 files changed, 36 insertions(+), 36 deletions(-)

diff --git a/app/lib/dal/fileDALs/confDAL.js b/app/lib/dal/fileDALs/confDAL.js
index d6671dfb7..44860d663 100644
--- a/app/lib/dal/fileDALs/confDAL.js
+++ b/app/lib/dal/fileDALs/confDAL.js
@@ -37,7 +37,7 @@ function ConfDAL(rootPath, qioFS, parentCore, localDAL, AbstractStorage) {
         "msWindow": parseInt(conf.msWindow,10),
         "xpercent": parseFloat(conf.xpercent,10),
         "msValidity": parseInt(conf.msValidity,10),
-        "stepMax": parseInt(3,10), // uCoin only handles 3 step currencies for now
+        "stepMax": parseInt(3,10), // Duniter only handles 3 step currencies for now
         "medianTimeBlocks": parseInt(conf.medianTimeBlocks,10),
         "avgGenTime": parseInt(conf.avgGenTime,10),
         "dtDiffEval": parseInt(conf.dtDiffEval,10),
diff --git a/app/lib/network.js b/app/lib/network.js
index 63a9b2114..b90e204b3 100644
--- a/app/lib/network.js
+++ b/app/lib/network.js
@@ -143,7 +143,7 @@ module.exports = {
     var listenings = interfaces.map(() => false);
 
     if (httpServers.length == 0){
-      throw 'uCoin does not have any interface to listen to.';
+      throw 'Duniter does not have any interface to listen to.';
     }
 
     // Return API
diff --git a/app/lib/streams/bma.js b/app/lib/streams/bma.js
index 73236c31f..3786961e2 100644
--- a/app/lib/streams/bma.js
+++ b/app/lib/streams/bma.js
@@ -26,7 +26,7 @@ module.exports = function(server, interfaces, httpLogs) {
     }
   }
 
-  return network.createServersAndListen('uCoin server', interfaces, httpLogs, null, (app, httpMethods) => {
+  return network.createServersAndListen('Duniter server', interfaces, httpLogs, null, (app, httpMethods) => {
 
     var node         = require('../../controllers/node')(server);
     var blockchain   = require('../../controllers/blockchain')(server);
diff --git a/app/lib/streams/webmin.js b/app/lib/streams/webmin.js
index aafd93507..c5355b90d 100644
--- a/app/lib/streams/webmin.js
+++ b/app/lib/streams/webmin.js
@@ -15,7 +15,7 @@ module.exports = function(dbConf, overConf, interfaces, httpLogs) {
 
   var fullPath = path.join(__dirname, '../../../ui/public');
 
-  let httpLayer = network.createServersAndListen('uCoin web admin', interfaces, httpLogs, fullPath, (app, httpMethods) => {
+  let httpLayer = network.createServersAndListen('Duniter web admin', interfaces, httpLogs, fullPath, (app, httpMethods) => {
 
     httpMethods.httpGET(  '/webmin/summary',                   webminCtrl.summary, dtos.AdminSummary);
     httpMethods.httpPOST( '/webmin/key/preview',               webminCtrl.previewPubkey, dtos.PreviewPubkey);
diff --git a/bin/daemon b/bin/daemon
index f6f6becbf..e0ba25c99 100755
--- a/bin/daemon
+++ b/bin/daemon
@@ -63,7 +63,7 @@ function getDaemon(overrideCommand) {
     name: directory.INSTANCE_NAME,
     pidfile: path.join(directory.INSTANCE_HOME, "app.pid"),
 
-    // We must redefine the main argument to 'start' because uCoin will receive it as command argument and does not
+    // We must redefine the main argument to 'start' because Duniter will receive it as command argument and does not
     // know about 'restart' command.
     argv: getCommand(overrideCommand)
   });
diff --git a/bin/ucoind b/bin/ucoind
index 95372e93d..56c48ab2b 100755
--- a/bin/ucoind
+++ b/bin/ucoind
@@ -35,7 +35,7 @@ program
   .version(pjson.version)
   .usage('<command> [options]')
 
-  .option('--home <path>',         'Path to uCoin HOME (defaults to "$HOME/.config/duniter").')
+  .option('--home <path>',         'Path to Duniter HOME (defaults to "$HOME/.config/duniter").')
   .option('-d, --mdb <name>',          'Database name (defaults to "ucoin_default").')
 
   .option('--autoconf',                'With `init` command, will guess the best network and key options witout aksing for confirmation')
diff --git a/doc/HTTP_API.md b/doc/HTTP_API.md
index 8dcfecdc2..5fc80a116 100644
--- a/doc/HTTP_API.md
+++ b/doc/HTTP_API.md
@@ -1,4 +1,4 @@
-# uCoin HTTP API
+# Duniter HTTP API
 
 ## Contents
 
@@ -56,7 +56,7 @@
 
 ## Overview
 
-Data is made accessible through an HTTP API mainly inspired from [OpenUDC_exchange_formats draft](https://github.com/Open-UDC/open-udc/blob/master/docs/OpenUDC_exchange_formats.draft.txt), and has been adapted to fit uCoin specificities.
+Data is made accessible through an HTTP API mainly inspired from [OpenUDC_exchange_formats draft](https://github.com/Open-UDC/open-udc/blob/master/docs/OpenUDC_exchange_formats.draft.txt), and has been adapted to fit Duniter specificities.
 
     http[s]://Node[:port]/...
     |-- wot/
@@ -106,9 +106,9 @@ Merkle URL is a special kind of URL applicable for resources:
 
 * `network/peering/peers (GET)`
 
-Such kind of URL returns Merkle tree hashes informations. In uCoin, Merkle trees are an easy way to detect unsynced data and where the differences come from. For example, `network/peering/peers` is a Merkle tree whose leaves are peers' key fingerprint sorted ascending way. Thus, if any new peer is added, a branch of the tree will see its hash modified and propagated to the root hash. Change is then easy to detect.
+Such kind of URL returns Merkle tree hashes informations. In Duniter, Merkle trees are an easy way to detect unsynced data and where the differences come from. For example, `network/peering/peers` is a Merkle tree whose leaves are peers' key fingerprint sorted ascending way. Thus, if any new peer is added, a branch of the tree will see its hash modified and propagated to the root hash. Change is then easy to detect.
 
-For commodity issues, this URL uses query parameters to retrieve partial data of the tree, as most of the time all the data is not required. uCoin Merkle tree has a determined number of parent nodes (given a number of leaves), which allows to ask only for interval of them.
+For commodity issues, this URL uses query parameters to retrieve partial data of the tree, as most of the time all the data is not required. Duniter Merkle tree has a determined number of parent nodes (given a number of leaves), which allows to ask only for interval of them.
 
 Here is an example of members Merkle tree with 5 members (taken from [Tree Hash EXchange format (THEX)](http://web.archive.org/web/20080316033726/http://www.open-content.net/specs/draft-jchapweske-thex-02.html)):
 
@@ -128,9 +128,9 @@ Here is an example of members Merkle tree with 5 members (taken from [Tree Hash
 
 Where A,B,C,D,E are already hashed data.
 
-With such a tree structure, uCoin consider the tree has exactly 6 nodes: `[ROOT,H,E,F,G,E]`. Nodes are just an array, and for a Lambda Server LS1, it is easy to ask for the values of another server LS2 for level 1 (`H` and `E`, the second level): it requires nodes interval `[1;2]`.
+With such a tree structure, Duniter consider the tree has exactly 6 nodes: `[ROOT,H,E,F,G,E]`. Nodes are just an array, and for a Lambda Server LS1, it is easy to ask for the values of another server LS2 for level 1 (`H` and `E`, the second level): it requires nodes interval `[1;2]`.
 
-Hence it is quite easy for anyone who wants to check if a `Z` member joined the uCoin community as it would alter the `E` branch of the tree:
+Hence it is quite easy for anyone who wants to check if a `Z` member joined the Duniter community as it would alter the `E` branch of the tree:
 
                         ROOT'=H(H+E')
                         /            \
@@ -197,7 +197,7 @@ Merkle URL result with `leaf=AE4F281DF5A5D0FF3CAD6371F76D5C29B6D953EC`.
 }
 ```
 
-### uCoin Merkle trees leaves
+### Duniter Merkle trees leaves
 
 Each tree manages different data, and has a different goal. Hence, each tree has its own rules on how are generated and sorted tree leaves.
 Here is a summup of such rules:
@@ -1109,7 +1109,7 @@ Top block of each branch, i.e. the last received block of each branch. An array
 
 ### network/*
 
-This URL is used for uCoin Gossip protocol (exchanging UCG messages).
+This URL is used for Duniter Gossip protocol (exchanging UCG messages).
 
 #### `network/peers`
 **Goal**
diff --git a/doc/Protocol.md b/doc/Protocol.md
index 69fc43d59..0becce737 100644
--- a/doc/Protocol.md
+++ b/doc/Protocol.md
@@ -1,4 +1,4 @@
-# UCP - uCoin Protocol
+# UCP - Duniter Protocol
 
 > This document is still regularly updated (as of February 2015)
 
@@ -32,7 +32,7 @@
 
 Word                  | Description
 --------------------- | -------------
-UCP                   | Acronym for *UCoin Protocol*. A set of rules to create uCoin based currencies.
+UCP                   | Acronym for *UCoin Protocol*. A set of rules to create Duniter based currencies.
 Signature             | The cryptographical act of certifying a document using a private key.
 WoT                   | Acronym for *Web of Trust*. A groupment of individuals recognizing each other's identity through public keys and certification mechanisms
 UD                    | Acronym for *Universal Dividend*. Means money issuance **directly** and **exclusively** by and to WoT members
@@ -873,7 +873,7 @@ Field | Description
     PROTOCOL_NAME[ OPTIONS]
     [...]
 
-For example, the first written uCoin peering protocol is BASIC_MERKLED_API, which defines an HTTP API. An endpoint of such protocol would look like:
+For example, the first written Duniter peering protocol is BASIC_MERKLED_API, which defines an HTTP API. An endpoint of such protocol would look like:
 
     BASIC_MERKLED_API[ DNS][ IPv4][ IPv6] PORT
 
@@ -1426,10 +1426,10 @@ TRUE
 
 UCP does not imposes a particular API to deal with UCP data. Instead, UCP prefers to allow for any API definition using [Peer](#peer) document, and then leting peers deal themselves with the API(s) they prefer.
 
-At this stage, only [uCoin HTTP API](/HTTP_API.md) (named BASIC_MERKLED_API) is known as a valid UCP API.
+At this stage, only [Duniter HTTP API](/HTTP_API.md) (named BASIC_MERKLED_API) is known as a valid UCP API.
 
 ## References
 
 * [Relative Money Theory](http://fr.wikipedia.org/wiki/Th%C3%A9orie_relative_de_la_monnaie), the theoretical reference behind Universal Dividend
-* [OpenUDC](www.openudc.org), the inspiration project of uCoin
+* [OpenUDC](www.openudc.org), the inspiration project of Duniter
 * [Bitcoin](https://github.com/bitcoin/bitcoin), the well known crypto-currency system
\ No newline at end of file
diff --git a/doc/architecture.md b/doc/architecture.md
index c3a7c246f..e878af908 100644
--- a/doc/architecture.md
+++ b/doc/architecture.md
@@ -2,14 +2,14 @@
 
 ```
          -------------
-         |    BMA    | uCoin Basic Merkled API (HTTP)
+         |    BMA    | Duniter Basic Merkled API (HTTP)
          -------------
                â–²
                |
             Trought
                |
          -------------
-         |   ucoin   | The software
+         |  duniter   | The software
          -------------
                |
                |                                
@@ -17,7 +17,7 @@
                |                                
                â–¼                                
        -----------------                        
-       |      UCP      | uCoin protocol         
+       |      UCP      | Duniter protocol
        | ------------- |                        
        | |  Ed25519  | | Cryptography features
        -----------------
@@ -27,7 +27,7 @@ More details on each layer:
 
 Layer | Role
 ----- | ----
-uCoin | The software that implements UCP. May implement UCP throught BMA or any other future protocol.
+Duniter | The software that implements UCP. May implement UCP throught BMA or any other future protocol.
 [BMA](./HTTP_API.md) | A communication protocol to exchange HDC and Network messages over HTTP.
-[UCP](./Protocol.md) | A protocol defining how to handle Network and HDC messages in order to build a uCoin network.
+[UCP](./Protocol.md) | A protocol defining how to handle Network and HDC messages in order to build a Duniter network.
 Ed25519 | Cryptography format providing authentication features.
diff --git a/doc/manual-config.md b/doc/manual-config.md
index 091a7fdd5..94e74a3db 100644
--- a/doc/manual-config.md
+++ b/doc/manual-config.md
@@ -1,6 +1,6 @@
 # Manual configuration
 
-To add mnually configuration parameters to uCoin, use `config` command:
+To add mnually configuration parameters to Duniter, use `config` command:
 
 ```bash
 $ ucoind config
@@ -8,7 +8,7 @@ $ ucoind config
 
 ## Currency
 
-First of all, tell uCoin which currency to be used through command:
+First of all, tell Duniter which currency to be used through command:
 
 ```bash
 $ ucoind config --currency mycurrency
@@ -45,13 +45,13 @@ Or both:
 $ ucoind config -p 8888 --ipv4 127.0.0.1 --ipv6 ::1
 ```
 
-Launching uCoin (when completely configured) will results:
+Launching Duniter (when completely configured) will results:
 
 ```bash
 $ ucoind start
 
-uCoin server listening on 127.0.0.1 port 8888
-uCoin server listening on ::1 port 8888
+Duniter server listening on 127.0.0.1 port 8888
+Duniter server listening on ::1 port 8888
 ```
 
 Note too that listening to multiple interfaces doesn't imply mutiple program instances: only *one* is running on multiple interfaces.
@@ -60,7 +60,7 @@ Note too that listening to multiple interfaces doesn't imply mutiple program ins
 
 ### Peering informations
 
-uCoin protocol uses peering mecanisms, hence needs any ucoin node to be reachable through the network.
+Duniter protocol uses peering mecanisms, hence needs any ucoin node to be reachable through the network.
 
 As the server may be behind a reverse proxy, or because hosts may change of address, remote informations are likely to be different from listening host and port parameters. ucoin software defines 4 remote parameters you need to precise for your ucoin instance to be working:
 
@@ -75,17 +75,17 @@ You must define at least `--remote4` and `--remotep` not to have any error. Here
 $ ucoind config --remoteh "some.remote.url" --remotep "8844" --remote4 "11.11.11.11" --remote6 "::1"
 ```
 
-Note that this is not required and may be removed in the future, as uCoin protocol already include peering mecanisms giving network informations.
+Note that this is not required and may be removed in the future, as Duniter protocol already include peering mecanisms giving network informations.
 
 ### Authentication
 
-uCoin protocol requires your responses to be signed in order to be interpreted. Such a feature is very important to authenticate nodes' messages. To use this feature, just configure uCoin using `--pgpkey` parameter:
+Duniter protocol requires your responses to be signed in order to be interpreted. Such a feature is very important to authenticate nodes' messages. To use this feature, just configure Duniter using `--pgpkey` parameter:
 
 ```bash
 $ ucoind config --pgpkey /path/to/private/key
 ```
 
-Eventually, you might need to give a password, otherwise uCoin will crash:
+Eventually, you might need to give a password, otherwise Duniter will crash:
 
 ```bash
 $ ucoind config --pgppasswd "ultr[A]!%HiGhly-s3cuR3-p4ssw0d"
@@ -97,6 +97,6 @@ Resulting in:
 $ ucoind start
 
 Signed requests with PGP: enabled.
-uCoin server listening on 127.0.0.1 port 8888
-uCoin server listening on ::1 port 8888
+Duniter server listening on 127.0.0.1 port 8888
+Duniter server listening on ::1 port 8888
 ```
\ No newline at end of file
diff --git a/duniter.sh b/duniter.sh
index 3e1adda6a..6c3050120 100755
--- a/duniter.sh
+++ b/duniter.sh
@@ -70,7 +70,7 @@ duniter() {
 	fi;
 }
 
-# If the script was launched with parameters, try to launch the uCoin command
+# If the script was launched with parameters, try to launch the Duniter command
 if [ ! -z $1 ]; then
 	duniter $*
 fi
-- 
GitLab