Gentle Introduction to Blockchain with Lisp
Gentle Introduction to Blockchain with Lisp
Free!
Minimum price
$11.95
Suggested price
Gentle Introduction to Blockchain with Lisp

This book is 90% complete

Last updated on 2020-01-04

About the Book

Blockchain is a powerful concept that allows us to effectively distribute data among users. We will learn about Lisp, and then write a simple blockchain implementation with it.

This book aims to be accessible to novices that have no prior experience in programming. Thus, this book is designed to be self-contained.

One of the reasons for writing this book is that I could not find a single book that explained how to implement blockchain from scratch, covering all the details. I had to do a lot of research on the Internet to come up with a complete picture of what blockchain is, how one can implement it, and what it is good for.

The recommended approach for the book is to follow along and write the code as it's being explained instead of reading passively. This way you will get the most of it. All of the source code is available for download.

Contributions to the book are welcome on GitHub.

About the Author

Boro Sitnikovski
Boro Sitnikovski

Boro Sitnikovski has over 10 years of experience working professionally as a Software Engineer. He started programming with the Assembly programming language on an Intel x86 at the age of 10. While in high school, he has won several prizes on competitive programming, varying from 4th, 3rd, and 1st place.

He has a Bachelor of Engineering in Informatics degree, and his thesis was titled “Programming in Haskell using algebraic data structures”. His research interests include: programming languages, mathematics, logic, algorithms, and writing correct software.

He is a strong believer in the open source philosophy, and contributes to various open source projects.

In his spare time he enjoys some time-off with his family.

Table of Contents

  • Preface and acknowledgments
  • 1. Introduction to Blockchain
    • 1.1. Motivation
    • 1.2. Encryption
      • 1.2.1. Symmetric-key algorithm
      • 1.2.2. Asymmetric-key algorithm
    • 1.3. Hashing
    • 1.4. Smart contracts
    • 1.5. Bitcoin
    • 1.6. Example workflows
    • Summary
  • 2. Racket programming language
    • 2.1. Introduction to Lisp
    • 2.2. Why Racket
    • 2.3. Configuration and installation
    • 2.4. Tutorial
      • 2.4.1. Primitive types
      • 2.4.2. Lists, evaluation, quotes
      • 2.4.3. Pairs
      • 2.4.4. Adding definitions
      • 2.4.5. Procedures and functions
      • 2.4.6. Conditional procedures
      • 2.4.7. Recursive procedures
      • 2.4.8. Procedures that return procedures
      • 2.4.9. General higher-order procedures
      • 2.4.10. Packages
      • 2.4.11. Scope
      • 2.4.12. Mutation
      • 2.4.13. Structures
      • 2.4.14. Threads
    • 2.4. Creating an executable
    • Summary
  • 3. Blockchain implementation
    • 3.1. wallet.rkt
    • 3.2. block.rkt
    • 3.3. utils.rkt
    • 3.4. Transactions
      • 3.4.1. transaction-io.rkt
      • 3.4.2. transaction.rkt
    • 3.5. blockchain.rkt
    • 3.6. Integrating components
      • 3.6.1. main-helper.rkt
      • 3.6.2. main.rkt
    • Summary
  • 4. Extending the blockchain
    • 4.1. Smart contracts implementation
      • 4.1.1. smart-contracts.rkt
      • 4.1.2. Updating existing code
    • 4.2. Peer-to-peer implementation
      • 4.2.1. peer-to-peer.rkt
      • 4.2.2. Updating existing code
      • 4.2.3. main-p2p.rkt
    • 4.3. Putting everything together
    • Summary
  • Conclusion
  • Further reading
  • Appendices
    • Appendix A: Cryptojacking
    • Appendix B: Macros
      • Hygienic macros
    • Appendix C: Text editor
  • About the author
  • Notes

Causes Supported

Free Software Foundation

http://www.fsf.org

The Free Software Foundation (FSF) is a nonprofit with a worldwide mission to promote computer user freedom. We defend the rights of all software users.

As our society grows more dependent on computers, the software we run is of critical importance to securing the future of a free society. Free software is about having control over the technology we use in our homes, schools and businesses, where computers work for our individual and communal benefit, not for proprietary software companies or governments who might seek to restrict and monitor us.

Authors have earned$8,704,777writing, publishing and selling on Leanpub,
earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub