diff --git a/README.md b/README.md index b3f8583bd..30f7b0953 100755 --- a/README.md +++ b/README.md @@ -156,3 +156,23 @@ once jsoncmp is built, then ./test shows how to use it 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 +Here are some preliminary instructions for iguana dPoW support: +0. Install and start ../agents/iguana add any coin via coins/genbtcd or coins/basilisk + +1. Create an iguana wallet with encryptwallet if you dont already have one: +curl --url "http://127.0.0.1:7778" --data "{\"agent\":\"bitcoinrpc\",\"method\":\"encryptwallet\",\"passphrase\":\"use high entropy passphrase that generates the pubkey\"}" + +2. Create an executable (chmod +x) file "SuperNET/iguana/wp" with the following in it: +curl --url "http://127.0.0.1:7778" --data "{\"method\":\"walletpassphrase\",\"params\":[\"same passphrase as above\", 9999999]}" + +Now from SuperNET/iguana if you run ./wp it will show the various addresses including "btcpubkey" which is your notary pubkey. Post this in #notarynode if you havent already. + +3. create a text file SuperNET/iguana/myip.txt with just your ip address in it: +12.34.56.78 + +The ipaddress is only used for registering notary node and not directly correlated with your pubkey. + +4. copy SuperNET/iguana/coins/btc btc_7776 kmd and kmd_7776 up one directory to SuperNET/iguana and edit "path" to match your home directory. if your home directory is /home/username then \"path\":\"home/username\" + +5. make a copy of SuperNET/iguana/wp -> SuperNET/iguana/wp_7776 and change port 7778 to port 7776 diff --git a/iguana/iguana_notary.c b/iguana/iguana_notary.c index 648dc25d4..44f6b0f7c 100755 --- a/iguana/iguana_notary.c +++ b/iguana/iguana_notary.c @@ -726,10 +726,16 @@ void dpow_fifoupdate(struct supernet_info *myinfo,struct dpow_checkpoint *fifo,s for (i=DPOW_FIFOSIZE-1; i>0; i--) { if ( (offset= (tip.blockhash.height - fifo[i].blockhash.height)) >= 0 && offset < DPOW_FIFOSIZE ) + { + printf("[offset %d = (%d - %d)] <- i.%d\n",offset,tip.blockhash.height,fifo[i].blockhash.height,i); newfifo[offset] = fifo[i]; + } } newfifo[0] = tip; memcpy(fifo,newfifo,sizeof(newfifo)); + for (i=0; isymbol,height,dp->destupdated,bits256_nonz(dp->srcfifo[dp->srcconfirms].blockhash.hash)); dpow_checkpointset(myinfo,&dp->last,height,hash,timestamp,blocktime); + printf("%s srcupdate ht.%d destupdated.%u nonz.%d %llx\n",dp->symbol,height,dp->destupdated,bits256_nonz(dp->srcfifo[dp->srcconfirms].blockhash.hash),(long long)dp->last.blockhash.hash.txid); dpow_fifoupdate(myinfo,dp->srcfifo,dp->last); if ( dp->destupdated != 0 && bits256_nonz(dp->srcfifo[dp->srcconfirms].blockhash.hash) != 0 ) { diff --git a/iguana/tests/notaryinit b/iguana/tests/notaryinit index 13714c8f5..6d9eea4d1 100755 --- a/iguana/tests/notaryinit +++ b/iguana/tests/notaryinit @@ -6,7 +6,7 @@ coins/gennotary tests/addnotarys_7776 tests/getinfoN_7776 curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"SuperNET\",\"method\":\"myipaddr\",\"ipaddr\":\"$myip\"}" -./wp +./wp_7776 curl --url "http://127.0.0.1:7776" --data "{\"agent\":\"SuperNET\",\"method\":\"activehandle\"}" ./btc_7776 ./kmd_7776