# data[].attributes.body
Un'introduzione generale alla blockchain

# data[].attributes.attachment_link.description
Le transazioni sono raggruppate nei blocchi del blockchain e il numero di transazioni all'interno di ognuno di questi blocchi varia in base alla dimensione della transazione stessa. La dimensione della transazione, invece, varia in base al numero di input e di output della stessa. Un blocco è composto da due parti principali: l'header e il body.

# data[].attributes.body
Una migliore definizione di fiducia digitale

# data[].attributes.attachment_link.readable_text
"The practical consequence [...is...] for the first time, a way for one Internet user to transfer a unique piece of digital property to another Internet user, such that the transfer is guaranteed to be safe and secure, everyone knows that the transfer has taken place, and nobody can challenge the legitimacy of the transfer. The consequences of this breakthrough are hard to overstate." - Marc Andreessen
From a cruising altitude, a blockchain might not look that different from things you're familiar with, say Wikipedia.

With a blockchain, many people can write entries into a record of information, and a community of users can control how the record of information is amended and updated. Likewise, Wikipedia entries are not the product of a single publisher. No one person controls the information.

Descending to ground level, however, the differences that make blockchain technology unique become more clear. While both run on distributed networks (the internet), Wikipedia is built into the World Wide Web (WWW) using a client-server network model.

A user (client) with permissions associated with its account is able to change Wikipedia entries stored on a centralized server.

Whenever a user accesses the Wikipedia page, they will get the updated version of the 'master copy' of the Wikipedia entry. Control of the database remains with Wikipedia administrators allowing for access and permissions to be maintained by a central authority.

Wikipedia's digital backbone is similar to the highly protected and centralized databases that governments or banks or insurance companies keep today. Control of centralized databases rests with their owners, including the management of updates, access and protecting against cyber-threats.

The distributed database created by blockchain technology has a fundamentally different digital backbone. This is also the most distinct and important feature of blockchain technology.

Wikipedia's 'master copy' is edited on a server and all users see the new version. In the case of a blockchain, every node in the network is coming to the same conclusion, each updating the record independently, with the most popular record becoming the de-facto official record in lieu of there being a master copy.
Transactions are broadcast, and every node is creating their own updated version of events.
It is this difference that makes blockchain technology so useful - It represents an innovation in information registration and distribution that eliminates the need for a trusted party to facilitate digital relationships.

Yet, blockchain technology, for all its merits, is not a new technology.

Rather, it is a combination of proven technologies applied in a new way. It was the particular orchestration of three technologies (the Internet, private key cryptography and a protocol governing incentivization) that made bitcoin creator Satoshi Nakamoto's idea so useful.

The result is a system for digital interactions that does not need a trusted third party. The work of securing digital relationships is implicit - supplied by the elegant, simple, yet robust network architecture of blockchain technology itself.

Defining digital trust

Trust is a risk judgement between different parties, and in the digital world, determining trust often boils down to proving identity (authentication) and proving permissions (authorization). Put more simply, we want to know, 'Are you who you say you are?' and 'Should you be able to do what you are trying to do?' In the case of blockchain technology, private key cryptography provides a powerful ownership tool that fulfills authentication requirements. Possession of a private key is ownership. It also spares a person from having to share more personal information than they would need to for an exchange, leaving them exposed to hackers. Authentication is not enough. Authorization - having enough money, broadcasting the correct transaction type, etc - needs a distributed, peer-to-peer network as a starting point. A distributed network reduces the risk of centralized corruption or failure. This distributed network must also be committed to the transaction network's recordkeeping and security. Authorizing transactions is a result of the entire network applying the rules upon which it was designed (the blockchain's protocol). Authentication and authorization supplied in this way allow for interactions in the digital world without relying on (expensive) trust. Today, entrepreneurs in industries around the world have woken up to the implications of this development - unimagined, new and powerful digital relationshionships are possible. Blockchain technology is often described as the backbone for a transaction layer for the Internet, the foundation of the Internet of Value. In fact, the idea that cryptographic keys and shared ledgers can incentivize users to secure and formalize digital relationships has imaginations running wild. Everyone from governments to IT firms to banks is seeking to build this transaction layer.

Authentication and authorization, vital to digital transactions, are established as a result of the configuration of blockchain technology.

The idea can be applied to any need for a trustworthy system of record.
Authored by Nolan Bauerle; images by Maria Kuznetsov

# data[].attributes.attachment_link.title
What is Blockchain Technology? - CoinDesk

# data[].attributes.attachment_link.description
"The practical consequence [...is...] for the first time, a way for one Internet user to transfer a unique piece of digital property to another Internet user, such that the transfer is guaranteed to be safe and secure, everyone knows that the transfer has taken place, and nobody can challenge the legitimacy of the transfer.

# data[].attributes.body
Applicazioni immediate della blockchain

# data[].attributes.attachment_link.readable_text
You probably have heard of bitcoin and cryptocurrency by now. And as of late the term " Blockchain" has made huge splashes in the tech community.

It's the technology that underpins digital currencies and ensures that all transactions are properly conducted and recorded. But what is stored on the blockchain need not be just a monetary unit - it can be put to all manner of other interesting uses.

But, there is one underlying question most have.

What are the blockchain applications of the future?

As it turns out, more applications besides the currency can be developed to harness the technology. The following are five of the blockchain ideas that are in work in progress stage.
DISTRIBUTED CLOUD STORAGE
Blockchain data storage will become a massive disruptor shortly. (3-5 years)

Current cloud storage services are centralized -- thus you the users must place trust in a single storage provider. "They" control all of your online assets.

On the other hand with the Blockchain, this can become decentralized. For instance, Storj is beta-testing cloud storage using a Blockchain-powered network to improve security and decrease dependency. Additionally, users (you) can rent out their excess storage capacity, Airbnb-style, creating new marketplaces.

Anyone on the internet can store your data at a pre-agreed price. Hashing and having the data in multiple locations are the keys to securing it.

Storj.io and factom are two start-ups exploring this idea. After encrypting your data, it is sent out to a network with easy to track basic metadata.
DIGITAL IDENTITY
Imagine never having to worry about your digital security every again. It's a massive problem in the world.

Which is now estimated to cost the industry about $18.5 billion annually, according to a report released Thursday by Distil Networks.

That means for every $3 spent, $1 is going to ad fraud.

Blockchain technologies make tracking and managing digital identities both secure and efficient, resulting in seamless sign-on and reduced fraud.

Be it banking, healthcare, national security, citizenship documentation or online retailing, identity authentication and authorization is a process intricately woven into commerce and culture worldwide.

Remember what happened with Target?

The data breach at Target was significantly broader than originally reported: The company said that 70 million customers had information such as their name, address, phone number and e-mail address hacked in the breach.

Events such as hacked databases and breached accounts are shining the light on the growing problems of a technologically advanced society, without outpaced identity-based security innovations.

Blockchain technology offers a solution to many digital identity issues, where identity can be uniquely authenticated in an irrefutable, immutable, and secure manner. Current methods use problematic password-based systems of shared secrets exchanged and stored on insecure systems. Blockchain-based authentication systems are based on irrefutable identity verification using digital signatures based on public key cryptography. In blockchain identity authentication, the only check performed is whether or not the transaction was signed by the correct private key. It is inferred that whoever has access to the private key is the owner and the exact identity of the owner is deemed irrelevant.
Blockchain Identity Use Cases

Blockchain technology can be applied to identity applications in the following areas:

Digital Identities

Passports

E-Residency

Birth Certificates

Wedding Certificates

IDs

ShoCard is a digital identity that protects consumer privacy and is as easy to understand and use as showing a driver's license. It's optimized for mobile and so secure that a bank can rely on it.
SMART CONTRACTS
What if you could cut your mortgage rate, make it easier to update your will?

The world of smart contracts is fast approaching, but what are they?

These are legally binding programmable digitized contracts entered on the blockchain. What developers do is to implement legal contracts as variables and statements that can release of funds using the bitcoin network as a '3rd party executor', rather than trusting a single central authority.

For example, if two people want to exchange $100 at a specific time in future when a set of preconditions are met, the conditions, payout, and parties' details would be programmed into a smart contract. Once the defined conditions are met, funds would be released and sent to the appropriate party as per terms.

By giving computers control over contracts, we can make business more efficient and make the legal system more equitable.

"Smart contracts solve the problem of intermediary trust between parties to an agreement, whether that is between people transferring assets like gold, or executing decisions between two parties in a betting contract," explained Vitalik Buterin, a founder of Ethereum."
DIGITAL VOTING
The greatest barrier to getting electoral processes online, according to its detractors, is security. Using the blockchain, a voter could check that her or his vote was successfully transmitted while remaining anonymous to the rest of the world. In 2014, Liberal Alliance, a political party in Denmark, became the first organization to use blockchain to vote. With American voter turnout still shockingly low, distributed digital voting may represent a way to enfranchise non-participants.

Last year a team accredited to observe the 2013 municipal elections in Estonia - the only country to run Internet voting on a wide scale - revealed that they observed election officials downloading key software over insecure Internet connections, typing PINs and passwords in view of cameras, and preparing election software on vulnerable PCs. Norway also canceled trials of e-voting systems in local and national elections, concluding that voters' fears about their votes becoming public could undermine democratic processes. (Source: estoniaevoting.org)

Can you imagine what would happen to our governmental structures?

My hope is that Blockchain technologies will become the gold standard for all nations of the world shortly. It is time for our system and governments to become more transparent.
DECENTRALIZED NOTARY
One interesting feature of the blockchain is its timestamp feature. The whole network essentially validates the state of wrapped piece of data (called a hash) at a certain particular time. As a trustless decentralized network, it essentially confirms the existence of [something] at a stated time that is further provable in a court of law. Until now, only centralized notary services could serve this purpose.

Manuel Aráoz, a Buenos Aires, Argentina-based developer, who built Proof of Existence as a decentralized method of verification, a kind of cryptographic notary service explained:
"As the blockchain is a public database, it is a distributed sort of consensus; your document becomes certified in a distributed sort of way." HOW IT WORKS
Proof of Existence allows users to upload a file and pay a transaction fee to have a cryptographic proof of it included on the bitcoin blockchain. The actual data is not stored online and therefore does not risk unwanted publication of the user's material.

After anonymously uploading the document and paying the network fee, a hash of the document (or any other type of digital file) is generated as part of the transaction.

The Proof of Existence website shows recently uploaded files that have hashes on the block chain.

This, in effect, uses the public and ledger-like nature of the blockchain to store the proof of your file, which can later be verified should an issue of authorship or dating arise.
"Basically, by inserting the cryptographic hash of the document in a transaction, when that transaction is mined into a block, the block timestamp becomes the record's timestamp,"
- said Aráoz.

Just imagine never having to pay for notarization ever again: The world is evolving towards a value-based economy. Where, if you are not adding value to the whole, you are no longer needed. And it's about time. Too many old systems exist today that only leech off you instead of adding value in your life.
CONCLUSION
As mentioned above, most of these applications are still underdeveloped The future potential of the blockchain applications is still unraveling. The next couples of years will be all about experimenting and applying to all aspects of society. Regardless of which application comes first on a global scale. The bottom line is, Blockchain is here to stay and is transforming how our society functions.

# data[].attributes.attachment_link.title
5 Blockchain Applications That Are Shaping Your Future

# data[].attributes.attachment_link.description
You probably have heard of bitcoin and cryptocurrency by now. And as of late the term " Blockchain" has made huge splashes in the tech community. It's the technology that underpins digital currencies and ensures that all transactions are properly conducted and recorded.

# data[].attributes.body
Creare una blockchain, in Python

# data[].attributes.attachment_link.readable_text
Step 2: Our Blockchain as an API

We're going to use the Python Flask Framework. It's a micro-framework and it makes it easy to map endpoints to Python functions. This allows us talk to our blockchain over the web using HTTP requests.

We'll create three methods:

/transactions/new to create a new transaction to a block

/mine to tell our server to mine a new block.

/chain to return the full Blockchain.

Setting up Flask

Our "server" will form a single node in our blockchain network. Let's create some boilerplate code:

A brief explanation of what we've added above:

Line 15: Instantiates our Node. Read more about Flask here.

Line 18: Create a random name for our node.

Line 21: Instantiate our Blockchain class.

Line 24-26: Create the /mine endpoint, which is a GET request.

Line 28-30: Create the /transactions/new endpoint, which is a POST request, since we'll be sending data to it.

