create account

iguana status: realtime mode in debugging, 3 new coins supported (actually only 2 coins, third has some issues) by jl777

View this thread on: hive.blogpeakd.comecency.com
· @jl777 · (edited)
$2.31
iguana status: realtime mode in debugging, 3 new coins supported (actually only 2 coins, third has some issues)
I have coded most of what is needed to support the realtime mode as described previously. Now just need to call the new RT functions, which is a bit of a mess as there was no formal interface internally, so turns out there are a dozen functions that need to be created. I have it so it just passes through to the existing and testing to make sure I didnt break anything.

they all have a similar structure to:

function()
{
   check realtime dataset
   if data available return it
  return result from existing method
}

So a dozen "check realtime dataset" functions and theoretically all the bitcoin RPC should be updating its return values in realtime as the blocks come in.

Separately, I received three addcoin scripts, which is the only API call that is needed to add support for a new coin!

DOGE:
curl --url "http://127.0.0.1:7778" --data "{\"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\":\"100000000\",\"minconfirms\":2,\"genesishash\":\"1a91e3dace36e2be3bf030a65679fe821aa1d6ef92e7c9902eb318182c355691\",\"genesis\":{\"hashalgo\": \"scrypt\",\"version\":1,\"timestamp\":1386325540,\"nBits\":\"1e0ffff0\",\"nonce\":99943,\"merkle_root\":\"5b2a3f53f605d62c53e62932dac6925e3d74afa5a4b459745c36d42d0ed26a69\"},\"alertpubkey\":\"04d4da7a5dae4db797d9b0644d57a5cd50e05a70f36091cd62e2fc41c98ded06340be5a43a35e185690cd9cde5d72da8f6d065b499b06f51dcfba14aad859f443a\"}"

EAC:
curl --url "http://127.0.0.1:7778" --data "{\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"poll\":10,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"maxpeers\":256,\"newcoin\":\"EAC\",\"name\":\"EarthCoin\",\"netmagic\":\"C0DBF1FD\",\"p2p\":15677,\"rpc\":15678,\"pubval\":30,\"p2shval\":5,\"wifval\":221,\"txfee_satoshis\":\"1000000\",\"minconfirms\":2,\"genesishash\":\"21717d4df403301c0538f1cb9af718e483ad06728bbcd8cc6c9511e2f9146ced\",\"genesis\":{\"version\":1,\"timestamp\":1386746168,\"nBits\":\"1e0ffff0\",\"nonce\":12468024,\"merkle_root\":\"13757c3610411891452ac1f04d7f81946339b0e5b5aba216e6646e81805c4bb1\"},\"alertpubkey\":\"04dcba12349012341234900abcd12223abcd455abcd77788abcd000000aaaaabbbbbcccccdddddeeeeeff00ff00ff00ff001234567890abcdef0022446688abc11\"}"

DGB:
curl --url "http://127.0.0.1:7778" --data "{\"RELAY\":1,\"VALIDATE\":1,\"prefetchlag\":-1,\"poll\":10,\"active\":1,\"agent\":\"iguana\",\"method\":\"addcoin\",\"maxpeers\":256,\"newcoin\":\"DGB\",\"name\":\"Digibyte\",\"netmagic\":\"FAC3B6DA\",\"p2p\":12024,\"rpc\":14022,\"pubval\":0,\"p2shval\":5,\"wifval\":128,\"txfee_satoshis\":\"10000\",\"minconfirms\":2,\"genesishash\":\"7497ea1b465eb39f1c8f507bc877078fe016d6fcb6dfad3a64c98dcc6e1e8496\",\"genesis\":{\"version\":1,\"timestamp\":1389388394,\"nBits\":\"1e0ffff0\",\"nonce\":2447652,\"merkle_root\":\"72ddd9496b004221ed0557358846d9248ecd4c440ebd28ed901efc18757d0fad\"},\"alertpubkey\":\"04F04441C4757F356290A37C313C3772C5BC5003E898EB2E0CF365795543A7BF690C8BBBFA32EE3A3325477CE2000B7D0453EFBB203329D0F9DF34D5927D022BC9\"}"

So just like that iguana adds three more coins that it supports. I am verifying they sync to realtime correctly and getting things setup for a parallel sync. will be interesting to see how fast iguana can sync these new coins

James

test results: DGB synced just fine except for a few blocks that used up too much memory,maybe it was just a network data error as it went past it after spewing lots of errors. 

EAC had a header version number issue and also the txformat appears to have changed, so i will need some info from eac devs how they changed the block or tx serialization

DOGE needed auxpow to be set, but it seems that peer discovery is not working so well for some reason.

Not sure how long dgbcoind takes to sync from scratch, but iguana got almost synced in about an hour, but definitely some sort of memory issue and upon restart it went a lot faster. seems there are some bugs which dgb exposes. After all the bundles got sync'ed the creation of all the additonal files took just a couple minutes and only the end of the ledger validation had a glitch. So, not perfect, but it stumbled to the finish line:
DGB.RT0 u.0+c.0 b.0 v.0 (0+5/2000 1st.901).s0 to 1468 N[1469] h.2937082 r.2905113 c.2904000 s.2905163 d.0 E.1452 maxB.160 peers.9/256 Q.(0 0) (L.2937082 1468:1082) M.2937081 6a4dad140be897da0994e8db855261b201565bc425c668c9e1ea0b09f18676ac ledger.00000000 bQ.18 0:58:37 stuck.0 max.54
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorjl777
permlinkiguana-status-realtime-mode-in-debugging-3-new-coins-supported
categoryiguana
json_metadata{"tags":["iguana","blockchain","bitcoin","mathematics","money"],"links":["http://127.0.0.1:7778"]}
created2016-08-21 00:59:36
last_update2016-08-21 01:11:33
depth0
children9
last_payout2016-09-21 02:51:15
cashout_time1969-12-31 23:59:59
total_payout_value1.914 HBD
curator_payout_value0.392 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,593
author_reputation14,988,697,980,664
root_title"iguana status: realtime mode in debugging, 3 new coins supported (actually only 2 coins, third has some issues)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id914,100
net_rshares2,403,642,542,805
author_curate_reward""
vote details (46)
@jl777 ·
took a few restarts when things were bogging down, but in half hour combined, i was able to fully sync DGB from scratch and get to realtime. So the main engine is working pretty well, just need to make it a bit smarter and fix the annoying bundle boundary bug
properties (22)
authorjl777
permlinkre-jl777-iguana-status-realtime-mode-in-debugging-3-new-coins-supported-20160821t030954720z
categoryiguana
json_metadata{"tags":["iguana"]}
created2016-08-21 03:09:54
last_update2016-08-21 03:09:54
depth1
children3
last_payout2016-09-21 02:51:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length259
author_reputation14,988,697,980,664
root_title"iguana status: realtime mode in debugging, 3 new coins supported (actually only 2 coins, third has some issues)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id915,384
net_rshares0
@thecryptofiend ·
Not bad in fact that's a lot faster than any blockchain of a similar age that I've synched.  I have restarted the DGB sync from scratch for the experiment.  It will take a few hours at least.  Will let you know when I get a result.
properties (22)
authorthecryptofiend
permlinkre-jl777-re-jl777-iguana-status-realtime-mode-in-debugging-3-new-coins-supported-20160821t112058611z
categoryiguana
json_metadata{"tags":["iguana"]}
created2016-08-21 11:20:57
last_update2016-08-21 11:20:57
depth2
children2
last_payout2016-09-21 02:51:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length231
author_reputation323,603,913,866,384
root_title"iguana status: realtime mode in debugging, 3 new coins supported (actually only 2 coins, third has some issues)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id918,697
net_rshares0
@thecryptofiend ·
Just a quick update so far it has been exactly 7 hrs since I started the DGB resync from scratch it is at block number 1935862 of 2940037 -  last block was generated 24 weeks ago.  I think it will take another few hours at least so will probably fall into that 8hr plus range again.
properties (22)
authorthecryptofiend
permlinkre-thecryptofiend-re-jl777-re-jl777-iguana-status-realtime-mode-in-debugging-3-new-coins-supported-20160821t185001171z
categoryiguana
json_metadata{"tags":["iguana"]}
created2016-08-21 18:50:00
last_update2016-08-21 18:50:00
depth3
children1
last_payout2016-09-21 02:51:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length282
author_reputation323,603,913,866,384
root_title"iguana status: realtime mode in debugging, 3 new coins supported (actually only 2 coins, third has some issues)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id923,661
net_rshares0
@thecryptofiend ·
Very cool.  Even an hour is actually pretty good going for syncing the whole blockchain.
properties (22)
authorthecryptofiend
permlinkre-jl777-iguana-status-realtime-mode-in-debugging-3-new-coins-supported-20160821t010342652z
categoryiguana
json_metadata{"tags":["iguana"]}
created2016-08-21 01:03:42
last_update2016-08-21 01:03:42
depth1
children4
last_payout2016-09-21 02:51:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length88
author_reputation323,603,913,866,384
root_title"iguana status: realtime mode in debugging, 3 new coins supported (actually only 2 coins, third has some issues)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id914,147
net_rshares0
@jl777 ·
if anybody has a recent time it took to sync DGB from scratch, curious to know
properties (22)
authorjl777
permlinkre-thecryptofiend-re-jl777-iguana-status-realtime-mode-in-debugging-3-new-coins-supported-20160821t011149564z
categoryiguana
json_metadata{"tags":["iguana"]}
created2016-08-21 01:11:51
last_update2016-08-21 01:11:51
depth2
children3
last_payout2016-09-21 02:51:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length78
author_reputation14,988,697,980,664
root_title"iguana status: realtime mode in debugging, 3 new coins supported (actually only 2 coins, third has some issues)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id914,251
net_rshares0
@thecryptofiend ·
I did it earlier in the year - around April.  I didn't time it but it took about 8-12 hours if I remember correctly - I'm not absolutely certain because I ended up leaving it overnight when I went to bed.  That is with a 150Mb internet connection (down).  Even if it was some kind of exceptional situation that would make a 1 hours synch a vast improvement.
properties (22)
authorthecryptofiend
permlinkre-jl777-re-thecryptofiend-re-jl777-iguana-status-realtime-mode-in-debugging-3-new-coins-supported-20160821t014517764z
categoryiguana
json_metadata{"tags":["iguana"]}
created2016-08-21 01:45:18
last_update2016-08-21 01:45:18
depth3
children2
last_payout2016-09-21 02:51:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length357
author_reputation323,603,913,866,384
root_title"iguana status: realtime mode in debugging, 3 new coins supported (actually only 2 coins, third has some issues)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id914,608
net_rshares0