From 4afdbc9556aa92178e56c61f07b4065c4db48842 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Mon, 26 Feb 2018 02:38:59 +0300 Subject: [PATCH 01/18] New final dns names for seeds --- src/assetchains | 2 +- src/chainparams.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/assetchains b/src/assetchains index 746f0d542..ae21bdfa5 100755 --- a/src/assetchains +++ b/src/assetchains @@ -1,7 +1,7 @@ #!/bin/bash source pubkey.txt args=("$@") -seed_ip=`getent hosts seed.mewhub.com | awk '{ print $1 }'` +seed_ip=`getent hosts zero.kolo.supernet.org | awk '{ print $1 }'` komodo_binary='./komodod' delay=20 diff --git a/src/chainparams.cpp b/src/chainparams.cpp index d84278b31..1630824d7 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -98,8 +98,9 @@ public: assert(genesis.hashMerkleRoot == uint256S("0x4a5e1e4baab89f3a32518a88c31bc87f618f76673e2cc77ab2127b7afdeda33b")); vFixedSeeds.clear(); vSeeds.clear(); - vSeeds.push_back(CDNSSeedData("komodoplatform.com", "seeds.komodoplatform.com")); // @kolo - vSeeds.push_back(CDNSSeedData("komodo.mewhub.com", "seeds.komodo.mewhub.com")); // @kolo + vSeeds.push_back(CDNSSeedData("komodoplatform.com", "seeds.komodoplatform.com")); // @kolo - old static dns seeds + vSeeds.push_back(CDNSSeedData("kolo.supernet.org", "static.kolo.supernet.org")); // @kolo - new static dns seeds ToDo + // vSeeds.push_back(CDNSSeedData("kolo.supernet.org", "dynamic.kolo.supernet.org")); // @kolo - crawler seeds ToDo // TODO: set up bootstrapping for mainnet base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,60); base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,85); From 94ee86f05682a7c95353106cbcf565cdb5ab23bd Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Mon, 26 Feb 2018 08:30:14 +0300 Subject: [PATCH 02/18] New docker file test --- Dockerfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 71136b3af..a549bce4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,13 @@ -FROM kolobus/ubuntu:komodo -MAINTAINER Mihail Fedorov +FROM ubuntu:16.04 +MAINTAINER Mihail Fedorov + +RUN apt-get -y update && \ + apt-get -y upgrade && \ + apt-get -y install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev \ + unzip python zlib1g-dev wget bsdmainutils automake libboost-all-dev libssl-dev libprotobuf-dev \ + protobuf-compiler libqrencode-dev libdb++-dev software-properties-common libcurl4-openssl-dev && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* ADD ./ /komodo ENV HOME /komodo From b26a0857dcb67a494d6c860b1f5717736fc954fe Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Mon, 26 Feb 2018 08:50:39 +0300 Subject: [PATCH 03/18] sleepless --- Dockerfile | 2 +- src/chainparams.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index a549bce4b..92b0b779c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ MAINTAINER Mihail Fedorov RUN apt-get -y update && \ apt-get -y upgrade && \ apt-get -y install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev \ - unzip python zlib1g-dev wget bsdmainutils automake libboost-all-dev libssl-dev libprotobuf-dev \ + unzip python zlib1g-dev wget bsdmainutils automake libssl-dev libprotobuf-dev \ protobuf-compiler libqrencode-dev libdb++-dev software-properties-common libcurl4-openssl-dev && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* diff --git a/src/chainparams.cpp b/src/chainparams.cpp index 1630824d7..0f3861040 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -100,7 +100,7 @@ public: vSeeds.clear(); vSeeds.push_back(CDNSSeedData("komodoplatform.com", "seeds.komodoplatform.com")); // @kolo - old static dns seeds vSeeds.push_back(CDNSSeedData("kolo.supernet.org", "static.kolo.supernet.org")); // @kolo - new static dns seeds ToDo - // vSeeds.push_back(CDNSSeedData("kolo.supernet.org", "dynamic.kolo.supernet.org")); // @kolo - crawler seeds ToDo + vSeeds.push_back(CDNSSeedData("kolo.supernet.org", "dynamic.kolo.supernet.org")); // @kolo - crawler seeds ToDo // TODO: set up bootstrapping for mainnet base58Prefixes[PUBKEY_ADDRESS] = std::vector(1,60); base58Prefixes[SCRIPT_ADDRESS] = std::vector(1,85); From b56e224002eca7d8aed1af8481d70b7fc1109687 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Mon, 26 Feb 2018 09:47:59 +0300 Subject: [PATCH 04/18] Adding coin in single commit --- src/assetchains | 1 + src/assetchains.old | 1 + src/dpowassets | 2 +- src/fiat-cli | 1 + src/fiat/ninja | 2 ++ 5 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 src/fiat/ninja diff --git a/src/assetchains b/src/assetchains index ae21bdfa5..ba5dcca18 100755 --- a/src/assetchains +++ b/src/assetchains @@ -50,3 +50,4 @@ komodo_asset BTCH 20998641 komodo_asset VOTE2018 600000000 komodo_asset PIZZA 100000000 komodo_asset BEER 100000000 +komodo_asset NINJA 100000000 diff --git a/src/assetchains.old b/src/assetchains.old index ab3c152b8..030a69ebf 100755 --- a/src/assetchains.old +++ b/src/assetchains.old @@ -27,6 +27,7 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=VOTE2018 -ac_supply=600000000 -addnode=78.47.196.146 & ./komodod -pubkey=$pubkey -ac_name=BEER -ac_supply=100000000 -addnode=24.54.206.138 & ./komodod -pubkey=$pubkey -ac_name=PIZZA -ac_supply=100000000 -addnode=24.54.206.138 & +./komodod -pubkey=$pubkey -ac_name=NINJA -ac_supply=100000000 -addnode=192.241.134.19 & #sleep $delay #./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 & diff --git a/src/dpowassets b/src/dpowassets index 81cb5b68e..4a75bbce7 100755 --- a/src/dpowassets +++ b/src/dpowassets @@ -28,7 +28,7 @@ curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dp curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BTCH\",\"pubkey\":\"$pubkey\"}" #curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHAIN\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"VOTE2018\",\"pubkey\":\"$pubkey\"}" - +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"NINJA\",\"pubkey\":\"$pubkey\"}" #curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"USD\",\"pubkey\":\"$pubkey\"}" #curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"EUR\",\"pubkey\":\"$pubkey\"}" diff --git a/src/fiat-cli b/src/fiat-cli index d9cc68ff5..9e50deda7 100755 --- a/src/fiat-cli +++ b/src/fiat-cli @@ -23,3 +23,4 @@ echo btch; fiat/btch $1 $2 $3 $4 echo pizza; fiat/pizza $1 $2 $3 $4 echo beer; fiat/beer $1 $2 $3 $4 echo vote2018; fiat/vote2018 $1 $2 $3 $4 +echo ninja; fiat/ninja $1 $2 $3 $4 diff --git a/src/fiat/ninja b/src/fiat/ninja new file mode 100755 index 000000000..f7722abb0 --- /dev/null +++ b/src/fiat/ninja @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=NINJA $1 $2 $3 $4 $5 $6 From 9db57a0eb3876a9883784ad306109592ce2c27a1 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 27 Feb 2018 18:11:11 +0200 Subject: [PATCH 05/18] Test --- src/komodo_utils.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/komodo_utils.h b/src/komodo_utils.h index 8db610e5d..418a3225d 100644 --- a/src/komodo_utils.h +++ b/src/komodo_utils.h @@ -1455,11 +1455,13 @@ uint32_t komodo_assetmagic(char *symbol,uint64_t supply,uint8_t *extraptr,int32_ return(shortflag); }*/ -uint16_t komodo_assetport(uint32_t magic) +uint16_t komodo_assetport(uint32_t magic,int32_t extralen) { if ( magic == 0x8de4eef9 ) return(7770); - else return(8000 + (magic % 7777)); + else if ( extralen == 0 ) + return(8000 + (magic % 7777)); + else return(16000 + (magic % 49500)); } uint16_t komodo_port(char *symbol,uint64_t supply,uint32_t *magicp,uint8_t *extraptr,int32_t extralen) @@ -1470,7 +1472,7 @@ uint16_t komodo_port(char *symbol,uint64_t supply,uint32_t *magicp,uint8_t *extr return(7770); } *magicp = komodo_assetmagic(symbol,supply,extraptr,extralen); - return(komodo_assetport(*magicp)); + return(komodo_assetport(*magicp,extralen)); } /*void komodo_ports(uint16_t ports[MAX_CURRENCIES]) From 41572034cb0854a04a87cecf17b6bc2f46609481 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 3 Mar 2018 16:49:58 -0800 Subject: [PATCH 06/18] Fix the port in curl examples shown at the bottom of all RPC method help texts --- src/rpcserver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index 94521004d..adafcd26d 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -863,7 +863,7 @@ std::string HelpExampleCli(const std::string& methodname, const std::string& arg std::string HelpExampleRpc(const std::string& methodname, const std::string& args) { return "> curl --user myusername --data-binary '{\"jsonrpc\": \"1.0\", \"id\":\"curltest\", " - "\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:8232/\n"; + "\"method\": \"" + methodname + "\", \"params\": [" + args + "] }' -H 'content-type: text/plain;' http://127.0.0.1:7771/\n"; } void RPCRegisterTimerInterface(RPCTimerInterface *iface) From 589c42c1c1fc3185feb14e5dbc88c407466b0397 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 3 Mar 2018 16:51:58 -0800 Subject: [PATCH 07/18] Make help examples show komodo-cli --- src/rpcserver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rpcserver.cpp b/src/rpcserver.cpp index adafcd26d..f353b9ea9 100644 --- a/src/rpcserver.cpp +++ b/src/rpcserver.cpp @@ -857,7 +857,7 @@ json_spirit::Value CRPCTable::execute(const std::string &strMethod, const json_s std::string HelpExampleCli(const std::string& methodname, const std::string& args) { - return "> zcash-cli " + methodname + " " + args + "\n"; + return "> komodo-cli " + methodname + " " + args + "\n"; } std::string HelpExampleRpc(const std::string& methodname, const std::string& args) From f37f614e247e99c45f0c55914ad83090d6ca0684 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 3 Mar 2018 17:58:57 -0800 Subject: [PATCH 08/18] Update various references from Zcash to KMD --- doc/files.md | 6 +++--- doc/payment-api.md | 2 +- doc/tor.md | 22 +++++++++++----------- doc/zmq.md | 10 +++++----- src/rpcrawtransaction.cpp | 8 ++++---- src/wallet/rpcwallet.cpp | 6 +++--- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/doc/files.md b/doc/files.md index 2d3787912..6a60a61ee 100644 --- a/doc/files.md +++ b/doc/files.md @@ -1,12 +1,12 @@ -* zcash.conf: contains configuration settings for zcashd -* zcashd.pid: stores the process id of zcashd while running +* komodo.conf: contains configuration settings for komodod +* komodod.pid: stores the process id of komodod while running * blocks/blk000??.dat: block data (custom, 128 MiB per file) * blocks/rev000??.dat; block undo data (custom) * blocks/index/*; block index (LevelDB) * chainstate/*; block chain state database (LevelDB) * database/*: BDB database environment * db.log: wallet database log file -* debug.log: contains debug information and general logging generated by zcashd +* debug.log: contains debug information and general logging generated by komodod * fee_estimates.dat: stores statistics used to estimate minimum transaction fees and priorities required for confirmation * peers.dat: peer IP address database (custom format) * wallet.dat: personal wallet (BDB) with keys and transactions diff --git a/doc/payment-api.md b/doc/payment-api.md index c4127b223..42e325f8a 100644 --- a/doc/payment-api.md +++ b/doc/payment-api.md @@ -64,7 +64,7 @@ Command | Parameters | Description z_exportkey | zaddr | _Requires an unlocked wallet or an unencrypted wallet._

