Skip to content

Commit 2aaf36a

Browse files
committed
Initial commit.
0 parents  commit 2aaf36a

File tree

5 files changed

+360
-0
lines changed

5 files changed

+360
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*~

README.mediawiki

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<img src="./readme-imgs/decredlogo.png" />
2+
3+
==Decred Change Proposals==
4+
5+
A Decred Change Proposal, or DCP for short, is a design document that describes
6+
potential protocol or consensus changes to Decred. Due to Decred's
7+
decentralized governance structure, any proposed changes to consensus require
8+
super-majority stakeholder approval via the integrated on-chain proof-of-stake
9+
voting infrastructure. Consequently, DCPs primarily serve for documentation,
10+
fostering cross-implementation compatibility, and helping ensure proper
11+
engineering rigor is followed.
12+
13+
Prior to putting a consensus change to an on-chain vote, the proposed change
14+
must first be accompanied by a DCP as described in [[./dcp-0000/dcp-0000.mediawiki|DCP-0000]]
15+
along with providing a working and tested implementation, and the rule change
16+
must be gated behind a voting agenda which ensures the stakeholders are
17+
provided with the opportunity to vote to accept or reject the change.
18+
19+
It is important to note that DCPs are intended to be the end result of an
20+
off-chain proposal and voting system that deals with more generalized proposal
21+
submissions. It is through that system that all initial proposals for consensus
22+
or protocol changes will be brought to life, undergo collaboration, and be
23+
subject to an initial community vote to determine if the work necessary to
24+
create a working implementation, its associated DCP, and an on-chain vote for
25+
the rule change should be performed.
26+
27+
However, the aforementioned proposal system is not yet available. This document
28+
will be updated with more details once it is available.
29+
30+
{|class="wikitable sortable" style="width: auto; text-align: center;"
31+
!Number!!Title!!Status
32+
|-
33+
|[[./dcp-0000/dcp-0000.mediawiki|0000]]||DCP Process||Active
34+
|}

dcp-0000/dcp-0000.mediawiki

