简体   繁体   English

是否有可能在没有任何交易费用的情况下构建一个真实世界的私有以太坊区块链,我应该注意哪些其他费用?

[英]Is it possible to build a real-world private ethereum blockchain without any transaction fee and what other costs should I be aware of?

Recently I have been working on a class project.最近在做一个class的项目。 I have built a Supply chain Dapp, that was based on truffle framework and ganache as a local blockchain.我构建了一个供应链 Dapp,它基于松露框架和 ganache 作为本地区块链。 I have some issues regarding the concepts of private Ethreum blockchain.我对私有 Ethreum 区块链的概念有一些疑问。

My question is, is it possible to build a real-world private Ethereum blockchain for a specific organization without any transaction fees and what other costs should I be aware of?我的问题是,是否有可能在没有任何交易费用的情况下为特定组织构建一个真实世界的私有以太坊区块链,我应该注意哪些其他费用? And the second question is do I need to deploy my Dapp on Rinkeby?第二个问题是我需要在 Rinkeby 上部署我的 Dapp 吗? It's just that I read somewhere that you should deploy your dapp to tes.nets like Rinkeby to demonstrate that it functions well in a setting more like to the Ethereum mai.net.只是我在某处读到,你应该像 Rinkeby 一样将你的 dapp 部署到 tes.nets,以证明它在更像以太坊 mai.net 的环境中运行良好。 Since I just used ganache for the dapp, I wanted to be certain因为我只是为 dapp 使用了甘纳许,所以我想确定

I found some answers online but they were not satisfactory, it would be greatly appreciated and helpful if you could provide me with some directions on the subject, as I am relatively new to this.我在网上找到了一些答案,但它们并不令人满意,如果你能为我提供有关该主题的一些指导,我将不胜感激和帮助,因为我对此比较陌生。 Thank you.谢谢你。

My question is, is it possible to build a real-world private Ethereum blockchain for a specific organization without any transaction fees and what other costs should I be aware of?我的问题是,是否可以为特定组织构建一个真实世界的私有以太坊区块链而无需任何交易费用以及我应该注意哪些其他成本?

No, because each transaction will consume CPU, IO and network bandwidth.不会,因为每笔交易都会消耗 CPU、IO 和网络带宽。 These must be measured and the transaction stopped, or otherwise, one malicious transaction can halt the whole network by consuming all the resources.必须测量这些并停止交易,否则,一项恶意交易可以通过消耗所有资源来停止整个网络。 Thus, at least an internal unit of accounting is needed.因此,至少需要一个内部会计单位。

And the second question is do I need to deploy my Dapp on Rinkeby?第二个问题是我需要在 Rinkeby 上部署我的 Dapp 吗?

Why would you do that?为什么要这么做? Please read xyproblem.info on how to ask more understandable questions.请阅读xyproblem.info ,了解如何提出更易于理解的问题。

I understand from your question that you built a Dapp and tested it using Ganache and Truffle frameworks.我从您的问题中了解到,您构建了一个 Dapp 并使用 Ganache 和 Truffle 框架对其进行了测试。 However, you wish to test your application on a testnet similar to rinkeby.但是,您希望在类似于 rinkeby 的测试网上测试您的应用程序。

It appears that there are certain projects which allow you to create a mainnet fork.似乎有些项目允许您创建主网分叉。 You just need to provide them with the infura URL of the mainnet, and they will spin up your local Ethereum mainnet fork.您只需向他们提供主网的 infura URL,他们就会启动您本地的以太坊主网分叉。 This enables you to test your dapp under mainnet conditions.这使您能够在主网条件下测试您的 dapp。 Additionally, you may assign as many tokens as you wish to your address.此外,您可以将任意数量的代币分配给您的地址。 Here is a link to a repository that can perform this task.这是可以执行此任务的存储库的链接。

https://github.com/yearn/yearn-mainnet-fork https://github.com/yearn/yearn-mainnet-fork

To deploy your contract on the local blockchain instance, you will simply need to use the RPC URL provided by this repository.要将合约部署在本地区块链实例上,您只需使用此存储库提供的 RPC URL。

Yes you can.是的你可以。 These are generally called permissioned chains.这些通常称为许可链。 While you incur compute cost, your org or anyone given permission to use the chain doesn't pay for gas.虽然您会产生计算成本,但您的组织或任何获准使用该链的人不会支付 gas 费用。

There is still a gas price, it is essentially useless since as the authority on the chain you can mint infinite gas.天然气价格仍然存在,它本质上是无用的,因为作为链上的权威,你可以铸造无限的天然气。 Such chains usually have PoA (proof-of-authority consensus).此类链通常具有 PoA(权威证明共识)。

You can use these clients to build such chains:您可以使用这些客户端来构建这样的链:

  • GoQuorum - geth fork which lags in upstream updates by a few months. GoQuorum - geth fork,它在上游更新中滞后了几个月。 Has lots of consensus algo options like QBFT/Raft.有很多共识算法选项,例如 QBFT/Raft。 Additionally ships with privacy tx manager.另外附带隐私 tx 管理器。 Application level permissioning.应用程序级许可。
  • OpenEthereum (Deprecated) - My personal favorite. OpenEthereum (Deprecated) - 我个人的最爱。 I have worked with this client extensively and wrote a public humanitarian chain spec with it ( https://github.com/grassrootseconomics/kitabu-chain ).我与这个客户进行了广泛的合作,并用它编写了一个公共人道主义链规范( https://github.com/grassrootseconomics/kitabu-chain )。 Uses AuRA consensus.使用 AuRA 共识。 Well documented.有据可查。
  • Nethermind - Supports AuRa consensus. Nethermind - 支持 AuRa 共识。 Haven't used it, but should have more features than OpenEtherem.没用过,但应该比 OpenEtherem 有更多的功能。
  • Geth - Supports Clique. Geth - 支持 Clique。 I am not a fan of clique consensus but it can work well.我不是派系共识的粉丝,但它可以很好地工作。

I have documented some PoA consensus comparisons here .我在这里记录了一些 PoA 共识比较。 You might find it useful.你可能会发现它很有用。

Yes, you can indeed.是的,你确实可以。 Both GoQuorum and Besu allow you to create a completely gas-free.network. GoQuorum 和 Besu 都允许您创建一个完全无 gas 的网络。 https://consensys.net/docs/goquorum/en/latest/concepts/free-gas.network/?h=gas https://consensys.net/docs/goquorum/en/latest/concepts/free-gas.network/?h=gas

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM