1. In many cases of
blockchain commercial application, we can always see the word baas. Baas is the abbreviation of blockchain as a service, which is translated into "blockchain as a service" in Chinese. So what is blockchain as a service baas? With this question, we will follow Xiao Wang of Renren blockchain technology team to discuss it carefully
according to Xiao Wang, the concept of blockchain as a service (baas) is mainly proposed by Microsoft and IBM. To put it bluntly, it is actually a new type of cloud service, a cloud service combined with blockchain technology. For example, Microsoft's azure cloud computing platform and IBM's bluemix garage cloud platform all provide blockchain as a service baas
blockchain as a service (baas) is a space created by enterprises such as Microsoft and IBM from their own cloud service network to run a blockchain node. Compared with ordinary nodes and exchange nodes, the main purpose of baas nodes is to quickly establish the development environment they need, and provide a series of operation services based on blockchain, such as search query, transaction submission, data analysis, etc. these services can be centralized or decentralized to help developers verify their concepts and models faster. The service of baas node is reflected in: it is more instrumental and easy to create, deploy, run and monitor blockchain.
2. what is Ethereum:
Ethereum is an innovation based on the application of technologies and concepts in bitcoin to computers. Ethereum itself imitates a lot of bitcoin technology to maintain the computer platform. Blockchain technology is one of them
Ethereum platform can safely run any program users want
advantages of Ethereum over other competitive currencies before Ethereum appeared, some digital currencies imitated bitcoin. However, these projects have their own shortcomings, they can only support one or several specific applications at the same time< However, the reason why Ethereum can surpass the limitations of these projects in the past is because of the core idea of Ethereum
what Ethereum wants to implement is a blockchain protocol with built-in programming language. Since it supports programming language, in theory, any blockchain application can be defined with this language, and then run on Ethereum's blockchain protocol as an application
The design of Ethereum is very flexible and adaptable
Ethereum target sets the advantages of blockchain technology, in order to add the advantages of blockchain, such as decentralization, openness and security, to almost all computing fields
blockchain applications of Ethereum
Ethereum has many blockchain applications, such as digital applications of gold and stocks, financial derivatives applications, DNS and digital authentication, etc
Ethereum has achieved more than 100 blockchain applications by many start-ups
Ethereum has also been closely watched by some financial institutions, banking consortia (such as R3), as well as large companies like Samsung, Deloitte, RWE and IBM. As a result, a number of blockchain applications such as simplified and automated financial transactions, merchant loyalty index tracking, and gift cards designed to achieve decentralization of electronic transactions have emerged
the relationship between Ethereum and blockchain:
Ethereum is a programmable blockchain
Ethereum does not give users a series of preset operations (such as bitcoin transaction), but allows users to create complex operations according to their own wishes
in this way, Ethereum can be used as a platform for various types of decentralized blockchain applications, including but not limited to cryptocurrency
like other blockchains, Ethereum also has a peer-to-peer network protocol. Ethereum blockchain database is maintained and updated by many nodes connected to the network. Each network node runs the Ethereum simulator and executes the same instructions. Therefore, people sometimes call Ethereum "world computer"
3. 1. Bitcoin 2, Ethereum: Ethereum is a kind of digital token of Ethereum, which is regarded as "bitcoin version 2.0". Using blockchain technology different from bitcoin, "Ethereum" developers need to pay Ethereum (ETH) to support the operation of the application. Like other digital currencies, they can be traded on trading platforms. 3.
lettercoin: lettercoin (LTC, currency symbol:?) It is a kind of network currency based on "point-to-point" technology and an open source software project under MIT / X11 license. It can help users make instant payments to anyone in the world. 4. Dogcoin: dogcoin, known as "dogcoin / dogcoin", was born on December 8, 2013. Based on the crypt algorithm, dogcoin is the second largest
virtual currency in the world after bitcoin in terms of number of users. 5. Yuan Bao coin: Yuan Bao coin is a virtual
digital currency similar to bitcoin. The founder of yuanbaocoin is a group of bitcoin enthusiasts and the earliest supporters. However, after seeing the problem of bitcoin, he decided to do his best to develop an electronic currency suitable for Chinese people with the latest technology. 6. Diandiancoin: "ppcoin was pre released by sunny king on August 11, 2012 and officially released on August 19, 2012. Ppcoin's biggest innovation is that its
mining method combines POW workload proof and POS equity proof. POS mining method only needs ordinary computers and clients to process transactions and maintain network security, so as to achieve the purpose of energy saving and security. 7. Katecoin: katecoin (KTC for short) is a virtual P2P digital currency that can be used all over the world. Point to point transmission means a decentralized payment system. 8. Quark coin: Based on six encryption algorithms (black, BMW, groestl, JH, keccak, skein), 9 rounds of super secure hash operation of virtual currency, 3 rounds of application of random hash function, quark coin has unique technical specifications. 9. Infinity coin: Infinity coin (IFC) is a new digital currency, which has more circulation advantages than bitcoin, and fills the short board of bitcoin in the field of commercial circulation and promoting commercial operation. 10. Common coin: common coin, English name popular coin, short for POC, was born on March 7, 2014. The total POC is close to the world population (7.057 billion).
4. Blockchain platform, do you want to see blockchain information? Here is Amway password finance, general chain circle, coin circle, DAPP and other information.
5. Blockchain technology belongs to the software development instry. If the technology is in place, it's certainly not difficult. Otherwise, if you don't know anything about it, it's extremely difficult. You can measure your own level and outsource if you can't
6. IBM, Microsoft, Oracle, Accenture, Tencent, Alibaba, Jingdong, network, etc. have all done it. Many large banks, including Ping An Bank, have also launched their own blockchain solution platforms or solutions. However, it should be added that large companies do not mean strong technical strength, because blockchain is still in the hot stage of concept in the world. Unicorn blockchain companies are likely to emerge in the future, such as EOS in foreign countries and honeycomb chain of Fanrong technology in China. The efficiency of TPS and packing into blocks may be much higher than that of large companies.
7. If bitcoin represents blockchain version 1.0, it proves to the world that digital currency can be realized. Then Ethereum represents blockchain version 2.0, which lets you know more about the play of blockchain, decentralized applications and smart contracts. In 2018, blockchain will enter the stage of 3.0, application and scenario landing will be the core of blockchain, and blockchain based applications in various instries will spring up, which will be the early dividend period of the last stage of blockchain development. The demand for talents driven by the application of blockchain technology has become increasingly large. Blockchain technical talents have become the new professional talents, which are highly competitive, and also have enviable high salaries
whether to form a meaningful large-scale consensus: one of the outstanding advantages of blockchain is that it can effectively form a large-scale consensus by opening account books and notifying the whole network. At present, there is no need to form a network wide consensus for many projects. Some projects are just for crowdfunding and token issuance. The blockchain consensus of projects is meaningless. Does this model have network effect: network effect means that a project will become more and more valuable with more and more users of the project, because the value of the project is not in the users themselves, but in the connection network between users. Bitcoin is a typical example. The more user nodes there are, the more links between nodes will grow exponentially, and the whole ecosystem of bitcoin will be more valuable
of course, in addition to these points, there are many basic principles to judge the project, such as effective incentive mechanism, strong team, project solving pain points, and so on
8. <span style="font-family:Arial, Helvetica, sans-serif;">'use strict';</span>var CryptoJS = require("crypto-js");var express = require("express");var bodyParser = require('body-parser');var WebSocket = require("ws");var http_port = process.env.HTTP_PORT || 3001;var p2p_port = process.env.P2P_PORT || 6001;var initialPeers = process.env.PEERS ? process.env.PEERS.split(',') : [];class Block { constructor(index, previousHash, timestamp, data, hash) { this.index = index; this.previousHash = previousHash.toString(); this.timestamp = timestamp; this.data = data; this.hash = hash.toString(); }}var sockets = [];var MessageType = { QUERY_LATEST: 0, QUERY_ALL: 1, RESPONSE_BLOCKCHAIN: 2};var getGenesisBlock = () => { return new Block(0, "0", 1465154705, "my genesis block!!", "");};var blockchain = [getGenesisBlock()];var initHttpServer = () => { var app = express(); app.use(bodyParser.json()); app.get('/blocks', (req, res) => res.send(JSON.stringify(blockchain))); app.post('/mineBlock', (req, res) => { var newBlock = generateNextBlock(req.body.data); addBlock(newBlock); broadcast(responseLatestMsg()); console.log('block added: ' + JSON.stringify(newBlock)); res.send(); }); app.get('/peers', (req, res) => { res.send(sockets.map(s => s._socket.remoteAddress + ':' + s._socket.remotePort)); }); app.post('/addPeer', (req, res) => { connectToPeers([req.body.peer]); res.send(); }); app.listen(http_port, () => console.log('Listening http on port: ' + http_port));};var initP2PServer = () => { var server = new WebSocket.Server({port: p2p_port}); server.on('connection', ws => initConnection(ws)); console.log('listening websocket p2p port on: ' + p2p_port);};var initConnection = (ws) => { sockets.push(ws); initMessageHandler(ws); initErrorHandler(ws); write(ws, queryChainLengthMsg());};var initMessageHandler = (ws) => { ws.on('message', (data) => { var message = JSON.parse(data); console.log('Received message' + JSON.stringify(message)); switch (message.type) { case MessageType.QUERY_LATEST: write(ws, responseLatestMsg()); break; case MessageType.QUERY_ALL: write(ws, responseChainMsg()); break; case MessageType.RESPONSE_BLOCKCHAIN: handleBlockchainResponse(message); break; } });};var initErrorHandler = (ws) => { var closeConnection = (ws) => { console.log('connection failed to peer: ' + ws.url); sockets.splice(sockets.indexOf(ws), 1); }; ws.on('close', () => closeConnection(ws)); ws.on('error', () => closeConnection(ws));};var generateNextBlock = (blockData) => { var previousBlock = getLatestBlock(); var nextIndex = previousBlock.index + 1; var nextTimestamp = new Date().getTime() / 1000; var nextHash = calculateHash(nextIndex, previousBlock.hash, nextTimestamp, blockData); return new Block(nextIndex, previousBlock.hash, nextTimestamp, blockData, nextHash);};var calculateHashForBlock = (block) => { return calculateHash(block.index, block.previousHash, block.timestamp, block.data);};var calculateHash = (index, previousHash, timestamp, data) => { return CryptoJS.SHA256(index + previousHash + timestamp + data).toString();};var addBlock = (newBlock) => { if (isValidNewBlock(newBlock, getLatestBlock())) { blockchain.push(newBlock); }};var isValidNewBlock = (newBlock, previousBlock) => { if (previousBlock.index + 1 !== newBlock.index) { console.log('invalid index'); return false; } else if (previousBlock.hash !== newBlock.previousHash) { console.log('invalid previoushash'); return false; } else if (calculateHashForBlock(newBlock) !== newBlock.hash) { console.log(typeof (newBlock.hash) + ' ' + typeof calculateHashForBlock(newBlock)); console.log('invalid hash: ' + calculateHashForBlock(newBlock) + ' ' + newBlock.hash); return false; } return true;};var connectToPeers = (newPeers) => { newPeers.forEach((peer) => { var ws = new WebSocket(peer); ws.on('open', () => initConnection(ws)); ws.on('error', () => { console.log('connection failed') }); });};var handleBlockchainResponse = (message) => { var receivedBlocks = JSON.parse(message.data).sort((b1, b2) => (b1.index - b2.index)); var latestBlockReceived = receivedBlocks[receivedBlocks.length - 1]; var latestBlockHeld = getLatestBlock(); if (latestBlockReceived.index > latestBlockHeld.index) { console.log('blockchain possibly behind. We got: ' + latestBlockHeld.index + ' Peer got: ' + latestBlockReceived.index); if (latestBlockHeld.hash === latestBlockReceived.previousHash) { console.log("We can append the received block to our chain"); blockchain.push(latestBlockReceived); broadcast(responseLatestMsg()); } else if (receivedBlocks.length === 1) { console.log("We have to query the chain from our peer"); broadcast(queryAllMsg()); } else { console.log("Received blockchain is longer than current blockchain"); replaceChain(receivedBlocks); } } else { console.log('received blockchain is not longer than received blockchain. Do nothing'); }};var replaceChain = (newBlocks) => { if (isValidChain(newBlocks) && newBlocks.length > blockchain.length) { console.log('Received blockchain is valid. Replacing current blockchain with received blockchain'); blockchain = newBlocks; broadcast(responseLatestMsg()); } else { console.log('Received blockchain invalid'); }};var isValidChain = (blockchainToValidate) => { if (JSON.stringify(blockchainToValidate[0]) !== JSON.stringify(getGenesisBlock())) { return false; } var tempBlocks = [blockchainToValidate[0]]; for (var i = 1; i < blockchainToValidate.length; i++) { if (isValidNewBlock(blockchainToValidate[i], tempBlocks[i - 1])) { tempBlocks.push(blockchainToValidate[i]); } else { return false; } } return true;};var getLatestBlock = () => blockchain[blockchain.length - 1];var queryChainLengthMsg = () => ({'type': MessageType.QUERY_LATEST});var queryAllMsg = () => ({'type': MessageType.QUERY_ALL});var responseChainMsg = () =>({ 'type': MessageType.RESPONSE_BLOCKCHAIN, 'data': JSON.stringify(blockchain)});var responseLatestMsg = () => ({ 'type': MessageType.RESPONSE_BLOCKCHAIN, 'data': JSON.stringify([getLatestBlock()])});var write = (ws, message) => ws.send(JSON.stringify(message));var broadcast = (message) => sockets.forEach(socket => write(socket, message));connectToPeers(initialPeers);initHttpServer();initP2PServer();
9. Find a central controller