mirror of
https://github.com/seigler/dash-docs
synced 2025-07-26 17:26:12 +00:00
[Content] Add devnet details (#40)
* content - Add devnet details - Description in examples section - Glossary entry and updated testnet/regtest * content - Devnet P2P - Add to start string and spork key tables Closes #36
This commit is contained in:
parent
e3c34fef4c
commit
f6a68b5857
6 changed files with 107 additions and 2 deletions
32
_data/glossary/en/devnet.yaml
Normal file
32
_data/glossary/en/devnet.yaml
Normal file
|
@ -0,0 +1,32 @@
|
|||
---
|
||||
# This file is licensed under the MIT License (MIT) available on
|
||||
# http://opensource.org/licenses/MIT.
|
||||
|
||||
required:
|
||||
#-------------40 characters-------------#
|
||||
title_max_40_characters_no_formatting: Devnet, Development Network
|
||||
|
||||
summary_max_255_characters_no_formatting: >
|
||||
A development environment in which developers can obtain and
|
||||
spend duffs that have no real-world value on a network that
|
||||
is very similar to the Dash mainnet. Multiple independent devnets can
|
||||
coexist without interference. Devnets can be either public or private.
|
||||
|
||||
synonyms_shown_in_glossary_capitalize_first_letter:
|
||||
- Devnet
|
||||
|
||||
optional:
|
||||
synonyms_and_pluralizations_not_shown_in_glossary:
|
||||
- devnets
|
||||
- devnets mode
|
||||
- devnets modes
|
||||
- development network
|
||||
|
||||
not_to_be_confused_with_capitalize_first_letter:
|
||||
- Regtest (a local testing environment where developers can control block generation)
|
||||
- Testnet (a global testing environment which mostly mimics mainnet)
|
||||
|
||||
links_html_or_markdown_style_capitalize_first_letter:
|
||||
- "[Devnet mode](/en/developer-examples#devnet-mode) --- Developer Examples"
|
||||
|
||||
---
|
|
@ -23,6 +23,7 @@ optional:
|
|||
- regtest modes
|
||||
|
||||
not_to_be_confused_with_capitalize_first_letter:
|
||||
- Devnet (a public or private development network which mimics mainnet)
|
||||
- Testnet (a global testing environment which mostly mimics mainnet)
|
||||
|
||||
links_html_or_markdown_style_capitalize_first_letter:
|
||||
|
|
|
@ -22,6 +22,7 @@ optional:
|
|||
- testing network
|
||||
|
||||
not_to_be_confused_with_capitalize_first_letter:
|
||||
- Devnet (a public or private development network which mimics mainnet)
|
||||
- Regtest (a local testing environment where developers can control block generation)
|
||||
|
||||
links_html_or_markdown_style_capitalize_first_letter:
|
||||
|
|
|
@ -26,6 +26,13 @@ Once installed, you'll have access to three programs: `dashd`,
|
|||
* `dash-cli` allows you to send RPC commands to `dashd` from the
|
||||
command line. For example, `dash-cli help`
|
||||
|
||||
{% endautocrossref %}
|
||||
|
||||
### Configuration file
|
||||
<!-- no subhead-links here -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
All three programs get settings from `dash.conf` in the `DashCore`
|
||||
application directory:
|
||||
|
||||
|
@ -53,8 +60,8 @@ directory:
|
|||
chmod 0600 dash.conf
|
||||
~~~
|
||||
|
||||
For development, it's safer and cheaper to use Dash's test network (testnet)
|
||||
or regression test mode (regtest) described below.
|
||||
For development, it's safer and cheaper to use Dash's test network (testnet),
|
||||
regression test mode (regtest), or a develper network (devnet) described below.
|
||||
|
||||
Questions about Dash use are best sent to the [Dash forum][forum
|
||||
tech support] and [Discord channels][Discord channels]. Errors or suggestions related to
|
||||
|
|
|
@ -109,3 +109,63 @@ configuration directory locations on various operating systems. Always back up
|
|||
mainnet wallets before performing dangerous operations such as deleting.)
|
||||
|
||||
{% endautocrossref %}
|
||||
|
||||
### Devnet Mode
|
||||
{% include helpers/subhead-links.md %}
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
Developer networks (devnets) have some aspects of testnet and some aspects of
|
||||
regtest. Unlike testnet, multiple independent devnets can be created and coexist
|
||||
without interference. Each one is identified by a name which is hardened into a
|
||||
"devnet genesis" block, which is automatically positioned at height 1. Validation
|
||||
rules will ensure that a node from `devnet<!--noref-->=test1` never be able to
|
||||
accept blocks from `devnet<!--noref-->=test2`. This is done by checking the
|
||||
expected devnet genesis block.
|
||||
|
||||
The genesis block of the devnet is the same as the one from regtest. This
|
||||
starts the devnet with a very low difficulty, allowing quick generation of a
|
||||
sufficient balance to create a masternode.
|
||||
|
||||
The devnet name is put into the sub-version of the `version` message.
|
||||
If a node connects to the wrong network, it will immediately be disconnected.
|
||||
|
||||
To use devnet, use the argument `-devnet=<name>`<!--noref--> with `dash-cli`,
|
||||
`dashd`or `dash-qt` or add `devnet<!--noref-->=<name>` to your `dash.conf` file as
|
||||
[described earlier](#configuration-file).
|
||||
|
||||
Devnets must be assigned both `-port` and `-rpcport` unless they are not
|
||||
listening (`-listen=0`). It is possible to run a devnet on a private (RFC1918)
|
||||
network by using the `-allowprivatenet=1` argument.
|
||||
|
||||
{% endautocrossref %}
|
||||
|
||||
Example devnet start command:
|
||||
|
||||
{% highlight bash %}
|
||||
> dashd -devnet=mydevnet -rpcport=18998 -port=18999 -daemon
|
||||
Dash Core server starting
|
||||
{% endhighlight %}
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
You can now use Dash Core RPCs prefixed with `dash-cli -devnet=<name>`<!--noref-->.
|
||||
|
||||
Devnet wallets and block chain state (chainstate) are saved in the `devnet-<name>`<!--noref-->
|
||||
subdirectory of the Dash Core configuration directory. You can safely
|
||||
delete the `devnet-<name>`<!--noref--> subdirectory and restart Dash Core to
|
||||
start a new devnet. (See the [Developer Examples Introduction][devexamples] for default
|
||||
configuration directory locations on various operating systems. Always back up
|
||||
mainnet wallets before performing dangerous operations such as deleting.)
|
||||
|
||||
Eventually, there may be many public and/or private devnets that vary in size
|
||||
and function. Providing the correct devnet name and the seed node of the network
|
||||
will be all that is required to join.
|
||||
|
||||
An old devnet can be easily dropped and a new one started just by destroying all
|
||||
nodes and recreating them with a new devnet name. This works best in combination
|
||||
with an automated deployment using something like Ansible and Terraform. The
|
||||
[Dash Cluster Ansible](https://github.com/dashpay/dash-cluster-ansible) provides
|
||||
a way to do this (currently a work-in-progress at an early development stage).
|
||||
|
||||
{% endautocrossref %}
|
||||
|
|
|
@ -7,6 +7,8 @@ http://opensource.org/licenses/MIT.
|
|||
## P2P Network
|
||||
{% include helpers/subhead-links.md %}
|
||||
|
||||
<!-- __ -->
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
This section describes the Dash P2P network protocol (but it is [not a
|
||||
|
@ -37,6 +39,7 @@ The following constants and defaults are taken from Dash Core's
|
|||
| Mainnet | 9999 | 0xBD6B0CBF | 0xBF0C6BBD | 0x1e0ffff0
|
||||
| Testnet | 19999 | 0xFFCAE2CE | 0xCEE2CAFF | 0x1e0ffff0
|
||||
| Regtest | 19994 | 0xDCB7C1FC | 0xFCC1B7DC | 0x207fffff
|
||||
| Devnet | User-defined | 0xFFCAE2CE | 0xCEE2CAFF | 0x207fffff
|
||||
|
||||
Note: the testnet start string and nBits above are for testnet3.
|
||||
|
||||
|
@ -1339,6 +1342,7 @@ Core can be found in `CPubKey::RecoverCompact`). The hash is a double SHA-256 ha
|
|||
| Mainnet | 04549ac134f694c0243f503e8c8a9a986f5de6610049c40b07816809b0d1<br>d06a21b07be27b9bb555931773f62ba6cf35a25fd52f694d4e1106ccd237<br>a7bb899fdd |
|
||||
| Testnet3 | 046f78dcf911fbd61910136f7f0f8d90578f68d0b3ac973b5040fb7afb50<br>1b5939f39b108b0569dca71488f5bbf498d92e4d1194f6f941307ffd95f7<br>5e76869f0e |
|
||||
| RegTest | Undefined |
|
||||
| Devnets | 046f78dcf911fbd61910136f7f0f8d90578f68d0b3ac973b5040fb7afb50<br>1b5939f39b108b0569dca71488f5bbf498d92e4d1194f6f941307ffd95f7<br>5e76869f0e |
|
||||
|
||||
The following annotated hexdump shows a `spork` message.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue