-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'SAGA-develop' of https://github.com/decenomy/DSW
- Loading branch information
Showing
598 changed files
with
1,641 additions
and
1,004 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# DEIP-0000 : DEIP Template | ||
|
||
* Number: DEIP-0000 | ||
* Title: DEIP Template | ||
* Type: Informational | ||
* Status: Accepted | ||
* Authors: Decenomy Development <dev@decenomy.net> | ||
* Created: 2021-09-01 | ||
|
||
## Abstract | ||
|
||
This is a section for an abstract. | ||
|
||
## Motivation | ||
|
||
This is a section for a motivation. | ||
|
||
## Body | ||
|
||
This is a section for a body. The title of the section should be changed | ||
and the section can be split into multiple sections and subsections. | ||
|
||
## References | ||
|
||
This is a section for references such as links to other documents (BIP, DIP or EIP/ERC) or to reference implementations. | ||
|
||
## Copyright | ||
|
||
Copyright (c) 2021-2022 The DECENOMY Core Developers. [Licensed under MIT License](https://opensource.org/licenses/MIT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# DEIP-0001 : Deterministic system variables | ||
|
||
* Number: DEIP-0001 | ||
* Title: Deterministic system variables | ||
* Type: Consensus | ||
* Status: Draft | ||
* Authors: Pedro Simões <pedro@decenomy.net> | ||
* Created: 2021-09-01 | ||
|
||
## Abstract | ||
|
||
This DEIP describes the process of registering system variables on the blockchain in a deterministic way. The introduction of this feature will allow the use of the value of those variables in consensus based calculations and processing. | ||
|
||
## Motivation | ||
|
||
Currently, the DSW codebased that is based on PIVX 4.3 doesn't have an infrastructural way to change its consensus in a procedural way, having its consensus rules completely hard-coded in its source code. | ||
This limitation makes very hard to change anything that belongs to the global consensus without changing the source code always with the jeopardy of creating forks and issues on the network due to the changes, even on very minimal changes. | ||
|
||
## Prior work | ||
|
||
Dash team previously, created sporks to solve some blockchain parametrization and the easy on the introduction of new features mitigating the possibility of unintentional forks on the network, or the possibility to switch on and off some newly introduced features in case of some eventuality. | ||
|
||
However, sporks are only suitable to use on processes that do not belong to the consensus algorithm, meaning that they are not stored on the blockchain, and therefore, their values cannot be reproduced on a blockchain initial sync not replicating the same blockchain state that was present on the time the blocks were registered on the blockchain, avoiding a correct synchronization in a deterministic way. | ||
|
||
Another solution from Dash team, was the introduction of the DIP0002 - Special Transactions, that defines an extra payload to the user's regular transaction leveraging the introduction of DIP0003 - Deterministic Masternode Lists. However, these transaction are fully deterministic they are suitable for transactions made by the users to support extra processes like the management of masternodes. | ||
|
||
## Proposed solution | ||
|
||
* An OP_RETURN is added to the coinbase/coinstake transaction at the end with zero value and the signed corresponding value message encoded in it; | ||
* the OP_RETURN output must comply to the coinbase/coinstake size limitations; | ||
* The messages encoded on the OP_RETURN must be signed by the well known developer's spork private key; | ||
* The staker and masternode owner are rewarded with some additional percentage on top of their base reward to incentivise the expedite introduction of the value into the blockchain; | ||
* One coinstake/coinbase transaction can have multiple deterministic system variables with OP_RETURN outputs with zero value, if: | ||
* the value is not a duplicate, the time signed must different from the registered one; | ||
* the time signed must be higher than the previous one; | ||
* the time signed should be in time, i.e. it should not be too long in the past and not too long in the future; | ||
* the value must be in the defined range for the specific variable; | ||
* it must execute its validation without errors; | ||
* it must be activated within the beginning of the block's acceptance; | ||
* Each type of variable has a specific record type, meaning that can be used multiple type of variables; | ||
* Each type of variable has its own set of validation rules, and also the way to enforce them; | ||
* A variable must be registered and active right away on the processing of the registering block; | ||
* A validation error in one deterministic variable message registered on the coinbase/coinstake transaction render the block invalid; | ||
* Unrecognized OP_RETURN outputs are ignored by default not affecting the rest of the block validation; | ||
* In case of reorganization the values are restored to the previous ones, meaning that the old values must be maintained until the max reorganization threshold value; | ||
* There will be a mempool for this type of messages; | ||
* On reorg the discarded deterministic system variable messages must be reintroduced into the mempool; | ||
|
||
Conclusion and future work | ||
|
||
* The use of this DEIP with sporks; | ||
* The use of this DEIP with oracles like the current price of the coin, or volume; | ||
* The use of this DEIP with other type of external conditions; | ||
|
||
## References | ||
|
||
* [BIP-0074: Allow zero value OP_RETURN in Payment Protocol](https://github.com/bitcoin/bips/blob/master/bip-0074.mediawiki) | ||
|
||
* [DIP-0002: Special Transactions](https://github.com/dashpay/dips/blob/master/dip-0002.md) | ||
|
||
* [DIP-0003: Deterministic Masternode Lists](https://github.com/dashpay/dips/blob/master/dip-0003.md) | ||
|
||
## Copyright | ||
|
||
Copyright (c) 2021-2022 The DECENOMY Core Developers. [Licensed under MIT License](https://opensource.org/licenses/MIT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2022 The DECENOMY Core 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# DECENOMY Improvement Proposals (DEIPs) | ||
|
||
DECENOMY projects need a way how to document their technical decisions and features. Therefore: | ||
|
||
DEIP stands for DECENOMY Improvement Proposal. Similar to Bitcoin's BIPs, and Dash's DIPs, a DEIP is a design document providing: information to the DECENOMY community, or a description of a new feature for the DECENOMY Standard Wallet (DSW), or a description of its processes or environment. Each DEIP should provide a concise technical specification of the feature and a rationale for the feature. | ||
|
||
Because DSW is forked from the PIVX codebase, that is also forked from Dash codebase, that is also forked from Bitcoin codebase, many of the BIPs and DIPs can be applied to DSW as well. | ||
|
||
## Contributions | ||
|
||
We use the same general guidelines for introducing a new DEIP as specified in [BIP 2](https://github.com/bitcoin/bips/blob/master/bip-0002.mediawiki), with a few differences. Specifically: | ||
|
||
* Instead of the BIP editor, initiate contact with the DECENOMY development team and your request should be routed to a DEIP editor(s). The DEIP workflow mimics the DIP/BIP workflow. | ||
* Recommended licenses include the MIT license | ||
* Markdown format is the preferred format for DEIPs | ||
* Following a discussion, the proposal should be submitted to the DEIPs git repository as a pull request. This draft must be written in BIP/DIP/DEIP style as described in [BIP 2](https://github.com/bitcoin/bips/blob/master/bip-0002.mediawiki), and named with an alias such as "dip-johndoe-infinitedecenomy" until the editor has assigned it a DEIP number (authors MUST NOT self-assign DEIP numbers). | ||
* Having a DEIP here does not make it a formally accepted standard until its status becomes Final or Active. | ||
|
||
## DECENOMY Improvement Proposal Summary | ||
|
||
Number | Layer | Title | Owner | Type | Status | ||
--- | --- | --- | --- | --- | --- | ||
[0](DEIP0000.md) | | DEIP Template | Decenomy Development | Informational | Final | ||
|
||
## License | ||
|
||
Unless otherwise specified, DECENOMY Improvement Proposals (DEIPs) are released under the terms of the MIT license. See [LICENSE](LICENSE) for more information or see the [MIT License](https://opensource.org/licenses/MIT). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.