Presentation is loading. Please wait.

Presentation is loading. Please wait.

Getting Started with Ethereum Private Blockchain

Similar presentations


Presentation on theme: "Getting Started with Ethereum Private Blockchain"— Presentation transcript:

1 Getting Started with Ethereum Private Blockchain
The blockchain is an undeniably ingenious invention. Ethereum is an open-source blockchain platform that allows anyone to build and use decentralized applications running on blockchain technology. Ethereum is a programmable blockchain - it allows users to create their own operations. The public blockchain is open to anyone who wants to deploy smart contracts and have their executions performed by public mining nodes. Bitcoin is one of the largest public blockchain networks today. As such, there is limited privacy in the public blockchain. A private blockchain can be set up within the safety confines of a private network within an organization. Hence, nodes participating in transactions are authenticated and authorized machines within the organizational network. This session highlights the fundamental information on the Ethereum Blockchain and the steps to get a private blockchain up and running. At the end of this session, you should be able to set up two or more running nodes on one local machine, build your first smart contract, send transaction between nodes, mine them and finally verify the results by making sure that all nodes have the same copies. Mystery Unravelled Mohamed Taman - Sr. Enterprise Architect / @_tamanm

2 me, i & myself You can find me here👇 Mohamed Taman
- Sr. Enterprise Architect / Sr. Software Engineer - Owner/CEO of SiriusX Innovations d.o.o. @_tamanm Lives and works in Belgrade, Serbia. Java Campions, Java Groundbreakers Ambassador JCP, and EGJUG Leader International Speaker, Author

3 What we goanna do here agenda Is the Blockchain, is the new Internet?
What is the Blockchain Technology? How it works? type of accounts & what is smart contract? Put it together

4 Is blockchain the new Internet?
The Architect, and the Blockchain is the value The Blockchain is an undeniably ingenious invention – the brainchild of a person or group of people known by the pseudonym, Satoshi Nakamoto. But since then, it has evolved into something greater, and the main question every single person is asking is: What is Blockchain? By allowing digital information to be distributed but not copied, Blockchain technology created the backbone of a new type of Internet. Originally devised for the digital currency, Bitcoin, the tech community is now finding other potential uses for the technology. Bitcoin has been called “digital gold,” and for a good reason. To date, the total value of the currency is close to $9 billion US. And Blockchain can make other types of digital value. Like the Internet (or your car), you don’t need to know how the Blockchain works to use it. However, having a basic knowledge of this new technology shows why it’s considered revolutionary. So, I hope you enjoy this. The Mysterious Man/Woman/Group Satoshi Nakamoto. By allowing digital information to be distributed but not copied, Blockchain technology created the backbone of a new type of Internet. Bitcoin has been called “digital gold,” and for a good reason. 

5 What is the Blockchain Technology?
Blockchain is a peer-to-peer distributed network, and is the core technology behind cryptocurrencies like bitcoin. It sounds complicated, but it helps to think of blockchain as a kind of open-source, digital ledger like Google Sheets. The same spreadsheet is shared with everyone in the chain and any computer running the software can access that ledger and record a transaction. The record is constantly updated live to reflect new transactions, and any transaction is verifiable in the public record. There’s no need to send two different copies of a record back and forth and try to reconcile them; the blockchain updates the same, universal record. “ The blockchain is an incorruptible digital ledger of economic transactions that can be programmed to record not just financial transactions but virtually everything of value. ”

6 Methodology, accounts & smart contract
How it works? Methodology, accounts & smart contract

7 Like this 🤓

8 Background A blockchain is a distributed computing architecture.
A blockchain is a distributed computing architecture where every node runs in a peer-to-peer topology, where each node executes and records the same transactions. These transactions are grouped into blocks. Each block contains a one-way hash value. Each new block is verified independently by peer nodes and added to the chain when a consensus is reached. These blocks are linked to their predecessor blocks by the unique hash values, forming a chain. In this way, the blockchain’s distributed dataset (a.k.a. distributed ledger) is kept in consensus across all nodes in the network. Individual user interactions (transactions) with the ledger are append-only, immutable, and secured by strong cryptography. Nodes in the network, in particular the public network, that maintain and verify the transactions (a.k.a. mining) are incentivized by mathematically enforced economic incentives coded into the protocol. All mining nodes will eventually have the same dataset throughout. Ethereum is an open-source blockchain platform that allows anyone to build and use decentralized applications running on blockchain technology. Ethereum is a programmable blockchain - it allows users to create their own operations. These operations, coded as Smart Contracts, are deployed and executed by the Ethereum Virtual Machine (EVM) running inside every node. The public blockchain is open to anyone who wants to deploy smart contracts and have their executions performed by public mining nodes. Bitcoin is one of the largest public blockchain networks today. As such, there is limited privacy in the public blockchain. Mining nodes in the public blockchain requires a substantial amount of computational power to maintain the distributed ledger at a large scale. In the Ethereum public blockchain, compiled versions of smart contract codes can be viewed openly. A private blockchain can be set up within the safety confines of a private network within an organization. Hence, nodes participating in transactions are authenticated and authorized machines within the organizational network. These blocks are linked to their predecessor blocks by the unique hash values, forming a chain. Nodes in the network, that maintain and verify the transactions (a.k.a. mining).

9 There are 2 types of accounts in Ethereum
Accounts & Contracts There are 2 types of accounts in Ethereum There are 2 types of accounts in Ethereum: External Account, which stores ETH balance – This contains the address of the User that was created using the Web3.js API, e,g, personal.newAccount(…). These accounts are used for executing smart contract transactions. ETH is your incentive received for using your account to mine transactions. The address of the account is the public key, and the password of the account is the private key. Contract Account, which stores ETH balance and has codes – This contains the address of an instance of Smart Contract codes. Instance(s) of smart contracts can be created programmatically or via Browser-Solidity using Web3 APIs. External account. Contract account.

10 Smart Contract Smart Contracts contain the program codes to be executed, and are analogous to a C++, C#, or Java class. It contains: States variables. Functions. Events. Smart Contracts are compiled to bytecodes. These bytecodes are deployed as instances of Smart Contracts in the Ethereum Virtual Machine (EVM).

11 Smart Contract creation
Contain the program codes to be executed, and contains: An instance of a Smart Contract is created by an External Account (or by the default account of the executing node): The creation process triggers a Transaction. The Transaction has to be mined to take effect. For example, later sections will show that you can check pending transactions using the API eth.pendingTransactions(). Mining is “competitively performed” by peer nodes. For example, later sections will show this by using the API miner.start(). On successful mining by a node, a new Block is created, which contains the Transaction and Contract Address. The mining node will broadcast the new Block to peer nodes. The new block will be validated and verified by peer nodes to be become an official block in their local blockchains. The new instance of the Smart Contract contains a unique address. This address must be saved, recorded, or registered. It will be retrieved for subsequent “contract execution.” States variables. Functions. Events. > eth.pendingTransactions() > > miner.start(1)

12 Smart contract execution
> var address =“0xc7caf784fae5840bdc893b03b7391fce6efb6190” > > var myContract = eth.contract(abi).at(address) > myContract.setTimeIn(“08:45”) > eth.pendingTransactions(). > miner.start(1) A Smart Contract contains functions that can be executed by an External Account or a Decentralized Application (DAPP). In the case of a DAPP, the executing node would have a default External Account. To execute a function defined in the Smart Contract, the DAPP retrieves a unique instance of the Smart Contract by its address. E.g. > var address =“0xc7caf784fae5840bdc893b03b7391fce6efb6190” > var myContract = eth.contract(abi).at(address) Functions that change the state(s) of a contract will trigger a Transaction. E.g. > myContract.setTimeIn(“08:45”) The Transaction has to be mined to take effect. For example, later sections will show that you can check pending transactions using the API > eth.pendingTransactions(). Mining is “competitively performed” by peer nodes. For example, later sections will show this by using the API miner.start(1). On successful mining by a node, a new Block is created, which contains the Transaction. The mining node broadcasts the new Block to peer nodes. The new block will be validated, verified, and its transaction executed locally by peer nodes to be become an official block in their local blockchains.

13 Put It Together Where’s the Glue Darling!?

14 Summary What we learned.
Learn about Blockchain basics, how it works and its main components. The fundamental information on the Ethereum Blockchain and the steps to get a private blockchain up and running. Set up two or more running nodes on one local machine, build your first smart contract. Send transaction between nodes, mine them and finally verified the results by making sure that all nodes have the same copies.

15 3- Top 10 Key Performance Techniques for Web and Hybrid Mobile Apps
1- Effective Design of RESTful APIs 2- Getting Started with Ethereum Private Blockchain 23/10 24/10 22/10 Session ID: DEV4349 Room: Moscone West - Room 2009 Start Time: 02:30:00 PM Session ID: DEV4346 Room: Moscone West - Room 2020 Start Time: 02:30:00 PM 1 3 Session ID: TUT4348 Room: Moscone West - Room 2018 Start Time: 08:45:00 PM 2

16 Experts in Modern Development
Cloud Microservices and Containers Java, JavaScript/Node.js, PHP, Python DevOps Continuous Delivery Open Source Technologies SQL/NoSQL Databases Machine Learning, AI, Chatbots developer.oracle.com/ambassador @groundbreakers


Download ppt "Getting Started with Ethereum Private Blockchain"

Similar presentations


Ads by Google