Ok, think I have a potential strategy for a “proof of work” algorithm that relies on Folding at Home. I know this is getting off topic, but the interest in a cryptocurrency that does this is surprisingly high, so I should be able to use that interest to help build out the essential elements of a blockchain that I can eventually use for my AI project.
So the way Folding@home works, is that you install a client on your computer (builds are available for the major OS’s). This client software is closed source, however it is headless and interfaced via one of the separate UIs which are open source.
Folding@home can be configured to have one or more “slots”, which can be set to the CPU or available GPUs. These slots process elements of a work unit in parallel, and results are sent back to the server. The username and optional passkey do not appear to be associated with any type of formal account, but simply are fields used for attribution. Credentials for attribution are stored unencrypted in a config file read by the client, and can be easily changed by simply modifying the config file.
An API is available, which includes an endpoint to look up statistics by user. Multiple clients or different people can reuse the same credentials, and will appear in the statistics as the same user. Results in the statistics for the same username with different passcodes will be separated as different records (with the same username) in the results, and the passcode is not included in the results.
Proof of Work Strategy…
One possible strategy would be for each miner to install the mining software and Folding@home client on their computer (may also be possible to bundle the binary with the mining software… would need to investigate). The mining software node would start by generating a random username and passkey and updating the config file, then launching the Folding@home client to begin work. It would then ping the statistics API for the generated username until it returns statistics, and then hash the JSON string. If the hash has some rare properties (for example, if it starts with four zeros), then the node would stop the Folding@home client, generate a new random username and passcode, and restart the client.
The mining software would then generate a new block to be verified by other nodes in the network. The details for verification would include the username and the hash. Clients would verify the block by retrieving statistics for the username from the API, hashing them, and verifying the hash is correct. In the case of duplicate usernames in the API results, then each result would be checked. If any of the results hash correctly, the work is verified. Since a passkey was specified and not shared, this would make it impossible for a rogue node to invalidate a block by processing additional work units onto the record.
This strategy isn’t complete, as there is an obvious attack vector – a rogue node could just troll and hash the statistics to find good hashes without actually doing any work itself, and try to report them before the originator node. Solving this may require working with Stanford to make some modifications to their system (such as an ability to make statistics private unless queried by username directly). But it is probably a good starting point.
I’ve already got several folks who are interested in contributing to this project, so I’ll probably set up a team on GitHub where we can build out the block chain for the “Folding at Home Coin” (will need a better name…) If anyone here is interested in contributing, I’ll post a link once I have it up.