Blockchain tutorial

Laborator
7/10 (1 vot)
Domeniu: Calculatoare
Conține 1 fișier: doc
Pagini : 4 în total
Cuvinte : 773
Mărime: 33.28KB (arhivat)
Publicat de: Iuliana M.
Puncte necesare: 0

Extras din laborator

Blockchain consists of blocks of data connected through the use of cryptography. It belongs to a network of nodes connected over the public network.

The fundamental units of a blockchain are blocks. A single block can encapsulate several transactions or other valuable data:

Fig. 1. Transactions inside a single block

Generating the hash value of a block is called “mining” the block. The hash of a block typically consists of the following data:

- Primarily, the hash of a block consists of the transactions it encapsulates

- The hash also consists of the timestamp of the block's creation

- It also includes a nonce, an arbitrary number used in cryptography

- Finally, the hash of the current block also includes the hash of the previous block

All nodes in the network participate in verifying a newly mined block.

Fig. 2. Adding a block into Blockchain

A newly mined block is added into the blockchain on the consensus of the nodes. There are several consensus protocols available which we can use for verification. The nodes in the network use the same protocol to detect malicious branch of the chain. Hence, a malicious branch even if introduced will soon be rejected by the majority of the nodes.

Consider the following block implementation:

public class Block {

private String hash;

private String previousHash;

private String data;

private long timeStamp;

private int nonce;

public Block(String data, String previousHash, long timeStamp) { this.data = data;

this.previousHash = previousHash;

this.timeStamp = timeStamp;

this.hash = calculateBlockHash();

}

// standard getters and setters

}

Where:

- Hash of the previous block, an important part to build the chain

- The actual data, any information having value, like a contract

- The timestamp of the creation of this block

- A nonce, which is an arbitrary number used in cryptography

- Finally, the hash of this block, calculated based on other data

Preview document

Blockchain tutorial - Pagina 1
Blockchain tutorial - Pagina 2
Blockchain tutorial - Pagina 3
Blockchain tutorial - Pagina 4

Conținut arhivă zip

  • Blockchain tutorial.doc

Alții au mai descărcat și

Arhitectura calculatoarelor

Scopul lucrării a) Elemente de limbaj de asamblare. b) Instructiuni de transfer. c) Instructiuni aritmetice. Desfășurarea lucrării...

Ce este un site wiki

Deschizând site-ul http://webtools4u2use.wikispaces.com/Wikis și verificând categoriile ce pot fi folosite într-o lecție pentru a alege un...

Seminar 4 Python

Exemplu instalare pachet scikit-learn Din https://pypi.org/project/scikit-learn/ copiem pip install scikit-learn În Command Prompt:...

Securitatea rețelelor VPN

I. Prezentarea rețelelor VPN O rețea privată virtuală (VPN) este o conexiune criptată de rețea care folosește un tunel sigur între capete, prin...

Baze de Date

Am ales ca tema crearea unei baze de date pentru un liceu, acesta va include cinci tabele: Profesori, Clase, Elevi, Note si Prezente. Tabela...

Laboratoare programarea orientată pe obiecte

1. Obiective - Formarea unei imagini generale, preliminare, despre programarea orientată pe obiecte (POO) și deprinderea cu noile facilitați...

Mentenanța echipamentelor periferice

TEMA 1 Norme și reguli ergonomice cu privire la protecția muncii în activitățile de asamblare și depănare a calculatoarelor personale. Ergonomia...

Algoritmi Simetrici de Criptare. Algoritmul AES

Noţiuni generale: Criptografia a devenit azi unul dintre domeniile dinamice de cercetare ştiinţifică datorită aplicaţiilor ei în securitatea...

Ai nevoie de altceva?