GithubHelp home page GithubHelp logo

jl777 / komodo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zcash/zcash

117.0 32.0 109.0 112 MB

Komodo

Home Page: https://komodoplatform.com/

License: Other

Makefile 0.92% Shell 0.88% M4 1.22% Python 7.92% C++ 61.60% C 25.57% HTML 0.31% CSS 0.01% Objective-C++ 0.02% Java 0.37% Objective-C 0.62% Assembly 0.35% Dockerfile 0.01% PHP 0.01% Ruby 0.01% Batchfile 0.04% Roff 0.18%

komodo's Introduction

Build Status Version Issues PRs Commits Contributors Last Commit

gitstars twitter discord


Komodo Logo

Komodo

This is the official Komodo sourcecode repository based on https://github.com/jl777/komodo.

Development Resources

List of Komodo Platform Technologies

  • Delayed Proof of Work (dPoW) - Additional security layer and Komodos own consensus algorithm
  • zk-SNARKs - Komodo Platform's privacy technology for shielded transactions
  • Tokens/Assets Technology - create "colored coins" on the Komodo Platform and use them as a layer for securites
  • Reward API - Komodo CC technology for securities
  • CC - Crypto Conditions to realize "smart contract" logic on top of the Komodo Platform
  • Jumblr - Decentralized tumbler for KMD and other cryptocurrencies
  • Assetchains - Create your own Blockchain that inherits all Komodo Platform functionalities and blockchain interoperability
  • Pegged Assets - Chains that maintain a peg to fiat currencies
  • Peerchains - Scalability solution where sibling chains form a network of blockchains
  • More in depth covered here
  • Also note you receive 5% Active User Reward on your balance.
    See this article for more details

Tech Specification

  • Max Supply: 200 million KMD
  • Block Time: 60 seconds
  • Block Reward: 3 KMD
  • Mining Algorithm: Equihash

About this Project

Komodo is based on Zcash and has been extended by our innovative consensus algorithm called dPoW which utilizes Bitcoin's hashrate to store Komodo blockchain information into the Bitcoin blockchain. Other new and native Komodo features are the privacy technology called JUMBLR, our assetchain capabilities (one click plug and play blockchain solutions) and a set of financial decentralization and interoperability technologies. More details are available under https://komodoplatform.com/ and https://blog.komodoplatform.com.

Getting started

Dependencies

#The following packages are needed:
sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python python-zmq zlib1g-dev wget libcurl4-gnutls-dev bsdmainutils automake curl libsodium-dev

Build Komodo

This software is based on zcash and considered experimental and is continously undergoing heavy development.

The dev branch is considered the bleeding edge codebase while the master-branch is considered tested (unit tests, runtime tests, functionality). At no point of time do the Komodo Platform developers take any responsbility for any damage out of the usage of this software. Komodo builds for all operating systems out of the same codebase. Follow the OS specific instructions from below.

Linux

git clone https://github.com/komodoplatform/komodo --branch master --single-branch
cd komodo
./zcutil/fetch-params.sh
./zcutil/build.sh -j$(expr $(nproc) - 1)
#This can take some time.

OSX

Ensure you have brew and Command Line Tools installed.

# Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Install Xcode, opens a pop-up window to install CLT without installing the entire Xcode package
xcode-select --install 
# Update brew and install dependencies
brew update
brew upgrade
brew tap discoteq/discoteq; brew install flock
brew install autoconf autogen automake
brew update && brew install gcc@8
brew install binutils
brew install protobuf
brew install coreutils
brew install wget
# Clone the Komodo repo
git clone https://github.com/komodoplatform/komodo --branch master --single-branch
# Change master branch to other branch you wish to compile
cd komodo
./zcutil/fetch-params.sh
./zcutil/build-mac.sh -j$(expr $(sysctl -n hw.ncpu) - 1)
# This can take some time.

Windows

Use a debian cross-compilation setup with mingw for windows and run:

sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python python-zmq zlib1g-dev wget libcurl4-gnutls-dev bsdmainutils automake curl cmake mingw-w64 libsodium-dev libevent-dev
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
rustup target add x86_64-pc-windows-gnu

sudo update-alternatives --config x86_64-w64-mingw32-gcc
# (configure to use POSIX variant)
sudo update-alternatives --config x86_64-w64-mingw32-g++
# (configure to use POSIX variant)

git clone https://github.com/jl777/komodo --branch master --single-branch
cd komodo
./zcutil/fetch-params.sh
./zcutil/build-win.sh -j$(expr $(nproc) - 1)
#This can take some time.

komodo is experimental and a work-in-progress. Use at your own risk.

To reset the Komodo blockchain change into the ~/.komodo data directory and delete the corresponding files by running rm -rf blocks chainstate debug.log komodostate db.log

Create komodo.conf

Create a komodo.conf file:

mkdir ~/.komodo
cd ~/.komodo
touch komodo.conf

#Add the following lines to the komodo.conf file:
rpcuser=yourrpcusername
rpcpassword=yoursecurerpcpassword
rpcbind=127.0.0.1
txindex=1
addnode=77.75.121.138
addnode=95.213.238.100
addnode=94.130.148.142
addnode=103.6.12.105
addnode=139.99.209.214
addnode=185.130.212.13
addnode=5.9.142.219
addnode=200.25.4.38
addnode=139.99.136.148

Create your own Blockchain based on Komodo

Komodo allows anyone to create a runtime fork which represents an independent Blockchain. Below are the detailed instructions: Setup two independent servers with at least 1 server having a static IP and build komodod on those servers.

On server 1 (with static IP) run:

./komodod -ac_name=name_of_your_chain -ac_supply=100000 -bind=ip_of_server_1 &

On server 2 run:

./komodod -ac_name=name_of_your_chain -ac_supply=100000 -addnode=ip_of_server_1 -gen &

Komodo is based on Zcash which is unfinished and highly experimental. Use at your own risk.

License

For license information see the file COPYING.

NOTE TO EXCHANGES: https://bitcointalk.org/index.php?topic=1605144.msg17732151#msg17732151 There is a small chance that an outbound transaction will give an error due to mismatched values in wallet calculations. There is a -exchange option that you can run komodod with, but make sure to have the entire transaction history under the same -exchange mode. Otherwise you will get wallet conflicts.

To change modes:

a) backup all privkeys (launch komodod with -exportdir=<path> and dumpwallet)
b) start a totally new sync including wallet.dat, launch with same exportdir
c) stop it before it gets too far and import all the privkeys from a) using komodo-cli importwallet filename
d) resume sync till it gets to chaintip

For example:

./komodod -exportdir=/tmp &
./komodo-cli dumpwallet example
./komodo-cli stop
mv ~/.komodo ~/.komodo.old && mkdir ~/.komodo && cp ~/.komodo.old/komodo.conf ~/.komodo.old/peers.dat ~/.komodo
./komodod -exchange -exportdir=/tmp &
./komodo-cli importwallet /tmp/example

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

komodo's People

Contributors

alrighttt avatar asherda avatar bitcartel avatar ca333 avatar cozz avatar daira avatar deckersu avatar defuse avatar dimxy avatar ebfull avatar fanquake avatar gavinandresen avatar gmaxwell avatar jl777 avatar jonasschnelli avatar kolobus avatar laanwj avatar leto avatar luke-jr avatar miketout avatar mixa84 avatar non-github-bitcoin avatar petertodd avatar sipa avatar ssadler avatar str4d avatar thebluematt avatar theuni avatar tonymorony avatar zkbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

komodo's Issues

Runtime assertion on OS X

I am seeing this on the latest jl777 branch and latest dev branch (commit 49cacbf) :

$ ./komodod
call komodo_args.(./komodod) NOTARY_PUBKEY.()
initialized  at 1562887488
Assertion failed: (px != 0), function operator*, file /Users/jonathanleto/git/komodo/depends/x86_64-apple-darwin17.5.0/share/../include/boost/smart_ptr/shared_ptr.hpp, line 728.

Full backtrace is here, but it's not very useful:

https://gist.github.com/leto/a8088234a7c575f963b8063db87c3183

From what I can see, something in Boost internals is not happy and the seemingly innocuous line of code uiInterface.InitMessage(_("Verifying wallet...")); causes that assertion inside boost shared_ptr header file

sapling zaddrs do not work in regtest

Test suite code such as rpc.z_sendmany( taddr, recipients, minconf)

generates:

JSONRPC error: Invalid parameter, unknown address format: zregtestsapling1mwmz8tlx3xvdq4zjwc9sfe0hsrzn440755h2329yxzygxpal472v3k0uwdeteepdj4z6wwa38un

IsValidPaymentAddress() returns false, which causes this exception to be thrown. Currently this blocks fully testing changes in my dpowminconfs branch

Importing viewing keys does not work

On one machine:

hush@stilgar:~/git/komodo$ ./src/komodo-cli z_exportviewingkey zcJLHnWtfDKtXv2a3tUAdHkFyw6FGPnMuYjbdbrNgVQpz3j8HQ7rex1xabYFV6chH7jozWbPxwNWnFa2Evc7iAuiLs1oc4z
B7D6yB36E7UKEYa1qLcfvQsYGaU6WN1eoRMNchQo95eZ27qH3C5MtoXAN7NWxpNtLFAb3XNKnkwxH7DZLeh8zJzPD9uq8

On another:

$ ./src/komodo-cli z_importviewingkey B7D6yB36E7UKEYa1qLcfvQsYGaU6WN1eoRMNchQo95eZ27qH3C5MtoXAN7NWxpNtLFAb3XNKnkwxH7DZLeh8zJzPD9uq8
error code: -1
error message:
viewing key is invalid

I am looking into this

[Enhancement] Isolating cryptocondition applications help to specific assetchain

As per current development of demo smart contracts/cryptoconditions, the help for these demo smart contracts are showing in komodo-cli help.