Line 32-38: Create the /chain endpoint, which returns the full Blockchain.

Line 40-41: Runs the server on port 5000.

The Transactions Endpoint

This is what the request for a transaction will look like. It's what the user sends to the server:

{
 "sender": "my address",
 "recipient": "someone else's address",
 "amount": 5
}

Since we already have our class method for adding transactions to a block, the rest is easy. Let's write the function for adding transactions:

The Mining Endpoint

Our mining endpoint is where the magic happens, and it's easy. It has to do three things:

1. Calculate the Proof of Work

2. Reward the miner (us) by adding a transaction granting us 1 coin

3. Forge the new Block by adding it to the chain

Note that the recipient of the mined block is the address of our node. And most of what we've done here is just interact with the methods on our Blockchain class. At this point, we're done, and can start interacting with our blockchain.

Step 3: Interacting with our Blockchain

You can use plain old cURL or Postman to interact with our API over a network.

Fire up the server:

$ python blockchain.py

* Running onhttp://127.0.0.1:5000/ (Press CTRL+C to quit)

Let's try mining a block by making a GET request to http://localhost:5000/mine:

Let's create a new transaction by making a POST request to http://localhost:5000/transactions/new with a body containing our transaction structure:

If you aren't using Postman, then you can make the equivalent request using cURL:

$ curl -X POST -H "Content-Type: application/json" -d '{
 "sender": "d4ee26eee15148ee92c6cd394edd974e",
 "recipient": "someone-other-address",
 "amount": 5
}' "http://localhost:5000/transactions/new"

I restarted my server, and mined two blocks, to give 3 in total. Let's inspect the full chain by requesting http://localhost:5000/chain:

Step 4: Consensus

This is very cool. We've got a basic Blockchain that accepts transactions and allows us to mine new Blocks. But the whole point of Blockchains is that they should be decentralized. And if they're decentralized, how on earth do we ensure that they all reflect the same chain? This is called the problem of Consensus, and we'll have to implement a Consensus Algorithm if we want more than one node in our network.

Registering new Nodes

Before we can implement a Consensus Algorithm, we need a way to let a node know about neighbouring nodes on the network. Each node on our network should keep a registry of other nodes on the network. Thus, we'll need some more endpoints:

1. /nodes/register to accept a list of new nodes in the form of URLs.

2. /nodes/resolve to implement our Consensus Algorithm, which resolves any conflicts-to ensure a node has the correct chain.

We'll need to modify our Blockchain's constructor and provide a method for registering nodes:

Note that we've used a set() to hold the list of nodes. This is a cheap way of ensuring that the addition of new nodes is idempotent-meaning that no matter how many times we add a specific node, it appears exactly once.

Implementing the Consensus Algorithm

As mentioned, a conflict is when one node has a different chain to another node. To resolve this, we'll make the rule that the longest valid chain is authoritative. In other words, the longest chain on the network is the de-facto one. Using this algorithm, we reach Consensus amongst the nodes in our network.

The first method valid_chain() is responsible for checking if a chain is valid by looping through each block and verifying both the hash and the proof.

resolve_conflicts() is a method which loops through all our neighbouring nodes, downloads their chains and verifies them using the above method. If a valid chain is found, whose length is greater than ours, we replace ours.

Let's register the two endpoints to our API, one for adding neighbouring nodes and the another for resolving conflicts:

At this point you can grab a different machine if you like, and spin up different nodes on your network. Or spin up processes using different ports on the same machine. I spun up another node on my machine, on a different port, and registered it with my current node. Thus, I have two nodes: http://localhost:5000 and http://localhost:5001.

I then mined some new Blocks on node 2, to ensure the chain was longer. Afterward, I called GET /nodes/resolve on node 1, where the chain was replaced by the Consensus Algorithm:

And that's a wrap... Go get some friends together to help test out your Blockchain.

# data[].attributes.attachment_link.title
Learn Blockchains by Building One - Hacker Noon

# data[].attributes.attachment_link.description
We're going to use the Python Flask Framework. It's a micro-framework and it makes it easy to map endpoints to Python functions. This allows us talk to our blockchain over the web using HTTP requests. We'll create three methods: /transactions/new to create a new transaction to a block /mine to tell our server to mine a new block.