TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How to create a private Ethereum network

193 pointsby osmodealmost 8 years ago

7 comments

omarforgotpwdalmost 8 years ago
A blockchain is secure because in order to "hack" into the database you need to have 51% of the computational power on the network to create the longest chain. In a large network like Bitcoin or Ethereum the massive computational power of the network ensures generating 51% of the compute power of the network is near impossibly expensive. How secure is a private blockchain? If there are only a few servers the network could be destroyed by just unplugging a few machines, or plugging in a few more.
评论 #14853025 未加载
评论 #14853795 未加载
评论 #14853564 未加载
评论 #14853121 未加载
评论 #14853617 未加载
评论 #14853246 未加载
keornalmost 8 years ago
Proof of work is not the right tool for private networks since it is not sybil resistant in this context. <a href="https:&#x2F;&#x2F;github.com&#x2F;paritytech&#x2F;parity&#x2F;wiki&#x2F;Demo-PoA-tutorial" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;paritytech&#x2F;parity&#x2F;wiki&#x2F;Demo-PoA-tutorial</a> is another tutorial that uses a Proof of Authority consensus for an Ethereum-like chain.
评论 #14853776 未加载
coinfantasticalmost 8 years ago
Especially given all the warnings in the post, I&#x27;m wondering why one would want to do this? I imagine the ostensible answer is security, but given the many recent posts about Solidity&#x27;s poor design and the many recent heists due to (non-obvious) smart contract bugs, why would anyone want to run a private Ethereum network?<p>Is there a better alternative?
评论 #14852757 未加载
评论 #14852804 未加载
decentralisedalmost 8 years ago
Pretty good, I&#x27;m really happy to see the added focus on Ethereum here :-)<p>Since you are building a private network, you may also add a small script so your nodes only mine on demand (i.e., when there are new transactions) which will reduce the power usage on your machine and avoids having the difficulty increase too quickly.<p>Save the script below as mine.js (for instance) and then in your geth startup command, include it as `geth --networkid &lt;your_networ_id&gt; ...other params... js .&#x2F;mine.js`<p>`var mining_threads = 1<p>function checkWork() { if (eth.pendingTransactions.length &gt; 0) { if (eth.mining) return; console.log(&quot;== Pending transactions! Mining...&quot;); miner.start(mining_threads); } else { miner.stop(); console.log(&quot;== No transactions! Mining stopped.&quot;); } }<p>eth.filter(&quot;latest&quot;, function(err, block) { checkWork(); }); eth.filter(&quot;pending&quot;, function(err, block) { checkWork(); });<p>checkWork();`<p>I picked up this &quot;trick&quot; from Embark framework (<a href="https:&#x2F;&#x2F;github.com&#x2F;iurimatias&#x2F;embark-framework" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;iurimatias&#x2F;embark-framework</a>)
modaldualityalmost 8 years ago
Good article. I found while doing the same thing a lot of the information online was out of date (for example referencing geth&#x27;s built-in solc) and unusable.<p>One addition--Geth 1.6 released a very nice interactive tool called puppeth that creates genesis blocks and provisions testnets, I&#x27;ve found it easier than doing everything myself.<p>Although once again there really wasn&#x27;t any tutorial or documentation about puppeth for Ethereum beginners, the only reference I could find was a Taiwanese Ethereum meetup blogpost, which was mostly in Chinese.
quickthrower2almost 8 years ago
This is appealing as a way for testing contracts without paying the rediculously high gas price. However is there any advantage of this over the test Etherium network?
评论 #14853798 未加载
评论 #14854651 未加载
ym705almost 8 years ago
Hello osmode, if you&#x27;d like you could say hello there: <a href="https:&#x2F;&#x2F;ethereumdev.io&#x2F;contact&#x2F;" rel="nofollow">https:&#x2F;&#x2F;ethereumdev.io&#x2F;contact&#x2F;</a> Loved your articles and looking to write blockchain creation and more after finishing Solidity tutorials..