Pulling the Blockchain apart.. The Transaction Request

Edzo Botjes
Ignation
Published in
9 min readOct 9, 2017

Popping the hood of something magical

The core and purpose of the blockchain technology is that it stores transactions in such a way that it can be considered secure and true.

The guarantee that the transaction details are validated and sealed and thus can not be altered later on, is the Unique Selling Point of the blockchain.

In this blog I will focus on The Request of the Transaction.

We start with what a transaction is and how the integrity and security of the transaction is managed in the blockchain. This is limited to the transaction itself. The whole deal behind the blocks that are a collection of transactions and how the validity of a transaction is determined and how the majority of the blockchain computers determine that a transaction is ok and will be included in a block, etc . That is part of a next blog.

WHAT DEFINES A TRANSACTION?

There are various ways to define what a transaction is. If we know a bit what it is, then we have something to compare it to.

A transaction defined by an Accountant

  1. There must be two parties:
  2. The event must be measurable in terms of money:
  3. The event must result in transfer of property or service:
  4. The event must change the financial position of the business:

“Features of Business Transaction” http://www.accountingexplanation.com/features_of_transaction.htm

A transaction defined by an Enterprise Architect

  1. The initiating party issues a request, in which defines clearly the request of the initiating party.
  2. The executing party reviews the process and decides to or not to comply the request; Based on this decision the executing party is issuing a promise to the initiating party.
  3. After successful completion of steps 1 & 2, the executing party wil take the necessary activities to deliver on the promise that was being made.
  4. The result will be delivered to the initiating party for approval.
  5. The initiating party accepts the result or doesn’t.
  6. The end.

Bert Noorman “White paper pronto® BPM-Aanpak Sogeti” http://bankingreview.nl/download/22289

Why does the definition matter?

What we must know that if these two definitions are met, we are talking about a complete support of an transaction. This also implies that when your idea can not be mapped on the definition of a transaction, there is no need to look into blockchain support.

TRANSACTION OF VALUE

The idea that money is the only unit of value that can be exchanged in a transaction is off course a bit old and odd.

Money is only a digital number that symbolize trust of a value exchange. When there is trust and there is value then there is something available for a transaction. A nice read on this topic is the book “A History of Money: From Ancient Times to the Present Day” by Glyn Davies where the whole concept of Vallue equals trust is described by describing the history of money.

Accepting the value exchange concept has several dimensions. When we look purely at the exchange of the value representation, then the acceptance is delegated to the blochchain. The validity of the transaction will then be decided by a set of rules agreed upon by the participation at the network. When the exchange of the value representation is part of also an exchange of goods, then the should be an other process outside of the blockchain be available to handle a possible dispute.

For example when you use the blockchain to register the ownership of a house and the transaction is approved by the validation checks that are build into the blockchain. Then in the case of a dispute over the validity of the house, for example there are some big issues in the foundation of the building of which the previous owner never made any mention. In some countries this would make the exchange of house ownership invalid. This would imply that ownership and the representative value should be reversed. This can only be done by creating new transaction in the blockchain. Thus just like in the real world you need a process with a way of arbitrage that orders both parties to invoke the new transactions.

Hopefully this example shows that on the blockchain you need to know which specific exchange of value is recorded and what this implies for your real world process and business.

Back to the transaction in the blockchain

THE TRANSACTION LIFE CYCLE

Overall the sequence of steps are:

  1. Someone Requests a Transaction via something called a wallet.
  2. The transaction is send (broadcast) to all participation computers in the specific blockchain network.
  3. Every computer in the network checks (validate) the transaction against some validation rules that are set by the creators of the specific blockchain network.
  4. Validated transactions are stored into a block and are sealt with a lock (hash).
  5. This block becomes part of the blockchain when other computers in the network validate if the lock on the block is correct.
  6. Now the transaction is part of the blockchain and can not be altered in any way.

The trick here is that the implementation per step should guarantee integrity, security and anonymity. I will go through the steps one by one.

REQUEST A TRANSACTION

Let us imagine that Alice does want to transfer some money to Bob. Or to make it more fitting for every possible scenario: Alice want to transfer ownership of a thing to Bob. What could go wrong during this transaction?

http://chimera.labs.oreilly.com/books/1234000001802/ch02.html#_common_transaction_forms

What are threats for a Transaction between Alice and Bob?

  1. Alice does not want to loose extra units to somebody else.
    It would be a bad thing when the transaction is altered in such a way that it also sends value unites to others. For example that when Alice sends 100 units to Bob, that not someone is changing it and is sending 200 units to Erik and then Erik sends 100 units to bob. In stead of piggy backing it would also not be so fine when 200 units are deducted from Alice and 100 units are send to Bob and separate 100 units are send to Eric (integrity).
  2. Alice is the only one that can OK transactions.
    The transaction should not be forged. When Alice sees 100 units are deducted from her total amount, but that she did not send the OK for this transaction (initialization), things have gone wrong.
  3. Alice needs to be certain that Bob received the correct amount of units.
    What if when the transaction is changed to send another amount, so that instead of 100 units are send to Bob 110 units are send. (integrity).
  4. Alice needs to be sure that Bob will receive the correct amounts and not somebody else.
    What if when the transaction is changed to send the amount to somebody else, so that instead of 100 units are send to Bob, those units are send to Patricia (integrity).
  5. Alice needs to be sure that Bob knows she has send him the transaction and not somebody else.
    Usually a transaction is an exchange of value units for services or goods. So it is important to know that the transaction was initiated by a specific person. Otherwise you can change the Name of Alice in the transaction to Michael, and retrieve the goods from Bob while pointing to the transaction on your name.
  6. Alice needs to know that Bob has received the transaction.
    Sending something in value in a transaction with the intent to get something back for it in return, implies that it is an important feature to know when the value units has been received. Otherwise you can get a long game of yes-no ping pong.

