Git Product home page Git Product logo

supernet's Introduction

SuperNET Client "iguana"

OS Build Status
Unix (Ubuntu 14.04) Build Status
Chrome Build Status
Android Build Status
iOS Build Status
Windows 32 Bit Build Status
Windows 64 Bit Build Status
docs.supernet.org Build Status

Codebase is going under radical changes now and versions from mid-May should be used unless you are doing advanced testing. There will be four layers:

gecko: abstracted bitcoin compatible blockchains that run via basilisk lite mode or as iguana core full network peers. I will try to get a geckochain to simultaneously have both virtual basilisk nodes and private iguana nodes, but at first will probably need to choose which mode a new chain will be and transition between the two via special suspend and resume functions that allow migration from virtual to physical. Each specific geckochain will be able to be enhanced into a datachain.

basilisk: abstracted crypto transactions layer, which has a reference implementation for bitcoin protocol via the iguana nodes, but can be expanded to support any coin protocol that can support the required functions. Since it works with bitcoin protocol, any 2.0 coin with at least bitcoin level functionality should be able to create a basilisk interface.

iguana: most efficient bitcoin core implementation that can simultaneously be full peers for multiple bitcoin blockchains. Special support being added to virtualize blockchains so all can share the same peers. The iguana peers identify as a supernet node, regardless of which coin, so by having nodes that support multiple coins, supernet peers are propagated across all coins. non-iguana peers wont get any non-standard packets so it is interoperable with all the existing bitcoin and bitcoin clone networks

komodo: this is the top secret project I cant talk about publicly yet

TL;DR

sudo apt-get update; sudo apt-get install git libcurl4-openssl-dev build-essential libnanomsg-dev; git clone https://github.com/jl777/SuperNET; cd SuperNET; ./m_onetime m_unix;

The above one line gets SuperNET installed, built and launched for unix.

After that ./m_unix updates to latest. Continue below at "Running".

iguana is easy to build. Start by cloning (or downloading) this repository. *** all external dependencies have been removed, except for -lpthread and -lm

##For native (win32, win64)## TOOL_DIR := /usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/win32-gcc/bin MINGW := i586-mingw32 The above two definitions need to be changed to match the mingw install on your system. m_win32 and m_win64 just invokes the makefile in mingw32 and mingw64

For chrome app

You need to make sure the nacl sdk is properly installed and you are able to build the examples. Now you will need to get the external libs, which can be built from scratch using naclports or there use the reference builds of libcurl.a and libz.a in the SuperNET/crypto777/pnacl_libs. You can just copy those over into $(NACL_SDK_ROOT)/<pepper_dir>/lib/pnacl.

For android

You have to build a native libnanomsg for android. This section is work in progress. Contact [email protected] for assistance on building latest iguana for android.

ONETIME

Now you are ready to build. I try to make the build process as simple as possible, so there are no autoconf, autoreconf, configure, cmake, make, to get properly installed and running and run, etc. You do need a C compiler, like gcc.

The first time you need to build libcrypto777.a and to do that you need to run:

For unix: ./m_onetime m_unix

For osx: ./m_onetime m_osx

For win32: ./m_onetime m_win32

For win64: ./m_onetime m_win64

#(RE)BUILD

Once libcrypto777.a is built, you can build the agents.

For pnacl: cd crypto777; make clean; make; cd ../iguana; make clean; make

For unix: ./m_unix

For osx: ./m_osx

For win32: ./m_win32

For win64: ./m_win64

The m_(OS) is a standard I follow and should be self explanatory. within each is usually just a few lines, ie compile all the .c files and link with the standard libs.

To build just iguana, you can cd into SuperNET/iguana and do ./m_unix (or ./m_osx, ...).

./m_clean will remove the files created from the building

RUNNING

The native versions are command line applications: agents/iguana {JSON} The chrome app pexe requires that the chrome is launched with a command line parameter (tools/chrome.localhost) and then browse to http://127.0.0.1:7777 to see the pexe

SUPERUGLYGUI

Once iguana is running, you can see the superuglyGUI at http://127.0.0.1:7778/?method by submitting API calls using the forms, you will see it go to some specific URL. You can also do a programmatic GET request to http://127.0.0.1:7778/api/<path to apicall>

http://127.0.0.1:7778/ramchain/block/height/0 -> full webpage

http://127.0.0.1:7778/json/ramchain/block/height/0 -> JSON only

curl --url "http://127.0.0.1:7778/ramchain/BTCD/block/height/0" --> full webpage returned (probably not what you want) curl --url "http://127.0.0.1:7778/api/ramchain/BTCD/block/height/0" --> returns just the json object from the api call

Internally, all paths convert the request into a standard SuperNET JSON request. you can use a POST command to directly submit such JSON requests: curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"ramchain\",\"method\":\"block\",\"coin\":\"BTCD\",\"height\":0}"

Another approach is to use the bitcoin RPC syntax via: curl --url "http://127.0.0.1:7778" --data "{"coin":"BTCD","method":"getinfo","params":[]}" the params:[] array is where the standard bitcoin parameters go, the only change that is needed is to specify the coin alternatively {"agent":"SuperNET","method":"bitcoinrpc","coin":"BTCD"} will set the coin to use for bitcoin RPC calls. this will suffice in single coin environments

curl --url "http://127.0.0.1:7778" --data "{"agent":"iguana","method":"test"}" curl --url "http://127.0.0.1:7778/iguana/test" -> html page with results curl --url "http://127.0.0.1:7778/api/iguana/test" -> just json text http://127.0.0.1:7778 -> superugly GUI http://127.0.0.1:7778/iguana/test http://127.0.0.1:7778/api/iguana/test postCall('{"agent":"iguana","method":"test"}'} iguana_JSON("{"agent":"iguana","method":"test"}"); -> direct C function call

iguana can be invoked with a command line argument. if it is a name of a file, it will load it and check to see if it is valid JSON and if it is, it will use it. Otherwise the command line argument needs to be valid JSON to be used and it will process the JSON to initialize account passphrases, exchange apikeys, etc. A few special keys:

"wallet" -> passphrase used for the persistent privkey "2fafile" -> secondary part (optional) for the persistent privkey "numhelpers" -> number of helper threads (need at least 1) "exchanges" -> { "name":"", ... } "apikey", "apisecret", "userid", "tradepassword" these are as expected "pollgap" -> gap between each access to exchange for getting prices

on OSX mksquashfs is not native, you will need to install fuse: https://osxfuse.github.io/ and a squashfs for mac: https://github.com/vasi/squashfuse

**********
user feedback:
A Note on Installation from pebwindkraft at bitco.in

======================= Though I had xcode installed, aclocal didn’t work. I installed homebrew, and then: brew install autoconf brew install automake brew install gmp

2.) libsecp256 it complained, that libsecp256 was not there in includes, so I linked it. Loretta:/Users/volker/SuperNET/includes # ln -s ../osx/libsecp256k1 .

3.) I had to change ulimit During the syncing, I have many, many messages like this:

cant create.(tmp/BTC/252000/.tmpmarker) errno.24 Too many open files cant create.(tmp/BTC/18000/.tmpmarker) errno.24 Too many open files

Loretta:/Users/volker/SuperNET # ulimit -n 100000

tests

in the SuperNET/iguana/tests directory, there is a jsoncmp.c file, which can be built into the jsoncmp executable via ./make_jsoncmp once jsoncmp is built, then ./test shows how to use it ./jsoncmp {"fields":[{"fieldA":"requiredvalueA"},{"fieldB":"requiredvalueB"},...]}

the idea is to issue a curl command into a /tmp/file and then use jsoncmp to verify the exact value of one or more fields. it will print to stdout JSON with "error" or "result" and to stderr if there is an error

../agents/iguana notary

0.Have iguana installed at http://wiki.supernet.org/wiki/How_To_Install_Iguana_on_Linux also install nanomsg: sudo apt-get install libnanomsg-dev ports 7775 will be used

cd Supernet/iguana -->

../agents/iguana

#In another SSH window:

cd Supernet/iguana/coins -->

./basilisk

  1. Create an iguana wallet with encryptwallet and importprivkey into both komodod and bitcoind using the KMDwif and BTCwif in the encryptwallet result

curl --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"encryptwallet","passphrase":"insert very secure password here"}"

  1. Go to SuperNET/iguana/

pico wp

curl --url "http://127.0.0.1:7778" --data "{"method":"walletpassphrase","params":["same passphrase as above", 9999999]}"

#Save the file then run the following command:

chmod +x wp

#Run the file

./wp

