Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan*...

13
Blockchain Infrastructure for eScience Can Özturan Dept. of Computer Engineering and TETAM Bogazici University, Istanbul [email protected]

Transcript of Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan*...

Page 1: Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan* Dept.*of*Computer*Engineering* and*TETAM* Bogazici*University,*Istanbul* ozturaca@boun.edu.tr*

Blockchain  Infrastructure  for    e-­‐Science  

Can  Özturan  Dept.  of  Computer  Engineering  

and  TETAM    Bogazici  University,  Istanbul  

[email protected]  

Page 2: Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan* Dept.*of*Computer*Engineering* and*TETAM* Bogazici*University,*Istanbul* ozturaca@boun.edu.tr*

ObjecIve  of  the  talk  

•  Give  an  overview  of    the  new  blockchain  technologies  

•  Invite  to  collaborate  on  building  a  blockchain  infrastructure  for  e-­‐Science  

Page 3: Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan* Dept.*of*Computer*Engineering* and*TETAM* Bogazici*University,*Istanbul* ozturaca@boun.edu.tr*

Blockchain  Technologies  (1)    •  Peer-­‐to-­‐peer  infrastructure  •  Maintains  a  ledger  (blockchain)  of  transacIons  among  a  

distributed  network  of  computers  •  Based  on  cryptography  which  allows  secure  transacIons  to  

be  performed  by  the  users  •  No  need  for  central  authority  •  Solves  double  spending  problem    •  Employs  consensus  algorithm  for  reaching  consensus  about  

the  current  state  of  the  blockchain  •  Value/tokens/ownership  can  be  tracked  and  exchanged  

without  requiring  a  central  point  of  control  •  Decentralized  trustless  protocol    

Page 4: Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan* Dept.*of*Computer*Engineering* and*TETAM* Bogazici*University,*Istanbul* ozturaca@boun.edu.tr*

•  IncenIve  driven  ecosystem  •  Nodes  (miners)  verify  transacIons.  They  perform  proof  of  work.  In  return,  they  win  rewards  and  collect  transacIon  fees.  

•  51%  aWack  may  occur  if    51%  of  hash  power  is  held  by  one  party.  

Blockchain  Technologies  (2)    

Page 5: Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan* Dept.*of*Computer*Engineering* and*TETAM* Bogazici*University,*Istanbul* ozturaca@boun.edu.tr*

(descripIon  source    hWps://www.ethereum.org/)  

Ethereum  hWps://www.ethereum.org/  

Page 6: Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan* Dept.*of*Computer*Engineering* and*TETAM* Bogazici*University,*Istanbul* ozturaca@boun.edu.tr*

Ethereum  hWps://www.ethereum.org/  

•  Provides  Turing  Complete  Virtual  Machine  on  which  you  can  run  Smart  Contracts  (code)  

•   On  Ethereum  there  are:  accounts  and  smart  contracts.  These  have  addresses  that  idenIfy  them.  

•  Solidity  is  available  as  a  smart  contract  programming  language.    

•  Javascript/web  interfaces  are  available.  

Page 7: Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan* Dept.*of*Computer*Engineering* and*TETAM* Bogazici*University,*Istanbul* ozturaca@boun.edu.tr*

A  simple  smart  contract  example  (example  not  tested,  correctness  not  verified)  

pragma  solidity  ^0.4.0;    contract  ClusterMachine  {                              address    public  owner;          mapping  (address  =>  uint)  public  balances;          uint  public  totalcorehours  ;                    modifier  owneronly  {                  if  (msg.sender  !=  owner)  {                          throw  ;                  }                  _  ;          }              //  constructor            funcIon  ClusterMachine()  {                  owner  =  msg.sender  ;                  totalcorehours  =  365*24  ;              }            

           funcIon  assigncorehours(address  addr,uint                                          numcorehours)  public    owneronly  {                  if  (totalcorehours  >=  numcorehours  )  {                        totalcorehours  -­‐=  numcorehours  ;                          balances[addr]  +=    numcorehours  ;                    }                }                    funcIon  getcorebalance(address  addr)  public                                                                                                    returns  (uint  retval)    {                  return(balances[addr])  ;                    }                      funcIon  transfer(uint  amount,  address  dest)                                                                                                                                                      public  {                  if  (balances[msg.sender]  >=  amount  )  {                        balances[msg.sender]  -­‐=  amount  ;                        balances[dest]  +=  amount  ;                  }          }  }  

Page 8: Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan* Dept.*of*Computer*Engineering* and*TETAM* Bogazici*University,*Istanbul* ozturaca@boun.edu.tr*

TRADITIONAL  SERVICES  

servers  

Users/programs  

Page 9: Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan* Dept.*of*Computer*Engineering* and*TETAM* Bogazici*University,*Istanbul* ozturaca@boun.edu.tr*

BLOCKHAIN  CAN  ALSO  BE  VIEWED  AS  AN  OPEN,    HISTORICAL  AND  LIVE  DATABASE    

BLOCKCHAIN  

servers  

Users/programs  

blocks  appear    roughly  every  12-­‐20  secs  

Page 10: Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan* Dept.*of*Computer*Engineering* and*TETAM* Bogazici*University,*Istanbul* ozturaca@boun.edu.tr*

Blockchain  for  E-­‐Science  

BLOCKCHAIN  

•  Cluster  computers,  data,  sensors,  soqware,  researchers,  organizaIons,  centers            etc.  can  be  represented    as    a  contract  enIty  on  the  blockchain  

cluster  

cluster  

cluster  

cluster  

user  

user  

user  

user  

user  

data  

cluster  

soqw

are  

sensor  

Center  A   Center  B   Center  C  

Page 11: Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan* Dept.*of*Computer*Engineering* and*TETAM* Bogazici*University,*Istanbul* ozturaca@boun.edu.tr*

•  Have  each  center  /  university  /  group  /  person    run  a  single  node  •  Use  open/free  source  Ethereum  code  (geth,  parity)        •  Even  a  cheap  desktop  can  be  used  for  running  a  node  •  Overall  we  need  many  nodes  (a  few  hundreds,  the  more  the  beWer).    So  we  

need  to  convince  a  few  hundred  researchers,  universiIes,  centers  to    run  a  node.    

•  Almost  no  money  needed  for  investment  (an  unused  desktop  can  also  be  used).  •  But,  in  return  we  get  a  highly  valuable  blockchain  infrastructure  on  which  we  

can  easily  implement  many  useful  things:    audiIng,    evaluaIon,  resource  managers,  sharing  economy,  virtual  organizaIons,  citaIon  networks  etc.      

•  Blockchain  can  also  be  viewed  as  an  open  historical  and  live  database:  Data  analyIcs  can  be  performed  on  this  live  data.  

•  It  can  complement  exisIng  European  efforts  and  help  these  efforts  to  get  more  widespread  adopIon,  e.g.  by  facilitaIng  communiIes  that  always  exist  on  the  blockchain.  

Can  we  build  one  for  e-­‐Science  ?  

Page 12: Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan* Dept.*of*Computer*Engineering* and*TETAM* Bogazici*University,*Istanbul* ozturaca@boun.edu.tr*

eBloc    (hWp://ebloc.org  )  •  Please  join  our  efforts  to  build  a  blockchain  infrastructure  for  eScience  by  running  a  node  

Page 13: Blockchain*Infrastructure*for** eScience · Blockchain*Infrastructure*for** eScience Can*Özturan* Dept.*of*Computer*Engineering* and*TETAM* Bogazici*University,*Istanbul* ozturaca@boun.edu.tr*

Literature  1.  Nakamoto,  Satoshi.  "Bitcoin:  A  peer-­‐to-­‐peer  electronic  cash  system."  (2008).  

hWp://goo.gl/xwyfm7  2.  Blockchain  Enigma.  Paradox.  Opportunity,  DeloiWe,  2016.                hWp://goo.gl/WzwWDe    3.  Gavin  Wood,  Ethereum:  a  secure  decentralised  generalised  transacIon                ledger,  Homestead  Revision.  hWp://goo.gl/bcl0Fi      4.  Ethereum  Project,  hWps://www.ethereum.org/