to start i'd just install ubuntu 16.04 server on a VM, install current mysql server, huntercore etc..
not sure what you will need - i can give ssh access or tell me what you want installing.. is it just an exe and i use mono to run it?
will it also update the mysql table(s) realtime when i a new block comes in?
I recently rent 2 micro VM to start hack around with linux and VM and I've your same configuration (ubuntu 16.04 server) but i don't have space/ram to host huntercore or mysql anyway i should be able to work on your VM, i already installed on mine the dotnet core needed (it's just a matter to update apt with a new repository url and then apt-get the needed dotnet-core stuff to be able to compile and run .Net Core app
Anyway i can start implementing and testing on my system, maybe you can create mysql db and tables you'd like to be populated, and let my VM run the daemon that get info from your server (getblockinfo, etc...) and write back on your mysql, so once it's ready it's just a matter to deploy it on your server and i don't need access to your machine
I can give you the IP of my VM so you can allow my machine to connect to your huntercore RPC service
-
for data -
probably 1 table with all the variable info for each block (if you can process gamestate as well, that would be a bonus)..
probably fields such as > blockhieght, algo (0 or 1), difficulty, unix time, median time, size, weight(i should google this i guess), and anything else you can think of
If you can do gamestate stuff as well > Total generals and total hunters, and anything else if it is easy for each block..
only need the raw values (no need to calculate unix time, or put the difficulty type etc).
all that can go in one table..
Could also output getchaintips into another table, although it would be more of a live table with no historical data for ach block .. not sure how i would visualize it but could use to see if there is any forking going on.
Ok I'd say you could:
- configure your VM with huntercore
- install MySQL and create the database with tables you'd like to have populated
- open RPC service to my IP
- give me the connection string to reach your MySql db
- (bonus) install dotnetcore on your server, pretty straightforward (
https://www.microsoft.com/net/core#linuxubuntu )
once that's ready, wait some time that i find the time to do the app and test it and then I'll give you the app or i'll install it on your vm
(would of course need to parse all the blocks from block 1 till now too)
ok so we are talking about 2 components: a realtime one that runs as a daemon that polls the RPC, and an historical one to fill the gaps
note that gathering blocks information is quite fast even on historical data and seems to work even on a pruned node (i need just the header info)
getblockhash 1
> a91daed69a867a560cd68d364889c925c26c6d6f3b985c27b588f108ca72e786
getblockheader a91daed69a867a560cd68d364889c925c26c6d6f3b985c27b588f108ca72e786
> {
"hash": "a91daed69a867a560cd68d364889c925c26c6d6f3b985c27b588f108ca72e786",
"confirmations": 1571465,
"height": 1,
"version": 131585,
"versionHex": "00020201",
"algo": 1,
"merkleroot": "09b1b907a0b33312822acb00bc3d7441fa4ee4842d6cf16ef090dc48e2eb70c6",
"time": 1391264537,
"mediantime": 1391264537,
"nonce": 57104,
"bits": "1e0fffff",
"difficulty": 0.0002441371325370145,
"chainwork": "0000000000000000000000000000000000000000000000000000000200011001",
"previousblockhash": "00000000db7eb7a9e1a06cf995363dcdc4c28e8ae04827a961942657db9a1631",
"nextblockhash": "000000000e14e03fa502dad4b69184c23690bd16455bf0dc7e5ea76ed033c961"
}
and so if that info is enough would be quite fast to populate the historical data, but gamestate is a loooooot slower