James (jl777) BitcoinDark Development Update (cross-post):
I pushed a test release
it supports sending commands to the decentralized load balancer
./BitcoinDarkd SuperNET '{"plugin":"ramchain","method":"ledgerhash","coin":"BTCD","broadcast":"allpeers"}'
./BitcoinDarkd SuperNET '{"plugin":"ramchain","method":"addrind","coin":"BTCD","broadcast":"allpeers","addr":"RM5NNYdGee6X65aFGkyaRkYocSxQVNsB8d"}'
the calling method is different
if you leave off the "broadcast":"allpeers", it just queries the local node
but what this means that even if you have no local ramchain, you can get ramchain info from all the nodes that do
{
"userdir":"/home/username",
"secret":"randvals","myipaddr":"youripaddr"
}
I simplified the SuperNET.conf a bit
the minimum SuperNET.conf file is above
using "secret":"randvals" generates randvals files and these contain your key, so keep them safe!
you can also just directly put the passphrase instead of "randvals"
i have other options for passphrase management, but for now, lets keep that part simple
after cloning a fresh copy from my repo (it is used for tests though so make sure to checkout a stable copy)
https://github.com/jl777/btcd/commit/a8c5809efee830102b9d5371b6b63bbbdb8de173 appears to be stable
cd into the libjl777 directory and do:
make onetime
make SuperNET; make btcd
There are very few dependencies for SuperNET: make clang-3.5 autoconf libtool libcurl4-gnutls-dev unzip autogen
so apt-get install those if you dont have them
to bootstrap a system from scratch for full btcd build just do:
make dependencies
then if the make of btcd or SuperNET failed, it should work. make a SuperNET.conf with the three required fields in the libjl777 directory
now you can launch ./BitcoinDarkd
current methods (changing all the time) for ramchain plugin is:
#define PUB_METHODS "ledgerhash", "richlist", "txid", "txidind", "addr", "addrind", "script", "scriptind", "balance", "unspents", "notify"
char *PLUGNAME(_methods)[] = { PUB_METHODS, "create", "backup", "pause", "resume", "stop" }; // list of supported methods
mostly self explanatory. to create a ramchain:
./BitcoinDarkd SuperNET '{"plugin":"ramchain","method":"create","coin":"BTCD"}'
to pause it:
./BitcoinDarkd SuperNET '{"plugin":"ramchain","method":"pause","coin":"BTCD"}'
you can generate to a specific block by setting "end":350000
./BitcoinDarkd SuperNET '{"plugin":"ramchain","method":"richlist","coin":"BTCD"}'
returns:
return.({"supply":1218020.71387317,"richlist":[["RBF9tS45eKBab2L4ZYdQEzMVnp5vtHUuqC", "40000.00000000"], ["RGgbJiV2Hs8eWJbZmZ3hZLS8sSzFA7tYNu", "38773.29296875"], ["RA7FDvaNFXZNLqosSbCWFbypuvijJNQw5J", "37702.49609375"], ["RQ5zLFGwZGhTKbANAbCHaAP1ghZWnv6wKE", "32116.67578125"], ["RT9obeyoapYL1kzZdrBKTtJvasTJoDTiwA", "28311.67968750"], ["RMo9emPiNDd1kvn9jpDBEvLavPxb9rdyNk", "18650.31250000"], ["R9pEPKTktBGmG9ggi2TGn4USjVXPzQ5Tm1", "18210.96679688"], ["RMtkykzKuKiP4PNjgqKH6FrcSJm4Y6eA8n", "17148.80859375"], ["RWcg6XBmisrbkMYvzV9u7j1HvgMg4LuUYC", "16779.16796875"], ["RWAxa88tQXVDY64Bwz6DP2ZppsFotibaYh", "15620.54687500"], ["RQif3cnnrWjP2zzrhum24FjgwS4wBzBfts", "15618.84863281"], ["RJ94yrqKCP3XjFsAsNj9WXS5SLpyHUpx5n", "15617.99511719"], ["RBCLnsjCVHWRyUpfgauyzUu8iP6X5CabJT", "15587.90722656"], ["RGaV5Qxi2PdtMpe8GR9MpQ9JogDz5oaZbK", "15147.80078125"], ["RJPGpRQ4nudwzw6mjWCUb6cq7aWP4to6pM", "14820.11523438"], ["RDnHMnK8tgm9WmY9u3EoRLww9FyFBannCa", "14590.96875000"], ["RWc6VDt5SdjnWXoVQ2AJsuxU2QSaDcG5R7", "14576.76953125"], ["RWUTuApNQuuSustN4DBt6PxxVRwZhh52An", "14405.32910156"], ["R9g77ds8kFS58V24s9Wodt8quMB8NSp3FC", "13069.25292969"], ["RXcEPd6zV1hHAVZzfe2d8Ccv3MzHMZEZ49", "12795.74023438"], ["RUZ9AKxy6J2okcBd1PZm4YH6atmPwqV4bo", "12693.13964844"], ["RDvdbqJLu8GgLL1TvdADNeCbbjXRmHBjog", "11563.78906250"], ["RR1svWTDxD6bjtkXDzq4vhB6PWPETPNU42", "11430.56445312"], ["RYNE2isKrRu5b7xxm1DtXcLxdmBEKatuJY", "11337.11425781"], ["RV5eKvybKDNctYxXiNYV766PzCakiUNRRm", "11308.52539062"],]})
it has extra comma so doesnt parse, so there are still bugs, but I dont have the time to find all the bugs myself
or if I have to, it necessarily delays the completion.
I am not so worried about exact completion date, but if you are then you can help by testing
if you can construct JSON command lines like above, you can test!
if you can make an HTML front end to make it easy for others to test, then there will be a bounty for that
I think the wallet should have a debug mode where you can issue such API calls.
notice that with "broadcastflag":"allpeers" the request is sent to the relays, which then randomly selects one of them to act as a coordinator for that request
it then relays your request to all the peers and the ones that are able to (or want to) respond will send the result back to the coordinator
who then collates it into a single request and sends it back to your node
it flows back through and appears magically on the command line
so with a single BitcoinDarkd RPC call you trigger an entire chain of events, which just happens to make establishing a peer based consensus much easier as you now have data from all the peers to compare
*****
for people that dont care much about making API calls to ramchains (I know there are people such as this), there is a reason for you to care about all this
ramchains is implemented as a plugin and it is publishing which methods it can execute locally or for public access
replace "ramchains" with "anything" and then all nodes can access via relays all the nodes that are supporting the "anything" plugin and the plugin can literally be for anything!
SuperNET itself is implemented as a plugin that connects into BTCD
then all the other plugins connect to SuperNET
you can publish methods that require authentication, but I am still working out the details on this, so there will be at least three levels of methods, for each plugin by setting "iamrelay":1 to your SuperNET.conf, it tells the other relays that you are a relay too, and so this makes it fully decentralized
I have not beefed up the security or privacy yet, so just for testing now
in addition to having public methods accessible via the decentralized load balancer, you can also offer subscriptions to a data stream
this can be things like notifications of any changes to an address (or set of addresses) or anything that can be turned into data
which is quite a few things
I havent implemented a billing/accounting system yet, but I dont see any big hurdles for that. current ideas are for publishers to set prices and subscribers to pay for them, with the system managing the payment process. maybe I will setup auction pages within InstantDEX, not sure the details
currently there are the following plugins: SuperNET, echodemo, coins, relay, peers, ramchain, db777, subscriptions, MGW in various stages of completeness
the SuperNET plugin has just a couple of methods, "install" and "plugin"
"install" installs a new plugin (which can theoretically be in any of a dozen languages) that is a standalone program
and "plugin", which just routes a request to the named plugin
"echodemo" demonstrates a minimal plugin in echodemo.c (85 lines of C) with "echo" method, that echos what is sent to it
"coins" interfaces to coin daemons, any gen1 coin is supported and if it is added to the source code you dont even have to configure it in SuperNET.conf, but if it isnt, you can add support for it via the "coins":[:"name":"COIN",...} array
to add support for a new coin:
char *coindirs[][3] = { {"BTC",".bitcoin"}, {"BTCD",".BitcoinDark"}, {"LTC",".litecoin"}, {"VRC",".vericoin"}, {"VPN",".vpncoin"} };
just one little array needs to be added to and this means via the coins array you can communicate to any other coin daemon, but I have not had a chance to add many methods to the coins plugin as I am concentrating on MGW support
you know about ramchain's current methods
db777 is the database engine based on sophia
http://sphia.org/v12.html relays deals with the decentralized load balancer and it automatically reconfigures the network topology as more relays are added. it also supports direct connections so you can connect directly to a specific relay
char *PLUGNAME(_methods)[] = { "list", "add", "direct", "join", "busdata", "devMGW" }; // list of supported methods for relay
it seems the peers plugin deals with the "direct" connection: char *PLUGNAME(_methods)[] = { "direct", "devMGW" };
I am about to debug that next
subscriptions plugin will manage subscriptions (including payments), but this is for a bit later
after MGW plugin is completed I will make an InstantDEX plugin
It confuses me greatly that many people are complaining about lack of progress...
how many of them have created a decentralized system for adding new services? actually has anybody else created anything like this?
somebody please make a copy of all this so it is not lost, thanks