From 26cf7c9f92b16e88622b0a7f47aef988dd89556b Mon Sep 17 00:00:00 2001 From: thephez Date: Tue, 21 May 2019 12:12:29 -0400 Subject: [PATCH] Add DIP9 - Feature derivation paths (#48) * DIP9 - Add DIP and assignment documents * DIP9 - Add to Readme --- README.md | 1 + dip-0009.md | 70 +++++++++++++++++++++++++++++++++++++++++ dip-0009/assignments.md | 12 +++++++ 3 files changed, 83 insertions(+) create mode 100644 dip-0009.md create mode 100644 dip-0009/assignments.md diff --git a/README.md b/README.md index b10721b..6d64164 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Number | Layer | Title | Owner | Type | Status [6](dip-0006.md) | Consensus | Long-Living Masternode Quorums | Alexander Block | Standard | Active [7](dip-0007.md) | Consensus | LLMQ Signing Requests / Sessions | Alexander Block | Standard | Active [8](dip-0008.md) | Consensus | ChainLocks | Alexander Block | Standard | Active +[9](dip-0009.md) | Applications | Feature Derivation Paths | Samuel Westrich | Informational | Proposed [10](dip-0010.md) | Consensus | LLMQ InstantSend | Alexander Block | Standard | Proposed diff --git a/dip-0009.md b/dip-0009.md new file mode 100644 index 0000000..f940505 --- /dev/null +++ b/dip-0009.md @@ -0,0 +1,70 @@ +
+  DIP: 0009
+  Title: Feature Derivation Paths
+  Author(s): Samuel Westrich
+  Special-Thanks:  
+  Status: Proposed
+  Type: Informational
+  Created: 2019-03-12
+  License: MIT License
+
+ +## Table of Contents + +1. [Abstract](#abstract) +1. [Motivation](#motivation) +1. [Prior Work](#prior-work) +1. [Feature Path Level](#feature-path-level) +1. [Copyright](#copyright) + +## Abstract + +This DIP introduces reliable derivation paths for various coin-specific features. + +## Motivation + +Currently there is much ambiguity between different coin paths, BIP43 tried to solve this with the ‘purpose’ hardened derivation. With BIP44 we saw derivation paths such as `44’/5’/0’` which addresses coin-specific derivation paths. However, these derivation paths had an account directly after the coin type which made it unusable for coin-specific features other than standard transactions. + +## Prior work + +- [BIP-0043 - Purpose Field for Deterministic Wallets](https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki) +- [BIP-0044 - Multi-Account Hierarchy for Deterministic Wallets](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) + +## Feature path level + +We define the following minimum 3 levels in BIP32 path: + + `m / purpose' / coin_type' / feature' / *` + +An apostrophe in the path indicates that BIP32 hardened derivation is used. + +Each level has a special meaning, described in the sections below. + +### Purpose + +Purpose is a constant set to `9'` (or 0x80000009) following the [BIP43 recommendation](https://github.com/bitcoin/bips/blob/master/bip-0043.mediawiki#purpose). It indicates that the subtree of this node is used according to this specification. + +Hardened derivation is used at this level. + +### Coin type + +Coin type in this DIP is the same as defined by [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki#coin-type) (a constant, set for each cryptocoin). For example, Dash has a registered coin type of `5'` (or 0x80000005). + +This DIP is not a central directory for the registered coin types. Please visit the full list of registered coin types maintained by SatoshiLabs for any other coins: + +[SLIP-0044 : Registered coin types for BIP-0044](https://github.com/satoshilabs/slips/blob/master/slip-0044.md) + +Hardened derivation is used at this level. + +### Feature + +This level splits the coin’s key space based on coin-specific features. For example, it may be desirable to maintain mixed funds in a path that is isolated from non-mixed funds. Other use cases could include using a specific path for identity or other non-financial keys. + +Hardened derivation is used at this level. + +Feature derivation paths may be defined based on future DIPs. A list of registered features can be found [here](dip-0009/assignments.md). + + +## Copyright + +Copyright (c) 2019 Dash Core Group, Inc. [Licensed under the MIT License](https://opensource.org/licenses/MIT) diff --git a/dip-0009/assignments.md b/dip-0009/assignments.md new file mode 100644 index 0000000..63a8cfc --- /dev/null +++ b/dip-0009/assignments.md @@ -0,0 +1,12 @@ +## Registered Features + +Here is a table of current feature paths and any associated DIP. Future DIPs may introduce more types. + + +| Feature Index * | Feature | DIP Number and Name | Note | +| ------------------ | ------------ | ------------------- | ---- | +| `3'` | Masternode Keys | [DIP 0003: Deterministic Masternode List](https://github.com/dashpay/dips/blob/master/dip-0003.md) | The masternode related keys are located in the following sub-paths:
0'/* - _Reserved_
1'/* - Voting Key
2'/* - Owner Key
3'/* - Operator Key

For example, the first voting key for Dash would be at `m/9'/5'/3'/1'/0` | + +Note: all DIP 0009 paths are of the format: `m / 9' / coin_type' / feature' / *` + +\* Where applicable, the feature index matches the number of the DIP that defines the feature(s)