TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

How to create a private Ethereum network

193 点作者 osmode将近 8 年前

7 条评论

omarforgotpwd将近 8 年前
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 未加载
keorn将近 8 年前
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 未加载
coinfantastic将近 8 年前
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 未加载
decentralised将近 8 年前
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>)
modalduality将近 8 年前
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.
quickthrower2将近 8 年前
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 未加载
ym705将近 8 年前
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..