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.
- Preface and acknowledgments
1. Introduction to Blockchain
- 1.1. Motivation
- 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
2. Racket programming language
- 2.1. Introduction to Lisp
- 2.2. Why Racket
- 2.3. Configuration and installation
- 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
3. Blockchain implementation
3.6. Integrating components
4. Extending the blockchain
4.1. Smart contracts implementation
- 4.1.2. Updating existing code
4.2. Peer-to-peer implementation
- 4.2.2. Updating existing code
- 4.3. Putting everything together
- 4.1. Smart contracts implementation
- Further reading
- Appendix A: Cryptojacking
Appendix B: Macros
- Hygienic macros
- Appendix C: Text editor
- About the author
Free Software Foundationhttp://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.
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.