#Get the btcpubkey key from the output and give it to James.

  1. create a text file SuperNET/iguana/myip.txt with just your ip address in it:

pico myip.txt

#Put your WAN IP of your node

  1. create a text file with the user home dir in it:

pico userhome.txt root

  1. make a copy of SuperNET/iguana/wp -> SuperNET/iguana/wp_7776 and change port 7778 to port 7776

cp wp wp_7776 pico wp_7776

#Then change the port to 7776 from within the new file.

  1. make a copy of SuperNET/iguana/tests/dpow_7776 to SuperNET/iguana/dpow_7776 and edit the pubkey to match your btcpubkey from above

cp dpow_7776 ../ pico dpow_7776

  1. make sure system clock is synchronized sudo service ntp stop sudo ntpdate -s time.nist.gov sudo service ntp start

Now things should be ready. To update and run notary node: pkill iguana; ./m_LP; tests/notaryinit

##Build for OSX distribution## Get OSX SDK 10.6 from https://github.com/ca333/MacOSX-SDKs/releases/tag/10.6

Unpack & move the .sdk folder to Xcodes SDK folder:

cd DownloadDirectory

mv MacOSX10.6.sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/.

If you are using Xcode > 7.3 add the new SDK to XCode by changing MinimumSDKVersion in your Info.plist:

vi /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Info.plist

Change the value to:

<key>MinimumSDKVersion</key>
<string>10.6</string>

Build crypto777 library and agents with OSX release makefile:

./m_onetime m_osx_release

Execute the OSX deploy script:

./osx_deploy.sh

The iguana binary and its linked libraries are in $HOME/tmp/iguana.

Cmake build of marketmaker with linked etomic lib for ETH/ERC20 atomic swaps:

  1. make sure g++-7 ln to /usr/bin/g++
  2. cd ~/SuperNET
  3. git checkout dev
  4. git submodule update --init --recursive
  5. mkdir build
  6. cd build
  7. cmake ..
  8. cmake --build . --target marketmaker-testnet for Ropsten Ethereum testnet.
  9. cmake --build . --target marketmaker-mainnet for Ethereum mainnet.
  10. cd build/iguana/exchanges
  11. ./marketmaker-testnet or ./marketmaker-mainnet

supernet's People

Contributors

artemgr avatar artemii235 avatar ca333 avatar cipig avatar deckersu avatar emc2foundation avatar etszombi avatar fadedreamz avatar flamingice avatar freexploit avatar himu007 avatar jl777 avatar jorian avatar kolobus avatar leto avatar lukechilds avatar mirrt avatar miyurz avatar nn-fullmoon avatar oxarbitrage avatar pbca26 avatar ptyx11 avatar rohvsh avatar satindergrewal avatar shailesh09 avatar siulynot avatar st3rling0x avatar titomane avatar usamir avatar vineetbhargav86 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

Watchers

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

supernet's Issues

GETADDRESSBYACCOUNT RPC returning empty list depsite being having multiple addresses associated to an IGUANA account

here is the somepart of the dumpwallet file that you can see the addresses belongs to IGUANA account

"IGUANA":{"19405d0cbeeb34a70fae0428497775d8d8357030":"d45ecaeb08fbb94eeb3b32de785958b0bc63b42373b7fe84452c7218683b1386","e2a2186135770d59280c28666829c9e9e3de9fa7":"2c2d00a06adf8baf4adefab74c12f86615325fea9cde1651f78850b5f5645ba2","87b79643c0895de570fe1d014cbbdcf6086bde03":"7a5a0179e62842181b5e3c32f78e19ca6fb10f32932794d3a938590b1afe93f3","e6ac80a8db27a3991a36c478618893c4fd1bb117":"8a065016977fe061697436aa737930e4579ece7f1fe6defbd8bccc572113a5ae","bde7f829f35be68ae6652de6af9a96b5ad1f2694":"67fbd5f3707b83ff8850b49dea7be6bb64e16ca9dd8d3ab4b58cd3f24b129a9f","77dfd58fdee7643f4a812203e05b28739d89ded8":"919ad7b0fa17e1b7deceab420462192e2c5efc7e867862803611b11366f69ac2","2d30ec68a9bb4f547956ee0f7b1873454b501d64":"ffd7c1987f31a9c630c3db276458b04d03f88319cd83b1b97ccde472a66f6555","ebff1d001d3314b21b2deefe1cce8e80ab3d392d":"29c28bc64912d096ef166b95760d1b0aabb51ed0c7b4e2725c3a0ca080326f9f","c999aa19d8172a0b52d1c49044e4e78ccec41414":"e05daaab941464f7329c66860fbec7018968bd6af7d8d664b8385204f5c3bac0","f6407980a8fbab82cc4859368f1484954fd7969b":"df5cec10c7afa87b33011c9c94bd6a70575e7d9046d1879c4d8d559c05abfca1","1ff760309b0ec38ad8eb21cea806bf16928db48a":"e7afd9319bc47e435bee6d1157cd494c9a412d9d6058aaef79542eff5a9e66aa","367edcd5884c5cb11ee43840233f7f3205bf7483":"bc0fe5b9393b4b2fbce2e9f5d1701ad9e4eb28ffbe4b40c992418daa24608dd7","35e7408f9df641a655fea39c156b95911c9763e5":"e8881aee74c308c292582a9d650f35b5a4ddff05b66a5afe049b1829da487e0b","4d4c74cd57f9cf56c0ca3c9f5989092a8086929e":"85933b1ef38b8c6a9a238f0c034e763b753643cc159e7f0e7ad8a8cbd80f4894","8d01194b8880189bc8d3e606f13fbb5643af0d80":"835558c182fc9c21cd4b5cd1d3fefa814d387177bed159ca97b786bbb97cda36","eb27da66fb89a9831ee8376cff6d34827179830f":"b062bf6e247b78f630d7e1c83b9d418554bbf5d7664feec5ebad7c43b2e549f1","0c54a561d3917956c512fbb7f22b60853484edb8":"88e973859c92b4a7891189ca9f25e261959beb97ab27f572c99b537e8a5c359e","873dc351a679c0bbe0e5890c7c336f52f4a98cd5":"a88f3d4b42f846515192e8acdf5b62c2447d5d4ac3de7a5f3c76d0ec11b8f15b"},"check":{"6a47e4d6ecd6c5bd4f971abf0e86c9ece26c9b31":"c19dafe3563e14d08d75f44fb130e374fd90f5006c1e0c921e74389383635232"},"bug":{"c7e1df533ecdb5f1af85dc19808d05fc00db5ca5":"a6fbf39459fcd6311aed88472e6f48659ae9f6bfd04bffe20456c9a37a21a0b9"}},"tag":"15103772134764966586"}

BTM: getaccountaddress I think should show "account:"default" instead of "account":"test"

Noticed:
(bMS5HSgJoJJemNGCEAVQerDFZMJuyw5d6p) account.(default)
(bR6T1LAzUQ2T3KwEb2LDAk9qrN15TUsCBA) account.(test)

./getaccountaddress
{"address":"bR6T1LAzUQ2T3KwEb2LDAk9qrN15TUsCBA","rmd160":"87a2da4a203d8a1302d2336fd8ba61ec4bd0a582","coin":"BTM","pubkey":"03ce53d7b7c172b4809f553e1aee614df6d70ad70a03974515869b9756fb483d4e","account":"test","result":"success","tag":"13622212562511364493"}

This api call shows the 'test' address, but I think it should show the 'default address'.

sendtoaddress couldnt create rawtx

  1. Launch ../agents/iguana
  2. Sync BTC to RT
  3. load a wallet with "walletpassphrase" method, privatekey with balance was PMd on slack
  4. Did "balance" api call for address: 19hobDLpSxvBFXQq9WBKSC5P4UQjZcuLSc, result was correct.
  5. Did:

curl --url "http://127.0.0.1:7778" --data "{"coin":"BTC","method":"sendtoaddress","params":["1K5ixdY6V23qnkQ3QEfr29H1VjvnxHxjoz", 0.001, "testcomment", "sendcomment"]}"

Result:

{"result":"592f2f369c5e7d463c9c27ee80a6eab07836d66ace1e2577e5da2fb473bf5067","signedtx":"0100000002aa2571302d0b58abe7a31f5ec64a27b449728e73d2d42c93e947081c9eef17e8000000006b483045022100da758d6ead93edccc5445919fde2964f433c3e816146e12bf01ab3b1cc3c3a7302203e4929fe0a98d6f98e03426a2523dca269fccdc517ad8ef6a534530963a035dc012102fe3c5930203d40dc84a77a69db78800c9ae5f881bff30d866cfb9b7a92daf674ffffffff6622d6b44cd9bd598e107fc990af9e9526189f6195901b6979a8ca03f2881eb10000000000ffffffff02a0860100000000001976a914c656f42448ba505b97848f3c6ccdb9c4a9aa4fec88ac893f1100000000001976a9145f7889380b9ea08fd8fa03145651cf9a214cfdc088ac00000000","complete":false,"tag":"13520151394432839433"}

COMPLETE: FALSE

  1. Ouput from iguana process was:

SEND.({"error":"couldnt create rawtx"})
numunspents.2 max.10000 sum 0.01240377 required 0.00110000
avail 0.01240377 satoshis 0.00100000, txfee 0.00010000 burnamount 0.00000000 vin0.scriptlen 25
stackdepth.0 needed.1 ( OP_HASH160 5f7889380b9ea08fd8fa03145651cf9a214cfdc0 OP_EQUALVERIFY OP_CHECKSIG) at offset.6
empty stack error
iguana_interpreter -1 error.(0100000002aa2571302d0b58abe7a31f5ec64a27b449728e73d2d42c93e947081c9eef17e8000000006b483045022100da758d6ead93edccc5445919fde2964f433c3e816146e12bf01ab3b1cc3c3a7302203e4929fe0a98d6f98e03426a2523dca269fccdc517ad8ef6a534530963a035dc012102fe3c5930203d40dc84a77a69db78800c9ae5f881bff30d866cfb9b7a92daf674ffffffff6622d6b44cd9bd598e107fc990af9e9526189f6195901b6979a8ca03f2881eb10000000000ffffffff02a0860100000000001976a914c656f42448ba505b97848f3c6ccdb9c4a9aa4fec88ac893f1100000000001976a9145f7889380b9ea08fd8fa03145651cf9a214cfdc088ac00000000)
signrawtransaction incomplete
SEND.({"result":"592f2f369c5e7d463c9c27ee80a6eab07836d66ace1e2577e5da2fb473bf5067","signedtx":"0100000002aa2571302d0b58abe7a31f5ec64a27b449728e73d2d42c93e947081c9eef17e8000000006b483045022100da758d6ead93edccc5445919fde2964f433c3e816146e12bf01ab3b1cc3c3a7302203e4929fe0a98d6f98e03426a2523dca269fccdc517ad8ef6a534530963a035dc012102fe3c5930203d40dc84a77a69db78800c9ae5f881bff30d866cfb9b7a92daf674ffffffff6622d6b44cd9bd598e107fc990af9e9526189f6195901b6979a8ca03f2881eb10000000000ffffffff02a0860100000000001976a914c656f42448ba505b97848f3c6ccdb9c4a9aa4fec88ac893f1100000000001976a9145f7889380b9ea08fd8fa03145651cf9a214cfdc088ac00000000","complete":false})

DGB: listtransactions also an empty array

curl --url "http://127.0.0.1:7778" --data "{"coin":"DGB","method":"listtransactions","params":[1, 9999999, [" DDqu8UHTkNpTnXbRt6AsyxEywc92qLHkj5"]]}"

Results:
{"result":[],"tag":"14632759091918747392"}

When balance and listunspent show properly. Same behavior as DOGE and BTM.

listtransactions is showing local address instead of receiver/sender

curl --url "http://127.0.0.1:7778" --data "{"coin":"SYS","method":"listtransactions","params":["default"]}"
{"result":[{"account":"default","txid":"3d963892709ce179940a1278e2097ff784eee06ee9714e1a66cfbd4736b8bcd7","vout":0,"amount":0.00099774,"category":"receive","address":"15K5spF7woSF4rzGsQWSLVttmCF1nGGDXe","blockhash":"074ab228302e150cdf521d36ae3dc0b38b22417835ab77c466cb3e46d4b2026b","blocktime":1474305899,"height":195298,"confirmations":6495}],"tag":"972389542522999194"}

curl --url "http://127.0.0.1:7778" --data "{"coin":"SYS","method":"getaccountaddress","params":["default"]}"{"address":"15K5spF7woSF4rzGsQWSLVttmCF1nGGDXe","rmd160":"2f4c0f91fc06ac228c120aee41741d0d39096832","coin":"SYS","pubkey":"02743d2afdb88ede68fb5938e961b1f41c2b6267b3286516543eb4e4ab87ad0d0a","account":"default","result":"success","tag":"2921464170834827986"}

correct address value is supposed to be 1NarkGAzQxsxz3uCAv7i6yPoDNsFNDrRpH for tx 3d963892709ce179940a1278e2097ff784eee06ee9714e1a66cfbd4736b8bcd7
not my own address 15K5spF7woSF4rzGsQWSLVttmCF1nGGDXe

rates rpc causing crash when it's executed simultaneously

bitstamp invalid (EUR) or (USD)
({"result":"success","aveprice":1.08955011,"avebid":1.08926023,"bidvol":4.34822444,"aveask":1.08984000,"askvol":2.96437299}) <- aveprice 1.089550
bitcoin invalid (BTC) or (EUR)
btc38 invalid (BTC) or (EUR)
huobi invalid (BTC) or (EUR)
instaforex invalid (BTC) or (EUR)
coinbase invalid (BTC) or (EUR)
lakebtc invalid (BTC) or (EUR)
quadriga invalid (BTC) or (EUR)
okcoin invalid (BTC) or (EUR)
Monitor.btce (BTC EUR) invert.0
bitstamp invalid (BTC) or (EUR)
bitcoin invalid (BTC) or (EUR)
btc38 invalid (BTC) or (EUR)
huobi invalid (BTC) or (EUR)
instaforex invalid (BTC) or (EUR)
coinbase invalid (BTC) or (EUR)
lakebtc invalid (BTC) or (EUR)
quadriga invalid (BTC) or (EUR)
okcoin invalid (BTC) or (EUR)
bitstamp invalid (BTC) or (EUR)
({"result":"success","aveprice":0,"avebid":0,"bidvol":0,"aveask":0,"askvol":0}) <- aveprice 0.000000
bitcoin invalid (BTC) or (USD)
poloniex invalid (BTC) or (USD)
bittrex invalid (BTC) or (USD)
btc38 invalid (BTC) or (USD)
huobi invalid (BTC) or (USD)
instaforex invalid (BTC) or (USD)
bitcoin invalid (BTC) or (USD)
poloniex invalid (BTC) or (USD)
bittrex invalid (BTC) or (USD)
btc38 invalid (BTC) or (USD)
huobi invalid (BTC) or (USD)
instaforex invalid (BTC) or (USD)
*** stack smashing detected ***: agents/iguana terminated
Aborted (core dumped)
curl --url "http://127.0.0.1:7778" --data "{"agent":"iguana","method":"rates","quotes":["BTC/USD", "EUR/USD", "BTC/EUR"]}"

curl --url "http://127.0.0.1:7778" --data "{"agent":"iguana","method":"rates","quotes":["BTC/USD", "EUR/USD", "BTC/EUR"]}"

curl --url "http://127.0.0.1:7778" --data "{"agent":"iguana","method":"rates","quotes":["BTC/USD", "EUR/USD", "BTC/EUR"]}"

SETACCOUNT RPC doesn't associate the address to an account

SETACCOUNT RPC doesn't associate the address to an account.

RQK4mc7ZySXtQ6EweC4r2fcCdBTvsZqDc6
now when i try to set that address to IGUANA_CHANGE account using setaccount rpc curl --url "http://127.0.0.1:7778" --data "{"method":"setaccount","params":["RQK4mc7ZySXtQ6EweC4r2fcCdBTvsZqDc6", "IGUANA_CHANGE"]}"
rpc returned with status sucess but the address isn't connected with account. In order to make sure that the address was associated correctly, executed getaddressbyaccount rpc curl --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"getaddressesbyaccount","account":"IGUANA_CHANGE"}"
but i found that the address wasn't associated.

here is the result of getaddressbyaccount rpc

./getaddressbyaccount_WVN
{"result":["RSPpBwKyUerKttuo8s4nGDvJiG2TYBpaC1", "RNd62UYmMcncxmREXLWLqpDd45aTJQkVdx", "RWz1hjUawcERrKUR6CyF28aJjYudYa1mrn", "RLbuYWNHCp8gjcvjG6mHjrj9Nw7LZwGnVp"],"tag":"17793352264303860810"}

see set account didn't set the address the remaining amount address to IGUANA_CHANGE account

and these addresses :["RSPpBwKyUerKttuo8s4nGDvJiG2TYBpaC1", "RNd62UYmMcncxmREXLWLqpDd45aTJQkVdx", "RWz1hjUawcERrKUR6CyF28aJjYudYa1mrn", "RLbuYWNHCp8gjcvjG6mHjrj9Nw7LZwGnVp"] i didn't set them to IGUANA_CHANGE account

CURL TO REPRODUCE THE ISSUE:

curl --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"encryptwallet","passphrase":"testingaccount"}"
curl --url "http://127.0.0.1:7778" --data "{"method":"setaccount","params":["RQK4mc7ZySXtQ6EweC4r2fcCdBTvsZqDc6", "setaccount"]}"
curl --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"getaddressesbyaccount","account":"setaccout"}"
here you will see that RQK4mc7ZySXtQ6EweC4r2fcCdBTvsZqDc6 wouldn't associate with setaccount,
by re-running the setaccount rpc would associate new address to same account(setaccount) but still not the address(RQK4mc7ZySXtQ6EweC4r2fcCdBTvsZqDc6) we want to associate

call to getaccountaddress rpc each time doesn't generate new address

Once a payment has been received to an address generated by getaccountaddress rpc, future calls to this RPC for the same account will return a different address.

if that is the case we would need to send payment to that address. once the payment is done on that address then we would need to re-execute that rpc again to check that if its account to different address or not

currently I'm getting the same address
everytime

jl777 [9:51 PM]
ok, that is not implemented and not an quick fix. plz make github issue for this for now

for reference:
kashif@ubuntu:/tests$ ./getaccountaddress_WVA
{"address":"RQCP1TcfevTQU35ZftPNx2TZpB9ZkSZQ3S","rmd160":"a3a0ee4fc2455ed9e1d57ef87dac45513f8a5441","coin":"BTCD","pubkey":"02c38bea4010d53e9d2b5079cbe402f6e59e8e1ad082caab6becd2102229259a8b","account":"IGUANA","result":"success","tag":"5517568018868714116"}
kashif@ubuntu:
/tests$
kashif@ubuntu:/tests$
kashif@ubuntu:
/tests$
kashif@ubuntu:/tests$ ./getaccountaddress_WVA
{"address":"RQCP1TcfevTQU35ZftPNx2TZpB9ZkSZQ3S","rmd160":"a3a0ee4fc2455ed9e1d57ef87dac45513f8a5441","coin":"BTCD","pubkey":"02c38bea4010d53e9d2b5079cbe402f6e59e8e1ad082caab6becd2102229259a8b","account":"IGUANA","result":"success","tag":"5230806884385881920"}
kashif@ubuntu:
/tests$
kashif@ubuntu:/tests$
kashif@ubuntu:
/tests$
kashif@ubuntu:/tests$
kashif@ubuntu:
/tests$ ./getaccountaddress_WVA
{"address":"RQCP1TcfevTQU35ZftPNx2TZpB9ZkSZQ3S","rmd160":"a3a0ee4fc2455ed9e1d57ef87dac45513f8a5441","coin":"BTCD","pubkey":"02c38bea4010d53e9d2b5079cbe402f6e59e8e1ad082caab6becd2102229259a8b","account":"IGUANA","result":"success","tag":"18104098791181749538"}

sequence of curl:
curl -s --url "http://127.0.0.1:7778" --data "{"agent":"iguana","method":"addcoin","newcoin":"BTCD","services":0,"portp2p":14631}"
curl -s --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"walletpassphrase","password":"YOURPASSWORD","timeout":300}"
curl -s --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"getaccountaddress","account":"IGUANA"}"
curl -s --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"getaccountaddress","account":"IGUANA"}"
curl -s --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"getaccountaddress","account":"IGUANA"}"

valid tx getting parse error

010000000132a253010000000000000000000000000000000000000000000000000000000000000000ffffffff4100012a3d3138204a756e652032303134202d204269746f696e20796f75722077617920746f206120646f75626c6520657370726573736f202d20636e6e2e636f6dffffffff010000000000000000000000000000 <- gentxarrayC error i.130 len.81 > recvlen.211, n.-1 hdrlen.81
parse error block txn_count.1, n.-1 len.-100 vs recvlen.211 from.(176.9.13.13)
BTCD 176.9.13.13.block len mismatch -100 != 211

importprivkey command generates new wallet instead of importing it to logged in wallet

These are the commands and expected results to replicate:

Create and login with encryptwallet using passphrase and password:

curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"bitcoinrpc\",\"method\":\"encryptwallet\",\"passphrase\":\"test pass phrase only\",\"password\":\"satinder\",\"permanentfile\":\"\"}"

Result:

{"pubkey":"1a47330213a8a8aa1b31537fdc26f3e54e6a618610db3a4be8572c46c2568030","RS":"NXT-SDQX-RCUT-KU3P-E8CEH","NXT":"14389360052150218461","btcpubkey":"03cc2b3e1635d1007583d516fad17c8af8a16cdec8ca93ef62bac819a3e4fd3fe9","rmd160":"237083464463af52847446e1ebec69fb95282eef","BTC":"14EPSEunfHpVfSvvF9ZnRDSji8KbVcvmZk","BTCD":"RCWaWko5G7d4jTJ7iKYuWjmwUPnC5s3jdm","result":"success","handle":"","persistent":"1a47330213a8a8aa1b31537fdc26f3e54e6a618610db3a4be8572c46c2568030","status":"unlocked","duration":3600,"tag":"14911091287147215597"}

Check confs directory:

$ ls confs/
BTCD_hdrs.txt                               BTC_peers.txt
BTCD_oldhdrs.txt                            LTC_peers.txt
BTCD_oldpeers.txt                           SYS_hdrs.txt
BTCD_peers.txt                              SYS_peers.txt
BTC_hdrs.txt                                ZEC_peers.txt
BTC_oldpeers.txt                            be75024dbc479ad949fe70221a5a0e89b3b80659689347afcdc6ab9e61b71f37

Import btcd address using it's privacy

curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"importprivkey\",\"params\":[\"{BTCD privkey here}\", \"satinder\"]}"

Result:

{"error":"couldnt update wallet payload","tag":"4070687263398216881"}

Login with the same passphrase and password using encryptwallet:

curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"bitcoinrpc\",\"method\":\"encryptwallet\",\"passphrase\":\"test pass phrase only\",\"password\":\"satinder\",\"permanentfile\":\"\"}"

Import again btcd address using it's privacy

curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"importprivkey\",\"params\":[\"{BTCD privkey here}\", \"satinder\"]}"

Result:

{"address":"{shows btcd address}","rmd160":"{shows long string}","coin":"BTCD","pubkey":"{shows btcd pubkey}","account":"satinder","result":"success","tag":"4312184193107562392"}

Check again confs directory:

$ ls confs/
6f3aae139a597157c8ea357de3db1ec644ec399b6d3acd673d2fd62c7343c90d    BTC_peers.txt
BTCD_hdrs.txt                               LTC_peers.txt
BTCD_oldhdrs.txt                            SYS_hdrs.txt
BTCD_oldpeers.txt                           SYS_peers.txt
BTCD_peers.txt                              ZEC_peers.txt
BTC_hdrs.txt                                be75024dbc479ad949fe70221a5a0e89b3b80659689347afcdc6ab9e61b71f37
BTC_oldpeers.txt

Notice there's new wallet there now.

getreceviedbyaddress shows balance 0 when there is a balance for GMC

Step 1: Sync iguana with GMC to RT
Address in question: GSYj1LfmRpXUKzi85SqRrxRGyeCaaWL2yb

Step 2: listunspent works for the address:

Step 3: listreceivedbyaccount returns balance for GSYj1LfmRpXUKzi85SqRrxRGyeCaaWL2yb

curl --url "http://127.0.0.1:7778" --data "{"coin":"GMC","method":"listreceivedbyaccount","params":[1, 9999999, ["GSYj1LfmRpXUKzi85SqRrxRGyeCaaWL2yb"]]}"

{"result":[{"account":"default","amount":1.81000000}],"tag":"2987950291646814448"}

Step 4: listunspent shows valid results:

curl --url "http://127.0.0.1:7778" --data "{"coin":"GMC","method":"listunspent","params":[1, 9999999, ["GSYj1LfmRpXUKzi85SqRrxRGyeCaaWL2yb"]]}"

[{"txid":"57bbc466d1de46c6417e3aa7f1504ed979126c24b5f94f79ff56771a134b79e7","vout":1,"address":"GSYj1LfmRpXUKzi85SqRrxRGyeCaaWL2yb","scriptPubKey":"76a9145f7889380b9ea08fd8fa03145651cf9a214cfdc088ac","amount":0.50000000,"timestamp":1473689933,"height":1453205,"confirmations":9169,"checkind":2199,"account":"default","spendable":true,"unspent":{"hdrsi":726,"pkind":608,"unspentind":2199,"prevunspentind":2151,"satoshis":"50000000","txidind":1691,"vout":1,"type":2,"fileid":0,"scriptpos":0,"scriptlen":25}}, {"txid":"d4a7216f844cf130bb48732339b500cfd4ff2c70537bdf8241d04ebb04d9b76e","vout":1,"address":"GSYj1LfmRpXUKzi85SqRrxRGyeCaaWL2yb","scriptPubKey":"76a9145f7889380b9ea08fd8fa03145651cf9a214cfdc088ac","amount":0.80000000,"timestamp":1473688453,"height":1453176,"confirmations":9198,"checkind":2151,"account":"default","spendable":true,"unspent":{"hdrsi":726,"pkind":608,"unspentind":2151,"prevunspentind":0,"satoshis":"80000000","txidind":1652,"vout":1,"type":2,"fileid":0,"scriptpos":0,"scriptlen":25}}, {"txid":"4d33930057f56430d39f7c1c4a1961620eea471e743c03880f2ccf75515994b8","vout":0,"address":"GSYj1LfmRpXUKzi85SqRrxRGyeCaaWL2yb","scriptPubKey":"76a9145f7889380b9ea08fd8fa03145651cf9a214cfdc088ac","amount":0.51000000,"timestamp":1474674888,"height":1461977,"confirmations":397,"checkind":3440,"account":"default","spendable":true,"unspent":{"hdrsi":730,"pkind":849,"unspentind":3440,"prevunspentind":0,"satoshis":"51000000","txidind":2670,"vout":0,"type":2,"fileid":0,"scriptpos":0,"scriptlen":25}}]

Step 5: getreceivedbyaddress returns 0

curl --url "http://127.0.0.1:7778" --data "{"coin":"GMC","method":"getreceivedbyaddress","params":["GSYj1LfmRpXUKzi85SqRrxRGyeCaaWL2yb"]}"

0

LTC: bus error (many times tested) with gdb backtrace

Launched gdb ../agents/iguana, then "run":
Ended with:

Thread 16 "iguana" received signal SIGBUS, Bus error.
[Switching to Thread 0x7fffe769a700 (LWP 4534)]
0x000000000043bc88 in iguana_bundletx (coin=0x7fffcec14010, bp=0x7fffc1390630, bundlei=0,
tx=0x7fffe7698f10, txidind=1) at iguana_bundles.c:426
426 T = RAMCHAIN_PTR(rptr,Toffset);

GDB Backtrace:

(gdb) backtrace
#0 0x000000000043bc88 in iguana_bundletx (coin=0x7fffcec14010, bp=0x7fffc1390630, bundlei=0,
tx=0x7fffe7698f10, txidind=1) at iguana_bundles.c:426
#1 0x00000000004c2d68 in iguana_blocktx (coin=coin@entry=0x7fffcec14010,
tx=tx@entry=0x7fffe7698f10, block=block@entry=0x7fffc13ae170, i=i@entry=0) at iguana_tx.c:161
#2 0x00000000004c358f in iguana_peerblockrequest (myinfo=myinfo@entry=0x81ace0 ,
coin=coin@entry=0x7fffcec14010, blockspace=blockspace@entry=0x7fffd80008c0 "",
max=max@entry=4202496, addr=addr@entry=0x0, hash2=..., validatesigs=validatesigs@entry=1)
at iguana_tx.c:275
#3 0x00000000004befd6 in iguana_bundlevalidate (myinfo=0x81ace0 , coin=0x7fffcec14010,
bp=0x7fffc1390630, forceflag=) at iguana_spendvectors.c:1179
#4 0x0000000000430a12 in iguana_helper (arg=0x3dcf0f0) at iguana777.c:766
#5 0x000000000052a7db in iguana_launcher ()
#6 0x00007ffff795470a in start_thread (arg=0x7fffe769a700) at pthread_create.c:333
#7 0x00007ffff738182d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

fix removecoin method

If it's not possible to make a complete coin removal could you make Iguana stop responding to any api calls? Right now it's still responding back after I executed removecoin method.

curl --url "http://127.0.0.1:7778" --data "{"agent":"iguana","method":"removecoin","activecoin":"SYS"}"

{"result":"success","tag":"7764525998497036149"}

curl --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"getinfo"}"

{"result":"success","protocolversion":70003,"kbfee":0.00001250,"txfee":0.00010000,"bundles":99.17355372,"utxo":99.17355372,"balances":99.17355372,"validated":99.17355372,"firstRTheight":240000,"RTheight":241837,"blocks":242000,"longestchain":242913,"port":8369,"supernet":[],"connections":13,"difficulty":241723.00068090,"status":"SYS.RT241837 u.120+c.120 b.120 v.120 (0+58/2000 1st.120).s0 to 121 N[122] h.242001 r.240000 c.240000 s.240058 d.0 E.120 maxB.18 peers.13/256 Q.(21429 0) (L.242913 121:913) M.242000 3d36c0559c8f19269a8080cd28d93875959c62813ef7fafe43fa0837f9216ec3 ledger.a9e7c7651ba1fdd2 supply 4277213804.38371277 sigs 0:0","coin":"SYS","tag":"1150455986746551596"}

DOGE: history shows balance 0

With DOGE in RT.

Doing history api call:

curl --url "http://127.0.0.1:7778" --data "{"timeout":20000,"agent":"basilisk","method":"history","vals":{"coin":"DOGE"}}"

Returns:

{"result":"success","unspents":[],"spends":[],"coin":"DOGE","balance":0,"tag":"8047267827158535916"}

account's address doesn't change after receiving transaction

just tested sendtoaddress rpc, working absolutely fine, did transaction in between accounts residing on iguana

[12:02]
./listaccount_ALL
{"result":{"default":0,"IGUANA":0.00100000,"test":0},"tag":"6258871104750426314"}

[12:02]
./listaccount_ALL
{"result":{"default":0.00088000,"IGUANA":0,"test":0.00002000},"tag":"240555888191389243"}

[12:05]
@jl777 the test account's address should have changed for next transaction but I'm seeing the same address

[12:05]
address before transaction

[12:05]
./getaccountaddress_WVA
{"address":"RN5tXNu5AJweSau2urxKVxDZcmT6z6A2FL","rmd160":"8c7667fbd0ff0e0e3fe4f8cd0a36f2d6dc1901f6","coin":"BTCD","pubkey":"0215892154032e3fb61168458e064633648d6ccfb48f83dd330da4f375f6ed77f4","account":"test","result":"success","tag":"18301752061280087385"}

[12:05]
address after transaction

[12:05]
./getaccountaddress_WVA
{"address":"RN5tXNu5AJweSau2urxKVxDZcmT6z6A2FL","rmd160":"8c7667fbd0ff0e0e3fe4f8cd0a36f2d6dc1901f6","coin":"BTCD","pubkey":"0215892154032e3fb61168458e064633648d6ccfb48f83dd330da4f375f6ed77f4","account":"test","result":"success","tag":"1718461436302190369"}

listaccount and getbalance rpc shows wrong balance with multiple accounts

listaccount and getbalance rpc shows wrong balance with multiple accounts

initially account balances are

[11:54]
kashif@ubuntu:~/tests$ ./listaccount_ALL
{"result":{"default":0.00078000,"IGUANA":1,"test":0,"test1":0.00002000,"test2":0,"test3":0,"test4":0,"test5":0,"test6":0,"test7":0},"tag":"1590819563650659941"}

[11:55]
when performed sendtoaddress to test3 account, the default account balance has gone vanished

[11:56]
./listaccount_ALL
{"result":{"default":0,"IGUANA":1,"test":0,"test1":0,"test2":0.00002000,"test3":0,"test4":0,"test5":0,"test6":0,"test7":0},"tag":"17738116709786867334"}

[11:56]
the listunspent rpc

[11:56]
[
{

"txid":"5e6169ed003ba9a4345e25b5ece53174c952b52ebadf0f8fd2bff8892e447bbc",
"vout"1,
"address":"RP2tciau3K53XS9hdGY5jjvA2K883mimGX",
"scriptPubKey":"76a91496dd5c660363fad9b7668242c08ca3696d273be088ac",
"amount":0.00068000,
"timestamp":1474568759,
"height":1306651,
"confirmations":20,
"checkind":0,
"account":"default",
"spendable":true
},

{
"txid":"9c40ed620b67c427cdaacd921b73a1a1a974047ac29b3137e0d1b5d34996c071",
"vout"1,
"address":"RLAyH6zCypa4Ke3Ezokrz93d41shbXi84m",
"scriptPubKey":"76a914777c33e91c0cde7c08a7ab3ed07cd4e6a79cb11088ac",
"amount":1,
"timestamp":1474546885,
"height":1306278,
"confirmations":393,
"checkind":1078,
"account":"IGUANA",
"spendable":true,
"unspent":
{
"hdrsi":2612,
"pkind":114,
"unspentind":1078,
"prevunspentind":0,
"satoshis":"100000000",
"txidind":560,
"vout":1,
"type":2,
"fileid":0,
"scriptpos":0,
"scriptlen":25
}

},

{
"txid":"5e6169ed003ba9a4345e25b5ece53174c952b52ebadf0f8fd2bff8892e447bbc",
"vout"0,
"address":"RQ3gk2umDggguLWJvZk1Ya6eMjeoYUkNMi",
"scriptPubKey":"76a914a1fbfdaa05ba086b8b086ce17bd3104c56dd901c88ac",
"amount":0.00002000,
"timestamp":1474568759,
"height":1306651,
"confirmations":20,
"checkind":0,
"account":"test2",
"spendable":true
}
]

[11:57]
RP2tciau3K53XS9hdGY5jjvA2K883mimGX belongs to default and it still have some balance "amount":0.00068000,

[11:57]
but listaccount rpc shows it has 0 balance

change account isn't being created automatically

change account isn't being created automatically and remaining amount from the transaction is disappeared.

here is the attached snapshot of transaction that I did.
remainingamount

the remaining amount 0.9996 has lost due to no change account.

missing data in listtransactions after sendtoaddress

http://explorer.cryptoadhd.com/tx/5d6b68052695f7dc40a3acadacbf1677a94c3debcaf387e1d662ceed350642ee

curl --url "http://127.0.0.1:7778" --data "{"method":"listtransactions","coin":"MZC","params":["default", 20]}"
{"result":[{"account":"default","txid":"5d6b68052695f7dc40a3acadacbf1677a94c3debcaf387e1d662ceed350642ee","vout":1,"category":"unknown","address":"MCDF7F9XSpc3xXxc6PANamWEER8BKLqw6D","blockhash":"000000000000008f9c4496890b13906c78a2ba9c2eb0fbc713271f020dc6d5b1","blocktime":1475063029,"height":656202,"confirmations":19433}, {"account":"default","txid":"5ba49a9bc4612ed169ea41514c5cb3fe45ff49f86292fca9eaac07cf46be6160","vout":1,"amount":3.49990000,"category":"receive","address":"MCDF7F9XSpc3xXxc6PANamWEER8BKLqw6D","blockhash":"00000000000001b4c89909b21741182f9e6404b6a07d60b72d4dbbf85f4ff29b","blocktime":1477511287,"height":675631,"confirmations":4}, {"account":"default","txid":"5ba49a9bc4612ed169ea41514c5cb3fe45ff49f86292fca9eaac07cf46be6160","vout":0,"amount":0.50000000,"category":"receive","address":"MCDF7F9XSpc3xXxc6PANamWEER8BKLqw6D","blockhash":"00000000000001b4c89909b21741182f9e6404b6a07d60b72d4dbbf85f4ff29b","blocktime":1477511287,"height":675631,"confirmations":4}],"tag":"8469055303941660494"}

curl --url "http://127.0.0.1:7778" --data "{"method":"gettransaction","coin":"MZC","params":["5d6b68052695f7dc40a3acadacbf1677a94c3debcaf387e1d662ceed350642ee"]}"
{"version":1,"vin":[{"sequence":4294967295,"txid":"f61de9df13746852927406a76552c37ebbb18b65745eccf7fee75cc384caecf7","vout":0,"scriptSig":{"hex":"4730440220218b5a0b4e50baf3b31a449aa176e45d8634467056ad6f432344368af39e19c4022041956b805e7516f83826d75fc3de89b36329735e15ca9810d9dea0bccbc33d16012102320bcb42747d982691885aaa748d9349cdfb4ae0ccd32c607eca772fdfe96715","asm":"30440220218b5a0b4e50baf3b31a449aa176e45d8634467056ad6f432344368af39e19c4022041956b805e7516f83826d75fc3de89b36329735e15ca9810d9dea0bccbc33d1601 02320bcb42747d982691885aaa748d9349cdfb4ae0ccd32c607eca772fdfe96715"}}],"numvins":1,"vout":[{"satoshis":"9579999774","value":95.79999774,"n":0,"scriptPubKey":{"asm":"OP_DUP OP_HASH160 a34798ec190940c60ac3c35eaf521caf96aca72e OP_EQUALVERIFY OP_CHECKSIG // MNnW9NQJvJ9MFvRNWBBCW8h2Wzdm6iMNaE","reqSigs":1,"type":"pubkeyhash","addresses":["MNnW9NQJvJ9MFvRNWBBCW8h2Wzdm6iMNaE"],"hex":"76a914a34798ec190940c60ac3c35eaf521caf96aca72e88ac"}}, {"satoshis":"400000000","value":4,"n":1,"scriptPubKey":{"asm":"OP_DUP OP_HASH160 2f4c0f91fc06ac228c120aee41741d0d39096832 OP_EQUALVERIFY OP_CHECKSIG // MCDF7F9XSpc3xXxc6PANamWEER8BKLqw6D","reqSigs":1,"type":"pubkeyhash","addresses":["MCDF7F9XSpc3xXxc6PANamWEER8BKLqw6D"],"hex":"76a9142f4c0f91fc06ac228c120aee41741d0d3909683288ac"}}],"numvouts":2,"locktime":0,"size":225,"txid":"5d6b68052695f7dc40a3acadacbf1677a94c3debcaf387e1d662ceed350642ee","txid":"5d6b68052695f7dc40a3acadacbf1677a94c3debcaf387e1d662ceed350642ee","address":"������","blockhash":"000000000000008f9c4496890b13906c78a2ba9c2eb0fbc713271f020dc6d5b1","blocktime":1475063029,"height":656202,"confirmations":19433,"tag":"2595274271565717920"}

BLK: repeating txn_count overflow and headers len mismatch

With dPoW, trying to sync BLK. I left it working for a while, and it seemed to just repeat the following:

txn_count overflow.2306953275 for 3c719de5398cf9fb9cffc1b49ea426e9ef0a4a17688270cf06b108fccd20cb41
txn_count overflow.-314045316874403028 for de551c8385dca2d9eea4be472752e570c87ec3b67a24e21a14667aca69d3dd93
txn_count overflow.445293413156651008 for 2638cd97c943a4b4d547c6a80e1695e64bd65b3337a2ea464ca0e24ea1971291
txn_count overflow.689487241155313096 for 9e4d163c7856076a194f72dc40b0d037127fefb2f0a9d09e2f8d3c4e17161256
txn_count overflow.1359910003 for 5fe39744db1c5b498b49e82740aed26dda446cfdd34966d0466baa6aaf4b0cde
txn_count overflow.3219046498 for 73aab54c4c28b9698b33c5eeea2c289aca069172c539516c2aeaf39a46d0b0dc
txn_count overflow.2242982644 for f9a6fdaf7b7ac29f397118dbc4c331515e39158555c460ee315f24d326305369
txn_count overflow.-9194219154604737014 for aedbc0bc6aace32391d07cf9ced28dc5821abee44dd01e8c324a704696f927da
txn_count overflow.1585904339 for 7d224aab9971d6ecf8a18321a685cecb3df0f3820a7c5f810a569d072588a967
txn_count overflow.3537899125 for 60d0fd4126559ca1fe8345573f6d46406a64ebb749a99aa34136889f86e2130e
txn_count overflow.3839307214352533083 for d5cce731e18a38b0198f9a21fe4c71eeaa66e01e7f6a1a5aaf0d0a7e8b38f25a
txn_count overflow.6185542586618168390 for 86f5c251fe875857a7220f65f22d7ced9dc6b143f8f25297a81b0f4d80c7ffc5
BLK 104.204.109.11.headers len mismatch 162097 != 164003

ZEC: gets stuck repeating...

With a fresh clone, and latest dPoW, I left ZEC trying to sync for 12 hours, and it woke up and saw it repeating this:

ZEC.RT0 u.0+c.0 b.0 v.0 (0+0/1 1st.0).s0 to 0 N[1] h.1 r.0 c.0 s.0 d.0 E.0 maxB.8 peers.2/2048 Q.(2880 0) (L.1 0:1) M.0 00040fe8ec8471911baa1db1266ea15dd06b4a8a5c453883c000b031973dce08 ledger.00000000 supply 0.00000000 sigs 0:0 bQ.0 12:49:08 stuck.0 max.0

LTC: illegal pubkey

After a few tries of LTC resulting in this error, I also tried the following:

  1. Fresh clone, and then using dPoW
  2. Start iguana
  3. Start ./genltc
  4. Results in continuous lines of:

illegal pubkey.[00] 0

listtransactions and history return empty

  1. Sync Iguana with BTC.
  2. use walletpassphrase to login
  3. Check balance "19hobDLpSxvBFXQq9WBKSC5P4UQjZcuLSc" address in question, has 2 received transactions.
  4. curl --url "http://127.0.0.1:7778" --data "{"coin":"BTC","method":"listtransactions","params":[1, 9999999, ["19hobDLpSxvBFXQq9WBKSC5P4UQjZcuLSc"]]}"

{"result":[],"tag":"7628690003303219518"}

  1. curl --url "http://127.0.0.1:7778" --data "{"timeout":20000,"agent":"basilisk","method":"history","vals":{"coin":"BTC"}}"

{"result":"success","unspents":[],"spends":[],"coin":"BTC","balance":0,"tag":"18395571298549868534"}

These should return values for BTC is in RealTime.

DOGE: getaccountaddress does not show address given by walletpassphrase and getaddressesbyaccount shows 2 addresses.

With DOGE in RT.

By doing ./walletpassphrase with account passphrase, it returns:

{"pubkey":"c80a601bcc3eb76a0a36fdfe6bd398ed70b55588988a4721dc6a669e05812a13","RS":"NXT-828T-JYA9-UTWL-FA25P","NXT":"15747971375344845017","btcpubkey":"02fe3c5930203d40dc84a77a69db78800c9ae5f881bff30d866cfb9b7a92daf674","rmd160":"5f7889380b9ea08fd8fa03145651cf9a214cfdc0","DOGE":"DDqu8UHTkNpTnXbRt6AsyxEywc92qLHkj5","result":"success","handle":"","notary":-1,"persistent":"c80a601bcc3eb76a0a36fdfe6bd398ed70b55588988a4721dc6a669e05812a13","status":"unlocked","duration":3600,"tag":"15400765378778167089"}

With DOGE address: DDqu8UHTkNpTnXbRt6AsyxEywc92qLHkj5

By doing ./getaddressesbyaccount it returns:

{"result":["DDqu8UHTkNpTnXbRt6AsyxEywc92qLHkj5", "DHWGrMn9RUYG4VGUEx1gVrBaEcqCJgcCfU"],"tag":"8089066890269427036"}

This call returns 2 addresses, 1 of which is the same as the output from walletpassphrase.

By doing ./getaccountaddress it uses:
curl --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"getaccountaddress","account":"test"}"

And it outputs:
{"address":"DHWGrMn9RUYG4VGUEx1gVrBaEcqCJgcCfU","rmd160":"87a2da4a203d8a1302d2336fd8ba61ec4bd0a582","coin":"DOGE","pubkey":"03ce53d7b7c172b4809f553e1aee614df6d70ad70a03974515869b9756fb483d4e","account":"test","result":"success","tag":"16363069229090500406"}

This address from ./getaccountaddress does not equal DDqu8UHTkNpTnXbRt6AsyxEywc92qLHkj5 given by walletpassphrase.

LISTACCOUNT RPC showing wrong balances for accounts

./listaccount_ALL
{"result":{"default":140.42070000,"RPCtesting":140.42070000,"change":140.42070000,"RPCtest_2":140.42070000,"RPCtesting_2":140.42070000,"RPCtest2":140.42070000,"kashif":140.42070000,"IGUANA":140.42070000,"check":140.42070000,"bug":140.42070000},"tag":"14938859376722640882"}

see every account having same amount;

RPC LISTTRANSACTION returning empty tag

RPC LISTTRANSACTION returning empty tag

./listtransactions
{"result":[],"tag":"16678437807721870915"}

curl --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"listtransactions","account":"IGUANA","count":"1","skip":"0","includewatchonly":"0"}"

Observing memory crash when decryption key is removed from memory.

When walletpassphrase is executed after decryption is removed from memory; iguana gets crashed.
it happens when execute any rpc after walletpassphrase rpc is executed when decyption key is removed.

here is sequence to reproduce that issue;

curl -s --url "http://127.0.0.1:7778" --data "{"agent":"iguana","method":"addcoin","newcoin":"BTCD","services":0,"portp2p":14631}"
curl -s --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"walletpassphrase","password":"yourpassword","timeout":300}"

at here wait for decryption key to be removed from memory

once the wallet is locked successfully run again walletpassphrase

curl -s --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"walletpassphrase","password":"yourpassword","timeout":300}"

you should be seeing crash on console.

category field is wrong in listtransactions

curl --url "http://127.0.0.1:7778" --data "{"coin":"DOGE","method":"listtransactions","params":["default", 20]}"
{"result":[{"account":"default","txid":"081debe2cc852422f64b065e7083f8c46fa53ba2fe607cc9d069f97f79c2b8a8","vout":1,"amount":1.99990000,"category":"receive","address":"DKb5r4cHiC4Bisqpzz5S9KbU7wSwDp5f8w","blockhash":"4a99864094327a03307a6fa2ed3a1363dab45287f02391a6cc79e0cd5f4e8d2b","blocktime":1474822872,"height":1396184,"confirmations":39}],"tag":"9419960161721655650"}

https://dogechain.info/tx/081debe2cc852422f64b065e7083f8c46fa53ba2fe607cc9d069f97f79c2b8a8

i believe it should be marked as sent

RPC LISTRECEIVEDBYACCOUNT is showing wrong confirmations

RPC LISTRECEIVEDBYACCOUNT is showing wrong confirmations against all accounts.

./listreceivedbyaccount
{"result":[{"account":"default","amount":0,"confirmations":10}, {"account":"RPCtesting","amount":0,"confirmations":10}, {"account":"change","amount":0,"confirmations":10}, {"account":"RPCtest_2","amount":0,"confirmations":10}, {"account":"RPCtesting_2","amount":0,"confirmations":10}, {"account":"RPCtest2","amount":0,"confirmations":10}, {"account":"kashif","amount":0,"confirmations":10}, {"account":"IGUANA","amount":0,"confirmations":10}, {"account":"check","amount":0,"confirmations":10}, {"account":"bug","amount":0,"confirmations":10}],"tag":"152711271757487891

txfee_satoshis is not applied to transaction

i specified 200000000

curl --url "http://127.0.0.1:7778" --data "{"startpend":8,"endpend":4,"services":129,"auxpow":1,"RELAY":1,"VALIDATE":1,"prefetchlag":-1,"poll":10,"active":1,"agent":"iguana","method":"addcoin","maxpeers":256,"newcoin":"DOGE","name":"Dogecoin","netmagic":"C0C0C0C0","p2p":22556,"rpc":22555,"pubval":30,"p2shval":5,"wifval":128,"txfee_satoshis":"200000000","minconfirms":2,"genesishash":"1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691","genesis":{"hashalgo": "scrypt","version":1,"timestamp":1386325540,"nBits":"1e0ffff0","nonce":99943,"merkle_root":"5b2a3f53f605d62c53e62932dac6925e3d74afa5a4b459745c36d42d0ed26a69"},"alertpubkey":"04d4da7a5dae4db797d9b0644d57a5cd50e05a70f36091cd62e2fc41c98ded06340be5a43a35e185690cd9cde5d72da8f6d065b499b06f51dcfba14aad859f443a"}"

instead iguana applied 0.00010000
https://dogechain.info/tx/081debe2cc852422f64b065e7083f8c46fa53ba2fe607cc9d069f97f79c2b8a8

RPC WALLETPASSPHRASECHANGE returning error

RPC WALLETPASSPHRASECHANGE returning error

steps to reproduce:
curl -s --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"encryptwallet","passphrase":"Admin123@"}"

curl -s --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"walletpassphrasechange","oldpassword":"Admin123@","newpassword":"Admin123456@","oldpermanentfile":"","permanentfile":""}"

RESULTS:
./walletpassphraseChange
{"error":"error changing walletpassphrase","tag":"18157287915569421321"}

DGB: history shows 0 also

With latest on dPoW branch.

curl --url "http://127.0.0.1:7778" --data "{"timeout":20000,"agent":"basilisk","method":"history","vals":{"coin":"DGB"}}"

Returns:
{"result":"success","unspents":[],"spends":[],"coin":"DGB","balance":0,"tag":"14469661201851038625"}

