Public source code

From distributed.net
Jump to: navigation, search

Public source code

Public client source code

Current versions of the public client source code can be retrieved from github:

Here is where you can download older archived snapshots from:

Miscellaneous utilities

Here is the source code to some of other distributed.net programs that have been made public:

The source of these utilities can also be browsed online at:

Statistics server code

distributed.net has now published much of the SQL and processing code that is used by our statistics server! The PHP code that generates all of the webpages is also available. You can browse the stats source (and source for a few other utilities) at:

A short FAQ about the public client source:

Can I build a working distributed.net client with this source?

This source will only allow you to compile a harness for testing and benchmarking the performance of cores. It does not have the network or file buffer capabilities necessary to create a full client.

Ok, I just downloaded it, now what must I do?

If you are on a Unix box, type "./configure list". It will show a list of supported targets. If your hardware/software isn't listed, look at how the configure script is made and write your own entry, it's not very hard. Once configure has created a Makefile for you, just type "make" and the whole thing will compile.

If you are unlucky enough to not have access to the wonderfulness of Unix, you will have to look for a Makefile / Project file suitable for your machine. Look in makefile.vc (MS Visual C++), makefile.wat (Watcom for DOS, NetWare, Win16, OS/2, Win32cli), smakefile (Amiga), Platforms/beos/* (BeOS), make-vms.com (VMS).

What version of gcc should I use?

We generally recommend the GNU gcc/g++ for compiling on most UNIX-based platforms. The latest version at the time of writing is gcc 4.x, however gcc 2.95.3 is still very commonly used.

Currently gcc 3.2 produces a better optimized version of the ANSI RC5-72 cores on x86 (but the ANSI cores have been superseded by hand optimized assembly cores), but gcc 2.95.x produces a better optimized OGR x86 core. You may see different variations on other processor architectures. No version of gcc older than 2.95 is recommended for use with our source code. gcc-2.96 and gcc-3.0.x are not recommended and probably won't build the source out of the box.

What's this NASM/YASM thing?

It stands for Network-wide Assembler. It's a portable x86 assembler, with MS/Intel-like syntax. It is only needed if you are compiling on an x86-based platform, since some of our cores are written in assembly.

We recommend a recent version NASM. The current version at the time of writing is 0.98.36 but all 0.98 should probably work.

For AMD64 cores, we make use of the YASM Modular Assembler. It is a complete rewrite of NASM, but also offers support for the new AMD64 architecture. Currently you will need to use the latest CVS checkout of YASM since there have been important changes since the last official YASM release (Milestone 3). Ok, now I have an executable, how does it work?

Just type "./dnetc --help" and you will get a quick list of available options and commands.


If I get my source to compile, does that mean there will be a client for that now?

Look at the porting page and follow directions there.

I can't get my <insert-your-favorite-compiler-OS-hardware-here> to work with this source!

Please mail bovine@distributed.net or email submission form, and we will try to find a solution together.

I want to use some parts of this source in my own project

Please mail bovine@distributed.net or email submission form about your project. Most of the time we will want an acknowledgment of DCTI work (and the original author if any) in your source and executable, and that future improvements will be sent back to us.

I've created my own core for another processor, or one that is faster than yours!

Excellent! We would very much welcome the contribution of your changes so that we could integrate them into a future release of the client. Additionally, if you find that you understand the code published here and enjoy tinkering with this type of code, write the people above tell them! We are always looking for people with good programming ability who would be willing to work on focusing on a specific aspect of the client code.

Why is distributed.net still not completely open-source with all parts of its source code?

Although we are providing all of the code linked on this page for public perusal, it is still necessary to keep select portions of the codebase unavailable for general distribution. Indeed, this is an aspect of our operations that we would very much like to be able to eliminate.

Releasing binary-only clients still does not completely eliminate the possibility of sabotage, since it is relatively easy for any knowledgeable person to disassemble or patch binaries. This is actually quite a trivial task, so we urge you not to try. Indeed, security through obscurity is actually not secure at all, and we do not claim it to be such.

The source code available from this page is really all of the algorithmic code that would be of interest. The only code that is not present is the file-access and network socket code, which is not terribly interesting (nor pleasant to try to comprehend). The computational cores and platform-specific optimizations included in this package is what you would want to look at if you are interested in how the client works, or how you can increase the speed of the client for your processor.

A document that discusses many of these issues at much greater depth is available for reading, and discusses the more general problem of Operational Code Authentication.