like for faucet demo (https://github.com/jl777/komodo/blob/jl777/src/cc/faucet.cpp)'s help showing in komodo-cli help.

It'd be nice to have a way to add these help commands only to the CC assetchains which are being developed with custom commands. Example if faucet CC assetchain (-ac_name=FAUCET) has it's own commands instead of showing these in komodo-cli help, should have a way to show those only in komodo-cli -ac_name=FAUCET help.

NOTE: Not expecting this request be fulfilled by @jl777, as he awaits a pull request for this update.

KV / kvupdate doesn't return an updated value

kvupdate always returns an initial value set for a key

pushed initial kv tx http://pizza.komodochainz.info/api/getrawtransaction?txid=cccbbeb911000e3966e221e039364117f5aa2754bc7c51db62acbe63ad942289&decrypt=1
pushed kv update after 30 mins http://pizza.komodochainz.info/api/getrawtransaction?txid=56848c4ca33e94f1dbe856401c1543adec3a6367824d202f496d214eb1b88882&decrypt=1

./komodo-cli -ac_name=PIZZA kvsearch kvtest
{
"coin": "PIZZA",
"currentheight": 18960,
"key": "kvtest",
"keylen": 6,
"height": 18957,
"expiration": 20397,
"flags": 1,
"value": "The most important part of a decentralized crypto coin/asset\'s lifecycle, the ICO, is centralized. Being centralized, it is subject to the whims of government decrees about what can and cannot be ICO\'ed. As long as you pay the required toll fees, you will be granted a license to sell coins/assets, unless it is deemed that it won’t be approved for whatever reason. As for how long this process takes, that is totally in the hands of whatever government agency is dealing with it.",
"valuesize": 484
}

the above value belongs to txid cccbbeb911000e3966e221e039364117f5aa2754bc7c51db62acbe63ad942289
expected behaviour is to see an updated value from txid 56848c4ca33e94f1dbe856401c1543adec3a6367824d202f496d214eb1b88882

Weird output after daemon start

I get this every time i start the daemon

user@localhost:~$ komodod --daemon
call komodo_args.(komodod) NOTARY_PUBKEY.()
initialized 
Komodo  server starting
user@localhost:~$ ...................................processing /Users/user/Library/Application Support/Komodo/komodostate 85056KB, validated.-1
inds.0x10ae29000 validate /Users/user/Library/Application Support/Komodo/komodostate.ind fsize.5869620 datalen.87097817 n.1467405 lastfpos.0
/Users/user/Library/Application Support/Komodo/komodostate.ind validated fpos.87097817
took 8 seconds to process /Users/user/Library/Application Support/Komodo/komodostate 85056KB
.................................................................................................

and sometimes this to the console (no \n's in the output)

user@localhost:~$ finished loading blocks 
READY for  RPC calls at 1525030923! done PASSPORT  refid.33

user@localhost:~$ komodo- FindBucketIndex violation: from val 19247.000000

Mac build using brew

Describe the issue

versions in brew tap homebrew/versions is deprecated

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. it is not possible to use this line
    brew tap homebrew/versions; brew install homebrew/versions/gcc5
    it gives the error message saying versions is deprecated

The version of Zcash you were using:

Run zcashd --version to find out

Machine specs:

  • system: mac mini 2014

brew install gcc5 is enough i guess

[Bug] Subatomic - If PIRATE needs blockchain rescan, swaps will have issues completing

Executed subatomic swap from Windows machine as Alice which did a swap with Bob node on Linux.
Alice buying PIRATE, selling KMD.
Bob buying KMD, selling PIRATE.

Alice got following in subatomic swaps log:

rel.KMD/KMD  openrequest 1480128384 status.0 (RBthCSgNLE3rwvAKce8JNSo7xDpxQEiRTX/zs1zqks0tergf6nk69evm6awte4xmhf2fd9epnv946vzlhfxztkls6a9lyfmuafda00krvkvj0xagp)
1480128384 openrequest.3045915584 -> (0133f63a3d4ae8db7e9efe8b8702e10ecc9ef44901dd2321c92132889bc6656b4e)
1480128384 iambob.0 (PIRATE/KMD) channelapproved origid.1480128384 status.1
1480128384 approvalid.3951842080 (0133f63a3d4ae8db7e9efe8b8702e10ecc9ef44901dd2321c92132889bc6656b4e)
1480128384 iambob.0 (PIRATE/KMD) incomingchannel status.2
1480128384 got txid.a1fc91cae5963a0cbb7955b149ea0924195bb6999e0af1ce2fdde34d25cfe8b9
1480128384: 0.01000000 KMD -> RQPZrM4yQaTZpEuoGmcGwzE4SaG2Tn9QiB, paymentid[0] 3706397792
1480128384 iambob.0 (PIRATE/KMD) incomingpayment status.4
1480128384 alice waits for PIRATE.0000000000000000000000000000000000000000000000000000000000000000 to be in mempool (0.05000000 -> zs1zqks0tergf6nk69evm6awte4xmhf2fd9epnv946vzlhfxztkls6a9lyfmuafda00krvkvj0xagp)
1480128384 SWAP INCOMPLETE, waiting on PIRATE.0000000000000000000000000000000000000000000000000000000000000000
1480128384 closedid.2261577536
subatomic_channel_alice (KMD/KMD) 1480128384 1480128384 with 0.01000000 1000000
start subatomic_loop iambob.0 PIRATE -> KMD, 1480128384 1000000 3045915584
sendtoaddress RQPZrM4yQaTZpEuoGmcGwzE4SaG2Tn9QiB 0.01000000 txid.(a1fc91cae5963a0cbb7955b149ea0924195bb6999e0af1ce2fdde34d25cfe8b9)
dpow_broadcast.(incomplete/a1fc91cae5963a0cbb7955b149ea0924195bb6999e0af1ce2fdde34d25cfe8b9) [ ] a1fc91cae5963a0cbb7955b149ea0924195bb6999e0af1ce2fdde34d25cfe8b9 error.(-1)

For PIRATE, the txid received is 0000000000000000000000000000000000000000000000000000000000000000 at Alice end.

On Bob's end following are the logs:
Screenshot from 2020-07-04 17-05-24

Bob's PIRATE debug.log shows:

2020-07-04 16:03:19 ERROR: AcceptToMemoryPool: joinsplit requirements not met
2020-07-04 16:03:19 opid-ce62364f-c6e9-4baf-8583-fa6ca5920dfe: z_sendmany finished (status=failed, error=18: bad-txns-joinsplit-requirements-not-met)

subatomic should have the condition to handle a failed z_sendmany output.

fetch-params.sh problem

SPROUT_PKEY_NAME='sprout-proving.key'
SPROUT_VKEY_NAME='sprout-verifying.key'
SPROUT_PKEY_URL="https://z.cash/downloads/$SPROUT_PKEY_NAME"
SPROUT_VKEY_URL="https://z.cash/downloads/$SPROUT_VKEY_NAME"

there are no .keys in https://z.cash/downloads/
Checked with the browser.

I've changed fetch-params.sh as follows to get them, but i'm not sure if it is right thing to do.
SPROUT_PKEY_NAME='sprout-proving.key'
SPROUT_VKEY_NAME='sprout-verifying.key'
SPROUT_PKEY_URL="https://zensystem.io/downloads/$SPROUT_PKEY_NAME"
SPROUT_VKEY_URL="https://zensystem.io/downloads/$SPROUT_VKEY_NAME"

Revert change to src/util.cpp affected by merge (#958), which removed 'support for -zcashparamsdir parameter'

'support for -zcashparamsdir parameter' was committed to src/util.cpp in the miketout/VerusCoin repository by @miketout on Oct 24, 2018 - miketout@8a1e0d0 - and then with his commit 'Integrate latest Zcash fixes and update for non-latin user names' - miketout@99aeab2 - for no apparent reason immediately removed the feature, before creating pull request #958.

This feature has subsequently been added to the upstream zcash repository as 'Allow configure params directory' on Aug 7, 2020 so the feature is clearly not deprecated.
zcash@3b5966e

I think the -zcashparamsdir parameter is more appropriate for separate projects which share the common params with zcash as it distinguishes enhancements and feature sets created by first and third parties, but either way, please reintroduce this parameter either by reverting 99aeab2#diff-449acf764318b0ca96972daf8d28a28af79ad2c3381044851f2953792fcd8eef or merging the upstream -paramsdir parameter - zcash@3b5966e.

Copyright disclaimer refers to non-existent files

/******************************************************************************
 * Copyright © 2014-2018 The SuperNET Developers.                             *
 *                                                                            *
 * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at                  *
 * the top-level directory of this distribution for the individual copyright  *
 * holder information and the developer policies on copyright and licensing.  *

There is no AUTHORS or DEVELOPER-AGREEMENT or LICENSE files in komodo.git. Additionally this disclaimer is in many other files and repos and 3rd party coins which have DPoW.

When I update code with these disclaimers, in komodo.git and 3rd party repos, it's unclear what to do.

Depenency: libsodium 1.0.15 moved to old/

Describe the issue

In depends/packages/libsodium.mk, there is a url for libsodium 1.0.15, the link was previously
https://download.libsodium.org/libsodium/releases/libsodium-1.0.15.tar.gz

However, now the URL has to be

https://download.libsodium.org/libsodium/releases/old/libsodium-1.0.15.tar.gz

Notice the old directory it's been moved to

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Build komodo as specified

Expected behaviour

It gets dependencies correctly

Actual behaviour + errors

Fails to build due to dependency failure

curl: (22) The requested URL returned error: 404

Curl command examples need fixing

Describe the issue

I am informed by @leto that there is a script that auto-generates all komodo-cli rpc examples and inserts them into source code.

However, the way this script functions, parameters that are in curl commands are generated incorrectly.

For example:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "z_listunspent", "params": [6 9999999 false "["zs14d8tc0hl9q0vg5l28uec5vk6sk34fkj2n8s7jalvw5fxpy6v39yn4s2ga082lymrkjk0x2nqg37","zs14d8tc0hl9q0vg5l28uec5vk6sk34fkj2n8s7jalvw5fxpy6v39yn4s2ga082lymrkjk0x2nqg37"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:7771/

Note that the params has the parameters inserted improperly into the array.

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. ./komodo-cli help z_listunspent

Expected behaviour

It should insert the parameters into the array with proper formatting.

Actual behaviour + errors

Curl commands don't work.

The version of Komodo you were using:

Latest manual on dev branch

build-mac.sh broken

make[2]: *** No rule to make target `libcc.so', needed by `komodod'.  Stop.
make[2]: *** Waiting for unfinished jobs....

It seems that the CC makefile knows about so/dll/dylib, but our top level src/Makefile.am does not

Compile error on FSM + mac

This happened when I merged ebc5339 into Hush

cc/gateways.cpp: In function 'std::__cxx11::string GatewaysClaim(uint64_t, uint256, std::__cxx11::string, uint256, CPubKey, int64_t)':
cc/gateways.cpp:1050:114: error: control reaches end of non-void function [-Werror=return-type]
     CMutableTransaction mtx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), komodo_nextheight());
                                                                                                                  ^
cc1plus: all warnings being treated as errors
make[2]: *** [cc/libbitcoin_server_a-gateways.o] Error 1
make[2]: *** Waiting for unfinished jobs....

build-mac.sh does not support --disable-tests

I am a fan of not having build-mac.sh at all and making build.sh smarter, but that is a different issue.

build-mac.sh should support the same options, like --disable-tests, as build.sh, if it exists.

[nSPV] skipcount param does not work for listunspent and listtransasctions calls

same issue with libnspv: jl777/libnspv#37
'skipcount' parameter has currently no effect.

To reporduce:

  • take address with X amount of utxos/transactions
  • call listtransactions with skipcount = 0
  • call listtransactions with skipcount = N, N > 0

result: calls have same output
expected: 2nd call should have N less transactions/utxos in output

Commands might be used to check (for KMD):

./komodo-cli nspv_listunspent RBCSvPzYtTZ51RYbsDLKkQ58Mj5TuRRNeh

./komodo-cli nspv_listunspent RBCSvPzYtTZ51RYbsDLKkQ58Mj5TuRRNeh 0 30

./komodo-cli nspv_listtransactions RBCSvPzYtTZ51RYbsDLKkQ58Mj5TuRRNeh

./komodo-cli nspv_listtransactions RBCSvPzYtTZ51RYbsDLKkQ58Mj5TuRRNeh 0 30

Transactions are stuck in mempool if unconfirmed output is reused in another transaction.

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Send the transaction.
  2. Reuse it's unconfirmed output in another transaction.

Expected behaviour

All transactions mined.

Actual behaviour + errors

All transactions get stuck in some nodes mempool. E.g. these are visible in explorer, but not present on electrum servers, etc. The mempool is not synced between nodes.

The version of Komodo you were using:

Not sure about it, last error reported for OOT chain: https://discordapp.com/channels/412898016371015680/449950331577565194/661586034643042315
The transactions:
https://explorer.utrum.io/tx/d140693bc9c106ecfa28dd2d1cb3d5890371ee0dedd08f667f259faf9d8bf9b3
https://explorer.utrum.io/tx/bed8b7a4e6b42c1cdfdf689f8d279467eb266098dea7f585352b8b5349a3ea51
https://explorer.utrum.io/tx/90c9d04f6209825e2d42973e894d976cae0936514fd44cedd37fefac2359a449
were stuck unconfirmed until I explicitly rebroadcasted them using electrum server that didn't have them in mempool.

KV / kvsearch is not working properly with large strings

kvsearch is breaking between value size 3879 and 4364

for your reference
size 3879 txid 9d8412344f7e2cc4ea393a25fcb8b51094e9cfcd1fb822f5485f9b256e17d840
size 4364 txid 53a28255533764631ec718a3a9d7f89da806ad95c124d91cd1ce97d26f472309

master build fails

After pulling from master, zcutil/build.sh -j2 fails with following:

libzcash.a(libzcash_a-JoinSplit.o): In function libsnark::multipacking_gadget<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> >::multipacking_gadget(libsnark::protoboard<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> >&, libsnark::pb_linear_combination_array<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> > const&, libsnark::pb_linear_combination_array<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> > const&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': /home/phobos/komodo/src/./snark/libsnark/gadgetlib1/gadgets/basic_gadgets.tcc:69: undefined reference to libsnark::div_ceil(long, long)'
libzcash.a(libzcash_a-JoinSplit.o): In function libsnark::bit_vector_copy_gadget<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> >::bit_vector_copy_gadget(libsnark::protoboard<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> >&, libsnark::pb_variable_array<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> > const&, libsnark::pb_variable_array<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> > const&, libsnark::pb_linear_combination<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> > const&, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)': /home/phobos/komodo/src/./snark/libsnark/gadgetlib1/gadgets/basic_gadgets.tcc:157: undefined reference to libsnark::div_ceil(long, long)'
libzcash.a(libzcash_a-JoinSplit.o): In function libzcash::joinsplit_gadget<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r>, 2ul, 2ul>::verifying_field_element_size()': /home/phobos/komodo/src/./zcash/circuit/gadget.tcc:331: undefined reference to libsnark::div_ceil(long, long)'
/home/phobos/komodo/src/./zcash/circuit/gadget.tcc:331: undefined reference to libsnark::div_ceil(long, long)' libzcash.a(libzcash_a-JoinSplit.o): In function std::vector<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r>, std::allocator<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> > > libsnark::pack_bit_vector_into_field_element_vector<libsnark::Fp_model<4l, libsnark::alt_bn128_modulus_r> >(std::vector<bool, std::allocator > const&, unsigned long)':
/home/phobos/komodo/src/./snark/libsnark/algebra/fields/field_utils.tcc:70: undefined reference to libsnark::div_ceil(long, long)' libzcash.a(libzcash_a-JoinSplit.o):/home/phobos/komodo/src/./zcash/circuit/gadget.tcc:331: more undefined references to libsnark::div_ceil(long, long)' follow
collect2: error: ld returned 1 exit status
Makefile:1931: recipe for target 'komodod' failed
make[2]: *** [komodod] Error 1
make[2]: Leaving directory '/home/phobos/komodo/src'
Makefile:4043: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/phobos/komodo/src'
Makefile:658: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Consider changing type:cryptocondition to cc

This issue tracker is only for technical issues related to komodod

General Komodo questions and/or support requests and are best directed to Discord

Describe the issue

Please provide a general summary of the issue you're experiencing

We are deprecating all references of CryptoConditions, and replacing them with Custom Consensus

Via the documentation, I notice that in the decodeccopret rpc there is a direct reference to cryptoconditions.

See the issue here:

https://github.com/KomodoPlatform/developer-docs/blob/dev-theme/docs/basic-docs/komodo-api/util.md#decodeccopret

Expected behaviour

Tell us what should happen

If it's not too confusing and causes no breaking changes, perhaps we should change cryptoconditions in the type property to just cc.

getchaintips broken, crashed daemon

reported by siddhartha on discord

[Switching to Thread 0x7fffe8ff9700 (LWP 7389)]
std::_Rb_tree<CBlockIndex const*, CBlockIndex const*, std::_Identity<CBlockIndex const*>, CompareBlocksByHeight, std::allocator<CBlockIndex const*> >::_M_get_insert_unique_pos (__k=@0x7fffe8ff7f38: 0x0, 
    this=0x7fffe8ff7f50) at /usr/include/c++/5/bits/stl_tree.h:1810
1810    /usr/include/c++/5/bits/stl_tree.h: No such file or directory.
(gdb) backtrace
#0  std::_Rb_tree<CBlockIndex const*, CBlockIndex const*, std::_Identity<CBlockIndex const*>, CompareBlocksByHeight, std::allocator<CBlockIndex const*> >::_M_get_insert_unique_pos (__k=@0x7fffe8ff7f38: 0x0, 
    this=0x7fffe8ff7f50) at /usr/include/c++/5/bits/stl_tree.h:1810
#1  std::_Rb_tree<CBlockIndex const*, CBlockIndex const*, std::_Identity<CBlockIndex const*>, CompareBlocksByHeight, std::allocator<CBlockIndex const*> >::_M_insert_unique<CBlockIndex const*> (
    this=this@entry=0x7fffe8ff7f50, __v=@0x7fffe8ff7f38: 0x0)
    at /usr/include/c++/5/bits/stl_tree.h:1863
#2  0x0000555555716efe in std::set<CBlockIndex const*, CompareBlocksByHeight, std::allocator<CBlockIndex const*> >::insert (
    __x=@0x7fffe8ff7f38: 0x0, this=0x7fffe8ff7f50)
    at /usr/include/c++/5/bits/stl_set.h:494
#3  getchaintips (params=..., fHelp=<optimized out>)
    at rpcblockchain.cpp:1408
#4  0x000055555576b089 in CRPCTable::execute (this=<optimized out>, 
    strMethod="getchaintips", params=...) at rpcserver.cpp:672

I also tested this on PIRATE and it crashed my daemon, nothing interesting in debug.log

Feature Request: totalsupply as part of getInfo return JSON

This is a feature request for totalsupply as part of getinfo JSON return on assetchains no idea if it's possible.
Currently getInfo returns a JSON with the assetchainname

{
  "version": 1001550,
  "protocolversion": 170003,
  "KMDversion": "0.1.1",
  "notarized": 18170,
  "prevMoMheight": 18170,
  "notarizedhash": "00003ed43e386be0a82bf38bf7b965d9a9e12233ab8e0e745c99737d01f88b92",
  "notarizedtxid": "58adec8562e6f3fb9839a1cf2b5e8850d1480fd6b2d17b711e8ec3a2d43cefe2",
  "notarizedtxid_height": "mempool",
  "KMDnotarized_height": 0,
  "notarized_confirms": 0,
  "walletversion": 60000,
  "balance": 0,
  "blocks": 18174,
  "longestchain": 18174,
  "timeoffset": 0,
  "tiptime": 1530688628,
  "connections": 8,
  "proxy": "",
  "difficulty": 45.26496236118357,
  "testnet": false,
  "keypoololdest": 1530647784,
  "keypoolsize": 101,
  "paytxfee": 0.00000000,
  "relayfee": 0.00000100,
  "errors": "",
  "name": "RFOX",
  "p2pport": 32268,
  "rpcport": 8265,
  "magic": 1141288268,
  "premine": 1000000000,
  "reward": 100000000
}

an additional field "totalsupply" should be possible to be calculated with premine + (blocks * reward)
I understand this does not work for KMD because of the rewards and it would also need additional calculation for assetchains with variable rewards based on the blockheight which can be calculated from the other ac_parameters.

This feature would allow to patch the insight explorers to show the totalsupply which than can be used to mcap calculations.

Adding a more recent release

Is there any chance we can get a more recent release here on GitHub? The last one is from 2016. Alternatively, is there another place where releases can be authoritatively tracked?

corrupt packet checksum in kubernetes cluster

This issue tracker is only for technical issues related to komodod

General Komodo questions and/or support requests and are best directed to Discord

Describe the issue

Please provide a general summary of the issue you're experiencing

Blockchain does not load, seed happens I think

Below is a tcpdump that is reporting bad checksums on packet headers

    100.96.109.12.52134 > static.146.196.47.78.clients.your-server.de.7770: Flags [.], cksum 0xe454 (incorrect -> 0x6424), seq 129, ack 68, win 58, options [nop,nop,TS val 1104671909 ecr 836041991], length 0
17:03:22.009940 IP (tos 0x0, ttl 38, id 65037, offset 0, flags [DF], proto TCP (6), length 52)
    static.146.196.47.78.clients.your-server.de.7770 > 100.96.109.12.52134: Flags [F.], cksum 0x6533 (correct), seq 68, ack 129, win 30, options [nop,nop,TS val 836042003 ecr 1104671653], length 0
17:03:22.010016 IP (tos 0x0, ttl 64, id 995, offset 0, flags [DF], proto TCP (6), length 52)
    100.96.109.12.52134 > static.146.196.47.78.clients.your-server.de.7770: Flags [F.], cksum 0xe454 (incorrect -> 0x63e5), seq 129, ack 69, win 58, options [nop,nop,TS val 1104671958 ecr 836042003], length 0
17:03:22.264031 IP (tos 0x0, ttl 38, id 65038, offset 0, flags [DF], proto TCP (6), length 52)
    static.146.196.47.78.clients.your-server.de.7770 > 100.96.109.12.52134: Flags [.], cksum 0x63c2 (correct), seq 69, ack 130, win 30, options [nop,nop,TS val 836042066 ecr 1104671958], length 0

here is what .kmd/debug.log says

tail debug.log
2019-03-20 09:04:02 connect() to 88.99.251.101:7770 failed after select(): Connection refused (111)
2019-03-20 09:09:25 Misbehaving: 149.56.19.212:7770 (0 -> 1)
2019-03-20 09:09:25 ProcessMessages(reject, 43 bytes) FAILED peer=568
2019-03-20 09:09:28 Misbehaving: 52.65.58.103:7770 (0 -> 1)
2019-03-20 09:09:28 ProcessMessages(reject, 43 bytes) FAILED peer=569
2019-03-20 09:09:37 connect() to 159.65.134.48:7770 failed after select(): Connection refused (111)
2019-03-20 09:09:40 connect() to 95.213.238.98:7770 failed after select(): Connection refused (111)
2019-03-20 09:10:03 Misbehaving: 66.70.180.46:7770 (0 -> 1)
2019-03-20 09:10:03 ProcessMessages(reject, 43 bytes) FAILED peer=570
2019-03-20 09:10:11 connect() to 178.128.25.203:7770 failed after select(): Connection refused (111)

the state .kmd dir is in, it is missing some things compaired to a working instance:

root@kmd-0:~/.kmd# ls -l
total 948
drwx------ 3 root root   4096 Mar 14 10:45 blocks
drwx------ 2 root root   4096 Mar 19 09:59 chainstate
drwx------ 2 root root   4096 Mar 14 10:45 database
-rw------- 1 root root      0 Mar 14 10:45 db.log
-rw------- 1 root root 834353 Mar 20 09:22 debug.log
drwxrwxrwx 2 root root   4096 Mar 19 09:59 komodo.conf
-rw------- 1 root root      2 Mar 19 09:59 komodod.pid
drwx------ 2 root root  16384 Mar 14 10:42 lost+found
drwx------ 2 root root   4096 Mar 19 09:59 notarisations
-rw------- 1 root root   4904 Mar 20 09:11 peers.dat
-rw------- 1 root root  81920 Mar 14 10:45 wallet.dat

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

I load the pod in kubernetes

Expected behaviour

it loads block chain info

Actual behaviour + errors

Tell us what happens instead including any noticable error output (any messages displayed on-screen when e.g. a crash occurred)

error is block count is 0 after several days

The version of Komodo you were using:

Komodo Daemon version v1.0.15-5563cfe

Machine specs:

  • OS name + version: ubuntu 16.04
  • CPU: 1 vcpu
  • RAM: 4gb
  • Disk size: 50gb
  • Disk Type (HD/SDD): ssd
  • Linux kernel version (uname -a): 4.15.0-45-generic #48~16.04.1-Ubuntu
  • Compiler version (gcc -version): don't know

Any extra information that might be useful in the debugging process.

Do you have a backup of ~/.komodo directory and/or take a VM snapshot?

build-mac.sh fails on latest libcurl changes

On latest jl777 branch after recent libcurl changes:

$ ./zcutil/build-mac.sh -j6
echo Building libcurl...
Building libcurl...
mkdir -p /Users/jonathanleto/git/hush3/depends/work/build/x86_64-apple-darwin17.5.0/libcurl/7.64.1-10ca6f1e7a3/.
cd /Users/jonathanleto/git/hush3/depends/work/build/x86_64-apple-darwin17.5.0/libcurl/7.64.1-10ca6f1e7a3/.; MACOSX_DEPLOYMENT_TARGET="10.9" PATH="/Users/jonathanleto/git/hush3/depends/x86_64-apple-darwin17.5.0/native/bin:/opt/local/bin:/opt/local/sbin:/Users/jonathanleto/perl5/bin:/Users/jonathanleto/perl5/perlbrew/bin:/Users/jonathanleto/.cabal/bin:/Users/jonathanleto/pg/bin:/home/leto/local-lib/bin::/Users/jonathanleto/perl5/bin:/Users/jonathanleto/git/parrot/installed_parrot/bin:/Users/jonathanleto/git/parrot/tools/dev:/opt/local/bin:/Users/jonathanleto/bin:/usr/local/bin:/sbin:/bin:/usr/sbin:/opt/local/sbin:/usr/bin:/usr/games:/opt/bin:/usr/local/sbin:/usr/X11R6/bin:/bin:/Users/jonathanleto/svn/llvm/Debug/bin:/Users/jonathanleto/.gem/ruby/1.8/bin:/Users/jonathanleto/android/sdk/tools:/usr/texbin:/Library/TeX/texbin/"   /Library/Developer/CommandLineTools/usr/bin/make CPPFLAGS='-fPIC' CFLAGS='-mmacosx-version-min=10.9'
Making all in lib
/Library/Developer/CommandLineTools/usr/bin/make  all-am
/bin/sh ../libtool  --tag=CC   --mode=compile gcc-6 -DHAVE_CONFIG_H   -I../include -I../lib -I../lib  -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -fPIC  -fvisibility=hidden -mmacosx-version-min=10.9 -MT libcurl_la-md5.lo -MD -MP -MF .deps/libcurl_la-md5.Tpo -c -o libcurl_la-md5.lo `test -f 'md5.c' || echo './'`md5.c
/bin/sh ../libtool  --tag=CC   --mode=compile gcc-6 -DHAVE_CONFIG_H   -I../include -I../lib -I../lib  -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -fPIC  -fvisibility=hidden -mmacosx-version-min=10.9 -MT libcurl_la-hostasyn.lo -MD -MP -MF .deps/libcurl_la-hostasyn.Tpo -c -o libcurl_la-hostasyn.lo `test -f 'hostasyn.c' || echo './'`hostasyn.c
/bin/sh ../libtool  --tag=CC   --mode=compile gcc-6 -DHAVE_CONFIG_H   -I../include -I../lib -I../lib  -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -fPIC  -fvisibility=hidden -mmacosx-version-min=10.9 -MT libcurl_la-hostip4.lo -MD -MP -MF .deps/libcurl_la-hostip4.Tpo -c -o libcurl_la-hostip4.lo `test -f 'hostip4.c' || echo './'`hostip4.c
/bin/sh ../libtool  --tag=CC   --mode=compile gcc-6 -DHAVE_CONFIG_H   -I../include -I../lib -I../lib  -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -fPIC  -fvisibility=hidden -mmacosx-version-min=10.9 -MT libcurl_la-hostip6.lo -MD -MP -MF .deps/libcurl_la-hostip6.Tpo -c -o libcurl_la-hostip6.lo `test -f 'hostip6.c' || echo './'`hostip6.c
/bin/sh ../libtool  --tag=CC   --mode=compile gcc-6 -DHAVE_CONFIG_H   -I../include -I../lib -I../lib  -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -fPIC  -fvisibility=hidden -mmacosx-version-min=10.9 -MT libcurl_la-hostsyn.lo -MD -MP -MF .deps/libcurl_la-hostsyn.Tpo -c -o libcurl_la-hostsyn.lo `test -f 'hostsyn.c' || echo './'`hostsyn.c
/bin/sh ../libtool  --tag=CC   --mode=compile gcc-6 -DHAVE_CONFIG_H   -I../include -I../lib -I../lib  -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -fPIC  -fvisibility=hidden -mmacosx-version-min=10.9 -MT libcurl_la-inet_ntop.lo -MD -MP -MF .deps/libcurl_la-inet_ntop.Tpo -c -o libcurl_la-inet_ntop.lo `test -f 'inet_ntop.c' || echo './'`inet_ntop.c
libtool: compile:  gcc-6 -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -fPIC -fvisibility=hidden -mmacosx-version-min=10.9 -MT libcurl_la-hostasyn.lo -MD -MP -MF .deps/libcurl_la-hostasyn.Tpo -c hostasyn.c -o libcurl_la-hostasyn.o
libtool: compile:  gcc-6 -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -fPIC -fvisibility=hidden -mmacosx-version-min=10.9 -MT libcurl_la-hostip4.lo -MD -MP -MF .deps/libcurl_la-hostip4.Tpo -c hostip4.c -o libcurl_la-hostip4.o
libtool: compile:  gcc-6 -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -fPIC -fvisibility=hidden -mmacosx-version-min=10.9 -MT libcurl_la-md5.lo -MD -MP -MF .deps/libcurl_la-md5.Tpo -c md5.c -o libcurl_la-md5.o
libtool: compile:  gcc-6 -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -fPIC -fvisibility=hidden -mmacosx-version-min=10.9 -MT libcurl_la-inet_ntop.lo -MD -MP -MF .deps/libcurl_la-inet_ntop.Tpo -c inet_ntop.c -o libcurl_la-inet_ntop.o
libtool: compile:  gcc-6 -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -fPIC -fvisibility=hidden -mmacosx-version-min=10.9 -MT libcurl_la-hostip6.lo -MD -MP -MF .deps/libcurl_la-hostip6.Tpo -c hostip6.c -o libcurl_la-hostip6.o
libtool: compile:  gcc-6 -DHAVE_CONFIG_H -I../include -I../lib -I../lib -DBUILDING_LIBCURL -DCURL_STATICLIB -DCURL_HIDDEN_SYMBOLS -fPIC -fvisibility=hidden -mmacosx-version-min=10.9 -MT libcurl_la-hostsyn.lo -MD -MP -MF .deps/libcurl_la-hostsyn.Tpo -c hostsyn.c -o libcurl_la-hostsyn.o
md5.c:88:25: fatal error: openssl/md5.h: No such file or directory
 #include <openssl/md5.h>
                         ^
compilation terminated.
make[3]: *** [libcurl_la-md5.lo] Error 1
make[3]: *** Waiting for unfinished jobs....

Same error happens on hush3 and komodo.git repos.

broken links in readme

  • More in depth covered here
  • Also note you receive 5% Active User Reward on your balance.
    See this article for more details

well.. the google doc is access restricted... not broken link, per se.

but the following link is def.

Thx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.