Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit 9b7ff97

Browse files
authored
Merge pull request #3583 from input-output-hk/co-354-network-magic-doc
[CO-354] docs: add configuration info for "protocolMagic"
2 parents 0c2fd63 + 19aba59 commit 9b7ff97

File tree

2 files changed

+33
-6
lines changed

2 files changed

+33
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
- Fix a case where the error reporting system can cause the node to stop syncing. ([#3294](https://github.com/input-output-hk/cardano-sl/pull/3294), CDEC-469, CDEC-439)
1616

17-
- Adjust the address format to distinguish testnet and mainnet addresses. ([#3540](https://github.com/input-output-hk/cardano-sl/pull/3540), [#3556](https://github.com/input-output-hk/cardano-sl/pull/3556), [#3558](https://github.com/input-output-hk/cardano-sl/pull/3558), [#3561](https://github.com/input-output-hk/cardano-sl/pull/3561), [#3578](https://github.com/input-output-hk/cardano-sl/pull/3578), [#3618](https://github.com/input-output-hk/cardano-sl/pull/3618), [#3659](https://github.com/input-output-hk/cardano-sl/pull/3659), CO-353, CO-354)
17+
- Adjust the address format to distinguish testnet and mainnet addresses. ([#3540](https://github.com/input-output-hk/cardano-sl/pull/3540), [#3556](https://github.com/input-output-hk/cardano-sl/pull/3556), [#3558](https://github.com/input-output-hk/cardano-sl/pull/3558), [#3561](https://github.com/input-output-hk/cardano-sl/pull/3561), [#3578](https://github.com/input-output-hk/cardano-sl/pull/3578), [#3583](https://github.com/input-output-hk/cardano-sl/pull/3583), [#3618](https://github.com/input-output-hk/cardano-sl/pull/3618), [#3659](https://github.com/input-output-hk/cardano-sl/pull/3659), [#3685](https://github.com/input-output-hk/cardano-sl/pull/3685), CO-353, CO-354)
1818

1919
- Add a workaround for the RocksDB issue which prevented Daedalus Windows users with non-ASCII usernames from starting the wallet. ([#3465](https://github.com/input-output-hk/cardano-sl/pull/3465), CBR-391)
2020

docs/configuration.md

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,31 @@ mechanism (hex-encoded).
264264
Section `"protocolConsts"` contains basic protocol constants:
265265

266266
* `"k"` - security parameter from the paper,
267-
* `"protocolMagic"` - protocol magic value (it's included into a
268-
serialized block and header and it's part of signed data, so when protocol
269-
magic is changed, all signatures become invalid) used to
270-
distinguish different networks,
267+
* `"protocolMagic"` - protocol magic section, described fully below:
268+
* `"pm"` - protocol magic number,
269+
* `"requiresNetworkMagic"` - either `"NMMustBeNothing"` or `"NMMustBeJust"`,
271270
* `"vssMaxTTL"` - VSS certificates maximum timeout to live (number of epochs),
272271
* `"vssMinTTL"` - VSS certificates minimum timeout to live (number of epochs).
273272

273+
Section `"protocolMagic"` defines the protocol magic number. When the
274+
protocol magic is changed, all signatures become invalid. This is used
275+
to distinguish different networks.
276+
277+
* `"pm"` - is the protocol magic number, is included in serialized
278+
blocks and headers, and is part of signed data.
279+
* `"requiresNetworkMagic"` - will be either
280+
`"NMMustBeNothing"` or `"NMMustBeJust"`
281+
282+
The `"protocolMagic"` value can either be an object with the two
283+
fields described above, or just a plain integer. In the latter case,
284+
`"requiresNetworkMagic"` will take the default value of
285+
`"NMMustBeJust"`.
286+
287+
The `"requiresNetworkMagic"` setting forms part of the genesis
288+
data. However it is configured in the
289+
[core section](#core-configuration-besides-genesis).
290+
291+
274292
Section `"heavyDelegation"` contains an information about heavyweight delegation:
275293

276294
* `"cert"` - delegation certificate,
@@ -574,7 +592,16 @@ to this file already.
574592

575593
### Core configuration besides genesis
576594

577-
**TODO**
595+
* `requiresNetworkMagic` — influences both the genesis data and the
596+
address format that the node uses. It can be either:
597+
* `"NMMustBeNothing"` (mainnet setting) — means that the protocol
598+
magic value will *not* be included in the address format or
599+
transactions.
600+
* `"NMMustBeJust"` (public testnet setting, the default) — means
601+
that the protocol magic value will be included in the address
602+
format and hence transactions.
603+
604+
* `dbSerializeVersion`**TODO**
578605

579606
### Infra configuration
580607

0 commit comments

Comments
 (0)