Commit 4687df7e authored by Volodymyr Shamray's avatar Volodymyr Shamray
Browse files

Fix incorrectly merged documents

parent 97269460
Showing with 543 additions and 790 deletions
+543 -790
......@@ -6,11 +6,6 @@ Use the autogen script to prepare the build environment.
./configure
make
Precompiled binaries are available at github, see
https://github.com/crownproject/crown-binaries
Precompiled binaries are available at https://crown.tech/wallet/. Always verify the signatures and checksums.
Always verify the signatures and checksums.
See doc/build-*.md for instructions on building crownd,
the intended-for-services, no-graphical-interface, reference
implementation of Crown.
See doc/build-\*.md for instructions on building crownd, the intended-for-services, no-graphical-interface, reference implementation of Crown.
Copyright © 2009-2018 Bitcoin Developers
Copyright © 2014-2016 Dash Developers
Copyright © 2014-2018 Crown Developers
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\ No newline at end of file
Crown Core staging tree 0.12
===============================
Travis:
`master:` [![Build Status](https://travis-ci.org/Crowndev/crowncoin.svg?branch=master)](https://travis-ci.org/crownpay/crown) `v0.12.0.x:` [![Build Status](https://travis-ci.org/Crowndev/crowncoin.svg?branch=0.12.0.x)](https://travis-ci.org/Crowndev/crowncoin/branches) `v0.12.1.x:` [![Build Status](https://travis-ci.org/Crowndev/crowncoin.svg?branch=0.12.1.x)](https://travis-ci.org/Crowndev/crowncoin/branches)
Gitlab:
`master:` [![pipeline status](http://gitlab.crown.tech/crown/crown-core/badges/master/pipeline.svg)](http://gitlab.crown.tech/crown/crown-core/commits/master)
# Crown Platform 0.12.5
[![pipeline status](http://gitlab.crown.tech/crown/crown-core/badges/master/pipeline.svg)](http://gitlab.crown.tech/crown/crown-core/commits/master)
http://www.crown.tech
Copyright (c) 2009-2015 Bitcoin Core Developers
## What is Crown?
Crown is both a leading digital token (known as CRW) and a self-sustainable blockchain platform for building and running economy applications. Our community uses the Crown Platform as a payment service, proof of data integrity and a support structure for projects ranging from cloud businesses to apps. As more users lend their talents and passion to the platform, Crown’s potential to promote innovation grows exponentially.
### A Digital Token
CRW tokens are a type of cryptocurrency. Like bitcoins, CRW can be used to pay for a wide variety of products and services. CRW can also be traded against other altcoins through an online exchange.
### Blockchain Application Platform
The Crown Platform utilizes two additional tiers of nodes that offer different roles: Masternodes process instant transactions while Systemnodes will host applications via the CrownPlatform. Members of the Crown Community can set up their own incentivized nodes to earn CRW while helping to maintain the network.
For more information, as well as an immediately useable, binary version Crown see http://crown.tech/wallet.
## Community
Crown is ultimately a community-driven platform. Its potential to bring social and echnological growth is contingent on the ideas and support its users provide. We invite you to lend your voice and imagination to this burgeoning platform and share in its success. Together, there’s no limit to what we can accomplish.
* Crown Forum: https://forum.crown.tech
* Mattermost: https://mm.crownlab.eu
* Discord: https://discord.gg/Tcrkazc
* Telegram: https://t.me/crownplatform
* Guides & How-to: https://forum.crown.tech/index.php?board=5.0
## Governance
Crown’s governance system has two core functions: choosing platform direction and funding. Unlike blockchain projects that rely on donations and pre-mined endowments, Crown uses 10% of each block reward to fund its own development. This allocation of funds allows us to reward miners and node operators for their contributions without compromising the platform’s coding and optimization efforts.
Copyright (c) 2014-2018 Crown Core Developers
Crown’s governance system also enables its community to vote on which changes (ranging from projects to network updates) will be implemented onto the blockchain. Any platform user can submit a proposal to grow or change the network.
* View proposals: http://crown.today/proposals
* How to create proposal:https://forum.crown.tech/index.php?topic=11.0
What is Crown?
----------------
## Server Nodes
Crown is an experimental new digital currency that enables anonymous, instant
payments to anyone, anywhere in the world. Crown uses peer-to-peer technology
to operate with no central authority: managing transactions and issuing money
are carried out collectively by the network. Crown Core is the name of open
source software which enables the use of this currency.
Crown uses two types of server nodes to build and protect its network — Systemnodes and Masternodes. Each of these dedicated servers are unique and provide vital infrastructure. By creating and running them, you can help our community grow while consistently earning CRW as a reward.
For more information, as well as an immediately useable, binary version of
the Crown Core software, see http://crown.tech/wallet.
### Masternodes
Masternodes supply substantial computing power to the Crown Platform, and have copies of the ledger stored and ready to distribute to the network if needed. Think of Masternodes as the stabilizing force behind Crown; they help us keep the network secure and running smoothly by tracking the ledger and confirming transactions at lightning speed with Instant Send. A Masternode requires 10,000 CRW collateral to run.
License
-------
See also: [Masternode Setup Guide](https://forum.crown.tech/index.php?topic=1241.0).
Crown Core is released under the terms of the MIT license. See [COPYING](COPYING) for more
### Systemnodes
Systemnodes are empty-shell servers that are tasked with hosting specific services for the Crown network. The Crown Platform will use Systemnodes to host new economy applications created by members of the community, connecting them to the Crown Platform through an API. A Systemnode requires 500 CRW collateral to run.
See also: [Systemnode Setup Guide](https://forum.crown.tech/index.php?topic=1240.0).
## Development
### Report a Bug
Bugs can be reported via the Gitlab issues page: https://gitlab.crown.tech/crown/crown-core/issues, tech support channel in [Mattermost](https://mm.crownlab.eu/crown/channels/tech-support) or emailing [support@crown.tech](email:support@crown.tech)
When describing a bug please include following information:
* **Issue summary** - an issue header which outlines the actual defect to be solved
* **Product** - for example *Desktop Wallet x64, Windows 10*
* **Build Found In** - for example *0.12.3.3*; this is very important as you may be using an old build and the issue may already have been resolved.
* **Steps to reproduce** - the steps to recreate exactly how the error occurred when you found the issue
* **Expected behavior** - what you would expect to see instead of the issue; this can be useful as it may trigger a conversation between yourself and the developer (or the team) about a better fix or possible solutions.
### Procedures for bounty development
Crown core developers are working hard on bug fixes, platform enhancements, and new product features.
Some of these tasks may be completed by talented community members through the bounty program.
Bounties are posted to the wiki and can be picked up by anyone who wants to submit new code to the project repository.
If you want to be directly notified of new bounties matching your specific skillset, fill out the short intake survey to get onto the [InSource Community Job Board](https://crown.link/insource).
If you have any questions regarding code submissions, please contact Josh 'fin' Wilcox (josh@crown.tech, or fin on mattermost) and ask about bounties.
## License
Crown Core is released under the terms of the MIT license. See [LICENSE](LICENSE) for more
information or see http://opensource.org/licenses/MIT.
- - -
Copyright © 2009-2018, Bitcoin Core Developers
Copyright © 2014-2016, Dash Core Developers
Development Process
-------------------
****************************************
**Bug Reporting**
****************************************
Bugs can be reported via the github issues page: https://github.com/Crowndev/crowncoin/issues
or emailing support@crown.tech
***************************************
**Merging and Updating**
***************************************
1. A Pull request is submitted.
2. It will then be reviewed and tested by the Crown development team.
3. After initial code inspection and internal testing the update will be deployed to the testnet for public testing.
4. A minimum of 15 days of testnet function per upgrade is required to fully validate and test the upgrade.
5. Once tested and validated, the pull request will be merged to master code and included in the next update.
******************************************
**Procedures for bounty development**
*****************************************
The Crown team will post a request for development and the requirements to receive the bounty reward and the size of the reward.
1.Developers at large can then post their interest in seeking the bounty on github and being developing on the change.
2. Once the at-large developer deems his code complete, they will submit a pull request via ionomy github with the label of the Bounty Feature.
3. It will then be reviewed and tested by the internal development team at ionomy.com.
4. After initial code inspection and internal testing the update will be deployed to the testnet.
5. A minimum of 15 days of testnet function per upgrade is required to fully validate and test the upgrade.
6. Once tested and validated, the pull request will be merged to master code and included in the next update.
7. When the version update is deployed Bounty funds will be released to the developer of the completed feature.
Copyright © 2014-2018, Crown Developers
Crown Core 0.12.0
=====================
# Crown Platform 0.12.4
Setup
---------------------
[Crown Core](http://crown.tech/wallet) is the original Crown client and it builds the backbone of the network. However, it downloads and stores the entire history of Crowncoin transactions (which is currently several GBs); depending on the speed of your computer and network connection, the synchronization process can take anywhere from a few hours to a day or more. Thankfully you only have to do this once. If you would like the process to go faster you can [download the blockchain directly](http://txexplorer.infernopool.com/CRWbootstrap.zip).
[Crown software](http://crown.tech/wallet) is an implementation of a full Crown Platform node, which can be used both locally, as a wallet for CRW and for running Masternodes and Systemnodes. It is a full node: it downloads and stores the entire history of Crown transactions (which is currently several GBs); depending on the speed of your computer and network connection, the synchronization process can take anywhere from a few hours to a day or more. If you would like the process to go faster you can _download the blockchain directly_ **(BOOSTRAP LINK NEEDED)**.
Running
---------------------
The following are some helpful notes on how to run Crown on your native platform.
## Install and Run Crown Wallet
Here are some helpful notes on how to run Crown on your native platform.
### Windows
Unpack the files into a directory, and then run `crown-qt.exe`.
### OSX
Drag Crown-Qt to your applications folder, and then run `Crown-Qt`.
### Unix
You need the Qt5 run-time libraries to run Crown-Qt. On Debian or Ubuntu:
Unpack the files into a directory and run: `bin/crown-qt` or `bin/crownd`. You need the Qt5 run-time libraries to run Crown-Qt. On Debian or Ubuntu:
sudo apt-get install libqtgui5
Unpack the files into a directory and run:
- bin/32/crown-qt (GUI, 32-bit) or bin/32/crownd (headless, 32-bit)
- bin/64/crown-qt (GUI, 64-bit) or bin/64/crownd (headless, 64-bit)
### Need Help?
* Ask for help on Mattermost: https://mm.crownlab.eu
* Or at Crown Forum: https://forum.crown.tech
* Or write a mail to [support@crown.tech](email:support@crown.tech)
## Run Masternode or Systemnode
### Windows
Here are some guides that will help you to setup and run an incentivized node:
* [Masternode Setup Guide](https://forum.crown.tech/index.php?topic=1241.0)
* [Systemnode Setup Guide](https://forum.crown.tech/index.php?topic=1240.0)
* [Masternode Configuration](masternode-config.md)
Unpack the files into a directory, and then run crown-qt.exe.
## Participate in Crown Decentralized Governance
### OSX
As a community member you can participate in the Governance by proposing projects that will advance Crown. You are also encouraged to discuss the poposals at [Crown Forum](https://forum.crown.tech/index.php?board=17.0).
Drag Crown-Qt to your applications folder, and then run Crown-Qt.
If you own one or several masternodes you can (and you should!) help to choose the direction in which Crown goes by carefuly studying the proposals and voting for those you consider worthy.
### Need Help?
* [Governance and Proposals](https://forum.crown.tech/index.php?topic=17.0) - some frequently asqued questions
* [Console Governance Interface](governance.md) - describes how to submit a proposal, how to vote for a proposal from the console and more
* [How To Submit a Proposal](https://forum.crown.tech/index.php?topic=11.0) - another proposal submission guide
* [Proposal Submission Template](https://forum.crown.tech/index.php?topic=9.0)
* [Active Proposals](https://crown.today/proposals)
* Ask for help on [#crowncoin](http://webchat.freenode.net?channels=crowncoin) on Freenode. If you don't have an IRC client use [webchat here](http://webchat.freenode.net?channels=crowncoin).
## Build Crown From Source
Building
---------------------
The following are developer notes on how to build Crown on your native platform. They are not complete guides, but include notes on the necessary libraries, compile flags, etc.
The following are developer notes on how to build Crown on your native platform. Right now Crown Core Development Team officially supports building only on [Unix](build-unix.md). Binaries for Windows and MacOS are generated via cross-compilation. Building under those systems natively is possible in theory - it's just not documented. If you have successful experience building Crown under those platforms, please contribute the instructions.
- [OSX Build Notes](build-osx.md)
- [Unix Build Notes](build-unix.md)
- [Windows build notes](build-msw.md)
## Development Documentation
Development
---------------------
The Crown repo's [root README](https://github.com/Crowndev/crowncoin/blob/master/README.md) contains relevant information on the development process and automated testing.
The Crown repo's [root README](../README.md) contains relevant information on the development process.
- [Coding Guidelines](coding.md)
- [Coding Style Guide](coding-style.md)
- [Multiwallet Qt Development](multiwallet-qt.md)
- [Release Notes](release-notes.md)
- [Release Process](release-process.md)
- [Unit Tests](unit-tests.md)
### Resources
* Discuss on [#crowncoin](http://webchat.freenode.net/?channels=crowncoin) on Freenode. If you don't have an IRC client use [webchat here](http://webchat.freenode.net/?channels=crowncoin).
### Miscellaneous
- [Assets Attribution](assets-attribution.md)
- [Files](files.md)
- [Tor Support](tor.md)
- [Init Scripts (systemd/upstart/openrc)](init.md)
License
---------------------
Distributed under the [MIT/X11 software license](http://www.opensource.org/licenses/mit-license.php).
This product includes software developed by the OpenSSL Project for use in the [OpenSSL Toolkit](https://www.openssl.org/). This product includes
cryptographic software written by Eric Young ([eay@cryptsoft.com](mailto:eay@cryptsoft.com)), and UPnP software written by Thomas Bernard.
* Crown Forum: https://forum.crown.tech
* Mattermost: https://mm.crownlab.eu
* Discord: https://discord.gg/Tcrkazc
* Telegram: https://t.me/crownplatform
* Guides & How-to: https://forum.crown.tech/index.php?board=5.0
## License
Crown is distributed under the terms of the [MIT/X11 software license](http://www.opensource.org/licenses/mit-license.php).
This product includes software developed by the OpenSSL Project for use in the [OpenSSL Toolkit](https://www.openssl.org/). This product includes cryptographic software written by Eric Young ([eay@cryptsoft.com](mailto:eay@cryptsoft.com)), and UPnP software written by Thomas Bernard.
Also see [Assets Attribution](assets-attribution.md)
- - -
Copyright © 2009-2018, Bitcoin Core Developers
Copyright © 2014-2016, Dash Core Developers
Copyright © 2014-2018, Crown Developers
\ No newline at end of file
WINDOWS BUILD NOTES
===================
Compilers Supported
-------------------
TODO: What works?
Note: releases are cross-compiled using mingw running on Linux.
Dependencies
------------
Libraries you need to download separately and build:
name default path download
--------------------------------------------------------------------------------------------------------------------
OpenSSL \openssl-1.0.1c-mgw http://www.openssl.org/source/
Berkeley DB \db-4.8.30.NC-mgw http://www.oracle.com/technology/software/products/berkeley-db/index.html
Boost \boost-1.50.0-mgw http://www.boost.org/users/download/
miniupnpc \miniupnpc-1.6-mgw http://miniupnp.tuxfamily.org/files/
Their licenses:
OpenSSL Old BSD license with the problematic advertising requirement
Berkeley DB New BSD license with additional requirement that linked software must be free open source
Boost MIT-like license
miniupnpc New (3-clause) BSD license
Versions used in this release:
OpenSSL 1.0.1c
Berkeley DB 4.8.30.NC
Boost 1.50.0
miniupnpc 1.6
OpenSSL
-------
MSYS shell:
un-tar sources with MSYS 'tar xfz' to avoid issue with symlinks (OpenSSL ticket 2377)
change 'MAKE' env. variable from 'C:\MinGW32\bin\mingw32-make.exe' to '/c/MinGW32/bin/mingw32-make.exe'
cd /c/openssl-1.0.1c-mgw
./config
make
Berkeley DB
-----------
MSYS shell:
cd /c/db-4.8.30.NC-mgw/build_unix
sh ../dist/configure --enable-mingw --enable-cxx
make
Boost
-----
MSYS shell:
downloaded boost jam 3.1.18
cd \boost-1.50.0-mgw
bjam toolset=gcc --build-type=complete stage
MiniUPnPc
---------
UPnP support is optional, make with `USE_UPNP=` to disable it.
MSYS shell:
cd /c/miniupnpc-1.6-mgw
make -f Makefile.mingw
mkdir miniupnpc
cp *.h miniupnpc/
Crowncoin
-------
MSYS shell:
cd \crowncoin
sh autogen.sh
sh configure
mingw32-make
strip crowncoind.exe
Mac OS X Build Instructions and Notes
====================================
This guide will show you how to build crownd (headless client) for OSX.
Notes
-----
* Tested on OS X 10.7 through 10.10 on 64-bit Intel processors only.
* All of the commands should be executed in a Terminal application. The
built-in one is located in `/Applications/Utilities`.
Preparation
-----------
You need to install XCode with all the options checked so that the compiler
and everything is available in /usr not just /Developer. XCode should be
available on your OS X installation media, but if not, you can get the
current version from https://developer.apple.com/xcode/. If you install
Xcode 4.3 or later, you'll need to install its command line tools. This can
be done in `Xcode > Preferences > Downloads > Components` and generally must
be re-done or updated every time Xcode is updated.
There's also an assumption that you already have `git` installed. If
not, it's the path of least resistance to install [Github for Mac](https://mac.github.com/)
(OS X 10.7+) or
[Git for OS X](https://code.google.com/p/git-osx-installer/). It is also
available via Homebrew.
You will also need to install [Homebrew](http://brew.sh) in order to install library
dependencies.
The installation of the actual dependencies is covered in the Instructions
sections below.
Instructions: Homebrew
----------------------
#### Install dependencies using Homebrew
brew install autoconf automake libtool boost miniupnpc openssl pkg-config protobuf qt
#### Installing berkeley-db4 using Homebrew
The homebrew package for berkeley-db4 has been broken for some time. It will install without Java though.
Running this command takes you into brew's interactive mode, which allows you to configure, make, and install by hand:
```
$ brew install https://raw.github.com/mxcl/homebrew/master/Library/Formula/berkeley-db4.rb -–without-java
```
The rest of these commands are run inside brew interactive mode:
```
/private/tmp/berkeley-db4-UGpd0O/db-4.8.30 $ cd ..
/private/tmp/berkeley-db4-UGpd0O $ db-4.8.30/dist/configure --prefix=/usr/local/Cellar/berkeley-db4/4.8.30 --mandir=/usr/local/Cellar/berkeley-db4/4.8.30/share/man --enable-cxx
/private/tmp/berkeley-db4-UGpd0O $ make
/private/tmp/berkeley-db4-UGpd0O $ make install
/private/tmp/berkeley-db4-UGpd0O $ exit
```
After exiting, you'll get a warning that the install is keg-only, which means it wasn't symlinked to `/usr/local`. You don't need it to link it to build crown, but if you want to, here's how:
$ brew link --force berkeley-db4
### Building `crownd`
1. Clone the github tree to get the source code and go into the directory.
git clone https://github.com/crownpay/crown.git
cd crown
2. Build crownd:
./autogen.sh
./configure
make
3. It is also a good idea to build and run the unit tests:
make check
4. (Optional) You can also install crownd to your path:
make install
Use Qt Creator as IDE
------------------------
You can use Qt Creator as IDE, for debugging and for manipulating forms, etc.
Download Qt Creator from http://www.qt.io/download/. Download the "community edition" and only install Qt Creator (uncheck the rest during the installation process).
1. Make sure you installed everything through homebrew mentioned above
2. Do a proper ./configure --with-gui=qt5 --enable-debug
3. In Qt Creator do "New Project" -> Import Project -> Import Existing Project
4. Enter "crown-qt" as project name, enter src/qt as location
5. Leave the file selection as it is
6. Confirm the "summary page"
7. In the "Projects" tab select "Manage Kits..."
8. Select the default "Desktop" kit and select "Clang (x86 64bit in /usr/bin)" as compiler
9. Select LLDB as debugger (you might need to set the path to your installtion)
10. Start debugging with Qt Creator
Creating a release build
------------------------
You can ignore this section if you are building `crownd` for your own use.
crownd/crown-cli binaries are not included in the Crown-Qt.app bundle.
If you are building `crownd` or `Crown-Qt` for others, your build machine should be set up
as follows for maximum compatibility:
All dependencies should be compiled with these flags:
-mmacosx-version-min=10.7
-arch x86_64
-isysroot $(xcode-select --print-path)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk
Once dependencies are compiled, see release-process.md for how the Crown-Qt.app
bundle is packaged and signed to create the .dmg disk image that is distributed.
Running
-------
It's now available at `./crownd`, provided that you are still in the `src`
directory. We have to first create the RPC configuration file, though.
Run `./crownd` to get the filename where it should be put, or just try these
commands:
echo -e "rpcuser=crownrpc\nrpcpassword=$(xxd -l 16 -p /dev/urandom)" > "/Users/${USER}/Library/Application Support/Crown/crown.conf"
chmod 600 "/Users/${USER}/Library/Application Support/Crown/crown.conf"
The next time you run it, it will start downloading the blockchain, but it won't
output anything while it's doing this. This process may take several hours;
you can monitor its process by looking at the debug.log file, like this:
tail -f $HOME/Library/Application\ Support/Crown/debug.log
Other commands:
-------
./crownd -daemon # to start the crown daemon.
./crown-cli --help # for a list of command-line options.
./crown-cli help # When the daemon is running, to get a list of RPC commands
# Coding Style Guide
The rules and conventions described on this page must be followed in all new code. When modifying old code it's advisable to follow them within reason and with respect to style consistency.
# Style
## File organization
### Copyright header
Every file must have a typical copyright header. Files inherited from Bitcoin and Dash must include respective copyrights as well.
```c++
// Copyright (c) 2014-<this year> Crown developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php
```
### File Names
Filenames should be all lowercase and can include dashes (`-`). C++ files should end in `.cpp` and header files should end in `.h`.
### Header Guards
All header files should have `#define` guards to prevent multiple inclusion. The format of the symbol name should be `<PATH>_<FILE>_H`. To guarantee uniqueness, they should be based on the full path in a project's source tree.
```c++
#ifndef FOO_BAR_BAZ_H
#define FOO_BAR_BAZ_H
...
#endif
```
## Formatting
### Braces placement
Braces in namespaces, classes, functions, enums, unions, try-catch blocks, loops and if statements are always placed on the next line. When there is an if statement with a single line in the conditional branch, no braces are required. However, statements that follow the condition must be on a separate line.
In loops braces are always required.
```c++
namespace MyNamespace
{
class MyClass
{
};
void MyFunction()
{
if (...)
return;
for (auto element: container)
{
DoSomethingWith(element);
}
}
}
```
### Indentation
Indentation step is 4 spaces; spaces must be used instead of tabs.
### Class sections
Sections in class definition should be in the following order: `public` - `protected` - `private`. Make separate sections for member functions and data members. Within each section, generally prefer grouping similar kinds of declarations together, and generally prefer the following order: types (including `typedef`,
`using`, and nested structs and classes), constants, factory functions, constructors, assignment operators, destructor, all other methods, data members.
```c++
class MyClass
{
public:
void PublicMethod();
protected:
void ProtectedMethod();
private:
void PrivateMethod();
private:
std::string m_dataMember;
}
```
### Line length
Break long lines of code. Try to keep them inside reasonable bounds, say, 100-120 chars per line.
## Naming
Give as descriptive a name as possible, within reason.
Names of all identifiers are spelled in camel case (except for the cases where all capitals are used). Abbreviations are spelled with first upper case letter and the rest in lower case.
Prefixing conventions such as putting "C" in front of each class or using Hungarian notation are discouraged.
```c++
class XmlParser
{
...
};
void DisplayRtfmMessage();
```
### Variables
| Visibility | Variable | Constant | Compile-time constant (`constexpr`) |
| ------------------- | ------------- | ----------------------------- | ----------------------------------- |
| Local | `camelCase` | `camelCase` | `camelCase` |
| Static | `s_camelCase` | `camelCase` | `camelCase` |
| Class member | `m_camelCase` | `m_camelCase` | `m_camelCase` |
| Static class member | `m_camelCase` | `m_camelCase` | `m_camelCase` |
| Global | `g_camelCase` | `ALL_CAPITALS` or `camelCase` | `ALL_CAPITALS` or `camelCase` |
### Enums
Enum types are named in camel case with first capital letter. Enum values follow constant naming conventions: either camel case or all capitals in case of globally visible
```c++
class SystemnodeDb
{
enum ReadResult {
Ok,
...
};
};
enum Network
{
NET_UNROUTABLE = 0,
...
};
```
### Macros
Macros are named in all capitals with underscores.
```c++
#define DO_NOT_USE_ME true
```
### Functions
Both free functions and class member functions are named in camel case with first uppercase letter. The only exception is inheriting from a third-party class which follows a different naming convention, for example, when working with Qt
```c++
class SomeClass
{
void SomeMethod()
{
}
};
class ExceptionalCase: public QObject
{
virtual void redefinedQtMethod() override
{
}
void myBrandNewMethod()
{
}
}
```
### Classes and Structures
Classes are named in camel case with first uppercase letter.
### Namespaces
Namespaces are named in camel case with first uppercase letter. When declaring nested namespaces C++17-style nested namespace declaration is preferred.
```c++
namespace Crw::Net
{
class Node
{};
};
```
# Rules and Best Practices
More rules TBD
### Namespaces
Do not use *using-directives* (e.g.`using namespace foo`) in `.h` files. It's acceptable to use it in `.cpp` files, especially with `std::literals`, but try to keep those directives as local as possible.
### Unnamed Namespaces and StaticVariables
When definitions in a `.cpp` file do not need to be referenced outside that file, place them in an unnamed namespace. Prefere unnamed namespaces to declaring them `static`. Do not use either of these constructs in `.h` files
### Preprocessor Macros
Avoid using macros; prefer inline functions, enums, `const` and `constexpr` variables.
# Further Reading
These are books and resources that considered to be good advice on coding style and best practices. It's preferable to follow their advice when it's reasonable:
1. Herb Sutter, Andrei Alexandrescu "C++ Coding Standards: 101 Rules, Guidelines, and Best Practices "
2. Scott Meyers "Effective Modern C++"
3. Bjarne Stroustrup, Herb Sutter ["C++ Core Guidelines"](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines)
Coding
====================
Various coding styles have been used during the history of the codebase,
and the result is not very consistent. However, we're now trying to converge to
a single style, so please use it in new code. Old code will be converted
gradually.
- Basic rules specified in src/.clang-format. Use a recent clang-format-3.5 to format automatically.
- Braces on new lines for namespaces, classes, functions, methods.
- Braces on the same line for everything else.
- 4 space indentation (no tabs) for every block except namespaces.
- No indentation for public/protected/private or for namespaces.
- No extra spaces inside parenthesis; don't do ( this )
- No space after function names; one space after if, for and while.
Block style example:
```c++
namespace foo
{
class Class
{
bool Function(char* psz, int n)
{
// Comment summarising what this section of code does
for (int i = 0; i < n; i++) {
// When something fails, return early
if (!Something())
return false;
...
}
// Success return is usually at the end
return true;
}
}
}
```
Doxygen comments
-----------------
To facilitate the generation of documentation, use doxygen-compatible comment blocks for functions, methods and fields.
For example, to describe a function use:
```c++
/**
* ... text ...
* @param[in] arg1 A description
* @param[in] arg2 Another argument description
* @pre Precondition for function...
*/
bool function(int arg1, const char *arg2)
```
A complete list of `@xxx` commands can be found at http://www.stack.nl/~dimitri/doxygen/manual/commands.html.
As Doxygen recognizes the comments by the delimiters (`/**` and `*/` in this case), you don't
*need* to provide any commands for a comment to be valid, just a description text is fine.
To describe a class use the same construct above the class definition:
```c++
/**
* Alerts are for notifying old versions if they become too obsolete and
* need to upgrade. The message is displayed in the status bar.
* @see GetWarnings()
*/
class CAlert
{
```
To describe a member or variable use:
```c++
int var; //!< Detailed description after the member
```
Also OK:
```c++
///
/// ... text ...
///
bool function2(int arg1, const char *arg2)
```
Not OK (used plenty in the current source, but not picked up):
```c++
//
// ... text ...
//
```
A full list of comment syntaxes picked up by doxygen can be found at http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html,
but if possible use one of the above styles.
Locking/mutex usage notes
-------------------------
The code is multi-threaded, and uses mutexes and the
LOCK/TRY_LOCK macros to protect data structures.
Deadlocks due to inconsistent lock ordering (thread 1 locks cs_main
and then cs_wallet, while thread 2 locks them in the opposite order:
result, deadlock as each waits for the other to release its lock) are
a problem. Compile with -DDEBUG_LOCKORDER to get lock order
inconsistencies reported in the debug.log file.
Re-architecting the core code so there are better-defined interfaces
between the various components is a goal, with any necessary locking
done by the components (e.g. see the self-contained CKeyStore class
and its cs_KeyStore lock for example).
Threads
-------
- ThreadScriptCheck : Verifies block scripts.
- ThreadImport : Loads blocks from blk*.dat files or bootstrap.dat.
- StartNode : Starts other threads.
- ThreadDNSAddressSeed : Loads addresses of peers from the DNS.
- ThreadMapPort : Universal plug-and-play startup/shutdown
- ThreadSocketHandler : Sends/Receives data from peers on port 9340.
- ThreadOpenAddedConnections : Opens network connections to added nodes.
- ThreadOpenConnections : Initiates new connections to peers.
- ThreadMessageHandler : Higher-level message handling (sending and receiving).
- DumpAddresses : Dumps IP addresses of nodes to peers.dat.
- ThreadFlushWalletDB : Close the wallet.dat file if it hasn't been used in 500ms.
- ThreadRPCServer : Remote procedure call handler, listens on port 9998 for connections and services them.
- CrowncoinMiner : Generates bitcoins (if wallet is enabled).
- Shutdown : Does an orderly shutdown of everything.
Masternode Budget API
=======================
# Governance
Crown now supports full decentralized budgets that are paid directly from the blockchain via superblocks once per month.
Unlike blockchain projects that rely on donations and pre-mined endowments, Crown reserves 10% of each block reward to fund its own development. This is achieved by the use of the governance system to distribute the reserved funds monthly to various projects that community voted for. The payment itself happens approximately once a month (more precisely, once every 43200 blocks). This payment occurs through a special block, called a “superblock.” This superblock is essentially a regular block with a coinbase transaction added which pays money to the proposals selected for budgeting in the current voting cycle.
## Monthly Budget Cycle
Budgets go through a series of stages before being paid:
* prepare - create a special transaction that destroys coins in order to make a proposal
* submit - propagate transaction to peers on network
* voting - lobby for votes on your proposal
* get enough votes - make it into the budget
* finalization - at the end of each payment period, proposals are sorted then compiled into a finalized budget
* finalized budget voting - masternodes that agree with the finalization will vote on that budget
* payment - the winning finalized budget is paid
1. Proposal submission, which itself is a two-step process:
* prepare - create a special transaction that destroys coins in order to make a proposal
* submit - propagate transaction to peers on network
2. Voting - lobby for votes on your proposal and, hopefully, get enough votes to make it into the budget
3. Finalization - at the end of each payment period, proposals are sorted then compiled into a finalized budget:
* finalized budget submission - finalized budget is submited into the network
* finalized budget voting - masternodes that agree with the finalization will vote on that budget
4. Payment - the winning finalized budget is paid at the beginning of the next cycle
1. Prepare collateral transaction
--
## Prepare Collateral Transaction
mnbudget prepare proposal-name url payment_count block_start crown_address monthly_payment_crown [use_ix(true|false)]
Proposal preparation is done via console command:
```
mnbudget prepare proposal-name url payment_count block_start crown_address monthly_payment_crown
```
Example: ```mnbudget prepare cool-project http://www.cool-project/one.json 12 100000 y6R9oN12KnB9zydzTLc3LikD9cCjjQzYG7 1200 true```
Example: ```mnbudget prepare cool-project http://www.cool-project/one.json 12 1296000 y6R9oN12KnB9zydzTLc3LikD9cCjjQzYG7 1200```
Output: ```464a0eb70ea91c94295214df48c47baa72b3876cfb658744aaf863c7b5bf1ff0``` - This is the collateral hash, copy this output for the next step
......@@ -26,15 +30,15 @@ In this transaction we prepare collateral for "_cool-project_". This proposal wi
**Warning -- if you change any fields within this command, the collateral transaction will become invalid.**
2 Submit proposal to network
--
## Submit Proposal to Network
```mnbudget submit cool-project http://www.cool-project/one.json 12 100000 y6R9oN12KnB9zydzTLc3LikD9cCjjQzYG7 1200 464a0eb70ea91c94295214df48c47baa72b3876cfb658744aaf863c7b5bf1ff0```
Proposal preparation is done via console command:
```mnbudget submit cool-project http://www.cool-project/one.json 12 1296000 y6R9oN12KnB9zydzTLc3LikD9cCjjQzYG7 1200 464a0eb70ea91c94295214df48c47baa72b3876cfb658744aaf863c7b5bf1ff0```
Output : ```a2b29778ae82e45a973a94309ffa6aa2e2388b8f95b39ab3739f0078835f0491``` - This is your proposal hash, which other nodes will use to vote on it
Output : ```a2b29778ae82e45a973a94309ffa6aa2e2388b8f95b39ab3739f0078835f0491``` -
This is your proposal hash, which other nodes will use to vote on it
3. Lobby for votes
--
## Lobby for votes
Double check your information: ```mnbudget getinfo cool-project```
......@@ -44,7 +48,7 @@ Double check your information: ```mnbudget getinfo cool-project```
"Hash" : "a2b29778ae82e45a973a94309ffa6aa2e2388b8f95b39ab3739f0078835f0491",
"FeeHash" : "464a0eb70ea91c94295214df48c47baa72b3876cfb658744aaf863c7b5bf1ff0",
"URL" : "http://www.cool-project/one.json",
"BlockStart" : 100000,
"BlockStart" : 1296000,
"BlockEnd" : 100625,
"TotalPaymentCount" : 12,
"RemainingPaymentCount" : 12,
......@@ -60,14 +64,15 @@ Double check your information: ```mnbudget getinfo cool-project```
}
```
If everything looks correct, you can ask for votes from other masternodes. To vote on a proposal, load a wallet with _masternode.conf_ file. You do not need to access your cold wallet to vote for proposals.
If everything looks correct, you can ask for votes from other masternodes. To vote on a proposal, load a wallet with _masternode.conf_ file.
```mnbudget vote a2b29778ae82e45a973a94309ffa6aa2e2388b8f95b39ab3739f0078835f0491 yes```
4. Make it into the budget
--
Starting with version 0.12.4 you can vote in Masternode tab in GUI wallet.
## Make It into the Budget
After you get enough votes, execute ```mnbudget projection``` to see if you made it into the budget. If you the budget was finalized at this moment which proposals would be in it. Note: Proposals must be active at least 1 day on the network and receive 10% of the masternode network in yes votes in order to qualify (E.g. if there is 2500 masternodes, you will need 250 yes votes.)
After you get enough votes, execute ```mnbudget projection``` to see if you made it into the budget. If you the budget was finalized at this moment which proposals would be in it. Note: Proposals must be active at least 1 day on the network and receive at least 5% of the masternode network in yes votes in order to qualify. (e.g. if there is 2500 masternodes, you will need 125 yes votes)
```mnbudget projection```:
```
......@@ -76,7 +81,7 @@ After you get enough votes, execute ```mnbudget projection``` to see if you made
"Hash" : "a2b29778ae82e45a973a94309ffa6aa2e2388b8f95b39ab3739f0078835f0491",
"FeeHash" : "464a0eb70ea91c94295214df48c47baa72b3876cfb658744aaf863c7b5bf1ff0",
"URL" : "http://www.cool-project/one.json",
"BlockStart" : 100000,
"BlockStart" : 1296000,
"BlockEnd" : 100625,
"TotalPaymentCount" : 12,
"RemainingPaymentCount" : 12,
......@@ -93,41 +98,43 @@ After you get enough votes, execute ```mnbudget projection``` to see if you made
}
```
5. Finalized budget
--
## Finalized budget
In order to see finalized budgets execute `mnfinalbudget show`:
```
"main" : {
"FeeTX" : "d6b8de9a4cadfe148f91e8fe8eed407199f96639b482f956ae6f539b8339f87c",
"Hash" : "6e8bbaba5113de592f6888f200f146448440b7e606fcf62ef84e60e1d5ac7d64",
"BlockStart" : 100000,
"BlockEnd" : 100000,
"BlockStart" : 1296000,
"BlockEnd" : 1296000,
"Proposals" : "cool-project",
"VoteCount" : 46,
"Status" : "OK"
},
```
6. Get paid
--
## Get paid
When block ```1296000``` is reached you'll receive a payment for ```1200``` CRW.
When block ```1000000``` is reached you'll receive a payment for ```1200``` CRW.
## Governance-Related Console commands
The following new RPC commands are supported:
- mnbudget "command"... ( "passphrase" )
- prepare - Prepare proposal for network by signing and creating tx
- submit - Submit proposal for network
- vote-many - Vote on a Crown initiative
- vote-alias - Vote on a Crown initiative
- vote - Vote on a Crown initiative/budget
- getvotes - Show current masternode budgets
- getinfo - Show current masternode budgets
- show - Show all budgets
- projection - Show the projection of which proposals will be paid the next cycle
- check - Scan proposals and remove invalid
- mnfinalbudget "command"... ( "passphrase" )
- vote-many - Vote on a finalized budget
- vote - Vote on a finalized budget
- show - Show existing finalized budgets
Command `mnbudget "command"... ( "passphrase" )`:
- `prepare` - Prepare proposal for network by signing and creating tx
- `submit` - Submit proposal for network
- `vote-many` - Vote on a Crown initiative
- `vote-alias` - Vote on a Crown initiative
- `vote` - Vote on a Crown initiative/budget
- `getvotes` - Show current masternode budgets
- `getinfo` - Show current masternode budgets
- `show` - Show all budgets
- `projection` - Show the projection of which proposals will be paid the next cycle
- `check` - Scan proposals and remove invalid
Command `mnfinalbudget "command"... ( "passphrase" )`
- `vote-many` - Vote on a finalized budget
- `vote` - Vote on a finalized budget
- `show` - Show existing finalized budgets
#start-many Setup Guide
## Two Options for Setting up your Wallet
There are many ways to setup a wallet to support start-many. This guide will walk through two of them.
1. [Importing an existing wallet (recommended if you are consolidating wallets).](#option1)
2. [Sending 1,000 CRW to new wallet addresses.](#option2)
## <a name="option1"></a>Option 1. Importing an existing wallet
This is the way to go if you are consolidating multiple wallets into one that supports start-many.
### From your single-instance MasterNode Wallet
Open your QT Wallet and go to console (from the menu select Tools => Debug Console)
Dump the private key from your MasterNode's pulic key.
```
walletpassphrase [your_wallet_passphrase] 600
dumpprivkey [mn_public_key]
```
Copy the resulting priviate key. You'll use it in the next step.
### From your multi-instance MasterNode Wallet
Open your QT Wallet and go to console (from the menu select Tools => Debug Console)
Import the private key from the step above.
```
walletpassphrase [your_wallet_passphrase] 600
importprivkey [single_instance_private_key]
```
The wallet will re-scan and you will see your available balance increase by the amount that was in the imported wallet.
[Skip Option 2. and go to Create masternode.conf file](#masternodeconf)
## <a name="option2"></a>Option 2. Starting with a new wallet
[If you used Option 1 above, then you can skip down to Create masternode.conf file.](#masternodeconf)
### Create New Wallet Addresses
1. Open the QT Wallet.
2. Click the Receive tab.
3. Fill in the form to request a payment.
* Label: mn01
* Amount: 1000 (optional)
* Click *Request payment*
5. Click the *Copy Address* button
Create a new wallet address for each MasterNode.
Close your QT Wallet.
### Send 1,000 CRW to New Addresses
Just like setting up a standard MN. Send exactly 1,000 CRW to each new address created above.
### Create New Masternode Private Keys
Open your QT Wallet and go to console (from the menu select Tools => Debug Console)
Issue the following:
```masternode genkey```
*Note: A masternode private key will need to be created for each MasterNode you run. You should not use the same masternode private key for multiple MasterNodes.*
Close your QT Wallet.
## <a name="masternodeconf"></a>Create masternode.conf file
Remember... this is local. Make sure your QT is not running.
Create the masternode.conf file in the same directory as your wallet.dat.
Copy the masternode private key and correspondig collateral output transaction that holds the 1K CRW.
The masternode private key may be an existing key from [Option 1](#option1), or a newly generated key from [Option 2](#option2).
*Please note, the masternode priviate key is not the same as a wallet private key. Never put your wallet private key in the masternode.conf file. That is equivalent to putting your 1,000 CRW on the remote server and defeats the purpose of a hot/cold setup.*
### Get the collateral output
Open your QT Wallet and go to console (from the menu select Tools => Debug Console)
Issue the following:
```masternode outputs```
Make note of the hash (which is your collaterla_output) and index.
### Enter your Masternode details into your masternode.conf file
[From the crown github repo](https://github.com/infernoman/bitcoin/blob/master/doc/masternode_conf.md)
The new masternode.conf format consists of a space seperated text file. Each line consisting of an alias, IP address followed by port, masternode private key, collateral output transaction id and collateral output index, donation address and donation percentage (the latter two are optional and should be in format "address:percentage").
```
alias ipaddress:port masternode_private_key collateral_output collateral_output_index donationin_address:donation_percentage
```
Example:
```
mn01 127.0.0.1:9340 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0
mn02 127.0.0.2:9340 93WaAb3htPJEV8E9aQcN23Jt97bPex7YvWfgMDTUdWJvzmrMqey aa9f1034d973377a5e733272c3d0eced1de22555ad45d6b24abadff8087948d4 0 7gnwGHt17heGpG9Crfeh4KGpYNFugPhJdh:25
```
## What about the crown.conf file?
If you are using a masternode.conf file you no longer need the crown.conf file. The exception is if you need custom settings (thanks oblox).
## Update crown.conf on server
If you generated a new masternode private key, you will need to update the remote crown.conf files.
Shut down the daemon and then edit the file.
```sudo nano .crown/crown.conf```
### Edit the masternodeprivkey
If you generated a new masternode private key, you will need to update the masternodeprivkey value in your remote crown.conf file.
## Start your MasterNodes
### Remote
If your remote server is not running, start your remote daemon as you normally would.
I usually confirm that remote is on the correct block by issuing:
```crownd getinfo```
And compare with the official explorer at http://explorer.crown.tech/chain/Crown
### Local
Finally... time to start from local.
#### Open up your QT Wallet
From the menu select Tools => Debug Console
If you want to review your masternode.conf setting before starting the MasterNodes, issue the following in the Debug Console:
```masternode list-conf```
Give it the eye-ball test. If satisfied, you can start your nodes one of two ways.
1. masternode start-alias [alias_from_masternode.conf]. Example ```masternode start-alias mn01```
2. masternode start-many
doc/img/bootstrap1.png

53.7 KB

doc/img/bootstrap2.png

34.4 KB

doc/img/bootstrap4.png

107 KB

doc/img/bootstrap5.png

20.3 KB

Sample init scripts and service configuration for bitcoind
==========================================================
Sample scripts and configuration files for systemd, Upstart and OpenRC
can be found in the contrib/init folder.
contrib/init/bitcoind.service: systemd service unit configuration
contrib/init/bitcoind.openrc: OpenRC compatible SysV style init script
contrib/init/bitcoind.openrcconf: OpenRC conf.d file
contrib/init/bitcoind.conf: Upstart service configuration file
1. Service User
---------------------------------
All three startup configurations assume the existence of a "bitcoin" user
and group. They must be created before attempting to use these scripts.
2. Configuration
---------------------------------
At a bare minimum, bitcoind requires that the rpcpassword setting be set
when running as a daemon. If the configuration file does not exist or this
setting is not set, bitcoind will shutdown promptly after startup.
This password does not have to be remembered or typed as it is mostly used
as a fixed token that bitcoind and client programs read from the configuration
file, however it is recommended that a strong and secure password be used
as this password is security critical to securing the wallet should the
wallet be enabled.
If bitcoind is run with "-daemon" flag, and no rpcpassword is set, it will
print a randomly generated suitable password to stderr. You can also
generate one from the shell yourself like this:
bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'
Once you have a password in hand, set rpcpassword= in /etc/bitcoin/bitcoin.conf
For an example configuration file that describes the configuration settings,
see contrib/debian/examples/bitcoin.conf.
3. Paths
---------------------------------
All three configurations assume several paths that might need to be adjusted.
Binary: /usr/bin/bitcoind
Configuration file: /etc/bitcoin/bitcoin.conf
Data directory: /var/lib/bitcoind
PID file: /var/run/bitcoind/bitcoind.pid (OpenRC and Upstart)
/var/lib/bitcoind/bitcoind.pid (systemd)
The configuration file, PID directory (if applicable) and data directory
should all be owned by the bitcoin user and group. It is advised for security
reasons to make the configuration file and data directory only readable by the
bitcoin user and group. Access to bitcoin-cli and other bitcoind rpc clients
can then be controlled by group membership.
4. Installing Service Configuration
-----------------------------------
4a) systemd
Installing this .service file consists on just copying it to
/usr/lib/systemd/system directory, followed by the command
"systemctl daemon-reload" in order to update running systemd configuration.
To test, run "systemctl start bitcoind" and to enable for system startup run
"systemctl enable bitcoind"
4b) OpenRC
Rename bitcoind.openrc to bitcoind and drop it in /etc/init.d. Double
check ownership and permissions and make it executable. Test it with
"/etc/init.d/bitcoind start" and configure it to run on startup with
"rc-update add bitcoind"
4c) Upstart (for Debian/Ubuntu based distributions)
Drop bitcoind.conf in /etc/init. Test by running "service bitcoind start"
it will automatically start on reboot.
NOTE: This script is incompatible with CentOS 5 and Amazon Linux 2014 as they
use old versions of Upstart and do not supply the start-stop-daemon uitility.
5. Auto-respawn
-----------------------------------
Auto respawning is currently only configured for Upstart and systemd.
Reasonable defaults have been chosen but YMMV.
# Masternode Configuration
It is possible to control one or several masternodes from a single wallet. The wallet needs to have a valid collaral output of 10000 coins for each masternode.
There are two ways to create and control masternodes and systemnodes: using GUI features of the Crown wallet or manually editing `masternode.conf` and running console commands. There are instructions for the setup ove GUI:
* [Masternode Setup Guide](https://forum.crown.tech/index.php?topic=1241.0)
* [Systemnode Setup Guide](https://forum.crown.tech/index.php?topic=1240.0)
The rest of the document describes the format of the configuration file and console commands
## Configuration File Placement
Masternode configuration file is a file named `masternode.conf` and placed in the following directory:
* Windows: %APPDATA%\Crown\
* Mac OS: ~/Library/Application Support/Crown/
* Unix/Linux: ~/.crown/
## Configuration File Format
The server node configuration file format is spaced separated text. Each line consisting of an alias, IP address & port, masternode private key, collateral output transaction id, collateral output index, and donation address with donation percentage (the latter two are optional and should be in format "address:percentage" or just "address" if percentage=100%).
Example:
```
mn1 127.0.0.2:19340 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0
mn2 127.0.0.3:19340 93WaAb3htPJEV8E9aQcN23Jt97bPex7YvWfgMDTUdWJvzmrMqey aa9f1034d973377a5e733272c3d0eced1de22555ad45d6b24abadff8087948d4 0 7gnwGHt17heGpG9Crfeh4KGpYNFugPhJdh:33
mn3 127.0.0.4:19340 92Da1aYg6sbenP6uwskJgEY2XWB5LwJ7bXRqc3UPeShtHWJDjDv db478e78e3aefaa8c12d12ddd0aeace48c3b451a8b41c570d0ee375e2a02dfd9 1 7gnwGHt17heGpG9Crfeh4KGpYNFugPhJdh
```
In the example above:
* the collateral for mn1 consists of transaction *2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c*, output index 0 has amount 10000
* masternode 2 will donate 33% of its income
* masternode 3 will donate 100% of its income
## Console Commands
The following RPC subcommands can be used with `masternode` command:
* `list-conf`: shows the parsed masternode.conf
* `start-alias \<alias\>`: start a single masternode
* `stop-alias \<alias\>`: stop a single masternode
* `start-many`: start all masternodes
* `stop-many`: stop all masternodes
* `outputs`: list available collateral output transaction ids and corresponding collateral output indexes
# Systemnode Configuration
Systemnode configuration can be done similarly (with adjustment to the amount of collateral transaction). Systemnode configuration file must be named `systemnode.conf` and placed in the directory specified above; it has the same server node configuration file format.
Command `systemnode` supports the same set of subcommands to control systemnodes.
\ No newline at end of file
Crown Core 0.12
==================
# Crown 0.12.4 Release Notes
Crown Core tree 0.12.x release notes can be found here:
- [v0.12.0](release-notes/crown/release-notes-0.12.0.md)
......
File moved
# CROWN PRODUCT ROADMAP - Summer 2018
## CORE UPGRADES
Bringing in useful features, enhancements, bug fixes, and performance improvements from the bitcoin core codebase:
- Compiler updates
- Memory performance improvements
- Block and transaction handling
- Build system updates
- Unit tests
- Transaction malleability, fee sniping and other potential vulnerabilities fixes
- Bitcoin Scripting language upgrade
- P2P and network protocol optimization
- Wallet improvements (ex. All transactions will use Instant Send)
## GOVERNANCE
The voting system that funds community proposals and network development. New features, new voting nodes, and more!
- Moving unspent proposal funds to the next budget
- Implement new Systemnode voting ability
- Bug fixes
- In-wallet proposal notifications
## PROGRESSIVELY EVOLVING CONSENSUS
The part of the network that provides agreement on the order and validity of transactions is the consensus algorithm. Crown is currently secured by Proof-of-Work (PoW) through Bitcoin SHA256 merge-mining, which is Phase 1 of the process to a more energy-efficient form of network agreement and security. Phase 2 is the switch from PoW to Proof-of-Stake (PoS). Phase 3 is the implementation of a newer algorithm that is currently being researched and developed.
- Migrate network to the PoS algorithm
- Increase node incentives for Masternodes and Systemnodes
- Test and implement new algorithm once R&D and testnet auditing are complete
- Contracts Notarization
## REGISTRATION
To become a provider in the Crown ecosystem, an application service must be registered in the Crown blockchain. For this goal, Crown Platform will provide registration agents and other infrastructure.
- Community Delegated Agents
- Services Registration
- Identity Verification
## API
The Crown Platform API will be an access point for transacting on the network. With this implementation, network businesses and service providers will have programmatic access to the blockchain, providing easy hookup to user ID verification and payment mechanisms. Developers will be able to program dApps in any language and enable features of the Crown blockchain right in their code!
- RPC updates
- REST implementation
- Services payment hooks
- Registration system integration
## DATA STORAGE
Decentralized file storage integration like Storj, filecoin, using IPFS or another file system designed for encrypted peer-to-peer distribution.
- dApps hosted on Crown Platform will be able to securely store and distribute files
Multi masternode config
=======================
The multi masternode config allows to control multiple masternodes from a single wallet. The wallet needs to have a valid collaral output of 1000 coins for each masternode. To use this, place a file named masternode.conf in the data directory of your install:
* Windows: %APPDATA%\Crown\
* Mac OS: ~/Library/Application Support/Crown/
* Unix/Linux: ~/.crown/
The new masternode.conf format consists of a space seperated text file. Each line consisting of an alias, IP address followed by port, masternode private key, collateral output transaction id, collateral output index, donation address and donation percentage (the latter two are optional and should be in format "address:percentage").
Example:
```
mn1 127.0.0.2:19340 93HaYBVUCYjEMeeH1Y4sBGLALQZE1Yc1K64xiqgX37tGBDQL8Xg 2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c 0
mn2 127.0.0.3:19340 93WaAb3htPJEV8E9aQcN23Jt97bPex7YvWfgMDTUdWJvzmrMqey aa9f1034d973377a5e733272c3d0eced1de22555ad45d6b24abadff8087948d4 0 7gnwGHt17heGpG9Crfeh4KGpYNFugPhJdh:33
mn3 127.0.0.4:19340 92Da1aYg6sbenP6uwskJgEY2XWB5LwJ7bXRqc3UPeShtHWJDjDv db478e78e3aefaa8c12d12ddd0aeace48c3b451a8b41c570d0ee375e2a02dfd9 1 7gnwGHt17heGpG9Crfeh4KGpYNFugPhJdh
```
In the example above:
* the collateral for mn1 consists of transaction http://test.explorer.crown.fr/tx/2bcd3c84c84f87eaa86e4e56834c92927a07f9e18718810b92e0d0324456a67c, output index 0 has amount 1000
* masternode 2 will donate 33% of its income
* masternode 3 will donate 100% of its income
The following new RPC commands are supported:
* list-conf: shows the parsed masternode.conf
* start-alias \<alias\>
* stop-alias \<alias\>
* start-many
* stop-many
* outputs: list available collateral output transaction ids and corresponding collateral output indexes
When using the multi masternode setup, it is advised to run the wallet with 'masternode=0' as it is not needed anymore.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment