Reader small image

You're reading from  Ethereum Smart Contract Development

Product typeBook
Published inFeb 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781788473040
Edition1st Edition
Languages
Right arrow
Author (1)
Mayukh Mukhopadhyay
Mayukh Mukhopadhyay
author image
Mayukh Mukhopadhyay

Mayukh Mukhopadhyay started his career as a BI developer. After the 2008-09 financial crisis, he was at Tata Consultancy Services for one of their Fortune 500 clients in the telecom sector. Holding a master's in software engineering from Jadavpur University, he is presently working as a data insight developer, where he focuses on applying data science and machine learning to raw telecom equipment logs to generate business insights. He has a varied list of academic interests, ranging from audio signal processing, structural bioinformatics, and bio-inspired algorithms to consciousness engineering. Apart from being an Oracle Certified Specialist, he is a Certified Bitcoin Professional, recognized by C4 (Crypto Currency Certification Consortium). He tries to apply blockchain as a technology to different business domains.
Read more about Mayukh Mukhopadhyay

Right arrow

Chapter 10. BaaS and the Dark Web Market

This chapter introduces you to various platforms specific to smart contract and blockchain development. We will begin with a discussion about private, consortium, and public blockchains on the permission spectrum. Then we will dive into the concept of blockchain-as-a-service (BaaS) and introduce enterprise platforms, such as Hyperledger, Azure, and AWS. We conclude this chapter by exploring the mysterious dark web marketplaces with notes on money laundering.

After studying this chapter, you will be able to:

  • Identify different types of blockchain
  • Understand the concept of blockchain-as-a-service
  • Understand Hyperledger, Azure, and AWS
  • Explore the dark web marketplaces

Playful privacy


You might have noticed that throughout the previous chapters, all of the examples were coded over a private blockchain, which we created using a genesis block in Chapter 3, Hello World of Smart Contracts. This was done because private blockchains are what industries prefer; apart from making things much easier to play around with, there is no need to wait for blocks or spend real money. Cryptocurrency such as ETH and ETC are on top of the Ethereum blockchain, which are completely different chain-types compared to our private chain. Confused?

Let us look into the different types of blockchains to understand this classification.

Types of blockchain


Before we dive into the types of blockchain, we must get familiar with the concept of the permission spectrum of distributed ledger technology aka DLT. A blockchain is a DLT and exists throughout the permission spectrum.

To understand the permission spectrum, we need to identify the two extreme ends of this spectrum. At one end, we have to seek complete permission from an entity to participate in a consensus, and at the other extreme, we do not have to seek any permissions whatsoever from any entity to participate in a consensus.

The interesting thing about the permissionless extreme is that we have no obligation to reveal our identity to anyone participating in the consensus. As we move toward complete permission, somewhere in the mid-spectrum of permission, this identity aspect needs to be revealed in order to participate in a consensus, just to validate our stakes in a consensus. As we arrive at the complete permission, we need to identify ourselves as well as take permission...

Blockchain-as-a-service


There is a diverse landscape of solutions and approaches to implement a blockchain. Figure 10.3 represents a broad classification of such approaches. Blockchain-as-a-service is an industry practice that merges the development platform approach with the IT services approach to provide tangible blockchain-based solutions to clients:

Figure 10.3: Blockchain implementation solution

We have seen in the previous chapters that we need several software components, such as geth, node.js, and Java runtime environments along with programming tools, such as, Solidity and web.js, on top of an operating system to develop a complete end-to-end, blockchain-based, decentralized application from scratch.

This is fine for making a new and highly customized product to a certain extent, but to implement a repeatable and scalable service, coding from scratch is equivalent to reinventing the wheel.

The big players in the cloud computing industry, such as IBM (Bluemix), Microsoft (Azure), and...

Enterprise platforms for BaaS


In this section, we will introduce a few enterprise platforms with BaaS offerings using three pointers. All these platforms provide a freemium version of the development platform to develop consortium blockchain-based applications.

IBM Hyperledger

Hyperledger was introduced in 2015 by the Linux foundation as an umbrella project to advance cross-industry blockchain technologies. Hyperledger Fabric is one of the blockchain projects that provides permissioned consortium blockchains, where users on the network must enroll through a membership service provider. IBM (BlueMix) has partnered with Hyperledger to offer BaaS to its customers. It has also been leveraged with the cognitive capabilities of IBM Watson to provide IoT-based solutions.

Microsoft Azure EBaaS

Initially, Microsoft collaborated with ConsenSys to offer Ethereum blockchain-as-a-service (EBaaS) on the Microsoft Azure cloud platform. Then they announced project Bletchley to provide consortium, blockchain...

Dark web marketplace


To really understand the dark web, we need to differentiate it from the normal web. By normal web, we imply the surface web that we browse using a web page address, or search using natural language typed into search engines, such as Google or Bing. There is yet another type of web called the deep web. Figure 10.4 depicts the three strata of the web using an iceberg analogy:

Figure 10.4: Web kernel diagram and iceberg analogy

In simple words, the surface web is anything on the internet that a search engine can find and index. The deep web is something a search engine cannot find. To understand intuitively how search engines find a page, we can do a manual exercise by going to any news channel website and then keep clicking on the articles as they come up.

So, we navigate throughout the article by clicking on some web links, which lands us to a new page of articles. This is what, in search engine parlance, is called web crawling. Now, there are many other sites such as Expedia...

Project smartCV


In this section, we are going to develop smart-contract-based curriculum vitae. Originally designed by Ryan Hendricks, a New-York based smart contract developer, this basic contract has two crucial modules:

  • Library (cvSection)
  • Contract (cvContract)

The contract can be further subdivided into three parts:

  1. Contract definition andconstructors
  2. New profile data module
  3. Edit profile data module

Figure 10.7 depicts the library function, which is made up of various Struct datatypes:

Figure 10.7: Library definition

Each structure definition inside the library has different set of arguments. Next, we see Figure 10.8, which depicts the contract definition:

Figure 10.8: cvContract definition

This contract is capable of managing multiple CVs from different persons. This is accomplished by the setProfile and getProfile modules. Figure 10.9 depicts the setProfile module:

Figure 10.9: New profile add module

In a similar fashion, Figure 10.10 depicts the get profile data, which is used to check after any...

Summary


The chapter started with a concept-enhancing discussion on private, consortium, and public blockchains. We saw that public blockchains are mostly permissionless by nature, while private blockchains are strictly permissioned. Hence, industries prefer the middle way of consortium blockchaining, to achieve a democracy among stakeholders. We then listed a few developmental platforms that help us in setting up such consortium blockchains. Hyperledger from IBM, Azure from Microsoft, and AWS Cloud promised us an exciting road map for consortium blockchains. We then explored the concepts of money laundering, and how dark web marketplaces have been used since the beginning of the cryptocurrency evolution to fuel this ever-increasing economic plague. We ended the chapter with a balanced note about how the concepts of smart contracts and blockchains have opened up a new set of Pandora's boxes, and how we as technologists, have the onus of squeezing out the goodness from them.

In Chapter 11,...

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Ethereum Smart Contract Development
Published in: Feb 2018Publisher: PacktISBN-13: 9781788473040
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Mayukh Mukhopadhyay

Mayukh Mukhopadhyay started his career as a BI developer. After the 2008-09 financial crisis, he was at Tata Consultancy Services for one of their Fortune 500 clients in the telecom sector. Holding a master's in software engineering from Jadavpur University, he is presently working as a data insight developer, where he focuses on applying data science and machine learning to raw telecom equipment logs to generate business insights. He has a varied list of academic interests, ranging from audio signal processing, structural bioinformatics, and bio-inspired algorithms to consciousness engineering. Apart from being an Oracle Certified Specialist, he is a Certified Bitcoin Professional, recognized by C4 (Crypto Currency Certification Consortium). He tries to apply blockchain as a technology to different business domains.
Read more about Mayukh Mukhopadhyay