Merge remote-tracking branch 'jl777/dev' into cryptoconditions

This commit is contained in:
Scott Sadler
2018-03-16 23:03:27 -03:00
28 changed files with 826 additions and 203 deletions

View File

@@ -1,5 +1,13 @@
FROM kolobus/ubuntu:komodo
MAINTAINER Mihail Fedorov <tech@fedorov.net>
FROM ubuntu:16.04
MAINTAINER Mihail Fedorov <kolo@komodoplatform.com>
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 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

View File

@@ -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

View File

@@ -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

84
doc/man/komodo-cli.1 Normal file
View File

@@ -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 <https://z.cash/support/security/index.html>.
.SS "Usage:"
.TP
komodo\-cli [options] <command> [params]
Send command to Komodo
.TP
komodo\-cli [options] help
List commands
.TP
komodo\-cli [options] help <command>
Get help for a command
.SH OPTIONS
.HP
\-?
.IP
This help message
.HP
\fB\-conf=\fR<file>
.IP
Specify configuration file (default: komodo.conf)
.HP
\fB\-datadir=\fR<dir>
.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>
.IP
Send commands to node running on <ip> (default: 127.0.0.1)
.HP
\fB\-rpcport=\fR<port>
.IP
Connect to JSON\-RPC on <port> (default: 8232 or testnet: 18232)
.HP
\fB\-rpcwait\fR
.IP
Wait for RPC server to start
.HP
\fB\-rpcuser=\fR<user>
.IP
Username for JSON\-RPC connections
.HP
\fB\-rpcpassword=\fR<pw>
.IP
Password for JSON\-RPC connections
.HP
\fB\-rpcclienttimeout=\fR<n>
.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 <https://z.cash/support/security/index.html>.
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 <http://www.opensource.org/licenses/mit-license.php>.
This product includes software developed by the OpenSSL Project for use in the
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
by Eric Young and UPnP software written by Thomas Bernard.

102
doc/man/komodo-tx.1 Normal file
View File

@@ -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] <hex\-tx> [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 <https://z.cash/support/security/index.html>.
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 <http://www.opensource.org/licenses/mit-license.php>.
This product includes software developed by the OpenSSL Project for use in the
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
by Eric Young and UPnP software written by Thomas Bernard.

472
doc/man/komodod.1 Normal file
View File

@@ -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 <https://z.cash/support/security/index.html>.
.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<cmd>
.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<cmd>
.IP
Execute command when the best block changes (%s in cmd is replaced by
block hash)
.HP
\fB\-checkblocks=\fR<n>
.IP
How many blocks to check at startup (default: 288, 0 = all)
.HP
\fB\-checklevel=\fR<n>
.IP
How thorough the block verification of \fB\-checkblocks\fR is (0\-4, default: 3)
.HP
\fB\-conf=\fR<file>
.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<dir>
.IP
Specify data directory
.HP
\fB\-exportdir=\fR<dir>
.IP
Specify directory to be used when exporting data
.HP
\fB\-dbcache=\fR<n>
.IP
Set database cache size in megabytes (4 to 16384, default: 100)
.HP
\fB\-loadblock=\fR<file>
.IP
Imports blocks from external blk000??.dat file on startup
.HP
\fB\-maxorphantx=\fR<n>
.IP
Keep at most <n> unconnectable transactions in memory (default: 100)
.HP
\fB\-par=\fR<n>
.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<file>
.IP
Specify pid file (default: komodod.pid)
.HP
\fB\-prune=\fR<n>
.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>
.IP
Add a node to connect to and attempt to keep the connection open
.HP
\fB\-banscore=\fR<n>
.IP
Threshold for disconnecting misbehaving peers (default: 100)
.HP
\fB\-bantime=\fR<n>
.IP
Number of seconds to keep misbehaving peers from reconnecting (default:
86400)
.HP
\fB\-bind=\fR<addr>
.IP
Bind to given address and always listen on it. Use [host]:port notation
for IPv6
.HP
\fB\-connect=\fR<ip>
.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>
.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<n>
.IP
Maintain at most <n> connections to peers (default: 125)
.HP
\fB\-maxreceivebuffer=\fR<n>
.IP
Maximum per\-connection receive buffer, <n>*1000 bytes (default: 5000)
.HP
\fB\-maxsendbuffer=\fR<n>
.IP
Maximum per\-connection send buffer, <n>*1000 bytes (default: 1000)
.HP
\fB\-onion=\fR<ip:port>
.IP
Use separate SOCKS5 proxy to reach peers via Tor hidden services
(default: \fB\-proxy\fR)
.HP
\fB\-onlynet=\fR<net>
.IP
Only connect to nodes in network <net> (ipv4, ipv6 or onion)
.HP
\fB\-permitbaremultisig\fR
.IP
Relay non\-P2SH multisig (default: 1)
.HP
\fB\-port=\fR<port>
.IP
Listen for connections on <port> (default: 7770 or testnet: 17770)
.HP
\fB\-proxy=\fR<ip:port>
.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>
.IP
Connect to a node to retrieve peer addresses, and disconnect
.HP
\fB\-timeout=\fR<n>
.IP
Specify connection timeout in milliseconds (minimum: 1, default: 5000)
.HP
\fB\-torcontrol=\fR<ip>:<port>
.IP
Tor control port to use if onion listening enabled (default:
127.0.0.1:9051)
.HP
\fB\-torpassword=\fR<pass>
.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<addr>
.IP
Bind to given address and whitelist peers connecting to it. Use
[host]:port notation for IPv6
.HP
\fB\-whitelist=\fR<netmask>
.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<n>
.IP
Set key pool size to <n> (default: 100)
.HP
\fB\-paytxfee=\fR<amt>
.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<n>
.IP
If paytxfee is not set, include enough fee so transactions begin
confirmation on average within n blocks (default: 2)
.HP
\fB\-maxtxfee=\fR<amt>
.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<file>
.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<cmd>
.IP
Execute command when a wallet transaction changes (%s in cmd is replaced
by TxID)
.HP
\fB\-zapwallettxes=\fR<mode>
.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<address>
.IP
Enable publish hash block in <address>
.HP
\fB\-zmqpubhashtx=\fR<address>
.IP
Enable publish hash transaction in <address>
.HP
\fB\-zmqpubrawblock=\fR<address>
.IP
Enable publish raw block in <address>
.HP
\fB\-zmqpubrawtx=\fR<address>
.IP
Enable publish raw transaction in <address>
.PP
Debugging/Testing options:
.HP
\fB\-debug=\fR<category>
.IP
Output debugging information (default: 0, supplying <category> is
optional). If <category> is not supplied or if <category> = 1, output
all debugging information. <category> 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<amt>
.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<n>
.IP
Set minimum block size in bytes (default: 0)
.HP
\fB\-blockmaxsize=\fR<n>
.IP
Set maximum block size in bytes (default: 2000000)
.HP
\fB\-blockprioritysize=\fR<n>
.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<n>
.IP
Set the number of threads for coin generation if enabled (\fB\-1\fR = all
cores, default: 1)
.HP
\fB\-equihashsolver=\fR<name>
.IP
Specify the Equihash solver to be used if enabled (default: "default")
.HP
\fB\-mineraddress=\fR<addr>
.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<addr>
.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<user>
.IP
Username for JSON\-RPC connections
.HP
\fB\-rpcpassword=\fR<pw>
.IP
Password for JSON\-RPC connections
.HP
\fB\-rpcport=\fR<port>
.IP
Listen for JSON\-RPC connections on <port> (default: 7771 or testnet:
17771)
.HP
\fB\-rpcallowip=\fR<ip>
.IP
Allow JSON\-RPC connections from specified source. Valid for <ip> 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<n>
.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 <https://z.cash/support/security/index.html>.
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 <http://www.opensource.org/licenses/mit-license.php>.
This product includes software developed by the OpenSSL Project for use in the
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
by Eric Young and UPnP software written by Thomas Bernard.

View File

@@ -64,7 +64,7 @@ Command | Parameters | Description
z_exportkey | zaddr | _Requires an unlocked wallet or an unencrypted wallet._<br><br>Return a zkey for a given zaddr belonging to the nodes wallet.<br><br>The key will be returned as a string formatted using Base58Check as described in the Zcash protocol spec.<br><br>Output:AKWUAkypwQjhZ6LLNaMuuuLcmZ6gt5UFyo8m3jGutvALmwZKLdR5
z_importkey | zkey [rescan=true] | _Wallet must be unlocked._<br><br>Add a zkey as returned by z_exportkey to a node's wallet.<br><br>The key should be formatted using Base58Check as described in the Zcash protocol spec.<br><br>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._<br><br>Creates or overwrites a file with taddr private keys and zaddr private keys in a human-readable format.<br><br>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.<br><br>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._<br><br>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.<br><br>Filename is the file to import. The path is relative to zcashds working directory.<br><br>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._<br><br>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.<br><br>Filename is the file to import. The path is relative to komodods working directory.<br><br>No value is returned but a JSON-RPC error will be reported if a failure occurred.
### Payment

View File

@@ -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
@@ -33,10 +33,10 @@ 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
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 zcashd'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
@@ -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).
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:
./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
@@ -96,47 +96,47 @@ 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`.
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.
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 zcashd as follows:
a single Komodo 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.
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/",
@@ -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

View File

@@ -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

View File

@@ -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
@@ -35,11 +35,9 @@ komodo_asset JUMBLR 999999
komodo_asset BET 999999
komodo_asset CRYPTO 999999
komodo_asset HODL 9999999
#komodo_asset SHARK 1401
komodo_asset MSHARK 1400000
komodo_asset BOTS 999999
komodo_asset MGW 999999
#komodo_asset MVP 1000000
komodo_asset COQUI 72000000
komodo_asset WLC 210000000
komodo_asset KV 1000000
@@ -49,37 +47,8 @@ komodo_asset MNZ 257142858
komodo_asset AXO 200000000
komodo_asset ETOMIC 100000000
komodo_asset BTCH 20998641
komodo_asset VOTE 49999999999
#komodo_asset USD
#komodo_asset EUR
#komodo_asset JPY
#komodo_asset GBP
#komodo_asset AUD
#komodo_asset CAD
#komodo_asset CHF
#komodo_asset NZD
#komodo_asset CNY
#komodo_asset RUB
#komodo_asset MXN
#komodo_asset BRL
#komodo_asset INR
#komodo_asset HKD
#komodo_asset TRY
#komodo_asset ZAR
#komodo_asset PLN
#komodo_asset NOK
#komodo_asset SEK
#komodo_asset DKK
#komodo_asset CZK
#komodo_asset HUF
#komodo_asset ILS
#komodo_asset KRW
#komodo_asset MYR
#komodo_asset PHP
#komodo_asset RON
#komodo_asset SGD
#komodo_asset THB
#komodo_asset BGN
#komodo_asset IDR
#komodo_asset HRK
komodo_asset VOTE2018 600000000
komodo_asset PIZZA 100000000
komodo_asset BEER 100000000
komodo_asset NINJA 100000000
komodo_asset OOT 216000000

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash
set -x
delay=60
source pubkey.txt
@@ -24,9 +24,11 @@ echo $pubkey
./komodod -pubkey=$pubkey -ac_name=AXO -ac_supply=200000000 -addnode=78.47.196.146 &
./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=VOTE -ac_supply=49999999999 -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=VOTE2018 -ac_supply=600000000 -addnode=78.47.196.146 &
./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 &

View File

@@ -65,6 +65,7 @@ public:
};
#define FROM_CLI
#include "uint256.h"
#include "arith_uint256.h"

View File

@@ -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<unsigned char>(1,60);
base58Prefixes[SCRIPT_ADDRESS] = std::vector<unsigned char>(1,85);

View File

@@ -27,40 +27,9 @@ 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\":\"ETOMIC\",\"pubkey\":\"$pubkey\"}"
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\":\"VOTE\",\"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\"}"
#
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"JPY\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"GBP\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"AUD\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CAD\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CHF\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"NZD\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CNY\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"RUB\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MXN\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BRL\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"INR\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HKD\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"TRY\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ZAR\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PLN\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"NOK\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SEK\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"DKK\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"CZK\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HUF\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"ILS\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"KRW\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"MYR\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"PHP\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"RON\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"SGD\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"THB\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"BGN\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"IDR\",\"pubkey\":\"$pubkey\"}"
#curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"iguana\",\"method\":\"dpow\",\"symbol\":\"HRK\",\"pubkey\":\"$pubkey\"}"

View File

@@ -1,37 +1,5 @@
#!/bin/bash
#set -x
#echo aud; fiat/aud $1 $2 $3 $4
#echo bgn; fiat/bgn $1 $2 $3 $4
#echo cad; fiat/cad $1 $2 $3 $4
#echo chf; fiat/chf $1 $2 $3 $4
#echo cny; fiat/cny $1 $2 $3 $4
#echo czk; fiat/czk $1 $2 $3 $4
#echo dkk; fiat/dkk $1 $2 $3 $4
#echo eur; fiat/eur $1 $2 $3 $4
#echo gbp; fiat/gbp $1 $2 $3 $4
#echo hkd; fiat/hkd $1 $2 $3 $4
#echo hrk; fiat/hrk $1 $2 $3 $4
#echo huf; fiat/huf $1 $2 $3 $4
#echo idr; fiat/idr $1 $2 $3 $4
#echo ils; fiat/ils $1 $2 $3 $4
#echo inr; fiat/inr $1 $2 $3 $4
#echo jpy; fiat/jpy $1 $2 $3 $4
#echo krw; fiat/krw $1 $2 $3 $4
#echo mxn; fiat/mxn $1 $2 $3 $4
#echo myr; fiat/myr $1 $2 $3 $4
#echo nok; fiat/nok $1 $2 $3 $4
#echo nzd; fiat/nzd $1 $2 $3 $4
#echo php; fiat/php $1 $2 $3 $4
#echo pln; fiat/pln $1 $2 $3 $4
#echo brl; fiat/brl $1 $2 $3 $4
#echo ron; fiat/ron $1 $2 $3 $4
#echo rub; fiat/rub $1 $2 $3 $4
#echo sek; fiat/sek $1 $2 $3 $4
#echo sgd; fiat/sgd $1 $2 $3 $4
#echo thb; fiat/thb $1 $2 $3 $4
#echo try; fiat/try $1 $2 $3 $4
#echo usd; fiat/usd $1 $2 $3 $4
#echo zar; fiat/zar $1 $2 $3 $4
echo revs; fiat/revs $1 $2 $3 $4
echo supernet; fiat/supernet $1 $2 $3 $4
echo dex; fiat/dex $1 $2 $3 $4
@@ -40,11 +8,9 @@ echo jumblr; fiat/jumblr $1 $2 $3 $4
echo bet; fiat/bet $1 $2 $3 $4
echo crypto; fiat/crypto $1 $2 $3 $4
echo hodl; fiat/hodl $1 $2 $3 $4
#echo shark; fiat/shark $1 $2 $3 $4
echo mshark; fiat/mshark $1 $2 $3 $4
echo bots; fiat/bots $1 $2 $3 $4
echo mgw; fiat/mgw $1 $2 $3 $4
#echo mvp; fiat/mvp $1 $2 $3 $4
echo coqui; fiat/coqui $1 $2 $3 $4
echo wlc; fiat/wlc $1 $2 $3 $4
echo kv; fiat/kv $1 $2 $3 $4
@@ -56,4 +22,6 @@ echo etomic; fiat/etomic $1 $2 $3 $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 vote; fiat/vote $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

2
src/fiat/ninja Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
./komodo-cli -ac_name=NINJA $1 $2 $3 $4 $5 $6

2
src/fiat/oot Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
./komodo-cli -ac_name=OOT $1 $2 $3 $4 $5 $6

View File

@@ -1,2 +0,0 @@
#!/bin/bash
./komodo-cli -ac_name=VOTE $1 $2 $3 $4 $5 $6

2
src/fiat/vote2018 Executable file
View File

@@ -0,0 +1,2 @@
#!/bin/bash
./komodo-cli -ac_name=VOTE2018 $1 $2 $3 $4 $5 $6

View File

@@ -365,7 +365,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-onion=<ip:port>", strprintf(_("Use separate SOCKS5 proxy to reach peers via Tor hidden services (default: %s)"), "-proxy"));
strUsage += HelpMessageOpt("-onlynet=<net>", _("Only connect to nodes in network <net> (ipv4, ipv6 or onion)"));
strUsage += HelpMessageOpt("-permitbaremultisig", strprintf(_("Relay non-P2SH multisig (default: %u)"), 1));
strUsage += HelpMessageOpt("-port=<port>", strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"), 8233, 18233));
strUsage += HelpMessageOpt("-port=<port>", strprintf(_("Listen for connections on <port> (default: %u or testnet: %u)"), 7770, 17770));
strUsage += HelpMessageOpt("-proxy=<ip:port>", _("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=<ip>", _("Connect to a node to retrieve peer addresses, and disconnect"));
@@ -485,7 +485,7 @@ std::string HelpMessage(HelpMessageMode mode)
strUsage += HelpMessageOpt("-rpcbind=<addr>", _("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=<user>", _("Username for JSON-RPC connections"));
strUsage += HelpMessageOpt("-rpcpassword=<pw>", _("Password for JSON-RPC connections"));
strUsage += HelpMessageOpt("-rpcport=<port>", strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"), 8232, 18232));
strUsage += HelpMessageOpt("-rpcport=<port>", strprintf(_("Listen for JSON-RPC connections on <port> (default: %u or testnet: %u)"), 7771, 17771));
strUsage += HelpMessageOpt("-rpcallowip=<ip>", _("Allow JSON-RPC connections from specified source. Valid for <ip> 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=<n>", strprintf(_("Set the number of threads to service RPC calls (default: %d)"), DEFAULT_HTTP_THREADS));
if (showDebug) {

View File

@@ -814,16 +814,17 @@ int32_t komodo_checkpoint(int32_t *notarized_heightp,int32_t nHeight,uint256 has
{
if ( nHeight < notarized_height )
{
fprintf(stderr,"nHeight.%d < NOTARIZED_HEIGHT.%d\n",nHeight,notarized_height);
//fprintf(stderr,"[%s] nHeight.%d < NOTARIZED_HEIGHT.%d\n",ASSETCHAINS_SYMBOL,nHeight,notarized_height);
return(-1);
}
else if ( nHeight == notarized_height && memcmp(&hash,&notarized_hash,sizeof(hash)) != 0 )
{
fprintf(stderr,"nHeight.%d == NOTARIZED_HEIGHT.%d, diff hash\n",nHeight,notarized_height);
fprintf(stderr,"[%s] nHeight.%d == NOTARIZED_HEIGHT.%d, diff hash\n",ASSETCHAINS_SYMBOL,nHeight,notarized_height);
return(-1);
}
} else fprintf(stderr,"unexpected error notary_hash %s ht.%d at ht.%d\n",notarized_hash.ToString().c_str(),notarized_height,notary->nHeight);
} else if ( notarized_height > 0 && notarized_height != 73880 && notarized_height >= 170000 )
} else fprintf(stderr,"[%s] unexpected error notary_hash %s ht.%d at ht.%d\n",ASSETCHAINS_SYMBOL,notarized_hash.ToString().c_str(),notarized_height,notary->nHeight);
}
else if ( notarized_height > 0 && notarized_height != 73880 && notarized_height >= 170000 )
fprintf(stderr,"[%s] couldnt find notarized.(%s %d) ht.%d\n",ASSETCHAINS_SYMBOL,notarized_hash.ToString().c_str(),notarized_height,pindex->nHeight);
return(0);
}

View File

@@ -1362,12 +1362,14 @@ void komodo_configfile(char *symbol,uint16_t port)
#endif
if ( (fp= fopen(fname,"rb")) == 0 )
{
#ifndef FROM_CLI
if ( (fp= fopen(fname,"wb")) != 0 )
{
fprintf(fp,"rpcuser=user%u\nrpcpassword=pass%s\nrpcport=%u\nserver=1\ntxindex=1\nrpcworkqueue=64\n",crc,password,port);
fclose(fp);
printf("Created (%s)\n",fname);
} else printf("Couldnt create (%s)\n",fname);
#endif
}
else
{
@@ -1399,7 +1401,7 @@ void komodo_configfile(char *symbol,uint16_t port)
sprintf(KMDUSERPASS,"%s:%s",username,password);
fclose(fp);
//printf("KOMODO.(%s) -> userpass.(%s)\n",fname,KMDUSERPASS);
} else printf("couldnt open.(%s)\n",fname);
} //else printf("couldnt open.(%s)\n",fname);
}
uint16_t komodo_userpass(char *userpass,char *symbol)
@@ -1442,24 +1444,13 @@ uint32_t komodo_assetmagic(char *symbol,uint64_t supply,uint8_t *extraptr,int32_
return(calc_crc32(crc0,buf,len));
}
/*int32_t komodo_shortflag(char *symbol)
{
int32_t i,shortflag = 0;
if ( symbol[0] == '-' )
{
shortflag = 1;
for (i=0; symbol[i+1]!=0; i++)
symbol[i] = symbol[i+1];
symbol[i] = 0;
}
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 +1461,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])
@@ -1535,7 +1526,7 @@ void komodo_args(char *argv0)
}
}
}
ASSETCHAINS_CC = GetArg("-ac_cc",0);
ASSETCHAINS_CC = GetArg("-ac_cc",0); // keep it outside the assetchains hashing so KMD can do it and we dont have two identical chains other than -ac_cc
if ( (KOMODO_REWIND= GetArg("-rewind",0)) != 0 )
{
printf("KOMODO_REWIND %d\n",KOMODO_REWIND);
@@ -1617,6 +1608,7 @@ void komodo_args(char *argv0)
for (i=0; i<4; i++)
sprintf(&magicstr[i<<1],"%02x",magic[i]);
magicstr[8] = 0;
#ifndef FROM_CLI
sprintf(fname,"gen%s",ASSETCHAINS_SYMBOL);
if ( (fp= fopen(fname,"wb")) != 0 )
{
@@ -1624,6 +1616,7 @@ void komodo_args(char *argv0)
fclose(fp);
//printf("created (%s)\n",fname);
} else printf("error creating (%s)\n",fname);
#endif
}
else
{
@@ -1657,7 +1650,7 @@ void komodo_args(char *argv0)
sprintf(iter == 0 ? KMDUSERPASS : BTCUSERPASS,"%s:%s",username,password);
fclose(fp);
//printf("KOMODO.(%s) -> userpass.(%s)\n",fname,KMDUSERPASS);
} else printf("couldnt open.(%s)\n",fname);
} //else printf("couldnt open.(%s)\n",fname);
if ( IS_KOMODO_NOTARY == 0 )
break;
}

View File

@@ -740,7 +740,7 @@ bool IsFinalTx(const CTransaction &tx, int nBlockHeight, int64_t nBlockTime)
}
else if (!txin.IsFinal())
{
//printf("non-final txin seq.%x locktime.%u vs nTime.%u\n",txin.nSequence,(uint32_t)tx.nLockTime,(uint32_t)nBlockTime);
printf("non-final txin seq.%x locktime.%u vs nTime.%u\n",txin.nSequence,(uint32_t)tx.nLockTime,(uint32_t)nBlockTime);
return false;
}
}
@@ -1665,10 +1665,10 @@ bool IsInitialBlockDownload()
ptr = pindexBestHeader;
else if ( pindexBestHeader != 0 && pindexBestHeader->nHeight > ptr->nHeight )
ptr = pindexBestHeader;
if ( ASSETCHAINS_SYMBOL[0] == 0 )
//if ( ASSETCHAINS_SYMBOL[0] == 0 )
state = ((chainActive.Height() < ptr->nHeight - 24*60) ||
ptr->GetBlockTime() < (GetTime() - chainParams.MaxTipAge()));
else state = (chainActive.Height() < ptr->nHeight - 10);
//else state = (chainActive.Height() < ptr->nHeight - 24*60);
//fprintf(stderr,"state.%d ht.%d vs %d, t.%u %u\n",state,(int32_t)chainActive.Height(),(uint32_t)ptr->nHeight,(int32_t)ptr->GetBlockTime(),(uint32_t)(GetTime() - chainParams.MaxTipAge()));
if (!state)
{
@@ -3445,7 +3445,14 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta
if (pcheckpoint && (nHeight < pcheckpoint->nHeight || nHeight == 1 && chainActive.Tip() != 0 && chainActive.Tip()->nHeight > 1) )
return state.DoS(100, error("%s: forked chain older than last checkpoint (height %d) vs %d", __func__, nHeight,pcheckpoint->nHeight));
else if ( komodo_checkpoint(&notarized_height,nHeight,hash) < 0 )
return state.DoS(100, error("%s: forked chain %d older than last notarized (height %d) vs %d", __func__,nHeight, notarized_height));
{
CBlockIndex *heightblock = chainActive[nHeight];
if ( heightblock != 0 && heightblock->GetBlockHash() == hash )
{
//fprintf(stderr,"got a pre notarization block that matches height.%d\n",(int32_t)nHeight);
return true;
} else return state.DoS(100, error("%s: forked chain %d older than last notarized (height %d) vs %d", __func__,nHeight, notarized_height));
}
}
// Reject block.nVersion < 4 blocks
if (block.nVersion < 4)
@@ -3503,6 +3510,40 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
*ppindex = pindex;
if (pindex != 0 && pindex->nStatus & BLOCK_FAILED_MASK)
return state.Invalid(error("%s: block is marked invalid", __func__), 0, "duplicate");
if ( pindex != 0 && IsInitialBlockDownload() == 0 ) // jl777 debug test
{
if (!CheckBlockHeader(pindex->nHeight,pindex, block, state))
{
pindex->nStatus |= BLOCK_FAILED_MASK;
fprintf(stderr,"known block failing CheckBlockHeader %d\n",(int32_t)pindex->nHeight);
return false;
}
CBlockIndex* pindexPrev = NULL;
if (hash != chainparams.GetConsensus().hashGenesisBlock)
{
BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock);
if (mi == mapBlockIndex.end())
{
pindex->nStatus |= BLOCK_FAILED_MASK;
fprintf(stderr,"known block.%d failing to find prevblock\n",(int32_t)pindex->nHeight);
return state.DoS(10, error("%s: prev block not found", __func__), 0, "bad-prevblk");
}
pindexPrev = (*mi).second;
if (pindexPrev == 0 || (pindexPrev->nStatus & BLOCK_FAILED_MASK) )
{
pindex->nStatus |= BLOCK_FAILED_MASK;
fprintf(stderr,"known block.%d found invalid prevblock\n",(int32_t)pindex->nHeight);
return state.DoS(100, error("%s: prev block invalid", __func__), REJECT_INVALID, "bad-prevblk");
}
}
if (!ContextualCheckBlockHeader(block, state, pindexPrev))
{
pindex->nStatus |= BLOCK_FAILED_MASK;
fprintf(stderr,"known block.%d failing ContextualCheckBlockHeader\n",(int32_t)pindex->nHeight);
return false;
}
}
return true;
}
@@ -3514,7 +3555,9 @@ bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state, CBloc
if (hash != chainparams.GetConsensus().hashGenesisBlock) {
BlockMap::iterator mi = mapBlockIndex.find(block.hashPrevBlock);
if (mi == mapBlockIndex.end())
{
return state.DoS(10, error("%s: prev block not found", __func__), 0, "bad-prevblk");
}
pindexPrev = (*mi).second;
if (pindexPrev == 0 || (pindexPrev->nStatus & BLOCK_FAILED_MASK) )
return state.DoS(100, error("%s: prev block invalid", __func__), REJECT_INVALID, "bad-prevblk");
@@ -4289,7 +4332,7 @@ void static CheckBlockIndex()
// Build forward-pointing map of the entire block tree.
std::multimap<CBlockIndex*,CBlockIndex*> forward;
for (BlockMap::iterator it = mapBlockIndex.begin(); it != mapBlockIndex.end(); it++) {
forward.insert(std::make_pair(it->second->pprev, it->second));
forward.insert(std::make_pair(it->second->pprev, it->second));
}
assert(forward.size() == mapBlockIndex.size());

View File

@@ -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"

View File

@@ -857,13 +857,13 @@ 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)
{
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)

View File

@@ -1191,7 +1191,10 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con
// Now that we know we're comparing apples-to-apples, the
// comparison is a simple numeric one.
if (nLockTime > (int64_t)txTo->nLockTime)
{
//fprintf(stderr,"CLTV error: nLockTime %llu > %u txTo->nLockTime\n",*(long long *)&nLockTime,(uint32_t)txTo->nLockTime);
return false;
}
// Finally the nLockTime feature can be disabled and thus
// CHECKLOCKTIMEVERIFY bypassed if every txin has been
@@ -1204,7 +1207,10 @@ bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) con
// inputs, but testing just this input minimizes the data
// required to prove correct CHECKLOCKTIMEVERIFY execution.
if (txTo->vin[nIn].IsFinal())
{
//fprintf(stderr,"CLTV error: nonfinal vin.%d nSequence.%u vs %u\n",(int32_t)nIn,(uint32_t)txTo->vin[nIn].nSequence,(uint32_t)std::numeric_limits<uint32_t>::max());
return false;
}
return true;
}

View File

@@ -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"

View File

@@ -88,5 +88,5 @@ PREFIX="$(pwd)/depends/$BUILD/"
HOST="$HOST" BUILD="$BUILD" NO_RUST="$RUST_ARG" "$MAKE" "$@" -C ./depends/ V=1
./autogen.sh
CC="$CC" CXX="$CXX" ./configure --prefix="${PREFIX}" --host="$HOST" --build="$BUILD" "$RUST_ARG" "$HARDENING_ARG" "$LCOV_ARG" "$TEST_ARG" "$MINING_ARG" CXXFLAGS='-fwrapv -fno-strict-aliasing -Werror -g'
CC="$CC" CXX="$CXX" ./configure --prefix="${PREFIX}" --host="$HOST" --build="$BUILD" "$RUST_ARG" "$HARDENING_ARG" "$LCOV_ARG" "$TEST_ARG" "$MINING_ARG" CXXFLAGS='-fwrapv -fno-strict-aliasing -g'
"$MAKE" "$@" V=1