The Gridcoin SuperBlock on Linux Is Coming!
gridcoin·@bullshark·
0.000 HBDThe Gridcoin SuperBlock on Linux Is Coming!
 Hey everyone, I go by the name **[BullShark](https://twitter.com/3ullShark)** and I’m one of the volunteer developers working on **[The Gridcoin Project](https://www.gridcoin.us)**. As you all know, there have been some delayed SuperBlock issues which could be due to the network having to rely on Windows nodes for producing SuperBlocks. It goes without saying that we need Linux nodes to contribute in creating them and so I have been working on porting the Neural Network to [C# and .NET Core][netcore] so that it can run on Linux. In this post, I would like to highlight some of the future improvements and the current progress made so far. # Improvements ## Removed High Magnitudes for Bad SuperBlocks In the current implementation when the VB.NET Code fails to download stats for a project, it will not be included in the SuperBlock. There is a bug which causes everyone's magnitudes that are contributing in the other projects to go up. This is because the calculation uses the total amount of projects that downloaded stats to divide by rather than the total whitelisted projects in the beacon data. This will be fixed in the new version so that if there is a bad SB other users will not be rewarded unfairly. We still need to come up with a way to prevent users losing their mag for projects that are periodically missing. ## No Team Requirement We have already programmed removing the team requirement into the port so if the vote passes it will be a quick change. As you can see from the image below there are two columns in the Researcher's table with before and after magnitudes when removing the team requirement.  ## Data Storage The current implementation stores everything using lots of different flat files inside the NeuralNetwork directory. This is a problem because it makes the development more complex and can lead to file locking issues. The new version solves this by storing everything in a SQLite database. On top of this, it is also faster and easier to extend because the code is easier to read and third-party tools can be used to query the database. ## Improved Syncing **[startail][startail]** ran some tests and found that some BOINC project servers update their stats more frequently than previously thought. It turns out some are updating up to every hour or so and in order for consensus to be formed we need to update local stats more often. To solve this problem without putting too much load on the BOINC server we are reading the HTTP headers for the Last-Modified date and only downloading the stats file if it has been updated. This means we can update stats on each quorum interval. ## Cross-Platform Last but not least it works on Linux, OSX, BSD and any other UNIX compatible platform where .NET Core runs. The data gathering and processing is written in C# using the open-source cross-platform .NET Core runtime. I know there have been some people concerned about using .NET and would like to see the full implementation in C++ but it has taken a long time to port to C# and it would take much, much longer to do it all in C++. The reason, is because this kind of work is much better suited to a higher level language. The UI will still be written in C++ and it will still be fast. Only the data processing and querying the local database will be done in C#. ## Current Progress Most of the VB.NET code has been ported to .NET Core and **[Ravon][ravon]** has built a bridge in C++ so that the existing wallet can integrate with the new implementation on Linux. With the bridge he has built we now have a few Linux nodes trying to stake a SuperBlock on Linux. **[Ravon][ravon]**, **[TheCharlatan][thecharlatan]** and myself are currently testing the Neural Network port on Linux in the hopes for staking the first Linux SuperBlock. Once we know it works and the port is stable we can start developing the new UI in Qt and C++ *Note: we can release the Linux port without a UI in the beginning and then once the UI is built we can start phasing out the old NN code.* It shouldn’t be long now :-) You can find the .NET Core in [my fork of the GitHub repository][bullsharkfork] and the work done on the bridge inside [ravon's fork][ravonfork]. [bullshark]: https://twitter.com/3ullShark [gridcoin]: https://www.gridcoin.us [ravon]: https://steemit.com/@ravonn [startail]: https://steemit.com/@sc-steemit [bullsharkfork]: https://github.com/3ullShark/Gridcoin-Research/tree/dotnetcore/contrib/Gridcoin-DPOR [ravonfork]: https://github.com/denravonska/Gridcoin-Research/tree/neuralnet [thecharlatan]: https://twitter.com/Seppelpeters [netcore]: https://www.microsoft.com/net/core#linuxubuntu
👍 ravonn, frank0051, ribald, scalextrix, anwarabdullah, zacherybinx, gunde, alpinegiant, scoobot, metoo, joshoeah, guk, jimbo88, vortac, cm-steem, jringo, sc-steemit, dtbahoney, alexpmorris, mohammedfelahi, nateonthenet, fiord18, erkan, zipity, daynewright, theissen, rambinho, lukestokes, albertogm, lukestokes.mhth, trumpman, steemitboard, beaming-pile, chronosamoht, erelas, grider123, doqstrader, me-do, sodom, dutch, hafierre, neuralminer, escapeartist, ifoggz, bullshark, trikkstar, tomasbrod, nxtgencowboy, magixkiller, gregan,