Recently I have been working on a class project. I have built a Supply chain Dapp, that was based on truffle framework and ganache as a local blockchain. I have some issues regarding the concepts of private Ethreum blockchain.
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? It's just that I read somewhere that you should deploy your dapp to testnets like Rinkeby to demonstrate that it functions well in a setting more like to the Ethereum mainnet.
Since I just used ganache for the dapp, I wanted to be certain
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.
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.
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).
You can use these clients to build such chains:
GoQuorum - geth fork which lags in upstream updates by a few months. Has lots of consensus algo options like QBFT/Raft. Additionally ships with privacy tx manager. Application level permissioning.
OpenEthereum (Deprecated) - My personal favorite. I have worked with this client extensively and wrote a public humanitarian chain spec with it (https://github.com/grassrootseconomics/kitabu-chain). Uses AuRA consensus. Well documented.
Nethermind - Supports AuRa consensus. Haven't used it, but should have more features than OpenEtherem.
Geth - Supports Clique. I am not a fan of clique consensus but it can work well.
I have documented some PoA consensus comparisons here. You might find it useful.
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. 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?
Why would you do that? Please read xyproblem.info on how to ask more understandable questions.
I understand from your question that you built a Dapp and tested it using Ganache and Truffle frameworks. However, you wish to test your application on a testnet similar to 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. This enables you to test your dapp under mainnet conditions. 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
To deploy your contract on the local blockchain instance, you will simply need to use the RPC URL provided by this repository.
Yes, you can indeed.
Both GoQuorum and Besu allow you to create a completely gas-free network.
https://consensys.net/docs/goquorum/en/latest/concepts/free-gas-network/?h=gas
I would like to realise some secure multi party algorithms with a blockchain. Simple stuff like: Bob is sending a value to alice, alice is adding 5 and at the end everyone will get the result...
I found alot of Blockchain frameworks but I think, that Hyperledger will be the best for my needs.
Could I use Hyperledger Composer or would Fabric be the besser choice? Composer is building up on Fabric? But Composer seems easyer to use? Can I visualise my blockchain anyhow?
see this thread -> Chaincode using GO or Composer and this one -> Does Composer needs an already built Fabric network? for more information.
Hyperledger Fabric (the blockchain, which manages the endorsement/consensus of smart contracts) is designed to cater for your scenario and what gets written to the blockchain ledger, who needs to validate it etc by policy. This intro -> https://hyperledger.github.io/composer/latest/introduction/introduction.html should help you and this tutorial will compare Fabric and Composer as the means to develop your blockchain applications / smart contracts, especially the integration aspects that are needed by organisations -> https://blog.selman.org/2017/07/08/getting-started-with-blockchain-development/
I am learning blockchain technology. I read many tutorials and I got the basic idea of what blockchain is but I am confused with the fact that are there individual separate blockchains for separate DAPPs and the people who are using that DAPP, will only be the part of that DAPP's blockchain and what the blocks in Ethereum blockchain really contain ?
If anyone can clear my novice doubt, that would be very helpful.
Thanks in advance :)
A dApp, which is a decentralized application, may or may not have it's own blockchain. It depends.
For example, there's the Ethereum mainnet, which is public, and anyone can have their dApp interact with it. In this case the dApp doesn't have it's own blockchain.
However, anyone can fork or run their own copy of Ethereum, which in this case, it's a separately owned blockchain instance so it'll have it's down data and blocks not pegged to the public mainnet blockchain.
A DApp is a decentralized Application. This is usually a set made of:
a smart contract (your backend if you like)
some web frontend to interact with it (UI)
A specific smart contract is deployed on one or several chains. It depends what the author decided to do.
Regarding your frontend, you could implement it so it can interact with your smart contract on all the chains you support.
So if your smart contract is deployed on mainnet + testnet for instance, you could write your frontend to support both.
So a given DApp may support multiple chains but an author may also decide to write different Smart Contract + UI depending on the chain it is supposed to run on.
The most basic DAPP you'll write is a (javascript) frontend with a single Smart Contract stored on Ethereum as the backend. A Smart Contract is a Robot Account. It's a regular account WITH code AND storage.
When a transaction hits the Robot Account, the "Ethereum Machine" will start the robot and run its code. Maybe the robot will write to its storage, start other robots, etc. But this is still part of "THE" Blockchain, because it's just a transaction. Slightly more complicated than "move X$ from A to B", but still a simple transaction with a source, target and payload.
There's ONE Blockchain on Ethereum, it's a chain of Block. And a Block is a list of transactions. And a Transaction is a source, target and payload.
Once you start writing more complex DAPPs, maybe Ethereum won't be sufficient anymore. Maybe you need to store large files which is too expensive on Ethereum. That's where you may use other PLATFORMS, that are going to use their own Blockchain.
If you want more implementation details, checkout the Ethereum Yellow Paper:
"The Transaction" is described in section 4.3
"The Block" is described in section 4.4.
Each Smart Contract have their own Merkle Patricia Trie which ressemble a Blockchain but it's more of an implementation detail.
I wrote in more details about how Ethereum Storage works with gas & cost considerations & why you may want to use something else, I hope that can help you.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
As the developers are constantly using different network protocols of blockchain such as Hyperledger, multichain, Ethereum, Corda, and others. Community will appreciate if the developers & blockchain enthusiasts can pour in some key differences between various types of blockchains as mentioned above.
Thanks !
This is a good question, though not one easily addressed with a simple answer.
As #Mat0 commented above, one difference is the approaches that the various platforms are using to achieve consensus. Some use proof of work (PoW), others use variants of byzantine fault tolerant strategies (PBFT, SBFT, etc). Some use PAXOS derivative strategies. Hyperledger Sawtooth Lake has developed an innovative strategy named Proof of Elapsed Time (PoET). Some, such as Hyperledger Fabric allow pluggable consensus implementations to allow for experimentation and additional diversity.
Other platforms differ in the means by which they implement confidentiality of data and transaction execution.
Some such as Hyperledger Fabric, Hyperledger Sawtooth Lake, Corda, Ethereum and many others permit more comprehensive smart contract capabilities, while other platforms are very restrictive of the types of contract operations - such as the various platforms that only support the limited set of operations in the unspent transaction output (UTXO) protocol.
Some are more targeted to a specific use case, while others are more intended to be more general purpose. All are seeking to find ways to improve the various aspects of performance and scale.
Finally, some are intended to support permission-less public blockchain networks, while others are more oriented towards support for private, permissioned networks (consortia networks) where participation and membership is tightly controlled.
Hyperledger is focused on developing blockchain technologies suitable for use in the enterprise. The organization has been established to bring together related and even competing technologies in the expectation that the proximity and common governance will lead to interoperability and gradual consolidation.
Choosing a platform will demand significant research and a clear understanding of your use case and requirements and a good deal of experimentation. At the end of the day, there will be no easy answers.
To add to Chris's comment, with which I mostly agree, I'd expand on his comment about the "UTXO" model.
In our view (I'm the CTO of R3), one key design decision which distinguishes blockchain platforms is whether they use what I call the "replicated virtual machine" metaphor or whether they are based on the idea of transaction outputs (the "UTXO" model).
Mike Hearn wrote about this in the context of Corda's design: https://www.corda.net/2016/12/09/rationale-tradeoffs-adopting-utxo-style-model/
The key point I wanted to make, however, was that the UTXO model - at least as implemented in Corda - enables full-function code to be run... the set of supported operations is not in any way limited.
The differences become manifest mostly in the context of the non-functional characteristics of the platforms.
As Chris says, platform selection should be driven by use-case: I believe that the UTXO model we've used in Corda makes it particularly well-suited for a wide variety of financial services scenarios (that's why we made the choice to adopt that architecture!). But there is no one size that fits all.
Bitcoin technology stack — especially when enhanced with sidechains and payment channels (such as from Blockstream and Lightning Network).
Ethereum platform — currently the second most proven platform, behind the Bitcoin stack.
Hyperledger Fabric — a result of significant strategic investment from IBM and many others that is reaching into an installed base of large corporate customers.
R3 Corda — vertical-oriented blockchain technology (the company prefers "blockchain inspired" because it emphasizes significant differences between this private/permissioned ledger offering compared to the public/permissionless ledgers such as Bitcoin blockchain).
Digital Asset — another vertically focused blockchain technology that has high visibility in the financial services sector
While it is very difficult to predict the eventual winner given that it may not even be on the market, but it is possible to state what that winner will look like. Here are the 9 characteristics of a winning blockchain platform
Open source — this is necessary to cultivate a rich and diverse ecosystem and accelerate adoption through network effect.
Modular architecture with layers of programmability and customizability — as above, this cultivates an ecosystem and enables market adoption.
Global scale — scalability, performance and efficiency are essential if blockchain is to become the foundation for the "Internet of Money."
Multiple implementations of the core protocol — multiple, independently developed implementations ensure that the protocol is understood, well-defined and adds resistance to possible attacks (as occurred with the Ethereum platform in September 2016). This requires there to be an accurate and precise specification of the core protocol, as opposed to relying on one codebase that is not documented.
Hardened through public blockchain deployment — this is the only way to ensure that the system is secure and "bulletproof," by exposing it to the worst threats on the open internet, as has occurred with both the Bitcoin stack and the Ethereum platform.
Configurable for private blockchain deployment and support for confidentiality of transactions — because most businesses do not want their transactions to be visible by their competitors or by the rest of the world.
Functioning governance — there needs to be a cohesive decision-making structure that can respond in an agile and coherent manner to threats to the system.
Advanced smart contract capability — because the current generation of smart-contract technology relies on traditional languages (similar to Java or C#), which are inadequate for the rigorous requirements of large-value contracts (and are best supported by metadata-driven or mathematically verifiable programming systems).
Adequate tooling for developing, debugging, deploying, monitoring and managing smart-contract-based systems (the importance of which was underscored by the recent denial-of-service attacks on the Ethereum network).
Since 2008, when the term bitcoin was coined by Satoshi Nakamoto as a novel electronic and completely peer-to-peer cash system free of trusted third party, the interest in the bitcoin and blockchain technology has increased. Recognizing it as a revolutionizing technology across the industries, especially in banking and finance, in terms of transactions and their privacy and security, researchers are not leaving any stone unturned to come up with exotic protocols with each passing day and each is the newer, advancer and better protocol than the previous. In continuation to the blockchain series on TheBlockchainAcademy.com, I have included 6 major blockchain protocols, so as to embrace the technology and increase awareness among investors and end users of blockchain.
Hyperledger
Hyperledger is the open source blockchain platform, began in 2015 by the Linux Foundation, in an effort to support the blockchain-based distributed ledgers. The protocol focuses ledgers developed to support international business transactions, catering leading financial, technological and supply chain businesses, with the objective of improving a lot of performance and reliability aspects. The project emphasizes on making collaborative efforts for making open standards and protocols, by offering a modular framework that backs various components for diverse uses, including a range of blockchains having their own storage and consensus models, and the services for access control, contracts and identity.
Bitcoin
The starting of the bitcoin dates back to November 2008, when a thesis had been posted by Nakamoto on a US mailing list where the cryptographers share or exchange information. The thesis titled “Bitcoin: A peer-to-peer electronic cash system”, presented the following characteristics of this protocol:
Enables transaction directly with no need of any trusted third party
Enables the non-reversible transactions
Decreases credit cost in minor casual transactions
Decreases transaction fees
Prevents double-spending
Bitcoins are virtual currency, also called cryptocurrency. These are distributed while exploring the value in the data managed by software. The start of 2016 witnessed the issuance of around 15.26 million BTC, equivalent to around 7 billion US Dollars. Major technologies that make Bitcoin include hash, digital signature, public-key cryptography, P2P and Proof of Work. This blend has developed a mechanism that prevents duplication of payments and data falsification, additioinally a mechanism that prevents malicious users, which are critical for the operating system like the one for the electronic money, having no central authority.
Ethereum
Ethereum is a public, open-source and block chain oriented distributed computing protocol that features smart contracts (scripting) functionality. The protocol has provided a decentralized virtual machine called the Ethereum Virtual Machine (EVM), which carried out Turning-complete scripts by using a global network of public nodes and the token called ether, also referred to as gas. Gas is used for preventing the spam on networks and allocating the resources in proportion to the incentive provided by the request. Bloomberg explains Ethereum as shared software that is used by all; however, is tamperproof. Ethereum is also used as a protocol for decentralized applications, smart contracts and decentralized autonomous organizations, with a number of functioning applications developed on it by March 2016, New York Times says.
Ripple Consensus Network
The Ripple Transaction Protocol (RTXP), issued in 2012, has been developed upon an open-source distributed consensus ledger, Internet protocol, and native currency termed as XRP (ripples). Ripple enables instant, safe and almost free global financial transactions of any scale without any chargeback. The protocol is embraced being able to support tokens presenting cryptocurrency, fiat currency, commodity and any other value unit like mobile minutes, frequent flier miles etc. By the end of 2017, Ripple is expected to be the third-biggest cryptocurrency in terms of market capitalization, after the bitcoin and ethereum.
R3’s Corda
Corda by the Company R3 is the distributed ledger protocol that has been developed from the ground up for recording, supervising and synchronizing the financial agreements among regulated financial institutions. It is, by great deal, stimulated by, and captures the advantages of blockchain systems, with no design choices that turn blockchains unsuitable for a lot of banking scenarios. Corda’s design came up as a result of heavy analysis and prototyping with team members. It is now an open sourced protocol since the code matured further.
Symbiont Distributed ledger
This protocol was announced in October 2016 as a software development kit for the Assembly, which is the permitted distributed ledger part of Symbiont’s smart contracts system. Assembly is considered as the first distributed ledger suitable for institutional finance. It is a greatly secure, high performing Byzantine fault-tolerant distributed ledger, which can process a sustained 80,000 transactions every second in a local multi-node network. As stated by Co-founder of Symbiont, decentralized systems should no longer be slow and with Assembly, it has been fulfilled.
You can learn more about Blockchain and implementing your own Blockchain # IBM Blockchain 101: A quick-start developer guide
This is the subject of a number of recent academic papers, as the field expands rapidly.
These for example are based on Consensus in the Age of Blockchains:
Committee Formation - How the members of the committee are chosen, for example via proof-of-work, proof-of- stake,
trusted hardware etc
Consistency - The likelihood that the system will reach consensus on a proposed value; it can be either strong or weak
Incentive Model
Safety ( Transaction, Censorship Resistance, DoS Resistance)
Adversary models considered
Performance (Throughput, Scalability, Latency)
Exp. Setup
Code availability
See also Blockchain Consensus Protocols in the Wild.
The main thing that differentiate each different blockchain is the consensus algorithm. Some algorithms are meant for public chain (eg: bitcoin blockchain) whereas some algorithms are meant for permissioned network (eg: Ripple, Hashgraph).
I will be bold and say that Confidence Coin is perhaps the fastest blockchain technology in terms of broadcasting events.
Better encoding. Every time a new address is used in a transaction it is saved to the blockchain database, so next time it is spotted it replaced with a numeric value. Bitcoin can encode about 2K transactions in one megabyte of a block while Coco can have up to 100K transactions in same space.
The principal problem in blockchain P2P networks is their size, with each new node added to the system it takes more time to broadcast new blocks to everyone. There are 11,000 nodes in Bitcoin as of 2018. The source of Coco speed is in its Royal Network. It's called royal as in order to join the network you must mine a block. It allows only the best Pools to be part of the Royal Network. It's funny as in Bitcoin over 95% of the blocks mined by less than 20 Pools, but instead of direct communication between them, their messages traverse the entire 11,000 nodes.
Disclaimer: I am the developer of Coco.
There will be several difference between those blockchain projects:
Application: The specific application or domain they are focusing on. Some blockchain projects are public basic blockchains, like Ethereum, you can develop your own applications on it with the support of smart contract. While others may focus on certain domain, such as entertainment, storage, finance etc.
Consensus Protocol: as mentioned by others as well, different blockchain projects may use different consensus protocols, such as: PoW, PoS, DPoS, BFT, DBFT etc. So many consensus protocols were proposed. Although, honestly speaking, for now, only PoW works well for a long time.
TPS: it's actually related with the 2nd point, consensus protocol can certainly affect the performance/TPS, however, block design, and technologies like sharding, lightning network can significantly affect the TPS as well. Specific technologies used to improve scalability can also differentiate those projects.
Smart Contract: programming languages used to develop smart contract, whether the contract is secure, whether the development environment is user friendly, those are also the factors that should be considered to differentiate the blockchain projects.
This is a very broad question. In short each protocol was built with rules to potentially address a particular objective or business use case challenge.
So the answer to your question can be narrowed by differentiating the purpose for each protocol is built.
Blockchain protocol solves decentralized ledger
Ethereum protocol solves decentralized ledger ,enable decentralized applications and smart contracts
Ripple protocol solves not only decentralized ledger, smart contracts but also addresses speed and cheaper transactions
Hyperledger Fabric solves providing restricted access to decentralized ledger.
R3's corda solves decentralized ledger for financial sector with no need for mining
Therefore each protocol has logic and rules built trying to solve the primary objective it chose. However the underlying concept is still the blockchain for each of the protocols.
Hope this answers your question at high level.
I understand that the BigChainDB is a distributed DB at the basic level.
It claims that is solves the problem of Scalability in the BlockChain world. What i don't understand is that how it fits into the overall block chain architecture.
In the typical Block Chain world, each node has the full copy of the
data and validates any new transactions? How does this work in the
BigChain DB when the data is distributed? Each node validates only the
blocks that it holds? Even if thats the case, it needs the entire
chain? Not clear on the processing scalability here.
Can i build a block chain network just with the BigChainDB or do i
need something like Ethereum or Hyperledger to build the block chain
network itself?
If i can build the blockchain network with BigChainDB, then what is
the equivalent of smart contract in BigChainDB?
BigchainDB internally uses RethinkDB as a datastore. Technically, the blockchain is stored as JSON strings inside RethinkDB. And BigchainDB is a kind of wrapper on top of this storage which provides the needed cryptography, techniques for building the blocks, parsing the blocks and provides utility methods to access the database. RethinkDB provides clustered storage with possible shard based architecture. This makes BigchainDB scalable when RethinkDB is configured accordingly.
Yes. It is possible to build a blockchain network just with BigchainDB.
BigchainDB library provides APIs to be called from our code. So we can build any application(preferably in Python) and integrate BigchainDB into it. This means, the business logic stays inside our application code. This is totally different from Smart contracts used in Ethereum.
You can have a look at my github code for more insights. It is my college project and not much documentation is available :-D It is a voucher transfer application where company like Sodexo issue vouchers and users can redeem it in private companies like Starbucks.