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

in #iguana8 years ago (edited)

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

Sort:  

Very cool. Even an hour is actually pretty good going for syncing the whole blockchain.

if anybody has a recent time it took to sync DGB from scratch, curious to know

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.

Actually as an experiment I could do it again tomorrow during the day if you want to get a more accurate measure.

that would be great to get a baseline to comapare to. I am only seeing about 40 to 50 mbps bandwidth from the network, so your connection wont be a bottleneck.

I have isolated the exponential slowdown to a memory leak I seem to have introduced recently. It really should finish in about half an hour

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

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.

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.

OK so it is about to finish up (4 weeks behind) but I'm going to go to bed now. So far it has taken 13 hrs and 22 minutes. I think it will definitely be done within half an hour. So that would give a sync time of almost 14 hours.

Coin Marketplace

STEEM 0.21
TRX 0.20
JST 0.034
BTC 90827.60
ETH 3116.50
USDT 1.00
SBD 2.97