iguana status - bug fixing
I finished revamping the realtime processing and connected the back end to the historical bundles, the front end to the bitcoin rpc. amazingly it just started working! A few bugs, not surprising considering the scope of the changes. I feel much better about the realtime processing now, it is much simpler logic and much easier to maintain
I also verified I can indeed run multiple coins at once and got BTC, BTCD, LTC, DOGE, SYS and DGB all running at the same time! Not bad for a 2MB executable size that iguana has. It is that small since it has no database, no networking library, and other than libsecp256k1 (fantastic library for bitcoin signing!) iguana only uses the pthread library, stdio, system clock and memory mapping. Due to this lack of dependencies, it is now running on unix, osx, win32, win64 and even as JS in a pnacl compiled asm.js module. In all incarnations it creates a localhost server on port 7778, even with an automatically generated api test page. docs.supernet.org documents the API.
New coins are added just by calling the addcoin API with the appropriate parameters. If you have a bitcoin compatible you want iguana to support, just submit a pull request for the addcoin script. The following is the one for LTC:
curl --url "http://127.0.0.1:7778" --data "{"RELAY":1,"VALIDATE":1,"prefetchlag":-1,"poll":10,"active":1,"agent":"iguana","method":"addcoin","startpend":8,"endpend":8,"services":129,"maxpeers":256,"newcoin":"LTC","name":"Litecoin","hasheaders":1,"useaddmultisig":0,"netmagic":"fbc0b6db","p2p":9333,"rpc":9332,"pubval":48,"p2shval":5,"wifval":176,"txfee_satoshis":"100000","isPoS":0,"minoutput":10000,"minconfirms":2,"genesishash":"12a765e31ffd4059bada1e25190f6e98c99d9714d334efa41a195a7e7e04bfe2","genesis":{"version":1,"timestamp":1317972665,"nBits":"1e0ffff0","nonce":2084524493,"merkle_root":"97ddfbbae6be97fd6cdf3e7ca13232a3afff2353e29badfab7f73011edd4ced9"},"alertpubkey":"040184710fa689ad5023690c80f3a49c8f13f8d45b8c857fbcbc8bc4a8e4d3eb4b10f4d4604fa08dce601aaf0f470216fe1b51850b4acf21b179c45070ac7b03a9","protover":70002}"
Most of it will be self-explanatory if you have setup miners, but some fields require a bit of digging and experimentation. Once you make the addcoin call, addnode with a current peer and it will bootstrap the rest and start parallel syncing and get all the way to realtime updates. bitcoin rpc compatible interface is also spawned on the coin's rpc port.
A couple different GUI for all this is in the works and I will try to post screen shots of them when they are available. However at this point iguana is ready for command line testing.
It still has some crashes, especially if you try to parallel sync 6 coins at once! So sync them one at a time and it works much better. With SYS it did the initial sync in 2 minutes, yes 120 seconds. Unfortunately it crashed at the end of the process, so I had to spend another minute and a half until it went into realtime mode. I know, the delay is so horrible :)
Now in realtime mode, two servers are stable for hours and when any coin gets a new block, it updates all the internal data structures and prints out the new coin supply. Still need to fully validate the data, but it is looking much more stable and solid with the latest iteration.
All the code is open source https://github.com/jl777/SuperNET
it is almost 100,000 lines of custom C I wrote over the last 2 years and by writing it I sure learned a lot. It has enabled me to help the btcfork project as I have the entire bitcoin protocol in my head in the form of code, so I can just know the answer to questions that otherwise have to be researched. This wont last forever, as once I am finished with iguanacore, I need to make room for the new project and that means the old code gets swapped out.
I also cleared out most all the bugs in the github issues, so if you find any bug, go ahead and add to the github issues. There just has to be more than 5 bugs with all this code.
James
P.S. Just as I post this, of course one of the servers crashes... Still if iguana crashes there is no DB to be corrupted, just restart it and it picks up where it left off. kind of annoying though, certainly better without bugs
Do you have an ETA? Also, thinking about a new project?
pretty soon will just be waiting on GUI, but I think in a month or so things will be looking really sharp, but as I dont do GUI cant make any promises.
I still have several projects I have committed to finishing before any new ones, though I am helping with the btcfork project
if you can find some C code to sign steem transactions, then I can add support for it into iguana.
Interesting @jl777 will take a look at that supernet code thanks!
Thanks a lot for the update. The BTCD market certainly noticed...