Post
Topic
Board Announcements (Altcoins)
Re: [ANN][DCR] Decred - Hybrid PoW/PoS | btcsuite Devs | Tons of New Features | Go
by
dbt1033
on 27/12/2016, 04:25:38 UTC
From Decred Forums:

It was mentioned on slack/IRC that this DD was technical and didn't make the release tangible for the layperson. Here's a breakdown of the most important parts of this release.

Stake version soft fork

In order to enable hard fork voting, we implement a soft fork that makes use of the existing block version in block headers, vote version and the stake version in block headers. Those familiar with Bitcoin may be aware that soft forks are implemented via the block version in the block header, where the network begins enforcing and rejecting blocks of lower version at certain activation thresholds, e.g. if 75% of the blocks in a trailing window of 1000 blocks are version 3, blocks with version less than 3 are rejected by the network. This process is entirely controlled by the PoW miners, so in Bitcoin, this process depends only on the PoW miners and not the rest of the network. In Decred, we require a second version in the block header to enable hard fork voting, called the stake version, and this version being incremented corresponds to the start of voting on a new set of issues that are encoded in votebits that are part of each vote cast by stakeholders. Decred uses the existing Bitcoin method for incrementing the block version in its block headers, but to increment the stake version, the block version must already be incremented and 75% or more of the votes cast in a stake version interval must be of a particular version, e.g. version 3. The rules for starting a new voting period can be reduced to asking a couple straightforward questions:
Did all the PoW miners upgrade to the latest dcrd release?
Did 75% or more of the stakeholders voting in the last stake version interval upgrade to the latest dcrwallet release?
If these 2 conditions are satisfied, the stake version is incremented and the next voting period begins. There is a third condition, but it is more technical and messy to explain, so I'll gloss over it.

The purpose of this soft fork is to act as a signaling mechanism that indicates the network is ready to upgrade consensus. Since this soft fork behavior is fundamental to how Decred hard fork voting will work, we have exhaustively tested the various scenarios that can occur at the ends of stake version intervals. This work was completed by @moo1337 and @davecgh. The code to activate the soft fork was roughly 1500 lines, but the test coverage was roughly 2500 lines. These tests simulate an entire blockchain and ensure that stake version changes behave properly under all conditions, including both positive and negative tests and behavior under reorganizations. We will strive to maintain this level of test coverage for any future consensus changes that occur as part of hard fork voting. If you're interested in checking out the code, have a look at dcrd pull requests 524 (soft fork) and 526 (test coverage).

decrediton

As part of our effort to get a GUI wallet that runs on all major platforms, we started work on decrediton, which uses Electron, React and Redux frameworks. In a single release, @ay-p has gotten most of the basics working for decrediton. Despite being in a very much "alpha" state, it can create simple transactions, generate a new seed, restore from seed, and receive payments. It does have a notable deficiency with the transaction history, but fixing that requires some more substantial work on the gRPC decrediton uses to interact with dcrwallet. By the next release, decrediton should allow users to do most things they can already do with the command line wallet, dcrwallet. In the meantime, do understand this is very much a work-in-progress and there will be something more "beta" available by early February.

dcrticketbuyer

Some users may have noticed that dcrticketbuyer has been static for this release despite several open issues. This is because the code from dcrticketbuyer has been migrated to a separate package inside dcrwallet. This was done because in order to buy tickets, you need a wallet, so rather than require users to run 2 processes, a wallet for buying tickets and a ticket buyer, only 1 process is required. Another reason this was done is that automatic ticket purchasing in Paymetheus or decrediton creates a mess when using a standalone ticket buyer versus something integrated into wallet. The migration took @Javed Khan a while and it has now landed in dcrwallet.

If you have any further questions about the release, feel free to ask.