+325
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,325 @@
1+
<pre>
2+
DCP: 0000
3+
Title: DCP Process
4+
Author: Dave Collins <[email protected]>
5+
Status: Active
6+
Created: 2017-05-04
7+
License: CC0-1.0
8+
</pre>
9+
10+
==Abstract==
11+
12+
A Decred Change Proposal, or DCP for short, is a design document that describes
13+
potential protocol or consensus changes to Decred. Due to Decred's
14+
decentralized governance structure, any proposed changes to consensus require
15+
super-majority stakeholder approval via the integrated on-chain proof-of-stake
16+
voting infrastructure. Consequently, DCPs primarily serve for documentation,
17+
fostering cross-implementation compatibility, and helping ensure proper
18+
engineering rigor is followed.
19+
20+
Prior to putting a consensus change to an on-chain vote, the proposed change
21+
must first be accompanied by a DCP as described in this document along with
22+
providing a working and tested implementation, and the rule change must be gated
23+
behind a voting agenda which ensures the stakeholders are provided with the
24+
opportunity to vote to accept or reject the change.
25+
26+
It is important to note that DCPs are intended to be the end result of an
27+
off-chain proposal and voting system that deals with more generalized proposal
28+
submissions. It is through that system that all initial proposals for consensus
29+
or protocol changes will be brought to life, undergo collaboration, and be
30+
subject to an initial community vote to determine if the work necessary to
31+
create a working implementation, its associated DCP, and an on-chain vote for
32+
the rule change should be performed.
33+
34+
However, the aforementioned proposal system is not yet available. This document
35+
will be updated with more details once it is available.
36+
37+
==Formatting Specification==
38+
39+
All DCPs must be written using the mediawiki format, and, where relevant, should
40+
be comprised of the sections detailed in this specification.
41+
42+
===Header Preamble===
43+
44+
Every DCP must begin with an RFC 822 style header preamble with the headers in
45+
the following order. Headers marked with an asterisk (*) are optional. All
46+
other headers are required.
47+
48+
<pre>
49+
DCP: <DCP number, or "?" before being assigned>
50+
Title: <DCP title; maximum 44 characters>
51+
Author: <list of author names and email addresses>
52+
Status: <Defined | Voting | Locked In | Active | Failed | Replaced | Obsolete>
53+
Created: <date created on, in ISO 8601 (yyyy-mm-dd) format>
54+
License: CC0-1.0
55+
* License-Code: <abbreviation for source code under different approved license(s)>
56+
* Requires: <DCP number(s)>
57+
* Replaces: <DCP number>
58+
* Superseded-By: <DCP number>
59+
</pre>
60+
61+
The '''Author''' header lists the names and email addresses of all the
62+
authors/owners of the proposal. The format of the '''Author''' header value
63+
must be:
64+
65+
Random J. User <[email protected]>
66+
67+
Multiple authors must be on a separate line following RFC 2822 continuation line
68+
conventions.
69+
70+
The '''Status''' header specifies the current status of the DCP as described in
71+
the [[#Status|status]] section.
72+
73+
The '''Created''' header records the date that the DCP was assigned a number.
74+
Dates must be in ISO 8601 (yyyy-mm-dd) format, e.g. 2017-05-04.
75+
76+
The '''License''' and '''License-Code''' headers must use approved licenses as
77+
defined in the [[#Licensing|licensing]] section.
78+
79+
DCPs may have a '''Requires''' header, indicating the DCP number(s) that the
80+
current one depends on.
81+
82+
DCPs may also have a '''Superseded-By''' header indicating that a DCP has
83+
been rendered obsolete by a newer version. The value is the number of the DCP
84+
that replaces the current one. The newer DCP must have a '''Replaces''' header
85+
containing the number of the DCP that it renders obsolete.
86+
87+
===Standard Sections===
88+
89+
The following sections are standard and thus should typically be included with
90+
all DCPs. There are some instances where some of the sections might not apply.
91+
92+
====Abstract====
93+
94+
The abstract section provides a short overview of the proposal. It is required
95+
for all DCPs.
96+
97+
====Motivation====
98+
99+
The motivation section explains in detail what the proposal addresses and why
100+
it is necessary. This section is critical and required for all consensus change
101+
proposals since consensus changes, in particular, must not be made lightly.
102+
103+
Consensus changes typically involve updates to a wide amount of software across
104+
the entire ecosystem and, at the very least, require stakeholder participation
105+
in the form of education and voting. In short, consensus changes often require
106+
the extremely valuable commodities of time and attention from everyone in the
107+
ecosystem and, as such, must have a compelling motivation.
108+
109+
====Specification====
110+
111+
The specification precisely describes the semantics of the proposal. In
112+
particular, it must be detailed enough to foster multiple interoperable
113+
implementations of Decred software.
114+
115+
It is important to consider the implications of cross-platform compatibility
116+
when providing a specification since it is also critical to achieve the
117+
aforementioned goal of fostering multiple implementations.
118+
119+
For example, floating point math often produces slightly different results
120+
between programming languages due to issues such as rounding errors and
121+
uncertainty in their respective libraries. Consequently, integer math is
122+
generally preferred.
123+
124+
Another example is that the precision of regular integers in some languages may
125+
vary depending on the architecture (e.g 32-bit versus 64-bit). Specifications
126+
must consider these differences and ensure they are adequately defined.
127+
128+
Morever, consensus code must strive to actively avoid 3rd-party dependencies
129+
since other projects often have very different, and less strict, requirements
130+
than what is required by consensus code.
131+
132+
====Rationale====
133+
134+
The rationale section provides insight into the final design laid out in the
135+
specification. It should include topics such as why particular design decisions
136+
were made, theory of operation, alternate designs, and other related work.
137+
138+
This section, like the motivation section, is also critical and required for
139+
consensus change proposals. Stakeholders need to make an informed decision on
140+
any new rules introduced to the network and the rationale for choosing a
141+
particular design is a key consideration.
142+
143+
Keep in mind that fully validating nodes will be responsible for enforcing any
144+
rules set forth by the proposal and archival nodes will effectively have to
145+
enforce the rules ''forever''.
146+
147+
====Deployment====
148+
149+
The deployment section provides details related to how the proposal will be
150+
deployed to the network.
151+
152+
As mentioned in [[#Abstract|Abstract]] section of this document, all consensus
153+
changes must make use of a voting agenda.
154+
155+
The voting agenda definition should be of the following form:
156+
157+
{|
158+
!Name!!Setting
159+
|-
160+
|Deployment Version||''version''
161+
|-
162+
|Agenda ID||''short, descriptive agenda id''
163+
|-
164+
|Agenda Description||''description of the agenda''
165+
|-
166+
|Start Time||''unix timestamp (human-readable date)''
167+
|-
168+
|Expire Time||''unix timestamp (human-readable date)''
169+
|-
170+
|Mask||''agenda mask in hex that defines which bits are used (Bits #, #, ...)''
171+
|-
172+
|Choices||{|
173+
!Choice!!English Description!!Bits
174+
|-
175+
|abstain||''short description of the choice''||0x00
176+
|-
177+
|no||''short description of the choice''||''value of choice in hex (Bit #)''
178+
|-
179+
|option 1||''short description of the choice''||''value of choice in hex (Bit #)''
180+
|-
181+
|option 2||''short description of the choice''||''value of choice in hex (Bit #)''
182+
|}
183+
|}
184+
185+
====Compatibility====
186+
187+
The compatibility section is recommended for all proposals and is required for
188+
any proposals that introduce backwards incompatibilities. In general, this
189+
section should discuss exactly how the proposal affects existing software.
190+
191+
A proposal that is backwards compatible should specifically state that, along
192+
with an explanation of why it is backwards compatible.
193+
194+
A proposal that is '''not''' backwards compatible must also provide a plan for
195+
handling the incompatibilities.
196+
197+
====Reference Implementation====
198+
199+
The reference implementation section is required for all consensus change
200+
proposals since, due to Decred's decentralized governance structure, all
201+
proposals which involve changes to consensus must undergo a voting agenda which
202+
implies that proposals must also already have a working, tested, and
203+
well-documented implementation that lies dormant in the code and therefore can
204+
be activated should the change be accepted by the stakeholders.
205+
206+
====Test Vectors====
207+
208+
The test vectors section applies to any proposals that introduce facets that can
209+
reasonably be independently tested and serves to help multiple implementations
210+
ensure they are compatibile. Some examples where test vectors might reasonably
211+
be included are new algorithms, new standard script types, smart contracts,
212+
additional script opcodes, and changes to the block or transaction structure or
213+
hash generation.
214+
215+
====Acknowledgements====
216+
217+
The acknowledgements section provides a standard mechanism for giving
218+
recognition. This might include citing contributors and collaborators who
219+
provided direct technical assistance, participated in intellectual discussions,
220+
or otherwise provided assistance with the proposal.
221+
222+
This section also should be used to cite relevant source material as needed.
223+
224+
Acknowledgements that are not directly related to the proposal, such as personal
225+
encouragement, should '''not''' be included.
226+
227+
====Copyright====
228+
229+
All DCPs must be licensed under the terms set forth in the [[#Licensing|Licensing]]
230+
section.
231+
232+
===Other Sections===
233+
234+
In addition to the [[#Standard_Sections|standard sections]], the DCP may contain
235+
any other sections that the author feels are relevant to the proposal. For
236+
example, some proposals may wish to contain supplemental data such as simulation
237+
results, examples, footnotes, and future extensions.
238+
239+
==Status==
240+
241+
===Specification===
242+
243+
The status of a DCP is primarily defined by the on-chain voting sytem. There
244+
are two additional status indicators intended to allow clear DCP status
245+
signalling in case future updates replace or obsolete a given DCP.
246+
247+
The following chart shows the progression of a DCP according to the voting
248+
process:
249+
250+
<img src="./dcp_status.png" />
251+
252+
DCPs which involve a consensus change automatically progress to the '''Voting''',
253+
'''Locked In''', '''Active''' or '''Failed''' status depending on the result of
254+
the associated on-chain vote.
255+
256+
It is also possible for the semantics defined by a DCP to be replaced or
257+
rendered obsolete by a newer DCP. In that case, the status may become
258+
'''Replaced''' or '''Obsolete'''.
259+
260+
===Rationale===
261+
262+
One of the most important features of Decred is its democratic handling of
263+
potentially controversial consensus changes via its decentralized, transparent,
264+
cryptographically-secured, on-chain voting system. This means that whether or
265+
not a given consensus change proposal progresses to an '''Active''' or
266+
'''Failed''' status is entirely based on the results of the on-chain vote.
267+
268+
There are no additional status indicators for things such a drafts and
269+
withdrawals since all DCPs are only created as the result of an off-chain
270+
proposal and voting system that deals with those issues has already been
271+
completed.
272+
273+
==Licensing==
274+
275+
===Specification===
276+
277+
====DCP Text====
278+
279+
New DCPs are required to be licensed with the
280+
[https://creativecommons.org/publicdomain/zero/1.0 CC0-1.0: Creative Commons CC0 1.0 Universal]
281+
license and must declare this by setting the '''License''' header in the
282+
[[#Header_Preamble|preamble]] to its abbreviation, '''CC0-1.0'''.
283+
284+
====Source Code====
285+
286+
The source code in the DCP may optionally be licensed using a separate license
287+
per the following list. The separate code license must be declared by setting
288+
the '''License-Code''' header in the [[#Header_Preamble|preamble]] to its
289+
abbreviation.
290+
291+
* ISC: [https://opensource.org/licenses/ISC ISC License]
292+
* BSD-2-Clause: [https://opensource.org/licenses/BSD-2-Clause OSI-approved BSD 2-clause license]
293+
* BSD-3-Clause: [https://opensource.org/licenses/BSD-3-Clause OSI-approved BSD 3-clause license]
294+
295+
The recommended license for source code is '''ISC'''.
296+
297+
===Rationale===
298+
299+
It is important for DCPs to be licensed under the most permissive terms possible
300+
since they will become technical reference documents that are an intrinsic part
301+
of Decred. This is also why code licenses such as the GPL are not acceptable.
302+
303+
While it might be tempting to simply allow DCPs to placed into the public domain
304+
directly, it is disallowed due to its controversial legal status. The public
305+
domain is not universally recognized as a legally sanctioned entity, so some
306+
argue that "granting" a work into the public domain has no legal effect
307+
whatsoever.
308+
309+
==Acknowledgements==
310+
311+
This process was heavily influenced by the Bitcoin Improvement Proposal (BIP)
312+
process although it has been modified to fit the needs of Decred. The BIP
313+
process document from which portions of this document are based is licensed
314+
under the BSD-2-Clause license by author "Luke Dashjr &lt;[email protected]&gt;".
315+
316+
Thanks to the following individuals who provided valuable feedback during the
317+
review process of this proposal:
318+
319+
* Jake Yocom-Piatt
320+
321+
==Copyright==
322+
323+
This document is licensed under the
324+
[https://creativecommons.org/publicdomain/zero/1.0 CC0-1.0: Creative Commons CC0 1.0 Universal]
325+
license.

dcp-0000/dcp_status.png

32.7 KB
Loading

readme-imgs/decredlogo.png

16.1 KB
Loading

0 commit comments

Comments
 (0)