Same behavior as DOGE and BTM.

gettransaction method is missing the category field in response message

If possible can you add this field to listtransactions method? It was also omitted.
Also, can you look if you can add transaction value field as well? Right now the only way to get the value is to iterate iterate through satoshis and check for a specific address. It would be convenient if transaction value can be retrieved right away.

listreceivedbyaddress rpc is showing invalid balance against multiple accounts

listreceivedbyaddress rpc is showing invalid balance against multiple accounts

1) listreceivedbyaddress rpc result:
{"result":[{"address":"RP2tciau3K53XS9hdGY5jjvA2K883mimGX","amount":0,"txids":["a7d7ea45337430e50db3896c47e387907c8c09c2c82aafb76ada2782ef1b09f7", "9fb262434c94cb5ccdca24dff6443afe2a427aba3f932981f193d032f6fc7a61", "5e6169ed003ba9a4345e25b5ece53174c952b52ebadf0f8fd2bff8892e447bbc", "032d45593cdf911a4de255fe932a6c6610d74dc2ea72decf6d3860c68a793a9a", "95907385cc1d223a501cf5d5b61b792a30f764b47a68c13c039cfc23a726f0e6", "14305371546f88894b5b1194f692ee2fb22cdd6055638517e6aa1be2a7e8edf8"],"vouts":[1, 1, 1, 1, 1, 1]}, {"address":"RLAyH6zCypa4Ke3Ezokrz93d41shbXi84m","amount":0,"txids":["0b33ab22a79a2605d1951ae5b01aae394a9f4e74708e9e665e274653987a2096", "9c40ed620b67c427cdaacd921b73a1a1a974047ac29b3137e0d1b5d34996c071"],"vouts":[0, 1]}, {"address":"RN5tXNu5AJweSau2urxKVxDZcmT6z6A2FL","amount":0,"txids":["a7d7ea45337430e50db3896c47e387907c8c09c2c82aafb76ada2782ef1b09f7"],"vouts":[0]}, {"address":"RFfiDHxigsjwHS5NQtvHLEBiTYePr9XgVY","amount":0,"txids":["032d45593cdf911a4de255fe932a6c6610d74dc2ea72decf6d3860c68a793a9a"],"vouts":[0]}, {"address":"RQ3gk2umDggguLWJvZk1Ya6eMjeoYUkNMi","amount":0,"txids":["5e6169ed003ba9a4345e25b5ece53174c952b52ebadf0f8fd2bff8892e447bbc"],"vouts":[0]}, {"address":"RPFDh74ymxvH2dgvTzBtCV9A3TkDkLfy7k","amount":0,"txids":[],"vouts":[]}, {"address":"RChgjHrBiFAE3ZC8urkhsRYZqKrxa9cb2E","amount":0,"txids":[],"vouts":[]}, {"address":"RFCCxFGtdrRxQ7Bg3dF431dYs745pgp1te","amount":0,"txids":[],"vouts":[]}, {"address":"RCDNddzib96ApWNnjSPBb4oy583uARfaAR","amount":0,"txids":[],"vouts":[]}, {"address":"RGVroEAdWfmkTbdPPSPzSSx8C5vmHgWwfZ","amount":0,"txids":["14305371546f88894b5b1194f692ee2fb22cdd6055638517e6aa1be2a7e8edf8"],"vouts":[0]}],"tag":"9761696093371951210"}

2) listaccount rpc result:
./listaccount_ALL
{"result":{"default":0.50006000,"IGUANA":0,"test":0,"test1":0,"test2":0,"test3":0,"test4":0,"test5":0,"test6":0,"test7":0.00030000},"tag":"8867060783398421983"}

whereas listreceivedbyaccount rpc showing valid result against all account

result:
./listreceivedbyaccount
{"result":[{"account":"default","amount":0.50006000}, {"account":"IGUANA","amount":0}, {"account":"test","amount":0}, {"account":"test1","amount":0}, {"account":"test2","amount":0}, {"account":"test3","amount":0}, {"account":"test4","amount":0}, {"account":"test5","amount":0}, {"account":"test6","amount":0}, {"account":"test7","amount":0.00030000}],"tag":"403566418452206397"}

STEPS TO REPRODUCE:

  1. launch iguana
  2. Suffice BTCD coin environment
    curl -s --url "http://127.0.0.1:7778" --data "{"agent":"iguana","method":"addcoin","newcoin":"BTCD","services":0,"portp2p":14631}"
  3. Create some accounts
    curl -s --url "http://127.0.0.1:14630" --data "{"agent":"bitcoinrpc","method":"getaccountaddress","account":"check3"}"
  4. Transfer some amount to check3 account using sendtoaddress
    curl --url "http://127.0.0.1:7778" --data "{"method":"sendtoaddress","params":["RV26kKuDC7qrrxe6HHbto4ViKu2R28Kfew",0.
  5. once is step(4) is successful execute rpc listreceivedbyaddress
    curl --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"listreceivedbyaddress","minconf":"1","includeempty":"1","flag":"0"}"

RPC GETRECEIVEDBYACCOUNT returning just the tag

RPC GETRECEIVEDBYACCOUNT returning just the tag

./getreceivedbyaccount_WVA

Dependencies:
getaccoutaddress, setaccount

Scenario: Verify that correct total amount is retured for mentioned account

{"tag":"16508838241191685672"}

curl --url "http://127.0.0.1:7778" --data "{"agent":"bitcoinrpc","method":"getreceivedbyaccount","account":"change","includeempty":"2"}"

BTM: history shows 0

History:
curl --url "http://127.0.0.1:7778" --data "{"timeout":20000,"agent":"basilisk","method":"history","vals":{"coin":"BTM"}}"

Result:
{"result":"success","unspents":[],"spends":[],"coin":"BTM","balance":0,"tag":"15301699735159072082"}

BTC-Basilik mode: Getaddressbyaccount rpc returning all in-wallet addresses

ACTUAL RESULT:
returning all in-wallet addresses instead of address associated to check account
CURL: curl --url "http://127.0.0.1:8332" --data "{"agent":"bitcoinrpc","method":"getaddressesbyaccount","IGUANA":"check"}"
echo ""
./getaddressbyaccount_WVN
{"result":["1AaV57SH51dcQ5RJKH1N7puZ9avYg15ks", "1Ai97BFjwCxFd9dzC17CbAReGSSfkAkuyk", "15v1qrMd44pN24N5dtw8StmeNXA3MhynVZ", "1FG5qwZRcxVtx7CgqgtWLdBo17sErvpu6", "16ey7794a8rr6D6YNhDwZEXU7YRMXiTjxy", "1QL9JapbHR8KPT5sZtQaBSxb4DWRRFZsnM"],"tag":"4046428951811336914"}
Expected Result:
should have returned address 1QL9JapbHR8KPT5sZtQaBSxb4DWRRFZsnM
ADDRESSES IN WALLET:
default=1 # addr=1AaV57SH51dcQ5RJKH1N7puZ9avYg15ks
default=1 # addr=1Ai97BFjwCxFd9dzC17CbAReGSSfkAkuyk
default=1 # addr=15v1qrMd44pN24N5dtw8StmeNXA3MhynVZ
IGUANA=2 # addr=1FG5qwZRcxVtx7CgqgtWLdBo17sErvpu6
testing=3 # addr=16ey7794a8rr6D6YNhDwZEXU7YRMXiTjxy
check=4 # addr=1QL9JapbHR8KPT5sZtQaBSxb4DWRRFZsnM

FRK: history shows 0 (similar)

Doing history call for FRK:
curl --url "http://127.0.0.1:7778" --data "{"timeout":20000,"agent":"basilisk","method":"history","vals":{"coin":"FRK"}}"

Returns:
{"result":"success","unspents":[],"spends":[],"coin":"FRK","balance":0,"tag":"11842031117316041188"}

cache wallet info locally

keep wallet info locally and let api view information about balances and transactions that iguana already knows about
even when a certain coin is out of sync

UNO stuck repeating line with syncing

On latest dPoW, most coins so far have worked fine. UNO I left for quite a few hours, and it just keeps repeating the following:

UNO.RT0 u.340+c.0 b.0 v.341 (0+0/1 1st.341).s0 to 341 N[342] h.682001 r.682000 c.682000 s.682000 d.0 E.341 maxB.128 peers.7/256 Q.(3135 0) (L.840237 420:237) M.682000 0668500638f5f24d2bacc6adc6285d9e3efb061de9e4d789d1451f0138e4bc94 ledger.00000000 supply 0.00000000 sigs 0:0 bQ.60 3:24:16 stuck.0 max.4

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.