Skip to content
This repository was archived by the owner on Oct 28, 2021. It is now read-only.

Documentation for creating a private network with 2 nodes#5546

Merged
halfalicious merged 12 commits intomasterfrom
private-net-doc
Apr 8, 2019
Merged

Documentation for creating a private network with 2 nodes#5546
halfalicious merged 12 commits intomasterfrom
private-net-doc

Conversation

@halfalicious
Copy link
Contributor

No description provided.

@halfalicious halfalicious changed the title Documentation for creating a private network with 2 nodes [WIP] Documentation for creating a private network with 2 nodes Apr 4, 2019
@codecov-io
Copy link

codecov-io commented Apr 5, 2019

Codecov Report

Merging #5546 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #5546      +/-   ##
=========================================
+ Coverage   61.89%   61.9%   +0.01%     
=========================================
  Files         344     344              
  Lines       28757   28757              
  Branches     3267    3267              
=========================================
+ Hits        17800   17803       +3     
  Misses       9787    9787              
+ Partials     1170    1167       -3

@halfalicious halfalicious requested review from chfast and gumb0 April 5, 2019 04:44
@halfalicious halfalicious changed the title [WIP] Documentation for creating a private network with 2 nodes Documentation for creating a private network with 2 nodes Apr 5, 2019
@halfalicious
Copy link
Contributor Author

Will squash all commits before merging

Copy link
Member

@gumb0 gumb0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great overall! Some minor notes/questions

--------------------------
For the purposes of this documentation, a **private network** can be thought of as a network of Ethereum nodes only accessible on your physical machine.

What is a Private Chain?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean to have both What is a Private Network? and What is a Private Chain? sections?
For the purposes of this documentation ... sentence is almost identical

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I meant to have both sections since I think a private network and a private chain are 2 distinct concepts (though they are frequently used together) - for example, you can run a private network with a mainnet chain config.

I've tweaked the verbiage in the "private chain" section so that it doesn't sound so similar to the previous section.

Chain Configuration
-------------------
- You typically initialize a private chain using a chain configuration json file (this isn't strictly required, but it makes testing a lot easier since you can do things like lower the difficulty rate and pre-fund addresses).
- The chain configuration json file format is defined here: https://github.com/ethereum/wiki/wiki/Ethereum-Chain-Spec-Format
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really follow that spec? It might be outdated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! I assumed we did, Ill investigate

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, the spec is either deprecated or we don't fully implement the spec (for example it lists a "nodes" key which we don't support). I'll remove the link.

"allowFutureBlocks" : false
},
"genesis": {
"nonce": "0x0000000000000042",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent genesis contents.

"gasLimit": "0x989680"
},
"accounts": {
"0000000000000000000000000000000000000001": { "precompiled": { "name": "ecrecover", "linear": { "base": 3000, "word": 0 } }, "balance": "0x01" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent accounts contents.

"balance" : "0x2000000000000000000"
},
"002c73acd4bc217998966964d27f0ee79a47befb": {
"balance" : "0x2000000000000000000"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's not 2 ether, it's 0x2000000000000000000 wei (hex). Should be "balance" : "2000000000000000000"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are correct, typo on my part


::

Aleth -m on --config <file> -a <addr> --no-discovery --unsafe-transactions --listen <port>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aleth lowercase

{
"sealEngine": "Ethash",
"params": {
"accountStartNonce": "0x00",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent params contents

@halfalicious halfalicious merged commit ba3f45a into master Apr 8, 2019
@halfalicious halfalicious deleted the private-net-doc branch April 8, 2019 19:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants