SlideShare a Scribd company logo
CS 394B Introduction
Marco Canini
CS 394B – S18 1
This Class
• Course is a combination: classes in a flipped classroom style and paper presentations/discussions
• Learn technical aspects of blockchain technologies and distributed consensus
• Have the conceptual foundations to engineer secure software that interacts with the blockchain
• Be able to integrate ideas from the blockchain in their own projects
• Comprehend and critique relevant research papers in the area of blockchain systems
• Present research ideas both orally in a concise way and within the allotted time as well as in
writing
• Defend the research approach, design decisions, and the evaluation methods in a discussion
• Moderate a discussion after a research presentation
CS 394B – S18 2
About the Instructor
• Marco Canini
• Assistant Professor at KAUST since Aug ’16
• https://mcanini.github.io
• Research interests span
• Distributed and Networked systems in the context of cloud computing, large-
scale data analytics, and machine learning
• Head of SANDS Lab
• Software-defined Advanced Networked and Distributed Systems Laboratory
CS 394B – S18 3
My research
4
Software
Engineering
Networking
Formal
Methods
Programming
Languages
Optimization
Theory
I design, build, measure and analyze large-scale
networked systems that span multiple autonomous,
potentially untrusted entities
Security
Machine
Learning
Goal: Discover and apply fundamental principles and
valuable knowledge on how to build scalable, dependable
and future-proof systems, worthy of society’s trust
Distributed
Systems
CS 394B – S18
Challenges
#1 Challenge: Complexity
Hard to reason about behavior as systems scale to large numbers of
components and users
• Poorly understood connections
• Need predictability to ensure scalable performance, reliable operation, etc.
5
CS 394B – S18
Systems Approach
• Formulate problem
• Get idea
• Build prototype
• Measure & analyze
• Adjust prototype … repeat previous step
Principles of system construction
• modularity, hierarchy, layering, abstraction, end to end
6
CS 394B – S18
New approaches are needed
Systems based on design decisions made in the last decade can hardly
cope with today’s scale, volume or velocity, let alone the future
We need new techniques, designs and solutions:
• Improve performance by at least 10x, in some cases 100x
• Ensure predictability of performance and high reliability
• Lower complexity of managing large-scale systems and processing big data
7
CS 394B – S18
SANDS Lab Vision
Make it easy to produce and manage key networked systems that are
worthy of society’s trust and achieve specific objectives:
• High performance and scalability
• High dependability and future-proof
• Low power
• …
We build prototypes that directly improve the lives of real users
We learn general principles and lessons of what works in practice
8
CS 394B – S18
Example: Dynam-IX
• Dynamic Interconnection eXchange
• https://dynam-ix.github.io/
CS 394B – S18 9
What About You?
• Please introduce yourself!
• Why are you in this class?
• How can we make it a very useful one?
CS 394B – S18 10
About this class
CS 394B – S18 11
Course Schedule
• Webpage: http://web.kaust.edu.sa/Faculty/MarcoCanini/classes/CS394B/S18/
• Piazza: https://piazza.com/kaust.edu.sa/spring2018/cs394b
• Meetings
• 4PM – 5:30 PM (Sun for lectures and discussions)
• Pay attention to the online announcements and schedule
• On average, one meeting per week
• Makeups will be added on a need-to-add basis, typically Wed
CS 394B – S18 12
Prerequisites
• CS 240 (Computing Systems and Concurrency)
• Basics of OS organization, threads, memory management, file systems,
scheduling, networking, etc.
• Equivalent course of CS 240 is acceptable as well
• Good programming skills
• Distributed systems – helpful
• Cryptography – helpful
• Probability – helpful
CS 394B – S18 13
Flipped classroom
• Course lectures are online
• We follow the course Bitcoin and Cryptocurrency Technologies by Arvind
Narayanan, Joseph Bonneau, Edward Felten and Andrew Miller
http://bitcoinbook.cs.princeton.edu/
• You must watch the video material before the meeting
• We go deep into each topic during meetings
• Send me questions in advance regarding the material
CS 394B – S18 14
Textbook
• Textbook not required but can be very helpful
• Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller
and Steven Goldfeder, Bitcoin and Cryptocurrency Technologies
• A pre-publication draft of the book is available for download on the
website: http://bitcoinbook.cs.princeton.edu/
CS 394B – S18 15
Course Requirements
Paper Reviews 15%
Paper Presentation 15%
Active Participation 5%
Assignments 25%
Project 40%
Checkpoint #1: initial proposal 5%
Checkpoint #2: midterm progress report 10%
Presentation 10%
Final report 15%
CS 394B – S18 16
Paper Reviews
• Paper reviews account for 20% of the total grade
• 6-8 summaries to write
• What goes in a good summary?
• Highlight strengths
• Highlight weaknesses
• Describe the entire paper in 3-5 sentences
CS 394B – S18 17
Papers
• Read critically!
• Is the problem real?
• What is the solution’s main idea (nugget)?
• Why is solution different from previous work?
• Are assumptions different?
• Is workload different?
• Is problem new?
• Does the paper (or do you) identify any fundamental/hard trade-offs?
• Do you think the work will be influential in 10 years?
• Why or why not?
CS 394B – S18 18
Paper Reviews
• Reviews must be submitted electronically 24 hours before the class
• Send the review via Piazza as private note to Instructors
• You can miss at most two without any penalty
• Each missing one beyond that will result in 25% decrease in grade for this segment
• Meaning, missing six or more will result in 0% for the “Paper Reviews” segment of your grade
• Reviews are peer-reviewed
• Another student will read and give constructive feedback on your review
• The goal is to make better reviews
• Good feedback will be considered positively during grading
• Read (if you haven’t already!)
• How to Read a Paper by S. Keshav
• How to read a research paper by Michael Mitzenmacher
• Writing Reviews for Systems Conferences by Timothy Roscoe
CS 394B – S18 19
How to Review
• You will see a section for describing a paper summary, its strengths, its
weaknesses, and detailed comments
• In the summary section, please directly address:
1. What problem the paper is addressing (1-2 sentences or bullets)
2. The core novel ideas or technical contributions of the work (1-2 sentences or bullets). Put
another way, what's the 30 second elevator pitch, or, five years from now, what should one
remember about this paper?
3. A longer description (3-5 sentences) that summarizes the paper's approach, mechanisms,
and findings.
• For the other sections, please include 2-4 bullet points for the strengths and
weaknesses, while a much longer exposition in the detailed comments.
• Remember to be constructive: don't only focus on the paper's shortcomings, but
also on what it could have done differently or as the next steps. Imagine that you
are having a conversation with the authors: What would you tell them?
CS 394B – S18 20
Paper Presentation
• Each student must present at least two papers; possibly three
• Paper presentation account for 15% of the total grade
• Two papers per class and 20-minutes presentation for each
• Sharp 20 minutes; we start clapping!
• Followed by discussion anchored by the presenters
• What should go in a useful presentation?
• Motivate
• Highlight the key ideas and insights; skip the details
• Lead the discussion
• Go through the strengths and weaknesses from the paper review
CS 394B – S18 21
Presentation Guidelines
Your oral description of the paper should follow a much similar format:
1. Title, authors and institutions, conference/journal
2. Problem
3. Core ideas
4. Descriptive summary and main results
5. Strengths
6. Weaknesses/limitations
7. Further discussion, including proposals for follow-up work
CS 394B – S18 22
Paper Presentation
• Email your slides to the instructor 24 hours before the class
• Prepare early
• Practice a lot
• Also, read
• How to Give a Bad Talk by David A. Patterson
• Pointers for Leading Paper Discussions by Randy H. Katz
CS 394B – S18 23
Participation
• Attend all meetings
• Can miss at most two with legitimate reasons
• Read all the papers and participate
• Ask questions!
• Send questions on video lectures (in advance)
CS 394B – S18 24
Assignments
• 3 programming assignments
• To be done individually; due 11:59pm on due date
• 11/2 Assignment 1 due
• 28/2 Assignment 2 due
• 21/3 Assignment 3 due
• No extensions given
CS 394B – S18 25
Project
• The biggest component of this course
• Pick an interesting open problem. Why is it important?
• What has already been done? Why are they not enough?
• Develop a hypothesis about how you’d improve it
• Intuitively, why will your approach work?
• Build a substantial prototype
• Experiment, measure, and compare against the state-of-the-art
• Aim at producing a conference/workshop-quality research paper
• Can be related to your research topic but it is expected to be distinct!
CS 394B – S18 26
Projects
• The final project accounts for 40% of total grades
• Done in groups of 2 students. Find your peers!
• What can and cannot be a project?
• Just surveys are not allowed. In fact, each project must include a survey of
related work and background
• An ideal project should answer the questions you asked during paper reviews
and points you cared about for presentations
• Measurements of new environments or of existing solutions on new
environments are acceptable upon discussion
• Will cover projects in more depth in the next meeting!
CS 394B – S18 27
How to Approach it?
1. Find a problem and motivate why this is worth solving
2. Survey background and related work to get a sense of your
(friendly!) competition
• Might require you to go back to the first step
3. Form/update your hypothesis
4. Test your hypothesis
• Go back to 3 until you are happy
5. Present your findings in a presentation and in writing
• Discuss known limitations
CS 394B – S18 28
Milestones
Date Milestone Details
ASAP Form Group Find like-minded students
14/2/18 Draft Proposal Send your proposal by email
7/3/18
Finalize Proposal
Checkpoint #1 (5%)
After a back-and-forth discussions with the
instructor
21/3/18
Midterm Progress
Report
Checkpoint #2 (10%)
Should read like parts of a research paper
25/3/18 Midterm Presentations
Define and motivate a problem, survey related
work, and form initial hypothesis and idea
13/5/18 Presentations (10%) Present your findings in a presentation
16/5/18 Research paper (15%)
Submit a final report similar to the papers you
read
CS 394B – S18 29
Draft Proposal
• Two pages including references that ideally includes
• What is the problem?
• Why is it important to solve?
• Any initial thoughts on what you want to do?
• How would you evaluate your solution?
• Include team members
• Meaning, form a group ASAP
• Schedule via email a 15-minute meeting to discuss
CS 394B – S18 30
Read: The Heilmeier’s Catechism
Finalized Proposal
• Two pages including references that must include
• What is the problem?
• Why is it important to solve?
• Any initial thoughts on what you want to do?
• How would you evaluate your solution?
• Approved by the instructor and agreed upon by you
• Forms the basis of expectation
CS 394B – S18 31
Midterm Presentation
• In-class short presentation over one day
• This is to make sure you are making progress
• Must include
• What is the problem?
• Why is it important?
• What are the most related work?
• What’s your hypothesis so far?
• How are/will you evaluate it?
CS 394B – S18 32
Final Presentation and Paper
• Presentation
• It will follow a format similar to other presentations given in the class
• Research paper
• The key part
• Should be written similar to the papers you’ve read
• Your goal is to do publishable quality systems research
• Up to five “best projects” will be earmarked for expedited submission to a
renowned conference, with the help of the instructor
• How to Write a Great Research Paper by Simon Peyton Jones
CS 394B – S18 33
Rough Outline
• Abstract
• Introduction (Highlight the importance and give intuition of solution)
• Motivation (Use data and simple examples)
• Overview (Summarize your overall solution so that readers can follow later)
• Core Idea (Main contribution w/ challenges and how you address them)
• Implementation (Discuss non-obvious parts of your implementation)
• Evaluation (Convince readers that it works and when it fails)
• Related Work (Let readers know that you know your competition!)
• Discussion (Know your limitations and possible workarounds)
• Conclusion (Summarize and point out future work)
CS 394B – S18 34
Course Topics
• Introductory material (~10 video lectures)
• basics of cryptography; Merkle tree
• blockchain; distributed consensus
• mining; incentives
• proof of work; proof of stake
• governance; economics
• security
• smart contracts; applications
• Advanced material
• active research problems in the area, including attacks, network scalability,
alternatives to proof of work/stake
CS 394B – S18 35
Before We Move On…
• No extensions
• Everyone must watch lectures and read papers in advance
• Class meeting format
• Quick summary by the instructor
• Topic discussion and addressing questions
• Presentation of one paper
• Presenters lead discussions on the papers we’ve read and related topics
CS 394B – S18 36
Developing a Cryptocurrency
Slide courtesy of Ittay Eyal
CS 394B – S18 37
Bitcoin
2008: The Bitcoin white paper
2009: Reference implementation
Probably not this guy
Slide courtesy of Ittay Eyal CS 394B – S18 38
Key Challenges
A
B
C
1. No stealing: Only Alice can move her money
2. Minting: Fair money creation
3. No double-spending: Alice cannot duplicate her money
Slide courtesy of Ittay Eyal CS 394B – S18 39
60 Seconds on Public Key Signatures
Alice generates key pair
1. private key 𝑘𝐴, kept secret
2. public key 𝐾𝐴, published with public key infrastructure
• Alice signs a message 𝑚 with private key 𝑘𝐴, generating
a signature 𝑠.
• Anyone can verify that 𝑠 is a signature of 𝑚 with key 𝑘𝐴
given 𝑚 and 𝐾𝐴.
Slide courtesy of Ittay Eyal CS 394B – S18 40
Addresses and Transactions
1. sgn(𝑘𝐴)
2. sgn(𝑘𝐵)
2. 𝐾𝐷, amount 𝑦
1. 𝐾𝐶, amount 0.5𝑥
3. 𝐾𝐸, amount 0.5𝑥
2. 𝐾𝐴, amount 𝑥
…
…
1. 𝐾𝐵, amount 𝑦
Slide courtesy of Ittay Eyal CS 394B – S18 41
1. No stealing: Only Alice can move her money
2. No double-spending: Alice cannot duplicate her money
3. Minting: Fair money creation
Key Challenges
A
B
C
Slide courtesy of Ittay Eyal CS 394B – S18 42
Global Ledger
M  A
A  B
B  C
Slide courtesy of Ittay Eyal CS 394B – S18 43
Global Ledger
M  A
A  B
A  C
Slide courtesy of Ittay Eyal CS 394B – S18 44
Global Ledger
M  A
A  B
B  C
Slide courtesy of Ittay Eyal CS 394B – S18 45
Key Challenges
A
B
C
1. No stealing: Only Alice can move her money
2. No double-spending: Alice cannot duplicate her money
3. Minting: Fair money creation
Slide courtesy of Ittay Eyal CS 394B – S18 46
60 Seconds on Cryptographic Hashing
Hash
Function
𝐻
Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud
exercitation ullamco laboris nisi ut aliquip ex ea
commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum
dolore eu fugiat nulla pariatur. Excepteur sint
occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est laborum.
56293a80e0394d25
2e995f2debccea82
23e4b5b2b150bee2
12729b3b39ac4d46
String input
256 bit number
(for example)
Given a 256bit number ℎ, one cannot find an input string that results
in ℎ faster than repeatedly guessing inputs 𝑥 and calculating 𝐻(𝑥).
Slide courtesy of Ittay Eyal CS 394B – S18 47
Mining – Minting for Proof of Work
Computationally difficult puzzle:
Find 𝑥 such that 𝐻 𝑥|𝑦 < 𝑡
Solver guesses values for 𝑥 until finding a valid one
• Different strings 𝑦 for different puzzles
• The target 𝑡 determines the difficulty, average time to solve
Slide courtesy of Ittay Eyal CS 394B – S18 48
Mining – Minting for Proof of Work
A
puzzle
solution (PoW)
Slide courtesy of Ittay Eyal CS 394B – S18 49
Key Challenges
1. No stealing: Only Alice can move her
money
Cryptographic signatures
2. No double-spending: Alice cannot
duplicate her money
Global ledger
3. Minting: Fair money creation
Mint for proof of work
Slide courtesy of Ittay Eyal CS 394B – S18 50
Key Challenges
Who gives money
for puzzles?
Who runs the public
key infrastructure?
Who maintains
the public ledger?
Can this be decentralized?
1. No stealing: Only Alice can move her
money
Cryptographic signatures
2. No double-spending: Alice cannot
duplicate her money
Global ledger
3. Minting: Fair money creation
Mint for proof of work
Slide courtesy of Ittay Eyal CS 394B – S18 51
Replicated State Machine
• Instead of one machine, use a replicated state machine
• Multiple machines operate a single ledger, PKI, and mint fairly
• A subset can behave arbitrarily – aka Byzantine
But who chooses the participating machines?
Slide courtesy of Ittay Eyal CS 394B – S18 52
A Replicated State Machine
𝐴1 → 𝐵1
Log
A B
𝐴1 → 𝐴2 𝐵1 → 𝐶1
Slide courtesy of Ittay Eyal CS 394B – S18 53
Nakamoto’s Blockchain
Log Blockchain
block
header
Slide courtesy of Ittay Eyal CS 394B – S18 54
Nakamoto’s Blockchain
Log Blockchain
block
header
Slide courtesy of Ittay Eyal CS 394B – S18 55
Nakamoto’s Blockchain
Log Blockchain
hash( ) < target*
* target: a deterministic function of previous blocks
Slide courtesy of Ittay Eyal CS 394B – S18 56
Nakamoto’s Blockchain
Slide courtesy of Ittay Eyal CS 394B – S18 57
Nakamoto’s Blockchain
Slide courtesy of Ittay Eyal CS 394B – S18 58
Nakamoto’s Blockchain
Exponential random interval
Slide courtesy of Ittay Eyal CS 394B – S18 59
Incentive for Mining
• Internal Prize:
• Minting
• Fees
Wins proportional to computation power
Slide courtesy of Ittay Eyal CS 394B – S18 60
Forks
• Natural in a distributed system
Slide courtesy of Ittay Eyal CS 394B – S18 61
Fork Resolution
• Longest chain wins
• Transactions are reverted
• Double-spending a threat
Slide courtesy of Ittay Eyal CS 394B – S18 62
Fork Resolution
A transaction is confirmed when
it is buried deep enough
Slide courtesy of Ittay Eyal CS 394B – S18 63
Key Challenges
Decentralized
1. No stealing: Only Alice can move her
money
Cryptographic signatures
2. No double-spending: Alice cannot
duplicate her money
Global ledger
3. Minting: Fair money creation
Mint for proof of work
Slide courtesy of Ittay Eyal CS 394B – S18 64
Next…
• Follow lecture 1
• Read Bitcoin: A Peer-to-Peer Electronic Cash System
• We meet on Wednesday
CS 394B – S18 65

More Related Content

PPTX
L1-intro.pptx4548548488484454546646565121212154
PPT
Lec01_Course_Overview.ppt
PDF
UCD and Technical Communication: The Inevitable Marriage
PPTX
Project Guidelines-LMU TOPUP.pptx
PPT
Lecture 1 sbcs undergraduate projects
PDF
Lecture 1.pdfgjgfddfbnnngdsdvnncxzxcbnssdfh
PPTX
Carpe diem power point slides
PPTX
What Students Want: Redesigning Research Guides Based on Student Needs
L1-intro.pptx4548548488484454546646565121212154
Lec01_Course_Overview.ppt
UCD and Technical Communication: The Inevitable Marriage
Project Guidelines-LMU TOPUP.pptx
Lecture 1 sbcs undergraduate projects
Lecture 1.pdfgjgfddfbnnngdsdvnncxzxcbnssdfh
Carpe diem power point slides
What Students Want: Redesigning Research Guides Based on Student Needs

Similar to L1-intro(2).pptx (20)

PPT
Managing Undergraduate Research - Perspective from Dept CS
PPTX
EdD_Capstone_Proposal_Oral_Defense_Template.pptx
PPTX
Betaleadership - ESCE Agile Marketing Class 2
PPTX
MOOC's Targeted Learning Outside Higher Education's Traditional Models STEMTe...
PPTX
INTP-362 Course Introduction.pptx
PDF
Management Question.pdf
PDF
Management Question.pdf
PPT
Insiders guide to getting published
PPTX
PDF
Doing Research in Computer Science - Capstone
PPTX
Lecture 2 - choosing a topic for your dissertation.pptx
PPT
IT492_2_Proposal (1).ppt
PDF
Tools and Methodology for Research: Article Reading
PPTX
Ask your users
PDF
Digital Image Processing for Bachelor and Masters
PPTX
Creating Open Educational Resources with no technical skills and new
PPTX
BIT-UCSC Final Project
PDF
lecture1.pdf
PDF
Taxonomy Development: Lessons from a Librarian
Managing Undergraduate Research - Perspective from Dept CS
EdD_Capstone_Proposal_Oral_Defense_Template.pptx
Betaleadership - ESCE Agile Marketing Class 2
MOOC's Targeted Learning Outside Higher Education's Traditional Models STEMTe...
INTP-362 Course Introduction.pptx
Management Question.pdf
Management Question.pdf
Insiders guide to getting published
Doing Research in Computer Science - Capstone
Lecture 2 - choosing a topic for your dissertation.pptx
IT492_2_Proposal (1).ppt
Tools and Methodology for Research: Article Reading
Ask your users
Digital Image Processing for Bachelor and Masters
Creating Open Educational Resources with no technical skills and new
BIT-UCSC Final Project
lecture1.pdf
Taxonomy Development: Lessons from a Librarian
Ad

More from DanishMahmood23 (8)

PPTX
Topic 4- processes.pptx
PPTX
Topic 5- Communications v1.pptx
PPTX
Topic 9a-Hadoop Storage- HDFS.pptx
PDF
IoT_IO1_3 Getting familiar with Hardware - Sensors.pdf
PDF
IoT_IO1_2 Getting familiar with Hardware - Development Boards.pdf
PPTX
10. Lec X- SDN.pptx
PDF
IoT_IO1_1 Introduction to the IoT-1.pdf
PPTX
IoT architecture.pptx
Topic 4- processes.pptx
Topic 5- Communications v1.pptx
Topic 9a-Hadoop Storage- HDFS.pptx
IoT_IO1_3 Getting familiar with Hardware - Sensors.pdf
IoT_IO1_2 Getting familiar with Hardware - Development Boards.pdf
10. Lec X- SDN.pptx
IoT_IO1_1 Introduction to the IoT-1.pdf
IoT architecture.pptx
Ad

Recently uploaded (20)

PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Cell Structure & Organelles in detailed.
DOC
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
PDF
Weekly quiz Compilation Jan -July 25.pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Trump Administration's workforce development strategy
PPTX
master seminar digital applications in india
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
Updated Idioms and Phrasal Verbs in English subject
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
UNIT III MENTAL HEALTH NURSING ASSESSMENT
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Cell Structure & Organelles in detailed.
Soft-furnishing-By-Architect-A.F.M.Mohiuddin-Akhand.doc
Weekly quiz Compilation Jan -July 25.pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Anesthesia in Laparoscopic Surgery in India
History, Philosophy and sociology of education (1).pptx
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
LDMMIA Reiki Yoga Finals Review Spring Summer
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Trump Administration's workforce development strategy
master seminar digital applications in india
Final Presentation General Medicine 03-08-2024.pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Updated Idioms and Phrasal Verbs in English subject
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE

L1-intro(2).pptx

  • 1. CS 394B Introduction Marco Canini CS 394B – S18 1
  • 2. This Class • Course is a combination: classes in a flipped classroom style and paper presentations/discussions • Learn technical aspects of blockchain technologies and distributed consensus • Have the conceptual foundations to engineer secure software that interacts with the blockchain • Be able to integrate ideas from the blockchain in their own projects • Comprehend and critique relevant research papers in the area of blockchain systems • Present research ideas both orally in a concise way and within the allotted time as well as in writing • Defend the research approach, design decisions, and the evaluation methods in a discussion • Moderate a discussion after a research presentation CS 394B – S18 2
  • 3. About the Instructor • Marco Canini • Assistant Professor at KAUST since Aug ’16 • https://mcanini.github.io • Research interests span • Distributed and Networked systems in the context of cloud computing, large- scale data analytics, and machine learning • Head of SANDS Lab • Software-defined Advanced Networked and Distributed Systems Laboratory CS 394B – S18 3
  • 4. My research 4 Software Engineering Networking Formal Methods Programming Languages Optimization Theory I design, build, measure and analyze large-scale networked systems that span multiple autonomous, potentially untrusted entities Security Machine Learning Goal: Discover and apply fundamental principles and valuable knowledge on how to build scalable, dependable and future-proof systems, worthy of society’s trust Distributed Systems CS 394B – S18
  • 5. Challenges #1 Challenge: Complexity Hard to reason about behavior as systems scale to large numbers of components and users • Poorly understood connections • Need predictability to ensure scalable performance, reliable operation, etc. 5 CS 394B – S18
  • 6. Systems Approach • Formulate problem • Get idea • Build prototype • Measure & analyze • Adjust prototype … repeat previous step Principles of system construction • modularity, hierarchy, layering, abstraction, end to end 6 CS 394B – S18
  • 7. New approaches are needed Systems based on design decisions made in the last decade can hardly cope with today’s scale, volume or velocity, let alone the future We need new techniques, designs and solutions: • Improve performance by at least 10x, in some cases 100x • Ensure predictability of performance and high reliability • Lower complexity of managing large-scale systems and processing big data 7 CS 394B – S18
  • 8. SANDS Lab Vision Make it easy to produce and manage key networked systems that are worthy of society’s trust and achieve specific objectives: • High performance and scalability • High dependability and future-proof • Low power • … We build prototypes that directly improve the lives of real users We learn general principles and lessons of what works in practice 8 CS 394B – S18
  • 9. Example: Dynam-IX • Dynamic Interconnection eXchange • https://dynam-ix.github.io/ CS 394B – S18 9
  • 10. What About You? • Please introduce yourself! • Why are you in this class? • How can we make it a very useful one? CS 394B – S18 10
  • 11. About this class CS 394B – S18 11
  • 12. Course Schedule • Webpage: http://web.kaust.edu.sa/Faculty/MarcoCanini/classes/CS394B/S18/ • Piazza: https://piazza.com/kaust.edu.sa/spring2018/cs394b • Meetings • 4PM – 5:30 PM (Sun for lectures and discussions) • Pay attention to the online announcements and schedule • On average, one meeting per week • Makeups will be added on a need-to-add basis, typically Wed CS 394B – S18 12
  • 13. Prerequisites • CS 240 (Computing Systems and Concurrency) • Basics of OS organization, threads, memory management, file systems, scheduling, networking, etc. • Equivalent course of CS 240 is acceptable as well • Good programming skills • Distributed systems – helpful • Cryptography – helpful • Probability – helpful CS 394B – S18 13
  • 14. Flipped classroom • Course lectures are online • We follow the course Bitcoin and Cryptocurrency Technologies by Arvind Narayanan, Joseph Bonneau, Edward Felten and Andrew Miller http://bitcoinbook.cs.princeton.edu/ • You must watch the video material before the meeting • We go deep into each topic during meetings • Send me questions in advance regarding the material CS 394B – S18 14
  • 15. Textbook • Textbook not required but can be very helpful • Arvind Narayanan, Joseph Bonneau, Edward Felten, Andrew Miller and Steven Goldfeder, Bitcoin and Cryptocurrency Technologies • A pre-publication draft of the book is available for download on the website: http://bitcoinbook.cs.princeton.edu/ CS 394B – S18 15
  • 16. Course Requirements Paper Reviews 15% Paper Presentation 15% Active Participation 5% Assignments 25% Project 40% Checkpoint #1: initial proposal 5% Checkpoint #2: midterm progress report 10% Presentation 10% Final report 15% CS 394B – S18 16
  • 17. Paper Reviews • Paper reviews account for 20% of the total grade • 6-8 summaries to write • What goes in a good summary? • Highlight strengths • Highlight weaknesses • Describe the entire paper in 3-5 sentences CS 394B – S18 17
  • 18. Papers • Read critically! • Is the problem real? • What is the solution’s main idea (nugget)? • Why is solution different from previous work? • Are assumptions different? • Is workload different? • Is problem new? • Does the paper (or do you) identify any fundamental/hard trade-offs? • Do you think the work will be influential in 10 years? • Why or why not? CS 394B – S18 18
  • 19. Paper Reviews • Reviews must be submitted electronically 24 hours before the class • Send the review via Piazza as private note to Instructors • You can miss at most two without any penalty • Each missing one beyond that will result in 25% decrease in grade for this segment • Meaning, missing six or more will result in 0% for the “Paper Reviews” segment of your grade • Reviews are peer-reviewed • Another student will read and give constructive feedback on your review • The goal is to make better reviews • Good feedback will be considered positively during grading • Read (if you haven’t already!) • How to Read a Paper by S. Keshav • How to read a research paper by Michael Mitzenmacher • Writing Reviews for Systems Conferences by Timothy Roscoe CS 394B – S18 19
  • 20. How to Review • You will see a section for describing a paper summary, its strengths, its weaknesses, and detailed comments • In the summary section, please directly address: 1. What problem the paper is addressing (1-2 sentences or bullets) 2. The core novel ideas or technical contributions of the work (1-2 sentences or bullets). Put another way, what's the 30 second elevator pitch, or, five years from now, what should one remember about this paper? 3. A longer description (3-5 sentences) that summarizes the paper's approach, mechanisms, and findings. • For the other sections, please include 2-4 bullet points for the strengths and weaknesses, while a much longer exposition in the detailed comments. • Remember to be constructive: don't only focus on the paper's shortcomings, but also on what it could have done differently or as the next steps. Imagine that you are having a conversation with the authors: What would you tell them? CS 394B – S18 20
  • 21. Paper Presentation • Each student must present at least two papers; possibly three • Paper presentation account for 15% of the total grade • Two papers per class and 20-minutes presentation for each • Sharp 20 minutes; we start clapping! • Followed by discussion anchored by the presenters • What should go in a useful presentation? • Motivate • Highlight the key ideas and insights; skip the details • Lead the discussion • Go through the strengths and weaknesses from the paper review CS 394B – S18 21
  • 22. Presentation Guidelines Your oral description of the paper should follow a much similar format: 1. Title, authors and institutions, conference/journal 2. Problem 3. Core ideas 4. Descriptive summary and main results 5. Strengths 6. Weaknesses/limitations 7. Further discussion, including proposals for follow-up work CS 394B – S18 22
  • 23. Paper Presentation • Email your slides to the instructor 24 hours before the class • Prepare early • Practice a lot • Also, read • How to Give a Bad Talk by David A. Patterson • Pointers for Leading Paper Discussions by Randy H. Katz CS 394B – S18 23
  • 24. Participation • Attend all meetings • Can miss at most two with legitimate reasons • Read all the papers and participate • Ask questions! • Send questions on video lectures (in advance) CS 394B – S18 24
  • 25. Assignments • 3 programming assignments • To be done individually; due 11:59pm on due date • 11/2 Assignment 1 due • 28/2 Assignment 2 due • 21/3 Assignment 3 due • No extensions given CS 394B – S18 25
  • 26. Project • The biggest component of this course • Pick an interesting open problem. Why is it important? • What has already been done? Why are they not enough? • Develop a hypothesis about how you’d improve it • Intuitively, why will your approach work? • Build a substantial prototype • Experiment, measure, and compare against the state-of-the-art • Aim at producing a conference/workshop-quality research paper • Can be related to your research topic but it is expected to be distinct! CS 394B – S18 26
  • 27. Projects • The final project accounts for 40% of total grades • Done in groups of 2 students. Find your peers! • What can and cannot be a project? • Just surveys are not allowed. In fact, each project must include a survey of related work and background • An ideal project should answer the questions you asked during paper reviews and points you cared about for presentations • Measurements of new environments or of existing solutions on new environments are acceptable upon discussion • Will cover projects in more depth in the next meeting! CS 394B – S18 27
  • 28. How to Approach it? 1. Find a problem and motivate why this is worth solving 2. Survey background and related work to get a sense of your (friendly!) competition • Might require you to go back to the first step 3. Form/update your hypothesis 4. Test your hypothesis • Go back to 3 until you are happy 5. Present your findings in a presentation and in writing • Discuss known limitations CS 394B – S18 28
  • 29. Milestones Date Milestone Details ASAP Form Group Find like-minded students 14/2/18 Draft Proposal Send your proposal by email 7/3/18 Finalize Proposal Checkpoint #1 (5%) After a back-and-forth discussions with the instructor 21/3/18 Midterm Progress Report Checkpoint #2 (10%) Should read like parts of a research paper 25/3/18 Midterm Presentations Define and motivate a problem, survey related work, and form initial hypothesis and idea 13/5/18 Presentations (10%) Present your findings in a presentation 16/5/18 Research paper (15%) Submit a final report similar to the papers you read CS 394B – S18 29
  • 30. Draft Proposal • Two pages including references that ideally includes • What is the problem? • Why is it important to solve? • Any initial thoughts on what you want to do? • How would you evaluate your solution? • Include team members • Meaning, form a group ASAP • Schedule via email a 15-minute meeting to discuss CS 394B – S18 30 Read: The Heilmeier’s Catechism
  • 31. Finalized Proposal • Two pages including references that must include • What is the problem? • Why is it important to solve? • Any initial thoughts on what you want to do? • How would you evaluate your solution? • Approved by the instructor and agreed upon by you • Forms the basis of expectation CS 394B – S18 31
  • 32. Midterm Presentation • In-class short presentation over one day • This is to make sure you are making progress • Must include • What is the problem? • Why is it important? • What are the most related work? • What’s your hypothesis so far? • How are/will you evaluate it? CS 394B – S18 32
  • 33. Final Presentation and Paper • Presentation • It will follow a format similar to other presentations given in the class • Research paper • The key part • Should be written similar to the papers you’ve read • Your goal is to do publishable quality systems research • Up to five “best projects” will be earmarked for expedited submission to a renowned conference, with the help of the instructor • How to Write a Great Research Paper by Simon Peyton Jones CS 394B – S18 33
  • 34. Rough Outline • Abstract • Introduction (Highlight the importance and give intuition of solution) • Motivation (Use data and simple examples) • Overview (Summarize your overall solution so that readers can follow later) • Core Idea (Main contribution w/ challenges and how you address them) • Implementation (Discuss non-obvious parts of your implementation) • Evaluation (Convince readers that it works and when it fails) • Related Work (Let readers know that you know your competition!) • Discussion (Know your limitations and possible workarounds) • Conclusion (Summarize and point out future work) CS 394B – S18 34
  • 35. Course Topics • Introductory material (~10 video lectures) • basics of cryptography; Merkle tree • blockchain; distributed consensus • mining; incentives • proof of work; proof of stake • governance; economics • security • smart contracts; applications • Advanced material • active research problems in the area, including attacks, network scalability, alternatives to proof of work/stake CS 394B – S18 35
  • 36. Before We Move On… • No extensions • Everyone must watch lectures and read papers in advance • Class meeting format • Quick summary by the instructor • Topic discussion and addressing questions • Presentation of one paper • Presenters lead discussions on the papers we’ve read and related topics CS 394B – S18 36
  • 37. Developing a Cryptocurrency Slide courtesy of Ittay Eyal CS 394B – S18 37
  • 38. Bitcoin 2008: The Bitcoin white paper 2009: Reference implementation Probably not this guy Slide courtesy of Ittay Eyal CS 394B – S18 38
  • 39. Key Challenges A B C 1. No stealing: Only Alice can move her money 2. Minting: Fair money creation 3. No double-spending: Alice cannot duplicate her money Slide courtesy of Ittay Eyal CS 394B – S18 39
  • 40. 60 Seconds on Public Key Signatures Alice generates key pair 1. private key 𝑘𝐴, kept secret 2. public key 𝐾𝐴, published with public key infrastructure • Alice signs a message 𝑚 with private key 𝑘𝐴, generating a signature 𝑠. • Anyone can verify that 𝑠 is a signature of 𝑚 with key 𝑘𝐴 given 𝑚 and 𝐾𝐴. Slide courtesy of Ittay Eyal CS 394B – S18 40
  • 41. Addresses and Transactions 1. sgn(𝑘𝐴) 2. sgn(𝑘𝐵) 2. 𝐾𝐷, amount 𝑦 1. 𝐾𝐶, amount 0.5𝑥 3. 𝐾𝐸, amount 0.5𝑥 2. 𝐾𝐴, amount 𝑥 … … 1. 𝐾𝐵, amount 𝑦 Slide courtesy of Ittay Eyal CS 394B – S18 41
  • 42. 1. No stealing: Only Alice can move her money 2. No double-spending: Alice cannot duplicate her money 3. Minting: Fair money creation Key Challenges A B C Slide courtesy of Ittay Eyal CS 394B – S18 42
  • 43. Global Ledger M  A A  B B  C Slide courtesy of Ittay Eyal CS 394B – S18 43
  • 44. Global Ledger M  A A  B A  C Slide courtesy of Ittay Eyal CS 394B – S18 44
  • 45. Global Ledger M  A A  B B  C Slide courtesy of Ittay Eyal CS 394B – S18 45
  • 46. Key Challenges A B C 1. No stealing: Only Alice can move her money 2. No double-spending: Alice cannot duplicate her money 3. Minting: Fair money creation Slide courtesy of Ittay Eyal CS 394B – S18 46
  • 47. 60 Seconds on Cryptographic Hashing Hash Function 𝐻 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 56293a80e0394d25 2e995f2debccea82 23e4b5b2b150bee2 12729b3b39ac4d46 String input 256 bit number (for example) Given a 256bit number ℎ, one cannot find an input string that results in ℎ faster than repeatedly guessing inputs 𝑥 and calculating 𝐻(𝑥). Slide courtesy of Ittay Eyal CS 394B – S18 47
  • 48. Mining – Minting for Proof of Work Computationally difficult puzzle: Find 𝑥 such that 𝐻 𝑥|𝑦 < 𝑡 Solver guesses values for 𝑥 until finding a valid one • Different strings 𝑦 for different puzzles • The target 𝑡 determines the difficulty, average time to solve Slide courtesy of Ittay Eyal CS 394B – S18 48
  • 49. Mining – Minting for Proof of Work A puzzle solution (PoW) Slide courtesy of Ittay Eyal CS 394B – S18 49
  • 50. Key Challenges 1. No stealing: Only Alice can move her money Cryptographic signatures 2. No double-spending: Alice cannot duplicate her money Global ledger 3. Minting: Fair money creation Mint for proof of work Slide courtesy of Ittay Eyal CS 394B – S18 50
  • 51. Key Challenges Who gives money for puzzles? Who runs the public key infrastructure? Who maintains the public ledger? Can this be decentralized? 1. No stealing: Only Alice can move her money Cryptographic signatures 2. No double-spending: Alice cannot duplicate her money Global ledger 3. Minting: Fair money creation Mint for proof of work Slide courtesy of Ittay Eyal CS 394B – S18 51
  • 52. Replicated State Machine • Instead of one machine, use a replicated state machine • Multiple machines operate a single ledger, PKI, and mint fairly • A subset can behave arbitrarily – aka Byzantine But who chooses the participating machines? Slide courtesy of Ittay Eyal CS 394B – S18 52
  • 53. A Replicated State Machine 𝐴1 → 𝐵1 Log A B 𝐴1 → 𝐴2 𝐵1 → 𝐶1 Slide courtesy of Ittay Eyal CS 394B – S18 53
  • 54. Nakamoto’s Blockchain Log Blockchain block header Slide courtesy of Ittay Eyal CS 394B – S18 54
  • 55. Nakamoto’s Blockchain Log Blockchain block header Slide courtesy of Ittay Eyal CS 394B – S18 55
  • 56. Nakamoto’s Blockchain Log Blockchain hash( ) < target* * target: a deterministic function of previous blocks Slide courtesy of Ittay Eyal CS 394B – S18 56
  • 57. Nakamoto’s Blockchain Slide courtesy of Ittay Eyal CS 394B – S18 57
  • 58. Nakamoto’s Blockchain Slide courtesy of Ittay Eyal CS 394B – S18 58
  • 59. Nakamoto’s Blockchain Exponential random interval Slide courtesy of Ittay Eyal CS 394B – S18 59
  • 60. Incentive for Mining • Internal Prize: • Minting • Fees Wins proportional to computation power Slide courtesy of Ittay Eyal CS 394B – S18 60
  • 61. Forks • Natural in a distributed system Slide courtesy of Ittay Eyal CS 394B – S18 61
  • 62. Fork Resolution • Longest chain wins • Transactions are reverted • Double-spending a threat Slide courtesy of Ittay Eyal CS 394B – S18 62
  • 63. Fork Resolution A transaction is confirmed when it is buried deep enough Slide courtesy of Ittay Eyal CS 394B – S18 63
  • 64. Key Challenges Decentralized 1. No stealing: Only Alice can move her money Cryptographic signatures 2. No double-spending: Alice cannot duplicate her money Global ledger 3. Minting: Fair money creation Mint for proof of work Slide courtesy of Ittay Eyal CS 394B – S18 64
  • 65. Next… • Follow lecture 1 • Read Bitcoin: A Peer-to-Peer Electronic Cash System • We meet on Wednesday CS 394B – S18 65

Editor's Notes

  • #40: Say: The physicality of money or central agency (bank) took care of this (authentication and txn serialization).
  • #42: Add: scripts, multisigs, p2sh
  • #43: Say: The physicality of money or central agency (bank) took care of this (authentication and txn serialization).
  • #47: Say: The physicality of money or central agency (bank) took care of this (authentication and txn serialization).
  • #50: Say: The physicality of money or central agency (bank) took care of this (authentication and txn serialization).
  • #51: Say: The physicality of money or central agency (bank) took care of this (authentication and txn serialization).
  • #52: Say: The physicality of money or central agency (bank) took care of this (authentication and txn serialization).
  • #54: Unstructured peer-to-peer network Propagation by gossip Talk about how transaction security prohibits theft. Say we’re not going to deal with txns anymore.
  • #61: Mining total: 21 million at 2140
  • #64: There is no DECIDE step as in classical consensus Making it difficult enough for attacker to out-run.
  • #65: Say: The physicality of money or central agency (bank) took care of this (authentication and txn serialization).