-
Notifications
You must be signed in to change notification settings - Fork 4
Home
Learn how the entire system works, and how to create your own programs.
The client is located at ClientCSForm
. It is the program most people will use to interact with DCC and it's blockchain. If it is your first time using it, then you will first be prompted with a sign-in. There is no need to create an account or register, since once you sign in an account is generated. DO NOT FORGET YOUR CREDENTIALS. Everything is encrypted with a SHA256 hash algorithm, and there is no way to recover your account if lost. You must also make them as secure as possible, since anything predictable like '1234' or 'password' can compromise your account. You may choose to save your credentials and stay logged in for next time if you wish. Once signed in, multiple things will appear on your screen. Your generated wallet is at the top, and is the address you will give others in order to receive DCC. Next, your current balance and pending balance. Also the trade and upload tabs appear.
When trading DCC, you must enter the recipients wallet address and the amount you wish to send them. This will return an error if the amount you are trying to send is larger than your pending and current balance or if the recipient address is invalid.
Programs are the most important part of DCC and what makes it unique. In order to make dependencies as manageable as possible and prevent running .EXE files, the language chosen is called Rust. Miners are able to automatically build and run Rust programs with just the base language installed, and they are running the source which means executables don't have to be used and they can be analyzed for malicious software. Unlike C++, Python, or C#, all of the dependencies for Rust programs are written in a Cargo file and are automatically downloaded when it is built.
Before submitting any Rust project, there are a few guidelines that must be followed first.
- No malicious software, and no editing files outside of your project's own folder. Each program is examined by trusted users before release, and if any problems are encountered the program will not be computed and you will receive a refund.
- The project, not including any dependencies, must be less than 20 MB. This means you will need to run
cargo clean
inside of your project folder. This will remove cached and unneeded files or dependencies generated by Cargo, and will significantly reduce file size. - The project should include an
out.txt
file in it's root folder. This is where you will output any data you want to be returned to you. Every miner will upload a version of this to the server and stored in a folder for you to download at any time. - The project directory should look similar to this:
- Cargo-Project-Folder
- src
- main.rs
- Cargo.toml
- Cargo.lock
- out.txt
- src
- Cargo-Project-Folder
- Your Rust project must be packaged in a .zip file. You may use any software to do this, it just needs to be zipped. Do not put the project in an extra folder: just zip the root project folder containing all of the cargo files and out.txt. Using the example above, you would zip
Cargo-Project-Folder
.
After you have ensured you followed all of these guidelines, you may submit your file. You can upload your zipped Rust program via the section titled "Upload Program" in the Client. First you select your zipped program with the file select button. Next you can specify the number of minutes you want your program to be run for. This number is cumulative, and will decrease as many different miners are running it. After that you can specify the level of hardware you want. The minutes and hardware level are related: if your program requires better hardware but you select a low level, then it will take more time for it to execute and therefore use up more of your minutes. Try to balance the number of minutes and hardware level to get the best price. Finally after filling in those, you may click the "Submit button". Your file will be uploaded to the server and your funds will be subtracted and will appear in "Pending". If there is an error and/or your program does not upload then you will see it by the "Submit" button and no money will be subtracted.
The most secure way to hold and transfer funds is by using something called a Cold Wallet. The DCC Cold Wallet only has the ability to send or receive funds, and does not have the ability to upload programs. It generates two 64 MB keys (about 64,000,000 chars long) using windows cryptographic service provider for utmost security and randomness, and stores them in a file. There are no inputs for a username or password, those have been replaced by this file. Make sure not to lose this file. If this file is lost or edited then you may lose access to your wallet and it's funds. The wallet file may copied as a backup, and it is highly recommended that you do so after it is first generated.
After submitting a program, it will appear in the list at the bottom of your client window. All of your active and inactive programs will be listed here. When a program ends, it along with all of it's data will still be cached within your client. The list will contain information regarding if it is being computed, the amount of minutes remaining, and a button to download the collected data so far. The data collected will automatically be deleted from the server after all of the minutes have been computed AND they were done getting computed more than 30 days ago, so make sure to download it to your system before then.
You will have an option when submitting a program for how you wish the collected data to be handled. You can either collect all data, which copies the out.txt
file from all miners and saves a version of it. You can also keep data with elimination, which checks the first line of each out.txt
file received and keeps the one with the largest integer value. Finally, you can collect data based on key value, which will keep a version of each out.txt
that contains a specified string which you will specify in the appropriate box.
Every client and miner will connect to trusted clients called "Nodes" the first time they start. These nodes will provide a list of IP addresses of other miners/clients. These programs will then use these to create a P2P (peer-to-peer) network for exchanging information.