Sunday, 22 April 2018

Teaching Blockchain and Distributed Ledger approaches 1

Recently started developing materials to teach blockchain to a group of MSc Computing students within a module on internet programming. So what is the problem? 

Not really a problem, but:

  • deciding where to start;
  • wanting the students to consider what are blockchain and distributed ledger techniques;
  • thinking like programmers about the techniques rather than the hype - they may in the future be the one who has to persuade someone to either go with a distributed ledger solution or equally not.
1. First teaching approach
My decision was to initially go with a flipped approach of providing a set of materials on blockchain before the session, expecting the students to use them with some guidance and following it with the 'blockchain game' and user case example activity.


2.The Blockchain Game


2.1 Rules You will be placed into groups by the tutor, please do not use the computer for anything else during the task part of the activity, but as a source of the rules of the activity. Each group will need

  • one sticky note/sheet of paper per group to store the 'blockchain'
  • paper and pen for each member of the group.
Please note groups are of different sizes on purpose - this is part of the exercise. 
Now your group's sticky note divide the note up in the same way as below.
Start of the blockchain game.


We are now ready to start the game.


Rounds in the game
1. The tutor will provide a new 'block' it will be in this case a single number each round, this is the data. (Note: in an actual blockchain this will be a much more complex bit of data).


2. To slow the system down, increase security - the winner needs to do some work. This is the Proof of Work concept. Each member of the group needs to individually calculate the new Hash value using the following rule:
HASH = Prev + (Data*25)-1255
3. Each group decides on their answer and is trying to be the first to give the correct answer. Only one answer per group at a time. Before starting the game the group will decide on a mechanism for giving the answer - e.g. agree and answer or first to get the correct answer says it.
4. The tutor will decide who wins - the decision is final.


5. The winning team gets the win and every group now writes down the data and the new hash BUT only after the winner has been found. also start a new block with the hash just being calculate written in as the previous hash in the new block.


6. So a blockchain has a new item in the blockchain and every group's blockchain is the same. Now go back to step 1 the games carries on until the tutor ends it.






2.2 Reflection activities
Groups that have only one member during the task join together now to be a new group called the 'one and only'. Groups with two members only will join together to be a single larger group called 'two's companies' and the group(s) with four or more members will join together to form a single group called 'hydra'
Step 1 Individually - no discussion at this time do the following (15 minutes)
1. What I have learnt during this activity?
2. Do you think there is some benefit to larger group sizes for this problem?
3. What do you think the role of the hash and proof-of-work is?
4. What do you think would happen if someone tried to alter the data in the middle of the blockchain after other blocks have been added?
Step 2 Group. (15 minutes)
Using the same questions 1 to 4 come up with, after discussion, a single set of answers for the whole group.
Step 3 Sharing. Each group will present their findings. (10 minutes)
When not presenting the other two groups are expected to listen, take notes where appropriate and after the presenting group has finished be prepared to ask questions.
Step 4 (outside of the class): To consider individually or as a group.
(a) Think about your individual answers, group's answer, new insights you gained from the other groups and from sources external to the class; then possibly revise your answers. 
(b) Can you improve the game, for example change it so it might take several iterations to get the right hash (look up how bitcoin does this - no need in the game though for SHA256)


3. User Case Activity
In this activity, the three groups are given three different scenarios; sample examples include a social solution, cryptocurrency or supply chain activity. They were asked to consider a range of issues that a programmer or developer might have to consider for example
- What data would need to be stored within the blockchain for this scenario?
- Who would hold and mine a copy of the blockchain?
- Why would someone hold and mine the blockchain? What is their incentive?
- Why not use a centralised database for the scenario?


4. Summary
These initial activities were purposely designed to not involve coding. Though the choice of programming language is not always independent of the approach, I believe cutting through to the requirements is a central part of the programming the solution, and this is largely independent of the approach.

In the next post in the series, I will look at the coding.


All views are the authors, and may not reflect the views of any organisation the author is connected with in any way.

No comments:

Post a Comment