To summarize the transaction requirements

  1. Alice and Bob need to be able to identify themselves in such a way that identity theft is not possible
  2. The transaction between Alice and Bob need to be protected in such a way that both Alice and bob know that no one could have tampered with the content.
  3. The transaction between Alice and Bob needs a way of communicating that both parties can determine the status of the transaction to validate if it is started, validated and completed.

Secure Identity & Securing a message

The way to do this, is by using a complex crytpography method. This is called PGP wich stands for Pretty Good Privacy. It works with a public password (public key) that everybody may know, and a private password (private key) that only the owner may know. There is a way to send messages between two persons, that are unreadable for everybody execpt the reciever. And you can sign the message that is being send, in such a way that only the sender could have send it.

“PGP supports message authentication and integrity checking.” — https://en.wikipedia.org/wiki/Pretty_Good_Privacy#Digital_signatures

If you want to learn more about PGP I can advice reading the Wikipedia page and looking at this page of the Electronic Frontier Foundation “An Introduction to Public Key Cryptography and PGP

Implementing PGP also includes some nice methods for sharing keys.

Start the Transaction Request!

When Alices orders a cup of coffee from Bob, Bob wil present an address (for example via a QR code), to Alice. In this QR code an address, description and amount are enclosed. By entering this information into her wallet app, Alice will continue the transaction with the request of Bob.

In the Book “Mastering Bitcoin” they describe this as follows

Transaction Chains

Alice’s payment to Bob’s Cafe uses a previous transaction’s output as its input. In the previous chapter, Alice received bitcoin from her friend Joe in return for cash. That transaction created a bitcoin value locked by Alice’s key. Her new transaction to Bob’s Cafe references the previous transaction as an input and creates new outputs to pay for the cup of coffee and receive change. The transactions form a chain, where the inputs from the latest transaction correspond to outputs from previous transactions. Alice’s key provides the signature that unlocks those previous transaction outputs, thereby proving to the bitcoin network that she owns the funds. She attaches the payment for coffee to Bob’s address, thereby “encumbering” that output with the requirement that Bob produces a signature in order to spend that amount. This represents a transfer of value between Alice and Bob. — https://github.com/bitcoinbook/bitcoinbook/blob/8d01749bcf45f69f36cf23606bbbf3f0bd540db3/ch02.asciidoc

Securing all trancactions via the Blocks in Blockchain

When we know what defines a safe transaction, and we know now that PGP is used to secure the transaction itself, we can take a peek into the next fase The sending of the transaction. This off course also should be safe. Below a small insight in securing the blocks containing transactions using PGP.

As you might know the principle of a blockchain is that transactions are grouped together in blocks. These blocks are linked together with fingerprints of the previous blocks, creating a daisy chain of blocks containing a collection of transactions

This fingerprint (hash) is an addition to the PGP methods to secure the transaction. The hash ensures that the content of the blok of transactions can not be altered without influencing the hash, and on the other hand, the complete set of transactions are connected together.

Note that not the whole of the contents of the transaction will be encrypted. Because some data needs to be public readable for all the computers in the network to validate the transaction. More on this in the next blog(s).

Summarizing the security of the transactions

http://nakamotoinstitute.org/bitcoin/

Bitcoin supports extra Multi Signature Security.

Not really part of the scope of this blog, but since Bitcoin is an implementation of the Blockchain I take a quick side step. At bitcoin not only Alice and Bob are using PGP for their authentication but also Bitcoins have an public and private key. There is an option to place the private key on various places so that an hacker can not retrieve the private key of the bitcoin. This is similar to the horcruxes of Voldemort in the Harry Potter stories that where placed in various places so that Voldemort could live on.

https://www.slideshare.net/HowardAnglin/tutorial-blockchain-technicaloverviewss-66485781
https://www.bloomberg.com/news/articles/2016-08-17/the-wretched-endless-cycle-of-bitcoin-hacks

Summary of Requests a Transaction

In this blog I provided you with a list of attributes of what makes something a transaction and what makes a transaction a safe transaction. The key takeaways should be, in my opinion, that Identity Management and data Integrity are most important to have covered in the blockchain implementation. But this is only the start. We just discussed how to send data in a safe way. Now we are getting to the good part. What makes a network an network. Who can participate? What ensures that people will not forge information? etc.

NEXT STOP : THE TRANSACTION IS SEND

--

--

Edzo Botjes
Ignation

A Shrek look a like and loves Coffee, Roadtripping, Zen, IT, Enterprise Engineering, SMACT, Group Dynamics, Business & IT Innovation, Food & American Football