Return a zkey for a given zaddr belonging to the node’s wallet.

The key will be returned as a string formatted using Base58Check as described in the Zcash protocol spec.

Output:AKWUAkypwQjhZ6LLNaMuuuLcmZ6gt5UFyo8m3jGutvALmwZKLdR5 z_importkey | zkey [rescan=true] | _Wallet must be unlocked._

Add a zkey as returned by z_exportkey to a node's wallet.

The key should be formatted using Base58Check as described in the Zcash protocol spec.

Set rescan to true (the default) to rescan the entire local block database for transactions affecting any address or pubkey script in the wallet (including transactions affecting the newly-added address for this spending key). z_exportwallet | filename | _Requires an unlocked wallet or an unencrypted wallet._

Creates or overwrites a file with taddr private keys and zaddr private keys in a human-readable format.

Filename is the file in which the wallet dump will be placed. May be prefaced by an absolute file path. An existing file with that name will be overwritten.

No value is returned but a JSON-RPC error will be reported if a failure occurred. -z_importwallet | filename | _Requires an unlocked wallet or an unencrypted wallet._

Imports private keys from a file in wallet export file format (see z_exportwallet). These keys will be added to the keys currently in the wallet. This call may need to rescan all or parts of the block chain for transactions affecting the newly-added keys, which may take several minutes.

Filename is the file to import. The path is relative to zcashd’s working directory.

No value is returned but a JSON-RPC error will be reported if a failure occurred. +z_importwallet | filename | _Requires an unlocked wallet or an unencrypted wallet._

Imports private keys from a file in wallet export file format (see z_exportwallet). These keys will be added to the keys currently in the wallet. This call may need to rescan all or parts of the block chain for transactions affecting the newly-added keys, which may take several minutes.

Filename is the file to import. The path is relative to komodod’s working directory.

No value is returned but a JSON-RPC error will be reported if a failure occurred. ### Payment diff --git a/doc/tor.md b/doc/tor.md index ce717515a..0608eb56d 100644 --- a/doc/tor.md +++ b/doc/tor.md @@ -33,7 +33,7 @@ outgoing connections be anonymized, but more is possible. In a typical situation, this suffices to run behind a Tor proxy: - ./zcashd -proxy=127.0.0.1:9050 + ./komodod -proxy=127.0.0.1:9050 2. Run a Zcash hidden server @@ -48,7 +48,7 @@ config file): HiddenServicePort 18233 127.0.0.1:18233 The directory can be different of course, but (both) port numbers should be equal to -your zcashd's P2P listen port (8233 by default). +your komodod's P2P listen port (8233 by default). -externalip=X You can tell Zcash about its publicly reachable address using this option, and this can be a .onion address. Given the above @@ -70,7 +70,7 @@ your zcashd's P2P listen port (8233 by default). In a typical situation, where you're only reachable via Tor, this should suffice: - ./zcashd -proxy=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -listen + ./komodod -proxy=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -listen (obviously, replace the Onion address with your own). It should be noted that you still listen on all devices and another node could establish a clearnet connection, when knowing @@ -81,14 +81,14 @@ your address. To mitigate this, additionally bind the address of your Tor proxy: If you don't care too much about hiding your node, and want to be reachable on IPv4 as well, use `discover` instead: - ./zcashd ... -discover + ./komodod ... -discover and open port 8233 on your firewall (or use -upnp). If you only want to use Tor to reach onion addresses, but not use it as a proxy for normal IPv4/IPv6 communication, use: - ./zcashd -onion=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -discover + ./komodod -onion=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -discover 3. Automatically listen on Tor @@ -110,12 +110,12 @@ and, if not disabled, configured using the `-torcontrol` and `-torpassword` sett To show verbose debugging information, pass `-debug=tor`. Connecting to Tor's control socket API requires one of two authentication methods to be -configured. For cookie authentication the user running zcashd must have write access +configured. For cookie authentication the user running komodod must have write access to the `CookieAuthFile` specified in Tor configuration. In some cases this is preconfigured and the creation of a hidden service is automatic. If permission problems are seen with `-debug=tor` they can be resolved by adding both the user running tor and -the user running zcashd to the same group and setting permissions appropriately. On -Debian-based systems the user running zcashd can be added to the debian-tor group, +the user running komodod to the same group and setting permissions appropriately. On +Debian-based systems the user running komodod can be added to the debian-tor group, which has the appropriate permissions. An alternative authentication method is the use of the `-torpassword` flag and a `hash-password` which can be enabled and specified in Tor configuration. @@ -125,9 +125,9 @@ Tor configuration. ----------------------------------- To test your set-up, you might want to try connecting via Tor on a different computer to just a -a single Zcash hidden server. Launch zcashd as follows: +a single Zcash hidden server. Launch komodod as follows: - ./zcashd -onion=127.0.0.1:9050 -connect=zctestseie6wxgio.onion + ./komodod -onion=127.0.0.1:9050 -connect=zctestseie6wxgio.onion Now use zcash-cli to verify there is only a single peer connection. @@ -146,4 +146,4 @@ Now use zcash-cli to verify there is only a single peer connection. To connect to multiple Tor nodes, use: - ./zcashd -onion=127.0.0.1:9050 -addnode=zctestseie6wxgio.onion -dnsseed=0 -onlynet=onion + ./komodod -onion=127.0.0.1:9050 -addnode=zctestseie6wxgio.onion -dnsseed=0 -onlynet=onion diff --git a/doc/zmq.md b/doc/zmq.md index e23c0937c..9fee74c40 100644 --- a/doc/zmq.md +++ b/doc/zmq.md @@ -46,7 +46,7 @@ operation. By default, the ZeroMQ feature is automatically compiled in if the necessary prerequisites are found. To disable, use --disable-zmq -during the *configure* step of building zcashd: +during the *configure* step of building komodod: $ ./configure --disable-zmq (other options) @@ -67,8 +67,8 @@ address. The same address can be used in more than one notification. For instance: - $ zcashd -zmqpubhashtx=tcp://127.0.0.1:28332 \ - -zmqpubrawtx=ipc:///tmp/zcashd.tx.raw + $ komodod -zmqpubhashtx=tcp://127.0.0.1:28332 \ + -zmqpubrawtx=ipc:///tmp/komodod.tx.raw Each PUB notification has a topic and body, where the header corresponds to the notification type. For instance, for the @@ -88,9 +88,9 @@ arriving. Please see `contrib/zmq/zmq_sub.py` for a working example. ## Remarks -From the perspective of zcashd, the ZeroMQ socket is write-only; PUB +From the perspective of komodod, the ZeroMQ socket is write-only; PUB sockets don't even have a read function. Thus, there is no state -introduced into zcashd directly. Furthermore, no information is +introduced into komodod directly. Furthermore, no information is broadcast that wasn't already received from the public P2P network. No authentication or authorization is done on connecting clients; it diff --git a/src/rpcrawtransaction.cpp b/src/rpcrawtransaction.cpp index dac9d49e8..285b5b48b 100644 --- a/src/rpcrawtransaction.cpp +++ b/src/rpcrawtransaction.cpp @@ -235,8 +235,8 @@ UniValue getrawtransaction(const UniValue& params, bool fHelp) " ],\n" " \"vjoinsplit\" : [ (array of json objects, only for version >= 2)\n" " {\n" - " \"vpub_old\" : x.xxx, (numeric) public input value in ZEC\n" - " \"vpub_new\" : x.xxx, (numeric) public output value in ZEC\n" + " \"vpub_old\" : x.xxx, (numeric) public input value in KMD\n" + " \"vpub_new\" : x.xxx, (numeric) public output value in KMD\n" " \"anchor\" : \"hex\", (string) the anchor\n" " \"nullifiers\" : [ (json array of string)\n" " \"hex\" (string) input note nullifier\n" @@ -585,8 +585,8 @@ UniValue decoderawtransaction(const UniValue& params, bool fHelp) " ],\n" " \"vjoinsplit\" : [ (array of json objects, only for version >= 2)\n" " {\n" - " \"vpub_old\" : x.xxx, (numeric) public input value in ZEC\n" - " \"vpub_new\" : x.xxx, (numeric) public output value in ZEC\n" + " \"vpub_old\" : x.xxx, (numeric) public input value in KMD\n" + " \"vpub_new\" : x.xxx, (numeric) public output value in KMD\n" " \"anchor\" : \"hex\", (string) the anchor\n" " \"nullifiers\" : [ (json array of string)\n" " \"hex\" (string) input note nullifier\n" diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index ccf4fc34a..3179e2e9e 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2508,7 +2508,7 @@ UniValue getwalletinfo(const UniValue& params, bool fHelp) " \"keypoololdest\": xxxxxx, (numeric) the timestamp (seconds since GMT epoch) of the oldest pre-generated key in the key pool\n" " \"keypoolsize\": xxxx, (numeric) how many new keys are pre-generated\n" " \"unlocked_until\": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked\n" - " \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in ZEC/KB\n" + " \"paytxfee\": x.xxxx, (numeric) the transaction fee configuration, set in KMD/KB\n" "}\n" "\nExamples:\n" + HelpExampleCli("getwalletinfo", "") @@ -3380,7 +3380,7 @@ UniValue z_getbalance(const UniValue& params, bool fHelp) "1. \"address\" (string) The selected address. It may be a transparent or private address.\n" "2. minconf (numeric, optional, default=1) Only include transactions confirmed at least this many times.\n" "\nResult:\n" - "amount (numeric) The total amount in ZEC received for this address.\n" + "amount (numeric) The total amount in KMD received for this address.\n" "\nExamples:\n" "\nThe total amount received by address \"myaddress\"\n" + HelpExampleCli("z_getbalance", "\"myaddress\"") + @@ -3607,7 +3607,7 @@ UniValue z_sendmany(const UniValue& params, bool fHelp) "2. \"amounts\" (array, required) An array of json objects representing the amounts to send.\n" " [{\n" " \"address\":address (string, required) The address is a taddr or zaddr\n" - " \"amount\":amount (numeric, required) The numeric amount in ZEC is the value\n" + " \"amount\":amount (numeric, required) The numeric amount in KMD is the value\n" " \"memo\":memo (string, optional) If the address is a zaddr, raw data represented in hexadecimal string format\n" " }, ... ]\n" "3. minconf (numeric, optional, default=1) Only use funds confirmed at least this many times.\n" From e78e9fa3e39a554f86500141be42c1ec2533e7b1 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 4 Mar 2018 04:33:53 +0000 Subject: [PATCH 09/18] Update manpages script for komodo --- contrib/devtools/gen-manpages.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/contrib/devtools/gen-manpages.sh b/contrib/devtools/gen-manpages.sh index 245714814..b604a4c28 100755 --- a/contrib/devtools/gen-manpages.sh +++ b/contrib/devtools/gen-manpages.sh @@ -4,25 +4,25 @@ TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} SRCDIR=${SRCDIR:-$TOPDIR/src} MANDIR=${MANDIR:-$TOPDIR/doc/man} -ZCASHD=${ZCASHD:-$SRCDIR/zcashd} -ZCASHCLI=${ZCASHCLI:-$SRCDIR/zcash-cli} -ZCASHTX=${ZCASHTX:-$SRCDIR/zcash-tx} +KOMODOD=${KOMODOD:-$SRCDIR/komodod} +KOMODOCLI=${KOMODOCLI:-$SRCDIR/komodo-cli} +KOMODOTX=${KOMODOTX:-$SRCDIR/komodo-tx} -[ ! -x $ZCASHD ] && echo "$ZCASHD not found or not executable." && exit 1 +[ ! -x $KOMODOD ] && echo "$KOMODOD not found or not executable." && exit 1 # The autodetected version git tag can screw up manpage output a little bit -ZECVER=($($ZCASHCLI --version | head -n1 | awk -F'[ -]' '{ print $5, $6 }')) +KMDVER=($($KOMODOCLI --version | head -n1 | awk -F'[ -]' '{ print $5, $6 }')) # Create a footer file with copyright content. -# This gets autodetected fine for zcashd if --version-string is not set, -# but has different outcomes for zcash-cli. +# This gets autodetected fine for komodod if --version-string is not set, +# but has different outcomes for komodo-cli. echo "[COPYRIGHT]" > footer.h2m -$ZCASHD --version | sed -n '1!p' >> footer.h2m +$KOMODOD --version | sed -n '1!p' >> footer.h2m -for cmd in $ZCASHD $ZCASHCLI $ZCASHTX; do +for cmd in $KOMODOD $KOMODOCLI $KOMODOTX; do cmdname="${cmd##*/}" - help2man -N --version-string=${ZECVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd} - sed -i "s/\\\-${ZECVER[1]}//g" ${MANDIR}/${cmdname}.1 + help2man -N --version-string=${KMDVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd} + sed -i "s/\\\-${KMDVER[1]}//g" ${MANDIR}/${cmdname}.1 done rm -f footer.h2m From b65ba237f20aa95602652865f19d28d918f3d98c Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 4 Mar 2018 04:35:06 +0000 Subject: [PATCH 10/18] Update kmd man pages with bash contrib/devtools/gen-manpages.sh --- doc/man/komodo-cli.1 | 84 ++++++++ doc/man/komodo-tx.1 | 102 ++++++++++ doc/man/komodod.1 | 472 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 658 insertions(+) create mode 100644 doc/man/komodo-cli.1 create mode 100644 doc/man/komodo-tx.1 create mode 100644 doc/man/komodod.1 diff --git a/doc/man/komodo-cli.1 b/doc/man/komodo-cli.1 new file mode 100644 index 000000000..b7fdd19d6 --- /dev/null +++ b/doc/man/komodo-cli.1 @@ -0,0 +1,84 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. +.TH KOMODO-CLI "1" "March 2018" "komodo-cli v1.0.8" "User Commands" +.SH NAME +komodo-cli \- manual page for komodo-cli v1.0.8 +.SH DESCRIPTION +Komodo RPC client version v1.0.8 +.PP +In order to ensure you are adequately protecting your privacy when using Zcash, +please see . +.SS "Usage:" +.TP +komodo\-cli [options] [params] +Send command to Komodo +.TP +komodo\-cli [options] help +List commands +.TP +komodo\-cli [options] help +Get help for a command +.SH OPTIONS +.HP +\-? +.IP +This help message +.HP +\fB\-conf=\fR +.IP +Specify configuration file (default: komodo.conf) +.HP +\fB\-datadir=\fR +.IP +Specify data directory +.HP +\fB\-testnet\fR +.IP +Use the test network +.HP +\fB\-regtest\fR +.IP +Enter regression test mode, which uses a special chain in which blocks +can be solved instantly. This is intended for regression testing tools +and app development. +.HP +\fB\-rpcconnect=\fR +.IP +Send commands to node running on (default: 127.0.0.1) +.HP +\fB\-rpcport=\fR +.IP +Connect to JSON\-RPC on (default: 8232 or testnet: 18232) +.HP +\fB\-rpcwait\fR +.IP +Wait for RPC server to start +.HP +\fB\-rpcuser=\fR +.IP +Username for JSON\-RPC connections +.HP +\fB\-rpcpassword=\fR +.IP +Password for JSON\-RPC connections +.HP +\fB\-rpcclienttimeout=\fR +.IP +Timeout in seconds during HTTP requests, or 0 for no timeout. (default: +900) +.SH COPYRIGHT + +In order to ensure you are adequately protecting your privacy when using Zcash, +please see . + +Copyright (C) 2009-2017 The Bitcoin Core Developers +Copyright (C) 2015-2017 The Zcash Developers +Copyright (C) 2015-2017 jl777 and SuperNET developers + +This is experimental software. + +Distributed under the MIT software license, see the accompanying file COPYING +or . + +This product includes software developed by the OpenSSL Project for use in the +OpenSSL Toolkit and cryptographic software written +by Eric Young and UPnP software written by Thomas Bernard. diff --git a/doc/man/komodo-tx.1 b/doc/man/komodo-tx.1 new file mode 100644 index 000000000..16f4e9a8d --- /dev/null +++ b/doc/man/komodo-tx.1 @@ -0,0 +1,102 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. +.TH KOMODO-TX "1" "March 2018" "komodo-tx v1.0.8" "User Commands" +.SH NAME +komodo-tx \- manual page for komodo-tx v1.0.8 +.SH DESCRIPTION +Zcash zcash\-tx utility version v1.0.8 +.SS "Usage:" +.TP +zcash\-tx [options] [commands] +Update hex\-encoded zcash transaction +.TP +zcash\-tx [options] \fB\-create\fR [commands] +Create hex\-encoded zcash transaction +.SH OPTIONS +.HP +\-? +.IP +This help message +.HP +\fB\-create\fR +.IP +Create new, empty TX. +.HP +\fB\-json\fR +.IP +Select JSON output +.HP +\fB\-txid\fR +.IP +Output only the hex\-encoded transaction id of the resultant transaction. +.HP +\fB\-regtest\fR +.IP +Enter regression test mode, which uses a special chain in which blocks +can be solved instantly. +.HP +\fB\-testnet\fR +.IP +Use the test network +.PP +Commands: +.IP +delin=N +.IP +Delete input N from TX +.IP +delout=N +.IP +Delete output N from TX +.IP +in=TXID:VOUT +.IP +Add input to TX +.IP +locktime=N +.IP +Set TX lock time to N +.IP +nversion=N +.IP +Set TX version to N +.IP +outaddr=VALUE:ADDRESS +.IP +Add address\-based output to TX +.IP +outscript=VALUE:SCRIPT +.IP +Add raw script output to TX +.IP +sign=SIGHASH\-FLAGS +.IP +Add zero or more signatures to transaction. This command requires JSON +registers:prevtxs=JSON object, privatekeys=JSON object. See +signrawtransaction docs for format of sighash flags, JSON objects. +.PP +Register Commands: +.IP +load=NAME:FILENAME +.IP +Load JSON file FILENAME into register NAME +.IP +set=NAME:JSON\-STRING +.IP +Set register NAME to given JSON\-STRING +.SH COPYRIGHT + +In order to ensure you are adequately protecting your privacy when using Zcash, +please see . + +Copyright (C) 2009-2017 The Bitcoin Core Developers +Copyright (C) 2015-2017 The Zcash Developers +Copyright (C) 2015-2017 jl777 and SuperNET developers + +This is experimental software. + +Distributed under the MIT software license, see the accompanying file COPYING +or . + +This product includes software developed by the OpenSSL Project for use in the +OpenSSL Toolkit and cryptographic software written +by Eric Young and UPnP software written by Thomas Bernard. diff --git a/doc/man/komodod.1 b/doc/man/komodod.1 new file mode 100644 index 000000000..f79cb74de --- /dev/null +++ b/doc/man/komodod.1 @@ -0,0 +1,472 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.3. +.TH KOMODOD "1" "March 2018" "komodod v1.0.8" "User Commands" +.SH NAME +komodod \- manual page for komodod v1.0.8 +.SH DESCRIPTION +Komodo Daemon version v1.0.8 +.PP +In order to ensure you are adequately protecting your privacy when using Zcash, +please see . +.SS "Usage:" +.TP +komodod [options] +Start Komodo Daemon +.SH OPTIONS +.HP +\-? +.IP +This help message +.HP +\fB\-alerts\fR +.IP +Receive and display P2P network alerts (default: 1) +.HP +\fB\-alertnotify=\fR +.IP +Execute command when a relevant alert is received or we see a really +long fork (%s in cmd is replaced by message) +.HP +\fB\-blocknotify=\fR +.IP +Execute command when the best block changes (%s in cmd is replaced by +block hash) +.HP +\fB\-checkblocks=\fR +.IP +How many blocks to check at startup (default: 288, 0 = all) +.HP +\fB\-checklevel=\fR +.IP +How thorough the block verification of \fB\-checkblocks\fR is (0\-4, default: 3) +.HP +\fB\-conf=\fR +.IP +Specify configuration file (default: komodo.conf) +.HP +\fB\-daemon\fR +.IP +Run in the background as a daemon and accept commands +.HP +\fB\-datadir=\fR +.IP +Specify data directory +.HP +\fB\-exportdir=\fR +.IP +Specify directory to be used when exporting data +.HP +\fB\-dbcache=\fR +.IP +Set database cache size in megabytes (4 to 16384, default: 100) +.HP +\fB\-loadblock=\fR +.IP +Imports blocks from external blk000??.dat file on startup +.HP +\fB\-maxorphantx=\fR +.IP +Keep at most unconnectable transactions in memory (default: 100) +.HP +\fB\-par=\fR +.IP +Set the number of script verification threads (\fB\-2\fR to 16, 0 = auto, <0 = +leave that many cores free, default: 0) +.HP +\fB\-pid=\fR +.IP +Specify pid file (default: komodod.pid) +.HP +\fB\-prune=\fR +.IP +Reduce storage requirements by pruning (deleting) old blocks. This mode +disables wallet support and is incompatible with \fB\-txindex\fR. Warning: +Reverting this setting requires re\-downloading the entire blockchain. +(default: 0 = disable pruning blocks, >550 = target size in MiB to use +for block files) +.HP +\fB\-reindex\fR +.IP +Rebuild block chain index from current blk000??.dat files on startup +.HP +\fB\-sysperms\fR +.IP +Create new files with system default permissions, instead of umask 077 +(only effective with disabled wallet functionality) +.HP +\fB\-txindex\fR +.IP +Maintain a full transaction index, used by the getrawtransaction rpc +call (default: 0) +.PP +Connection options: +.HP +\fB\-addnode=\fR +.IP +Add a node to connect to and attempt to keep the connection open +.HP +\fB\-banscore=\fR +.IP +Threshold for disconnecting misbehaving peers (default: 100) +.HP +\fB\-bantime=\fR +.IP +Number of seconds to keep misbehaving peers from reconnecting (default: +86400) +.HP +\fB\-bind=\fR +.IP +Bind to given address and always listen on it. Use [host]:port notation +for IPv6 +.HP +\fB\-connect=\fR +.IP +Connect only to the specified node(s) +.HP +\fB\-discover\fR +.IP +Discover own IP addresses (default: 1 when listening and no \fB\-externalip\fR +or \fB\-proxy\fR) +.HP +\fB\-dns\fR +.IP +Allow DNS lookups for \fB\-addnode\fR, \fB\-seednode\fR and \fB\-connect\fR (default: 1) +.HP +\fB\-dnsseed\fR +.IP +Query for peer addresses via DNS lookup, if low on addresses (default: 1 +unless \fB\-connect\fR) +.HP +\fB\-externalip=\fR +.IP +Specify your own public address +.HP +\fB\-forcednsseed\fR +.IP +Always query for peer addresses via DNS lookup (default: 0) +.HP +\fB\-listen\fR +.IP +Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\fR) +.HP +\fB\-listenonion\fR +.IP +Automatically create Tor hidden service (default: 1) +.HP +\fB\-maxconnections=\fR +.IP +Maintain at most connections to peers (default: 125) +.HP +\fB\-maxreceivebuffer=\fR +.IP +Maximum per\-connection receive buffer, *1000 bytes (default: 5000) +.HP +\fB\-maxsendbuffer=\fR +.IP +Maximum per\-connection send buffer, *1000 bytes (default: 1000) +.HP +\fB\-onion=\fR +.IP +Use separate SOCKS5 proxy to reach peers via Tor hidden services +(default: \fB\-proxy\fR) +.HP +\fB\-onlynet=\fR +.IP +Only connect to nodes in network (ipv4, ipv6 or onion) +.HP +\fB\-permitbaremultisig\fR +.IP +Relay non\-P2SH multisig (default: 1) +.HP +\fB\-port=\fR +.IP +Listen for connections on (default: 8233 or testnet: 18233) +.HP +\fB\-proxy=\fR +.IP +Connect through SOCKS5 proxy +.HP +\fB\-proxyrandomize\fR +.IP +Randomize credentials for every proxy connection. This enables Tor +stream isolation (default: 1) +.HP +\fB\-seednode=\fR +.IP +Connect to a node to retrieve peer addresses, and disconnect +.HP +\fB\-timeout=\fR +.IP +Specify connection timeout in milliseconds (minimum: 1, default: 5000) +.HP +\fB\-torcontrol=\fR: +.IP +Tor control port to use if onion listening enabled (default: +127.0.0.1:9051) +.HP +\fB\-torpassword=\fR +.IP +Tor control port password (default: empty) +.HP +\fB\-upnp\fR +.IP +Use UPnP to map the listening port (default: 0) +.HP +\fB\-whitebind=\fR +.IP +Bind to given address and whitelist peers connecting to it. Use +[host]:port notation for IPv6 +.HP +\fB\-whitelist=\fR +.IP +Whitelist peers connecting from the given netmask or IP address. Can be +specified multiple times. Whitelisted peers cannot be DoS banned and +their transactions are always relayed, even if they are already in the +mempool, useful e.g. for a gateway +.PP +Wallet options: +.HP +\fB\-disablewallet\fR +.IP +Do not load the wallet and disable wallet RPC calls +.HP +\fB\-keypool=\fR +.IP +Set key pool size to (default: 100) +.HP +\fB\-paytxfee=\fR +.IP +Fee (in BTC/kB) to add to transactions you send (default: 0.00) +.HP +\fB\-rescan\fR +.IP +Rescan the blockchain for missing wallet transactions on startup +.HP +\fB\-salvagewallet\fR +.IP +Attempt to recover private keys from a corrupt wallet.dat on startup +.HP +\fB\-sendfreetransactions\fR +.IP +Send transactions as zero\-fee transactions if possible (default: 0) +.HP +\fB\-spendzeroconfchange\fR +.IP +Spend unconfirmed change when sending transactions (default: 1) +.HP +\fB\-txconfirmtarget=\fR +.IP +If paytxfee is not set, include enough fee so transactions begin +confirmation on average within n blocks (default: 2) +.HP +\fB\-maxtxfee=\fR +.IP +Maximum total fees to use in a single wallet transaction; setting this +too low may abort large transactions (default: 0.10) +.HP +\fB\-upgradewallet\fR +.IP +Upgrade wallet to latest format on startup +.HP +\fB\-wallet=\fR +.IP +Specify wallet file (within data directory) (default: wallet.dat) +.HP +\fB\-walletbroadcast\fR +.IP +Make the wallet broadcast transactions (default: 1) +.HP +\fB\-walletnotify=\fR +.IP +Execute command when a wallet transaction changes (%s in cmd is replaced +by TxID) +.HP +\fB\-zapwallettxes=\fR +.IP +Delete all wallet transactions and only recover those parts of the +blockchain through \fB\-rescan\fR on startup (1 = keep tx meta data e.g. +account owner and payment request information, 2 = drop tx meta data) +.PP +ZeroMQ notification options: +.HP +\fB\-zmqpubhashblock=\fR
+.IP +Enable publish hash block in
+.HP +\fB\-zmqpubhashtx=\fR
+.IP +Enable publish hash transaction in
+.HP +\fB\-zmqpubrawblock=\fR
+.IP +Enable publish raw block in
+.HP +\fB\-zmqpubrawtx=\fR
+.IP +Enable publish raw transaction in
+.PP +Debugging/Testing options: +.HP +\fB\-debug=\fR +.IP +Output debugging information (default: 0, supplying is +optional). If is not supplied or if = 1, output +all debugging information. can be: addrman, alert, bench, +coindb, db, estimatefee, http, libevent, lock, mempool, net, +partitioncheck, pow, proxy, prune, rand, reindex, rpc, selectcoins, tor, +zmq, zrpc, zrpcunsafe (implies zrpc). +.HP +\fB\-experimentalfeatures\fR +.IP +Enable use of experimental features +.HP +\fB\-help\-debug\fR +.IP +Show all debugging options (usage: \fB\-\-help\fR \fB\-help\-debug\fR) +.HP +\fB\-logips\fR +.IP +Include IP addresses in debug output (default: 0) +.HP +\fB\-logtimestamps\fR +.IP +Prepend debug output with timestamp (default: 1) +.HP +\fB\-minrelaytxfee=\fR +.IP +Fees (in BTC/Kb) smaller than this are considered zero fee for relaying +(default: 0.000001) +.HP +\fB\-printtoconsole\fR +.IP +Send trace/debug info to console instead of debug.log file +.HP +\fB\-shrinkdebugfile\fR +.IP +Shrink debug.log file on client startup (default: 1 when no \fB\-debug\fR) +.HP +\fB\-testnet\fR +.IP +Use the test network +.PP +Node relay options: +.HP +\fB\-datacarrier\fR +.IP +Relay and mine data carrier transactions (default: 1) +.HP +\fB\-datacarriersize\fR +.IP +Maximum size of data in data carrier transactions we relay and mine +(default: 8192) +.PP +Block creation options: +.HP +\fB\-blockminsize=\fR +.IP +Set minimum block size in bytes (default: 0) +.HP +\fB\-blockmaxsize=\fR +.IP +Set maximum block size in bytes (default: 2000000) +.HP +\fB\-blockprioritysize=\fR +.IP +Set maximum size of high\-priority/low\-fee transactions in bytes +(default: 1000000) +.PP +Mining options: +.HP +\fB\-gen\fR +.IP +Generate coins (default: 0) +.HP +\fB\-genproclimit=\fR +.IP +Set the number of threads for coin generation if enabled (\fB\-1\fR = all +cores, default: 1) +.HP +\fB\-equihashsolver=\fR +.IP +Specify the Equihash solver to be used if enabled (default: "default") +.HP +\fB\-mineraddress=\fR +.IP +Send mined coins to a specific single address +.HP +\fB\-minetolocalwallet\fR +.IP +Require that mined blocks use a coinbase address in the local wallet +(default: 1) +.PP +RPC server options: +.HP +\fB\-server\fR +.IP +Accept command line and JSON\-RPC commands +.HP +\fB\-rest\fR +.IP +Accept public REST requests (default: 0) +.HP +\fB\-rpcbind=\fR +.IP +Bind to given address to listen for JSON\-RPC connections. Use +[host]:port notation for IPv6. This option can be specified multiple +times (default: bind to all interfaces) +.HP +\fB\-rpcuser=\fR +.IP +Username for JSON\-RPC connections +.HP +\fB\-rpcpassword=\fR +.IP +Password for JSON\-RPC connections +.HP +\fB\-rpcport=\fR +.IP +Listen for JSON\-RPC connections on (default: 8232 or testnet: +18232) +.HP +\fB\-rpcallowip=\fR +.IP +Allow JSON\-RPC connections from specified source. Valid for are a +single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) +or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified +multiple times +.HP +\fB\-rpcthreads=\fR +.IP +Set the number of threads to service RPC calls (default: 4) +.PP +Metrics Options (only if \fB\-daemon\fR and \fB\-printtoconsole\fR are not set): +.HP +\fB\-showmetrics\fR +.IP +Show metrics on stdout (default: 1 if running in a console, 0 otherwise) +.HP +\fB\-metricsui\fR +.IP +Set to 1 for a persistent metrics screen, 0 for sequential metrics +output (default: 1 if running in a console, 0 otherwise) +.HP +\fB\-metricsrefreshtime\fR +.IP +Number of seconds between metrics refreshes (default: 1 if running in a +console, 600 otherwise) +.SH COPYRIGHT + +In order to ensure you are adequately protecting your privacy when using Zcash, +please see . + +Copyright (C) 2009-2017 The Bitcoin Core Developers +Copyright (C) 2015-2017 The Zcash Developers +Copyright (C) 2015-2017 jl777 and SuperNET developers + +This is experimental software. + +Distributed under the MIT software license, see the accompanying file COPYING +or . + +This product includes software developed by the OpenSSL Project for use in the +OpenSSL Toolkit and cryptographic software written +by Eric Young and UPnP software written by Thomas Bernard. From 1799af96040cc047b788d5b835bed437e28f600d Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 3 Mar 2018 20:43:14 -0800 Subject: [PATCH 11/18] Fix KMD ports in help output --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index fe10401a8..1a0657eab 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -365,7 +365,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-onion=", strprintf(_("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)"), "-proxy")); strUsage += HelpMessageOpt("-onlynet=", _("Only connect to nodes in network (ipv4, ipv6 or onion)")); strUsage += HelpMessageOpt("-permitbaremultisig", strprintf(_("Relay non-P2SH multisig (default: %u)"), 1)); - strUsage += HelpMessageOpt("-port=", strprintf(_("Listen for connections on (default: %u or testnet: %u)"), 8233, 18233)); + strUsage += HelpMessageOpt("-port=", strprintf(_("Listen for connections on (default: %u or testnet: %u)"), 7770, 17770)); strUsage += HelpMessageOpt("-proxy=", _("Connect through SOCKS5 proxy")); strUsage += HelpMessageOpt("-proxyrandomize", strprintf(_("Randomize credentials for every proxy connection. This enables Tor stream isolation (default: %u)"), 1)); strUsage += HelpMessageOpt("-seednode=", _("Connect to a node to retrieve peer addresses, and disconnect")); From c2b69c7203a668b5e698ad8c715a5be8cf8d4ccc Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 3 Mar 2018 20:47:29 -0800 Subject: [PATCH 12/18] Update tor docs some more --- doc/tor.md | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/doc/tor.md b/doc/tor.md index 0608eb56d..10768ed5b 100644 --- a/doc/tor.md +++ b/doc/tor.md @@ -1,18 +1,18 @@ -*** Warning: Do not assume Tor support does the correct thing in Zcash; better Tor support is a future feature goal. *** +*** Warning: Do not assume Tor support does the correct thing in Komodo; better Tor support is a future feature goal. *** TOR SUPPORT IN ZCASH ==================== -It is possible to run Zcash as a Tor hidden service, and connect to such services. +It is possible to run Komodo as a Tor hidden service, and connect to such services. The following directions assume you have a Tor proxy running on port 9050. Many distributions default to having a SOCKS proxy listening on port 9050, but others may not. In particular, the Tor Browser Bundle defaults to listening on port 9150. See [Tor Project FAQ:TBBSocksPort](https://www.torproject.org/docs/faq.html.en#TBBSocksPort) for how to properly configure Tor. -1. Run Zcash behind a Tor proxy +1. Run Komodo behind a Tor proxy ------------------------------- -The first step is running Zcash behind a Tor proxy. This will already make all +The first step is running Komodo behind a Tor proxy. This will already make all outgoing connections be anonymized, but more is possible. -proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy @@ -36,7 +36,7 @@ In a typical situation, this suffices to run behind a Tor proxy: ./komodod -proxy=127.0.0.1:9050 -2. Run a Zcash hidden server +2. Run a Komodo hidden server ---------------------------- If you configure your Tor system accordingly, it is possible to make your node also @@ -44,13 +44,13 @@ reachable from the Tor network. Add these lines to your /etc/tor/torrc (or equiv config file): HiddenServiceDir /var/lib/tor/zcash-service/ - HiddenServicePort 8233 127.0.0.1:8233 - HiddenServicePort 18233 127.0.0.1:18233 + HiddenServicePort 7771 127.0.0.1:7771 + HiddenServicePort 17771 127.0.0.1:17771 The directory can be different of course, but (both) port numbers should be equal to -your komodod's P2P listen port (8233 by default). +your komodod's P2P listen port (7771 by default). - -externalip=X You can tell Zcash about its publicly reachable address using + -externalip=X You can tell Komodo about its publicly reachable address using this option, and this can be a .onion address. Given the above configuration, you can find your onion address in /var/lib/tor/zcash-service/hostname. Onion addresses are given @@ -83,7 +83,7 @@ as well, use `discover` instead: ./komodod ... -discover -and open port 8233 on your firewall (or use -upnp). +and open port 7771 on your firewall (or use -upnp). If you only want to use Tor to reach onion addresses, but not use it as a proxy for normal IPv4/IPv6 communication, use: @@ -96,15 +96,15 @@ for normal IPv4/IPv6 communication, use: Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket API, to create and destroy 'ephemeral' hidden services programmatically. -Zcash has been updated to make use of this. +Komodo has been updated to make use of this. This means that if Tor is running (and proper authentication has been configured), -Zcash automatically creates a hidden service to listen on. Zcash will also use Tor +Komodo automatically creates a hidden service to listen on. Komodo will also use Tor automatically to connect to other .onion nodes if the control socket can be successfully opened. This will positively affect the number of available .onion nodes and their usage. -This new feature is enabled by default if Zcash is listening (`-listen`), and +This new feature is enabled by default if Komodo is listening (`-listen`), and requires a Tor connection to work. It can be explicitly disabled with `-listenonion=0` and, if not disabled, configured using the `-torcontrol` and `-torpassword` settings. To show verbose debugging information, pass `-debug=tor`. @@ -121,22 +121,22 @@ of the `-torpassword` flag and a `hash-password` which can be enabled and specif Tor configuration. -4. Connect to a Zcash hidden server +4. Connect to a Komodo hidden server ----------------------------------- To test your set-up, you might want to try connecting via Tor on a different computer to just a -a single Zcash hidden server. Launch komodod as follows: +a single Komodo hidden server. Launch komodod as follows: ./komodod -onion=127.0.0.1:9050 -connect=zctestseie6wxgio.onion -Now use zcash-cli to verify there is only a single peer connection. +Now use komodo-cli to verify there is only a single peer connection. - zcash-cli getpeerinfo + komodo-cli getpeerinfo [ { "id" : 1, - "addr" : "zctestseie6wxgio.onion:18233", + "addr" : "zctestseie6wxgio.onion:17770", ... "version" : 170002, "subver" : "/MagicBean:1.0.0/", From 1785f62bbbe360362199df93449f897593e41c39 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 3 Mar 2018 20:51:46 -0800 Subject: [PATCH 13/18] Fix rpc help ports --- src/init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/init.cpp b/src/init.cpp index 1a0657eab..c6a0248c6 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -485,7 +485,7 @@ std::string HelpMessage(HelpMessageMode mode) strUsage += HelpMessageOpt("-rpcbind=", _("Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. This option can be specified multiple times (default: bind to all interfaces)")); strUsage += HelpMessageOpt("-rpcuser=", _("Username for JSON-RPC connections")); strUsage += HelpMessageOpt("-rpcpassword=", _("Password for JSON-RPC connections")); - strUsage += HelpMessageOpt("-rpcport=", strprintf(_("Listen for JSON-RPC connections on (default: %u or testnet: %u)"), 8232, 18232)); + strUsage += HelpMessageOpt("-rpcport=", strprintf(_("Listen for JSON-RPC connections on (default: %u or testnet: %u)"), 7771, 17771)); strUsage += HelpMessageOpt("-rpcallowip=", _("Allow JSON-RPC connections from specified source. Valid for are a single IP (e.g. 1.2.3.4), a network/netmask (e.g. 1.2.3.4/255.255.255.0) or a network/CIDR (e.g. 1.2.3.4/24). This option can be specified multiple times")); strUsage += HelpMessageOpt("-rpcthreads=", strprintf(_("Set the number of threads to service RPC calls (default: %d)"), DEFAULT_HTTP_THREADS)); if (showDebug) { From 70df47b78bffaba86102c59283513a9af3782588 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Sun, 4 Mar 2018 06:43:17 +0000 Subject: [PATCH 14/18] Correct ports in manpages --- doc/man/komodod.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/man/komodod.1 b/doc/man/komodod.1 index f79cb74de..4c728657d 100644 --- a/doc/man/komodod.1 +++ b/doc/man/komodod.1 @@ -179,7 +179,7 @@ Relay non\-P2SH multisig (default: 1) .HP \fB\-port=\fR .IP -Listen for connections on (default: 8233 or testnet: 18233) +Listen for connections on (default: 7770 or testnet: 17770) .HP \fB\-proxy=\fR .IP @@ -424,8 +424,8 @@ Password for JSON\-RPC connections .HP \fB\-rpcport=\fR .IP -Listen for JSON\-RPC connections on (default: 8232 or testnet: -18232) +Listen for JSON\-RPC connections on (default: 7771 or testnet: +17771) .HP \fB\-rpcallowip=\fR .IP From 14a73f038879b4dfe6024ba64b853f76ba1e45e4 Mon Sep 17 00:00:00 2001 From: Mihail Fedorov Date: Thu, 8 Mar 2018 19:00:32 +0300 Subject: [PATCH 15/18] OOT coin --- src/assetchains | 1 + src/assetchains.old | 7 ++++--- src/dpowassets | 1 + src/fiat-cli | 1 + src/fiat/oot | 2 ++ 5 files changed, 9 insertions(+), 3 deletions(-) create mode 100755 src/fiat/oot diff --git a/src/assetchains b/src/assetchains index ba5dcca18..d6e60be12 100755 --- a/src/assetchains +++ b/src/assetchains @@ -51,3 +51,4 @@ komodo_asset VOTE2018 600000000 komodo_asset PIZZA 100000000 komodo_asset BEER 100000000 komodo_asset NINJA 100000000 +komodo_asset OOT 216000000 diff --git a/src/assetchains.old b/src/assetchains.old index 030a69ebf..94c0c8e6e 100755 --- a/src/assetchains.old +++ b/src/assetchains.old @@ -25,9 +25,10 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=ETOMIC -ac_supply=100000000 -addnode=78.47.196.146 & ./komodod -pubkey=$pubkey -ac_name=BTCH -ac_supply=20998641 -addnode=78.47.196.146 & ./komodod -pubkey=$pubkey -ac_name=VOTE2018 -ac_supply=600000000 -addnode=78.47.196.146 & -./komodod -pubkey=$pubkey -ac_name=BEER -ac_supply=100000000 -addnode=24.54.206.138 & -./komodod -pubkey=$pubkey -ac_name=PIZZA -ac_supply=100000000 -addnode=24.54.206.138 & -./komodod -pubkey=$pubkey -ac_name=NINJA -ac_supply=100000000 -addnode=192.241.134.19 & +./komodod -pubkey=$pubkey -ac_name=BEER -ac_supply=100000000 -addnode=78.47.196.146 & +./komodod -pubkey=$pubkey -ac_name=PIZZA -ac_supply=100000000 -addnode=78.47.196.146 & +./komodod -pubkey=$pubkey -ac_name=NINJA -ac_supply=100000000 -addnode=78.47.196.146 & +./komodod -pubkey=$pubkey -ac_name=OOT -ac_supply=216000000-addnode=174.138.107.226 & #sleep $delay #./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 & diff --git a/src/dpowassets b/src/dpowassets index 4a75bbce7..d2f0006ff 100755 --- a/src/dpowassets +++ b/src/dpowassets @@ -29,6 +29,7 @@ curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dp #curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHAIN\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"VOTE2018\",\"pubkey\":\"$pubkey\"}" curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"NINJA\",\"pubkey\":\"$pubkey\"}" +curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"OOT\",\"pubkey\":\"$pubkey\"}" #curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"USD\",\"pubkey\":\"$pubkey\"}" #curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"EUR\",\"pubkey\":\"$pubkey\"}" diff --git a/src/fiat-cli b/src/fiat-cli index 9e50deda7..89f82c632 100755 --- a/src/fiat-cli +++ b/src/fiat-cli @@ -24,3 +24,4 @@ echo pizza; fiat/pizza $1 $2 $3 $4 echo beer; fiat/beer $1 $2 $3 $4 echo vote2018; fiat/vote2018 $1 $2 $3 $4 echo ninja; fiat/ninja $1 $2 $3 $4 +echo oot; fiat/oot $1 $2 $3 $4 diff --git a/src/fiat/oot b/src/fiat/oot new file mode 100755 index 000000000..4c7c6b683 --- /dev/null +++ b/src/fiat/oot @@ -0,0 +1,2 @@ +#!/bin/bash +./komodo-cli -ac_name=OOT $1 $2 $3 $4 $5 $6 From 1d7748b19055d663d7ba46b2d25be81c681e02f0 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 24 Mar 2018 08:32:25 -0700 Subject: [PATCH 16/18] Port bash completion from ZEC 4d6498b900 --- ...h-completion => komodo-cli.bash-completion | 43 +++++++++++-------- ...sh-completion => komodo-tx.bash-completion | 18 ++++---- ...bash-completion => komodod.bash-completion | 18 ++++---- 3 files changed, 42 insertions(+), 37 deletions(-) rename contrib/bitcoin-cli.bash-completion => komodo-cli.bash-completion (80%) rename contrib/bitcoin-tx.bash-completion => komodo-tx.bash-completion (74%) rename contrib/bitcoind.bash-completion => komodod.bash-completion (77%) diff --git a/contrib/bitcoin-cli.bash-completion b/komodo-cli.bash-completion similarity index 80% rename from contrib/bitcoin-cli.bash-completion rename to komodo-cli.bash-completion index f2a44d232..c1a9930ef 100644 --- a/contrib/bitcoin-cli.bash-completion +++ b/komodo-cli.bash-completion @@ -1,10 +1,10 @@ -# bash programmable completion for bitcoin-cli(1) +# bash programmable completion for komodo-cli(1) # Copyright (c) 2012-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -# call $bitcoin-cli for RPC -_zcash_rpc() { +# call $komodo-cli for RPC +_komodo_rpc() { # determine already specified args necessary for RPC local rpcargs=() for i in ${COMP_LINE}; do @@ -14,25 +14,25 @@ _zcash_rpc() { ;; esac done - $bitcoin_cli "${rpcargs[@]}" "$@" + $komodo_cli "${rpcargs[@]}" "$@" } # Add wallet accounts to COMPREPLY -_zcash_accounts() { +_komodo_accounts() { local accounts - # Accounts are deprecated in Zcash - #accounts=$(_zcash_rpc listaccounts | awk -F '"' '{ print $2 }') + # Accounts are deprecated in komodo + #accounts=$(_komodo_rpc listaccounts | awk -F '"' '{ print $2 }') accounts="\\\"\\\"" COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) ) } -_zcash_cli() { +_komodo_cli() { local cur prev words=() cword - local bitcoin_cli + local komodo_cli - # save and use original argument to invoke bitcoin-cli for -help, help and RPC - # as bitcoin-cli might not be in $PATH - bitcoin_cli="$1" + # save and use original argument to invoke komodo-cli for -help, help and RPC + # as komodo-cli might not be in $PATH + komodo_cli="$1" COMPREPLY=() _get_comp_words_by_ref -n = cur prev words cword @@ -62,7 +62,7 @@ _zcash_cli() { if ((cword > 3)); then case ${words[cword-3]} in addmultisigaddress) - _zcash_accounts + _komodo_accounts return 0 ;; getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock) @@ -82,12 +82,17 @@ _zcash_cli() { COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) ) return 0 ;; - fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction|z_importkey) + fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction) COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) return 0 ;; +# KMD does not have viewing keys, yet +# z_importkey|z_importviewingkey) +# COMPREPLY=( $( compgen -W "yes no whenkeyisnew" -- "$cur" ) ) +# return 0 +# ;; move|setaccount) - _zcash_accounts + _komodo_accounts return 0 ;; esac @@ -103,7 +108,7 @@ _zcash_cli() { return 0 ;; getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany) - _zcash_accounts + _komodo_accounts return 0 ;; esac @@ -127,12 +132,12 @@ _zcash_cli() { # only parse -help if senseful if [[ -z "$cur" || "$cur" =~ ^- ]]; then - helpopts=$($bitcoin_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) + helpopts=$($komodo_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) fi # only parse help if senseful if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then - commands=$(_zcash_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') + commands=$(_komodo_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') fi COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) ) @@ -145,7 +150,7 @@ _zcash_cli() { ;; esac } && -complete -F _zcash_cli zcash-cli +complete -F _komodo_cli komodo-cli # Local variables: # mode: shell-script diff --git a/contrib/bitcoin-tx.bash-completion b/komodo-tx.bash-completion similarity index 74% rename from contrib/bitcoin-tx.bash-completion rename to komodo-tx.bash-completion index 0206eba74..69e259381 100644 --- a/contrib/bitcoin-tx.bash-completion +++ b/komodo-tx.bash-completion @@ -1,15 +1,15 @@ -# bash programmable completion for bitcoin-tx(1) +# bash programmable completion for komodo-tx(1) # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -_bitcoin_tx() { +_komodo_tx() { local cur prev words=() cword - local bitcoin_tx + local komodo_tx - # save and use original argument to invoke bitcoin-tx for -help + # save and use original argument to invoke komodo-tx for -help # it might not be in $PATH - bitcoin_tx="$1" + komodo_tx="$1" COMPREPLY=() _get_comp_words_by_ref -n =: cur prev words cword @@ -27,15 +27,15 @@ _bitcoin_tx() { if [[ "$cword" == 1 || ( "$prev" != "-create" && "$prev" == -* ) ]]; then # only options (or an uncompletable hex-string) allowed - # parse bitcoin-tx -help for options + # parse komodo-tx -help for options local helpopts - helpopts=$($bitcoin_tx -help | sed -e '/^ -/ p' -e d ) + helpopts=$($komodo_tx -help | sed -e '/^ -/ p' -e d ) COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) ) else # only commands are allowed # parse -help for commands local helpcmds - helpcmds=$($bitcoin_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d ) + helpcmds=$($komodo_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d ) COMPREPLY=( $( compgen -W "$helpcmds" -- "$cur" ) ) fi @@ -46,7 +46,7 @@ _bitcoin_tx() { return 0 } && -complete -F _bitcoin_tx zcash-tx +complete -F _komodo_tx komodo-tx # Local variables: # mode: shell-script diff --git a/contrib/bitcoind.bash-completion b/komodod.bash-completion similarity index 77% rename from contrib/bitcoind.bash-completion rename to komodod.bash-completion index 104365024..4c1ec516f 100644 --- a/contrib/bitcoind.bash-completion +++ b/komodod.bash-completion @@ -1,16 +1,16 @@ -# bash programmable completion for zcashd(1) +# bash programmable completion for komodod(1) # Copyright (c) 2012-2017 The Bitcoin Core developers -# Copyright (c) 2016-2017 The Zcash developers +# Copyright (c) 2016-2017 The komodo developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -_zcashd() { +_komodod() { local cur prev words=() cword - local bitcoind + local komodod - # save and use original argument to invoke zcashd for -help + # save and use original argument to invoke komodod for -help # it might not be in $PATH - bitcoind="$1" + komodod="$1" COMPREPLY=() _get_comp_words_by_ref -n = cur prev words cword @@ -21,7 +21,7 @@ _zcashd() { _filedir return 0 ;; - -datadir=*) + -datadir=*|-exportdir=*) cur="${cur#*=}" _filedir -d return 0 @@ -34,7 +34,7 @@ _zcashd() { # only parse -help if senseful if [[ -z "$cur" || "$cur" =~ ^- ]]; then local helpopts - helpopts=$($bitcoind -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) + helpopts=$($komodod -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) ) fi @@ -46,7 +46,7 @@ _zcashd() { ;; esac } && -complete -F _zcashd zcashd +complete -F _komodod komodod # Local variables: # mode: shell-script From 87020d117aa07813567793fd6bb7ed08da8dba3a Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Sat, 24 Mar 2018 08:32:25 -0700 Subject: [PATCH 17/18] Port bash completion from ZEC 4d6498b900 --- ...-completion => komodo-cli.bash-completion} | 43 +++++++++++-------- ...h-completion => komodo-tx.bash-completion} | 18 ++++---- ...ash-completion => komodod.bash-completion} | 18 ++++---- 3 files changed, 42 insertions(+), 37 deletions(-) rename contrib/{bitcoin-cli.bash-completion => komodo-cli.bash-completion} (80%) rename contrib/{bitcoin-tx.bash-completion => komodo-tx.bash-completion} (74%) rename contrib/{bitcoind.bash-completion => komodod.bash-completion} (77%) diff --git a/contrib/bitcoin-cli.bash-completion b/contrib/komodo-cli.bash-completion similarity index 80% rename from contrib/bitcoin-cli.bash-completion rename to contrib/komodo-cli.bash-completion index f2a44d232..c1a9930ef 100644 --- a/contrib/bitcoin-cli.bash-completion +++ b/contrib/komodo-cli.bash-completion @@ -1,10 +1,10 @@ -# bash programmable completion for bitcoin-cli(1) +# bash programmable completion for komodo-cli(1) # Copyright (c) 2012-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -# call $bitcoin-cli for RPC -_zcash_rpc() { +# call $komodo-cli for RPC +_komodo_rpc() { # determine already specified args necessary for RPC local rpcargs=() for i in ${COMP_LINE}; do @@ -14,25 +14,25 @@ _zcash_rpc() { ;; esac done - $bitcoin_cli "${rpcargs[@]}" "$@" + $komodo_cli "${rpcargs[@]}" "$@" } # Add wallet accounts to COMPREPLY -_zcash_accounts() { +_komodo_accounts() { local accounts - # Accounts are deprecated in Zcash - #accounts=$(_zcash_rpc listaccounts | awk -F '"' '{ print $2 }') + # Accounts are deprecated in komodo + #accounts=$(_komodo_rpc listaccounts | awk -F '"' '{ print $2 }') accounts="\\\"\\\"" COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) ) } -_zcash_cli() { +_komodo_cli() { local cur prev words=() cword - local bitcoin_cli + local komodo_cli - # save and use original argument to invoke bitcoin-cli for -help, help and RPC - # as bitcoin-cli might not be in $PATH - bitcoin_cli="$1" + # save and use original argument to invoke komodo-cli for -help, help and RPC + # as komodo-cli might not be in $PATH + komodo_cli="$1" COMPREPLY=() _get_comp_words_by_ref -n = cur prev words cword @@ -62,7 +62,7 @@ _zcash_cli() { if ((cword > 3)); then case ${words[cword-3]} in addmultisigaddress) - _zcash_accounts + _komodo_accounts return 0 ;; getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock) @@ -82,12 +82,17 @@ _zcash_cli() { COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) ) return 0 ;; - fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction|z_importkey) + fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction) COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) return 0 ;; +# KMD does not have viewing keys, yet +# z_importkey|z_importviewingkey) +# COMPREPLY=( $( compgen -W "yes no whenkeyisnew" -- "$cur" ) ) +# return 0 +# ;; move|setaccount) - _zcash_accounts + _komodo_accounts return 0 ;; esac @@ -103,7 +108,7 @@ _zcash_cli() { return 0 ;; getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany) - _zcash_accounts + _komodo_accounts return 0 ;; esac @@ -127,12 +132,12 @@ _zcash_cli() { # only parse -help if senseful if [[ -z "$cur" || "$cur" =~ ^- ]]; then - helpopts=$($bitcoin_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) + helpopts=$($komodo_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) fi # only parse help if senseful if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then - commands=$(_zcash_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') + commands=$(_komodo_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') fi COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) ) @@ -145,7 +150,7 @@ _zcash_cli() { ;; esac } && -complete -F _zcash_cli zcash-cli +complete -F _komodo_cli komodo-cli # Local variables: # mode: shell-script diff --git a/contrib/bitcoin-tx.bash-completion b/contrib/komodo-tx.bash-completion similarity index 74% rename from contrib/bitcoin-tx.bash-completion rename to contrib/komodo-tx.bash-completion index 0206eba74..69e259381 100644 --- a/contrib/bitcoin-tx.bash-completion +++ b/contrib/komodo-tx.bash-completion @@ -1,15 +1,15 @@ -# bash programmable completion for bitcoin-tx(1) +# bash programmable completion for komodo-tx(1) # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -_bitcoin_tx() { +_komodo_tx() { local cur prev words=() cword - local bitcoin_tx + local komodo_tx - # save and use original argument to invoke bitcoin-tx for -help + # save and use original argument to invoke komodo-tx for -help # it might not be in $PATH - bitcoin_tx="$1" + komodo_tx="$1" COMPREPLY=() _get_comp_words_by_ref -n =: cur prev words cword @@ -27,15 +27,15 @@ _bitcoin_tx() { if [[ "$cword" == 1 || ( "$prev" != "-create" && "$prev" == -* ) ]]; then # only options (or an uncompletable hex-string) allowed - # parse bitcoin-tx -help for options + # parse komodo-tx -help for options local helpopts - helpopts=$($bitcoin_tx -help | sed -e '/^ -/ p' -e d ) + helpopts=$($komodo_tx -help | sed -e '/^ -/ p' -e d ) COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) ) else # only commands are allowed # parse -help for commands local helpcmds - helpcmds=$($bitcoin_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d ) + helpcmds=$($komodo_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d ) COMPREPLY=( $( compgen -W "$helpcmds" -- "$cur" ) ) fi @@ -46,7 +46,7 @@ _bitcoin_tx() { return 0 } && -complete -F _bitcoin_tx zcash-tx +complete -F _komodo_tx komodo-tx # Local variables: # mode: shell-script diff --git a/contrib/bitcoind.bash-completion b/contrib/komodod.bash-completion similarity index 77% rename from contrib/bitcoind.bash-completion rename to contrib/komodod.bash-completion index 104365024..4c1ec516f 100644 --- a/contrib/bitcoind.bash-completion +++ b/contrib/komodod.bash-completion @@ -1,16 +1,16 @@ -# bash programmable completion for zcashd(1) +# bash programmable completion for komodod(1) # Copyright (c) 2012-2017 The Bitcoin Core developers -# Copyright (c) 2016-2017 The Zcash developers +# Copyright (c) 2016-2017 The komodo developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. -_zcashd() { +_komodod() { local cur prev words=() cword - local bitcoind + local komodod - # save and use original argument to invoke zcashd for -help + # save and use original argument to invoke komodod for -help # it might not be in $PATH - bitcoind="$1" + komodod="$1" COMPREPLY=() _get_comp_words_by_ref -n = cur prev words cword @@ -21,7 +21,7 @@ _zcashd() { _filedir return 0 ;; - -datadir=*) + -datadir=*|-exportdir=*) cur="${cur#*=}" _filedir -d return 0 @@ -34,7 +34,7 @@ _zcashd() { # only parse -help if senseful if [[ -z "$cur" || "$cur" =~ ^- ]]; then local helpopts - helpopts=$($bitcoind -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) + helpopts=$($komodod -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) ) fi @@ -46,7 +46,7 @@ _zcashd() { ;; esac } && -complete -F _zcashd zcashd +complete -F _komodod komodod # Local variables: # mode: shell-script From 2f8ffc3443a755276ca8f04429c290af98ad7308 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 24 Mar 2018 21:17:36 +0200 Subject: [PATCH 18/18] Fix typo --- src/assetchains.old | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assetchains.old b/src/assetchains.old index 94c0c8e6e..9839c56e6 100755 --- a/src/assetchains.old +++ b/src/assetchains.old @@ -28,7 +28,7 @@ echo $pubkey ./komodod -pubkey=$pubkey -ac_name=BEER -ac_supply=100000000 -addnode=78.47.196.146 & ./komodod -pubkey=$pubkey -ac_name=PIZZA -ac_supply=100000000 -addnode=78.47.196.146 & ./komodod -pubkey=$pubkey -ac_name=NINJA -ac_supply=100000000 -addnode=78.47.196.146 & -./komodod -pubkey=$pubkey -ac_name=OOT -ac_supply=216000000-addnode=174.138.107.226 & +./komodod -pubkey=$pubkey -ac_name=OOT -ac_supply=216000000 -addnode=174.138.107.226 & #sleep $delay #./komodod -pubkey=$pubkey -ac_name=USD -addnode=78.47.196.146 $1 &