Update # 3 - 10th October 2018
Published by Barry McLaughlin on 10 October 2018>Read More
Exploring a Blockchain
Published by Barry McLaughlin on 05 October 2018>Read More
Update #2 - 1st August 2018
Published by Kevin O'Sullivan on 01 August 2018>Read More
Update #1 - 18th July 2018
Published by Kevin O'Sullivan on 18 July 2018>Read More
Exploring a Blockchain
Published on 05 October 2018 by Barry McLaughlin, Lead Architect, Advanced Technology Office, SITA Lab
In this post, we’ll dig a little more under the hood of our blockchain network (see introductory post for a bit of background on what we’re trying to achieve).
Note: Screenshots and descriptions below are based on a Hyperledger Fabric Blockchain network running the FlightChain application (a reference distributed app created by SITA and available on gitlab). Many of the concepts covered below may exist or have equivalence in alternative blockchain platforms which I will note when relevant.
Hyperledger provides a handy explorer tool that can help visualize what’s happening on the blockchain…so let’s have a look:
Let’s look more closely at some items in the screenshot:
Hyperledger Fabric is a permissioned network (all participants have known identities) in contrast to the deliberately permissionless nature of, say, bitcoin or Ethereum. Furthermore, fabric allows the possibility of creating separate channels on which only a subset of participants may transact. It’s possible to create many different channels and the deployed code (see below) and transactions are private to each channel’s participants. For all practical purposes, each channel can be considered a separate blockchain on the network.
’Chaincode‘ is the fabric terminology for ’smart contract‘ used in other platforms – though some argue that ’dumb script‘ is a more accurate term! It contains the business specific logic/rules that define the behaviour of a distributed application on the blockchain. In any case, in the fabric world, chaincode is deployed in the context of a channel. A copy of the code is deployed on each peer node in the channel. Deploying chaincode involves performing a blockchain transaction (a deploy transaction on the system chaincode LCCC, if you must know!) meaning that there’s a full versioned history of the code on the blockchain and updates to the code are subject to endorsement/consensus rules just like other blockchain transactions.Figure 2: Chaincode (smart contracts) deployed on Fabric network
Having defined our channel and deployed our chaincode, we are ready to start interacting with it. The interactions are in the form of a query (read operation) or invoke (write operation). We’ll go into a bit more detail on what happens in a transaction in a future post but for now, let’s just say invoking chaincode is a two-step process and before anything ends up on the blockchain it has to be endorsed by the parties in the channel.Figure 3: A FlightChain transaction
Chaincode invocations and their results are recorded as blockchain transactions which are grouped in to blocks. If the transactions are sufficiently apart in time, they will end up in separate blocks (i.e. one per transaction). If multiple transactions occur in quick succession they will be grouped For example, in the screenshot below block 381 has only one transaction whereas block 380 has 7.Figure 4: Blocks containing varying numbers of transactions
So, what’s in a block?
- - A block header. Importantly, this contains a hash of both the current block and a hash of the previous block. This hash helps provides the ‘chain’ part of block-chain(i).
- - 1 to m transactions. This includes details on the chaincode invoked, the input supplied, who invoked it, who endorsed it and the result.
- - Some block metadata. This is the fabric specific stuff(ii) – not hugely of interest for this discussion. Figure 5: Fabric Block Contents
Relevance to Aviation Blockchain Sandbox
So, what does all this mean with regard to creating blockchain-based solutions in aviation?
Accessing the Blockchain networkSuppose we have a number of participants: airlines, airports and third parties. Each of these will need to have an identity issued (certs and keys – pretty standard cryptographic mechanisms) and these will be required to interact with the blockchain. In other words, Joe public won’t be able to just hop on there…unless someone gets sloppy with security. (Side note: Blockchain networks/applications and so on are subject to all the same security risks as other networks running distributed applications and these should be addressed – Blockchain confers no magic defence or force field!)
Participants can decide to transact on a ’public‘ channel or two or more may create a private channel that is not visible to other participants. For example, FlightChain (SITA’s reference app) will be deployed on a ’public‘ channel and all participants will be able to view the transactions and query the data (since the flight data it contains is essentially public domain). Note: there will be business rules around who can update a flight (for example, airline A may not be able to update Airline B’s flights) but these rules are coded in the “smart contract”/chaincode business logic but no party will be blocked from querying or invoking the FlightChain code. If, on the other hand, two airlines and three airports create a private channel and deploy their app there, other parties will not be able to interact with that chaincode (or indeed view the code or any of its transactions).
Chaincode can be written to implement whatever business rules or logic the parties can think of…just like regular code. Of course, this also implies that it can be used to create any number of bugs/security risks! The major differences with regular code are:
- - The full versioned history of the code is also stored on the blockchain.
- - The chaincode must be endorsed according to the endorsement rules set at the time of deployment.
On the second point, care needs to be taken in defining these endorsement rules. Let’s take our earlier example of two airlines and three airports on a private channel and wishing to deploy some code. They could decide that each transaction must be endorsed by all parties in the channel. This will work just fine until Airline A’s peer goes offline (network issue or server failure, say). At that point, no transaction can be endorsed and the whole operation grinds to a halt. Going to the other extreme, if we set the endorsement policy such that any one party can endorse a transaction on its own then there’s nothing to stop any of the parties from somehow gaming the system.
The original bitcoin whitepaper (the granddaddy of them all!) explains the purpose of these hashes and the overall Blockchain concept rather nicely
https://blockchain-fabric.blogspot.com/2017/04/hyperledger-fabric-v10-block-structure.html Senthilnathan’s detailed blogs for those who just have to know what’s happening under the hood.
SITA Aviation Sandbox Blockchain - update #3
Published on 10 October 2018 by Barry McLaughlin, Lead Architect, Advanced Technology Office, SITA Lab
Progress Since Previous Update:
- • Blockchain Infrastructure deployed. We’re using Hyperledger Fabric as our blockchain platform running on a Kubernetes cluster hosted in the cloud (AWS)
- • Gained some valuable know-how relating to creating, updating, deploying and monitoring a production-scale blockchain ecosystem.
- • Flight Chain smart contract deployed to our network with live flight data being processed from SITA APIs.
- • All code related to Flight Chain has been open sourced on GitLab to be used as a reference implementation (https://gitlab.com/FlightChain2).
Frequently Asked Questions:
- • Q: I want to get involved with Flight Chain – can I do that?
- A: Absolutely. We encourage airlines and airports to share public flight data via the platform. We have an API interface that accepts flight data in ACRIS JSON format so if your systems can produce data in that format, integration with Flight Chain will be pretty straightforward. If your data is in some other format, talk to us and we’ll try and help create an adapter for your data.
- • Q: I want to create my own smart contract – can you help?
- A: Yes, the point of the sandbox is to encourage blockchain adoption and collaboration. We can help by discussing the use-case(s) with you, finding partner airlines/airports/agents who are interested in the same use cases and helping to get these deployed on the sandbox
- • Q: I have an idea for a use-case that only involves certain collaboration partners – can I do that?
- A: Yes, Fabric has the concept of channels which essentially allows you to set up a private blockchain space within the sandbox. Transactions on this private channel will only be visible to you and your partners and not to any other party. Check out more details about channels in our developer.aero blog: https://www.developer.aero/Blockchain/Latest-News
- • Q: I have an idea and have partners who want to be involved and we know how to implement it ourselves. Can we use the sandbox to trial our blockchain project without involving SITA at all?
- A: Yes, the sandbox is for your use without preconditions. We can provide guidance on whether your proposed project is suitable for the infrastructure and help you get it deployed but you are not obliged to disclose any IP or involve SITA in the development of your project.
- • Q: I am neither an airport or an airline. Can I join the sandbox?
- A: At this time, we are restricting access to airlines and airports. If you are working with an airline or airport on a blockchain based use-case then that customer can register on your behalf. We intend to open up access as the network evolves and will take guidance from airlines and airports on when and how to do this.
SITA Aviation Sandbox Blockchain - update #1
This project is a follow-on project from the 2017 Flight Chain project (https://www.sita.aero/resources/blog/blockchain-in-air-travel). During the course of that project, we learned:
- - Permissioned/Private blockchains are preferred for enterprise use cases
- - As a consequence, the governance is key to ensuring there is confidence in the overall network.
- - The technology is viable, but still immature and complex to setup & manage.
- - Some blockchain implementations are more scalable than others
(This is just a summary – the full details are in the attached white paper).
- - We have seen some maturity of the toolset to manage Fabric, but it is still a complex beast and it will be another few weeks before we have a network running to show off.
- - Flight Chain will be one of the first apps deployed (in September), and will be a template dApp on the network for others to copy & adopt for different use cases (https://github.com/sitalab/FlightChain). If you would like to be part of Flight Chain at launch, please let me know and I’ll provide details on how to participate.
Beyond FlightChain, SITA are looking to identify & jointly explore cross industry collaboration use-cases. We have a shortlist, including:
- - Operational Data – One Version of The Truth
- - Passenger count @ airports for billing
- - Bag tracking & Resolution 753
- - Cargo manifests
- - MRO, Certification & parts tracking
I’m sure these are familiar use cases to many of you.
SITA are funding & building out this infrastructure to foster collaboration around blockchain, and I do look forward to working with the community on this project. Please feel free to contact us on email@example.com if you want to get further details.
SITA Aviation Sandbox Blockchain - update #2
Progress since previous update:
- - Flight Chain smart contract is developed as an MVP (but not complete). Have a look at https://github.com/sitalab/FlightChain for information on this, and how to run it locally.
- - We continue to work on the overall infrastructure. This is now running in a development Kubernetes environment, deployed with Hyperledger Cello. It is still a ‘vanilla’ happy path setup, and we will need to make it more flexible and harden it up a lot before opening it up.
Frequently Asked Questions
- - Q: How can I get involved in the sandbox?
A: There will be many ways to get involved in the sandbox once we open up access. You can get involved at a coding level – creating smart-contracts & the REST API interfaces to them. Or at a business process design level, by coming up with use-cases & imagining new ways of doing things in our industry, or you can contribute data and bring these use-cases to live. We plan to open access to the group chat server by end of August, and will host web-ex demos & discussions in the near future.
- - Q: I want to be part of Flight Chain – what do I do?
A: It is relatively simple to be part of Flight Chain, if you have an API for querying flight status on your system. Ideally this will support ACRIS JSON data, but if not, a simple adapter can be used to convert from your data format to ACRIS. If you want to be part of FlightChain AND have an API that SITA can access over public internet, then send us an email with the details of this API and we will assess if we can implement this adapter for you.
- - Q: I have an idea for use-case X, will SITA implement it for me?
A: In short, no. SITA is not committing to implementing all use-cases as part of this project. However, see the question below…
- - Q: I have an idea for use-case X, will SITA collaborate with me?
A: Yes! Blockchain is all about collaboration – and SITA can collaborate by discussing use-cases with you, finding partner airlines/airports who are interested in the same use cases and helping you to run these on the sandbox. For some use-cases SITA can also write the smart contracts & interface code needed for this.
- - Q: I have an idea for use-case X, and I already have collaboration partners. Do I have to involve SITA?
A: No. This sandbox is for you, our airline and airport customers without any pre-conditions. Once you have access, you are under no obligation to include SITA in your project, or disclose any IP to SITA. We can work with you so you understand how to deploy your project, and ensure that the infrastructure is right-sized for you.
- - Q: I am neither an airline nor an airport, but I do supply services to them. Can my company join?
A: Initially access will be restricted to airlines & airports. This is to ensure that participants are comfortable sharing information & data on the network. If you are currently working with and airline or airport on a blockchain use-case, then that customer can register on your behalf. We do intend to open up access as the network evolves, and will take guidance from airlines and airports on when & how to do this.
- - Q: I am a developer, I am impatient to start. What can I do?
A: Clone https://github.com/hyperledger/fabric-samples/tree/release-1.2/chaincode and https://github.com/sitalab/FlightChain and work through the Fabric samples, and then deploy Flight Chain locally. Track progress of Flight Chain through that project.